@vuetify/v0 0.0.16 → 0.0.18
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/browser/index.js +358 -145
- package/dist/components/index.d.mts +4 -4
- package/dist/components/index.mjs +6 -6
- package/dist/{components-Dk00OFL2.mjs → components-DRdenC8b.mjs} +151 -54
- package/dist/composables/index.d.mts +4 -4
- package/dist/composables/index.mjs +5 -5
- package/dist/{composables-YOUVfUsn.mjs → composables-DG1MHp-R.mjs} +138 -37
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +3 -3
- package/dist/{globals-Rnihe4SF.mjs → globals-BGVqrlN7.mjs} +1 -1
- package/dist/{index-BXN7M6o_.d.mts → index-B-jVvwsm.d.mts} +1 -1
- package/dist/{index-BzW68rBC.d.mts → index-CH7DpIK8.d.mts} +103 -10
- package/dist/{index-BulceeMA.d.mts → index-DaX9-kmY.d.mts} +45 -15
- package/dist/{index-BeJMYhId.d.mts → index-oQuVnpOj.d.mts} +836 -120
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +8 -8
- package/dist/types/index.d.mts +1 -1
- package/dist/{useStep-Bqhi_DDs.mjs → useStep-DC_JvZpy.mjs} +78 -63
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +1 -1
- package/package.json +1 -1
- /package/dist/{constants-BWV0uYsM.mjs → constants-DypzAkYp.mjs} +0 -0
- /package/dist/{htmlElements-BYo-fMlZ.mjs → htmlElements-CXObxj0V.mjs} +0 -0
- /package/dist/{index-B6lIRI3i.d.mts → index-B9mKi4pr.d.mts} +0 -0
- /package/dist/{index-Bd3J4RNS.d.mts → index-C5LQZd3v.d.mts} +0 -0
- /package/dist/{utilities-DQWf_4V_.mjs → utilities-JxCe-nF2.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as ID } from "./index-
|
|
1
|
+
import { i as ID } from "./index-C5LQZd3v.mjs";
|
|
2
2
|
import { App, ComputedRef, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowRef } from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/composables/createTrinity/index.d.ts
|
|
@@ -157,10 +157,10 @@ interface RegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
157
157
|
* registry.register({ id: 'ticket-3', value: 'unique-value' })
|
|
158
158
|
*
|
|
159
159
|
* const common = registry.browse('common-value') // ['ticket-1', 'ticket-2']
|
|
160
|
-
* const unique = registry.browse('unique-value') // 'ticket-3'
|
|
160
|
+
* const unique = registry.browse('unique-value') // ['ticket-3']
|
|
161
161
|
* ```
|
|
162
162
|
*/
|
|
163
|
-
browse: (value: unknown) => ID
|
|
163
|
+
browse: (value: unknown) => ID[] | undefined;
|
|
164
164
|
/**
|
|
165
165
|
* lookup a ticket by index number
|
|
166
166
|
*
|
|
@@ -370,6 +370,7 @@ interface RegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
370
370
|
* - `unregister:ticket` - Emitted when a ticket is unregistered, receives the ticket as argument
|
|
371
371
|
* - `update:ticket` - Emitted when a ticket is updated, receives the updated ticket as argument
|
|
372
372
|
* - `clear:registry` - Emitted when the registry is cleared
|
|
373
|
+
* - `reindex:registry` - Emitted when the registry is reindexed
|
|
373
374
|
*
|
|
374
375
|
* @see https://0.vuetifyjs.com/composables/registration/use-registry#on
|
|
375
376
|
*
|
|
@@ -531,6 +532,33 @@ interface RegistryContext<Z extends RegistryTicket = RegistryTicket> {
|
|
|
531
532
|
* ```
|
|
532
533
|
*/
|
|
533
534
|
size: number;
|
|
535
|
+
/**
|
|
536
|
+
* Execute operations in a batch, deferring cache invalidation and event emission until complete
|
|
537
|
+
*
|
|
538
|
+
* @param fn The function containing batch operations.
|
|
539
|
+
* @returns The return value of the batch function.
|
|
540
|
+
* @remarks Useful for bulk operations like onboard(). Invalidation and events happen once at the end, not after each operation.
|
|
541
|
+
*
|
|
542
|
+
* @see https://0.vuetifyjs.com/composables/registration/use-registry#batch
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* ```ts
|
|
546
|
+
* import { useRegistry } from '@vuetify/v0'
|
|
547
|
+
*
|
|
548
|
+
* const registry = useRegistry({ events: true })
|
|
549
|
+
*
|
|
550
|
+
* // Without batch: N invalidations + N events
|
|
551
|
+
* // With batch: 1 invalidation + N events (after all registrations)
|
|
552
|
+
* const tickets = registry.batch(() => {
|
|
553
|
+
* return [
|
|
554
|
+
* registry.register({ id: 'a' }),
|
|
555
|
+
* registry.register({ id: 'b' }),
|
|
556
|
+
* registry.register({ id: 'c' }),
|
|
557
|
+
* ]
|
|
558
|
+
* })
|
|
559
|
+
* ```
|
|
560
|
+
*/
|
|
561
|
+
batch: <R>(fn: () => R) => R;
|
|
534
562
|
}
|
|
535
563
|
interface RegistryOptions {
|
|
536
564
|
/**
|
|
@@ -584,8 +612,7 @@ declare function useRegistry<Z extends RegistryTicket = RegistryTicket, E extend
|
|
|
584
612
|
/**
|
|
585
613
|
* Creates a new registry context.
|
|
586
614
|
*
|
|
587
|
-
* @param
|
|
588
|
-
* @param options The options for the registry context.
|
|
615
|
+
* @param options The options for the registry context, including `namespace` (defaults to `'v0:registry'`) and `events`.
|
|
589
616
|
* @template Z The type of registry ticket that extends RegistryTicket. Use this to add custom properties to tickets.
|
|
590
617
|
* @template E The type of registry context that extends RegistryContext<Z>. Use this when extending the registry with additional methods.
|
|
591
618
|
* @returns A new registry context.
|
|
@@ -941,11 +968,14 @@ declare function createGroupContext<Z extends GroupTicket = GroupTicket, E exten
|
|
|
941
968
|
declare function useGroup<Z extends GroupTicket = GroupTicket, E extends GroupContext<Z> = GroupContext<Z>>(namespace?: string): E;
|
|
942
969
|
//#endregion
|
|
943
970
|
//#region src/composables/usePagination/index.d.ts
|
|
944
|
-
|
|
945
|
-
type: 'page'
|
|
946
|
-
value: number
|
|
947
|
-
}
|
|
948
|
-
|
|
971
|
+
type PaginationTicket = {
|
|
972
|
+
type: 'page';
|
|
973
|
+
value: number;
|
|
974
|
+
} | {
|
|
975
|
+
type: 'ellipsis';
|
|
976
|
+
value: string;
|
|
977
|
+
};
|
|
978
|
+
interface PaginationContext {
|
|
949
979
|
/** Current page (1-indexed) */
|
|
950
980
|
page: ShallowRef<number>;
|
|
951
981
|
/** Items per page */
|
|
@@ -957,7 +987,7 @@ interface PaginationContext<Z extends PaginationItem = PaginationItem> {
|
|
|
957
987
|
/** Ellipsis character, or false if disabled */
|
|
958
988
|
ellipsis: string | false;
|
|
959
989
|
/** Visible page numbers and ellipsis for rendering */
|
|
960
|
-
items: ComputedRef<
|
|
990
|
+
items: ComputedRef<PaginationTicket[]>;
|
|
961
991
|
/** Start index of items on current page (0-indexed) */
|
|
962
992
|
pageStart: ComputedRef<number>;
|
|
963
993
|
/** End index of items on current page (exclusive, 0-indexed) */
|
|
@@ -1014,7 +1044,7 @@ interface PaginationContextOptions extends PaginationOptions {
|
|
|
1014
1044
|
* // Mutating pagination.page or the passed ref syncs both
|
|
1015
1045
|
* ```
|
|
1016
1046
|
*/
|
|
1017
|
-
declare function createPagination
|
|
1047
|
+
declare function createPagination(_options?: PaginationOptions): PaginationContext;
|
|
1018
1048
|
/**
|
|
1019
1049
|
* Creates a pagination context for dependency injection.
|
|
1020
1050
|
*
|
|
@@ -1040,7 +1070,7 @@ declare function createPagination<Z extends PaginationItem = PaginationItem, E e
|
|
|
1040
1070
|
* pagination.next()
|
|
1041
1071
|
* ```
|
|
1042
1072
|
*/
|
|
1043
|
-
declare function createPaginationContext
|
|
1073
|
+
declare function createPaginationContext(_options?: PaginationContextOptions): ContextTrinity<PaginationContext>;
|
|
1044
1074
|
/**
|
|
1045
1075
|
* Returns the current pagination instance from context.
|
|
1046
1076
|
*
|
|
@@ -1061,7 +1091,7 @@ declare function createPaginationContext<Z extends PaginationItem = PaginationIt
|
|
|
1061
1091
|
* </template>
|
|
1062
1092
|
* ```
|
|
1063
1093
|
*/
|
|
1064
|
-
declare function usePagination
|
|
1094
|
+
declare function usePagination(namespace?: string): PaginationContext;
|
|
1065
1095
|
//#endregion
|
|
1066
1096
|
//#region src/composables/useSingle/index.d.ts
|
|
1067
1097
|
interface SingleTicket<V = unknown> extends SelectionTicket<V> {}
|
|
@@ -1328,4 +1358,4 @@ declare function createStepContext<Z extends StepTicket = StepTicket, E extends
|
|
|
1328
1358
|
*/
|
|
1329
1359
|
declare function useStep<Z extends StepTicket = StepTicket, E extends StepContext<Z> = StepContext<Z>>(namespace?: string): E;
|
|
1330
1360
|
//#endregion
|
|
1331
|
-
export { SelectionContextOptions as A, createRegistryContext as B, GroupContextOptions as C, createGroupContext as D, createGroup as E, useSelection as F, ContextTrinity as H, RegistryContext as I, RegistryContextOptions as L, SelectionTicket as M, createSelection as N, useGroup as O, createSelectionContext as P, RegistryOptions as R, GroupContext as S, GroupTicket as T, createTrinity as U, useRegistry as V,
|
|
1361
|
+
export { SelectionContextOptions as A, createRegistryContext as B, GroupContextOptions as C, createGroupContext as D, createGroup as E, useSelection as F, ContextTrinity as H, RegistryContext as I, RegistryContextOptions as L, SelectionTicket as M, createSelection as N, useGroup as O, createSelectionContext as P, RegistryOptions as R, GroupContext as S, GroupTicket as T, createTrinity as U, useRegistry as V, PaginationOptions as _, createStep as a, createPaginationContext as b, SingleContext as c, SingleTicket as d, createSingle as f, PaginationContextOptions as g, PaginationContext as h, StepTicket as i, SelectionOptions as j, SelectionContext as k, SingleContextOptions as l, useSingle as m, StepContextOptions as n, createStepContext as o, createSingleContext as p, StepOptions as r, useStep as s, StepContext as t, SingleOptions as u, PaginationTicket as v, GroupOptions as w, usePagination as x, createPagination as y, RegistryTicket as z };
|