reifyui 0.5.0 → 0.6.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 +40 -3
- package/dist/{chunk-2LYV4PIX.js → chunk-NTIWFHR4.js} +26 -2
- package/dist/chunk-NTIWFHR4.js.map +1 -0
- package/dist/harness.cjs +72 -21
- package/dist/harness.cjs.map +1 -1
- package/dist/harness.d.ts +23 -0
- package/dist/harness.js +52 -23
- package/dist/harness.js.map +1 -1
- package/dist/index.cjs +1166 -326
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +263 -1
- package/dist/index.js +1141 -323
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Card.jsx +49 -0
- package/src/components/Carousel.jsx +73 -0
- package/src/components/ChatPanel.jsx +461 -0
- package/src/components/Chip.jsx +61 -0
- package/src/components/Composer.jsx +20 -1
- package/src/components/Dialog.jsx +5 -10
- package/src/components/Modal.jsx +75 -0
- package/src/components/Popover.jsx +86 -0
- package/src/components/SearchField.jsx +30 -0
- package/src/components/icons.jsx +9 -0
- package/src/components/overlay.js +63 -0
- package/src/format.js +10 -0
- package/src/harness/attach.js +63 -0
- package/src/harness/index.d.ts +23 -0
- package/src/harness/index.js +6 -18
- package/src/hooks/useTypewriter.js +53 -0
- package/src/index.d.ts +263 -1
- package/src/index.js +27 -1
- package/src/input/dictate.js +60 -0
- package/src/sheet/SheetGrid.jsx +5 -1
- package/src/state/turns.js +30 -0
- package/styles/chat.css +127 -1
- package/styles/chip.css +53 -0
- package/styles/dialog.css +42 -37
- package/styles/library.css +205 -0
- package/styles/preview.css +73 -0
- package/styles/sheet.css +16 -14
- package/styles/themes/dark.css +20 -0
- package/styles/themes/light.css +23 -0
- package/dist/chunk-2LYV4PIX.js.map +0 -1
package/src/index.d.ts
CHANGED
|
@@ -90,6 +90,26 @@ export function createConversationStore(
|
|
|
90
90
|
makeInitial?: (key: string) => unknown,
|
|
91
91
|
): ConversationStore;
|
|
92
92
|
|
|
93
|
+
// ── history replay ──────────────────────────────────────────────────────────
|
|
94
|
+
/** One turn as the gateway records it: the person's text, the assistant's, and the tools between. */
|
|
95
|
+
export interface Turn {
|
|
96
|
+
user?: string;
|
|
97
|
+
assistant?: string;
|
|
98
|
+
status?: string;
|
|
99
|
+
tools?: Array<{ name: string; arguments?: string; result?: unknown }>;
|
|
100
|
+
}
|
|
101
|
+
/** A rendered message: a user line, or an assistant turn as its ordered blocks. */
|
|
102
|
+
export interface ChatMessage {
|
|
103
|
+
role: 'user' | 'assistant';
|
|
104
|
+
text?: string;
|
|
105
|
+
blocks?: Block[];
|
|
106
|
+
status?: 'running' | 'done' | 'failed' | 'cancelled' | 'incomplete';
|
|
107
|
+
/** Names of the files sent WITH this message. ChatPanel sets it on send; history never has it. */
|
|
108
|
+
files?: string[];
|
|
109
|
+
}
|
|
110
|
+
/** Gateway turns -> the message shape ChatMessages and ChatPanel render. */
|
|
111
|
+
export function turnsToMessages(turns: Turn[]): ChatMessage[];
|
|
112
|
+
|
|
93
113
|
// ── icons ───────────────────────────────────────────────────────────────────
|
|
94
114
|
export const Svg: ComponentType<{ s?: number; children?: ReactNode }>;
|
|
95
115
|
export const Chevron: ComponentType<{ dir?: 'left' | 'right' | 'down'; size?: number }>;
|
|
@@ -106,6 +126,10 @@ export const IcSpawn: ComponentType;
|
|
|
106
126
|
export const IcCheck: ComponentType;
|
|
107
127
|
export const IcThink: ComponentType;
|
|
108
128
|
export const IcSend: ComponentType;
|
|
129
|
+
export const IcX: ComponentType<{ size?: number }>;
|
|
130
|
+
export const IcMic: ComponentType<{ size?: number }>;
|
|
131
|
+
export const IcPaperclip: ComponentType<{ size?: number }>;
|
|
132
|
+
export const IcPanelRight: ComponentType<{ size?: number }>;
|
|
109
133
|
|
|
110
134
|
// ── tool metadata helpers ─────────────────────────────────────────────────────
|
|
111
135
|
export function humanize(name: string): string;
|
|
@@ -141,9 +165,244 @@ export const ChatMessagesSkeleton: ComponentType<Record<string, unknown>>;
|
|
|
141
165
|
export const UserTurn: ComponentType<Record<string, unknown>>;
|
|
142
166
|
export const AssistantTurn: ComponentType<Record<string, unknown>>;
|
|
143
167
|
export const DEFAULT_STATUS_LABELS: Record<string, string>;
|
|
144
|
-
|
|
168
|
+
|
|
169
|
+
export interface ComposerProps {
|
|
170
|
+
value: string;
|
|
171
|
+
onChange: (value: string) => void;
|
|
172
|
+
onSend: () => void;
|
|
173
|
+
/** Disables the textarea itself. */
|
|
174
|
+
disabled?: boolean;
|
|
175
|
+
/** Disables the send button — and, since 0.6.0, the Enter key with it. */
|
|
176
|
+
sendDisabled?: boolean;
|
|
177
|
+
placeholder?: string;
|
|
178
|
+
rows?: number;
|
|
179
|
+
/** Grow to fit the text, up to maxRows, then scroll. Exclusive with a CSS min-height. */
|
|
180
|
+
autoGrow?: boolean;
|
|
181
|
+
maxRows?: number;
|
|
182
|
+
autoFocus?: boolean;
|
|
183
|
+
/** The accessible name. Give one whenever the placeholder animates — it is otherwise the only
|
|
184
|
+
* name the field has, and it changes every few seconds. */
|
|
185
|
+
inputAriaLabel?: string;
|
|
186
|
+
/** Node rendered ABOVE the textarea, e.g. a row of staged attachments. */
|
|
187
|
+
attachments?: ReactNode;
|
|
188
|
+
accessoriesLeft?: ReactNode;
|
|
189
|
+
accessoriesRight?: ReactNode;
|
|
190
|
+
/** Replaces the default send button entirely. */
|
|
191
|
+
renderSend?: () => ReactNode;
|
|
192
|
+
/** Each REPLACES the default class, so a product restyles wholesale instead of fighting it. */
|
|
193
|
+
classNames?: { root?: string; input?: string; row?: string };
|
|
194
|
+
inputRef?: { current: HTMLTextAreaElement | null };
|
|
195
|
+
}
|
|
196
|
+
export const Composer: ComponentType<ComposerProps>;
|
|
145
197
|
export const CodeBlock: ComponentType<{ code?: string; lang?: string; [k: string]: unknown }>;
|
|
146
198
|
|
|
199
|
+
// ── ChatPanel: the whole conversation column ─────────────────────────────────
|
|
200
|
+
/** A file picked but not yet sent. `payload` is whatever the caller's prepare() produced and the
|
|
201
|
+
* panel never looks inside it — it hands the list straight back to runTurn. */
|
|
202
|
+
export interface StagedFile {
|
|
203
|
+
name: string;
|
|
204
|
+
size?: number;
|
|
205
|
+
payload?: unknown;
|
|
206
|
+
/** True between the pick and prepare() resolving. The panel sets it; prepare() never returns it. */
|
|
207
|
+
pending?: boolean;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** The dispatcher's callbacks, plus the session id a brand-new document learns mid-stream. */
|
|
211
|
+
export type TurnHandlers = ResponseHandlers;
|
|
212
|
+
|
|
213
|
+
/** Run one turn. The panel does not know whether that is one stream, a stream with a fallback, or
|
|
214
|
+
* three requests — only that progress arrives through `handlers`.
|
|
215
|
+
* Resolve `{ connecting: true }` when the backend is not up yet: the panel then holds the
|
|
216
|
+
* message (with its files) and retries, instead of showing a failed turn. */
|
|
217
|
+
export type RunTurn = (args: {
|
|
218
|
+
sessionId: string;
|
|
219
|
+
text: string;
|
|
220
|
+
attachments: StagedFile[];
|
|
221
|
+
handlers: TurnHandlers;
|
|
222
|
+
}) => Promise<{ connecting?: boolean } | void>;
|
|
223
|
+
|
|
224
|
+
/** The conversation so far, already as messages — callers write `.then(turnsToMessages)`. A
|
|
225
|
+
* caller whose brand-new document has no session yet resolves [] here without a request. */
|
|
226
|
+
export type LoadHistory = (sessionId: string) => Promise<ChatMessage[]>;
|
|
227
|
+
|
|
228
|
+
export interface ChatPanelProps {
|
|
229
|
+
/** Opaque to the panel: it is never parsed, so a placeholder id for an unsaved document is
|
|
230
|
+
* fine. When it changes mid-stream to the real id, the panel recognises its own adoption and
|
|
231
|
+
* does not reload over the turn arriving live. */
|
|
232
|
+
sessionId: string;
|
|
233
|
+
runTurn: RunTurn;
|
|
234
|
+
loadHistory: LoadHistory;
|
|
235
|
+
/** The turn opened a session. Adopt the id — the panel will not treat that as a new document. */
|
|
236
|
+
onSessionStarted?: (sessionId: string) => void;
|
|
237
|
+
/** A turn finished (here, or elsewhere): the document may have changed underneath. */
|
|
238
|
+
onChanged?: () => void;
|
|
239
|
+
|
|
240
|
+
/** A first message carried in from somewhere else (a landing prompt). Sent once, and only when
|
|
241
|
+
* there is no history. */
|
|
242
|
+
seed?: string;
|
|
243
|
+
/** Fires before the history request whenever a seed was supplied — strip it from the URL here,
|
|
244
|
+
* so a refresh or a back-button cannot resend it. */
|
|
245
|
+
onSeedConsumed?: () => void;
|
|
246
|
+
|
|
247
|
+
/** A turn is running that this panel did not start (another tab, or the first turn before the
|
|
248
|
+
* session is queryable). The panel polls history while it is true and reloads once when it
|
|
249
|
+
* goes false. */
|
|
250
|
+
externalBusy?: boolean;
|
|
251
|
+
|
|
252
|
+
/** Enables the attach control. prepare() turns a File into the entry runTurn will receive; it
|
|
253
|
+
* rejects with the message the person sees. Null (default) renders no control at all. */
|
|
254
|
+
attachments?: {
|
|
255
|
+
prepare: (file: File) => Promise<StagedFile>;
|
|
256
|
+
accept?: string;
|
|
257
|
+
/** Default true. */
|
|
258
|
+
multiple?: boolean;
|
|
259
|
+
} | null;
|
|
260
|
+
/** From createDictation(), built ONCE (useState(() => createDictation())) — a new object every
|
|
261
|
+
* render stops the recogniser every render. Null (default) renders no microphone, never a
|
|
262
|
+
* disabled one. */
|
|
263
|
+
dictation?: {
|
|
264
|
+
start(handlers: { onText?: (text: string) => void; onEnd?: () => void; onError?: (message: string) => void }): void;
|
|
265
|
+
stop(): void;
|
|
266
|
+
} | null;
|
|
267
|
+
|
|
268
|
+
title?: string;
|
|
269
|
+
/** Header content after the title, e.g. a "the agent is working" mark. */
|
|
270
|
+
headerRight?: ReactNode;
|
|
271
|
+
collapsed?: boolean;
|
|
272
|
+
/** Absent → the collapse toggle is not rendered. */
|
|
273
|
+
onToggleCollapse?: () => void;
|
|
274
|
+
/** Panel width in px, from your own drag handle. Ignored while collapsed. */
|
|
275
|
+
width?: number;
|
|
276
|
+
|
|
277
|
+
placeholder?: string;
|
|
278
|
+
/** Shown when there is no conversation. */
|
|
279
|
+
emptyState?: ReactNode;
|
|
280
|
+
/** Shown INSTEAD of emptyState while externalBusy and empty — never falls back to it: a blank
|
|
281
|
+
* "describe what you want" prompt is a dead end while the agent is visibly working. */
|
|
282
|
+
busyState?: ReactNode;
|
|
283
|
+
connectingLabel?: string;
|
|
284
|
+
connectingNote?: ReactNode;
|
|
285
|
+
workingLabel?: string;
|
|
286
|
+
statusLabels?: { failed?: string; cancelled?: string; incomplete?: string };
|
|
287
|
+
renderMarkdown?: (text: string) => ReactNode;
|
|
288
|
+
/** Extra content inside a user bubble. Return undefined to fall through to the built-in file
|
|
289
|
+
* chips, the same contract ChatMessages uses. */
|
|
290
|
+
userExtras?: (message: ChatMessage, index: number) => ReactNode | undefined;
|
|
291
|
+
toolLabels?: Record<string, string>;
|
|
292
|
+
/** The panel's placement in YOUR layout. Everything it paints inside is the package's. */
|
|
293
|
+
classNames?: { root?: string };
|
|
294
|
+
}
|
|
295
|
+
export const ChatPanel: ComponentType<ChatPanelProps>;
|
|
296
|
+
|
|
297
|
+
// ── voice input ─────────────────────────────────────────────────────────────
|
|
298
|
+
export interface Dictation {
|
|
299
|
+
/** onText fires once per finished phrase, so a draft grows as you speak. */
|
|
300
|
+
start(handlers: {
|
|
301
|
+
onText?: (text: string) => void;
|
|
302
|
+
onEnd?: () => void;
|
|
303
|
+
onError?: (message: string) => void;
|
|
304
|
+
}): void;
|
|
305
|
+
stop(): void;
|
|
306
|
+
}
|
|
307
|
+
/** Null where the browser has no recogniser — render nothing, not a disabled button. */
|
|
308
|
+
export function createDictation(options?: { lang?: string }): Dictation | null;
|
|
309
|
+
|
|
310
|
+
/** A byte count as a person reads it. null/undefined -> '' (unknown is not zero). */
|
|
311
|
+
export function bytesLabel(bytes: number | null | undefined): string;
|
|
312
|
+
|
|
313
|
+
// ── library page pieces ─────────────────────────────────────────────────────
|
|
314
|
+
export interface CarouselProps {
|
|
315
|
+
/** Names the scroll region and its buttons ("Scroll templates left"). */
|
|
316
|
+
label: string;
|
|
317
|
+
/** px per press. Defaults to 90% of the visible width. */
|
|
318
|
+
step?: number;
|
|
319
|
+
children?: ReactNode;
|
|
320
|
+
classNames?: { root?: string; viewport?: string; button?: string };
|
|
321
|
+
}
|
|
322
|
+
/** Buttons disable at each edge and are not rendered at all when the content already fits.
|
|
323
|
+
* Item width comes from --uic-car-item (default 236px). */
|
|
324
|
+
export const Carousel: ComponentType<CarouselProps>;
|
|
325
|
+
|
|
326
|
+
export interface CardProps {
|
|
327
|
+
/** The thumbnail node; this component supplies the box around it. */
|
|
328
|
+
art?: ReactNode;
|
|
329
|
+
title: ReactNode;
|
|
330
|
+
subtitle?: ReactNode;
|
|
331
|
+
/** Makes art + title one button. Omit while an inline rename field is in `title`. */
|
|
332
|
+
onClick?: () => void;
|
|
333
|
+
selected?: boolean;
|
|
334
|
+
/** Floats over the art on hover; always visible where there is no hover. */
|
|
335
|
+
overlay?: ReactNode;
|
|
336
|
+
/** Sits in the title row — a sibling of the main button, never inside it. */
|
|
337
|
+
actions?: ReactNode;
|
|
338
|
+
classNames?: { root?: string };
|
|
339
|
+
}
|
|
340
|
+
export const Card: ComponentType<CardProps>;
|
|
341
|
+
|
|
342
|
+
export interface ChipProps {
|
|
343
|
+
label: ReactNode;
|
|
344
|
+
icon?: ReactNode;
|
|
345
|
+
title?: string;
|
|
346
|
+
selected?: boolean;
|
|
347
|
+
onClick?: () => void;
|
|
348
|
+
onRemove?: () => void;
|
|
349
|
+
/** Required with onRemove: "✕" alone does not say which of five chips it removes. */
|
|
350
|
+
removeLabel?: string;
|
|
351
|
+
className?: string;
|
|
352
|
+
}
|
|
353
|
+
export const Chip: ComponentType<ChipProps>;
|
|
354
|
+
|
|
355
|
+
export interface SearchFieldProps {
|
|
356
|
+
value: string;
|
|
357
|
+
onChange: (value: string) => void;
|
|
358
|
+
/** Also the accessible name. */
|
|
359
|
+
placeholder?: string;
|
|
360
|
+
clearLabel?: string;
|
|
361
|
+
className?: string;
|
|
362
|
+
}
|
|
363
|
+
export const SearchField: ComponentType<SearchFieldProps>;
|
|
364
|
+
|
|
365
|
+
export interface PopoverProps {
|
|
366
|
+
open: boolean;
|
|
367
|
+
/** The control it belongs to; the panel positions against its box and a press on it is not
|
|
368
|
+
* treated as an outside press. */
|
|
369
|
+
anchorRef: { current: HTMLElement | null };
|
|
370
|
+
onClose?: () => void;
|
|
371
|
+
/** Preferred width, clamped to the viewport. */
|
|
372
|
+
width?: number;
|
|
373
|
+
/** Flip to the other side rather than squeeze below this. */
|
|
374
|
+
minHeight?: number;
|
|
375
|
+
placement?: 'auto' | 'below' | 'above';
|
|
376
|
+
label?: string;
|
|
377
|
+
className?: string;
|
|
378
|
+
children?: ReactNode;
|
|
379
|
+
}
|
|
380
|
+
/** Portals to the body and positions itself fixed — never clipped by an ancestor's overflow. */
|
|
381
|
+
export const Popover: ComponentType<PopoverProps>;
|
|
382
|
+
|
|
383
|
+
export interface ModalProps {
|
|
384
|
+
open: boolean;
|
|
385
|
+
onClose?: () => void;
|
|
386
|
+
title?: ReactNode;
|
|
387
|
+
description?: ReactNode;
|
|
388
|
+
/** Header buttons, before the close ✕. */
|
|
389
|
+
actions?: ReactNode;
|
|
390
|
+
size?: 'sm' | 'md' | 'lg' | 'full';
|
|
391
|
+
/** An exact width, overriding `size`. */
|
|
392
|
+
width?: number | string;
|
|
393
|
+
/** id of your own heading, when the name does not live in `title`. */
|
|
394
|
+
labelledBy?: string;
|
|
395
|
+
children?: ReactNode;
|
|
396
|
+
classNames?: { backdrop?: string; root?: string; body?: string };
|
|
397
|
+
}
|
|
398
|
+
/** Shares the dialog host's Escape ordering: the last overlay opened answers the key. */
|
|
399
|
+
export const Modal: ComponentType<ModalProps>;
|
|
400
|
+
|
|
401
|
+
/** Types `phrases` out one at a time. Honours prefers-reduced-motion (shows the first phrase and
|
|
402
|
+
* stops). Speed and order are not configurable — they were the only differences between the
|
|
403
|
+
* three implementations this replaces. */
|
|
404
|
+
export function useTypewriter(phrases: string[], options?: { active?: boolean }): string;
|
|
405
|
+
|
|
147
406
|
// ── resizable pane ──────────────────────────────────────────────────────────
|
|
148
407
|
export function useResizablePane(options?: Record<string, unknown>): {
|
|
149
408
|
size: number;
|
|
@@ -260,6 +519,9 @@ export interface SheetColumnType {
|
|
|
260
519
|
configKey?: string;
|
|
261
520
|
/** An extra header sub-label, e.g. which kind of compute this is. */
|
|
262
521
|
badge?: (column: SheetColumn) => string | undefined;
|
|
522
|
+
/** How much room this type's config popover needs. Defaults to 250 x 340. */
|
|
523
|
+
configWidth?: number;
|
|
524
|
+
configHeight?: number;
|
|
263
525
|
}
|
|
264
526
|
|
|
265
527
|
export interface SheetCellRenderContext {
|
package/src/index.js
CHANGED
|
@@ -4,11 +4,23 @@
|
|
|
4
4
|
export { createResponsesDispatcher, readSSEStream, pumpResponsesStream } from './stream/responses.js';
|
|
5
5
|
export { withText, withReasoning, withStep, withResult, asstText } from './state/blocks.js';
|
|
6
6
|
export { createConversationStore } from './state/conversationStore.js';
|
|
7
|
-
|
|
7
|
+
// Gateway turns -> the message shape ChatMessages/ChatPanel render. Also on reifyui/harness; it is
|
|
8
|
+
// here too because ChatPanel's loadHistory takes messages, and converting history must not require
|
|
9
|
+
// importing a transport. Pure function, no fetch.
|
|
10
|
+
export { turnsToMessages } from './state/turns.js';
|
|
11
|
+
export { Svg, Chevron, IcTool, IcPlug, IcSkill, IcTerminal, IcDoc, IcList, IcGlobe, IcSearch, IcScroll, IcSpawn, IcCheck, IcThink, IcSend, IcX, IcMic, IcPaperclip, IcPanelRight } from './components/icons.jsx';
|
|
8
12
|
export { humanize, parseArgs, baseName, prettyJson, toolMeta, summarizeSteps } from './components/toolMeta.js';
|
|
9
13
|
export { ToolGroup, ToolRow } from './components/ToolSteps.jsx';
|
|
10
14
|
export { ChatMessages, ChatMessagesSkeleton, UserTurn, AssistantTurn, DEFAULT_STATUS_LABELS } from './components/ChatMessages.jsx';
|
|
11
15
|
export { Composer } from './components/Composer.jsx';
|
|
16
|
+
// The whole conversation column beside a document — history, live turn, retry, attachments,
|
|
17
|
+
// dictation, composer. Four products had a divergent copy of this; the transport and the product's
|
|
18
|
+
// prose stay at the call site, everything else is here. Needs styles/chat.css.
|
|
19
|
+
export { ChatPanel } from './components/ChatPanel.jsx';
|
|
20
|
+
// Voice input through the browser's own recogniser. Returns null where the API is absent, which
|
|
21
|
+
// is what makes "render no microphone" the easy path and a disabled one impossible to reach for.
|
|
22
|
+
export { createDictation } from './input/dictate.js';
|
|
23
|
+
export { bytesLabel } from './format.js';
|
|
12
24
|
// CodeBlock lazy-imports highlight.js — the consuming app must depend on highlight.js (^11),
|
|
13
25
|
// same rule as mermaid for the Mermaid blocks. See components/CodeBlock.jsx.
|
|
14
26
|
export { CodeBlock } from './components/CodeBlock.jsx';
|
|
@@ -33,3 +45,17 @@ export { AuthForm } from './auth/AuthForm.jsx';
|
|
|
33
45
|
export { GoogleButton, GOOGLE_ENABLED } from './auth/GoogleButton.jsx';
|
|
34
46
|
// Shared AI-spreadsheet grid (reusable in the Sheets product AND studio Spaces).
|
|
35
47
|
export { SheetGrid, sheetToDelimited, sheetToAoA } from './sheet/SheetGrid.jsx';
|
|
48
|
+
// ── the library page: the surface a document product opens on ────────────────
|
|
49
|
+
// Small, product-agnostic pieces that existed 3-6 times each across the products built on this
|
|
50
|
+
// package, every copy slightly different. Needs styles/library.css (+ chip.css, preview.css).
|
|
51
|
+
export { Carousel } from './components/Carousel.jsx';
|
|
52
|
+
export { Card } from './components/Card.jsx';
|
|
53
|
+
export { Chip } from './components/Chip.jsx';
|
|
54
|
+
export { SearchField } from './components/SearchField.jsx';
|
|
55
|
+
// Anchored panel with placement built in — flips, clamps to the viewport, closes on Escape and
|
|
56
|
+
// outside press. Ten hand-rolled versions of this existed; one survived a phone.
|
|
57
|
+
export { Popover } from './components/Popover.jsx';
|
|
58
|
+
// A dialog whose body is yours (useDialog answers a question; this holds content). Shares the
|
|
59
|
+
// dialog host's Escape ordering and overlay layer. Needs styles/preview.css.
|
|
60
|
+
export { Modal } from './components/Modal.jsx';
|
|
61
|
+
export { useTypewriter } from './hooks/useTypewriter.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Voice input, using the recogniser the browser already has.
|
|
2
|
+
//
|
|
3
|
+
// Chrome, Edge and Safari ship SpeechRecognition, and it is exactly the feature — speak, get text
|
|
4
|
+
// in the box. Where the API is absent, createDictation() returns null and the caller renders no
|
|
5
|
+
// button at all. A disabled microphone labelled "coming soon" is a control that does nothing,
|
|
6
|
+
// which is worse than its absence: it says the product has a capability it does not have. Three
|
|
7
|
+
// of the four panels this package now serves shipped exactly that button; returning null is what
|
|
8
|
+
// makes the honest version the easy one to write.
|
|
9
|
+
//
|
|
10
|
+
// Nothing here is agent- or product-specific, which is why it is a root export rather than part
|
|
11
|
+
// of a transport: it turns speech into a string and stops.
|
|
12
|
+
|
|
13
|
+
const Impl = typeof window !== 'undefined'
|
|
14
|
+
? (window.SpeechRecognition || window.webkitSpeechRecognition)
|
|
15
|
+
: null;
|
|
16
|
+
|
|
17
|
+
export function createDictation({ lang } = {}) {
|
|
18
|
+
if (!Impl) return null;
|
|
19
|
+
let rec = null;
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
/** onText fires once per finished phrase, so the draft grows as you speak rather than being
|
|
23
|
+
* rewritten from scratch on every interim guess. */
|
|
24
|
+
start({ onText, onEnd, onError }) {
|
|
25
|
+
this.stop();
|
|
26
|
+
rec = new Impl();
|
|
27
|
+
rec.lang = lang || navigator.language || 'en-US';
|
|
28
|
+
rec.continuous = true;
|
|
29
|
+
rec.interimResults = false;
|
|
30
|
+
rec.onresult = (e) => {
|
|
31
|
+
for (let i = e.resultIndex; i < e.results.length; i += 1) {
|
|
32
|
+
if (!e.results[i].isFinal) continue;
|
|
33
|
+
const text = String(e.results[i][0]?.transcript || '').trim();
|
|
34
|
+
if (text) onText?.(text);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
// 'no-speech' and 'aborted' are the two ways a quiet or cancelled session ends. Neither is
|
|
38
|
+
// a failure worth telling anyone about; both just stop.
|
|
39
|
+
rec.onerror = (e) => {
|
|
40
|
+
rec = null;
|
|
41
|
+
if (e.error === 'no-speech' || e.error === 'aborted') onEnd?.();
|
|
42
|
+
else onError?.(e.error || 'Dictation stopped.');
|
|
43
|
+
};
|
|
44
|
+
rec.onend = () => { rec = null; onEnd?.(); };
|
|
45
|
+
try {
|
|
46
|
+
rec.start();
|
|
47
|
+
} catch (e) {
|
|
48
|
+
rec = null;
|
|
49
|
+
onError?.(e?.message || 'Dictation could not start.');
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
stop() {
|
|
54
|
+
if (!rec) return;
|
|
55
|
+
const r = rec;
|
|
56
|
+
rec = null;
|
|
57
|
+
try { r.stop(); } catch { /* already stopped */ }
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
package/src/sheet/SheetGrid.jsx
CHANGED
|
@@ -39,6 +39,8 @@ const uid = (p) => `${p}_${Math.random().toString(36).slice(2, 10)}`;
|
|
|
39
39
|
// editable defaults to !computed
|
|
40
40
|
// configKey the column's config object for this type; dropped when the type changes
|
|
41
41
|
// badge(col) an extra header sub-label, e.g. which kind of compute this is
|
|
42
|
+
// configWidth / configHeight how much room this type's config popover needs. A type whose
|
|
43
|
+
// config is a prompt editor does not fit in the width a Type select needs.
|
|
42
44
|
const DEFAULT_COLUMN_TYPES = [
|
|
43
45
|
{ type: 'text', label: 'Text' },
|
|
44
46
|
{ type: 'number', label: 'Number' },
|
|
@@ -623,8 +625,10 @@ function ColumnMenu({ col, columns, anchor, columnTypes, renderColumnConfig, onA
|
|
|
623
625
|
close: onClose,
|
|
624
626
|
});
|
|
625
627
|
|
|
628
|
+
const desc = columnTypes.find((t) => t.type === type) || {};
|
|
626
629
|
return (
|
|
627
|
-
<PopPortal anchor={anchor} width={250} estHeight={
|
|
630
|
+
<PopPortal anchor={anchor} width={desc.configWidth || 250} estHeight={desc.configHeight || 340}
|
|
631
|
+
className="shg-menu" onClose={onClose}>
|
|
628
632
|
<div onClick={(e) => e.stopPropagation()}>
|
|
629
633
|
<label className="shg-menu-lbl">Type
|
|
630
634
|
<select className="shg-menu-input" value={type} onChange={(e) => setType(e.target.value)}>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Gateway turns -> the message shape ChatMessages renders.
|
|
2
|
+
//
|
|
3
|
+
// This lives in state/ rather than in the transport because it is a pure shape translation with
|
|
4
|
+
// no network in it, and because ChatPanel (a root export) takes ChatMessage[] from its
|
|
5
|
+
// loadHistory: a root consumer must be able to convert history without pulling the whole
|
|
6
|
+
// HarnessRouter fetch layer into its bundle. reifyui/harness re-exports it, so the transport's
|
|
7
|
+
// own callers keep importing it from where the rest of their transport lives.
|
|
8
|
+
//
|
|
9
|
+
// Four apps had each open-coded this function. Three of the four copies were byte-identical and
|
|
10
|
+
// the fourth was the same logic with the status map inlined as a nested ternary.
|
|
11
|
+
|
|
12
|
+
const TURN_STATUS = {
|
|
13
|
+
failed: 'failed', error: 'failed', cancelled: 'cancelled',
|
|
14
|
+
incomplete: 'incomplete', max_turns: 'incomplete', timeout: 'incomplete',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** Gateway turns -> ChatMessages' message shape. */
|
|
18
|
+
export function turnsToMessages(turns) {
|
|
19
|
+
const out = [];
|
|
20
|
+
for (const t of turns || []) {
|
|
21
|
+
if (t.user) out.push({ role: 'user', text: t.user });
|
|
22
|
+
const steps = (t.tools || []).map((x) => ({ name: x.name, args: x.arguments, result: x.result }));
|
|
23
|
+
const blocks = [];
|
|
24
|
+
if (steps.length) blocks.push({ kind: 'tools', reasoning: '', steps });
|
|
25
|
+
if (t.assistant) blocks.push({ kind: 'text', text: t.assistant });
|
|
26
|
+
const status = TURN_STATUS[t.status] || 'done';
|
|
27
|
+
if (blocks.length || status !== 'done') out.push({ role: 'assistant', blocks, status });
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
package/styles/chat.css
CHANGED
|
@@ -169,7 +169,133 @@ body.uic-resizing iframe { pointer-events: none; }
|
|
|
169
169
|
|
|
170
170
|
/* default send button (products usually replace via renderSend) */
|
|
171
171
|
.uic-send { width: 32px; height: 32px; flex-shrink: 0; border-radius: 999px; border: none;
|
|
172
|
-
background: var(--uic-brand, #285AFF); color: #fff; cursor: pointer;
|
|
172
|
+
background: var(--uic-brand, #285AFF); color: var(--uic-on-brand, #fff); cursor: pointer;
|
|
173
173
|
display: inline-flex; align-items: center; justify-content: center; }
|
|
174
174
|
.uic-send:hover:not(:disabled) { background: var(--uic-brand-ink, #1641D8); }
|
|
175
175
|
.uic-send:disabled { opacity: .5; cursor: not-allowed; }
|
|
176
|
+
|
|
177
|
+
/* ══ ChatPanel — the conversation column beside a document ═══════════════════
|
|
178
|
+
Four products shipped this chrome under product-owned class names (.gp-chat, a
|
|
179
|
+
ContextualGraph noun; .cmp; .pane-empty), 139 selectors of it, byte-identical in all four.
|
|
180
|
+
It lives here now under uic-* names.
|
|
181
|
+
|
|
182
|
+
The composer skin below is deliberately a SEPARATE class from .wbx-composer rather than a
|
|
183
|
+
rewrite of it: HarnessRouter renders .wbx-composer today and did not ask for a 14px radius and
|
|
184
|
+
a 10px margin. ChatPanel opts in by passing these class names to Composer's classNames — which
|
|
185
|
+
is exactly the escape hatch that prop exists for. */
|
|
186
|
+
|
|
187
|
+
/* The panel is dense by design (13px, no turn gutter, wider bubbles) — the same three overrides
|
|
188
|
+
all four apps wrote into their :root, where they also changed every OTHER chat surface in the
|
|
189
|
+
app. Scoped to the panel, they stop leaking. */
|
|
190
|
+
.uic-chat { --uic-font-md: 13px; --uic-turn-pad-x: 0px; --uic-bubble-max-w: 88%;
|
|
191
|
+
flex: 0 0 340px; height: 100vh; display: flex; flex-direction: column; min-height: 0;
|
|
192
|
+
background: var(--uic-surface, #FFFFFF); border-left: 1px solid var(--uic-line, #DDDFE6); }
|
|
193
|
+
@media (max-width: 1180px) { .uic-chat { flex: 0 0 300px; } }
|
|
194
|
+
.uic-chat.is-collapsed { flex: 0 0 44px; }
|
|
195
|
+
|
|
196
|
+
.uic-chat-h { height: 52px; flex-shrink: 0; display: flex; align-items: center; gap: 8px;
|
|
197
|
+
padding: 0 10px; border-bottom: 1px solid var(--uic-line-soft, #EFF1F4); }
|
|
198
|
+
/* Shrinks with ellipsis but does NOT stretch, so a status mark sits beside the title rather than
|
|
199
|
+
at the far edge of the panel. */
|
|
200
|
+
.uic-chat-title { flex: 0 1 auto; min-width: 0; font-size: 13px; font-weight: 600;
|
|
201
|
+
color: var(--uic-ink, #111317); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
202
|
+
.uic-chat-conn { font-size: 12px; color: var(--uic-mute, #5B5D66); }
|
|
203
|
+
.uic-panel-toggle { display: inline-flex; align-items: center; justify-content: center;
|
|
204
|
+
width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
|
|
205
|
+
border: none; background: none; cursor: pointer; color: var(--uic-mute, #5B5D66); }
|
|
206
|
+
.uic-panel-toggle:hover { background: var(--uic-hover-wash, rgba(0, 0, 0, .05)); color: var(--uic-ink, #111317); }
|
|
207
|
+
|
|
208
|
+
.uic-chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px;
|
|
209
|
+
display: flex; flex-direction: column; gap: 10px; }
|
|
210
|
+
.uic-chat-body::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
211
|
+
.uic-chat-body::-webkit-scrollbar-thumb { background: var(--uic-line, #DDDFE6); border-radius: 999px; }
|
|
212
|
+
.uic-chat-body::-webkit-scrollbar-track { background: transparent; }
|
|
213
|
+
|
|
214
|
+
/* "Still connecting" — a notice, not an error: the message is held, not lost. */
|
|
215
|
+
.uic-chat-note { align-self: center; display: inline-flex; align-items: center; gap: 8px;
|
|
216
|
+
font-size: 12px; color: var(--uic-mute, #5B5D66);
|
|
217
|
+
background: var(--uic-brand-faint, #EFF3FF); border: 1px solid var(--uic-brand-soft, #E1E9FF);
|
|
218
|
+
border-radius: var(--uic-r-pill, 999px); padding: 5px 12px; }
|
|
219
|
+
.uic-chat-dot { width: 8px; height: 8px; border-radius: 999px;
|
|
220
|
+
background: var(--uic-warn, #F59E0B); animation: uic-chat-blink 1.4s ease-in-out infinite; }
|
|
221
|
+
@keyframes uic-chat-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
|
|
222
|
+
|
|
223
|
+
.uic-chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center;
|
|
224
|
+
justify-content: center; gap: 10px; padding: 32px; text-align: center;
|
|
225
|
+
font-size: 13px; color: var(--uic-mute, #5B5D66); }
|
|
226
|
+
.uic-chat-empty-t { font-size: 14px; font-weight: 600; color: var(--uic-ink-2, #3A3D45); }
|
|
227
|
+
.uic-chat-empty svg { color: var(--uic-mute-2, #8E9199); }
|
|
228
|
+
/* The turn is running somewhere else: a live mark, never the blank "describe what you want"
|
|
229
|
+
prompt — that reads as a dead end while the agent is visibly working. */
|
|
230
|
+
.uic-chat-pulse { width: 14px; height: 14px; border-radius: 50%;
|
|
231
|
+
background: var(--uic-brand, #285AFF); animation: uic-chat-blink 1.1s ease-in-out infinite; }
|
|
232
|
+
@media (prefers-reduced-motion: reduce) {
|
|
233
|
+
.uic-chat-dot, .uic-chat-pulse { animation: none; }
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* ── the panel's composer ── */
|
|
237
|
+
.uic-chat-cmp { flex-shrink: 0; margin: 10px; padding: 10px 10px 8px;
|
|
238
|
+
border: 1.5px solid var(--uic-line, #DDDFE6); border-radius: 14px;
|
|
239
|
+
background: var(--uic-surface, #FFFFFF); display: flex; flex-direction: column; gap: 6px; }
|
|
240
|
+
.uic-chat-cmp:focus-within { border-color: var(--uic-brand, #285AFF);
|
|
241
|
+
box-shadow: 0 0 0 3px var(--uic-focus-ring, rgba(40, 90, 255, .14)); }
|
|
242
|
+
.uic-chat-cmp-input { border: none; outline: none; resize: none; font-family: inherit;
|
|
243
|
+
font-size: 13px; line-height: 1.5; max-height: 120px;
|
|
244
|
+
color: var(--uic-ink, #111317); background: transparent; }
|
|
245
|
+
.uic-chat-cmp-input::placeholder { color: var(--uic-mute-2, #8E9199); }
|
|
246
|
+
.uic-chat-cmp-row { display: flex; align-items: center; gap: 6px; }
|
|
247
|
+
|
|
248
|
+
.uic-chat-icon { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
|
|
249
|
+
border: 1px solid var(--uic-line, #DDDFE6); background: var(--uic-surface, #FFFFFF);
|
|
250
|
+
color: var(--uic-mute, #5B5D66); cursor: pointer;
|
|
251
|
+
display: inline-flex; align-items: center; justify-content: center; }
|
|
252
|
+
.uic-chat-icon:hover { color: var(--uic-ink, #111317); border-color: var(--uic-line-strong, #CBD0DA); }
|
|
253
|
+
.uic-chat-icon:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
|
|
254
|
+
/* Listening is a state the person has to be able to SEE, because they cannot hear it. */
|
|
255
|
+
.uic-chat-icon.is-on { color: var(--uic-brand, #285AFF); border-color: var(--uic-brand, #285AFF);
|
|
256
|
+
background: var(--uic-brand-faint, #EFF3FF); animation: uic-chat-mic 1.4s ease-in-out infinite; }
|
|
257
|
+
@keyframes uic-chat-mic { 50% { box-shadow: 0 0 0 4px var(--uic-focus-ring, rgba(40, 90, 255, .14)); } }
|
|
258
|
+
@media (prefers-reduced-motion: reduce) { .uic-chat-icon.is-on { animation: none; } }
|
|
259
|
+
|
|
260
|
+
.uic-chat-send { width: 30px; height: 30px; flex-shrink: 0; border-radius: 999px; border: none;
|
|
261
|
+
background: var(--uic-brand, #285AFF); color: var(--uic-on-brand, #fff); cursor: pointer;
|
|
262
|
+
display: inline-flex; align-items: center; justify-content: center; }
|
|
263
|
+
.uic-chat-send:hover:not(:disabled) { background: var(--uic-brand-ink, #1641D8); }
|
|
264
|
+
.uic-chat-send:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
|
|
265
|
+
|
|
266
|
+
/* Staged files above the textarea, and the names echoed inside the sent bubble. */
|
|
267
|
+
.uic-chat-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 2px 8px; align-items: center; }
|
|
268
|
+
.uic-chat-file-err { font-size: 11.5px; color: var(--uic-fail-ink, #b91c1c); }
|
|
269
|
+
.uic-chat-msg-files { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
|
|
270
|
+
|
|
271
|
+
/* ── density inside the panel: the 13px conversation ── */
|
|
272
|
+
.uic-chat .wbx-md { overflow-wrap: break-word; }
|
|
273
|
+
.uic-chat .wbx-md h1 { font-size: 16px; }
|
|
274
|
+
.uic-chat .wbx-md h2 { font-size: 14.5px; }
|
|
275
|
+
.uic-chat .wbx-md h3 { font-size: 13.5px; }
|
|
276
|
+
.uic-chat .wbx-md code { background: var(--uic-line-soft, #EFF1F4); border: none; font-size: 12px; }
|
|
277
|
+
.uic-chat .wbx-md pre code { font-size: 12px; }
|
|
278
|
+
.uic-chat .wbx-md table { font-size: 12.5px; }
|
|
279
|
+
.uic-chat .wbx-acts-sum { font-size: 12.5px; font-family: inherit; }
|
|
280
|
+
.uic-chat .wbx-act-row { font-family: inherit; }
|
|
281
|
+
.uic-chat .wbx-act-k { font-size: 12.5px; }
|
|
282
|
+
.uic-chat .wbx-act-chip { font-size: 11px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
283
|
+
.uic-chat .wbx-act-v { font-size: 12px; }
|
|
284
|
+
.uic-chat .wbx-act-block-h { font-size: 11px; }
|
|
285
|
+
.uic-chat .wbx-act-pre { font-size: 11px; max-height: 280px; }
|
|
286
|
+
.uic-chat .wbx-working { font-size: 12.5px; }
|
|
287
|
+
.uic-chat .wbx-turnbadge { align-self: flex-start; }
|
|
288
|
+
|
|
289
|
+
/* ── narrow: the column becomes a drawer over the document ──
|
|
290
|
+
Below this width a 340px column and a document cannot both be usable, and squeezing the
|
|
291
|
+
document is the worse trade — the conversation is the thing you can dismiss. */
|
|
292
|
+
@media (max-width: 900px) {
|
|
293
|
+
.uic-chat:not(.is-collapsed) {
|
|
294
|
+
position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
|
|
295
|
+
width: min(86vw, 380px);
|
|
296
|
+
flex: none !important; /* beats the inline drag-width basis */
|
|
297
|
+
box-shadow: var(--uic-shadow-3, -16px 0 40px rgba(15, 23, 42, .22));
|
|
298
|
+
}
|
|
299
|
+
/* Dragging the divider is meaningless once the panel floats over the page. */
|
|
300
|
+
body:has(.uic-chat:not(.is-collapsed)) .uic-vresize { display: none; }
|
|
301
|
+
}
|
package/styles/chip.css
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* Chip + Popover.
|
|
2
|
+
One file because both surfaces that use a chip — the prompt box on a landing page and the
|
|
3
|
+
composer in a conversation panel — need it, and a chip that opens a picker needs the popover
|
|
4
|
+
next to it. Every colour is a --uic-* custom property with the neutral fallback, same contract
|
|
5
|
+
as styles/chat.css. */
|
|
6
|
+
|
|
7
|
+
/* ── Chip ───────────────────────────────────────────────────────────────────
|
|
8
|
+
Default is a solid neutral token: a file that is attached, a name that is set.
|
|
9
|
+
.is-open (clickable, nothing chosen) is dashed — an empty slot you may fill.
|
|
10
|
+
.is-selected is the brand fill — a choice that is currently in effect. */
|
|
11
|
+
.uic-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
|
|
12
|
+
min-height: 26px; padding: 2px 4px 2px 9px; border-radius: var(--uic-r-pill, 999px);
|
|
13
|
+
font-family: inherit; font-size: 12px; line-height: 1.4;
|
|
14
|
+
background: var(--uic-surface, #FFFFFF); color: var(--uic-ink-2, #3A3D45);
|
|
15
|
+
border: 1px solid var(--uic-line, #DDDFE6); }
|
|
16
|
+
/* No trailing ✕: the label owns the right edge, so the padding is symmetric. */
|
|
17
|
+
.uic-chip:not(:has(.uic-chip-x)) { padding-right: 9px; }
|
|
18
|
+
button.uic-chip { cursor: pointer; }
|
|
19
|
+
button.uic-chip:hover { border-color: var(--uic-brand, #285AFF); color: var(--uic-brand-ink, #1641D8); }
|
|
20
|
+
.uic-chip.is-open { border-style: dashed; color: var(--uic-mute, #5B5D66); }
|
|
21
|
+
.uic-chip.is-selected { background: var(--uic-brand-faint, #EFF3FF);
|
|
22
|
+
border-color: var(--uic-brand-soft, #E1E9FF); color: var(--uic-brand-ink, #1641D8); }
|
|
23
|
+
.uic-chip-ic { display: inline-flex; flex-shrink: 0; line-height: 0; }
|
|
24
|
+
/* The label owns the truncation, so a long file name shortens instead of stretching the row. */
|
|
25
|
+
.uic-chip-l { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0;
|
|
26
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
27
|
+
.uic-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
28
|
+
.uic-chip-meta { flex-shrink: 0; font-size: 11px; color: var(--uic-mute, #5B5D66);
|
|
29
|
+
font-variant-numeric: tabular-nums; }
|
|
30
|
+
.uic-chip-press { display: inline-flex; align-items: center; gap: 6px; min-width: 0;
|
|
31
|
+
border: none; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
|
|
32
|
+
.uic-chip-x { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
|
|
33
|
+
border: none; background: transparent; cursor: pointer; line-height: 0;
|
|
34
|
+
padding: 3px; border-radius: 999px; color: var(--uic-mute, #5B5D66); }
|
|
35
|
+
.uic-chip-x:hover { background: var(--uic-hover-wash, rgba(0, 0, 0, .06)); color: var(--uic-ink, #111317); }
|
|
36
|
+
|
|
37
|
+
/* ── Popover ────────────────────────────────────────────────────────────────
|
|
38
|
+
Positioned in JS (fixed, flipped and clamped to the viewport) — this only paints it. The
|
|
39
|
+
max-height the placement chose lands as an inline style, and the body scrolls inside it, so
|
|
40
|
+
the panel is never taller than the room it was given. */
|
|
41
|
+
.uic-pop { position: fixed; z-index: var(--uic-z-overlay, 9000);
|
|
42
|
+
display: flex; flex-direction: column; gap: 6px; padding: 8px; overflow: hidden;
|
|
43
|
+
background: var(--uic-surface, #FFFFFF); border: 1px solid var(--uic-line, #DDDFE6);
|
|
44
|
+
border-radius: 12px; box-shadow: var(--uic-shadow-2, 0 8px 24px -12px rgba(17, 24, 39, .18)); }
|
|
45
|
+
.uic-pop-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
|
|
46
|
+
.uic-pop-note { font-size: 12px; color: var(--uic-mute, #5B5D66); padding: 0 4px; }
|
|
47
|
+
.uic-pop-item { display: flex; align-items: center; gap: 8px; width: 100%;
|
|
48
|
+
text-align: left; font-family: inherit; font-size: 13px; color: var(--uic-ink-2, #3A3D45);
|
|
49
|
+
background: none; border: none; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
|
|
50
|
+
.uic-pop-item:hover { background: var(--uic-line-soft, #EFF1F4); color: var(--uic-ink, #111317); }
|
|
51
|
+
.uic-pop-item.is-on { background: var(--uic-brand-soft, #E1E9FF);
|
|
52
|
+
color: var(--uic-brand-ink, #1641D8); font-weight: 600; }
|
|
53
|
+
.uic-pop-check { width: 15px; flex-shrink: 0; display: inline-flex; color: var(--uic-brand, #285AFF); }
|