@qilin-agent/client-ui-primitives 3.1.5 → 3.1.6

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.
@@ -0,0 +1,23 @@
1
+ /** Multi-line inline editor for short saved-on-Enter drafts such as queued messages and goals. */
2
+ /**
3
+ * Render an autofocused textarea that grows with its text up to six lines, then scrolls.
4
+ * A textarea rather than an input: HTML strips newlines from single-line input values.
5
+ * Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing,
6
+ * and Escape cancels.
7
+ * @param props.value - current draft text.
8
+ * @param props.label - localized accessible name.
9
+ * @param props.onChange - receives the edited text.
10
+ * @param props.onSave - called for a plain Enter.
11
+ * @param props.onCancel - called for Escape.
12
+ * @param props.className - extra class for the editor's placement.
13
+ * @returns the textarea.
14
+ */
15
+ export declare function InlineEditor({ value, label, onChange, onSave, onCancel, className }: {
16
+ value: string;
17
+ label: string;
18
+ onChange: (value: string) => void;
19
+ onSave: () => void;
20
+ onCancel: () => void;
21
+ className?: string;
22
+ }): import("react").JSX.Element;
23
+ //# sourceMappingURL=InlineEditor.d.ts.map
@@ -77,17 +77,17 @@ export declare function MenuItemButton({ children, shortcut, icon, disabled, dan
77
77
  * @param props.autoFocus - focus the first item on open; the arrow keys walk the list either way.
78
78
  * @param props.open - whether the list is showing (owner-controlled).
79
79
  * @param props.anchor - the trigger element (rendered in place).
80
- * @param props.items - selectable rows and optional separators.
80
+ * @param props.items - selectable data rows and optional separators (default none; with no `children` either, the list is empty).
81
81
  * @param props.selectedId - row shown as selected.
82
82
  * @param props.selectedIds - rows shown as selected when a menu contains independent option groups.
83
- * @param props.onSelect - row click callback (not called for disabled rows or submenu parents that only open children).
83
+ * @param props.onSelect - data-row activation callback (not called for disabled rows or submenu parents that only open children).
84
84
  * @param props.onClose - invoked on outside click, Escape, or a window blur
85
85
  * that moved focus into an iframe (the only signal a pointerdown inside a
86
86
  * cross-origin iframe leaves).
87
87
  * @param props.align - list alignment against the anchor (default 'start').
88
88
  * @param props.side - open below (`bottom`, default) or above (`top`) the anchor.
89
89
  * @param props.portal - render the list into document.body, fixed-positioned
90
- * from the anchor rect (repositions on scroll/resize while open). Use when an
90
+ * from the anchor rect (follows movement and resizing while open). Use when an
91
91
  * ancestor's overflow clipping would crop the in-place list; default false
92
92
  * keeps the pure-CSS in-place behavior.
93
93
  * @param props.closeOnPointerLeave - close the list once the pointer has left
@@ -100,25 +100,34 @@ export declare function MenuItemButton({ children, shortcut, icon, disabled, dan
100
100
  * directly (e.g. from a host-owned trigger button) instead of measuring the
101
101
  * Menu's own wrapper span. Required when the wrapper isn't itself laid out at
102
102
  * the trigger (render-prop anchors, effect-positioned proxies — measuring the
103
- * wrapper there races the host's layout effects). Called on open and on every
104
- * scroll/resize; return null to skip placement for that frame.
103
+ * wrapper there races the host's layout effects). Called on open, each animation
104
+ * frame, and scroll/resize; return null to skip placement for that frame.
105
105
  * @param props.footer - rows pinned below the scrolling items area, separated
106
106
  * by a hairline; they stay visible while the items above scroll.
107
+ * @param props.children - component rows rendered after `items` in the same
108
+ * list, each a `role="menuitem"` button such as {@link MenuItemButton}; they
109
+ * share the keyboard walk, the submenu exclusivity, and the post-selection
110
+ * focus return.
107
111
  * @param props.selection - how a selected row is marked: a trailing check
108
112
  * (`'check'`, default — figma .Menu_cell) or the hover fill held on the row
109
113
  * with no check (`'fill'`, for icon-labelled rows where a trailing glyph
110
114
  * crowds the cell).
115
+ * @param props.className - extra class on the anchor wrapper span.
116
+ * @param props.listClassName - extra class on the dropdown card itself; the
117
+ * only style hook that reaches a portaled list, which renders under
118
+ * document.body outside the owner's DOM subtree.
111
119
  * @returns anchor wrapper with the conditional list.
112
120
  */
113
- export declare function Menu({ open, anchor, items, selectedId, selectedIds, onSelect, onClose, align, side, portal, closeOnPointerLeave, dense, compact, autoFocus, selection, getAnchorRect, footer, className }: {
121
+ export declare function Menu({ open, anchor, items, children, selectedId, selectedIds, onSelect, onClose, align, side, portal, closeOnPointerLeave, dense, compact, autoFocus, selection, getAnchorRect, footer, className, listClassName }: {
114
122
  open: boolean;
115
123
  autoFocus?: boolean;
116
124
  anchor: ReactNode;
117
- items: readonly MenuEntry[];
125
+ items?: readonly MenuEntry[];
126
+ children?: ReactNode;
118
127
  footer?: readonly MenuEntry[];
119
128
  selectedId?: string | undefined;
120
129
  selectedIds?: readonly string[] | undefined;
121
- onSelect: (id: string) => void;
130
+ onSelect?: (id: string) => void;
122
131
  onClose: () => void;
123
132
  align?: 'start' | 'end';
124
133
  side?: 'bottom' | 'top' | 'right';
@@ -129,5 +138,6 @@ export declare function Menu({ open, anchor, items, selectedId, selectedIds, onS
129
138
  selection?: 'check' | 'fill';
130
139
  getAnchorRect?: () => DOMRect | null;
131
140
  className?: string | undefined;
141
+ listClassName?: string | undefined;
132
142
  }): import("react").JSX.Element;
133
143
  //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1,25 @@
1
+ /** Copy for the control that reveals one masked credential. */
2
+ export interface SecretTextLabels {
3
+ /** Name while the value stays masked. */
4
+ readonly reveal: string;
5
+ /** Name while the value is shown. */
6
+ readonly hide: string;
7
+ }
8
+ /** Props of one masked credential. */
9
+ export interface SecretTextProps {
10
+ /** Display form of the range; line breaks stay in place. */
11
+ readonly masked: string;
12
+ /** Original spelling, revealed on demand, and the identity that re-masks a different value. */
13
+ readonly raw: string;
14
+ /** Reveal-control copy; absent in text that offers no reveal control. */
15
+ readonly labels?: SecretTextLabels | undefined;
16
+ }
17
+ /**
18
+ * Draw one credential masked. Interactive text adds a control that reveals or
19
+ * hides this value; every mount, and every different original value at the same
20
+ * position, starts masked.
21
+ * @param props - the masked form, the original spelling, and optional control copy.
22
+ * @returns the masked run, with the reveal control when copy is supplied.
23
+ */
24
+ export declare function SecretText({ masked, raw, labels }: SecretTextProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=SecretText.d.ts.map
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ /** A tab links its localized label to a caller-owned panel. */
3
+ export interface SegmentedTab<Value extends string = string> {
4
+ value: Value;
5
+ label: ReactNode;
6
+ id: string;
7
+ panelId: string;
8
+ }
9
+ /**
10
+ * Render equal-width, controlled tabs with a sliding selection indicator.
11
+ * @param props.items - non-empty ordered tabs with unique values and DOM ids.
12
+ * @param props.value - selected value, which must belong to items.
13
+ * @param props.onChange - selection requested by click, Left/Right, or Home/End.
14
+ * Keyboard selection also moves focus; only the selected tab is a tab stop.
15
+ * @param props.label - localized accessible name for the tab list.
16
+ * @param props.className - layout placement; panels remain caller-owned.
17
+ * @returns the tab list, without its panels.
18
+ */
19
+ export declare function SegmentedTabs<Value extends string>({ items, value, onChange, label, className }: {
20
+ items: readonly [SegmentedTab<Value>, ...SegmentedTab<Value>[]];
21
+ value: Value;
22
+ onChange: (value: Value) => void;
23
+ label: string;
24
+ className?: string | undefined;
25
+ }): ReactNode;
26
+ //# sourceMappingURL=SegmentedTabs.d.ts.map
@@ -52,6 +52,12 @@ export interface TerminalBlockProps {
52
52
  * output printed so far when there is any, with no copy control until it settles.
53
53
  */
54
54
  running?: boolean | undefined;
55
+ /**
56
+ * The call launches background work (default false). `running` describes the
57
+ * launch call only; after it returns, retain the command without job status
58
+ * or output.
59
+ */
60
+ background?: boolean | undefined;
55
61
  /** Height cap in output lines before the middle collapses (default {@link DEFAULT_TERMINAL_MAX_LINES}); Infinity disables the cap. */
56
62
  maxLines?: number | undefined;
57
63
  /** Extra class merged onto the wrapper (callers position; this component draws). */
@@ -64,5 +70,5 @@ export interface TerminalBlockProps {
64
70
  * @param props - see {@link TerminalBlockProps}.
65
71
  * @returns the terminal block element.
66
72
  */
67
- export declare function TerminalBlock({ command, cwd, home, output, exitCode, signal, running, maxLines, className, labels, }: TerminalBlockProps): import("react").JSX.Element;
73
+ export declare function TerminalBlock({ command, cwd, home, output, exitCode, signal, running, background, maxLines, className, labels, }: TerminalBlockProps): import("react").JSX.Element;
68
74
  //# sourceMappingURL=TerminalBlock.d.ts.map
@@ -8,9 +8,11 @@ export type TooltipSide = 'right' | 'bottom' | 'top';
8
8
  export declare const TooltipSuppression: import("react").Context<((suppressed: boolean) => void) | null>;
9
9
  /** Props Tooltip injects into its anchor child; the child's own handlers are chained ahead of the tooltip's. */
10
10
  interface AnchorProps {
11
+ 'aria-describedby'?: string | undefined;
11
12
  ref?: Ref<HTMLElement> | undefined;
12
13
  onMouseEnter?: MouseEventHandler | undefined;
13
14
  onMouseLeave?: MouseEventHandler | undefined;
15
+ onClick?: MouseEventHandler | undefined;
14
16
  onFocus?: FocusEventHandler | undefined;
15
17
  onBlur?: FocusEventHandler | undefined;
16
18
  }
@@ -20,25 +22,32 @@ type TooltipLabel = string | (() => string);
20
22
  * @param props.label - bubble text, or a resolver evaluated only while the bubble is visible.
21
23
  * @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.
22
24
  * @param props.side - placement relative to the anchor (default 'right').
23
- * @param props.delayMs - hover delay in milliseconds; keyboard focus remains immediate.
25
+ * @param props.delayMs - hover delay in milliseconds (default 0).
26
+ * @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, mouse
27
+ * leave, disabling, and unmount cancel a pending show.
24
28
  * @param props.disabled - suppress the bubble while true; the anchor renders identically so
25
29
  * toggling never remounts it (which would cut its CSS transitions).
26
30
  * @param props.portal - render the bubble under document.body, so an ancestor's clipping or its
27
31
  * stacking context can neither clip the bubble nor paint over it.
28
32
  * @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default
29
33
  * half-viewport cap would render a slab wider than the surface the anchor sits on.
34
+ * @param props.openOnClick - clicking also pins the bubble for reading; another click, Escape,
35
+ * Tab, or an outside pointerdown dismisses it. Defaults to false, leaving an ordinary action
36
+ * tooltip to hover and focus alone.
30
37
  * @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.
31
38
  * An anchor that accepts no ref still positions the bubble: a raise records the element the event ran on.
32
39
  * @returns the cloned anchor plus a fixed-position bubble while hovered/focused.
33
40
  */
34
- export declare function Tooltip({ label, shortcutKeys, side, delayMs, disabled, portal, maxWidth, children }: {
41
+ export declare function Tooltip({ label, shortcutKeys, side, delayMs, focusDelayMs, disabled, portal, maxWidth, openOnClick, children }: {
35
42
  label: TooltipLabel;
36
43
  shortcutKeys?: readonly string[] | undefined;
37
44
  side?: TooltipSide;
38
45
  delayMs?: number;
46
+ focusDelayMs?: number;
39
47
  disabled?: boolean;
40
48
  portal?: boolean;
41
49
  maxWidth?: number;
50
+ openOnClick?: boolean;
42
51
  children: ReactElement<AnchorProps>;
43
52
  }): import("react").JSX.Element;
44
53
  export {};
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The credential formats the scanner recognizes, as data: the literal each
3
+ * format begins with, how its candidate is validated, and the ASCII character
4
+ * classes those checks use. [format-tables.ts](./format-tables.ts) derives
5
+ * lookup tables from this list on first use.
6
+ */
7
+ /** `[A-Za-z0-9_-]` */
8
+ export declare const KEY = 1;
9
+ /** `[A-Za-z0-9]` */
10
+ export declare const ALNUM = 2;
11
+ /** `\w` */
12
+ export declare const WORD = 4;
13
+ /** `[A-Za-z0-9-]` */
14
+ export declare const ALNUM_DASH = 8;
15
+ /** `[A-Z0-9]` */
16
+ export declare const UPPER_ALNUM = 16;
17
+ /** `[A-Z0-9 ]` */
18
+ export declare const LABEL = 32;
19
+ /** `[a-z0-9+.-]` */
20
+ export declare const SCHEME = 64;
21
+ /** `[a-z]` */
22
+ export declare const LOWER = 128;
23
+ /** `[^\s/:@?#]` */
24
+ export declare const USER = 256;
25
+ /** `[^\s/@?#]` */
26
+ export declare const PASSWORD = 512;
27
+ /** A private key block from its `-----BEGIN` line. */
28
+ export declare const KEY_BLOCK = 0;
29
+ /** The password of an address that carries credentials. */
30
+ export declare const ADDRESS = 1;
31
+ /** A provider key or token after its fixed prefix. */
32
+ export declare const PREFIXED = 2;
33
+ /** The whole run, at least `min`. */
34
+ export declare const RUN = 0;
35
+ /** `min` to `max`, then `\b`. */
36
+ export declare const BOUNDED = 1;
37
+ /** At least `min`, with a digit among the first 256. */
38
+ export declare const SK = 2;
39
+ /** Exactly `min`. */
40
+ export declare const GOOGLE = 3;
41
+ /** Three runs joined by `.eyJ` and `.`. */
42
+ export declare const JWT = 4;
43
+ /** One recognized format. */
44
+ export interface CredentialFormat {
45
+ /** ASCII literal the candidate begins with; no literal occurs inside another. */
46
+ readonly literal: string;
47
+ /** Which kind of candidate the literal heads. */
48
+ readonly kind: typeof KEY_BLOCK | typeof ADDRESS | typeof PREFIXED;
49
+ /** Prefixed formats only: how the run after the literal is validated. */
50
+ readonly check: number;
51
+ /** Prefixed formats only: the class bit of the run after the literal. */
52
+ readonly run: number;
53
+ /** Prefixed formats only: run length below which a candidate is not this format. */
54
+ readonly min: number;
55
+ /** Prefixed formats only: longest accepted run for `BOUNDED` and `JWT`. */
56
+ readonly max: number;
57
+ }
58
+ /**
59
+ * Every prefixed format matches more than the eight characters a mask leaves
60
+ * readable, so a near miss never exposes a whole value.
61
+ */
62
+ export declare const CREDENTIAL_FORMATS: readonly CredentialFormat[];
63
+ //# sourceMappingURL=credential-formats.d.ts.map
@@ -0,0 +1,60 @@
1
+ /** Character that replaces each hidden credential character. */
2
+ export declare const MASK = "*";
3
+ /** Builds masks; owns the shared mark strings and its sticky run pattern. */
4
+ export declare class CredentialMasks {
5
+ private readonly marksOnly;
6
+ private readonly marksLf;
7
+ private readonly marksCr;
8
+ /** Code units that `lines` counts without inspection: neither line breaks nor surrogates. Set `lastIndex` before each test. */
9
+ private readonly ordinary;
10
+ /**
11
+ * The display form of `text[start, end)`, whose earliest candidate has `kind`.
12
+ * @param text - the queried text.
13
+ * @param kind - the literal kind of the range's earliest candidate.
14
+ * @param plain - the range holds only prefixed-format characters: ASCII without line breaks.
15
+ * @param start - first offset of the range.
16
+ * @param end - offset after the range.
17
+ * @returns the mask; line breaks stay in place, one mark per code point.
18
+ */
19
+ masked(text: string, kind: number, plain: boolean, start: number, end: number): string;
20
+ /**
21
+ * Marks for a run of hidden characters.
22
+ * @param count - how many marks.
23
+ * @returns `count` marks, one slice of the shared string where it reaches.
24
+ */
25
+ private marks;
26
+ /**
27
+ * Marks, then one line break, in a single slice.
28
+ * @param count - how many marks.
29
+ * @param code - the line break's code unit, 10 or 13.
30
+ * @returns `count` marks and that line break.
31
+ */
32
+ private marksThen;
33
+ /**
34
+ * Keep the `BEGIN` line, the `END` line when present, and every line break; a block written on
35
+ * one line is masked whole. Both searches stay inside the range, so they cost what the mask costs.
36
+ * @param text - the queried text.
37
+ * @param start - first offset of the range.
38
+ * @param end - offset after the range.
39
+ * @returns the masked block.
40
+ */
41
+ private keyBlock;
42
+ /**
43
+ * Replace every character except line breaks; a surrogate pair is one character,
44
+ * as `[^\r\n]` with the `u` flag counts it. A character loop: a native run could read far past `end`.
45
+ * @param text - the queried text.
46
+ * @param start - first offset of the range.
47
+ * @param end - offset after the range.
48
+ * @returns the masked range.
49
+ */
50
+ private range;
51
+ /**
52
+ * `range` for a body that ends at a line break or the end of the text, where native runs stop.
53
+ * @param text - the queried text.
54
+ * @param start - first offset of the range.
55
+ * @param end - offset after the range.
56
+ * @returns the masked body.
57
+ */
58
+ private lines;
59
+ }
60
+ //# sourceMappingURL=credential-masks.d.ts.map
@@ -0,0 +1,146 @@
1
+ import { type FormatTables } from './format-tables.ts';
2
+ /** One recognized credential range, with the display form that masks it. */
3
+ export interface SecretRange {
4
+ readonly start: number;
5
+ readonly end: number;
6
+ /** Display form of the original range; line breaks stay in place. */
7
+ readonly masked: string;
8
+ }
9
+ /**
10
+ * One scanner's state: the tables, its own patterns, and a memo of the last
11
+ * queried text, which it keeps until a query for another text. Queries are
12
+ * synchronous and never re-enter, so the patterns' cursors are never shared.
13
+ */
14
+ export declare class CredentialScanner {
15
+ private readonly classes;
16
+ private readonly literals;
17
+ private readonly literalLength;
18
+ private readonly literalKind;
19
+ private readonly literalCheck;
20
+ private readonly literalMin;
21
+ private readonly literalMax;
22
+ private readonly literalOverlap;
23
+ private readonly ending;
24
+ private readonly sharedEndings;
25
+ /** Memo slot of each prefixed format's run class; 0 for `[A-Za-z0-9_-]`, which has four. */
26
+ private readonly literalSlot;
27
+ private readonly literalPattern;
28
+ private readonly prefixes;
29
+ private readonly keyRun;
30
+ private readonly userRun;
31
+ private readonly passwordRun;
32
+ private readonly nonDigits;
33
+ private readonly masks;
34
+ private readonly memo;
35
+ private text;
36
+ /**
37
+ * Build one scanner over shared tables.
38
+ * @param tables - the tables every scanner shares.
39
+ */
40
+ constructor(tables: FormatTables);
41
+ /**
42
+ * The nearest credential at or after `from`. Overlapping candidates of any format join the earliest
43
+ * one and take its mask, so no credential is drawn half masked. Candidates arrive in start order;
44
+ * an address password waits until the scan passes its start, and no other `://` can occur before
45
+ * then, because a user name and a password exclude `/`. A password that starts inside a range also
46
+ * ends inside it: the range holds the `:` before the password, so it is a key block, whose `END`
47
+ * line has spaces, or one that runs to the end of the text.
48
+ * @param text - the complete original text.
49
+ * @param from - the query offset.
50
+ * @returns the nearest credential range, or undefined when none starts at or after `from`.
51
+ */
52
+ match(text: string, from: number): SecretRange | undefined;
53
+ /**
54
+ * Memo entry at `index`; the layout keeps every index inside the array.
55
+ * @param index - the memo index.
56
+ * @returns the stored offset.
57
+ */
58
+ private slot;
59
+ /**
60
+ * `\w` at one offset; out of range is not a word character.
61
+ * @param index - the offset to read.
62
+ * @returns whether the code unit is a word character.
63
+ */
64
+ private isWordAt;
65
+ /**
66
+ * `[^\s/:@?#]` for one UTF-16 code unit; NaN, read out of range, is not one.
67
+ * @param code - the code unit.
68
+ * @returns whether the code unit may appear in an address user name.
69
+ */
70
+ private isUserCode;
71
+ /**
72
+ * Index of the literal the prefix scan matched ending at `end`; one literal sharing the ending matches, so the last needs no check.
73
+ * @param end - the offset after the matched literal.
74
+ * @returns the literal's index.
75
+ */
76
+ private literalEndingAt;
77
+ /**
78
+ * End of the `[A-Za-z0-9_-]*` run at `start`, through four memo pairs replaced in turn.
79
+ * @param start - the run's first offset.
80
+ * @returns the offset after the run.
81
+ */
82
+ private keyRunEnd;
83
+ /**
84
+ * End of the run `pattern` matches at `start`, through the memo pair at `slot`.
85
+ * @param pattern - the sticky run pattern.
86
+ * @param start - the run's first offset.
87
+ * @param slot - the memo pair to fill.
88
+ * @returns the offset after the run.
89
+ */
90
+ private memoRunEnd;
91
+ /**
92
+ * Offset of the first digit at or after `start`, or the text length.
93
+ * @param start - the offset to search from.
94
+ * @returns the digit's offset.
95
+ */
96
+ private nextDigit;
97
+ /**
98
+ * Offset after `[A-Z0-9 ]{0,40}PRIVATE KEY-----` at `start`, or -1; reads at most 52 characters.
99
+ * @param start - the offset the label starts at.
100
+ * @returns the offset after the header label, or -1.
101
+ */
102
+ private labelEnd;
103
+ /**
104
+ * End of the `-----BEGIN [A-Z0-9 ]{0,40}PRIVATE KEY-----` block at `at`: after its first complete
105
+ * `END` line, or the end of the text; -1 for an invalid header.
106
+ * @param at - the offset of the `-----BEGIN ` literal.
107
+ * @returns the offset after the block, or -1.
108
+ */
109
+ private keyBlockEnd;
110
+ /**
111
+ * Whether `\b[a-z][a-z0-9+.-]{1,15}` ends at `at`; reads at most 17 characters back.
112
+ * @param at - the offset after the scheme.
113
+ * @returns whether a scheme ends there.
114
+ */
115
+ private schemeBefore;
116
+ /**
117
+ * The password in `\b[a-z][a-z0-9+.-]{1,15}://[^\s/:@?#]{0,256}:[^\s/@?#]+@` for the `://` at
118
+ * `at`; neither part crosses `?` or `#`, where the authority ends. Callers pass a `://` at or after
119
+ * the query offset, or one whose user name reaches it, so the password never starts before it.
120
+ * @param at - the offset of the `://` literal.
121
+ * @returns the password end with its start in the memo, or -1.
122
+ */
123
+ private addressPassword;
124
+ /**
125
+ * The address password at or after `from` whose `://` starts before `from`, as `addressPassword`
126
+ * returns it. The walk back over the user name runs only when a `:`, a password, and `@` follow.
127
+ * @param from - the query offset.
128
+ * @returns the password end with its start in the memo, or -1.
129
+ */
130
+ private addressBefore;
131
+ /**
132
+ * End of the prefixed credential whose literal starts at `at`, or -1.
133
+ * @param literal - the literal's index.
134
+ * @param at - the offset of the literal.
135
+ * @returns the offset after the credential, or -1.
136
+ */
137
+ private prefixedEnd;
138
+ }
139
+ /**
140
+ * Every credential in `text`, in start order, each with the display form that
141
+ * masks it.
142
+ * @param text - the original user text.
143
+ * @returns the masked ranges; empty when the text holds no recognized credential.
144
+ */
145
+ export declare function scanSecrets(text: string): readonly SecretRange[];
146
+ //# sourceMappingURL=credential-scanner.d.ts.map
@@ -0,0 +1,29 @@
1
+ /** Tables indexed by format position in `CREDENTIAL_FORMATS`, by ASCII code unit, or by a literal's last two code units. */
2
+ export interface FormatTables {
3
+ /** Class bits per ASCII code unit. */
4
+ readonly classes: Uint16Array;
5
+ readonly literals: readonly string[];
6
+ readonly literalLength: Uint8Array;
7
+ readonly literalKind: Uint8Array;
8
+ readonly literalCheck: Uint8Array;
9
+ readonly literalRun: Uint16Array;
10
+ readonly literalMin: Int32Array;
11
+ readonly literalMax: Int32Array;
12
+ /**
13
+ * Length of the longest proper suffix of each literal that begins a literal.
14
+ * The scan resumes there, so a key block whose first dash ends `sk-` is still seen.
15
+ */
16
+ readonly literalOverlap: Uint8Array;
17
+ /** Literal-only alternation of every literal, grouped by shared leading characters; no quantifier. */
18
+ readonly prefixSource: string;
19
+ /** Per key `code[-2] * 128 + code[-1]`: the literal with that ending plus one, or -1 where several share it. */
20
+ readonly ending: Int8Array;
21
+ /** Literals sharing an ending, by the same key. */
22
+ readonly sharedEndings: readonly (readonly number[] | undefined)[];
23
+ }
24
+ /**
25
+ * The tables for `CREDENTIAL_FORMATS`; the first call builds them.
26
+ * @returns the shared, read-only tables.
27
+ */
28
+ export declare function formatTables(): FormatTables;
29
+ //# sourceMappingURL=format-tables.d.ts.map
@@ -208,7 +208,13 @@ export declare const IconMicrophoneOutline16: ({ size, className }: IconProps) =
208
208
  export declare const IconPinOutlineRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
209
209
  /** Filled twin of {@link IconPinOutlineRegular}: the pinned-row marker. */
210
210
  export declare const IconPinFillRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
211
+ /** Circle-and-tick glyph the plugin page marks shipped rows with; upstream artwork. */
212
+ export declare const IconCheckCircleFillRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
211
213
  export declare const IconUsersOutlineRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
212
214
  export declare const IconWorkspaceTreeOutlineRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
213
- export { IconBranchOutline16 as IconBranchOutlineRegular, IconCheckOutline16 as IconCheckOutlineRegular, IconChecklistOutline14 as IconChecklistOutlineRegular, IconChevronDownOutline14 as IconChevronDownOutlineMedium, IconChevronUpOutline14 as IconChevronUpOutlineMedium, IconCloseOutline16 as IconCloseOutlineRegular, IconCopyOutline16 as IconCopyOutlineRegular, IconPlusOutline16 as IconPlusOutlineRegular, IconSearchOutline16 as IconSearchOutlineRegular, IconSendOutline16 as IconSendOutlineRegular, IconSettingsOutline14 as IconSettingsOutlineMedium, IconUserOutline16 as IconUserOutlineRegular, };
215
+ /** Regular one-pixel IconSlidersTwoOutline artwork (Filters and Labels menu rows). */
216
+ export declare const IconSlidersTwoOutlineRegular: ({ size, className }: IconProps) => import("react").JSX.Element;
217
+ /** Medium IconSlidersTwoOutline artwork with a 1.3px stroke. */
218
+ export declare const IconSlidersTwoOutlineMedium: ({ size, className }: IconProps) => import("react").JSX.Element;
219
+ export { IconBranchOutline16 as IconBranchOutlineRegular, IconCheckOutline16 as IconCheckOutlineRegular, IconChecklistOutline14 as IconChecklistOutlineRegular, IconChevronDownOutline14 as IconChevronDownOutlineRegular, IconChevronLeftOutline14 as IconChevronLeftOutlineMedium, IconChevronRightOutline14 as IconChevronRightOutlineRegular, IconChevronDownOutline14 as IconChevronDownOutlineMedium, IconChevronUpOutline14 as IconChevronUpOutlineMedium, IconCloseOutline16 as IconCloseOutlineMedium, IconCloseOutline16 as IconCloseOutlineRegular, IconCopyOutline16 as IconCopyOutlineRegular, IconDownloadOutline16 as IconDownloadOutlineRegular, IconInfoOutline14 as IconInfoOutlineRegular, IconPluginPinwheelOutline16 as IconPluginPinwheelOutlineRegular, IconPlusOutline16 as IconPlusOutlineRegular, IconRefreshOutline14 as IconRefreshOutlineRegular, IconSearchOutline16 as IconSearchOutlineRegular, IconSendOutline16 as IconSendOutlineRegular, IconTrashOutline16 as IconTrashOutlineRegular, IconSettingsOutline14 as IconSettingsOutlineMedium, IconUserOutline16 as IconUserOutlineRegular, IconWarningOutline16 as IconWarningOutlineRegular, };
214
220
  //# sourceMappingURL=index.d.ts.map
@@ -18,11 +18,15 @@ export type { ButtonVariant } from './Button.tsx';
18
18
  export { Pill } from './Pill.tsx';
19
19
  export { SegmentedControl } from './SegmentedControl.tsx';
20
20
  export type { SegmentedControlOption } from './SegmentedControl.tsx';
21
+ export { SegmentedTabs } from './SegmentedTabs.tsx';
22
+ export type { SegmentedTab } from './SegmentedTabs.tsx';
23
+ export * from './plugin-artwork.tsx';
21
24
  export { Tag } from './Tag.tsx';
22
25
  export type { TagTone } from './Tag.tsx';
23
26
  export { Switch } from './Switch.tsx';
24
27
  export { Checkbox } from './Checkbox.tsx';
25
28
  export { Input } from './Input.tsx';
29
+ export { InlineEditor } from './InlineEditor.tsx';
26
30
  export { Menu, MenuItemButton } from './Menu.tsx';
27
31
  export type { MenuItemButtonProps, MenuEntry, MenuItem, MenuSeparator, MenuLabel } from './Menu.tsx';
28
32
  export { ShortcutKeys } from './ShortcutKeys.tsx';
@@ -48,9 +52,10 @@ export type { LinkIconKind, LinkIconProps } from './LinkIcon.tsx';
48
52
  export { FileTypeIcon, classifyFileType, fileExtension } from './FileTypeIcon.tsx';
49
53
  export type { CodeFileType, FileType, FileTypeIconProps, FileTypeKind, FileTypeProjectContext, } from './FileTypeIcon.tsx';
50
54
  export { PathLabel } from './PathLabel.tsx';
51
- export { projectUserText, type UserTextReferences } from './user-text.tsx';
55
+ export { projectUserText, type UserTextReferences, type UserTextSecretLabels } from './user-text.tsx';
52
56
  export { Tooltip } from './Tooltip.tsx';
53
57
  export type { TooltipSide } from './Tooltip.tsx';
58
+ export { pointerModality } from './input-modality.ts';
54
59
  export { focusWithoutRing } from './focus.ts';
55
60
  export { observeComposition } from './keyboard-composition.ts';
56
61
  export { closeTopModal, isBehindModal, modalSelector, useModalLayer } from './useModalLayer.ts';
@@ -0,0 +1,17 @@
1
+ import type { IconProps } from './icons/props.ts';
2
+ /** Light-blue terminal artwork shared by plugin cards and sidebar guide entries. */
3
+ export declare const PluginArtworkTerminal: ({ size, className }: IconProps) => import("react").JSX.Element;
4
+ /** Agent-loop plugin artwork (four leaves circling a center). */
5
+ export declare const PluginArtworkLoop: ({ size, className }: IconProps) => import("react").JSX.Element;
6
+ /** Subagent plugin artwork (two stacked rounded squares); also marks every row inside a bundle. */
7
+ export declare const PluginArtworkSubagent: ({ size, className }: IconProps) => import("react").JSX.Element;
8
+ /**
9
+ * Web-search plugin artwork (conic-gradient ring and handle). SVG has no
10
+ * native conic gradient, so the ring clips an HTML div painted with CSS
11
+ * `conic-gradient` — the same emulation Figma exports; it renders inline in
12
+ * the browser UI but would stay empty in an `<img>` or mask context.
13
+ */
14
+ export declare const PluginArtworkSearch: ({ size, className }: IconProps) => import("react").JSX.Element;
15
+ /** Default plugin artwork for plugins without one of their own (connector blocks and a node). */
16
+ export declare const PluginArtworkDefault: ({ size, className }: IconProps) => import("react").JSX.Element;
17
+ //# sourceMappingURL=plugin-artwork.d.ts.map
@@ -20,6 +20,8 @@ export interface AnchoredPositionOptions {
20
20
  panelRef: RefObject<HTMLElement | null>;
21
21
  /** Which anchor edge the panel hangs from: below it (`bottom`, the default) or above it (`top`). */
22
22
  side?: 'top' | 'bottom';
23
+ /** Which anchor edge the panel lines up with: its left edge (`start`, the default) or its right edge (`end`). */
24
+ align?: 'start' | 'end';
23
25
  /** Distance kept between the anchor edge named by `side` and the panel. */
24
26
  gap: number;
25
27
  /** Distance kept between the panel and each viewport edge. */
@@ -27,7 +29,7 @@ export interface AnchoredPositionOptions {
27
29
  }
28
30
  /**
29
31
  * Track an anchor and return the panel's fixed coordinates.
30
- * @param options - the open state, the two refs, the placement side, and the gap/margin distances.
32
+ * @param options - the open state, the two refs, the placement side and alignment, and the gap/margin distances.
31
33
  * @returns `left`/`top` for the panel, or `null` before the first measurement.
32
34
  */
33
35
  export declare function useAnchoredPosition(options: AnchoredPositionOptions): CSSProperties | null;
@@ -12,7 +12,10 @@
12
12
  * stray `/word` stays plain text. A `/name` token is whitespace-bounded like
13
13
  * the host skill gesture (`qilin-tool-skill`): it ends at whitespace or the
14
14
  * text end, so slash paths (`/nfs-hg/xxx`, `/plan.md`) and punctuation-glued
15
- * tokens (`/plan。`) stay plain even for a loaded name.
15
+ * tokens (`/plan。`) stay plain even for a loaded name. A recognized credential
16
+ * always draws masked, ahead of every reference decoration, and only the display
17
+ * changes: the logged text, the copied text, and the model input keep the original
18
+ * characters.
16
19
  */
17
20
  import type { ReactNode } from 'react';
18
21
  /** Optional navigation supplied by consumers that can preview references. */
@@ -22,6 +25,13 @@ export interface UserTextReferences {
22
25
  /** Open the source of a skill loaded for this message. */
23
26
  openSkill: (name: string) => void;
24
27
  }
28
+ /** Accessible names of the control that reveals one masked credential. */
29
+ export interface UserTextSecretLabels {
30
+ /** Name while the value stays masked. */
31
+ readonly reveal: string;
32
+ /** Name while the value is shown. */
33
+ readonly hide: string;
34
+ }
25
35
  /**
26
36
  * Split one sent text into inline plain runs and reference chips.
27
37
  * @param text - the logged model text of the message or queue row.
@@ -31,7 +41,8 @@ export interface UserTextReferences {
31
41
  * (unsent queue rows pass none).
32
42
  * @param slashKind - the chip kind those tokens render as.
33
43
  * @param references - optional file and skill preview actions; session and command tokens stay labels.
44
+ * @param secretLabels - reveal-control copy for credentials; absent in text that stays masked.
34
45
  * @returns inline nodes covering the whole text.
35
46
  */
36
- export declare function projectUserText(text: string, sessionLabels: readonly string[], slashNames?: readonly string[], slashKind?: 'skill' | 'command', references?: UserTextReferences): ReactNode;
47
+ export declare function projectUserText(text: string, sessionLabels: readonly string[], slashNames?: readonly string[], slashKind?: 'skill' | 'command', references?: UserTextReferences, secretLabels?: UserTextSecretLabels): ReactNode;
37
48
  //# sourceMappingURL=user-text.d.ts.map