@vuetify/v0 1.0.0-alpha.3 → 1.0.0-alpha.5
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 +5 -0
- package/dist/adapter-B6IrPwib.d.mts +98 -0
- package/dist/adapter-BEJXp-ie.d.mts +11 -0
- package/dist/adapter-BFSJsyv7.mjs +481 -0
- package/dist/{adapter-DlX3FA3A.d.mts → adapter-BO75n0Cn.d.mts} +10 -14
- package/dist/adapter-BSKx9WQ7.mjs +4 -0
- package/dist/adapter-Chznb9Ju.mjs +4 -0
- package/dist/{index-CT5SCLzW.d.mts → adapter-CspReV3g.d.mts} +6 -9
- package/dist/adapter-D8zizQVP.mjs +4 -0
- package/dist/adapter-DDJHLC8K.d.mts +17 -0
- package/dist/adapters-4t-NhR11.mjs +5 -0
- package/dist/adapters-BcoA0zCS.mjs +4 -0
- package/dist/adapters-BjaPK635.mjs +2 -0
- package/dist/adapters-D64TORDu.mjs +2 -0
- package/dist/adapters-DvG-9z9q.mjs +3 -0
- package/dist/browser/index.js +2074 -561
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/{components-C4jI-78d.mjs → components-Dn4Kbi0i.mjs} +149 -101
- package/dist/composables/index.d.mts +20 -19
- package/dist/composables/index.mjs +31 -29
- package/dist/{consola-BdgyPEfx.d.mts → consola-CUNHyu8J.d.mts} +2 -2
- package/dist/{consola-Ceox8BWi.mjs → consola-DYvbPNbF.mjs} +3 -1
- package/dist/constants/index.d.mts +1 -1
- package/dist/constants/index.mjs +2 -2
- package/dist/{createDataTable-iODP6aKB.mjs → createDataTable-H-PuVigU.mjs} +216 -124
- package/dist/{createGroup-CGk6hY_Y.mjs → createGroup-aHt_kvtU.mjs} +3 -3
- package/dist/{createRegistry-BXzdXAjq.mjs → createRegistry-CWpvSbCe.mjs} +78 -41
- package/dist/{createSelection-B3HJEPNg.mjs → createSelection-MRyUZyW2.mjs} +3 -3
- package/dist/{createSingle-Dql8mRi-.mjs → createSingle-BSciC9EJ.mjs} +1 -1
- package/dist/{createTokens-DgFYsOrv.mjs → createTokens-CQ9C7GTV.mjs} +2 -2
- package/dist/data-table/adapters/client/index.d.mts +2 -2
- package/dist/data-table/adapters/client/index.mjs +2 -2
- package/dist/data-table/adapters/index.d.mts +5 -5
- package/dist/data-table/adapters/index.mjs +6 -6
- package/dist/data-table/adapters/server/index.d.mts +2 -2
- package/dist/data-table/adapters/server/index.mjs +2 -2
- package/dist/data-table/adapters/virtual/index.d.mts +2 -2
- package/dist/data-table/adapters/virtual/index.mjs +2 -2
- package/dist/data-table/index.d.mts +6 -6
- package/dist/data-table/index.mjs +6 -6
- package/dist/date/index.d.mts +3 -3
- package/dist/date/index.mjs +12 -5
- package/dist/features/adapters/flagsmith/index.d.mts +2 -2
- package/dist/features/adapters/flagsmith/index.mjs +2 -2
- package/dist/features/adapters/launchdarkly/index.d.mts +2 -2
- package/dist/features/adapters/launchdarkly/index.mjs +2 -2
- package/dist/features/adapters/posthog/index.d.mts +2 -2
- package/dist/features/adapters/posthog/index.mjs +2 -2
- package/dist/features/index.d.mts +3 -3
- package/dist/features/index.mjs +2 -1
- package/dist/{index-BzFHTW59.d.mts → flagsmith-Cd44vxff.d.mts} +4 -4
- package/dist/{flagsmith-Dbh1h8WF.mjs → flagsmith-Cu93hUIF.mjs} +6 -4
- package/dist/{globals-zEjWBKCr.mjs → globals-BRdxsC2M.mjs} +1 -1
- package/dist/{index-GOpjKzaJ.d.mts → index-BLaKZq0Y.d.mts} +25 -2
- package/dist/{index-BJGcVy7e.d.mts → index-BmEu85PI.d.mts} +126 -65
- package/dist/{index-DE3bWw11.d.mts → index-C0ewabdY.d.mts} +93 -215
- package/dist/index-C6NnIuDv.d.mts +4 -0
- package/dist/{index-DNDuacmH.d.mts → index-CJdG9yY1.d.mts} +116 -106
- package/dist/index-C_t6t0Z-.d.mts +170 -0
- package/dist/{index-B76iGRE3.d.mts → index-CyUCELZC.d.mts} +1149 -61
- package/dist/index.d.mts +24 -23
- package/dist/index.mjs +35 -33
- package/dist/json/attributes.json +1 -1
- package/dist/json/web-types.json +2 -2
- package/dist/{launchdarkly-BKtW-idu.mjs → launchdarkly-CLGtJCsI.mjs} +6 -4
- package/dist/launchdarkly-De701hkf.d.mts +13 -0
- package/dist/locale/adapters/index.d.mts +3 -3
- package/dist/locale/adapters/index.mjs +4 -3
- package/dist/locale/adapters/v0/index.d.mts +2 -2
- package/dist/locale/adapters/v0/index.mjs +2 -2
- package/dist/locale/adapters/vue-i18n/index.d.mts +3 -3
- package/dist/locale/adapters/vue-i18n/index.mjs +4 -2
- package/dist/locale/index.d.mts +4 -4
- package/dist/locale/index.mjs +4 -3
- package/dist/logger/adapters/consola/index.d.mts +1 -1
- package/dist/logger/adapters/consola/index.mjs +1 -1
- package/dist/logger/adapters/index.d.mts +5 -5
- package/dist/logger/adapters/index.mjs +6 -5
- 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 +2 -2
- package/dist/logger/adapters/v0/index.mjs +2 -2
- package/dist/logger/index.d.mts +6 -6
- package/dist/logger/index.mjs +6 -5
- package/dist/{memory-oYBvtkgx.mjs → memory-BMpJcQjQ.mjs} +13 -3
- package/dist/{memory-CeSQE-QV.d.mts → memory-D-JbdKXg.d.mts} +9 -9
- package/dist/notifications/index.d.mts +30 -4
- package/dist/notifications/index.mjs +187 -126
- package/dist/palettes/ant/index.d.mts +1 -1
- package/dist/palettes/index.d.mts +3 -3
- package/dist/palettes/leonardo/generate/index.mjs +3 -0
- 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 +2 -2
- package/dist/permissions/adapters/index.mjs +3 -3
- package/dist/permissions/adapters/v0/index.d.mts +2 -2
- package/dist/permissions/adapters/v0/index.mjs +2 -2
- package/dist/permissions/index.d.mts +2 -2
- package/dist/permissions/index.mjs +3 -3
- package/dist/{pino-DNfCEb0p.d.mts → pino-BaYY_KIN.d.mts} +2 -2
- package/dist/{pino-9L79n6y6.mjs → pino-CIcYlW3u.mjs} +3 -1
- package/dist/{posthog-DmuyycaR.mjs → posthog-0umvvA48.mjs} +7 -5
- package/dist/posthog-CIrmvke4.d.mts +13 -0
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/{server-3ilWFwqe.d.mts → server-7vjHxjNc.d.mts} +5 -5
- package/dist/{server-y7zLSCSx.mjs → server-BNSiVoMe.mjs} +4 -3
- package/dist/storage/adapters/index.d.mts +3 -3
- package/dist/storage/adapters/index.mjs +2 -2
- package/dist/storage/adapters/memory/index.d.mts +2 -2
- package/dist/storage/adapters/memory/index.mjs +2 -2
- package/dist/storage/index.d.mts +4 -4
- package/dist/storage/index.mjs +3 -3
- package/dist/theme/adapters/index.d.mts +2 -2
- package/dist/theme/adapters/index.mjs +4 -4
- package/dist/theme/adapters/unhead/index.d.mts +1 -1
- package/dist/theme/adapters/unhead/index.mjs +1 -1
- package/dist/theme/adapters/v0/index.d.mts +1 -1
- package/dist/theme/adapters/v0/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -1
- package/dist/theme/index.mjs +3 -3
- package/dist/types/index.d.mts +1 -1
- package/dist/{unhead-B-I2OS6i.mjs → unhead-_cXZcx0j.mjs} +2 -2
- package/dist/{useClickOutside-CY4U2J9W.mjs → useClickOutside-DbOLg1uw.mjs} +1483 -182
- package/dist/{useFeatures-BPOke6iP.mjs → useFeatures-Dhnr-Lg2.mjs} +7 -10
- package/dist/{useLocale-BV8e3imF.mjs → useLocale-Sh-2sNiG.mjs} +6 -6
- package/dist/{useLogger-DvdRTrqC.mjs → useLogger-1_ZeBY12.mjs} +5 -5
- package/dist/{useNotifications-vSJE6z6t.mjs → useNotifications-CAVQ7hK6.mjs} +6 -6
- package/dist/{usePermissions-D3zPwKQc.mjs → usePermissions-D9Oituwy.mjs} +6 -6
- package/dist/{useRules-BT6cgoTj.mjs → useRules-DK4AeNeC.mjs} +4 -3
- package/dist/{useTheme-cUZb2A9O.mjs → useTheme-FMDQC81h.mjs} +5 -5
- package/dist/utilities/index.d.mts +2 -2
- package/dist/utilities/index.mjs +26 -2
- package/dist/{v0-CHZpnMeP.mjs → v0-C42ssNIy.mjs} +6 -4
- package/dist/{v0-Dq3zhexO.mjs → v0-CEfbyyp2.mjs} +3 -4
- package/dist/{v0-C49OI_wc.mjs → v0-Ch-O6YVd.mjs} +5 -3
- package/dist/{v0-gpExNexS.mjs → v0-D0imQlSD.mjs} +2 -2
- package/dist/{v0-DrOub-e1.d.mts → v0-DWZ_N2GG.d.mts} +4 -4
- package/dist/{v0-Bmow1q_x.mjs → v0-Dvu8fMl3.mjs} +3 -3
- package/dist/v0-QIjffi4E.d.mts +8 -0
- package/dist/{v0-D7Fm2C3Y.d.mts → v0-aYLq6qmT.d.mts} +3 -3
- package/dist/{virtual-C0yHf1DC.mjs → virtual-Cq5aRp7m.mjs} +3 -4
- package/dist/virtual-CrgGA-o6.d.mts +8 -0
- package/package.json +1 -1
- package/dist/adapter-58IvIfAZ.d.mts +0 -96
- package/dist/adapter-BvWEd9w-.d.mts +0 -17
- package/dist/adapter-Dhq68tz0.d.mts +0 -11
- package/dist/adapter-gQ2SNKZq.mjs +0 -238
- package/dist/adapters-BSiqsTZN.mjs +0 -3
- package/dist/adapters-C3QXhf4I.mjs +0 -2
- package/dist/adapters-CMJGA1k7.mjs +0 -2
- package/dist/adapters-Dse4bPxk.mjs +0 -5
- package/dist/adapters-_ZqxCD8f.mjs +0 -4
- package/dist/createPagination-CHF7SmmK.mjs +0 -247
- package/dist/index-1XdASTjp.d.mts +0 -13
- package/dist/index-C6rdXZ7j.d.mts +0 -11
- package/dist/index-Dp1HjBxJ.d.mts +0 -13
- package/dist/v0-CdusXjY_.d.mts +0 -8
- package/dist/virtual-D4fckewC.d.mts +0 -8
- /package/dist/{adapter-Be9zUc-n.mjs → adapter-oM18AdUc.mjs} +0 -0
- /package/dist/{htmlElements-D4oMQZPJ.mjs → htmlElements-CHXZfsZu.mjs} +0 -0
- /package/dist/{index-CFhUdAHM.d.mts → index-BOn0AAue.d.mts} +0 -0
- /package/dist/{index-CROz1VSV.d.mts → index-CKKoxA9V.d.mts} +0 -0
- /package/dist/{index-DuddF-NR.d.mts → index-CLR1QMM3.d.mts} +0 -0
- /package/dist/{index-DTvqw22G.d.mts → index-H_hl6-4b.d.mts} +0 -0
- /package/dist/{index-BgCkepP_.d.mts → index-PvkxPev3.d.mts} +0 -0
- /package/dist/{toArray-as9BWxBK.mjs → toArray-CD2-OxAz.mjs} +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { a as ID, i as Extensible, o as MaybeArray } from "./index-
|
|
2
|
-
import { t as ContextTrinity } from "./index-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
1
|
+
import { a as ID, i as Extensible, o as MaybeArray } from "./index-CLR1QMM3.mjs";
|
|
2
|
+
import { t as ContextTrinity } from "./index-H_hl6-4b.mjs";
|
|
3
|
+
import { a as RegistryEventName, c as RegistryTicketInput, o as RegistryOptions, r as RegistryEventCallback, s as RegistryTicket, t as RegistryContext } from "./index-C0ewabdY.mjs";
|
|
4
|
+
import { _ as FilterMode } from "./adapter-BO75n0Cn.mjs";
|
|
5
|
+
import { c as TokenTicket, i as TokenContext, o as TokenOptions, r as TokenCollection } from "./index-C_t6t0Z-.mjs";
|
|
6
|
+
import { t as DateAdapter } from "./adapter-B6IrPwib.mjs";
|
|
7
|
+
import { n as FeaturesAdapterFlags, t as FeaturesAdapter } from "./adapter-CspReV3g.mjs";
|
|
8
|
+
import { t as LocaleAdapter } from "./adapter-DDJHLC8K.mjs";
|
|
9
|
+
import { t as LoggerAdapter } from "./adapter-BEJXp-ie.mjs";
|
|
10
|
+
import { n as StorageAdapter } from "./memory-D-JbdKXg.mjs";
|
|
10
11
|
import { App, ComponentPublicInstance, ComputedRef, InjectionKey, MaybeRef, MaybeRefOrGetter, Reactive, Ref, ShallowRef, UnwrapNestedRefs, WatchSource, WritableComputedRef } from "vue";
|
|
11
12
|
|
|
12
13
|
//#region src/composables/createModel/index.d.ts
|
|
@@ -1479,12 +1480,12 @@ interface ComboboxAdapterResult {
|
|
|
1479
1480
|
/** Whether no items match the current query */
|
|
1480
1481
|
isEmpty: Ref<boolean>;
|
|
1481
1482
|
}
|
|
1482
|
-
|
|
1483
|
-
setup
|
|
1483
|
+
declare abstract class ComboboxAdapter {
|
|
1484
|
+
abstract setup(context: ComboboxAdapterContext): ComboboxAdapterResult;
|
|
1484
1485
|
}
|
|
1485
1486
|
//#endregion
|
|
1486
1487
|
//#region src/composables/createCombobox/adapters/client.d.ts
|
|
1487
|
-
interface
|
|
1488
|
+
interface ClientComboboxAdapterOptions {
|
|
1488
1489
|
/** Filter matching mode */
|
|
1489
1490
|
mode?: FilterMode;
|
|
1490
1491
|
/** Object keys to match against (for object values) */
|
|
@@ -1492,14 +1493,14 @@ interface ClientAdapterOptions {
|
|
|
1492
1493
|
/** Custom filter function — overrides default matching */
|
|
1493
1494
|
filter?: (query: string, value: unknown) => boolean;
|
|
1494
1495
|
}
|
|
1495
|
-
declare class
|
|
1496
|
+
declare class ClientComboboxAdapter extends ComboboxAdapter {
|
|
1496
1497
|
private options;
|
|
1497
|
-
constructor(options?:
|
|
1498
|
+
constructor(options?: ClientComboboxAdapterOptions);
|
|
1498
1499
|
setup(context: ComboboxAdapterContext): ComboboxAdapterResult;
|
|
1499
1500
|
}
|
|
1500
1501
|
//#endregion
|
|
1501
1502
|
//#region src/composables/createCombobox/adapters/server.d.ts
|
|
1502
|
-
declare class
|
|
1503
|
+
declare class ServerComboboxAdapter extends ComboboxAdapter {
|
|
1503
1504
|
setup(context: ComboboxAdapterContext): ComboboxAdapterResult;
|
|
1504
1505
|
}
|
|
1505
1506
|
//#endregion
|
|
@@ -1511,7 +1512,7 @@ interface ComboboxOptions {
|
|
|
1511
1512
|
strict?: MaybeRefOrGetter<boolean>;
|
|
1512
1513
|
error?: MaybeRefOrGetter<boolean>;
|
|
1513
1514
|
errorMessages?: MaybeRefOrGetter<MaybeArray<string> | undefined>;
|
|
1514
|
-
adapter?:
|
|
1515
|
+
adapter?: ComboboxAdapter;
|
|
1515
1516
|
displayValue?: (value: unknown) => string;
|
|
1516
1517
|
id?: string;
|
|
1517
1518
|
name?: string;
|
|
@@ -1774,7 +1775,7 @@ interface PluginContextConfig<O, E> {
|
|
|
1774
1775
|
* createPluginContext('v0:logger', options => createLogger(options), {
|
|
1775
1776
|
* fallback: ns => createFallbackLogger(ns),
|
|
1776
1777
|
* setup: (context) => {
|
|
1777
|
-
* if (__DEV__ && IN_BROWSER) (window as
|
|
1778
|
+
* if (__DEV__ && IN_BROWSER) (window as Window & { __v0Logger__?: typeof context }).__v0Logger__ = context
|
|
1778
1779
|
* },
|
|
1779
1780
|
* })
|
|
1780
1781
|
* ```
|
|
@@ -2117,6 +2118,471 @@ interface InputContext<T = string> {
|
|
|
2117
2118
|
}
|
|
2118
2119
|
declare function createInput<T = string>(options: InputOptions<T>): InputContext<T>;
|
|
2119
2120
|
//#endregion
|
|
2121
|
+
//#region src/composables/createSortable/index.d.ts
|
|
2122
|
+
/**
|
|
2123
|
+
* Input shape passed to `register` / `onboard`. Inherits all model fields.
|
|
2124
|
+
*
|
|
2125
|
+
* @template V Type of the per-ticket value.
|
|
2126
|
+
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* ```ts
|
|
2129
|
+
* interface TaskTicket extends SortableTicketInput {
|
|
2130
|
+
* value: { id: number; label: string }
|
|
2131
|
+
* }
|
|
2132
|
+
*
|
|
2133
|
+
* const sortable = createSortable<TaskTicket>()
|
|
2134
|
+
* sortable.register({ value: { id: 1, label: 'A' } })
|
|
2135
|
+
* ```
|
|
2136
|
+
*/
|
|
2137
|
+
type SortableTicketInput<V = unknown> = ModelTicketInput<V>;
|
|
2138
|
+
/**
|
|
2139
|
+
* Output ticket returned by `register` / `onboard` / `get`.
|
|
2140
|
+
* Aliased to `ModelTicket<Z>` — sortable adds no per-ticket fields.
|
|
2141
|
+
*
|
|
2142
|
+
* @template Z The input ticket type (carries the value type V).
|
|
2143
|
+
*/
|
|
2144
|
+
type SortableTicket<Z extends SortableTicketInput = SortableTicketInput> = ModelTicket<Z>;
|
|
2145
|
+
/**
|
|
2146
|
+
* Options accepted by `createSortable`.
|
|
2147
|
+
*
|
|
2148
|
+
* @example
|
|
2149
|
+
* ```ts
|
|
2150
|
+
* const sortable = createSortable({
|
|
2151
|
+
* disabled: toRef(() => isReadOnlyMode.value),
|
|
2152
|
+
* })
|
|
2153
|
+
* ```
|
|
2154
|
+
*/
|
|
2155
|
+
interface SortableOptions extends Omit<ModelOptions, 'events'> {
|
|
2156
|
+
/**
|
|
2157
|
+
* Mutation gate. When truthy, `move` / `swap` / `reorder` silently no-op.
|
|
2158
|
+
*
|
|
2159
|
+
* @default false
|
|
2160
|
+
* @remarks Per-ticket `disabled` is honored at the `move` and `swap` call sites
|
|
2161
|
+
* for that ticket. `reorder` **bypasses** per-ticket `disabled` — it's a bulk
|
|
2162
|
+
* operation declaring the canonical order, and applying that order may relocate
|
|
2163
|
+
* disabled tickets. `register` / `onboard` / `unregister` are NEVER gated —
|
|
2164
|
+
* those are composition, not user-driven reorder.
|
|
2165
|
+
*
|
|
2166
|
+
* @example
|
|
2167
|
+
* ```ts
|
|
2168
|
+
* const sortable = createSortable({ disabled: toRef(() => isSaving.value) })
|
|
2169
|
+
* ```
|
|
2170
|
+
*/
|
|
2171
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
2172
|
+
}
|
|
2173
|
+
/**
|
|
2174
|
+
* Payload of the `move:ticket` event.
|
|
2175
|
+
*
|
|
2176
|
+
* @example
|
|
2177
|
+
* ```ts
|
|
2178
|
+
* sortable.on('move:ticket', ({ ticket, from, to }) => {
|
|
2179
|
+
* console.log(ticket.id, from, to)
|
|
2180
|
+
* })
|
|
2181
|
+
* ```
|
|
2182
|
+
*/
|
|
2183
|
+
interface SortableMovePayload<E extends SortableTicket = SortableTicket> {
|
|
2184
|
+
ticket: E;
|
|
2185
|
+
from: number;
|
|
2186
|
+
to: number;
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Listener-binding signature for a sortable instance — a typed overload for
|
|
2190
|
+
* `move:ticket` plus the registry's generic event channel.
|
|
2191
|
+
*
|
|
2192
|
+
* @template E Output ticket type.
|
|
2193
|
+
*/
|
|
2194
|
+
type SortableEventListener<E extends SortableTicket = SortableTicket> = {
|
|
2195
|
+
(event: 'move:ticket', cb: (data: SortableMovePayload<E>) => void): void;
|
|
2196
|
+
<K extends Extensible<RegistryEventName>>(event: K, cb: RegistryEventCallback<E, K>): void;
|
|
2197
|
+
};
|
|
2198
|
+
/**
|
|
2199
|
+
* Public API of a sortable instance.
|
|
2200
|
+
*
|
|
2201
|
+
* @template Z Input ticket type.
|
|
2202
|
+
* @template E Output ticket type.
|
|
2203
|
+
*/
|
|
2204
|
+
interface SortableContext<Z extends SortableTicketInput = SortableTicketInput, E extends SortableTicket<Z> = SortableTicket<Z>> extends Omit<ModelContext<Z, E>, 'on' | 'off' | 'move'> {
|
|
2205
|
+
/**
|
|
2206
|
+
* Subscribe to the typed `move:ticket` event with a strongly-typed payload.
|
|
2207
|
+
*
|
|
2208
|
+
* @example
|
|
2209
|
+
* ```ts
|
|
2210
|
+
* sortable.on('move:ticket', ({ ticket, from, to }) => {
|
|
2211
|
+
* console.log(ticket.id, from, to)
|
|
2212
|
+
* })
|
|
2213
|
+
* ```
|
|
2214
|
+
*/
|
|
2215
|
+
on: SortableEventListener<E>;
|
|
2216
|
+
/**
|
|
2217
|
+
* Unsubscribe from a `move:ticket` listener. Must be called with the same callback reference used to subscribe.
|
|
2218
|
+
*
|
|
2219
|
+
* @example
|
|
2220
|
+
* ```ts
|
|
2221
|
+
* function onMove ({ ticket, from, to }: SortableMovePayload) {
|
|
2222
|
+
* console.log(ticket.id, from, to)
|
|
2223
|
+
* }
|
|
2224
|
+
*
|
|
2225
|
+
* sortable.on('move:ticket', onMove)
|
|
2226
|
+
* // later...
|
|
2227
|
+
* sortable.off('move:ticket', onMove)
|
|
2228
|
+
* ```
|
|
2229
|
+
*/
|
|
2230
|
+
off: SortableEventListener<E>;
|
|
2231
|
+
/**
|
|
2232
|
+
* Move a ticket to a target index. Other tickets shift to fill.
|
|
2233
|
+
* Emits `move:ticket` once when the index actually changes — a move whose
|
|
2234
|
+
* `toIndex` already equals the ticket's current index is a no-op.
|
|
2235
|
+
* No-ops when the root sortable is disabled or when the ticket is disabled.
|
|
2236
|
+
*
|
|
2237
|
+
* @param id Ticket id to move.
|
|
2238
|
+
* @param toIndex Target index (zero-based).
|
|
2239
|
+
* @returns The moved ticket, or `undefined` when the move was gated or the id is unknown.
|
|
2240
|
+
*
|
|
2241
|
+
* @example
|
|
2242
|
+
* ```ts
|
|
2243
|
+
* sortable.move(ticket.id, 2)
|
|
2244
|
+
* ```
|
|
2245
|
+
*/
|
|
2246
|
+
move: (id: ID, toIndex: number) => E | undefined;
|
|
2247
|
+
/**
|
|
2248
|
+
* Swap two tickets' positions. Emits `move:ticket` twice — once per ticket.
|
|
2249
|
+
* No-ops when the root sortable is disabled or when either ticket is disabled.
|
|
2250
|
+
*
|
|
2251
|
+
* @param a Ticket id at one position.
|
|
2252
|
+
* @param b Ticket id at the other position.
|
|
2253
|
+
*
|
|
2254
|
+
* @example
|
|
2255
|
+
* ```ts
|
|
2256
|
+
* sortable.swap(a.id, b.id)
|
|
2257
|
+
* ```
|
|
2258
|
+
*/
|
|
2259
|
+
swap: (a: ID, b: ID) => void;
|
|
2260
|
+
/**
|
|
2261
|
+
* Set the canonical order in one shot.
|
|
2262
|
+
*
|
|
2263
|
+
* @param ids Permutation of currently-registered ticket ids.
|
|
2264
|
+
*
|
|
2265
|
+
* @remarks
|
|
2266
|
+
* Validates `ids.length === registry.size` and that every id is unique and known.
|
|
2267
|
+
* Logs a warning via `useLogger()` and silently no-ops if any check fails — drag
|
|
2268
|
+
* handlers that race against concurrent unregisters won't crash.
|
|
2269
|
+
*
|
|
2270
|
+
* Honors root `disabled` (whole call no-ops). Per-ticket `disabled` is **ignored** —
|
|
2271
|
+
* `reorder` is a bulk operation declaring the canonical order, and applying that
|
|
2272
|
+
* order may move disabled tickets. If you want disabled tickets pinned, exclude
|
|
2273
|
+
* them from the ids you pass.
|
|
2274
|
+
*
|
|
2275
|
+
* @example
|
|
2276
|
+
* ```ts
|
|
2277
|
+
* sortable.reorder([c.id, a.id, b.id])
|
|
2278
|
+
* ```
|
|
2279
|
+
*/
|
|
2280
|
+
reorder: (ids: ID[]) => void;
|
|
2281
|
+
}
|
|
2282
|
+
/**
|
|
2283
|
+
* Create an ordered-list state primitive.
|
|
2284
|
+
*
|
|
2285
|
+
* @param options Sortable options.
|
|
2286
|
+
* @returns A {@link SortableContext} that extends {@link ModelContext}.
|
|
2287
|
+
*
|
|
2288
|
+
* @example
|
|
2289
|
+
* ```ts
|
|
2290
|
+
* const sortable = createSortable<Todo>()
|
|
2291
|
+
* sortable.onboard(todos.value.map(value => ({ value })))
|
|
2292
|
+
* ```
|
|
2293
|
+
*/
|
|
2294
|
+
declare function createSortable<Z extends SortableTicketInput = SortableTicketInput, E extends SortableTicket<Z> = SortableTicket<Z>>(_options?: SortableOptions): SortableContext<Z, E>;
|
|
2295
|
+
//#endregion
|
|
2296
|
+
//#region src/composables/createKanban/index.d.ts
|
|
2297
|
+
/**
|
|
2298
|
+
* Options accepted by `createKanban`.
|
|
2299
|
+
*
|
|
2300
|
+
* @example
|
|
2301
|
+
* ```ts
|
|
2302
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2303
|
+
* import { shallowRef, toRef } from 'vue'
|
|
2304
|
+
*
|
|
2305
|
+
* const isReadOnly = shallowRef(false)
|
|
2306
|
+
* const kanban = createKanban({ disabled: toRef(() => isReadOnly.value) })
|
|
2307
|
+
* ```
|
|
2308
|
+
*/
|
|
2309
|
+
interface KanbanOptions extends Omit<SortableOptions, 'events'> {
|
|
2310
|
+
/**
|
|
2311
|
+
* Mutation gate. When truthy, `transfer` and column-level mutations no-op.
|
|
2312
|
+
*
|
|
2313
|
+
* @default false
|
|
2314
|
+
*/
|
|
2315
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
2316
|
+
}
|
|
2317
|
+
/**
|
|
2318
|
+
* Input shape for a column ticket. Parameterized over the per-column inner
|
|
2319
|
+
* ticket type so `accept` is typed against the caller's domain.
|
|
2320
|
+
*
|
|
2321
|
+
* @template ItemZ The inner ticket input type (extends `SortableTicketInput`).
|
|
2322
|
+
* @template V The column's own value type.
|
|
2323
|
+
*
|
|
2324
|
+
* @example
|
|
2325
|
+
* ```ts
|
|
2326
|
+
* import type { KanbanColumnTicketInput, SortableTicketInput } from '@vuetify/v0'
|
|
2327
|
+
*
|
|
2328
|
+
* interface CardTicket extends SortableTicketInput {
|
|
2329
|
+
* value: { title: string }
|
|
2330
|
+
* }
|
|
2331
|
+
*
|
|
2332
|
+
* interface BoardColumn extends KanbanColumnTicketInput<CardTicket> {
|
|
2333
|
+
* value: { title: string; color: string }
|
|
2334
|
+
* }
|
|
2335
|
+
* ```
|
|
2336
|
+
*/
|
|
2337
|
+
interface KanbanColumnTicketInput<ItemZ extends SortableTicketInput = SortableTicketInput, V = unknown> extends SortableTicketInput<V> {
|
|
2338
|
+
/**
|
|
2339
|
+
* Per-column mutation gate. When truthy, transfers into and out of this
|
|
2340
|
+
* column are blocked, and the column's inner `items` sortable is disabled
|
|
2341
|
+
* (move / swap / reorder no-op). Column-level operations on
|
|
2342
|
+
* `kanban.columns` are unaffected — those are gated by the kanban-level
|
|
2343
|
+
* `disabled`.
|
|
2344
|
+
*
|
|
2345
|
+
* @default false
|
|
2346
|
+
*/
|
|
2347
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
2348
|
+
/**
|
|
2349
|
+
* Predicate veto for incoming transfers. Synchronous boolean return:
|
|
2350
|
+
* `true` accepts; `false` rejects (silent no-op). Async predicates are
|
|
2351
|
+
* rejected at runtime with a warning.
|
|
2352
|
+
*
|
|
2353
|
+
* @param ticket The item being transferred (from the source column).
|
|
2354
|
+
* @param from The source column id.
|
|
2355
|
+
* @param toIndex The target index inside this destination column.
|
|
2356
|
+
*
|
|
2357
|
+
* @example
|
|
2358
|
+
* ```ts
|
|
2359
|
+
* const review = kanban.columns.register({
|
|
2360
|
+
* value: { title: 'Review' },
|
|
2361
|
+
* accept: (ticket, from) => from !== archiveColumn.id,
|
|
2362
|
+
* })
|
|
2363
|
+
* ```
|
|
2364
|
+
*/
|
|
2365
|
+
accept?: (ticket: SortableTicket<ItemZ>, from: ID, toIndex: number) => boolean;
|
|
2366
|
+
}
|
|
2367
|
+
/**
|
|
2368
|
+
* Output ticket returned from `kanban.columns.register`. Extends `SortableTicket`
|
|
2369
|
+
* with the column's own inner sortable on `items`.
|
|
2370
|
+
*
|
|
2371
|
+
* @template ItemZ Inner ticket input type.
|
|
2372
|
+
* @template Z Column input type.
|
|
2373
|
+
*
|
|
2374
|
+
* @example
|
|
2375
|
+
* ```ts
|
|
2376
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2377
|
+
*
|
|
2378
|
+
* const kanban = createKanban()
|
|
2379
|
+
* const todo = kanban.columns.register({ value: { title: 'Todo' } })
|
|
2380
|
+
* todo.items.register({ value: { title: 'Write spec' } })
|
|
2381
|
+
* console.log(todo.id, todo.value.title, todo.items.size)
|
|
2382
|
+
* ```
|
|
2383
|
+
*/
|
|
2384
|
+
type KanbanColumnTicket<ItemZ extends SortableTicketInput = SortableTicketInput, Z extends KanbanColumnTicketInput<ItemZ> = KanbanColumnTicketInput<ItemZ>> = SortableTicket<Z> & {
|
|
2385
|
+
items: SortableContext<ItemZ>;
|
|
2386
|
+
};
|
|
2387
|
+
/**
|
|
2388
|
+
* Payload of the `transfer:ticket` event on the kanban bus.
|
|
2389
|
+
*
|
|
2390
|
+
* @example
|
|
2391
|
+
* ```ts
|
|
2392
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2393
|
+
*
|
|
2394
|
+
* const kanban = createKanban()
|
|
2395
|
+
*
|
|
2396
|
+
* kanban.on('transfer:ticket', ({ ticket, from, to, toIndex }) => {
|
|
2397
|
+
* console.log(ticket.id, from, '→', to, '@', toIndex)
|
|
2398
|
+
* })
|
|
2399
|
+
* ```
|
|
2400
|
+
*/
|
|
2401
|
+
interface KanbanTransferPayload<ItemZ extends SortableTicketInput = SortableTicketInput> {
|
|
2402
|
+
ticket: SortableTicket<ItemZ>;
|
|
2403
|
+
from: ID;
|
|
2404
|
+
to: ID;
|
|
2405
|
+
fromIndex: number;
|
|
2406
|
+
toIndex: number;
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Listener signature for the kanban-level `transfer:ticket` event. Registry
|
|
2410
|
+
* events (`register:ticket`, `unregister:ticket`, etc.) live on the columns
|
|
2411
|
+
* registry — subscribe via `kanban.columns.on(...)` rather than `kanban.on(...)`.
|
|
2412
|
+
*
|
|
2413
|
+
* @example
|
|
2414
|
+
* ```ts
|
|
2415
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2416
|
+
*
|
|
2417
|
+
* const kanban = createKanban()
|
|
2418
|
+
*
|
|
2419
|
+
* kanban.on('transfer:ticket', ({ ticket, from, to, toIndex }) => {
|
|
2420
|
+
* console.log(ticket.id, from, '→', to, '@', toIndex)
|
|
2421
|
+
* })
|
|
2422
|
+
* ```
|
|
2423
|
+
*/
|
|
2424
|
+
type KanbanEventListener<ItemZ extends SortableTicketInput = SortableTicketInput> = (event: 'transfer:ticket', cb: (data: KanbanTransferPayload<ItemZ>) => void) => void;
|
|
2425
|
+
/**
|
|
2426
|
+
* Public context returned by `createKanban`.
|
|
2427
|
+
*
|
|
2428
|
+
* @example
|
|
2429
|
+
* ```ts
|
|
2430
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2431
|
+
* import type { KanbanColumnTicketInput, SortableTicketInput } from '@vuetify/v0'
|
|
2432
|
+
*
|
|
2433
|
+
* interface CardTicket extends SortableTicketInput {
|
|
2434
|
+
* value: { title: string }
|
|
2435
|
+
* }
|
|
2436
|
+
*
|
|
2437
|
+
* interface BoardColumn extends KanbanColumnTicketInput<CardTicket> {
|
|
2438
|
+
* value: { title: string }
|
|
2439
|
+
* }
|
|
2440
|
+
*
|
|
2441
|
+
* const kanban = createKanban<CardTicket, BoardColumn>()
|
|
2442
|
+
*
|
|
2443
|
+
* const [todo, done] = kanban.columns.onboard([
|
|
2444
|
+
* { value: { title: 'Todo' } },
|
|
2445
|
+
* { value: { title: 'Done' } },
|
|
2446
|
+
* ])
|
|
2447
|
+
*
|
|
2448
|
+
* const card = todo.items.register({ value: { title: 'Write spec' } })
|
|
2449
|
+
*
|
|
2450
|
+
* kanban.on('transfer:ticket', ({ ticket, from, to, toIndex }) => {
|
|
2451
|
+
* console.log(`${ticket.id}: ${from} → ${to} @ ${toIndex}`)
|
|
2452
|
+
* })
|
|
2453
|
+
*
|
|
2454
|
+
* kanban.transfer(card.id, done.id, 0)
|
|
2455
|
+
* ```
|
|
2456
|
+
*/
|
|
2457
|
+
interface KanbanContext<ItemZ extends SortableTicketInput = SortableTicketInput, ColZ extends KanbanColumnTicketInput<ItemZ> = KanbanColumnTicketInput<ItemZ>> {
|
|
2458
|
+
/**
|
|
2459
|
+
* Column registry. Use this for column register / unregister / move / swap / reorder.
|
|
2460
|
+
*
|
|
2461
|
+
* @remarks
|
|
2462
|
+
* Unregistering a column disposes its `items` sortable — all of the column's
|
|
2463
|
+
* tickets are dropped and any subscribers attached to `column.items` are
|
|
2464
|
+
* cleared. The internal cleanup runs before consumer-registered
|
|
2465
|
+
* `unregister:ticket` handlers, so you cannot rescue items from inside that
|
|
2466
|
+
* callback. To preserve items, move them before calling `unregister`.
|
|
2467
|
+
*
|
|
2468
|
+
* @example
|
|
2469
|
+
* ```ts
|
|
2470
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2471
|
+
*
|
|
2472
|
+
* const kanban = createKanban<CardTicket, BoardColumn>()
|
|
2473
|
+
* const todo = kanban.columns.register({ value: { title: 'Todo' } })
|
|
2474
|
+
* todo.items.register({ value: { title: 'Write spec' } })
|
|
2475
|
+
* kanban.columns.move(todo.id, 1)
|
|
2476
|
+
* ```
|
|
2477
|
+
*
|
|
2478
|
+
* @example
|
|
2479
|
+
* ```ts
|
|
2480
|
+
* // Reflow items into a fallback column before disposing the source column.
|
|
2481
|
+
* for (const item of todo.items.values()) {
|
|
2482
|
+
* trash.items.register({ id: item.id, value: item.value })
|
|
2483
|
+
* }
|
|
2484
|
+
* todo.unregister()
|
|
2485
|
+
* ```
|
|
2486
|
+
*/
|
|
2487
|
+
columns: SortableContext<ColZ, KanbanColumnTicket<ItemZ, ColZ>>;
|
|
2488
|
+
/**
|
|
2489
|
+
* Move an item across columns. Same-column transfer (where `toColumnId`
|
|
2490
|
+
* matches the item's current column) collapses to `column.items.move` and
|
|
2491
|
+
* does not emit `transfer:ticket`.
|
|
2492
|
+
*
|
|
2493
|
+
* Returns the moved ticket, or `undefined` when gated (kanban / source / destination /
|
|
2494
|
+
* item disabled, destination.accept rejected, unknown id, duplicate destination id).
|
|
2495
|
+
*
|
|
2496
|
+
* @example
|
|
2497
|
+
* ```ts
|
|
2498
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2499
|
+
*
|
|
2500
|
+
* const kanban = createKanban()
|
|
2501
|
+
* const [todo, done] = kanban.columns.onboard([{ value: 'Todo' }, { value: 'Done' }])
|
|
2502
|
+
* const card = todo.items.register({ value: 'Write spec' })
|
|
2503
|
+
*
|
|
2504
|
+
* const moved = kanban.transfer(card.id, done.id, 0)
|
|
2505
|
+
* if (moved) console.log('landed at', moved.index)
|
|
2506
|
+
*
|
|
2507
|
+
* // Returns undefined when gated by disabled, accept, or unknown ids:
|
|
2508
|
+
* kanban.transfer(card.id, 'no-such-column', 0) // → undefined
|
|
2509
|
+
* ```
|
|
2510
|
+
*/
|
|
2511
|
+
transfer: (id: ID, toColumnId: ID, toIndex: number) => SortableTicket<ItemZ> | undefined;
|
|
2512
|
+
/**
|
|
2513
|
+
* Subscribe to the kanban-level `transfer:ticket` event, fired after each
|
|
2514
|
+
* successful cross-column move. Registry events (`register:ticket`,
|
|
2515
|
+
* `unregister:ticket`, `move:ticket`) live on the columns registry — use
|
|
2516
|
+
* `kanban.columns.on(...)` for those, or `column.items.on(...)` for
|
|
2517
|
+
* per-column intra-column reorder events.
|
|
2518
|
+
*
|
|
2519
|
+
* @example
|
|
2520
|
+
* ```ts
|
|
2521
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2522
|
+
*
|
|
2523
|
+
* const kanban = createKanban()
|
|
2524
|
+
*
|
|
2525
|
+
* kanban.on('transfer:ticket', ({ ticket, from, to, fromIndex, toIndex }) => {
|
|
2526
|
+
* console.log(ticket.id, from, '→', to, '@', toIndex)
|
|
2527
|
+
* })
|
|
2528
|
+
* ```
|
|
2529
|
+
*/
|
|
2530
|
+
on: KanbanEventListener<ItemZ>;
|
|
2531
|
+
/**
|
|
2532
|
+
* Unsubscribe from the `transfer:ticket` event. Must be called with the same
|
|
2533
|
+
* callback reference used to subscribe.
|
|
2534
|
+
*
|
|
2535
|
+
* @example
|
|
2536
|
+
* ```ts
|
|
2537
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2538
|
+
* import type { KanbanTransferPayload } from '@vuetify/v0'
|
|
2539
|
+
*
|
|
2540
|
+
* const kanban = createKanban<CardTicket>()
|
|
2541
|
+
*
|
|
2542
|
+
* function onTransfer (data: KanbanTransferPayload<CardTicket>) {
|
|
2543
|
+
* console.log(data.ticket.id)
|
|
2544
|
+
* }
|
|
2545
|
+
*
|
|
2546
|
+
* kanban.on('transfer:ticket', onTransfer)
|
|
2547
|
+
* // later
|
|
2548
|
+
* kanban.off('transfer:ticket', onTransfer)
|
|
2549
|
+
* ```
|
|
2550
|
+
*/
|
|
2551
|
+
off: KanbanEventListener<ItemZ>;
|
|
2552
|
+
}
|
|
2553
|
+
/**
|
|
2554
|
+
* Create a headless two-level sortable orchestrator.
|
|
2555
|
+
*
|
|
2556
|
+
* @param options Kanban options (currently only `disabled`).
|
|
2557
|
+
* @returns A {@link KanbanContext}.
|
|
2558
|
+
*
|
|
2559
|
+
* @example
|
|
2560
|
+
* ```ts
|
|
2561
|
+
* import { createKanban } from '@vuetify/v0'
|
|
2562
|
+
* import type { KanbanColumnTicketInput, SortableTicketInput } from '@vuetify/v0'
|
|
2563
|
+
*
|
|
2564
|
+
* interface CardTicket extends SortableTicketInput {
|
|
2565
|
+
* value: { title: string }
|
|
2566
|
+
* }
|
|
2567
|
+
*
|
|
2568
|
+
* interface BoardColumn extends KanbanColumnTicketInput<CardTicket> {
|
|
2569
|
+
* value: { title: string }
|
|
2570
|
+
* }
|
|
2571
|
+
*
|
|
2572
|
+
* const kanban = createKanban<CardTicket, BoardColumn>()
|
|
2573
|
+
*
|
|
2574
|
+
* const todo = kanban.columns.register({ value: { title: 'Todo' } })
|
|
2575
|
+
* const review = kanban.columns.register({
|
|
2576
|
+
* value: { title: 'Review' },
|
|
2577
|
+
* accept: card => card.value.title.length > 0,
|
|
2578
|
+
* })
|
|
2579
|
+
*
|
|
2580
|
+
* const spec = todo.items.register({ value: { title: 'Write spec' } })
|
|
2581
|
+
* kanban.transfer(spec.id, review.id, 0)
|
|
2582
|
+
* ```
|
|
2583
|
+
*/
|
|
2584
|
+
declare function createKanban<ItemZ extends SortableTicketInput = SortableTicketInput, ColZ extends KanbanColumnTicketInput<ItemZ> = KanbanColumnTicketInput<ItemZ>>(_options?: KanbanOptions): KanbanContext<ItemZ, ColZ>;
|
|
2585
|
+
//#endregion
|
|
2120
2586
|
//#region src/composables/createNested/types.d.ts
|
|
2121
2587
|
/**
|
|
2122
2588
|
* Input type for nested tickets - what users provide to register().
|
|
@@ -2179,7 +2645,7 @@ type NestedRegistration<Z extends NestedTicketInput = NestedTicketInput> = Parti
|
|
|
2179
2645
|
* and hierarchical traversal methods. Perfect for tree structures, nested menus,
|
|
2180
2646
|
* file explorers, and organizational charts.
|
|
2181
2647
|
*/
|
|
2182
|
-
interface NestedContext<Z extends NestedTicketInput = NestedTicketInput, E extends NestedTicket<Z> = NestedTicket<Z>> extends Omit<GroupContext<Z, E>, 'register' | 'onboard' | 'select' | 'unselect' | 'toggle'> {
|
|
2648
|
+
interface NestedContext<Z extends NestedTicketInput = NestedTicketInput, E extends NestedTicket<Z> = NestedTicket<Z>> extends Omit<GroupContext<Z, E>, 'register' | 'onboard' | 'offboard' | 'select' | 'unselect' | 'toggle'> {
|
|
2183
2649
|
/** Map of parent IDs to arrays of child IDs. Use register/unregister to modify. */
|
|
2184
2650
|
readonly children: ReadonlyMap<ID, readonly ID[]>;
|
|
2185
2651
|
/** Map of child IDs to their parent ID (or undefined for roots). Use register/unregister to modify. */
|
|
@@ -2533,7 +2999,119 @@ interface NumberFieldContext {
|
|
|
2533
2999
|
/** Snap and optionally clamp the current value. */
|
|
2534
3000
|
commit: () => void;
|
|
2535
3001
|
}
|
|
2536
|
-
declare function createNumberField(options?: NumberFieldOptions): NumberFieldContext;
|
|
3002
|
+
declare function createNumberField(options?: NumberFieldOptions): NumberFieldContext;
|
|
3003
|
+
//#endregion
|
|
3004
|
+
//#region src/composables/createOtp/index.d.ts
|
|
3005
|
+
/**
|
|
3006
|
+
* Pattern presets — string literals compile to internal RegExps; arbitrary
|
|
3007
|
+
* RegExp values are applied per character.
|
|
3008
|
+
*
|
|
3009
|
+
* @example
|
|
3010
|
+
* ```ts
|
|
3011
|
+
* const otp = createOtp({ pattern: 'numeric' })
|
|
3012
|
+
* const hex = createOtp({ pattern: /^[0-9a-fA-F]$/ })
|
|
3013
|
+
* ```
|
|
3014
|
+
*/
|
|
3015
|
+
type OtpPattern = 'numeric' | 'alphanumeric' | 'alphabetic' | RegExp;
|
|
3016
|
+
/**
|
|
3017
|
+
* Options accepted by `createOtp`.
|
|
3018
|
+
*
|
|
3019
|
+
* @example
|
|
3020
|
+
* ```ts
|
|
3021
|
+
* const otp = createOtp({
|
|
3022
|
+
* length: 6,
|
|
3023
|
+
* pattern: 'numeric',
|
|
3024
|
+
* disabled: false,
|
|
3025
|
+
* onComplete: async value => {
|
|
3026
|
+
* const ok = await verify(value)
|
|
3027
|
+
* return ok
|
|
3028
|
+
* },
|
|
3029
|
+
* })
|
|
3030
|
+
* ```
|
|
3031
|
+
*/
|
|
3032
|
+
interface OtpOptions extends Omit<InputOptions<string>, 'value' | 'error' | 'errorMessages'> {
|
|
3033
|
+
/** Number of characters. @default 6 */
|
|
3034
|
+
length?: MaybeRefOrGetter<number>;
|
|
3035
|
+
/** Joined value source. @default shallowRef('') */
|
|
3036
|
+
value?: Ref<string>;
|
|
3037
|
+
/**
|
|
3038
|
+
* Per-character pattern. String presets compile to internal RegExps;
|
|
3039
|
+
* custom RegExp must match a single character.
|
|
3040
|
+
* @default 'numeric'
|
|
3041
|
+
*/
|
|
3042
|
+
pattern?: MaybeRefOrGetter<OtpPattern>;
|
|
3043
|
+
/**
|
|
3044
|
+
* Fire when the joined value first reaches `length`. Decisional —
|
|
3045
|
+
* return / resolve `false` to reject (clears value, sets error).
|
|
3046
|
+
* A rejected Promise is treated as `false` and logs a warning.
|
|
3047
|
+
*/
|
|
3048
|
+
onComplete?: (value: string) => boolean | void | PromiseLike<boolean | void>;
|
|
3049
|
+
}
|
|
3050
|
+
/**
|
|
3051
|
+
* Reactive context returned by `createOtp`. Consumers index into `value`
|
|
3052
|
+
* for per-character rendering and call the mutation helpers to drive state.
|
|
3053
|
+
*
|
|
3054
|
+
* @example
|
|
3055
|
+
* ```ts
|
|
3056
|
+
* const otp = createOtp({ length: 6 })
|
|
3057
|
+
*
|
|
3058
|
+
* otp.write(0, '4')
|
|
3059
|
+
* otp.distribute('12345', 1) // returns 5
|
|
3060
|
+
* otp.isComplete.value // true
|
|
3061
|
+
* otp.clear()
|
|
3062
|
+
* ```
|
|
3063
|
+
*/
|
|
3064
|
+
interface OtpContext {
|
|
3065
|
+
/**
|
|
3066
|
+
* The joined OTP string. Use the mutation helpers (`write`, `distribute`,
|
|
3067
|
+
* `fill`, `clear`) to update. Writing through this ref directly is
|
|
3068
|
+
* intentionally prevented to preserve pattern, length, and lock invariants.
|
|
3069
|
+
*/
|
|
3070
|
+
value: Readonly<Ref<string>>;
|
|
3071
|
+
/** Resolved character count from the `length` option. */
|
|
3072
|
+
length: Readonly<Ref<number>>;
|
|
3073
|
+
/**
|
|
3074
|
+
* The underlying `createInput` context — exposes ARIA IDs, validation
|
|
3075
|
+
* state, focus/touched, and the `validate` / `reset` methods.
|
|
3076
|
+
*
|
|
3077
|
+
* Note: `input.value` aliases `OtpContext.value` and is also readonly on
|
|
3078
|
+
* the public surface. Use the mutation helpers (`write`, `distribute`,
|
|
3079
|
+
* `fill`, `clear`) to update.
|
|
3080
|
+
*/
|
|
3081
|
+
input: Omit<InputContext<string>, 'value'> & {
|
|
3082
|
+
value: Readonly<Ref<string>>;
|
|
3083
|
+
};
|
|
3084
|
+
/** True when `value` reaches `length` and every character matches `pattern`. */
|
|
3085
|
+
isComplete: Readonly<Ref<boolean>>;
|
|
3086
|
+
/**
|
|
3087
|
+
* True while an async `onComplete` is in flight. Mutation helpers no-op
|
|
3088
|
+
* during this window; consumers can render a spinner against this ref.
|
|
3089
|
+
*/
|
|
3090
|
+
isValidating: Readonly<Ref<boolean>>;
|
|
3091
|
+
/**
|
|
3092
|
+
* Write a single character at `index`. Empty string clears trailing
|
|
3093
|
+
* characters from `index` onward. Out-of-range indices and characters
|
|
3094
|
+
* rejected by `pattern` are ignored. No-ops while locked.
|
|
3095
|
+
*/
|
|
3096
|
+
write: (index: number, char: string) => void;
|
|
3097
|
+
/**
|
|
3098
|
+
* Splice pattern-accepted characters from `text` into `value` starting
|
|
3099
|
+
* at `index`. Returns the number of characters written. No-ops while
|
|
3100
|
+
* locked or when no characters pass the pattern.
|
|
3101
|
+
*/
|
|
3102
|
+
distribute: (text: string, index?: number) => number;
|
|
3103
|
+
/** Clear `value` and rejection state. No-ops while locked. */
|
|
3104
|
+
clear: () => void;
|
|
3105
|
+
/**
|
|
3106
|
+
* Replace `value` with pattern-accepted characters from `text`, truncated
|
|
3107
|
+
* to `length`. Clears rejection state on deliberate empty input or any
|
|
3108
|
+
* accepted characters. No-ops while locked.
|
|
3109
|
+
*/
|
|
3110
|
+
fill: (text: string) => void;
|
|
3111
|
+
/** Whether `char` is a single character matching the current `pattern`. */
|
|
3112
|
+
accepts: (char: string) => boolean;
|
|
3113
|
+
}
|
|
3114
|
+
declare function createOtp(options?: OtpOptions): OtpContext;
|
|
2537
3115
|
//#endregion
|
|
2538
3116
|
//#region src/composables/createProgress/index.d.ts
|
|
2539
3117
|
type ProgressTicketInput = ModelTicketInput<ShallowRef<number>>;
|
|
@@ -3989,6 +4567,91 @@ type MaybeElementRef = {
|
|
|
3989
4567
|
*/
|
|
3990
4568
|
declare function toElement(target: MaybeElementRef): Element | undefined;
|
|
3991
4569
|
//#endregion
|
|
4570
|
+
//#region src/composables/toHighlight/index.d.ts
|
|
4571
|
+
/**
|
|
4572
|
+
* A `[start, end]` index pair where `end` is exclusive (matches
|
|
4573
|
+
* `String.prototype.slice` convention).
|
|
4574
|
+
*
|
|
4575
|
+
* @example
|
|
4576
|
+
* ```ts
|
|
4577
|
+
* import type { MatchRange } from '@vuetify/v0'
|
|
4578
|
+
*
|
|
4579
|
+
* const ranges: MatchRange[] = [[0, 5], [12, 17]]
|
|
4580
|
+
* ```
|
|
4581
|
+
*/
|
|
4582
|
+
type MatchRange = readonly [number, number];
|
|
4583
|
+
/**
|
|
4584
|
+
* A contiguous chunk of source text, flagged as matched or unmatched.
|
|
4585
|
+
*
|
|
4586
|
+
* @example
|
|
4587
|
+
* ```ts
|
|
4588
|
+
* import type { HighlightChunk } from '@vuetify/v0'
|
|
4589
|
+
*
|
|
4590
|
+
* const chunk: HighlightChunk = { text: 'Hello', match: true }
|
|
4591
|
+
* ```
|
|
4592
|
+
*/
|
|
4593
|
+
interface HighlightChunk {
|
|
4594
|
+
text: string;
|
|
4595
|
+
match: boolean;
|
|
4596
|
+
}
|
|
4597
|
+
/**
|
|
4598
|
+
* Optional configuration for {@link toHighlight}.
|
|
4599
|
+
*
|
|
4600
|
+
* @example
|
|
4601
|
+
* ```ts
|
|
4602
|
+
* import { toHighlight } from '@vuetify/v0'
|
|
4603
|
+
*
|
|
4604
|
+
* const chunks = toHighlight('Hello World', 'WORLD', {
|
|
4605
|
+
* ignoreCase: true,
|
|
4606
|
+
* matchAll: true,
|
|
4607
|
+
* })
|
|
4608
|
+
* ```
|
|
4609
|
+
*/
|
|
4610
|
+
interface ToHighlightOptions {
|
|
4611
|
+
/**
|
|
4612
|
+
* Pre-computed `[start, end]` index pairs.
|
|
4613
|
+
* When non-empty, takes priority over `query`. `matchAll` is ignored.
|
|
4614
|
+
* Caller-supplied ranges are sorted and merged before chunking, so
|
|
4615
|
+
* unsorted or overlapping input is handled gracefully.
|
|
4616
|
+
*/
|
|
4617
|
+
matches?: MaybeRefOrGetter<readonly MatchRange[] | undefined>;
|
|
4618
|
+
/**
|
|
4619
|
+
* Highlight every occurrence (`true`) or only the first per term (`false`, default).
|
|
4620
|
+
* Ignored when `matches` is provided.
|
|
4621
|
+
*/
|
|
4622
|
+
matchAll?: MaybeRefOrGetter<boolean>;
|
|
4623
|
+
/** Case-insensitive matching. Default `false`. */
|
|
4624
|
+
ignoreCase?: MaybeRefOrGetter<boolean>;
|
|
4625
|
+
}
|
|
4626
|
+
/**
|
|
4627
|
+
* Splits text into matched and unmatched chunks.
|
|
4628
|
+
*
|
|
4629
|
+
* Pure transformer — returns a plain array. Wrap the call in `computed()` for
|
|
4630
|
+
* reactive recomputation.
|
|
4631
|
+
*
|
|
4632
|
+
* Priority: `options.matches` (when non-empty) → `query` → no-match fallback.
|
|
4633
|
+
*
|
|
4634
|
+
* @param text The source string to split.
|
|
4635
|
+
* @param query One or more search terms. Empty strings are ignored. Case sensitivity controlled by `options.ignoreCase`.
|
|
4636
|
+
* @param options Optional `matches`, `matchAll`, `ignoreCase`.
|
|
4637
|
+
* @returns A `HighlightChunk[]` array.
|
|
4638
|
+
*
|
|
4639
|
+
* @see https://0.vuetifyjs.com/composables/transformers/to-highlight
|
|
4640
|
+
*
|
|
4641
|
+
* @example
|
|
4642
|
+
* ```ts
|
|
4643
|
+
* import { computed, shallowRef } from 'vue'
|
|
4644
|
+
* import { toHighlight } from '@vuetify/v0'
|
|
4645
|
+
*
|
|
4646
|
+
* const query = shallowRef('World')
|
|
4647
|
+
* const chunks = computed(() => toHighlight('Hello World', query))
|
|
4648
|
+
*
|
|
4649
|
+
* console.log(chunks.value)
|
|
4650
|
+
* // [{ text: 'Hello ', match: false }, { text: 'World', match: true }]
|
|
4651
|
+
* ```
|
|
4652
|
+
*/
|
|
4653
|
+
declare function toHighlight(text: MaybeRefOrGetter<string>, query?: MaybeRefOrGetter<string | string[] | undefined>, options?: ToHighlightOptions): HighlightChunk[];
|
|
4654
|
+
//#endregion
|
|
3992
4655
|
//#region src/composables/toReactive/index.d.ts
|
|
3993
4656
|
/**
|
|
3994
4657
|
* Converts a `MaybeRef` to a `UnwrapNestedRefs`.
|
|
@@ -4222,8 +4885,8 @@ interface DateOptions<Z> {
|
|
|
4222
4885
|
*
|
|
4223
4886
|
* @example
|
|
4224
4887
|
* ```ts
|
|
4225
|
-
* import {
|
|
4226
|
-
* createDate({ adapter: new
|
|
4888
|
+
* import { V0DateAdapter } from '@vuetify/v0/date'
|
|
4889
|
+
* createDate({ adapter: new V0DateAdapter() })
|
|
4227
4890
|
* ```
|
|
4228
4891
|
*/
|
|
4229
4892
|
adapter: DateAdapter<Z>;
|
|
@@ -4252,14 +4915,14 @@ interface DatePluginOptions<Z> extends DateContextOptions<Z> {}
|
|
|
4252
4915
|
*
|
|
4253
4916
|
* @example
|
|
4254
4917
|
* ```ts
|
|
4255
|
-
* import {
|
|
4918
|
+
* import { V0DateAdapter } from '@vuetify/v0/date'
|
|
4256
4919
|
*
|
|
4257
|
-
* const { adapter } = createDate({ adapter: new
|
|
4920
|
+
* const { adapter } = createDate({ adapter: new V0DateAdapter() })
|
|
4258
4921
|
* const today = adapter.date()
|
|
4259
4922
|
*
|
|
4260
4923
|
* // With locale options
|
|
4261
4924
|
* const { adapter } = createDate({
|
|
4262
|
-
* adapter: new
|
|
4925
|
+
* adapter: new V0DateAdapter(),
|
|
4263
4926
|
* locale: 'de-DE',
|
|
4264
4927
|
* })
|
|
4265
4928
|
* ```
|
|
@@ -4277,10 +4940,10 @@ declare function createDate<Z, E extends DateContext<Z> = DateContext<Z>>(option
|
|
|
4277
4940
|
*
|
|
4278
4941
|
* @example
|
|
4279
4942
|
* ```ts
|
|
4280
|
-
* import {
|
|
4943
|
+
* import { V0DateAdapter } from '@vuetify/v0/date'
|
|
4281
4944
|
*
|
|
4282
4945
|
* const [useAppDate, provideAppDate] = createDateContext({
|
|
4283
|
-
* adapter: new
|
|
4946
|
+
* adapter: new V0DateAdapter(),
|
|
4284
4947
|
* namespace: 'app:date',
|
|
4285
4948
|
* })
|
|
4286
4949
|
* ```
|
|
@@ -4298,14 +4961,14 @@ declare function createDateContext<Z, E extends DateContext<Z> = DateContext<Z>>
|
|
|
4298
4961
|
*
|
|
4299
4962
|
* @example
|
|
4300
4963
|
* ```ts
|
|
4301
|
-
* import {
|
|
4964
|
+
* import { V0DateAdapter } from '@vuetify/v0/date'
|
|
4302
4965
|
*
|
|
4303
4966
|
* const app = createApp(App)
|
|
4304
|
-
* app.use(createDatePlugin({ adapter: new
|
|
4967
|
+
* app.use(createDatePlugin({ adapter: new V0DateAdapter() }))
|
|
4305
4968
|
*
|
|
4306
4969
|
* // With locale options
|
|
4307
4970
|
* app.use(createDatePlugin({
|
|
4308
|
-
* adapter: new
|
|
4971
|
+
* adapter: new V0DateAdapter(),
|
|
4309
4972
|
* locale: 'de-DE',
|
|
4310
4973
|
* }))
|
|
4311
4974
|
* ```
|
|
@@ -4327,10 +4990,10 @@ declare function createDatePlugin<Z, E extends DateContext<Z> = DateContext<Z>>(
|
|
|
4327
4990
|
* @example
|
|
4328
4991
|
* ```ts
|
|
4329
4992
|
* // main.ts
|
|
4330
|
-
* import {
|
|
4993
|
+
* import { V0DateAdapter } from '@vuetify/v0/date'
|
|
4331
4994
|
* import { createDatePlugin } from '@vuetify/v0'
|
|
4332
4995
|
*
|
|
4333
|
-
* app.use(createDatePlugin({ adapter: new
|
|
4996
|
+
* app.use(createDatePlugin({ adapter: new V0DateAdapter() }))
|
|
4334
4997
|
* ```
|
|
4335
4998
|
*
|
|
4336
4999
|
* @example
|
|
@@ -4479,6 +5142,441 @@ interface UseDelayReturn {
|
|
|
4479
5142
|
*/
|
|
4480
5143
|
declare function useDelay(callback?: (isOpening: boolean) => void, options?: UseDelayOptions): UseDelayReturn;
|
|
4481
5144
|
//#endregion
|
|
5145
|
+
//#region src/composables/useDragDrop/adapters/adapter.d.ts
|
|
5146
|
+
interface DragDropAdapterEmit<Z extends DragType = DragType> {
|
|
5147
|
+
start: (source: DraggableTicket<Z>, origin: {
|
|
5148
|
+
x: number;
|
|
5149
|
+
y: number;
|
|
5150
|
+
}, via: DragVia) => void;
|
|
5151
|
+
move: (point: {
|
|
5152
|
+
x: number;
|
|
5153
|
+
y: number;
|
|
5154
|
+
}) => void;
|
|
5155
|
+
drop: () => void;
|
|
5156
|
+
cancel: () => void;
|
|
5157
|
+
}
|
|
5158
|
+
interface DragDropAdapterContext<Z extends DragType = DragType> extends DragDropContext<Z> {
|
|
5159
|
+
emit: DragDropAdapterEmit<Z>;
|
|
5160
|
+
}
|
|
5161
|
+
/**
|
|
5162
|
+
* Abstract base class for useDragDrop adapters. Provides a `cleanup` slot, a
|
|
5163
|
+
* `dispose()` lifecycle, and a `locate()` helper that walks the DOM to find the
|
|
5164
|
+
* draggable ticket whose `el` ancestors a given event target.
|
|
5165
|
+
*
|
|
5166
|
+
* @example
|
|
5167
|
+
* ```ts
|
|
5168
|
+
* import { DragDropAdapter, type DragDropAdapterContext } from '@vuetify/v0'
|
|
5169
|
+
*
|
|
5170
|
+
* class MyAdapter extends DragDropAdapter {
|
|
5171
|
+
* setup (context: DragDropAdapterContext) {
|
|
5172
|
+
* const stop = useEventListener(document, 'mousedown', event => {
|
|
5173
|
+
* const ticket = this.locate(event.target, context)
|
|
5174
|
+
* if (ticket) context.emit.start(ticket, { x: event.clientX, y: event.clientY }, 'pointer')
|
|
5175
|
+
* })
|
|
5176
|
+
* this.cleanup = () => stop()
|
|
5177
|
+
* }
|
|
5178
|
+
* }
|
|
5179
|
+
* ```
|
|
5180
|
+
*/
|
|
5181
|
+
declare abstract class DragDropAdapter<Z extends DragType = DragType> {
|
|
5182
|
+
protected cleanup: (() => void) | null;
|
|
5183
|
+
dispose(): void;
|
|
5184
|
+
protected locate(target: EventTarget | Element | null, context: DragDropAdapterContext<Z>): DraggableTicket<Z> | null;
|
|
5185
|
+
abstract setup(context: DragDropAdapterContext<Z>): void;
|
|
5186
|
+
}
|
|
5187
|
+
//#endregion
|
|
5188
|
+
//#region src/composables/useDragDrop/adapters/pointer.d.ts
|
|
5189
|
+
interface PointerAdapterOptions {
|
|
5190
|
+
/** Drag-activation distance in px (default 0 — start on pointerdown). */
|
|
5191
|
+
threshold?: number;
|
|
5192
|
+
}
|
|
5193
|
+
/**
|
|
5194
|
+
* Default pointer adapter. Wires `pointerdown` / `pointermove` / `pointerup` /
|
|
5195
|
+
* `pointercancel` on the document and converts them into drag lifecycle calls.
|
|
5196
|
+
*
|
|
5197
|
+
* @example
|
|
5198
|
+
* ```ts
|
|
5199
|
+
* import { PointerAdapter, useDragDrop } from '@vuetify/v0'
|
|
5200
|
+
*
|
|
5201
|
+
* useDragDrop({ adapters: [new PointerAdapter({ threshold: 10 })] })
|
|
5202
|
+
* ```
|
|
5203
|
+
*/
|
|
5204
|
+
declare class PointerAdapter<Z extends DragType = DragType> extends DragDropAdapter<Z> {
|
|
5205
|
+
private threshold;
|
|
5206
|
+
constructor(options?: PointerAdapterOptions);
|
|
5207
|
+
setup(context: DragDropAdapterContext<Z>): void;
|
|
5208
|
+
}
|
|
5209
|
+
//#endregion
|
|
5210
|
+
//#region src/composables/useDragDrop/adapters/keyboard.d.ts
|
|
5211
|
+
interface KeyboardAdapterOptions {
|
|
5212
|
+
/** Activation keys (default [' ', 'Enter']). */
|
|
5213
|
+
activate?: string[];
|
|
5214
|
+
/** Step size in px for arrow-key moves (default 16). */
|
|
5215
|
+
step?: number;
|
|
5216
|
+
}
|
|
5217
|
+
/**
|
|
5218
|
+
* Default keyboard adapter. Listens for `keydown` on the document; activation
|
|
5219
|
+
* keys start/drop drags, arrow keys nudge the drag point, Escape cancels.
|
|
5220
|
+
*
|
|
5221
|
+
* @example
|
|
5222
|
+
* ```ts
|
|
5223
|
+
* import { KeyboardAdapter, useDragDrop } from '@vuetify/v0'
|
|
5224
|
+
*
|
|
5225
|
+
* useDragDrop({ adapters: [new KeyboardAdapter({ activate: ['x'], step: 32 })] })
|
|
5226
|
+
* ```
|
|
5227
|
+
*/
|
|
5228
|
+
declare class KeyboardAdapter<Z extends DragType = DragType> extends DragDropAdapter<Z> {
|
|
5229
|
+
private activate;
|
|
5230
|
+
private step;
|
|
5231
|
+
constructor(options?: KeyboardAdapterOptions);
|
|
5232
|
+
setup(context: DragDropAdapterContext<Z>): void;
|
|
5233
|
+
}
|
|
5234
|
+
//#endregion
|
|
5235
|
+
//#region src/composables/useDragDrop/index.d.ts
|
|
5236
|
+
/**
|
|
5237
|
+
* Layout axis a drop zone resolves indices along.
|
|
5238
|
+
*/
|
|
5239
|
+
type Orientation = 'vertical' | 'horizontal';
|
|
5240
|
+
/**
|
|
5241
|
+
* Discriminated payload describing what is being dragged. Consumers extend
|
|
5242
|
+
* this with concrete `type` literals plus a matching `value`.
|
|
5243
|
+
*
|
|
5244
|
+
* @example
|
|
5245
|
+
* ```ts
|
|
5246
|
+
* import type { DragType } from '@vuetify/v0'
|
|
5247
|
+
*
|
|
5248
|
+
* type Cards =
|
|
5249
|
+
* | { type: 'card', value: Card }
|
|
5250
|
+
* | { type: 'column', value: Column }
|
|
5251
|
+
* // Cards extends DragType — distributive over the union.
|
|
5252
|
+
* ```
|
|
5253
|
+
*/
|
|
5254
|
+
interface DragType {
|
|
5255
|
+
type: string;
|
|
5256
|
+
value: unknown;
|
|
5257
|
+
}
|
|
5258
|
+
/**
|
|
5259
|
+
* Resolved drop slot inside an oriented zone. Surfaced via {@link DropPosition}
|
|
5260
|
+
* so consumers can render a between-children indicator against the resolved
|
|
5261
|
+
* child rect.
|
|
5262
|
+
*
|
|
5263
|
+
* @example
|
|
5264
|
+
* ```ts
|
|
5265
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5266
|
+
*
|
|
5267
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5268
|
+
* const zone = dnd.zones.register({ el, accept: ['card'], orientation: 'vertical' })
|
|
5269
|
+
*
|
|
5270
|
+
* const indicator = zone.indicator.value
|
|
5271
|
+
* if (indicator) {
|
|
5272
|
+
* const y = indicator.edge === 'before'
|
|
5273
|
+
* ? indicator.rect.top
|
|
5274
|
+
* : indicator.rect.bottom
|
|
5275
|
+
* const x = indicator.rect.left
|
|
5276
|
+
* const width = indicator.rect.width
|
|
5277
|
+
* // Render a 2px bar at (x, y) with `width` to mark drop slot `indicator.index`.
|
|
5278
|
+
* }
|
|
5279
|
+
* ```
|
|
5280
|
+
*/
|
|
5281
|
+
interface DropIndicator {
|
|
5282
|
+
index: number;
|
|
5283
|
+
edge: 'before' | 'after';
|
|
5284
|
+
rect: DOMRect;
|
|
5285
|
+
}
|
|
5286
|
+
/**
|
|
5287
|
+
* Position passed to drop hooks. `index` and `indicator` are populated for
|
|
5288
|
+
* oriented zones; unoriented zones receive only the pointer location.
|
|
5289
|
+
*
|
|
5290
|
+
* @example
|
|
5291
|
+
* ```ts
|
|
5292
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5293
|
+
*
|
|
5294
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5295
|
+
*
|
|
5296
|
+
* dnd.zones.register({
|
|
5297
|
+
* el,
|
|
5298
|
+
* accept: ['card'],
|
|
5299
|
+
* orientation: 'vertical',
|
|
5300
|
+
* onDrop: (drag, position) => {
|
|
5301
|
+
* const target = position.index ?? items.length
|
|
5302
|
+
* items.splice(target, 0, drag.value)
|
|
5303
|
+
* },
|
|
5304
|
+
* })
|
|
5305
|
+
* ```
|
|
5306
|
+
*/
|
|
5307
|
+
interface DropPosition {
|
|
5308
|
+
pointer: {
|
|
5309
|
+
x: number;
|
|
5310
|
+
y: number;
|
|
5311
|
+
};
|
|
5312
|
+
index?: number;
|
|
5313
|
+
indicator?: DropIndicator;
|
|
5314
|
+
}
|
|
5315
|
+
/**
|
|
5316
|
+
* Source modality for an active drag. Adapters declare their own value via
|
|
5317
|
+
* the `Extensible<...>` escape hatch (e.g., 'touch', 'gamepad').
|
|
5318
|
+
*/
|
|
5319
|
+
type DragVia = Extensible<'pointer' | 'keyboard'>;
|
|
5320
|
+
/**
|
|
5321
|
+
* Active drag state. Distributive over `Z` so that narrowing `drag.type` also
|
|
5322
|
+
* narrows `drag.value` when `Z` is a discriminated union.
|
|
5323
|
+
*
|
|
5324
|
+
* @example
|
|
5325
|
+
* ```ts
|
|
5326
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5327
|
+
*
|
|
5328
|
+
* type Cards = { type: 'card', value: Card } | { type: 'column', value: Column }
|
|
5329
|
+
*
|
|
5330
|
+
* const dnd = useDragDrop<Cards>()
|
|
5331
|
+
*
|
|
5332
|
+
* dnd.zones.register({
|
|
5333
|
+
* el,
|
|
5334
|
+
* onEnter: drag => {
|
|
5335
|
+
* if (drag.type === 'card') drag.value.title // narrowed to Card
|
|
5336
|
+
* },
|
|
5337
|
+
* })
|
|
5338
|
+
* ```
|
|
5339
|
+
*/
|
|
5340
|
+
type ActiveDrag<Z extends DragType = DragType> = Z extends DragType ? {
|
|
5341
|
+
id: ID;
|
|
5342
|
+
type: Z['type'];
|
|
5343
|
+
value: Z['value'];
|
|
5344
|
+
origin: {
|
|
5345
|
+
x: number;
|
|
5346
|
+
y: number;
|
|
5347
|
+
};
|
|
5348
|
+
current: {
|
|
5349
|
+
x: number;
|
|
5350
|
+
y: number;
|
|
5351
|
+
};
|
|
5352
|
+
delta: {
|
|
5353
|
+
x: number;
|
|
5354
|
+
y: number;
|
|
5355
|
+
};
|
|
5356
|
+
over: ID | null;
|
|
5357
|
+
willAccept: boolean;
|
|
5358
|
+
via: DragVia;
|
|
5359
|
+
} : never;
|
|
5360
|
+
/**
|
|
5361
|
+
* Input shape for a draggable. Distributive over `Z` so unions narrow.
|
|
5362
|
+
*
|
|
5363
|
+
* @example
|
|
5364
|
+
* ```ts
|
|
5365
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5366
|
+
*
|
|
5367
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5368
|
+
*
|
|
5369
|
+
* dnd.draggables.register({
|
|
5370
|
+
* el: cardRef,
|
|
5371
|
+
* type: 'card',
|
|
5372
|
+
* value: card,
|
|
5373
|
+
* onBeforeStart: drag => !drag.value.locked,
|
|
5374
|
+
* })
|
|
5375
|
+
* ```
|
|
5376
|
+
*/
|
|
5377
|
+
type DraggableTicketInput<Z extends DragType = DragType> = Z extends DragType ? RegistryTicketInput & {
|
|
5378
|
+
type: Z['type'];
|
|
5379
|
+
value: Z['value'];
|
|
5380
|
+
el: MaybeRefOrGetter<HTMLElement | null>;
|
|
5381
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
5382
|
+
onBeforeStart?: (drag: ActiveDrag<Z>) => boolean | void;
|
|
5383
|
+
onMove?: (drag: ActiveDrag<Z>) => void;
|
|
5384
|
+
onCancel?: (drag: ActiveDrag<Z>, reason: 'cancel' | 'reject') => void;
|
|
5385
|
+
} : never;
|
|
5386
|
+
/**
|
|
5387
|
+
* Output shape for a draggable. Distributive over `Z` so `ticket.type`
|
|
5388
|
+
* narrowing carries `ticket.value` to the matching union member.
|
|
5389
|
+
*
|
|
5390
|
+
* @example
|
|
5391
|
+
* ```ts
|
|
5392
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5393
|
+
*
|
|
5394
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5395
|
+
*
|
|
5396
|
+
* const ticket = dnd.draggables.register({ el, type: 'card', value: card })
|
|
5397
|
+
*
|
|
5398
|
+
* ticket.isDragging.value // boolean
|
|
5399
|
+
* ticket.value // Card
|
|
5400
|
+
* ```
|
|
5401
|
+
*/
|
|
5402
|
+
type DraggableTicket<Z extends DragType = DragType> = Z extends DragType ? RegistryTicket & {
|
|
5403
|
+
type: Z['type'];
|
|
5404
|
+
value: Z['value'];
|
|
5405
|
+
el: Readonly<Ref<HTMLElement | null>>;
|
|
5406
|
+
isDragging: Readonly<Ref<boolean>>;
|
|
5407
|
+
} : never;
|
|
5408
|
+
/**
|
|
5409
|
+
* Input shape for a drop zone.
|
|
5410
|
+
*
|
|
5411
|
+
* @example
|
|
5412
|
+
* ```ts
|
|
5413
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5414
|
+
*
|
|
5415
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5416
|
+
*
|
|
5417
|
+
* dnd.zones.register({
|
|
5418
|
+
* el: listRef,
|
|
5419
|
+
* accept: ['card'],
|
|
5420
|
+
* orientation: 'vertical',
|
|
5421
|
+
* onDrop: (drag, position) => items.splice(position.index ?? 0, 0, drag.value),
|
|
5422
|
+
* })
|
|
5423
|
+
* ```
|
|
5424
|
+
*/
|
|
5425
|
+
interface DropZoneTicketInput<Z extends DragType = DragType> extends RegistryTicketInput {
|
|
5426
|
+
el: MaybeRefOrGetter<HTMLElement | null>;
|
|
5427
|
+
/** Allowed drag types or a synchronous predicate. Async predicates (Promise / thenable returns) are rejected with a warning — `accept` must return synchronously. */
|
|
5428
|
+
accept?: Z['type'][] | ((drag: ActiveDrag<Z>) => boolean);
|
|
5429
|
+
orientation?: Orientation;
|
|
5430
|
+
disabled?: MaybeRefOrGetter<boolean>;
|
|
5431
|
+
onEnter?: (drag: ActiveDrag<Z>) => void;
|
|
5432
|
+
onLeave?: (drag: ActiveDrag<Z>) => void;
|
|
5433
|
+
onBeforeDrop?: (drag: ActiveDrag<Z>, position: DropPosition) => boolean | void;
|
|
5434
|
+
onDrop?: (drag: ActiveDrag<Z>, position: DropPosition) => void;
|
|
5435
|
+
}
|
|
5436
|
+
/**
|
|
5437
|
+
* Output shape for a drop zone.
|
|
5438
|
+
*
|
|
5439
|
+
* @example
|
|
5440
|
+
* ```ts
|
|
5441
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5442
|
+
*
|
|
5443
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5444
|
+
*
|
|
5445
|
+
* const zone = dnd.zones.register({ el, accept: ['card'] })
|
|
5446
|
+
*
|
|
5447
|
+
* zone.isOver.value // boolean
|
|
5448
|
+
* zone.willAccept.value // boolean
|
|
5449
|
+
* zone.indicator.value // DropIndicator | null
|
|
5450
|
+
* ```
|
|
5451
|
+
*/
|
|
5452
|
+
interface DropZoneTicket extends RegistryTicket {
|
|
5453
|
+
el: Readonly<Ref<HTMLElement | null>>;
|
|
5454
|
+
isOver: Readonly<Ref<boolean>>;
|
|
5455
|
+
willAccept: Readonly<Ref<boolean>>;
|
|
5456
|
+
indicator: Readonly<Ref<DropIndicator | null>>;
|
|
5457
|
+
}
|
|
5458
|
+
/**
|
|
5459
|
+
* Plugin signature. Receives the public context, optionally returns a
|
|
5460
|
+
* disposer that runs on scope teardown.
|
|
5461
|
+
*
|
|
5462
|
+
* @example
|
|
5463
|
+
* ```ts
|
|
5464
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5465
|
+
* import type { DragDropPlugin } from '@vuetify/v0'
|
|
5466
|
+
*
|
|
5467
|
+
* const logDrops: DragDropPlugin = context => {
|
|
5468
|
+
* const off = context.zones.on('register:ticket', ticket => console.log('zone', ticket.id))
|
|
5469
|
+
* return () => off()
|
|
5470
|
+
* }
|
|
5471
|
+
*
|
|
5472
|
+
* const dnd = useDragDrop({ plugins: [logDrops] })
|
|
5473
|
+
* ```
|
|
5474
|
+
*/
|
|
5475
|
+
type DragDropPlugin<Z extends DragType = DragType> = (context: DragDropContext<Z>) => (() => void) | void;
|
|
5476
|
+
/**
|
|
5477
|
+
* Options accepted by {@link useDragDrop}.
|
|
5478
|
+
*
|
|
5479
|
+
* @example
|
|
5480
|
+
* ```ts
|
|
5481
|
+
* import { useDragDrop, PointerAdapter } from '@vuetify/v0'
|
|
5482
|
+
*
|
|
5483
|
+
* const dnd = useDragDrop({
|
|
5484
|
+
* adapters: [new PointerAdapter()],
|
|
5485
|
+
* onDrop: (drag, position) => console.log('drop', drag, position),
|
|
5486
|
+
* })
|
|
5487
|
+
* ```
|
|
5488
|
+
*/
|
|
5489
|
+
interface DragDropOptions<Z extends DragType = DragType> {
|
|
5490
|
+
adapters?: DragDropAdapter<Z>[];
|
|
5491
|
+
plugins?: DragDropPlugin<Z>[];
|
|
5492
|
+
onBeforeStart?: (drag: ActiveDrag<Z>) => boolean | void;
|
|
5493
|
+
onMove?: (drag: ActiveDrag<Z>) => void;
|
|
5494
|
+
onBeforeDrop?: (drag: ActiveDrag<Z>, position: DropPosition) => boolean | void;
|
|
5495
|
+
onDrop?: (drag: ActiveDrag<Z>, position: DropPosition) => void;
|
|
5496
|
+
onCancel?: (drag: ActiveDrag<Z>, reason: 'cancel' | 'reject') => void;
|
|
5497
|
+
}
|
|
5498
|
+
/**
|
|
5499
|
+
* Registry context for draggable tickets, returned as `dnd.draggables`
|
|
5500
|
+
* from {@link useDragDrop}.
|
|
5501
|
+
*
|
|
5502
|
+
* @example
|
|
5503
|
+
* ```ts
|
|
5504
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5505
|
+
*
|
|
5506
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5507
|
+
*
|
|
5508
|
+
* const ticket = dnd.draggables.register({ el, type: 'card', value: card })
|
|
5509
|
+
* ```
|
|
5510
|
+
*/
|
|
5511
|
+
interface DraggablesContext<Z extends DragType = DragType> extends Omit<RegistryContext<DraggableTicketInput<Z>, DraggableTicketInput<Z> & DraggableTicket<Z>>, 'register'> {
|
|
5512
|
+
register: (registration: DraggableTicketInput<Z>) => DraggableTicket<Z>;
|
|
5513
|
+
}
|
|
5514
|
+
/**
|
|
5515
|
+
* Registry context for drop zones, returned as `dnd.zones`
|
|
5516
|
+
* from {@link useDragDrop}.
|
|
5517
|
+
*
|
|
5518
|
+
* @example
|
|
5519
|
+
* ```ts
|
|
5520
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5521
|
+
*
|
|
5522
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5523
|
+
*
|
|
5524
|
+
* const zone = dnd.zones.register({ el, accept: ['card'] })
|
|
5525
|
+
* ```
|
|
5526
|
+
*/
|
|
5527
|
+
interface ZonesContext<Z extends DragType = DragType> extends Omit<RegistryContext<DropZoneTicketInput<Z>, DropZoneTicketInput<Z> & DropZoneTicket>, 'register'> {
|
|
5528
|
+
register: (registration: DropZoneTicketInput<Z>) => DropZoneTicket;
|
|
5529
|
+
}
|
|
5530
|
+
/**
|
|
5531
|
+
* Public context returned by {@link useDragDrop}.
|
|
5532
|
+
*
|
|
5533
|
+
* @example
|
|
5534
|
+
* ```ts
|
|
5535
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5536
|
+
*
|
|
5537
|
+
* const dnd = useDragDrop<{ type: 'card', value: Card }>()
|
|
5538
|
+
*
|
|
5539
|
+
* dnd.active.value // ActiveDrag<{ type: 'card', value: Card }> | null
|
|
5540
|
+
* dnd.isDragging.value // boolean
|
|
5541
|
+
* dnd.cancel() // programmatic cancel
|
|
5542
|
+
* ```
|
|
5543
|
+
*/
|
|
5544
|
+
interface DragDropContext<Z extends DragType = DragType> {
|
|
5545
|
+
draggables: DraggablesContext<Z>;
|
|
5546
|
+
zones: ZonesContext<Z>;
|
|
5547
|
+
active: Readonly<ShallowRef<ActiveDrag<Z> | null>>;
|
|
5548
|
+
isDragging: Readonly<Ref<boolean>>;
|
|
5549
|
+
cancel: () => void;
|
|
5550
|
+
}
|
|
5551
|
+
/**
|
|
5552
|
+
* Create a headless drag-and-drop context.
|
|
5553
|
+
*
|
|
5554
|
+
* @param options - Adapters, plugins, and lifecycle hooks. All optional.
|
|
5555
|
+
* @returns A `DragDropContext<Z>` exposing `draggables` / `zones` registries,
|
|
5556
|
+
* the `active` drag, the `isDragging` boolean, and a programmatic `cancel()`.
|
|
5557
|
+
*
|
|
5558
|
+
* @see https://0.vuetifyjs.com/composables/system/use-drag-drop
|
|
5559
|
+
*
|
|
5560
|
+
* @example
|
|
5561
|
+
* ```ts
|
|
5562
|
+
* import { useDragDrop } from '@vuetify/v0'
|
|
5563
|
+
* import { useTemplateRef } from 'vue'
|
|
5564
|
+
*
|
|
5565
|
+
* const dnd = useDragDrop<{ type: 'card', value: string }>()
|
|
5566
|
+
*
|
|
5567
|
+
* const draggable = useTemplateRef<HTMLElement>('draggable')
|
|
5568
|
+
* const dropzone = useTemplateRef<HTMLElement>('dropzone')
|
|
5569
|
+
*
|
|
5570
|
+
* dnd.draggables.register({ el: draggable, type: 'card', value: 'card-1' })
|
|
5571
|
+
* dnd.zones.register({
|
|
5572
|
+
* el: dropzone,
|
|
5573
|
+
* accept: ['card'],
|
|
5574
|
+
* onDrop: (drag, position) => console.log(drag.value, position.index),
|
|
5575
|
+
* })
|
|
5576
|
+
* ```
|
|
5577
|
+
*/
|
|
5578
|
+
declare function useDragDrop<Z extends DragType = DragType>(options?: DragDropOptions<Z>): DragDropContext<Z>;
|
|
5579
|
+
//#endregion
|
|
4482
5580
|
//#region src/composables/useEventListener/index.d.ts
|
|
4483
5581
|
type CleanupFunction = () => void;
|
|
4484
5582
|
type EventHandler<E = Event> = (event: E) => void;
|
|
@@ -4605,7 +5703,7 @@ interface FeaturePluginOptions extends FeatureContextOptions {
|
|
|
4605
5703
|
*
|
|
4606
5704
|
* @remarks Adapters provide dynamic flag values from external services.
|
|
4607
5705
|
*/
|
|
4608
|
-
adapter?: MaybeArray<
|
|
5706
|
+
adapter?: MaybeArray<FeaturesAdapter>;
|
|
4609
5707
|
}
|
|
4610
5708
|
/**
|
|
4611
5709
|
* Creates a new features instance.
|
|
@@ -5271,6 +6369,14 @@ interface UseMutationObserverReturn extends ObserverReturn {}
|
|
|
5271
6369
|
*/
|
|
5272
6370
|
declare function useMutationObserver(target: MaybeElementRef, callback: (entries: MutationObserverRecord[]) => void, options?: UseMutationObserverOptions): UseMutationObserverReturn;
|
|
5273
6371
|
//#endregion
|
|
6372
|
+
//#region src/composables/useNotifications/adapters/adapter.d.ts
|
|
6373
|
+
declare abstract class NotificationsAdapter<Z extends NotificationInput = NotificationInput, E extends NotificationTicket<Z> = NotificationTicket<Z>> {
|
|
6374
|
+
/** Called once when the plugin installs. Wire inbound/outbound sync here. */
|
|
6375
|
+
abstract setup(context: NotificationsAdapterContext<Z, E>): void;
|
|
6376
|
+
/** Called on app unmount. Tear down listeners and connections. */
|
|
6377
|
+
dispose?(): void;
|
|
6378
|
+
}
|
|
6379
|
+
//#endregion
|
|
5274
6380
|
//#region src/composables/useNotifications/index.d.ts
|
|
5275
6381
|
/** Notification urgency level. Maps to ARIA roles: `'error'`/`'warning'` → `role="alert"`, `'info'`/`'success'` → `role="status"`. Extensible — custom values like `'critical'` are allowed with autocomplete for defaults. */
|
|
5276
6382
|
type NotificationSeverity = Extensible<'info' | 'warning' | 'error' | 'success'>;
|
|
@@ -5315,22 +6421,11 @@ interface NotificationsAdapterContext<Z extends NotificationInput = Notification
|
|
|
5315
6421
|
send: (input: Z) => E;
|
|
5316
6422
|
/** Create a notification in registry only (no toast). Use for initial/historical items. */
|
|
5317
6423
|
register: (input: Z) => E;
|
|
5318
|
-
/** Subscribe to notification lifecycle events (e.g., `'notification:read'`). */
|
|
6424
|
+
/** Subscribe to notification lifecycle events (e.g., `'notification:read'`). The handler receives the affected {@link NotificationTicket}. */
|
|
5319
6425
|
on: (event: string, handler: (data: unknown) => void) => void;
|
|
5320
6426
|
/** Unsubscribe from a lifecycle event. */
|
|
5321
6427
|
off: (event: string, handler: (data: unknown) => void) => void;
|
|
5322
6428
|
}
|
|
5323
|
-
/**
|
|
5324
|
-
* Adapter interface for bridging external notification services.
|
|
5325
|
-
* Adapters receive an {@link NotificationsAdapterContext} on setup
|
|
5326
|
-
* and optionally clean up on dispose.
|
|
5327
|
-
*/
|
|
5328
|
-
interface NotificationsAdapterInterface<Z extends NotificationInput = NotificationInput, E extends NotificationTicket<Z> = NotificationTicket<Z>> {
|
|
5329
|
-
/** Called once when the plugin installs. Wire inbound/outbound sync here. */
|
|
5330
|
-
setup: (context: NotificationsAdapterContext<Z, E>) => void;
|
|
5331
|
-
/** Called on app unmount. Tear down listeners and connections. */
|
|
5332
|
-
dispose?: () => void;
|
|
5333
|
-
}
|
|
5334
6429
|
/** Options for {@link createNotifications}. */
|
|
5335
6430
|
interface NotificationsOptions extends RegistryOptions {
|
|
5336
6431
|
/** Default auto-dismiss timeout in ms for the toast queue. @default 3000 */
|
|
@@ -5364,7 +6459,7 @@ interface NotificationsContext<Z extends NotificationInput = NotificationInput,
|
|
|
5364
6459
|
declare function createNotifications(options?: NotificationsOptions): NotificationsContext;
|
|
5365
6460
|
interface NotificationsPluginOptions extends NotificationsOptions {
|
|
5366
6461
|
namespace?: string;
|
|
5367
|
-
adapter?:
|
|
6462
|
+
adapter?: NotificationsAdapter;
|
|
5368
6463
|
}
|
|
5369
6464
|
/**
|
|
5370
6465
|
* Notification management with registry, event system, and optional adapters.
|
|
@@ -5386,15 +6481,12 @@ interface NotificationsPluginOptions extends NotificationsOptions {
|
|
|
5386
6481
|
declare const createNotificationsContext: <_E extends NotificationsContext<NotificationInput, NotificationTicket<NotificationInput>> = NotificationsContext<NotificationInput, NotificationTicket<NotificationInput>>>(_options?: NotificationsPluginOptions | undefined) => ContextTrinity<_E>, createNotificationsPlugin: (_options?: NotificationsPluginOptions | undefined) => Plugin, useNotifications: <_E extends NotificationsContext<NotificationInput, NotificationTicket<NotificationInput>> = NotificationsContext<NotificationInput, NotificationTicket<NotificationInput>>>(namespace?: string) => _E;
|
|
5387
6482
|
//#endregion
|
|
5388
6483
|
//#region src/composables/usePermissions/adapters/adapter.d.ts
|
|
5389
|
-
|
|
5390
|
-
can: <Z extends PermissionTicket = PermissionTicket>(role: ID, action: string, subject: string, context: Record<string, unknown>, permissions: PermissionContext<Z>) => boolean;
|
|
5391
|
-
}
|
|
5392
|
-
declare abstract class PermissionAdapter implements PermissionAdapterInterface {
|
|
6484
|
+
declare abstract class PermissionsAdapter {
|
|
5393
6485
|
abstract can<Z extends PermissionTicket = PermissionTicket>(role: ID, action: string, subject: string, context: Record<string, unknown>, permissions: PermissionContext<Z>): boolean;
|
|
5394
6486
|
}
|
|
5395
6487
|
//#endregion
|
|
5396
6488
|
//#region src/composables/usePermissions/adapters/v0.d.ts
|
|
5397
|
-
declare class
|
|
6489
|
+
declare class V0PermissionsAdapter extends PermissionsAdapter {
|
|
5398
6490
|
constructor();
|
|
5399
6491
|
can<Z extends PermissionTicket = PermissionTicket>(role: ID, action: string, subject: string, context: Record<string, unknown>, permissions: PermissionContext<Z>): boolean;
|
|
5400
6492
|
}
|
|
@@ -5405,7 +6497,7 @@ interface PermissionContext<Z extends PermissionTicket = PermissionTicket> exten
|
|
|
5405
6497
|
can: (id: ID, action: string, subject: string, context?: Record<string, unknown>) => boolean;
|
|
5406
6498
|
}
|
|
5407
6499
|
interface PermissionOptions extends TokenOptions {
|
|
5408
|
-
adapter?:
|
|
6500
|
+
adapter?: PermissionsAdapter;
|
|
5409
6501
|
permissions?: Record<ID, [string | string[], string | string[], (boolean | ((context: Record<string, unknown>) => boolean))?][]>;
|
|
5410
6502
|
}
|
|
5411
6503
|
interface PermissionContextOptions extends PermissionOptions {
|
|
@@ -5747,12 +6839,12 @@ interface RtlAdapterSetupContext {
|
|
|
5747
6839
|
isRtl: Ref<boolean>;
|
|
5748
6840
|
toggle: () => void;
|
|
5749
6841
|
}
|
|
5750
|
-
|
|
5751
|
-
setup
|
|
6842
|
+
declare abstract class RtlAdapter {
|
|
6843
|
+
abstract setup<T extends RtlAdapterSetupContext>(app: App, context: T, target?: string | HTMLElement | null): void;
|
|
5752
6844
|
}
|
|
5753
6845
|
//#endregion
|
|
5754
6846
|
//#region src/composables/useRtl/adapters/v0.d.ts
|
|
5755
|
-
declare class
|
|
6847
|
+
declare class V0RtlAdapter extends RtlAdapter {
|
|
5756
6848
|
setup<T extends RtlAdapterSetupContext>(app: App, context: T, target?: string | HTMLElement | null): void;
|
|
5757
6849
|
}
|
|
5758
6850
|
//#endregion
|
|
@@ -6032,7 +7124,7 @@ interface StorageContext {
|
|
|
6032
7124
|
clear: () => void;
|
|
6033
7125
|
}
|
|
6034
7126
|
interface StorageOptions {
|
|
6035
|
-
/** The storage adapter to use. Defaults to localStorage in browser,
|
|
7127
|
+
/** The storage adapter to use. Defaults to localStorage in browser, MemoryStorageAdapter otherwise */
|
|
6036
7128
|
adapter?: StorageAdapter;
|
|
6037
7129
|
/** The prefix to use for all storage keys. Defaults to 'v0:' */
|
|
6038
7130
|
prefix?: string;
|
|
@@ -6082,11 +7174,7 @@ interface ThemeAdapterSetupContext {
|
|
|
6082
7174
|
selectedId: Ref<ID | null | undefined>;
|
|
6083
7175
|
isDark: Readonly<Ref<boolean>>;
|
|
6084
7176
|
}
|
|
6085
|
-
|
|
6086
|
-
setup: <T extends ThemeAdapterSetupContext>(app: App, context: T, target?: string | HTMLElement | null) => void;
|
|
6087
|
-
update: (colors: Record<string, Colors>, isDark?: boolean) => void;
|
|
6088
|
-
}
|
|
6089
|
-
declare abstract class ThemeAdapter implements ThemeAdapterInterface {
|
|
7177
|
+
declare abstract class ThemeAdapter {
|
|
6090
7178
|
private static UNSAFE_CSS;
|
|
6091
7179
|
private static SAFE_IDENT;
|
|
6092
7180
|
stylesheetId: string;
|
|
@@ -6486,4 +7574,4 @@ interface ToggleScopeControls {
|
|
|
6486
7574
|
*/
|
|
6487
7575
|
declare function useToggleScope(source: WatchSource<boolean>, fn: (() => void) | ((controls: ToggleScopeControls) => void)): ToggleScopeControls;
|
|
6488
7576
|
//#endregion
|
|
6489
|
-
export {
|
|
7577
|
+
export { RtlAdapterSetupContext as $, ValidationOptions as $a, createProgressContext as $i, useFeatures as $n, OverflowContextOptions as $o, createBreakpointsPlugin as $r, usePrefersDark as $t, createStoragePlugin as A, SortableContext as Aa, createSlider as Ai, useIntersectionObserver as An, useCombobox as Ao, UseDelayStartOptions as Ar, UseImageReturn as As, usePermissions as At, createStackPlugin as B, createInput as Ba, QueueContextOptions as Bi, PlatformContext as Bn, useVirtualFocus as Bo, ClickOutsideElement as Br, ModelContext as Bs, createNotifications as Bt, ThemeAdapter as C, KanbanColumnTicket as Ca, TimelineTicket as Ci, LazyOptions as Cn, createContext as Co, PointerAdapter as Cr, SingleTicket as Cs, PermissionContextOptions as Ct, StoragePluginOptions as D, KanbanOptions as Da, SliderContext as Di, UseElementIntersectionReturn as Dn, ComboboxOptions as Do, DragDropAdapterEmit as Dr, useSingle as Ds, createPermissions as Dt, StorageOptions as E, KanbanEventListener as Ea, useTimeline as Ei, IntersectionObserverOptions as En, ComboboxContext as Eo, DragDropAdapterContext as Er, createSingleContext as Es, PermissionTicket as Et, StackPluginOptions as F, SortableTicketInput as Fa, RatingOptions as Fi, createFallbackHydration as Fn, ComboboxAdapterContext as Fo, DatePluginOptions as Fr, SelectionTicket as Fs, NotificationTicket as Ft, RtlPluginOptions as G, FormTicketInput as Ga, createQueueContext as Gi, FeatureContextOptions as Gn, StepContextOptions as Go, useClickOutside as Gr, MutationObserverRecord as Gt, RtlContext as H, FormContextOptions as Ha, QueueTicket as Hi, UseHotkeyReturn as Hn, PopoverReturn as Ho, ClickOutsideTarget as Hr, ModelTicket as Hs, createNotificationsPlugin as Ht, StackTicket as I, createSortable as Ia, createRating as Ii, createHydration as In, ComboboxAdapterResult as Io, createDate as Ir, SelectionTicketInput as Is, NotificationsAdapterContext as It, createRtlFallback as J, FormValue as Ja, ProgressContextOptions as Ji, FeatureTicket as Jn, StepTicketInput as Jo, BreakpointsContextOptions as Jr, UseMutationObserverReturn as Jt, createRtl as K, FormValidationResult as Ka, useQueue as Ki, FeatureOptions as Kn, StepOptions as Ko, BreakpointName as Kr, ObservableNodeList as Kt, StackTicketInput as L, InputContext as La, createRatingContext as Li, createHydrationContext as Ln, VirtualFocusItem as Lo, createDateContext as Lr, createSelection as Ls, NotificationsContext as Lt, StackContext as M, SortableMovePayload as Ma, RatingContextOptions as Mi, HydrationContextOptions as Mn, ClientComboboxAdapter as Mo, DateContext as Mr, SelectionContext as Ms, PermissionsAdapter as Mt, StackContextOptions as N, SortableOptions as Na, RatingItemDescriptor as Ni, HydrationOptions as Nn, ClientComboboxAdapterOptions as No, DateContextOptions as Nr, SelectionContextOptions as Ns, NotificationInput as Nt, createStorage as O, KanbanTransferPayload as Oa, SliderOptions as Oi, UseIntersectionObserverReturn as On, createCombobox as Oo, UseDelayOptions as Or, ImageStatus as Os, createPermissionsContext as Ot, StackOptions as P, SortableTicket as Pa, RatingItemState as Pi, HydrationPluginOptions as Pn, ComboboxAdapter as Po, DateOptions as Pr, SelectionOptions as Ps, NotificationSeverity as Pt, RtlAdapter as Q, ValidationContext as Qa, createProgress as Qi, createFeaturesPlugin as Qn, OverflowContext as Qo, createBreakpointsContext as Qr, usePrefersContrast as Qt, createStack as R, InputOptions as Ra, useRating as Ri, createHydrationPlugin as Rn, VirtualFocusOptions as Ro, createDatePlugin as Rr, createSelectionContext as Rs, NotificationsOptions as Rt, Vuetify0ThemeOptions as S, NestedTicketInput as Sa, TimelineOptions as Si, LazyContext as Sn, CreateContextOptions as So, KeyboardAdapterOptions as Sr, SingleOptions as Ss, PermissionContext as St, StorageContextOptions as T, KanbanContext as Ta, createTimelineContext as Ti, IntersectionObserverEntry as Tn, useContext as To, DragDropAdapter as Tr, createSingle as Ts, PermissionPluginOptions as Tt, RtlContextOptions as U, FormOptions as Ua, QueueTicketInput as Ui, useHotkey as Un, usePopover as Uo, UseClickOutsideOptions as Ur, ModelTicketInput as Us, useNotifications as Ut, useStack as V, FormContext as Va, QueueOptions as Vi, UseHotkeyOptions as Vn, PopoverOptions as Vo, ClickOutsideIgnoreTarget as Vr, ModelOptions as Vs, createNotificationsContext as Vt, RtlOptions as W, FormTicket as Wa, createQueue as Wi, FeatureContext as Wn, StepContext as Wo, UseClickOutsideReturn as Wr, createModel as Ws, NotificationsAdapter as Wt, useRtl as X, createFormContext as Xa, ProgressTicket as Xi, createFeatures as Xn, createStepContext as Xo, BreakpointsPluginOptions as Xr, MediaQueryContext as Xt, createRtlPlugin as Y, createForm as Ya, ProgressOptions as Yi, FeatureTicketInput as Yn, createStep as Yo, BreakpointsOptions as Yr, useMutationObserver as Yt, V0RtlAdapter as Z, useForm as Za, ProgressTicketInput as Zi, createFeaturesContext as Zn, useStep as Zo, createBreakpoints as Zr, useMediaQuery as Zt, createThemePlugin as _, NestedOpenMode as _a, createVirtual as _i, createLocale as _n, PluginContextConfig as _o, DropZoneTicketInput as _r, createBreadcrumbs as _s, useProxyModel as _t, useTimer as a, NumberFieldContext as aa, toHighlight as ai, createLogger as an, RuleInput as ao, ActiveDrag as ar, GroupContextOptions as as, ResizeObserverOptions as at, V0UnheadThemeOptions as b, NestedSelectionMode as ba, TimelineContext as bi, createLocalePlugin as bn, createPluginContext as bo, useDragDrop as br, SingleContext as bs, UsePresenceReturn as bt, ThemeContext as c, NumericContext as ca, toArray as ci, useLogger as cn, RulesOptions as co, DragDropPlugin as cr, GroupTicketInput as cs, useElementSize as ct, ThemePluginOptions as d, createNested as da, VirtualContext as di, LocaleContextOptions as dn, createRulesFallback as do, DraggableTicket as dr, useGroup as ds, useRaf as dt, useProgress as ea, useBreakpoints as ei, usePrefersReducedMotion as en, ValidationTicket as eo, CleanupFunction as er, OverflowOptions as es, RovingFocusOptions as et, ThemeRecord as f, createNestedContext as fa, VirtualContextOptions as fi, LocaleOptions as fn, createRulesPlugin as fo, DraggableTicketInput as fr, BreadcrumbTicket as fs, ProxyRegistryContext as ft, createThemeContext as g, NestedContextOptions as ga, VirtualState as gi, LocaleTicketInput as gn, Plugin as go, DropZoneTicket as gr, BreadcrumbsOptions as gs, ProxyModelTarget as gt, createTheme as h, NestedContext as ha, VirtualOptions as hi, LocaleTicket as hn, isStandardSchema as ho, DropPosition as hr, BreadcrumbsContextOptions as hs, ProxyModelOptions as ht, TimerOptions as i, createOtp as ia, ToHighlightOptions as ii, LoggerPluginOptions as in, RuleAliases as io, useWindowEventListener as ir, GroupContext as is, ResizeObserverEntry as it, useStorage as j, SortableEventListener as ja, RatingContext as ji, HydrationContext as jn, ServerComboboxAdapter as jo, useDelay as jr, useImage as js, V0PermissionsAdapter as jt, createStorageContext as k, createKanban as ka, SliderTicketInput as ki, useElementIntersection as kn, createComboboxContext as ko, UseDelayReturn as kr, UseImageOptions as ks, createPermissionsPlugin as kt, ThemeContextOptions as l, NumericOptions as la, ScrollToOptions as li, LogLevel as ln, createRules as lo, DragType as lr, createGroup as ls, useResizeObserver as lt, ThemeTicketInput as m, NestedActiveMode as ma, VirtualItem as mi, LocaleRecord as mn, StandardSchemaV1 as mo, DropIndicator as mr, BreadcrumbsContext as ms, useProxyRegistry as mt, useToggleScope as n, OtpOptions as na, HighlightChunk as ni, LoggerContextOptions as nn, createValidation as no, useDocumentEventListener as nr, createOverflowContext as ns, RovingItem as nt, Colors as o, NumberFieldOptions as oa, MaybeElementRef as oi, createLoggerContext as on, RulesContext as oo, DragDropContext as or, GroupOptions as os, UseElementSizeReturn as ot, ThemeTicket as p, useNested as pa, VirtualDirection as pi, LocalePluginOptions as pn, useRules as po, DraggablesContext as pr, BreadcrumbTicketInput as ps, ProxyRegistryOptions as pt, createRtlContext as q, FormValidationRule as qa, ProgressContext as qi, FeaturePluginOptions as qn, StepTicket as qo, BreakpointsContext as qr, UseMutationObserverOptions as qt, TimerContext as r, OtpPattern as ra, MatchRange as ri, LoggerOptions as rn, RuleAlias as ro, useEventListener as rr, useOverflow as rs, useRovingFocus as rt, ThemeColors as s, createNumberField as sa, toElement as si, createLoggerPlugin as sn, RulesContextOptions as so, DragDropOptions as sr, GroupTicket as ss, UseResizeObserverReturn as st, ToggleScopeControls as t, OtpContext as ta, toReactive as ti, LoggerContext as tn, ValidationTicketInput as to, EventHandler as tr, createOverflow as ts, RovingFocusReturn as tt, ThemeOptions as u, createNumeric as ua, VirtualAnchor as ui, LocaleContext as un, createRulesContext as uo, DragVia as ur, createGroupContext as us, UseRafReturn as ut, useTheme as v, NestedOptions as va, createVirtualContext as vi, createLocaleContext as vn, PluginOptions as vo, Orientation as vr, createBreadcrumbsContext as vs, PresenceState as vt, StorageContext as w, KanbanColumnTicketInput as wa, createTimeline as wi, useLazy as wn, provideContext as wo, PointerAdapterOptions as wr, SingleTicketInput as ws, PermissionOptions as wt, V0StyleSheetThemeAdapter as x, NestedTicket as xa, TimelineContextOptions as xi, useLocale as xn, ContextKey as xo, KeyboardAdapter as xr, SingleContextOptions as xs, usePresence as xt, V0UnheadThemeAdapter as y, NestedRegistration as ya, useVirtual as yi, createLocaleFallback as yn, createPlugin as yo, ZonesContext as yr, useBreadcrumbs as ys, UsePresenceOptions as yt, createStackContext as z, InputState as za, QueueContext as zi, useHydration as zn, VirtualFocusReturn as zo, useDate as zr, useSelection as zs, NotificationsPluginOptions as zt };
|