@vuetify/v0 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -27
- package/dist/browser/index.js +7353 -4921
- package/dist/components/index.d.mts +4 -4
- package/dist/components/index.mjs +5 -5
- package/dist/{components-BomyjmT3.mjs → components-BI9xdoz5.mjs} +1171 -122
- package/dist/composables/index.d.mts +4 -4
- package/dist/composables/index.mjs +4 -5
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +2 -2
- package/dist/{globals-C3JrEDXZ.mjs → globals-WKdFmgwy.mjs} +1 -1
- package/dist/{index-MLb3LH9a.d.mts → index-Bby5ljat.d.mts} +55 -55
- package/dist/{index-CxeZr8jO.d.mts → index-C8YcMooA.d.mts} +6 -2
- package/dist/index-_y91DmIS.d.mts +4019 -0
- package/dist/{index-OU0IRbIS.d.mts → index-rcTqb9U3.d.mts} +610 -71
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +6 -7
- package/dist/json/attributes.json +898 -0
- package/dist/json/importMap.json +176 -0
- package/dist/json/tags.json +441 -0
- package/dist/json/web-types.json +2132 -0
- package/dist/types/index.d.mts +1 -1
- package/dist/useClickOutside-B47X8X6-.mjs +7656 -0
- package/dist/utilities/index.d.mts +3 -3
- package/dist/utilities/index.mjs +2 -2
- package/dist/{utilities-CjDz-Xvn.mjs → utilities-9i1hJnMd.mjs} +28 -1
- package/package.json +10 -4
- package/dist/composables-CbAPZabd.mjs +0 -3113
- package/dist/index-B0QJdwz9.d.mts +0 -2488
- package/dist/useStep-CfgBbrJB.mjs +0 -3192
- /package/dist/{constants-DypzAkYp.mjs → constants-3l8TGg5J.mjs} +0 -0
- /package/dist/{index-B9mKi4pr.d.mts → index-DMQJJUrv.d.mts} +0 -0
- /package/dist/{index-4jSy8KIt.d.mts → index-DYSwiS9k.d.mts} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { a as MaybeArray, i as ID } from "./index-
|
|
2
|
-
import { B as RegistryTicket, I as RegistryContext, L as RegistryContextOptions, M as SelectionTicket, S as GroupContext, T as GroupTicket, U as ContextTrinity, c as SingleContext, d as SingleTicket, k as SelectionContext, u as SingleOptions, z as RegistryOptions } from "./index-
|
|
1
|
+
import { a as MaybeArray, i as ID } from "./index-DYSwiS9k.mjs";
|
|
2
|
+
import { B as RegistryTicket, I as RegistryContext, L as RegistryContextOptions, M as SelectionTicket, S as GroupContext, T as GroupTicket, U as ContextTrinity, c as SingleContext, d as SingleTicket, k as SelectionContext, u as SingleOptions, z as RegistryOptions } from "./index-Bby5ljat.mjs";
|
|
3
3
|
import { App, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, UnwrapNestedRefs, WatchSource } from "vue";
|
|
4
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
4
5
|
|
|
5
6
|
//#region src/composables/createContext/index.d.ts
|
|
6
7
|
|
|
@@ -358,6 +359,13 @@ interface UseClickOutsideOptions {
|
|
|
358
359
|
* browser limitations. Use element refs instead when ignoring shadow hosts.
|
|
359
360
|
*/
|
|
360
361
|
ignore?: MaybeRefOrGetter<ClickOutsideIgnoreTarget[]>;
|
|
362
|
+
/**
|
|
363
|
+
* Use bounding rect instead of DOM containment to detect outside clicks.
|
|
364
|
+
* When true, checks if click coordinates are outside the element's bounding box.
|
|
365
|
+
* Useful for native <dialog> elements where backdrop clicks have the dialog as target.
|
|
366
|
+
* @default false
|
|
367
|
+
*/
|
|
368
|
+
bounds?: boolean;
|
|
361
369
|
}
|
|
362
370
|
interface UseClickOutsideReturn {
|
|
363
371
|
/**
|
|
@@ -431,9 +439,355 @@ interface UseClickOutsideReturn {
|
|
|
431
439
|
* { ignore: ['[data-app-bar]'] }
|
|
432
440
|
* )
|
|
433
441
|
* ```
|
|
442
|
+
*
|
|
443
|
+
* @example Native dialog with bounds detection
|
|
444
|
+
* ```ts
|
|
445
|
+
* // For native <dialog> elements, use bounds mode to detect backdrop clicks
|
|
446
|
+
* const dialogRef = useTemplateRef<HTMLDialogElement>('dialog')
|
|
447
|
+
*
|
|
448
|
+
* useClickOutside(
|
|
449
|
+
* dialogRef,
|
|
450
|
+
* () => { dialogRef.value?.close() },
|
|
451
|
+
* { bounds: true }
|
|
452
|
+
* )
|
|
453
|
+
* ```
|
|
434
454
|
*/
|
|
435
455
|
declare function useClickOutside(target: MaybeArray<ClickOutsideTarget>, handler: (event: PointerEvent | FocusEvent) => void, options?: UseClickOutsideOptions): UseClickOutsideReturn;
|
|
436
456
|
//#endregion
|
|
457
|
+
//#region src/composables/useDate/adapters/adapter.d.ts
|
|
458
|
+
interface DateAdapter<T = Temporal.PlainDateTime> {
|
|
459
|
+
/** Current locale for formatting */
|
|
460
|
+
locale?: string;
|
|
461
|
+
/** Create a date from various input types */
|
|
462
|
+
date: (value?: unknown) => T | null;
|
|
463
|
+
/** Convert to JavaScript Date object */
|
|
464
|
+
toJsDate: (value: T) => Date;
|
|
465
|
+
/** Parse ISO 8601 string */
|
|
466
|
+
parseISO: (date: string) => T;
|
|
467
|
+
/** Convert to ISO 8601 string */
|
|
468
|
+
toISO: (date: T) => string;
|
|
469
|
+
/** Parse date string with custom format */
|
|
470
|
+
parse: (value: string, format: string) => T | null;
|
|
471
|
+
/** Check if value is a valid date (type predicate for narrowing) */
|
|
472
|
+
isValid: (date: unknown) => date is T;
|
|
473
|
+
/** Check if value is null (type predicate for narrowing) */
|
|
474
|
+
isNull: (value: T | null) => value is null;
|
|
475
|
+
/** Get current locale code */
|
|
476
|
+
getCurrentLocaleCode: () => string;
|
|
477
|
+
/** Check if current locale uses 12-hour cycle */
|
|
478
|
+
is12HourCycleInCurrentLocale: () => boolean;
|
|
479
|
+
/** Format date using preset format key */
|
|
480
|
+
format: (date: T, formatString: string) => string;
|
|
481
|
+
/** Format date using custom format string */
|
|
482
|
+
formatByString: (date: T, formatString: string) => string;
|
|
483
|
+
/** Get helper text for format string (e.g., "mm/dd/yyyy") */
|
|
484
|
+
getFormatHelperText: (format: string) => string;
|
|
485
|
+
/** Format number according to locale */
|
|
486
|
+
formatNumber: (numberToFormat: string) => string;
|
|
487
|
+
/** Get meridiem text (AM/PM) for locale */
|
|
488
|
+
getMeridiemText: (ampm: 'am' | 'pm') => string;
|
|
489
|
+
startOfDay: (date: T) => T;
|
|
490
|
+
endOfDay: (date: T) => T;
|
|
491
|
+
/** @param firstDayOfWeek - 0=Sunday, 1=Monday, etc. */
|
|
492
|
+
startOfWeek: (date: T, firstDayOfWeek?: number) => T;
|
|
493
|
+
/** @param firstDayOfWeek - 0=Sunday, 1=Monday, etc. */
|
|
494
|
+
endOfWeek: (date: T, firstDayOfWeek?: number) => T;
|
|
495
|
+
startOfMonth: (date: T) => T;
|
|
496
|
+
endOfMonth: (date: T) => T;
|
|
497
|
+
startOfYear: (date: T) => T;
|
|
498
|
+
endOfYear: (date: T) => T;
|
|
499
|
+
addSeconds: (date: T, amount: number) => T;
|
|
500
|
+
addMinutes: (date: T, amount: number) => T;
|
|
501
|
+
addHours: (date: T, amount: number) => T;
|
|
502
|
+
addDays: (date: T, amount: number) => T;
|
|
503
|
+
addWeeks: (date: T, amount: number) => T;
|
|
504
|
+
addMonths: (date: T, amount: number) => T;
|
|
505
|
+
addYears: (date: T, amount: number) => T;
|
|
506
|
+
isAfter: (date: T, comparing: T) => boolean;
|
|
507
|
+
isAfterDay: (date: T, comparing: T) => boolean;
|
|
508
|
+
isAfterMonth: (date: T, comparing: T) => boolean;
|
|
509
|
+
isAfterYear: (date: T, comparing: T) => boolean;
|
|
510
|
+
isBefore: (date: T, comparing: T) => boolean;
|
|
511
|
+
isBeforeDay: (date: T, comparing: T) => boolean;
|
|
512
|
+
isBeforeMonth: (date: T, comparing: T) => boolean;
|
|
513
|
+
isBeforeYear: (date: T, comparing: T) => boolean;
|
|
514
|
+
isEqual: (date: T, comparing: T) => boolean;
|
|
515
|
+
isSameDay: (date: T, comparing: T) => boolean;
|
|
516
|
+
isSameMonth: (date: T, comparing: T) => boolean;
|
|
517
|
+
isSameYear: (date: T, comparing: T) => boolean;
|
|
518
|
+
isSameHour: (date: T, comparing: T) => boolean;
|
|
519
|
+
isWithinRange: (date: T, range: [T, T]) => boolean;
|
|
520
|
+
getYear: (date: T) => number;
|
|
521
|
+
getMonth: (date: T) => number;
|
|
522
|
+
getDate: (date: T) => number;
|
|
523
|
+
getHours: (date: T) => number;
|
|
524
|
+
getMinutes: (date: T) => number;
|
|
525
|
+
getSeconds: (date: T) => number;
|
|
526
|
+
/** @param comparing - Can be T or ISO string */
|
|
527
|
+
getDiff: (date: T, comparing: T | string, unit?: string) => number;
|
|
528
|
+
/** @param minimalDays - Minimum days in first week for it to count as week 1 */
|
|
529
|
+
getWeek: (date: T, firstDayOfWeek?: number, minimalDays?: number) => number;
|
|
530
|
+
/** Get number of days in the month */
|
|
531
|
+
getDaysInMonth: (date: T) => number;
|
|
532
|
+
setYear: (date: T, year: number) => T;
|
|
533
|
+
setMonth: (date: T, month: number) => T;
|
|
534
|
+
setDate: (date: T, day: number) => T;
|
|
535
|
+
setHours: (date: T, hours: number) => T;
|
|
536
|
+
setMinutes: (date: T, minutes: number) => T;
|
|
537
|
+
setSeconds: (date: T, seconds: number) => T;
|
|
538
|
+
getWeekdays: (firstDayOfWeek?: number, weekdayFormat?: 'long' | 'short' | 'narrow') => string[];
|
|
539
|
+
getWeekArray: (date: T, firstDayOfWeek?: number) => T[][];
|
|
540
|
+
/** Get array of months in a year (12 dates, one for each month) */
|
|
541
|
+
getMonthArray: (date: T) => T[];
|
|
542
|
+
/** Get array of years between start and end dates */
|
|
543
|
+
getYearRange: (start: T, end: T) => T[];
|
|
544
|
+
getNextMonth: (date: T) => T;
|
|
545
|
+
getPreviousMonth: (date: T) => T;
|
|
546
|
+
/** Merge date from one value with time from another */
|
|
547
|
+
mergeDateAndTime: (date: T, time: T) => T;
|
|
548
|
+
}
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region src/composables/useDate/adapters/v0.d.ts
|
|
551
|
+
type PlainDateTime = Temporal.PlainDateTime;
|
|
552
|
+
declare class Vuetify0DateAdapter implements DateAdapter<PlainDateTime> {
|
|
553
|
+
private _locale;
|
|
554
|
+
/** Cache for Intl.DateTimeFormat instances, keyed by locale + options */
|
|
555
|
+
private formatCache;
|
|
556
|
+
/** Cache for Intl.NumberFormat instances, keyed by locale */
|
|
557
|
+
private numberFormatCache;
|
|
558
|
+
constructor(locale?: string);
|
|
559
|
+
/** Current locale. Setting a new locale clears format caches. */
|
|
560
|
+
get locale(): string;
|
|
561
|
+
set locale(value: string);
|
|
562
|
+
/**
|
|
563
|
+
* Create a date from various input types.
|
|
564
|
+
*
|
|
565
|
+
* @param value - Date value (PlainDateTime, PlainDate, ZonedDateTime, Date, ISO string, timestamp)
|
|
566
|
+
* @returns PlainDateTime or null if invalid
|
|
567
|
+
*
|
|
568
|
+
* @remarks
|
|
569
|
+
* **SSR Safety:** When called without arguments:
|
|
570
|
+
* - Browser: Returns current time via `Temporal.Now.plainDateTimeISO()`
|
|
571
|
+
* - Server: Returns epoch (1970-01-01T00:00:00) for deterministic rendering
|
|
572
|
+
*
|
|
573
|
+
* For SSR apps needing current time, pass `Date.now()` explicitly and handle
|
|
574
|
+
* hydration via `<ClientOnly>` (Nuxt) or `v-if` + `onMounted` pattern.
|
|
575
|
+
*/
|
|
576
|
+
date(value?: unknown): PlainDateTime | null;
|
|
577
|
+
toJsDate(value: PlainDateTime): Date;
|
|
578
|
+
parseISO(dateString: string): PlainDateTime;
|
|
579
|
+
toISO(date: PlainDateTime): string;
|
|
580
|
+
/**
|
|
581
|
+
* Parses a date string into a PlainDateTime.
|
|
582
|
+
*
|
|
583
|
+
* **Known limitation**: The `format` parameter is currently ignored.
|
|
584
|
+
* Temporal API doesn't provide built-in format parsing, and implementing
|
|
585
|
+
* full format string parsing (e.g., 'MM/DD/YYYY') would require a
|
|
586
|
+
* substantial custom parser. This method delegates to `date()` which
|
|
587
|
+
* handles ISO 8601 strings and common formats.
|
|
588
|
+
*
|
|
589
|
+
* For custom format parsing, consider using a library like date-fns or
|
|
590
|
+
* luxon with a custom adapter.
|
|
591
|
+
*
|
|
592
|
+
* @param value - The date string to parse
|
|
593
|
+
* @param _format - Format hint (currently ignored)
|
|
594
|
+
* @returns Parsed PlainDateTime or null if invalid
|
|
595
|
+
*/
|
|
596
|
+
parse(value: string, _format: string): PlainDateTime | null;
|
|
597
|
+
isValid(date: unknown): date is PlainDateTime;
|
|
598
|
+
isNull(value: PlainDateTime | null): value is null;
|
|
599
|
+
getCurrentLocaleCode(): string;
|
|
600
|
+
is12HourCycleInCurrentLocale(): boolean;
|
|
601
|
+
format(date: PlainDateTime, formatString: string): string;
|
|
602
|
+
formatByString(date: PlainDateTime, formatString: string): string;
|
|
603
|
+
getFormatHelperText(format: string): string;
|
|
604
|
+
formatNumber(numberToFormat: string): string;
|
|
605
|
+
getMeridiemText(ampm: 'am' | 'pm'): string;
|
|
606
|
+
startOfDay(date: PlainDateTime): PlainDateTime;
|
|
607
|
+
endOfDay(date: PlainDateTime): PlainDateTime;
|
|
608
|
+
startOfWeek(date: PlainDateTime, firstDayOfWeek?: number): PlainDateTime;
|
|
609
|
+
endOfWeek(date: PlainDateTime, firstDayOfWeek?: number): PlainDateTime;
|
|
610
|
+
startOfMonth(date: PlainDateTime): PlainDateTime;
|
|
611
|
+
endOfMonth(date: PlainDateTime): PlainDateTime;
|
|
612
|
+
startOfYear(date: PlainDateTime): PlainDateTime;
|
|
613
|
+
endOfYear(date: PlainDateTime): PlainDateTime;
|
|
614
|
+
addSeconds(date: PlainDateTime, amount: number): PlainDateTime;
|
|
615
|
+
addMinutes(date: PlainDateTime, amount: number): PlainDateTime;
|
|
616
|
+
addHours(date: PlainDateTime, amount: number): PlainDateTime;
|
|
617
|
+
addDays(date: PlainDateTime, amount: number): PlainDateTime;
|
|
618
|
+
addWeeks(date: PlainDateTime, amount: number): PlainDateTime;
|
|
619
|
+
addMonths(date: PlainDateTime, amount: number): PlainDateTime;
|
|
620
|
+
addYears(date: PlainDateTime, amount: number): PlainDateTime;
|
|
621
|
+
isAfter(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
622
|
+
isAfterDay(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
623
|
+
isAfterMonth(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
624
|
+
isAfterYear(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
625
|
+
isBefore(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
626
|
+
isBeforeDay(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
627
|
+
isBeforeMonth(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
628
|
+
isBeforeYear(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
629
|
+
isEqual(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
630
|
+
isSameDay(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
631
|
+
isSameMonth(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
632
|
+
isSameYear(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
633
|
+
isSameHour(date: PlainDateTime, comparing: PlainDateTime): boolean;
|
|
634
|
+
isWithinRange(date: PlainDateTime, [start, end]: [PlainDateTime, PlainDateTime]): boolean;
|
|
635
|
+
getYear(date: PlainDateTime): number;
|
|
636
|
+
getMonth(date: PlainDateTime): number;
|
|
637
|
+
getDate(date: PlainDateTime): number;
|
|
638
|
+
getHours(date: PlainDateTime): number;
|
|
639
|
+
getMinutes(date: PlainDateTime): number;
|
|
640
|
+
getSeconds(date: PlainDateTime): number;
|
|
641
|
+
getDiff(date: PlainDateTime, comparing: PlainDateTime | string, unit?: string): number;
|
|
642
|
+
getWeek(date: PlainDateTime, firstDayOfWeek?: number, minimalDays?: number): number;
|
|
643
|
+
getDaysInMonth(date: PlainDateTime): number;
|
|
644
|
+
setYear(date: PlainDateTime, year: number): PlainDateTime;
|
|
645
|
+
setMonth(date: PlainDateTime, month: number): PlainDateTime;
|
|
646
|
+
setDate(date: PlainDateTime, day: number): PlainDateTime;
|
|
647
|
+
setHours(date: PlainDateTime, hours: number): PlainDateTime;
|
|
648
|
+
setMinutes(date: PlainDateTime, minutes: number): PlainDateTime;
|
|
649
|
+
setSeconds(date: PlainDateTime, seconds: number): PlainDateTime;
|
|
650
|
+
getWeekdays(firstDayOfWeek?: number, format?: 'long' | 'short' | 'narrow'): string[];
|
|
651
|
+
getWeekArray(date: PlainDateTime, firstDayOfWeek?: number): PlainDateTime[][];
|
|
652
|
+
getMonthArray(date: PlainDateTime): PlainDateTime[];
|
|
653
|
+
getYearRange(start: PlainDateTime, end: PlainDateTime): PlainDateTime[];
|
|
654
|
+
getNextMonth(date: PlainDateTime): PlainDateTime;
|
|
655
|
+
getPreviousMonth(date: PlainDateTime): PlainDateTime;
|
|
656
|
+
mergeDateAndTime(date: PlainDateTime, time: PlainDateTime): PlainDateTime;
|
|
657
|
+
/**
|
|
658
|
+
* Gets a cached Intl.DateTimeFormat instance or creates one if not cached.
|
|
659
|
+
* Cache is limited to MAX_CACHE_SIZE entries to prevent memory leaks.
|
|
660
|
+
*/
|
|
661
|
+
private getFormatter;
|
|
662
|
+
/**
|
|
663
|
+
* Gets a cached Intl.NumberFormat instance or creates one if not cached.
|
|
664
|
+
* Cache is limited to MAX_CACHE_SIZE entries to prevent memory leaks.
|
|
665
|
+
*/
|
|
666
|
+
private getNumberFormatter;
|
|
667
|
+
}
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region src/composables/useDate/index.d.ts
|
|
670
|
+
/** The default date type when using Vuetify0DateAdapter */
|
|
671
|
+
type DefaultDateType = Temporal.PlainDateTime;
|
|
672
|
+
interface DateContext<Z = DefaultDateType> {
|
|
673
|
+
/** The date adapter instance */
|
|
674
|
+
adapter: DateAdapter<Z>;
|
|
675
|
+
/** Current locale (reactive, synced with useLocale if available) */
|
|
676
|
+
locale: ComputedRef<string | undefined>;
|
|
677
|
+
}
|
|
678
|
+
/** Options for date composables */
|
|
679
|
+
interface DateOptions<Z = DefaultDateType> {
|
|
680
|
+
/** Custom date adapter instance (defaults to Vuetify0DateAdapter) */
|
|
681
|
+
adapter?: DateAdapter<Z>;
|
|
682
|
+
/** Locale for formatting (defaults to useLocale's selected locale or 'en-US') */
|
|
683
|
+
locale?: string;
|
|
684
|
+
/** Short locale codes mapped to full Intl locale strings (e.g., { en: 'en-US' }) */
|
|
685
|
+
locales?: Record<string, string>;
|
|
686
|
+
}
|
|
687
|
+
/** Context options with namespace */
|
|
688
|
+
interface DateContextOptions<Z = DefaultDateType> extends DateOptions<Z> {
|
|
689
|
+
namespace?: string;
|
|
690
|
+
}
|
|
691
|
+
/** Plugin options */
|
|
692
|
+
interface DatePluginOptions<Z = DefaultDateType> extends DateContextOptions<Z> {}
|
|
693
|
+
/**
|
|
694
|
+
* Creates a new date context.
|
|
695
|
+
*
|
|
696
|
+
* @param options Optional adapter and locale configuration.
|
|
697
|
+
* @template E The date context type.
|
|
698
|
+
* @returns A date context.
|
|
699
|
+
*
|
|
700
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-date
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* ```ts
|
|
704
|
+
* const { adapter } = createDate()
|
|
705
|
+
* const today = adapter.date() // Temporal.PlainDateTime
|
|
706
|
+
*
|
|
707
|
+
* // With locale options
|
|
708
|
+
* const { adapter: deAdapter } = createDate({ locale: 'de-DE' })
|
|
709
|
+
*
|
|
710
|
+
* // With custom adapter
|
|
711
|
+
* const { adapter } = createDate({ adapter: new DateFnsAdapter() })
|
|
712
|
+
* ```
|
|
713
|
+
*/
|
|
714
|
+
declare function createDate<Z = DefaultDateType, E extends DateContext<Z> = DateContext<Z>>(options?: DateOptions<Z>): E;
|
|
715
|
+
/**
|
|
716
|
+
* Creates a fallback date context for when useDate is called outside of a Vue component.
|
|
717
|
+
*
|
|
718
|
+
* @returns A fallback date context with Vuetify0DateAdapter.
|
|
719
|
+
* @internal
|
|
720
|
+
*/
|
|
721
|
+
declare function createDateFallback(): DateContext<DefaultDateType>;
|
|
722
|
+
/**
|
|
723
|
+
* Creates a new date context trinity.
|
|
724
|
+
*
|
|
725
|
+
* @param options Optional adapter, locale, and namespace configuration.
|
|
726
|
+
* @template E The date context type.
|
|
727
|
+
* @returns A trinity [useContext, provideContext, defaultContext].
|
|
728
|
+
*
|
|
729
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-date
|
|
730
|
+
*
|
|
731
|
+
* @example
|
|
732
|
+
* ```ts
|
|
733
|
+
* const [useAppDate, provideAppDate] = createDateContext({
|
|
734
|
+
* namespace: 'app:date',
|
|
735
|
+
* })
|
|
736
|
+
*
|
|
737
|
+
* // With custom adapter
|
|
738
|
+
* const [useAppDate, provideAppDate] = createDateContext({
|
|
739
|
+
* adapter: new DateFnsAdapter(),
|
|
740
|
+
* namespace: 'app:date',
|
|
741
|
+
* })
|
|
742
|
+
* ```
|
|
743
|
+
*/
|
|
744
|
+
declare function createDateContext<Z = DefaultDateType, E extends DateContext<Z> = DateContext<Z>>(options?: DateContextOptions<Z>): ContextTrinity<E>;
|
|
745
|
+
/**
|
|
746
|
+
* Creates a new date plugin.
|
|
747
|
+
*
|
|
748
|
+
* @param options Optional adapter, locale, and namespace configuration.
|
|
749
|
+
* @template E The date context type.
|
|
750
|
+
* @returns A Vue plugin.
|
|
751
|
+
*
|
|
752
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-date
|
|
753
|
+
*
|
|
754
|
+
* @example
|
|
755
|
+
* ```ts
|
|
756
|
+
* const app = createApp(App)
|
|
757
|
+
* app.use(createDatePlugin())
|
|
758
|
+
*
|
|
759
|
+
* // With options
|
|
760
|
+
* app.use(createDatePlugin({ locale: 'de-DE' }))
|
|
761
|
+
*
|
|
762
|
+
* // With custom adapter
|
|
763
|
+
* app.use(createDatePlugin({ adapter: new DateFnsAdapter() }))
|
|
764
|
+
* ```
|
|
765
|
+
*/
|
|
766
|
+
declare function createDatePlugin<Z = DefaultDateType, E extends DateContext<Z> = DateContext<Z>>(options?: DatePluginOptions<Z>): Plugin;
|
|
767
|
+
/**
|
|
768
|
+
* Returns the current date context.
|
|
769
|
+
*
|
|
770
|
+
* When called inside a component with a provided date context (via plugin or provider),
|
|
771
|
+
* returns that context. Otherwise, returns a fallback context with Vuetify0DateAdapter.
|
|
772
|
+
*
|
|
773
|
+
* @param namespace The namespace to look up (defaults to 'v0:date').
|
|
774
|
+
* @template E The date context type.
|
|
775
|
+
* @returns The current date context.
|
|
776
|
+
*
|
|
777
|
+
* @see https://0.vuetifyjs.com/composables/plugins/use-date
|
|
778
|
+
*
|
|
779
|
+
* @example
|
|
780
|
+
* ```vue
|
|
781
|
+
* <script setup lang="ts">
|
|
782
|
+
* import { useDate } from '@vuetify/v0'
|
|
783
|
+
*
|
|
784
|
+
* const { adapter, locale } = useDate()
|
|
785
|
+
* const today = adapter.date()
|
|
786
|
+
* </script>
|
|
787
|
+
* ```
|
|
788
|
+
*/
|
|
789
|
+
declare function useDate<Z = DefaultDateType, E extends DateContext<Z> = DateContext<Z>>(namespace?: string): E;
|
|
790
|
+
//#endregion
|
|
437
791
|
//#region src/composables/useEventListener/index.d.ts
|
|
438
792
|
type CleanupFunction = () => void;
|
|
439
793
|
type EventHandler<E = Event> = (event: E) => void;
|
|
@@ -514,7 +868,7 @@ declare function useWindowEventListener<E extends keyof WindowEventMap>(event: M
|
|
|
514
868
|
*/
|
|
515
869
|
declare function useDocumentEventListener<E extends keyof DocumentEventMap>(event: MaybeRefOrGetter<MaybeArray<E>>, listener: MaybeRef<MaybeArray<(this: Document, event: DocumentEventMap[E]) => void>>, options?: MaybeRefOrGetter<boolean | AddEventListenerOptions>): CleanupFunction;
|
|
516
870
|
//#endregion
|
|
517
|
-
//#region src/composables/
|
|
871
|
+
//#region src/composables/createTokens/index.d.ts
|
|
518
872
|
interface TokenAlias<T = unknown> {
|
|
519
873
|
[key: string]: unknown;
|
|
520
874
|
$value: T;
|
|
@@ -541,11 +895,11 @@ interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
|
|
|
541
895
|
* @returns True if the token is an alias, false otherwise.
|
|
542
896
|
* @remarks An alias is a string that starts with "{" and ends with "}".
|
|
543
897
|
*
|
|
544
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
898
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens#is-alias
|
|
545
899
|
*
|
|
546
900
|
* @example
|
|
547
901
|
* ```ts
|
|
548
|
-
* const tokens =
|
|
902
|
+
* const tokens = createTokens({
|
|
549
903
|
* colors: {
|
|
550
904
|
* primary: '#3b82f6',
|
|
551
905
|
* secondary: '{colors.primary}', // Alias reference
|
|
@@ -564,11 +918,11 @@ interface TokenContext<Z extends TokenTicket> extends RegistryContext<Z> {
|
|
|
564
918
|
* @returns The resolved value of the token or alias, or undefined if not found.
|
|
565
919
|
* @remarks This function can resolve nested aliases and supports token paths using dot notation.
|
|
566
920
|
*
|
|
567
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
921
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens#resolve
|
|
568
922
|
*
|
|
569
923
|
* @example
|
|
570
924
|
* ```ts
|
|
571
|
-
* const tokens =
|
|
925
|
+
* const tokens = createTokens({
|
|
572
926
|
* colors: {
|
|
573
927
|
* primary: '#3b82f6',
|
|
574
928
|
* secondary: '{colors.primary}', // Alias reference
|
|
@@ -608,13 +962,13 @@ interface TokenContextOptions extends TokenOptions, RegistryContextOptions {
|
|
|
608
962
|
* @returns A new token instance.
|
|
609
963
|
*
|
|
610
964
|
* @see https://www.designtokens.org/tr/drafts/format/
|
|
611
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
965
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
612
966
|
*
|
|
613
967
|
* @example
|
|
614
968
|
* ```ts
|
|
615
|
-
* import {
|
|
969
|
+
* import { createTokens } from '@vuetify/v0'
|
|
616
970
|
*
|
|
617
|
-
* const tokens =
|
|
971
|
+
* const tokens = createTokens({
|
|
618
972
|
* colors: {
|
|
619
973
|
* primary: '#3b82f6',
|
|
620
974
|
* secondary: '{colors.primary}', // Alias reference
|
|
@@ -635,7 +989,7 @@ declare function createTokens<Z extends TokenTicket = TokenTicket, E extends Tok
|
|
|
635
989
|
* @template E The type of the token context.
|
|
636
990
|
* @returns A new token context.
|
|
637
991
|
*
|
|
638
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
992
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
639
993
|
*
|
|
640
994
|
* @example
|
|
641
995
|
* ```ts
|
|
@@ -659,7 +1013,7 @@ declare function createTokensContext<Z extends TokenTicket = TokenTicket, E exte
|
|
|
659
1013
|
* @param namespace The namespace for the tokens context. Defaults to `'v0:tokens'`.
|
|
660
1014
|
* @returns The current tokens instance.
|
|
661
1015
|
*
|
|
662
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
1016
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-tokens
|
|
663
1017
|
*
|
|
664
1018
|
* @example
|
|
665
1019
|
* ```vue
|
|
@@ -928,7 +1282,7 @@ declare function useFilter<Z extends FilterItem>(query: FilterQuery, items: Mayb
|
|
|
928
1282
|
*/
|
|
929
1283
|
declare function useFilterContext<Z extends FilterItem = FilterItem, E extends FilterContext<Z> = FilterContext<Z>>(namespace?: string): E;
|
|
930
1284
|
//#endregion
|
|
931
|
-
//#region src/composables/
|
|
1285
|
+
//#region src/composables/createForm/index.d.ts
|
|
932
1286
|
type FormValidationResult = string | true | Promise<string | true>;
|
|
933
1287
|
type FormValidationRule = (value: unknown) => FormValidationResult;
|
|
934
1288
|
type FormValue = Ref<unknown> | ShallowRef<unknown>;
|
|
@@ -965,7 +1319,7 @@ interface FormContextOptions extends RegistryOptions {
|
|
|
965
1319
|
* @template E The type of the form context.
|
|
966
1320
|
* @returns A new form instance.
|
|
967
1321
|
*
|
|
968
|
-
* @see https://0.vuetifyjs.com/composables/forms/
|
|
1322
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
969
1323
|
*
|
|
970
1324
|
* @example
|
|
971
1325
|
* ```ts
|
|
@@ -995,7 +1349,7 @@ declare function createForm<Z extends FormTicket = FormTicket, E extends FormCon
|
|
|
995
1349
|
* @template E The type of the form context.
|
|
996
1350
|
* @returns A new form context.
|
|
997
1351
|
*
|
|
998
|
-
* @see https://0.vuetifyjs.com/composables/forms/
|
|
1352
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
999
1353
|
*
|
|
1000
1354
|
* @example
|
|
1001
1355
|
* ```ts
|
|
@@ -1025,7 +1379,7 @@ declare function createFormContext<Z extends FormTicket = FormTicket, E extends
|
|
|
1025
1379
|
* @param namespace The namespace for the form context. Defaults to `'v0:form'`.
|
|
1026
1380
|
* @returns The current form instance.
|
|
1027
1381
|
*
|
|
1028
|
-
* @see https://0.vuetifyjs.com/composables/forms/
|
|
1382
|
+
* @see https://0.vuetifyjs.com/composables/forms/create-form
|
|
1029
1383
|
*
|
|
1030
1384
|
* @example
|
|
1031
1385
|
* ```vue
|
|
@@ -1044,6 +1398,96 @@ declare function createFormContext<Z extends FormTicket = FormTicket, E extends
|
|
|
1044
1398
|
*/
|
|
1045
1399
|
declare function useForm<Z extends FormTicket = FormTicket, E extends FormContext<Z> = FormContext<Z>>(namespace?: string): E;
|
|
1046
1400
|
//#endregion
|
|
1401
|
+
//#region src/composables/useHotkey/index.d.ts
|
|
1402
|
+
interface UseHotkeyOptions {
|
|
1403
|
+
/**
|
|
1404
|
+
* The keyboard event type to listen for.
|
|
1405
|
+
* @default 'keydown'
|
|
1406
|
+
*/
|
|
1407
|
+
event?: MaybeRefOrGetter<'keydown' | 'keyup'>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Whether to trigger the callback when an input element is focused.
|
|
1410
|
+
* @default false
|
|
1411
|
+
*/
|
|
1412
|
+
inputs?: MaybeRefOrGetter<boolean>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Whether to prevent the default browser action.
|
|
1415
|
+
* @default true
|
|
1416
|
+
*/
|
|
1417
|
+
preventDefault?: MaybeRefOrGetter<boolean>;
|
|
1418
|
+
/**
|
|
1419
|
+
* Whether to stop event propagation.
|
|
1420
|
+
* @default false
|
|
1421
|
+
*/
|
|
1422
|
+
stopPropagation?: MaybeRefOrGetter<boolean>;
|
|
1423
|
+
/**
|
|
1424
|
+
* Timeout in ms before a key sequence resets.
|
|
1425
|
+
* @default 1000
|
|
1426
|
+
*/
|
|
1427
|
+
sequenceTimeout?: MaybeRefOrGetter<number>;
|
|
1428
|
+
}
|
|
1429
|
+
interface UseHotkeyReturn {
|
|
1430
|
+
/**
|
|
1431
|
+
* Whether the hotkey listener is currently active (listening for keys).
|
|
1432
|
+
* False when paused, when keys is undefined, or in SSR.
|
|
1433
|
+
*/
|
|
1434
|
+
readonly isActive: Readonly<Ref<boolean>>;
|
|
1435
|
+
/**
|
|
1436
|
+
* Whether the hotkey listener is currently paused.
|
|
1437
|
+
*/
|
|
1438
|
+
readonly isPaused: Readonly<Ref<boolean>>;
|
|
1439
|
+
/**
|
|
1440
|
+
* Pause listening (removes listener but keeps configuration).
|
|
1441
|
+
*/
|
|
1442
|
+
pause: () => void;
|
|
1443
|
+
/**
|
|
1444
|
+
* Resume listening after pause.
|
|
1445
|
+
*/
|
|
1446
|
+
resume: () => void;
|
|
1447
|
+
/**
|
|
1448
|
+
* Stop listening and clean up (removes listener).
|
|
1449
|
+
*/
|
|
1450
|
+
stop: () => void;
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Platform context for testing platform-specific behavior.
|
|
1454
|
+
* @internal
|
|
1455
|
+
*/
|
|
1456
|
+
interface PlatformContext {
|
|
1457
|
+
isMac: boolean;
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* A composable that listens for hotkey combinations and sequences.
|
|
1461
|
+
*
|
|
1462
|
+
* @param keys - The hotkey string (e.g., 'ctrl+k', 'g-h')
|
|
1463
|
+
* @param callback - The function to call when the hotkey is triggered
|
|
1464
|
+
* @param options - Configuration options
|
|
1465
|
+
* @returns An object with state refs and control methods
|
|
1466
|
+
*
|
|
1467
|
+
* @see https://0.vuetifyjs.com/composables/system/use-hotkey
|
|
1468
|
+
*
|
|
1469
|
+
* @example
|
|
1470
|
+
* ```ts
|
|
1471
|
+
* import { useHotkey } from '@vuetify/v0'
|
|
1472
|
+
*
|
|
1473
|
+
* // Simple combination
|
|
1474
|
+
* const { isActive, pause, resume } = useHotkey('ctrl+k', () => {
|
|
1475
|
+
* console.log('Command palette opened')
|
|
1476
|
+
* })
|
|
1477
|
+
*
|
|
1478
|
+
* // Key sequence (GitHub-style)
|
|
1479
|
+
* useHotkey('g-h', () => console.log('Go home'))
|
|
1480
|
+
*
|
|
1481
|
+
* // With options
|
|
1482
|
+
* useHotkey('escape', closeModal, { inputs: true })
|
|
1483
|
+
*
|
|
1484
|
+
* // Pause/resume control
|
|
1485
|
+
* pause() // Temporarily disable
|
|
1486
|
+
* resume() // Re-enable
|
|
1487
|
+
* ```
|
|
1488
|
+
*/
|
|
1489
|
+
declare function useHotkey(keys: MaybeRefOrGetter<string | undefined>, callback: (e: KeyboardEvent) => void, options?: UseHotkeyOptions, _platform?: PlatformContext): UseHotkeyReturn;
|
|
1490
|
+
//#endregion
|
|
1047
1491
|
//#region src/composables/useHydration/index.d.ts
|
|
1048
1492
|
interface HydrationContext {
|
|
1049
1493
|
isHydrated: Readonly<ShallowRef<boolean>>;
|
|
@@ -1260,55 +1704,77 @@ interface UseElementIntersectionReturn extends UseIntersectionObserverReturn {
|
|
|
1260
1704
|
*/
|
|
1261
1705
|
declare function useElementIntersection(target: MaybeRef$1<Element | null | undefined>, options?: IntersectionObserverOptions): UseElementIntersectionReturn;
|
|
1262
1706
|
//#endregion
|
|
1263
|
-
//#region src/composables/
|
|
1264
|
-
interface
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1707
|
+
//#region src/composables/useLazy/index.d.ts
|
|
1708
|
+
interface LazyOptions {
|
|
1709
|
+
/**
|
|
1710
|
+
* When true, content renders immediately without waiting for activation.
|
|
1711
|
+
* @default false
|
|
1712
|
+
*/
|
|
1713
|
+
eager?: MaybeRefOrGetter<boolean>;
|
|
1269
1714
|
}
|
|
1270
|
-
interface
|
|
1715
|
+
interface LazyContext {
|
|
1271
1716
|
/**
|
|
1272
|
-
* Whether the
|
|
1717
|
+
* Whether the lazy content has been activated at least once.
|
|
1273
1718
|
*/
|
|
1274
|
-
readonly
|
|
1719
|
+
readonly isBooted: Readonly<ShallowRef<boolean>>;
|
|
1275
1720
|
/**
|
|
1276
|
-
*
|
|
1721
|
+
* Whether content should be rendered.
|
|
1722
|
+
* True when: isBooted OR eager OR active
|
|
1277
1723
|
*/
|
|
1278
|
-
|
|
1724
|
+
readonly hasContent: Readonly<Ref<boolean>>;
|
|
1279
1725
|
/**
|
|
1280
|
-
*
|
|
1726
|
+
* Reset booted state. Call on leave transition if not eager.
|
|
1281
1727
|
*/
|
|
1282
|
-
|
|
1728
|
+
reset: () => void;
|
|
1729
|
+
/**
|
|
1730
|
+
* Transition callback for after-leave. Resets if not eager.
|
|
1731
|
+
*/
|
|
1732
|
+
onAfterLeave: () => void;
|
|
1283
1733
|
}
|
|
1284
1734
|
/**
|
|
1285
|
-
*
|
|
1735
|
+
* Deferred content rendering for performance optimization.
|
|
1286
1736
|
*
|
|
1287
|
-
* @param
|
|
1288
|
-
* @
|
|
1737
|
+
* @param active Reactive boolean controlling activation state
|
|
1738
|
+
* @param options Configuration options
|
|
1739
|
+
* @returns Lazy context with state refs and control functions
|
|
1289
1740
|
*
|
|
1290
|
-
* @see https://0.vuetifyjs.com/composables/system/use-
|
|
1741
|
+
* @see https://0.vuetifyjs.com/composables/system/use-lazy
|
|
1291
1742
|
*
|
|
1292
1743
|
* @example
|
|
1293
1744
|
* ```ts
|
|
1294
|
-
* import {
|
|
1745
|
+
* import { ref } from 'vue'
|
|
1746
|
+
* import { useLazy } from '@vuetify/v0'
|
|
1295
1747
|
*
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1748
|
+
* const isOpen = ref(false)
|
|
1749
|
+
* const { hasContent, onAfterLeave } = useLazy(isOpen)
|
|
1298
1750
|
*
|
|
1299
|
-
* //
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1751
|
+
* // In template:
|
|
1752
|
+
* // <Transition @after-leave="onAfterLeave">
|
|
1753
|
+
* // <div v-if="isOpen">
|
|
1754
|
+
* // <template v-if="hasContent">
|
|
1755
|
+
* // <!-- Heavy content here -->
|
|
1756
|
+
* // </template>
|
|
1757
|
+
* // </div>
|
|
1758
|
+
* // </Transition>
|
|
1759
|
+
* ```
|
|
1304
1760
|
*
|
|
1305
|
-
*
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1761
|
+
* @example
|
|
1762
|
+
* Eager mode (render immediately):
|
|
1763
|
+
* ```ts
|
|
1764
|
+
* const { hasContent } = useLazy(isOpen, { eager: true })
|
|
1765
|
+
* // hasContent.value is always true
|
|
1766
|
+
* ```
|
|
1767
|
+
*
|
|
1768
|
+
* @example
|
|
1769
|
+
* With reactive eager prop:
|
|
1770
|
+
* ```ts
|
|
1771
|
+
* const props = defineProps<{ eager: boolean }>()
|
|
1772
|
+
* const { hasContent } = useLazy(isOpen, {
|
|
1773
|
+
* eager: toRef(() => props.eager),
|
|
1774
|
+
* })
|
|
1309
1775
|
* ```
|
|
1310
1776
|
*/
|
|
1311
|
-
declare function
|
|
1777
|
+
declare function useLazy(active: MaybeRefOrGetter<boolean>, options?: LazyOptions): LazyContext;
|
|
1312
1778
|
//#endregion
|
|
1313
1779
|
//#region src/composables/useLocale/adapters/adapter.d.ts
|
|
1314
1780
|
interface LocaleAdapter {
|
|
@@ -1626,6 +2092,74 @@ declare function createLoggerPlugin<E extends LoggerContext = LoggerContext>(_op
|
|
|
1626
2092
|
*/
|
|
1627
2093
|
declare function useLogger<E extends LoggerContext = LoggerContext>(namespace?: string): E;
|
|
1628
2094
|
//#endregion
|
|
2095
|
+
//#region src/composables/useMediaQuery/index.d.ts
|
|
2096
|
+
interface MediaQueryContext {
|
|
2097
|
+
/** Whether the media query currently matches */
|
|
2098
|
+
readonly matches: Readonly<ShallowRef<boolean>>;
|
|
2099
|
+
/** The current media query string */
|
|
2100
|
+
readonly query: ComputedRef<string>;
|
|
2101
|
+
/** The underlying MediaQueryList (null on server) */
|
|
2102
|
+
readonly mediaQueryList: Readonly<ShallowRef<MediaQueryList | null>>;
|
|
2103
|
+
/** Stop listening and clean up */
|
|
2104
|
+
stop: () => void;
|
|
2105
|
+
}
|
|
2106
|
+
/**
|
|
2107
|
+
* Reactive media query matching.
|
|
2108
|
+
*
|
|
2109
|
+
* @param query CSS media query string (reactive).
|
|
2110
|
+
* @returns The media query context.
|
|
2111
|
+
*
|
|
2112
|
+
* @see https://0.vuetifyjs.com/composables/system/use-media-query
|
|
2113
|
+
*
|
|
2114
|
+
* @example
|
|
2115
|
+
* ```ts
|
|
2116
|
+
* // Static query
|
|
2117
|
+
* const { matches } = useMediaQuery('(prefers-color-scheme: dark)')
|
|
2118
|
+
*
|
|
2119
|
+
* // Dynamic query
|
|
2120
|
+
* const minWidth = ref(768)
|
|
2121
|
+
* const { matches } = useMediaQuery(() => `(min-width: ${minWidth.value}px)`)
|
|
2122
|
+
*
|
|
2123
|
+
* // Manual cleanup
|
|
2124
|
+
* const { matches, stop } = useMediaQuery('(hover: hover)')
|
|
2125
|
+
* stop() // Remove listener early
|
|
2126
|
+
* ```
|
|
2127
|
+
*/
|
|
2128
|
+
declare function useMediaQuery(query: MaybeRefOrGetter<string>): MediaQueryContext;
|
|
2129
|
+
/**
|
|
2130
|
+
* Check if the user prefers dark color scheme.
|
|
2131
|
+
*
|
|
2132
|
+
* @returns The media query context.
|
|
2133
|
+
*
|
|
2134
|
+
* @example
|
|
2135
|
+
* ```ts
|
|
2136
|
+
* const { matches: prefersDark } = usePrefersDark()
|
|
2137
|
+
* ```
|
|
2138
|
+
*/
|
|
2139
|
+
declare function usePrefersDark(): MediaQueryContext;
|
|
2140
|
+
/**
|
|
2141
|
+
* Check if the user prefers reduced motion.
|
|
2142
|
+
*
|
|
2143
|
+
* @returns The media query context.
|
|
2144
|
+
*
|
|
2145
|
+
* @example
|
|
2146
|
+
* ```ts
|
|
2147
|
+
* const { matches: prefersReducedMotion } = usePrefersReducedMotion()
|
|
2148
|
+
* ```
|
|
2149
|
+
*/
|
|
2150
|
+
declare function usePrefersReducedMotion(): MediaQueryContext;
|
|
2151
|
+
/**
|
|
2152
|
+
* Check if the user prefers more contrast.
|
|
2153
|
+
*
|
|
2154
|
+
* @returns The media query context.
|
|
2155
|
+
*
|
|
2156
|
+
* @example
|
|
2157
|
+
* ```ts
|
|
2158
|
+
* const { matches: prefersContrast } = usePrefersContrast()
|
|
2159
|
+
* ```
|
|
2160
|
+
*/
|
|
2161
|
+
declare function usePrefersContrast(): MediaQueryContext;
|
|
2162
|
+
//#endregion
|
|
1629
2163
|
//#region src/composables/useMutationObserver/index.d.ts
|
|
1630
2164
|
interface MutationObserverRecord {
|
|
1631
2165
|
type: 'attributes' | 'childList' | 'characterData';
|
|
@@ -1714,15 +2248,16 @@ interface UseMutationObserverReturn {
|
|
|
1714
2248
|
* resume()
|
|
1715
2249
|
* ```
|
|
1716
2250
|
*/
|
|
1717
|
-
declare function useMutationObserver(target: Ref<Element | undefined>, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions): UseMutationObserverReturn;
|
|
2251
|
+
declare function useMutationObserver(target: Ref<Element | null | undefined>, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions): UseMutationObserverReturn;
|
|
1718
2252
|
//#endregion
|
|
1719
2253
|
//#region src/composables/useOverflow/index.d.ts
|
|
1720
2254
|
interface OverflowOptions {
|
|
1721
2255
|
/**
|
|
1722
2256
|
* Container element to track. Can be a ref, getter, or MaybeRefOrGetter.
|
|
1723
2257
|
* When provided, useOverflow tracks this element's width automatically.
|
|
2258
|
+
* Accepts null for compatibility with Vue's useTemplateRef.
|
|
1724
2259
|
*/
|
|
1725
|
-
container?: MaybeRefOrGetter<Element | undefined>;
|
|
2260
|
+
container?: MaybeRefOrGetter<Element | null | undefined>;
|
|
1726
2261
|
/** Gap between items in pixels */
|
|
1727
2262
|
gap?: MaybeRefOrGetter<number>;
|
|
1728
2263
|
/** Reserved space in pixels (for nav buttons, ellipsis, etc) */
|
|
@@ -1742,7 +2277,7 @@ interface OverflowOptions {
|
|
|
1742
2277
|
}
|
|
1743
2278
|
interface OverflowContext {
|
|
1744
2279
|
/** Container element ref */
|
|
1745
|
-
container: ShallowRef<Element | undefined>;
|
|
2280
|
+
container: ShallowRef<Element | null | undefined>;
|
|
1746
2281
|
/** Current container width */
|
|
1747
2282
|
width: Readonly<ShallowRef<number>>;
|
|
1748
2283
|
/** How many items fit in available space */
|
|
@@ -1808,7 +2343,8 @@ declare function createOverflow<E extends OverflowContext = OverflowContext>(opt
|
|
|
1808
2343
|
* Creates an overflow context with dependency injection support.
|
|
1809
2344
|
*
|
|
1810
2345
|
* @param options Configuration options including namespace
|
|
1811
|
-
* @
|
|
2346
|
+
* @template E The type of the overflow context
|
|
2347
|
+
* @returns Trinity tuple: [useOverflow, provideOverflow, defaultOverflow]
|
|
1812
2348
|
*
|
|
1813
2349
|
* @example
|
|
1814
2350
|
* ```ts
|
|
@@ -1831,8 +2367,11 @@ declare function createOverflowContext<E extends OverflowContext = OverflowConte
|
|
|
1831
2367
|
* Returns the current overflow context from dependency injection.
|
|
1832
2368
|
*
|
|
1833
2369
|
* @param namespace The namespace for the overflow context. Defaults to `v0:overflow`.
|
|
2370
|
+
* @template E The type of the overflow context
|
|
1834
2371
|
* @returns The current overflow context.
|
|
1835
2372
|
*
|
|
2373
|
+
* @throws An error if the overflow context is not found and no default is provided.
|
|
2374
|
+
*
|
|
1836
2375
|
* @example
|
|
1837
2376
|
* ```vue
|
|
1838
2377
|
* <script lang="ts" setup>
|
|
@@ -2031,9 +2570,9 @@ interface ProxyRegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
2031
2570
|
*
|
|
2032
2571
|
* @example
|
|
2033
2572
|
* ```ts
|
|
2034
|
-
* import {
|
|
2573
|
+
* import { createRegistry, useProxyRegistry } from '@vuetify/v0'
|
|
2035
2574
|
*
|
|
2036
|
-
* const registry =
|
|
2575
|
+
* const registry = createRegistry({ events: true })
|
|
2037
2576
|
* const proxy = useProxyRegistry(registry)
|
|
2038
2577
|
*
|
|
2039
2578
|
* registry.register({ value: 'Item 1' })
|
|
@@ -2042,7 +2581,7 @@ interface ProxyRegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
2042
2581
|
*/
|
|
2043
2582
|
declare function useProxyRegistry<Z extends RegistryTicket = RegistryTicket>(registry: RegistryContext<Z>, options?: ProxyRegistryOptions): ProxyRegistryContext<Z>;
|
|
2044
2583
|
//#endregion
|
|
2045
|
-
//#region src/composables/
|
|
2584
|
+
//#region src/composables/createQueue/index.d.ts
|
|
2046
2585
|
interface QueueTicket<V = unknown> extends RegistryTicket<V> {
|
|
2047
2586
|
/**
|
|
2048
2587
|
* Timeout in milliseconds
|
|
@@ -2082,7 +2621,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2082
2621
|
* - Subsequent tickets are paused until they become first in queue
|
|
2083
2622
|
* - Each ticket receives a `dismiss()` method for convenience
|
|
2084
2623
|
*
|
|
2085
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2624
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#register
|
|
2086
2625
|
*
|
|
2087
2626
|
* @example
|
|
2088
2627
|
* ```ts
|
|
@@ -2110,7 +2649,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2110
2649
|
* - If the removed ticket was first in queue, automatically resumes the next ticket
|
|
2111
2650
|
* - Returns the unregistered ticket or `undefined` if not found
|
|
2112
2651
|
*
|
|
2113
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2652
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#unregister
|
|
2114
2653
|
*
|
|
2115
2654
|
* @example
|
|
2116
2655
|
* ```ts
|
|
@@ -2138,7 +2677,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2138
2677
|
* - Returns the paused ticket or `undefined` if no pausable ticket exists
|
|
2139
2678
|
* - The timeout will not progress while paused
|
|
2140
2679
|
*
|
|
2141
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2680
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#pause
|
|
2142
2681
|
*
|
|
2143
2682
|
* @example
|
|
2144
2683
|
* ```ts
|
|
@@ -2163,7 +2702,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2163
2702
|
* - Returns the resumed ticket or `undefined` if no resumable ticket exists
|
|
2164
2703
|
* - The timeout will continue from its full duration (not from where it was paused)
|
|
2165
2704
|
*
|
|
2166
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2705
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#resume
|
|
2167
2706
|
*
|
|
2168
2707
|
* @example
|
|
2169
2708
|
* ```ts
|
|
@@ -2189,7 +2728,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2189
2728
|
* - Clears all active timeouts
|
|
2190
2729
|
* - Resets the queue to an empty state
|
|
2191
2730
|
*
|
|
2192
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2731
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#clear
|
|
2193
2732
|
*
|
|
2194
2733
|
* @example
|
|
2195
2734
|
* ```ts
|
|
@@ -2217,7 +2756,7 @@ interface QueueContext<Z extends QueueTicket = QueueTicket> extends RegistryCont
|
|
|
2217
2756
|
* - Should be called when the queue is no longer needed
|
|
2218
2757
|
* - Automatically called on scope disposal
|
|
2219
2758
|
*
|
|
2220
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2759
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue#dispose
|
|
2221
2760
|
*
|
|
2222
2761
|
* @example
|
|
2223
2762
|
* ```ts
|
|
@@ -2257,7 +2796,7 @@ interface QueueContextOptions extends QueueOptions {
|
|
|
2257
2796
|
* @template E The type of queue context that extends QueueContext<Z>. Use this when extending the queue with additional methods.
|
|
2258
2797
|
* @returns A new queue instance
|
|
2259
2798
|
*
|
|
2260
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2799
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue
|
|
2261
2800
|
*
|
|
2262
2801
|
* @example
|
|
2263
2802
|
* ```ts
|
|
@@ -2289,7 +2828,7 @@ declare function createQueue<Z extends QueueTicket = QueueTicket, E extends Queu
|
|
|
2289
2828
|
* @template E The type of the queue context.
|
|
2290
2829
|
* @returns A new queue context.
|
|
2291
2830
|
*
|
|
2292
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2831
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue
|
|
2293
2832
|
*
|
|
2294
2833
|
* @example
|
|
2295
2834
|
* ```ts
|
|
@@ -2307,7 +2846,7 @@ declare function createQueueContext<Z extends QueueTicket = QueueTicket, E exten
|
|
|
2307
2846
|
* @param namespace The namespace for the queue context. Defaults to `'v0:queue'`.
|
|
2308
2847
|
* @returns The current queue instance.
|
|
2309
2848
|
*
|
|
2310
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
2849
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-queue
|
|
2311
2850
|
*
|
|
2312
2851
|
* @example
|
|
2313
2852
|
* ```vue
|
|
@@ -2398,7 +2937,7 @@ interface UseResizeObserverReturn {
|
|
|
2398
2937
|
* resume()
|
|
2399
2938
|
* ```
|
|
2400
2939
|
*/
|
|
2401
|
-
declare function useResizeObserver(target: Ref<Element | undefined>, callback: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions): UseResizeObserverReturn;
|
|
2940
|
+
declare function useResizeObserver(target: Ref<Element | null | undefined>, callback: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions): UseResizeObserverReturn;
|
|
2402
2941
|
interface UseElementSizeReturn extends UseResizeObserverReturn {
|
|
2403
2942
|
/**
|
|
2404
2943
|
* The width of the element in pixels
|
|
@@ -2432,7 +2971,7 @@ interface UseElementSizeReturn extends UseResizeObserverReturn {
|
|
|
2432
2971
|
* })
|
|
2433
2972
|
* ```
|
|
2434
2973
|
*/
|
|
2435
|
-
declare function useElementSize(target: Ref<Element | undefined>): UseElementSizeReturn;
|
|
2974
|
+
declare function useElementSize(target: Ref<Element | null | undefined>): UseElementSizeReturn;
|
|
2436
2975
|
//#endregion
|
|
2437
2976
|
//#region src/composables/useStorage/adapters/adapter.d.ts
|
|
2438
2977
|
interface StorageAdapter$1 {
|
|
@@ -2855,14 +3394,14 @@ declare function createThemePlugin<Z extends ThemeTicket = ThemeTicket, E extend
|
|
|
2855
3394
|
*/
|
|
2856
3395
|
declare function useTheme<Z extends ThemeTicket = ThemeTicket, E extends ThemeContext<Z> = ThemeContext<Z>>(namespace?: string): E;
|
|
2857
3396
|
//#endregion
|
|
2858
|
-
//#region src/composables/
|
|
3397
|
+
//#region src/composables/createTimeline/index.d.ts
|
|
2859
3398
|
interface TimelineContext<Z extends TimelineTicket> extends RegistryContext<Z> {
|
|
2860
3399
|
/**
|
|
2861
3400
|
* Removes the last registered ticket and stores it for redo
|
|
2862
3401
|
*
|
|
2863
3402
|
* @return The removed ticket, or undefined if there are no tickets to undo.
|
|
2864
3403
|
*
|
|
2865
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
3404
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-timeline#undo
|
|
2866
3405
|
*
|
|
2867
3406
|
* @example
|
|
2868
3407
|
* ```ts
|
|
@@ -2885,7 +3424,7 @@ interface TimelineContext<Z extends TimelineTicket> extends RegistryContext<Z> {
|
|
|
2885
3424
|
*
|
|
2886
3425
|
* @returns The restored ticket, or undefined if there are no tickets to redo.
|
|
2887
3426
|
*
|
|
2888
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
3427
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-timeline#redo
|
|
2889
3428
|
*
|
|
2890
3429
|
* @example
|
|
2891
3430
|
* ```ts
|
|
@@ -2927,7 +3466,7 @@ interface TimelineContextOptions extends TimelineOptions {
|
|
|
2927
3466
|
* @template E The type of the timeline context.
|
|
2928
3467
|
* @returns A new timeline instance.
|
|
2929
3468
|
*
|
|
2930
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
3469
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-timeline
|
|
2931
3470
|
*
|
|
2932
3471
|
* @example
|
|
2933
3472
|
* ```ts
|
|
@@ -2955,7 +3494,7 @@ declare function createTimeline<Z extends TimelineTicket = TimelineTicket, E ext
|
|
|
2955
3494
|
* @template E The type of the timeline context.
|
|
2956
3495
|
* @returns A new timeline context.
|
|
2957
3496
|
*
|
|
2958
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
3497
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-timeline
|
|
2959
3498
|
*
|
|
2960
3499
|
* @example
|
|
2961
3500
|
* ```ts
|
|
@@ -2982,7 +3521,7 @@ declare function createTimelineContext<Z extends TimelineTicket = TimelineTicket
|
|
|
2982
3521
|
* @param namespace The namespace for the timeline context. Defaults to `'v0:timeline'`.
|
|
2983
3522
|
* @returns The current timeline instance.
|
|
2984
3523
|
*
|
|
2985
|
-
* @see https://0.vuetifyjs.com/composables/registration/
|
|
3524
|
+
* @see https://0.vuetifyjs.com/composables/registration/create-timeline
|
|
2986
3525
|
*
|
|
2987
3526
|
* @example
|
|
2988
3527
|
* ```vue
|
|
@@ -3363,4 +3902,4 @@ interface VirtualContext<T = unknown> {
|
|
|
3363
3902
|
*/
|
|
3364
3903
|
declare function useVirtual<T = unknown>(items: Ref<readonly T[]>, _options?: VirtualOptions): VirtualContext<T>;
|
|
3365
3904
|
//#endregion
|
|
3366
|
-
export { createQueue as $,
|
|
3905
|
+
export { createQueue as $, FeatureOptions as $n, createPlugin as $r, createLocaleContext as $t, Vuetify0ThemeAdapter as A, FormOptions as An, createDatePlugin as Ar, usePrefersContrast as At, StorageAdapter as B, FilterFunction as Bn, BreakpointName as Br, useLogger as Bt, ThemePluginOptions as C, useHydration as Cn, DateContext as Cr, useOverflow as Ct, createThemeContext as D, useHotkey as Dn, createDate as Dr, useMutationObserver as Dt, createTheme as E, UseHotkeyReturn as En, DatePluginOptions as Er, UseMutationObserverReturn as Et, StoragePluginOptions as F, createForm as Fn, ClickOutsideIgnoreTarget as Fr, LoggerOptions as Ft, UseElementSizeReturn as G, FilterResult as Gn, createBreakpoints as Gr, LoggerAdapter as Gt, MemoryAdapter as H, FilterMode as Hn, BreakpointsContextOptions as Hr, Vuetify0LoggerAdapter as Ht, createStorage as I, createFormContext as In, ClickOutsideTarget as Ir, LoggerPluginOptions as It, useResizeObserver as J, createFilterContext as Jn, useBreakpoints as Jr, LocaleOptions as Jt, UseResizeObserverReturn as K, Primitive as Kn, createBreakpointsContext as Kr, LocaleContext as Kt, createStorageContext as L, useForm as Ln, UseClickOutsideOptions as Lr, createLogger as Lt, StorageContext as M, FormValidationResult as Mn, Vuetify0DateAdapter as Mr, usePrefersReducedMotion as Mt, StorageContextOptions as N, FormValidationRule as Nn, DateAdapter as Nr, LoggerContext as Nt, createThemePlugin as O, FormContext as On, createDateContext as Or, MediaQueryContext as Ot, StorageOptions as P, FormValue as Pn, ClickOutsideElement as Pr, LoggerContextOptions as Pt, QueueTicket as Q, FeatureContextOptions as Qn, PluginOptions as Qr, createLocale as Qt, createStoragePlugin as R, FilterContext as Rn, UseClickOutsideReturn as Rr, createLoggerContext as Rt, ThemeOptions as S, createHydrationPlugin as Sn, useWindowEventListener as Sr, createOverflowContext as St, ThemeTicket as T, UseHotkeyOptions as Tn, DateOptions as Tr, UseMutationObserverOptions as Tt, ResizeObserverEntry as U, FilterOptions as Un, BreakpointsOptions as Ur, PinoLoggerAdapter as Ut, StorageType as V, FilterItem as Vn, BreakpointsContext as Vr, LogLevel as Vt, ResizeObserverOptions as W, FilterQuery as Wn, BreakpointsPluginOptions as Wr, ConsolaLoggerAdapter as Wt, QueueContextOptions as X, useFilterContext as Xn, toArray as Xr, LocaleRecord as Xt, QueueContext as Y, useFilter as Yn, toReactive as Yr, LocalePluginOptions as Yt, QueueOptions as Z, FeatureContext as Zn, Plugin as Zr, LocaleTicket as Zt, useTimeline as _, HydrationOptions as _n, useTokens as _r, PermissionAdapterInterface as _t, VirtualItem as a, LazyContext as an, useFeatures as ar, ProxyModelOptions as at, ThemeContext as b, createHydration as bn, useDocumentEventListener as br, OverflowOptions as bt, useVirtual as c, IntersectionObserverEntry as cn, TokenCollection as cr, PermissionContextOptions as ct, TimelineContext as d, UseElementIntersectionReturn as dn, TokenOptions as dr, PermissionTicket as dt, ContextKey as ei, createLocaleFallback as en, FeaturePluginOptions as er, createQueueContext as et, TimelineContextOptions as f, UseIntersectionObserverReturn as fn, TokenPrimitive as fr, createPermissions as ft, createTimelineContext as g, HydrationContextOptions as gn, createTokensContext as gr, PermissionAdapter as gt, createTimeline as h, HydrationContext as hn, createTokens as hr, usePermissions as ht, VirtualDirection as i, useContext as ii, LocaleAdapter as in, createFeaturesPlugin as ir, useProxyRegistry as it, ThemeAdapter as j, FormTicket as jn, useDate as jr, usePrefersDark as jt, useTheme as k, FormContextOptions as kn, createDateFallback as kr, useMediaQuery as kt, ToggleScopeControls as l, IntersectionObserverOptions as ln, TokenContext as lr, PermissionOptions as lt, TimelineTicket as m, useIntersectionObserver as mn, TokenValue as mr, createPermissionsPlugin as mt, VirtualAnchor as n, createContext as ni, useLocale as nn, createFeatures as nr, ProxyRegistryContext as nt, VirtualOptions as o, LazyOptions as on, FlatTokenCollection as or, useProxyModel as ot, TimelineOptions as p, useElementIntersection as pn, TokenTicket as pr, createPermissionsContext as pt, useElementSize as q, createFilter as qn, createBreakpointsPlugin as qr, LocaleContextOptions as qt, VirtualContext as r, provideContext as ri, Vuetify0LocaleAdapter as rn, createFeaturesContext as rr, ProxyRegistryOptions as rt, VirtualState as s, useLazy as sn, TokenAlias as sr, PermissionContext as st, ScrollToOptions as t, CreateContextOptions as ti, createLocalePlugin as tn, FeatureTicket as tr, useQueue as tt, useToggleScope as u, MaybeRef$1 as un, TokenContextOptions as ur, PermissionPluginOptions as ut, Colors as v, HydrationPluginOptions as vn, CleanupFunction as vr, OverflowContext as vt, ThemeRecord as w, PlatformContext as wn, DateContextOptions as wr, MutationObserverRecord as wt, ThemeContextOptions as x, createHydrationContext as xn, useEventListener as xr, createOverflow as xt, ThemeColors as y, createFallbackHydration as yn, EventHandler as yr, OverflowContextOptions as yt, useStorage as z, FilterContextOptions as zn, useClickOutside as zr, createLoggerPlugin as zt };
|