@deveye/types 0.21.7 → 0.21.8
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/package.json +1 -1
- package/src/sdk/client-ambient.d.ts +83 -7
package/package.json
CHANGED
|
@@ -16,8 +16,7 @@ declare module 'deveye-sdk-client' {
|
|
|
16
16
|
DragEvent,
|
|
17
17
|
InputHTMLAttributes,
|
|
18
18
|
ReactNode,
|
|
19
|
-
RefObject
|
|
20
|
-
SelectHTMLAttributes
|
|
19
|
+
RefObject
|
|
21
20
|
} from 'react';
|
|
22
21
|
import type { z, ZodType } from 'zod';
|
|
23
22
|
import type {
|
|
@@ -53,7 +52,55 @@ declare module 'deveye-sdk-client' {
|
|
|
53
52
|
export const TextInput: ComponentType<
|
|
54
53
|
InputHTMLAttributes<HTMLInputElement> & { enableShowHideButton?: boolean; error?: string }
|
|
55
54
|
>;
|
|
56
|
-
export
|
|
55
|
+
export interface CopyButtonProps {
|
|
56
|
+
value: string;
|
|
57
|
+
/** What gets copied, for the tooltip and screen readers ("Copier la clé"). */
|
|
58
|
+
label?: string;
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Copies `value` to the clipboard and confirms through its icon for two seconds; a refused clipboard stays silent. */
|
|
62
|
+
export const CopyButton: ComponentType<CopyButtonProps>;
|
|
63
|
+
export interface LoadingVeilProps {
|
|
64
|
+
/** Read by screen readers, and shown under the spinner when given. */
|
|
65
|
+
label?: string;
|
|
66
|
+
/** `top` for a long scrolling area: the spinner stays in view. */
|
|
67
|
+
align?: 'center' | 'top';
|
|
68
|
+
/** Appears after a quarter of a second: a brief read never flickers. */
|
|
69
|
+
delayed?: boolean;
|
|
70
|
+
className?: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The veil of a re-read: a layer over an area, the previous content legible
|
|
74
|
+
* underneath, taking no click and no scroll. Mount it as a SIBLING of the
|
|
75
|
+
* scrolling area inside a `position: relative` parent (inside an
|
|
76
|
+
* `overflow: auto` it would scroll away). Dim what it covers with
|
|
77
|
+
* `filter: opacity()`, never `opacity`.
|
|
78
|
+
*/
|
|
79
|
+
export const LoadingVeil: ComponentType<LoadingVeilProps>;
|
|
80
|
+
export interface LogOutputProps {
|
|
81
|
+
/** The raw log, ANSI sequences included: the component cleans it. */
|
|
82
|
+
text: string;
|
|
83
|
+
/** A read in progress: the veil, over whatever is already shown. */
|
|
84
|
+
busy?: boolean;
|
|
85
|
+
/** Search, count and copy above the lines. Default `true`. */
|
|
86
|
+
toolbar?: boolean;
|
|
87
|
+
/** What reads when the log is empty. */
|
|
88
|
+
emptyText?: string;
|
|
89
|
+
/** Stays at the bottom when text arrives and the reader was there. Default `true`. */
|
|
90
|
+
follow?: boolean;
|
|
91
|
+
/** Caps the body's height outside a flex column (a block inside a sheet). */
|
|
92
|
+
maxHeight?: number;
|
|
93
|
+
className?: string;
|
|
94
|
+
'aria-label'?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A readable raw log: the output of a provider or a tool, cleaned of ANSI
|
|
98
|
+
* codes and coloured by what each line says (step, error, warning,
|
|
99
|
+
* success), timestamps and durations set back. The toolbar filters lines
|
|
100
|
+
* and copies what is shown. Inside a flex column (a `Dialog tall`) it
|
|
101
|
+
* takes the remaining room.
|
|
102
|
+
*/
|
|
103
|
+
export const LogOutput: ComponentType<LogOutputProps>;
|
|
57
104
|
export const Checkbox: ComponentType<{
|
|
58
105
|
checked: boolean;
|
|
59
106
|
/** Receives the state AFTER the click — no event to unwrap. */
|
|
@@ -109,11 +156,18 @@ declare module 'deveye-sdk-client' {
|
|
|
109
156
|
group?: string;
|
|
110
157
|
disabled?: boolean;
|
|
111
158
|
}
|
|
159
|
+
/** A chip under the search field that keeps only the options passing `test`. */
|
|
160
|
+
export interface SearchSelectFilter<T extends string = string> {
|
|
161
|
+
value: string;
|
|
162
|
+
label: string;
|
|
163
|
+
test: (option: SearchSelectOption<T>) => boolean;
|
|
164
|
+
/** Chips sharing a key exclude each other: activating one releases the others. */
|
|
165
|
+
exclusive?: string;
|
|
166
|
+
}
|
|
112
167
|
/**
|
|
113
|
-
*
|
|
114
|
-
* included)
|
|
115
|
-
*
|
|
116
|
-
* `SelectInput` stays simpler. Safe inside a Dialog: the panel is portaled.
|
|
168
|
+
* The app's dropdown. The search field (accent- and case-insensitive, group
|
|
169
|
+
* names included) only appears from eight choices on, or on request; filter
|
|
170
|
+
* chips can narrow the list. Safe inside a Dialog: the panel is portaled.
|
|
117
171
|
*/
|
|
118
172
|
export function SearchSelect<T extends string>(props: {
|
|
119
173
|
value: T;
|
|
@@ -124,6 +178,14 @@ declare module 'deveye-sdk-client' {
|
|
|
124
178
|
placeholder?: string;
|
|
125
179
|
searchPlaceholder?: string;
|
|
126
180
|
emptyText?: string;
|
|
181
|
+
/** The search field: `'auto'` (default) shows it from eight choices on. */
|
|
182
|
+
searchable?: boolean | 'auto';
|
|
183
|
+
/** Chips under the search, AND-combined, reset when the panel closes. */
|
|
184
|
+
filters?: readonly SearchSelectFilter<T>[];
|
|
185
|
+
/** The trigger's id, for a label's `htmlFor`. */
|
|
186
|
+
id?: string;
|
|
187
|
+
/** The field the opening Dialog focuses first (`data-autofocus`). */
|
|
188
|
+
autoFocus?: boolean;
|
|
127
189
|
disabled?: boolean;
|
|
128
190
|
className?: string;
|
|
129
191
|
}): ReactNode;
|
|
@@ -222,15 +284,29 @@ declare module 'deveye-sdk-client' {
|
|
|
222
284
|
open: boolean;
|
|
223
285
|
onClose: () => void;
|
|
224
286
|
title?: string;
|
|
287
|
+
/** A small line above the title: where this dialog sits. */
|
|
288
|
+
kicker?: ReactNode;
|
|
225
289
|
description?: ReactNode;
|
|
226
290
|
children?: ReactNode;
|
|
227
291
|
footer?: ReactNode;
|
|
228
292
|
/** Extra action in the top-right corner, left of the close button. */
|
|
229
293
|
headerAction?: ReactNode;
|
|
230
294
|
width?: number;
|
|
295
|
+
/** When false, overlay click and Escape no longer close the dialog. Default true. */
|
|
296
|
+
dismissible?: boolean;
|
|
231
297
|
onSubmit?: () => void;
|
|
298
|
+
/** Move focus to the first field on open. Default true. */
|
|
299
|
+
autoFocus?: boolean;
|
|
300
|
+
/** Unsaved changes: closing first asks; requires `onSave`. */
|
|
301
|
+
dirty?: boolean;
|
|
302
|
+
onSave?: () => void;
|
|
303
|
+
/** A viewport-tall flex column: title and footer pinned, the body scrolls. */
|
|
304
|
+
tall?: boolean;
|
|
305
|
+
/** The height follows the content up to the viewport, then the body scrolls. */
|
|
232
306
|
fill?: boolean;
|
|
233
307
|
holdSecrecy?: boolean;
|
|
308
|
+
/** Without the close button (a progress dialog). Default true. */
|
|
309
|
+
closeButton?: boolean;
|
|
234
310
|
}>;
|
|
235
311
|
/** The "Annuler" button of a Dialog footer: closes through the guarded close. */
|
|
236
312
|
export const DialogCancelButton: ComponentType<
|