@vui-rs/ui 0.1.0
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 +31 -0
- package/dist/index.d.ts +765 -0
- package/dist/index.js +1174 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import { PropType, Ref } from "@vue/runtime-core";
|
|
2
|
+
import { DispatchableEvent, SPINNER_PRESETS, SpinnerPreset, SpinnerPreset as SpinnerPreset$1, VuiSpinner } from "@vui-rs/vue";
|
|
3
|
+
|
|
4
|
+
//#region src/fuzzy.d.ts
|
|
5
|
+
/** A successful fuzzy match: a relevance score (higher is better) + matched char positions. */
|
|
6
|
+
interface FuzzyMatch {
|
|
7
|
+
score: number;
|
|
8
|
+
indices: number[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Greedy left-to-right subsequence match. Returns `null` when `query` is not a
|
|
12
|
+
* subsequence of `text`. An empty query matches everything with score 0 (so an
|
|
13
|
+
* empty search box shows the full list in its original order).
|
|
14
|
+
*/
|
|
15
|
+
declare function fuzzyMatch(query: string, text: string): FuzzyMatch | null;
|
|
16
|
+
/** An item ranked by `fuzzyFilter`: the original item plus its match metadata. */
|
|
17
|
+
interface FuzzyRanked<T> {
|
|
18
|
+
item: T;
|
|
19
|
+
score: number;
|
|
20
|
+
indices: number[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Filter + rank `items` against `query` by the text `key` returns for each item.
|
|
24
|
+
* Non-matches are dropped; the rest come back best-score first. Ties keep the
|
|
25
|
+
* original order (the sort is stable), so an empty query is an identity filter.
|
|
26
|
+
*/
|
|
27
|
+
declare function fuzzyFilter<T>(query: string, items: readonly T[], key: (item: T) => string): Array<FuzzyRanked<T>>;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/use-focus-trap.d.ts
|
|
30
|
+
/**
|
|
31
|
+
* Capture/restore focus around a modal's open state. Pass a reactive getter for
|
|
32
|
+
* whether the modal is open; when it flips false (or the component unmounts) the
|
|
33
|
+
* previously focused node is re-focused.
|
|
34
|
+
*/
|
|
35
|
+
declare function useFocusTrap(isOpen: () => boolean): void;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/dialog.d.ts
|
|
38
|
+
type DialogSize = 'small' | 'medium' | 'large' | 'xlarge';
|
|
39
|
+
declare const VuiDialog: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
40
|
+
/** v-model: whether the dialog is open. */open: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
title: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
default: string;
|
|
47
|
+
};
|
|
48
|
+
size: {
|
|
49
|
+
type: PropType<DialogSize>;
|
|
50
|
+
default: string;
|
|
51
|
+
}; /** Backdrop dim strength (0..1 brightness multiplier); `false` for none. */
|
|
52
|
+
backdrop: {
|
|
53
|
+
type: PropType<number | boolean>;
|
|
54
|
+
default: number;
|
|
55
|
+
}; /** Esc closes the dialog (emits `update:open=false` + `close`). */
|
|
56
|
+
closeOnEsc: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Auto-focus the panel itself on open. Default `true` for plain content
|
|
62
|
+
* dialogs (so they receive Esc). Variants with their own focusable control
|
|
63
|
+
* (select, input, buttons) pass `false` and focus that control instead; Esc
|
|
64
|
+
* still bubbles up to the panel's handler from the focused child.
|
|
65
|
+
*/
|
|
66
|
+
autofocus: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
}; /** Override the panel width (columns); defaults to the `size` preset. */
|
|
70
|
+
width: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: undefined;
|
|
73
|
+
};
|
|
74
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}> | null, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "update:open")[], "close" | "update:open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
77
|
+
/** v-model: whether the dialog is open. */open: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
title: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
default: string;
|
|
84
|
+
};
|
|
85
|
+
size: {
|
|
86
|
+
type: PropType<DialogSize>;
|
|
87
|
+
default: string;
|
|
88
|
+
}; /** Backdrop dim strength (0..1 brightness multiplier); `false` for none. */
|
|
89
|
+
backdrop: {
|
|
90
|
+
type: PropType<number | boolean>;
|
|
91
|
+
default: number;
|
|
92
|
+
}; /** Esc closes the dialog (emits `update:open=false` + `close`). */
|
|
93
|
+
closeOnEsc: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: boolean;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Auto-focus the panel itself on open. Default `true` for plain content
|
|
99
|
+
* dialogs (so they receive Esc). Variants with their own focusable control
|
|
100
|
+
* (select, input, buttons) pass `false` and focus that control instead; Esc
|
|
101
|
+
* still bubbles up to the panel's handler from the focused child.
|
|
102
|
+
*/
|
|
103
|
+
autofocus: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: boolean;
|
|
106
|
+
}; /** Override the panel width (columns); defaults to the `size` preset. */
|
|
107
|
+
width: {
|
|
108
|
+
type: NumberConstructor;
|
|
109
|
+
default: undefined;
|
|
110
|
+
};
|
|
111
|
+
}>> & Readonly<{
|
|
112
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
}>, {
|
|
115
|
+
title: string;
|
|
116
|
+
width: number;
|
|
117
|
+
size: DialogSize;
|
|
118
|
+
open: boolean;
|
|
119
|
+
backdrop: number | boolean;
|
|
120
|
+
closeOnEsc: boolean;
|
|
121
|
+
autofocus: boolean;
|
|
122
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/dialog-select.d.ts
|
|
125
|
+
interface SelectOption {
|
|
126
|
+
label: string;
|
|
127
|
+
value: string | number;
|
|
128
|
+
group?: string;
|
|
129
|
+
hint?: string;
|
|
130
|
+
}
|
|
131
|
+
type OptionInput = SelectOption | string;
|
|
132
|
+
declare const VuiDialogSelect: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
133
|
+
open: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: boolean;
|
|
136
|
+
};
|
|
137
|
+
title: {
|
|
138
|
+
type: StringConstructor;
|
|
139
|
+
default: string;
|
|
140
|
+
};
|
|
141
|
+
items: {
|
|
142
|
+
type: PropType<OptionInput[]>;
|
|
143
|
+
default: () => never[];
|
|
144
|
+
};
|
|
145
|
+
placeholder: {
|
|
146
|
+
type: StringConstructor;
|
|
147
|
+
default: string;
|
|
148
|
+
}; /** Max rows of the scrolling list viewport. */
|
|
149
|
+
maxRows: {
|
|
150
|
+
type: NumberConstructor;
|
|
151
|
+
default: number;
|
|
152
|
+
};
|
|
153
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
154
|
+
[key: string]: any;
|
|
155
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("select" | "close" | "update:open")[], "select" | "close" | "update:open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
156
|
+
open: {
|
|
157
|
+
type: BooleanConstructor;
|
|
158
|
+
default: boolean;
|
|
159
|
+
};
|
|
160
|
+
title: {
|
|
161
|
+
type: StringConstructor;
|
|
162
|
+
default: string;
|
|
163
|
+
};
|
|
164
|
+
items: {
|
|
165
|
+
type: PropType<OptionInput[]>;
|
|
166
|
+
default: () => never[];
|
|
167
|
+
};
|
|
168
|
+
placeholder: {
|
|
169
|
+
type: StringConstructor;
|
|
170
|
+
default: string;
|
|
171
|
+
}; /** Max rows of the scrolling list viewport. */
|
|
172
|
+
maxRows: {
|
|
173
|
+
type: NumberConstructor;
|
|
174
|
+
default: number;
|
|
175
|
+
};
|
|
176
|
+
}>> & Readonly<{
|
|
177
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
178
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
179
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
180
|
+
}>, {
|
|
181
|
+
title: string;
|
|
182
|
+
open: boolean;
|
|
183
|
+
items: OptionInput[];
|
|
184
|
+
placeholder: string;
|
|
185
|
+
maxRows: number;
|
|
186
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
187
|
+
//#endregion
|
|
188
|
+
//#region src/dialog-prompt.d.ts
|
|
189
|
+
declare const VuiDialogPrompt: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
190
|
+
open: {
|
|
191
|
+
type: BooleanConstructor;
|
|
192
|
+
default: boolean;
|
|
193
|
+
};
|
|
194
|
+
title: {
|
|
195
|
+
type: StringConstructor;
|
|
196
|
+
default: string;
|
|
197
|
+
};
|
|
198
|
+
message: {
|
|
199
|
+
type: StringConstructor;
|
|
200
|
+
default: string;
|
|
201
|
+
}; /** Initial / v-model text value. */
|
|
202
|
+
modelValue: {
|
|
203
|
+
type: StringConstructor;
|
|
204
|
+
default: string;
|
|
205
|
+
};
|
|
206
|
+
placeholder: {
|
|
207
|
+
type: StringConstructor;
|
|
208
|
+
default: string;
|
|
209
|
+
}; /** Returns an error message to block submit, or null/empty to allow it. */
|
|
210
|
+
validate: {
|
|
211
|
+
type: PropType<(v: string) => string | null>;
|
|
212
|
+
default: undefined;
|
|
213
|
+
};
|
|
214
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
215
|
+
[key: string]: any;
|
|
216
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "submit" | "update:open" | "update:modelValue")[], "close" | "submit" | "update:open" | "update:modelValue", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
217
|
+
open: {
|
|
218
|
+
type: BooleanConstructor;
|
|
219
|
+
default: boolean;
|
|
220
|
+
};
|
|
221
|
+
title: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
default: string;
|
|
224
|
+
};
|
|
225
|
+
message: {
|
|
226
|
+
type: StringConstructor;
|
|
227
|
+
default: string;
|
|
228
|
+
}; /** Initial / v-model text value. */
|
|
229
|
+
modelValue: {
|
|
230
|
+
type: StringConstructor;
|
|
231
|
+
default: string;
|
|
232
|
+
};
|
|
233
|
+
placeholder: {
|
|
234
|
+
type: StringConstructor;
|
|
235
|
+
default: string;
|
|
236
|
+
}; /** Returns an error message to block submit, or null/empty to allow it. */
|
|
237
|
+
validate: {
|
|
238
|
+
type: PropType<(v: string) => string | null>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
}>> & Readonly<{
|
|
242
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
243
|
+
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
244
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
245
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
246
|
+
}>, {
|
|
247
|
+
title: string;
|
|
248
|
+
open: boolean;
|
|
249
|
+
placeholder: string;
|
|
250
|
+
modelValue: string;
|
|
251
|
+
message: string;
|
|
252
|
+
validate: (v: string) => string | null;
|
|
253
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
254
|
+
//#endregion
|
|
255
|
+
//#region src/dialog-confirm.d.ts
|
|
256
|
+
declare const VuiDialogConfirm: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
257
|
+
open: {
|
|
258
|
+
type: BooleanConstructor;
|
|
259
|
+
default: boolean;
|
|
260
|
+
};
|
|
261
|
+
title: {
|
|
262
|
+
type: StringConstructor;
|
|
263
|
+
default: string;
|
|
264
|
+
};
|
|
265
|
+
message: {
|
|
266
|
+
type: StringConstructor;
|
|
267
|
+
default: string;
|
|
268
|
+
};
|
|
269
|
+
confirmLabel: {
|
|
270
|
+
type: StringConstructor;
|
|
271
|
+
default: string;
|
|
272
|
+
};
|
|
273
|
+
cancelLabel: {
|
|
274
|
+
type: StringConstructor;
|
|
275
|
+
default: string;
|
|
276
|
+
}; /** Which choice is highlighted when the dialog opens. */
|
|
277
|
+
defaultConfirm: {
|
|
278
|
+
type: BooleanConstructor;
|
|
279
|
+
default: boolean;
|
|
280
|
+
};
|
|
281
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
282
|
+
[key: string]: any;
|
|
283
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "update:open" | "confirm")[], "close" | "update:open" | "confirm", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
284
|
+
open: {
|
|
285
|
+
type: BooleanConstructor;
|
|
286
|
+
default: boolean;
|
|
287
|
+
};
|
|
288
|
+
title: {
|
|
289
|
+
type: StringConstructor;
|
|
290
|
+
default: string;
|
|
291
|
+
};
|
|
292
|
+
message: {
|
|
293
|
+
type: StringConstructor;
|
|
294
|
+
default: string;
|
|
295
|
+
};
|
|
296
|
+
confirmLabel: {
|
|
297
|
+
type: StringConstructor;
|
|
298
|
+
default: string;
|
|
299
|
+
};
|
|
300
|
+
cancelLabel: {
|
|
301
|
+
type: StringConstructor;
|
|
302
|
+
default: string;
|
|
303
|
+
}; /** Which choice is highlighted when the dialog opens. */
|
|
304
|
+
defaultConfirm: {
|
|
305
|
+
type: BooleanConstructor;
|
|
306
|
+
default: boolean;
|
|
307
|
+
};
|
|
308
|
+
}>> & Readonly<{
|
|
309
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
310
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
311
|
+
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
312
|
+
}>, {
|
|
313
|
+
title: string;
|
|
314
|
+
open: boolean;
|
|
315
|
+
message: string;
|
|
316
|
+
confirmLabel: string;
|
|
317
|
+
cancelLabel: string;
|
|
318
|
+
defaultConfirm: boolean;
|
|
319
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
320
|
+
//#endregion
|
|
321
|
+
//#region src/dialog-alert.d.ts
|
|
322
|
+
declare const VuiDialogAlert: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
323
|
+
open: {
|
|
324
|
+
type: BooleanConstructor;
|
|
325
|
+
default: boolean;
|
|
326
|
+
};
|
|
327
|
+
title: {
|
|
328
|
+
type: StringConstructor;
|
|
329
|
+
default: string;
|
|
330
|
+
};
|
|
331
|
+
message: {
|
|
332
|
+
type: StringConstructor;
|
|
333
|
+
default: string;
|
|
334
|
+
};
|
|
335
|
+
okLabel: {
|
|
336
|
+
type: StringConstructor;
|
|
337
|
+
default: string;
|
|
338
|
+
};
|
|
339
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
340
|
+
[key: string]: any;
|
|
341
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "update:open")[], "close" | "update:open", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
342
|
+
open: {
|
|
343
|
+
type: BooleanConstructor;
|
|
344
|
+
default: boolean;
|
|
345
|
+
};
|
|
346
|
+
title: {
|
|
347
|
+
type: StringConstructor;
|
|
348
|
+
default: string;
|
|
349
|
+
};
|
|
350
|
+
message: {
|
|
351
|
+
type: StringConstructor;
|
|
352
|
+
default: string;
|
|
353
|
+
};
|
|
354
|
+
okLabel: {
|
|
355
|
+
type: StringConstructor;
|
|
356
|
+
default: string;
|
|
357
|
+
};
|
|
358
|
+
}>> & Readonly<{
|
|
359
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
360
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
361
|
+
}>, {
|
|
362
|
+
title: string;
|
|
363
|
+
open: boolean;
|
|
364
|
+
message: string;
|
|
365
|
+
okLabel: string;
|
|
366
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
367
|
+
//#endregion
|
|
368
|
+
//#region src/command-palette.d.ts
|
|
369
|
+
interface Command {
|
|
370
|
+
id: string;
|
|
371
|
+
title: string;
|
|
372
|
+
/** Right-aligned hint, typically the keybinding (e.g. "⌘S"). */
|
|
373
|
+
hint?: string;
|
|
374
|
+
/** Optional group header (shown when not searching). */
|
|
375
|
+
group?: string;
|
|
376
|
+
/** Invoked when the command is chosen. */
|
|
377
|
+
run?: () => void;
|
|
378
|
+
}
|
|
379
|
+
declare const VuiCommandPalette: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
380
|
+
open: {
|
|
381
|
+
type: BooleanConstructor;
|
|
382
|
+
default: boolean;
|
|
383
|
+
};
|
|
384
|
+
commands: {
|
|
385
|
+
type: PropType<Command[]>;
|
|
386
|
+
default: () => never[];
|
|
387
|
+
};
|
|
388
|
+
title: {
|
|
389
|
+
type: StringConstructor;
|
|
390
|
+
default: string;
|
|
391
|
+
};
|
|
392
|
+
placeholder: {
|
|
393
|
+
type: StringConstructor;
|
|
394
|
+
default: string;
|
|
395
|
+
};
|
|
396
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
397
|
+
[key: string]: any;
|
|
398
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("close" | "update:open" | "run")[], "close" | "update:open" | "run", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
399
|
+
open: {
|
|
400
|
+
type: BooleanConstructor;
|
|
401
|
+
default: boolean;
|
|
402
|
+
};
|
|
403
|
+
commands: {
|
|
404
|
+
type: PropType<Command[]>;
|
|
405
|
+
default: () => never[];
|
|
406
|
+
};
|
|
407
|
+
title: {
|
|
408
|
+
type: StringConstructor;
|
|
409
|
+
default: string;
|
|
410
|
+
};
|
|
411
|
+
placeholder: {
|
|
412
|
+
type: StringConstructor;
|
|
413
|
+
default: string;
|
|
414
|
+
};
|
|
415
|
+
}>> & Readonly<{
|
|
416
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
417
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
418
|
+
onRun?: ((...args: any[]) => any) | undefined;
|
|
419
|
+
}>, {
|
|
420
|
+
title: string;
|
|
421
|
+
open: boolean;
|
|
422
|
+
placeholder: string;
|
|
423
|
+
commands: Command[];
|
|
424
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region src/toast.d.ts
|
|
427
|
+
type ToastKind = 'info' | 'success' | 'warning' | 'error';
|
|
428
|
+
interface Toast {
|
|
429
|
+
id: number;
|
|
430
|
+
message: string;
|
|
431
|
+
kind: ToastKind;
|
|
432
|
+
/** Auto-dismiss after this many ms; 0 keeps it until dismissed manually. */
|
|
433
|
+
duration: number;
|
|
434
|
+
}
|
|
435
|
+
interface ToastController {
|
|
436
|
+
toasts: Toast[];
|
|
437
|
+
show: (message: string, opts?: {
|
|
438
|
+
kind?: ToastKind;
|
|
439
|
+
duration?: number;
|
|
440
|
+
}) => number;
|
|
441
|
+
dismiss: (id: number) => void;
|
|
442
|
+
clear: () => void;
|
|
443
|
+
}
|
|
444
|
+
/** Create + provide the toast controller. Call once in your root component setup. */
|
|
445
|
+
declare function provideToasts(): ToastController;
|
|
446
|
+
/** Access the toast controller installed by `provideToasts()`. */
|
|
447
|
+
declare function useToast(): ToastController;
|
|
448
|
+
declare const VuiToastHost: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
449
|
+
/** Corner to stack toasts in. */position: {
|
|
450
|
+
type: PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
|
|
451
|
+
default: string;
|
|
452
|
+
};
|
|
453
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
454
|
+
[key: string]: any;
|
|
455
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
456
|
+
/** Corner to stack toasts in. */position: {
|
|
457
|
+
type: PropType<"top-right" | "top-left" | "bottom-right" | "bottom-left">;
|
|
458
|
+
default: string;
|
|
459
|
+
};
|
|
460
|
+
}>> & Readonly<{}>, {
|
|
461
|
+
position: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
462
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/autocomplete.d.ts
|
|
465
|
+
interface Suggestion {
|
|
466
|
+
label: string;
|
|
467
|
+
value: string;
|
|
468
|
+
/** Right-aligned secondary text (type, path, etc.). */
|
|
469
|
+
hint?: string;
|
|
470
|
+
}
|
|
471
|
+
/** Produces suggestions for a query. Return `[]` to contribute nothing. */
|
|
472
|
+
type SuggestionProvider = (query: string) => Suggestion[];
|
|
473
|
+
interface AutocompleteOptions {
|
|
474
|
+
query: () => string;
|
|
475
|
+
providers: SuggestionProvider[];
|
|
476
|
+
onAccept: (s: Suggestion) => void;
|
|
477
|
+
/** Cap the merged suggestion list. */
|
|
478
|
+
max?: number;
|
|
479
|
+
}
|
|
480
|
+
interface AutocompleteApi {
|
|
481
|
+
suggestions: Ref<Suggestion[]>;
|
|
482
|
+
active: Ref<number>;
|
|
483
|
+
/** True when there is at least one suggestion to show. */
|
|
484
|
+
visible: Ref<boolean>;
|
|
485
|
+
/** Up/Down navigation — wire on the input's wrapper (they bubble out of the input). */
|
|
486
|
+
onKeyDown: (ev: DispatchableEvent) => void;
|
|
487
|
+
/** Accept the active suggestion — call from the input's `@enter`. */
|
|
488
|
+
accept: () => void;
|
|
489
|
+
}
|
|
490
|
+
/** Wire provider-stack suggestions + keyboard navigation for an input. */
|
|
491
|
+
declare function useAutocomplete(opts: AutocompleteOptions): AutocompleteApi;
|
|
492
|
+
declare const VuiAutocomplete: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
493
|
+
suggestions: {
|
|
494
|
+
type: PropType<Suggestion[]>;
|
|
495
|
+
default: () => never[];
|
|
496
|
+
};
|
|
497
|
+
active: {
|
|
498
|
+
type: NumberConstructor;
|
|
499
|
+
default: number;
|
|
500
|
+
};
|
|
501
|
+
maxRows: {
|
|
502
|
+
type: NumberConstructor;
|
|
503
|
+
default: number;
|
|
504
|
+
};
|
|
505
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
506
|
+
[key: string]: any;
|
|
507
|
+
}> | null, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, "select"[], "select", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
508
|
+
suggestions: {
|
|
509
|
+
type: PropType<Suggestion[]>;
|
|
510
|
+
default: () => never[];
|
|
511
|
+
};
|
|
512
|
+
active: {
|
|
513
|
+
type: NumberConstructor;
|
|
514
|
+
default: number;
|
|
515
|
+
};
|
|
516
|
+
maxRows: {
|
|
517
|
+
type: NumberConstructor;
|
|
518
|
+
default: number;
|
|
519
|
+
};
|
|
520
|
+
}>> & Readonly<{
|
|
521
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
522
|
+
}>, {
|
|
523
|
+
maxRows: number;
|
|
524
|
+
suggestions: Suggestion[];
|
|
525
|
+
active: number;
|
|
526
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/status-bar.d.ts
|
|
529
|
+
type ColorProp$1 = string | number;
|
|
530
|
+
declare const VuiStatusBar: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
531
|
+
height: {
|
|
532
|
+
type: NumberConstructor;
|
|
533
|
+
default: number;
|
|
534
|
+
};
|
|
535
|
+
bg: {
|
|
536
|
+
type: PropType<ColorProp$1>;
|
|
537
|
+
default: undefined;
|
|
538
|
+
};
|
|
539
|
+
fg: {
|
|
540
|
+
type: PropType<ColorProp$1>;
|
|
541
|
+
default: undefined;
|
|
542
|
+
}; /** Horizontal padding inside the bar. */
|
|
543
|
+
pad: {
|
|
544
|
+
type: NumberConstructor;
|
|
545
|
+
default: number;
|
|
546
|
+
};
|
|
547
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
548
|
+
[key: string]: any;
|
|
549
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
550
|
+
height: {
|
|
551
|
+
type: NumberConstructor;
|
|
552
|
+
default: number;
|
|
553
|
+
};
|
|
554
|
+
bg: {
|
|
555
|
+
type: PropType<ColorProp$1>;
|
|
556
|
+
default: undefined;
|
|
557
|
+
};
|
|
558
|
+
fg: {
|
|
559
|
+
type: PropType<ColorProp$1>;
|
|
560
|
+
default: undefined;
|
|
561
|
+
}; /** Horizontal padding inside the bar. */
|
|
562
|
+
pad: {
|
|
563
|
+
type: NumberConstructor;
|
|
564
|
+
default: number;
|
|
565
|
+
};
|
|
566
|
+
}>> & Readonly<{}>, {
|
|
567
|
+
fg: ColorProp$1;
|
|
568
|
+
height: number;
|
|
569
|
+
bg: ColorProp$1;
|
|
570
|
+
pad: number;
|
|
571
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
572
|
+
/** A header row: a status bar with the active-border accent by default. */
|
|
573
|
+
declare const VuiHeader: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
574
|
+
bg: {
|
|
575
|
+
type: PropType<ColorProp$1>;
|
|
576
|
+
default: undefined;
|
|
577
|
+
};
|
|
578
|
+
fg: {
|
|
579
|
+
type: PropType<ColorProp$1>;
|
|
580
|
+
default: undefined;
|
|
581
|
+
};
|
|
582
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
583
|
+
[key: string]: any;
|
|
584
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
585
|
+
bg: {
|
|
586
|
+
type: PropType<ColorProp$1>;
|
|
587
|
+
default: undefined;
|
|
588
|
+
};
|
|
589
|
+
fg: {
|
|
590
|
+
type: PropType<ColorProp$1>;
|
|
591
|
+
default: undefined;
|
|
592
|
+
};
|
|
593
|
+
}>> & Readonly<{}>, {
|
|
594
|
+
fg: ColorProp$1;
|
|
595
|
+
bg: ColorProp$1;
|
|
596
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
597
|
+
/** A footer row — alias of the status bar with footer-typical muted styling. */
|
|
598
|
+
declare const VuiFooter: import("@vue/runtime-core").DefineComponent<{}, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
599
|
+
[key: string]: any;
|
|
600
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
601
|
+
//#endregion
|
|
602
|
+
//#region src/virtual-list.d.ts
|
|
603
|
+
declare const VuiVirtualList: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
604
|
+
items: {
|
|
605
|
+
type: PropType<unknown[]>;
|
|
606
|
+
required: true;
|
|
607
|
+
}; /** Viewport height in rows (definite — see the note above). */
|
|
608
|
+
height: {
|
|
609
|
+
type: NumberConstructor;
|
|
610
|
+
required: true;
|
|
611
|
+
}; /** Rows each item occupies. */
|
|
612
|
+
itemHeight: {
|
|
613
|
+
type: NumberConstructor;
|
|
614
|
+
default: number;
|
|
615
|
+
}; /** Extra rows mounted above/below the viewport to smooth fast scrolling. */
|
|
616
|
+
overscan: {
|
|
617
|
+
type: NumberConstructor;
|
|
618
|
+
default: number;
|
|
619
|
+
};
|
|
620
|
+
focused: {
|
|
621
|
+
type: BooleanConstructor;
|
|
622
|
+
default: boolean;
|
|
623
|
+
};
|
|
624
|
+
focusable: {
|
|
625
|
+
type: BooleanConstructor;
|
|
626
|
+
default: boolean;
|
|
627
|
+
}; /** Scroll step (rows) for arrow keys / one wheel notch. */
|
|
628
|
+
step: {
|
|
629
|
+
type: NumberConstructor;
|
|
630
|
+
default: number;
|
|
631
|
+
}; /** Render an integrated vertical scrollbar (indicator + drag) on the right edge. */
|
|
632
|
+
scrollbar: {
|
|
633
|
+
type: BooleanConstructor;
|
|
634
|
+
default: boolean;
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Controlled scroll offset (top row). Bind it (`v-model:scrollY` /
|
|
638
|
+
* `:scrollY` + `@update:scrollY`) to drive the list from an ancestor — e.g. a
|
|
639
|
+
* focused parent that owns the keyboard. Omit for uncontrolled (internal).
|
|
640
|
+
*/
|
|
641
|
+
scrollY: {
|
|
642
|
+
type: NumberConstructor;
|
|
643
|
+
default: undefined;
|
|
644
|
+
};
|
|
645
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
646
|
+
[key: string]: any;
|
|
647
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("scroll" | "update:scrollY")[], "scroll" | "update:scrollY", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
648
|
+
items: {
|
|
649
|
+
type: PropType<unknown[]>;
|
|
650
|
+
required: true;
|
|
651
|
+
}; /** Viewport height in rows (definite — see the note above). */
|
|
652
|
+
height: {
|
|
653
|
+
type: NumberConstructor;
|
|
654
|
+
required: true;
|
|
655
|
+
}; /** Rows each item occupies. */
|
|
656
|
+
itemHeight: {
|
|
657
|
+
type: NumberConstructor;
|
|
658
|
+
default: number;
|
|
659
|
+
}; /** Extra rows mounted above/below the viewport to smooth fast scrolling. */
|
|
660
|
+
overscan: {
|
|
661
|
+
type: NumberConstructor;
|
|
662
|
+
default: number;
|
|
663
|
+
};
|
|
664
|
+
focused: {
|
|
665
|
+
type: BooleanConstructor;
|
|
666
|
+
default: boolean;
|
|
667
|
+
};
|
|
668
|
+
focusable: {
|
|
669
|
+
type: BooleanConstructor;
|
|
670
|
+
default: boolean;
|
|
671
|
+
}; /** Scroll step (rows) for arrow keys / one wheel notch. */
|
|
672
|
+
step: {
|
|
673
|
+
type: NumberConstructor;
|
|
674
|
+
default: number;
|
|
675
|
+
}; /** Render an integrated vertical scrollbar (indicator + drag) on the right edge. */
|
|
676
|
+
scrollbar: {
|
|
677
|
+
type: BooleanConstructor;
|
|
678
|
+
default: boolean;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Controlled scroll offset (top row). Bind it (`v-model:scrollY` /
|
|
682
|
+
* `:scrollY` + `@update:scrollY`) to drive the list from an ancestor — e.g. a
|
|
683
|
+
* focused parent that owns the keyboard. Omit for uncontrolled (internal).
|
|
684
|
+
*/
|
|
685
|
+
scrollY: {
|
|
686
|
+
type: NumberConstructor;
|
|
687
|
+
default: undefined;
|
|
688
|
+
};
|
|
689
|
+
}>> & Readonly<{
|
|
690
|
+
onScroll?: ((...args: any[]) => any) | undefined;
|
|
691
|
+
"onUpdate:scrollY"?: ((...args: any[]) => any) | undefined;
|
|
692
|
+
}>, {
|
|
693
|
+
focusable: boolean;
|
|
694
|
+
focused: boolean;
|
|
695
|
+
scrollY: number;
|
|
696
|
+
step: number;
|
|
697
|
+
scrollbar: boolean;
|
|
698
|
+
itemHeight: number;
|
|
699
|
+
overscan: number;
|
|
700
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
701
|
+
//#endregion
|
|
702
|
+
//#region src/working-indicator.d.ts
|
|
703
|
+
type ColorProp = string | number;
|
|
704
|
+
declare const VuiWorkingIndicator: import("@vue/runtime-core").DefineComponent<import("@vue/runtime-core").ExtractPropTypes<{
|
|
705
|
+
label: {
|
|
706
|
+
type: StringConstructor;
|
|
707
|
+
default: string;
|
|
708
|
+
};
|
|
709
|
+
done: {
|
|
710
|
+
type: BooleanConstructor;
|
|
711
|
+
default: boolean;
|
|
712
|
+
};
|
|
713
|
+
doneLabel: {
|
|
714
|
+
type: StringConstructor;
|
|
715
|
+
default: string;
|
|
716
|
+
};
|
|
717
|
+
preset: {
|
|
718
|
+
type: PropType<SpinnerPreset$1>;
|
|
719
|
+
default: string;
|
|
720
|
+
}; /** Spinner / check color; defaults to theme accent (busy) / success (done). */
|
|
721
|
+
color: {
|
|
722
|
+
type: PropType<ColorProp>;
|
|
723
|
+
default: undefined;
|
|
724
|
+
}; /** Glyph shown when done. */
|
|
725
|
+
doneGlyph: {
|
|
726
|
+
type: StringConstructor;
|
|
727
|
+
default: string;
|
|
728
|
+
};
|
|
729
|
+
}>, () => import("@vue/runtime-core").VNode<import("@vue/runtime-core").RendererNode, import("@vue/runtime-core").RendererElement, {
|
|
730
|
+
[key: string]: any;
|
|
731
|
+
}>, {}, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, {}, string, import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
|
|
732
|
+
label: {
|
|
733
|
+
type: StringConstructor;
|
|
734
|
+
default: string;
|
|
735
|
+
};
|
|
736
|
+
done: {
|
|
737
|
+
type: BooleanConstructor;
|
|
738
|
+
default: boolean;
|
|
739
|
+
};
|
|
740
|
+
doneLabel: {
|
|
741
|
+
type: StringConstructor;
|
|
742
|
+
default: string;
|
|
743
|
+
};
|
|
744
|
+
preset: {
|
|
745
|
+
type: PropType<SpinnerPreset$1>;
|
|
746
|
+
default: string;
|
|
747
|
+
}; /** Spinner / check color; defaults to theme accent (busy) / success (done). */
|
|
748
|
+
color: {
|
|
749
|
+
type: PropType<ColorProp>;
|
|
750
|
+
default: undefined;
|
|
751
|
+
}; /** Glyph shown when done. */
|
|
752
|
+
doneGlyph: {
|
|
753
|
+
type: StringConstructor;
|
|
754
|
+
default: string;
|
|
755
|
+
};
|
|
756
|
+
}>> & Readonly<{}>, {
|
|
757
|
+
label: string;
|
|
758
|
+
done: boolean;
|
|
759
|
+
doneLabel: string;
|
|
760
|
+
preset: "braille" | "dots" | "line" | "bounce" | "arc" | "circle" | "arrow" | "toggle" | "pulse";
|
|
761
|
+
color: ColorProp;
|
|
762
|
+
doneGlyph: string;
|
|
763
|
+
}, {}, {}, {}, string, import("@vue/runtime-core").ComponentProvideOptions, true, {}, any>;
|
|
764
|
+
//#endregion
|
|
765
|
+
export { type AutocompleteApi, type AutocompleteOptions, type Command, type DialogSize, type FuzzyMatch, type FuzzyRanked, SPINNER_PRESETS, type SelectOption, type SpinnerPreset, type Suggestion, type SuggestionProvider, type Toast, type ToastController, type ToastKind, VuiAutocomplete, VuiCommandPalette, VuiDialog, VuiDialogAlert, VuiDialogConfirm, VuiDialogPrompt, VuiDialogSelect, VuiFooter, VuiHeader, VuiSpinner, VuiStatusBar, VuiToastHost, VuiVirtualList, VuiWorkingIndicator, fuzzyFilter, fuzzyMatch, provideToasts, useAutocomplete, useFocusTrap, useToast };
|