@tradalab/lyra 3.17.0 → 3.19.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 +2 -2
- package/dist/blocks/index.d.ts +324 -7
- package/dist/blocks/index.js +1185 -74
- package/dist/blocks/index.js.map +1 -1
- package/dist/chunk-W3J2KTYP.js +82 -0
- package/dist/chunk-W3J2KTYP.js.map +1 -0
- package/dist/hooks/index.d.ts +18 -3
- package/dist/hooks/index.js +1 -1
- package/dist/{plate-BJ19iaVV.d.ts → plate-iXwbupLU.d.ts} +1 -1
- package/dist/{plate-picker-dhKLjz_6.d.ts → plate-picker-DdC2HFo6.d.ts} +1 -1
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/{use-compact-BvI4sJf9.d.ts → use-compact-ahmJWpSH.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-AIULLZYM.js +0 -21
- package/dist/chunk-AIULLZYM.js.map +0 -1
package/README.md
CHANGED
|
@@ -25,9 +25,9 @@ The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
|
|
|
25
25
|
| Subpath | Exports | Boundary |
|
|
26
26
|
|---|---|---|
|
|
27
27
|
| `@tradalab/lyra/utils` | `cn`, `foldText`, `formatBytes`/`formatCount`, `addTag`/`matchesKeyword`, `pickDelimiter`/`groupByPrefix`, `CONNECTION_COLORS`/`resolveColor`/`ENV_FRAME` | server-safe |
|
|
28
|
-
| `@tradalab/lyra/hooks` | `useMobile` | client |
|
|
28
|
+
| `@tradalab/lyra/hooks` | `useMobile`, `useDirtyFields`, `useBackClose`/`pushBackLayer` | client |
|
|
29
29
|
| `@tradalab/lyra/ui` | 61 shadcn primitives + `AccountMenu`, `ActionButton`, `Container`, `EmptyState`, `StatusBadge` | client |
|
|
30
|
-
| `@tradalab/lyra/blocks` | `Form`/`FormField` + RHF glue, `Panel`, `Confirm`/`useConfirm`, `Tree`, `TzPicker`, `OptionPicker`, `MobileSheet`, `ChoiceDrawer`, `McpSettings`, `LlmSettings`, `PlatePicker`, `usePlate`, `useCompact`, `PreferenceScript`, `StatTile`, `BarList`, `ColorSwatches`, `TagInput`, `loadExpanded`/`saveExpanded` | client |
|
|
30
|
+
| `@tradalab/lyra/blocks` | `Form`/`FormField` + RHF glue, `Panel`, `Confirm`/`useConfirm`, `Tree`, `TzPicker`, `OptionPicker`, `MobileSheet`, `ChoiceDrawer`, `McpSettings`, `LlmSettings`, `PlatePicker`, `usePlate`, `useCompact`, `PreferenceScript`, `StatTile`, `BarList`, `ColorSwatches`, `TagInput`, `loadExpanded`/`saveExpanded`, `DateField`, `LockedReason`, `UnsavedBadge`, `useConfirmReason`, `useBlocked`, `ConnectionTree`/`buildConnectionTree`, `ConfigListDialog`, `SshFields`/`TlsFields`/`ProxyFields` + `sshDefaults`/`tlsDefaults`/`proxyDefaults`, `ReleaseNotes`, `useHostKeyTrust` + `hostKeyAsk`/`retryAfterTrust` | client |
|
|
31
31
|
| `@tradalab/lyra/data-table` | `DataTable` + `usePager`, `TableFilterBar`, `TableFilterChips`, `TableSearch`, `TableReload`, `filterRows`, `pageWindow` | client |
|
|
32
32
|
| `@tradalab/lyra/shell` | `AppShell`, `PageShell`, `PageHeader`, `NavItem`, `NavGroup`, `Breadcrumbs`, `BottomNav`, `useActiveRoute`, `useSearchParam`, `useTabParam`, `usePageParam`, `UrlTabs` | client |
|
|
33
33
|
| `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as react_hook_form from 'react-hook-form';
|
|
2
|
-
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
2
|
+
import { FieldValues, FieldPath, ControllerProps, UseFormReturn } from 'react-hook-form';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import { ReactNode, DragEvent, HTMLAttributes, ComponentProps, ReactElement } from 'react';
|
|
5
5
|
import { Slot, Label } from 'radix-ui';
|
|
6
6
|
import { LucideIcon } from 'lucide-react';
|
|
7
7
|
import { d as ConnectionColor } from '../connection-color-DxEs04ll.js';
|
|
8
|
-
export { B as BEARING_PLATES, a as BearingPlate,
|
|
9
|
-
export { u as useCompact, a as usePlate } from '../use-compact-
|
|
10
|
-
export { a as PlatePicker, P as PlatePickerProps } from '../plate-picker-
|
|
8
|
+
export { B as BEARING_PLATES, a as BearingPlate, b as PLATES, P as Plate, d as derivePlate, i as isPlate } from '../plate-iXwbupLU.js';
|
|
9
|
+
export { u as useCompact, a as usePlate } from '../use-compact-ahmJWpSH.js';
|
|
10
|
+
export { a as PlatePicker, P as PlatePickerProps } from '../plate-picker-DdC2HFo6.js';
|
|
11
11
|
export { P as PreferenceScript } from '../preference-script-Dm-LEoYX.js';
|
|
12
12
|
|
|
13
13
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
@@ -73,22 +73,62 @@ type ConfirmOptions = {
|
|
|
73
73
|
confirmText?: string;
|
|
74
74
|
cancelText?: string;
|
|
75
75
|
danger?: boolean;
|
|
76
|
+
/** What the action does to other records or people, one line each. */
|
|
77
|
+
consequences?: ReactNode[];
|
|
78
|
+
/** Set to say whether the action can be undone; the line is shown only when it is set. */
|
|
79
|
+
reversible?: boolean;
|
|
80
|
+
reversibleText?: string;
|
|
81
|
+
irreversibleText?: string;
|
|
82
|
+
};
|
|
83
|
+
type ReasonField = {
|
|
84
|
+
label: string;
|
|
85
|
+
placeholder?: string;
|
|
86
|
+
required?: boolean;
|
|
87
|
+
};
|
|
88
|
+
type ConfirmReasonOptions = ConfirmOptions & {
|
|
89
|
+
reason: ReasonField;
|
|
90
|
+
};
|
|
91
|
+
type BlockedOptions = {
|
|
92
|
+
title: string;
|
|
93
|
+
description?: ReactNode;
|
|
94
|
+
/** What stands in the way, one line each. */
|
|
95
|
+
blockers: ReactNode[];
|
|
96
|
+
closeText?: string;
|
|
97
|
+
/** A way to the place where the blocker is resolved; there is never a confirm button. */
|
|
98
|
+
action?: {
|
|
99
|
+
label: string;
|
|
100
|
+
onClick: () => void;
|
|
101
|
+
};
|
|
76
102
|
};
|
|
77
103
|
|
|
78
104
|
type Props = {
|
|
79
|
-
options: ConfirmOptions
|
|
80
|
-
|
|
105
|
+
options: ConfirmOptions & {
|
|
106
|
+
reason?: ReasonField;
|
|
107
|
+
};
|
|
108
|
+
onConfirm: (reason: string) => void;
|
|
81
109
|
onCancel: () => void;
|
|
82
110
|
};
|
|
83
111
|
declare function ConfirmDialog({ options, onConfirm, onCancel }: Props): React$1.JSX.Element;
|
|
112
|
+
declare function BlockedDialog({ options, onClose }: {
|
|
113
|
+
options: BlockedOptions;
|
|
114
|
+
onClose: () => void;
|
|
115
|
+
}): React$1.JSX.Element;
|
|
84
116
|
|
|
85
117
|
type ConfirmFn = (options: ConfirmOptions) => Promise<boolean>;
|
|
118
|
+
type ConfirmReasonFn = (options: ConfirmReasonOptions) => Promise<string | null>;
|
|
119
|
+
type BlockedFn = (options: BlockedOptions) => Promise<void>;
|
|
86
120
|
declare const ConfirmContext: React$1.Context<ConfirmFn | null>;
|
|
121
|
+
declare const ConfirmReasonContext: React$1.Context<ConfirmReasonFn | null>;
|
|
122
|
+
declare const BlockedContext: React$1.Context<BlockedFn | null>;
|
|
87
123
|
declare function ConfirmProvider({ children }: {
|
|
88
124
|
children: ReactNode;
|
|
89
125
|
}): React$1.JSX.Element;
|
|
90
126
|
|
|
91
127
|
declare const useConfirm: () => ConfirmFn;
|
|
128
|
+
/** Like `useConfirm`, with a reason box; resolves to the trimmed reason, or `null` when cancelled. */
|
|
129
|
+
declare const useConfirmReason: () => ConfirmReasonFn;
|
|
130
|
+
/** Explains why an action cannot run, listing what blocks it; offers no confirm button. */
|
|
131
|
+
declare const useBlocked: () => BlockedFn;
|
|
92
132
|
|
|
93
133
|
type TreeData<T> = {
|
|
94
134
|
id: string;
|
|
@@ -267,6 +307,229 @@ interface TagInputProps extends Pick<ComponentProps<"input">, "id" | "aria-descr
|
|
|
267
307
|
/** Tags as chips plus a text box: Enter, comma or blur adds, Backspace on an empty box removes the last. Repeats ignoring case are dropped, also from `value`. */
|
|
268
308
|
declare function TagInput({ value, onChange, suggestions, placeholder, removeLabel, className, disabled, ...aria }: TagInputProps): React$1.JSX.Element;
|
|
269
309
|
|
|
310
|
+
interface ConnectionTreeGroup {
|
|
311
|
+
id: string;
|
|
312
|
+
name: string;
|
|
313
|
+
sort_order?: number;
|
|
314
|
+
}
|
|
315
|
+
interface ConnectionTreeConnection {
|
|
316
|
+
id: string;
|
|
317
|
+
name: string;
|
|
318
|
+
group_id?: string;
|
|
319
|
+
sort_order?: number;
|
|
320
|
+
}
|
|
321
|
+
interface ConnectionTreeItem<G extends ConnectionTreeGroup, C extends ConnectionTreeConnection> {
|
|
322
|
+
id: string;
|
|
323
|
+
name: string;
|
|
324
|
+
level: number;
|
|
325
|
+
isGroup: boolean;
|
|
326
|
+
group?: G;
|
|
327
|
+
connection?: C;
|
|
328
|
+
children?: ConnectionTreeItem<G, C>[];
|
|
329
|
+
}
|
|
330
|
+
/** Groups first in their saved order, each holding its connections; then connections with no known group. Inputs are not mutated. */
|
|
331
|
+
declare function buildConnectionTree<G extends ConnectionTreeGroup, C extends ConnectionTreeConnection>(groups: readonly G[], connections: readonly C[]): ConnectionTreeItem<G, C>[];
|
|
332
|
+
/** The default filter: the connection's name, ignoring case and Vietnamese marks. */
|
|
333
|
+
declare function connectionNameMatches(item: {
|
|
334
|
+
name: string;
|
|
335
|
+
}, keyword: string): boolean;
|
|
336
|
+
|
|
337
|
+
interface ConnectionTreeProps<G extends ConnectionTreeGroup, C extends ConnectionTreeConnection> {
|
|
338
|
+
groups: readonly G[];
|
|
339
|
+
connections: readonly C[];
|
|
340
|
+
keyword?: string;
|
|
341
|
+
matches?: (item: ConnectionTreeItem<G, C>, keyword: string) => boolean;
|
|
342
|
+
storageKey: string;
|
|
343
|
+
activeId?: string;
|
|
344
|
+
onOpen?: (connection: C) => void;
|
|
345
|
+
onDrop?: (plan: DropPlan) => void | Promise<void>;
|
|
346
|
+
icon?: (item: ConnectionTreeItem<G, C>) => ReactNode;
|
|
347
|
+
iconClassName?: (item: ConnectionTreeItem<G, C>) => string | undefined;
|
|
348
|
+
badges?: (item: ConnectionTreeItem<G, C>, memberIds: readonly string[]) => ReactNode;
|
|
349
|
+
actions?: (item: ConnectionTreeItem<G, C>) => ReactNode;
|
|
350
|
+
className?: string;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Saved connections in their groups, for a sidebar. Expansion persists under storageKey, except while filtering;
|
|
354
|
+
* dropping into a closed group opens it. Drag is off while filtering and when onDrop is absent.
|
|
355
|
+
*/
|
|
356
|
+
declare function ConnectionTree<G extends ConnectionTreeGroup, C extends ConnectionTreeConnection>({ groups, connections, keyword, matches, storageKey, activeId, onOpen, onDrop, icon, iconClassName, badges, actions, className, }: ConnectionTreeProps<G, C>): React$1.JSX.Element;
|
|
357
|
+
|
|
358
|
+
interface ConfigListDialogLabels {
|
|
359
|
+
add: string;
|
|
360
|
+
delete: string;
|
|
361
|
+
test: string;
|
|
362
|
+
save: string;
|
|
363
|
+
}
|
|
364
|
+
interface ConfigListDialogProps<T> {
|
|
365
|
+
open: boolean;
|
|
366
|
+
onOpenChange: (open: boolean) => void;
|
|
367
|
+
title: ReactNode;
|
|
368
|
+
items: readonly T[];
|
|
369
|
+
getId: (item: T) => string;
|
|
370
|
+
renderItem: (item: T) => ReactNode;
|
|
371
|
+
selectedId?: string;
|
|
372
|
+
onSelect: (item: T) => void;
|
|
373
|
+
onAdd: () => void;
|
|
374
|
+
loading?: boolean;
|
|
375
|
+
onSave?: () => unknown;
|
|
376
|
+
onTest?: () => unknown;
|
|
377
|
+
onDelete?: () => unknown;
|
|
378
|
+
labels?: Partial<ConfigListDialogLabels>;
|
|
379
|
+
children?: ReactNode;
|
|
380
|
+
className?: string;
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Saved configurations on the left, the selected one's form on the right, Delete / Test / Save below it.
|
|
384
|
+
* A button stays busy until the promise its handler returns settles; a rejection is the handler's to report.
|
|
385
|
+
*/
|
|
386
|
+
declare function ConfigListDialog<T>({ open, onOpenChange, title, items, getId, renderItem, selectedId, onSelect, onAdd, loading, onSave, onTest, onDelete, labels, children, className, }: ConfigListDialogProps<T>): React$1.JSX.Element;
|
|
387
|
+
|
|
388
|
+
interface FieldsLabels {
|
|
389
|
+
host: string;
|
|
390
|
+
port: string;
|
|
391
|
+
username: string;
|
|
392
|
+
password: string;
|
|
393
|
+
optional: string;
|
|
394
|
+
required: string;
|
|
395
|
+
portRange: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
interface ProxyValues {
|
|
399
|
+
id?: string;
|
|
400
|
+
protocol: string;
|
|
401
|
+
host: string;
|
|
402
|
+
port: number;
|
|
403
|
+
username?: string;
|
|
404
|
+
password?: string;
|
|
405
|
+
}
|
|
406
|
+
declare function proxyDefaults(p?: Partial<ProxyValues>): ProxyValues;
|
|
407
|
+
type ProxyFieldsLabels = FieldsLabels & {
|
|
408
|
+
protocol: string;
|
|
409
|
+
};
|
|
410
|
+
/** Protocol (HTTP CONNECT or SOCKS5), host, port and optional credentials of a proxy, bound to the caller's form. */
|
|
411
|
+
declare function ProxyFields({ form, labels, secretPlaceholder, }: {
|
|
412
|
+
form: UseFormReturn<ProxyValues>;
|
|
413
|
+
labels?: Partial<ProxyFieldsLabels>;
|
|
414
|
+
secretPlaceholder?: string;
|
|
415
|
+
}): React$1.JSX.Element;
|
|
416
|
+
|
|
417
|
+
interface TlsValues {
|
|
418
|
+
id?: string;
|
|
419
|
+
name?: string;
|
|
420
|
+
verify: boolean;
|
|
421
|
+
use_sni: boolean;
|
|
422
|
+
server_name?: string;
|
|
423
|
+
ca_cert?: string;
|
|
424
|
+
client_auth: boolean;
|
|
425
|
+
cert?: string;
|
|
426
|
+
key?: string;
|
|
427
|
+
}
|
|
428
|
+
declare function tlsDefaults(t?: Partial<TlsValues>): TlsValues;
|
|
429
|
+
interface TlsFieldsLabels {
|
|
430
|
+
name: string;
|
|
431
|
+
optional: string;
|
|
432
|
+
verify: string;
|
|
433
|
+
verifyHint: string;
|
|
434
|
+
useSni: string;
|
|
435
|
+
useSniHint: string;
|
|
436
|
+
serverName: string;
|
|
437
|
+
caCert: string;
|
|
438
|
+
clientAuth: string;
|
|
439
|
+
clientAuthHint: string;
|
|
440
|
+
clientCert: string;
|
|
441
|
+
clientKey: string;
|
|
442
|
+
}
|
|
443
|
+
/** Verification, SNI, CA bundle and an optional client certificate, bound to the caller's form. secretPlaceholder replaces the key's PEM hint when editing. */
|
|
444
|
+
declare function TlsFields({ form, labels, serverNamePlaceholder, secretPlaceholder, }: {
|
|
445
|
+
form: UseFormReturn<TlsValues>;
|
|
446
|
+
labels?: Partial<TlsFieldsLabels>;
|
|
447
|
+
serverNamePlaceholder?: string;
|
|
448
|
+
secretPlaceholder?: string;
|
|
449
|
+
}): React$1.JSX.Element;
|
|
450
|
+
|
|
451
|
+
type SshKind = "password" | "keypair" | "agent";
|
|
452
|
+
interface SshValues {
|
|
453
|
+
id?: string;
|
|
454
|
+
host: string;
|
|
455
|
+
port: number;
|
|
456
|
+
timeout: number;
|
|
457
|
+
username: string;
|
|
458
|
+
kind: SshKind;
|
|
459
|
+
password?: string;
|
|
460
|
+
private_key?: string;
|
|
461
|
+
passphrase?: string;
|
|
462
|
+
host_key?: string;
|
|
463
|
+
}
|
|
464
|
+
declare function sshDefaults(s?: Partial<SshValues>): SshValues;
|
|
465
|
+
type SshFieldsLabels = FieldsLabels & {
|
|
466
|
+
timeout: string;
|
|
467
|
+
kind: string;
|
|
468
|
+
kindPassword: string;
|
|
469
|
+
kindKeypair: string;
|
|
470
|
+
kindAgent: string;
|
|
471
|
+
privateKey: string;
|
|
472
|
+
privateKeyPlaceholder: string;
|
|
473
|
+
passphrase: string;
|
|
474
|
+
hostKey: string;
|
|
475
|
+
hostKeyUntrusted: string;
|
|
476
|
+
hostKeyHint: string;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* Address, login and authentication of an SSH bastion, bound to the caller's form. With pinHostKey the pinned key
|
|
480
|
+
* shows read-only and is cleared once host or port moves away from what the form was reset to.
|
|
481
|
+
*/
|
|
482
|
+
declare function SshFields({ form, labels, kinds, secretPlaceholder, pinHostKey, }: {
|
|
483
|
+
form: UseFormReturn<SshValues>;
|
|
484
|
+
labels?: Partial<SshFieldsLabels>;
|
|
485
|
+
kinds?: readonly SshKind[];
|
|
486
|
+
secretPlaceholder?: string;
|
|
487
|
+
pinHostKey?: boolean;
|
|
488
|
+
}): React$1.JSX.Element;
|
|
489
|
+
|
|
490
|
+
declare const HOST_KEY_UNKNOWN = "ssh_host_key_unknown";
|
|
491
|
+
declare const HOST_KEY_CHANGED = "ssh_host_key_changed";
|
|
492
|
+
type HostKeyAsk = {
|
|
493
|
+
key: string;
|
|
494
|
+
fingerprint: string;
|
|
495
|
+
changed: boolean;
|
|
496
|
+
details: Record<string, unknown>;
|
|
497
|
+
};
|
|
498
|
+
/** Reads the fault scorix netx.HostKeyFault sends (code + details.key/fingerprint); null for any other error. */
|
|
499
|
+
declare function hostKeyAsk(e: unknown): HostKeyAsk | null;
|
|
500
|
+
/** Calls sharing an id while one is in flight get that call's promise instead of starting another. */
|
|
501
|
+
declare function sharedWhilePending<T>(): (id: string, run: () => Promise<T>) => Promise<T>;
|
|
502
|
+
type TrustOutcome<T> = {
|
|
503
|
+
declined: true;
|
|
504
|
+
error: unknown;
|
|
505
|
+
} | {
|
|
506
|
+
declined: false;
|
|
507
|
+
value: T;
|
|
508
|
+
trusted: boolean;
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* Runs `run`; on a host key fault asks `confirm`, pins through what `trustFor` returns, then runs once more.
|
|
512
|
+
* `trustFor` returns undefined when this call cannot pin (no ssh config id), and the fault is rethrown unasked.
|
|
513
|
+
*/
|
|
514
|
+
declare function retryAfterTrust<T>(run: () => Promise<T>, confirm: (ask: HostKeyAsk) => Promise<boolean>, trustFor: (ask: HostKeyAsk) => (() => Promise<unknown>) | undefined): Promise<TrustOutcome<T>>;
|
|
515
|
+
|
|
516
|
+
type HostKeyLabels = {
|
|
517
|
+
trustTitle: string;
|
|
518
|
+
changedTitle: string;
|
|
519
|
+
trustDescription: (fingerprint: string) => ReactNode;
|
|
520
|
+
changedDescription: (fingerprint: string) => ReactNode;
|
|
521
|
+
trust: string;
|
|
522
|
+
cancel: string;
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* The trust prompt for scorix host key faults, inside a ConfirmProvider. A changed key gets a danger confirm, and
|
|
526
|
+
* prompts for the same key in the same scope while one is open share it. Both functions keep their identity.
|
|
527
|
+
*/
|
|
528
|
+
declare function useHostKeyTrust(labels: HostKeyLabels): {
|
|
529
|
+
confirmHostKey: (ask: HostKeyAsk, scope?: string) => Promise<boolean>;
|
|
530
|
+
runWithTrust: <T>(run: () => Promise<T>, trustFor: (ask: HostKeyAsk) => (() => Promise<unknown>) | undefined, scope?: string) => Promise<TrustOutcome<T>>;
|
|
531
|
+
};
|
|
532
|
+
|
|
270
533
|
interface TzPickerLabels {
|
|
271
534
|
/** Shown when the value is empty and `allowInherit`. Default: "Inherit". */
|
|
272
535
|
inherit?: string;
|
|
@@ -291,6 +554,49 @@ interface TzPickerProps {
|
|
|
291
554
|
}
|
|
292
555
|
declare function TzPicker({ value, onChange, allowInherit, labels, disabled, id, className, }: TzPickerProps): React$1.JSX.Element;
|
|
293
556
|
|
|
557
|
+
type Part = "d" | "m" | "y";
|
|
558
|
+
interface DatePattern {
|
|
559
|
+
order: Part[];
|
|
560
|
+
sep: string;
|
|
561
|
+
}
|
|
562
|
+
/** Day, month and year order and separator the locale writes dates with, read from `Intl`. */
|
|
563
|
+
declare function datePattern(locale: string): DatePattern;
|
|
564
|
+
/** `YYYY-MM-DD` written the locale's way, `""` for an empty or malformed value. */
|
|
565
|
+
declare function formatDate(iso: string, pattern: DatePattern): string;
|
|
566
|
+
/** Typed text to `YYYY-MM-DD`: the locale's order, any separator, or ISO. A two-digit year lands within ten years ahead or the century before. `null` when it is not a real date. */
|
|
567
|
+
declare function parseDate(text: string, pattern: DatePattern): string | null;
|
|
568
|
+
interface DateFieldProps {
|
|
569
|
+
/** `YYYY-MM-DD`, or `""` for no date. */
|
|
570
|
+
value: string;
|
|
571
|
+
onChange: (value: string) => void;
|
|
572
|
+
/** BCP 47 tag of the APP's language, not the browser's: it decides how the date is written. */
|
|
573
|
+
locale: string;
|
|
574
|
+
id?: string;
|
|
575
|
+
disabled?: boolean;
|
|
576
|
+
required?: boolean;
|
|
577
|
+
min?: string;
|
|
578
|
+
max?: string;
|
|
579
|
+
todayLabel?: string;
|
|
580
|
+
clearLabel?: string;
|
|
581
|
+
pickLabel?: string;
|
|
582
|
+
className?: string;
|
|
583
|
+
"aria-label"?: string;
|
|
584
|
+
"aria-invalid"?: boolean;
|
|
585
|
+
}
|
|
586
|
+
/** A date typed in the app's own format, with a calendar beside it: a popover under a mouse, a bottom sheet under a finger. */
|
|
587
|
+
declare function DateField({ value, onChange, locale, id, disabled, required, min, max, todayLabel, clearLabel, pickLabel, className, ...aria }: DateFieldProps): React$1.JSX.Element;
|
|
588
|
+
|
|
589
|
+
/** Why a disabled field cannot be edited and where it is changed instead; text, not a tooltip, so it reads on a phone. */
|
|
590
|
+
declare function LockedReason({ children, className }: {
|
|
591
|
+
children: ReactNode;
|
|
592
|
+
className?: string;
|
|
593
|
+
}): React$1.JSX.Element;
|
|
594
|
+
/** Marks a form that holds edits not yet saved; render it next to the save button. */
|
|
595
|
+
declare function UnsavedBadge({ children, className }: {
|
|
596
|
+
children: ReactNode;
|
|
597
|
+
className?: string;
|
|
598
|
+
}): React$1.JSX.Element;
|
|
599
|
+
|
|
294
600
|
/**
|
|
295
601
|
* Pick one id from a known set.
|
|
296
602
|
*
|
|
@@ -684,4 +990,15 @@ interface LlmSettingsProps {
|
|
|
684
990
|
}
|
|
685
991
|
declare function LlmSettings({ api, labels, className, header, footer }: LlmSettingsProps): React$1.JSX.Element;
|
|
686
992
|
|
|
687
|
-
|
|
993
|
+
interface ReleaseNotesProps {
|
|
994
|
+
notes: string;
|
|
995
|
+
onOpenLink?: (url: string) => void;
|
|
996
|
+
className?: string;
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* Renders the markdown of a CHANGELOG section or a GitHub release body as React nodes, never as HTML.
|
|
1000
|
+
* Links keep only http(s) and mailto targets; with `onOpenLink` a click goes there instead of the webview.
|
|
1001
|
+
*/
|
|
1002
|
+
declare function ReleaseNotes({ notes, onOpenLink, className }: ReleaseNotesProps): React$1.JSX.Element;
|
|
1003
|
+
|
|
1004
|
+
export { AuthCard, type AuthCardProps, AvatarTile, type AvatarTileProps, BarList, type BarListItem, BlockedContext, BlockedDialog, type BlockedFn, type BlockedOptions, ChoiceDrawer, type ChoiceDrawerProps, type ChoiceOption, ColorSwatches, type ColorSwatchesProps, ConfigListDialog, type ConfigListDialogLabels, type ConfigListDialogProps, ConfirmContext, ConfirmDialog, type ConfirmFn, type ConfirmOptions, ConfirmProvider, ConfirmReasonContext, type ConfirmReasonFn, type ConfirmReasonOptions, ConnectionTree, type ConnectionTreeConnection, type ConnectionTreeGroup, type ConnectionTreeItem, type ConnectionTreeProps, DateField, type DateFieldProps, type DatePattern, type DropPlan, type DropPosition, type FieldsLabels, type FlatTreeNode, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HOST_KEY_CHANGED, HOST_KEY_UNKNOWN, type HostKeyAsk, type HostKeyLabels, type LlmCapability, type LlmDriver, type LlmField, type LlmFound, type LlmModel, type LlmProvider, type LlmProviderInput, type LlmPullProgress, LlmSettings, type LlmSettingsApi, type LlmSettingsFormat, type LlmSettingsLabels, type LlmSettingsProps, type LlmSlot, type LlmState, LockedReason, type McpCall, type McpClient, McpSettings, type McpSettingsApi, type McpSettingsLabels, type McpStatus, type McpTool, MobileSheet, type MobileSheetProps, OptionPicker, type OptionPickerLabels, Panel, PanelCard, type PanelCardProps, type PanelItemProps, type PickOption, ProxyFields, type ProxyFieldsLabels, type ProxyValues, type ReasonField, ReleaseNotes, type ReleaseNotesProps, SshFields, type SshFieldsLabels, type SshKind, type SshValues, StatTile, type StatTileProps, TagInput, type TagInputProps, TlsFields, type TlsFieldsLabels, type TlsValues, type TreeData, TreeDndProvider, type TreeDndProviderProps, TreeExpander, type TreeExpanderProps, TreeIcon, type TreeIconProps, TreeLabel, type TreeLabelProps, TreeLines, TreeNode, TreeNodeContent, type TreeNodeContentProps, type TreeNodeProps, TreeNodeTrigger, type TreeNodeTriggerProps, TreeProvider, type TreeProviderProps, TreeView, type TreeViewProps, type TrustOutcome, TzPicker, type TzPickerLabels, type TzPickerProps, UnsavedBadge, buildConnectionTree, connectionNameMatches, datePattern, filterTree, flattenTree, formatDate, hostKeyAsk, loadExpanded, moveId, parseDate, planDrop, proxyDefaults, retryAfterTrust, sameOrder, saveExpanded, sharedWhilePending, sortTree, sshDefaults, tlsDefaults, useBlocked, useConfirm, useConfirmReason, useFormField, useHostKeyTrust, useTreeDndNode, useTreeDndRoot };
|