@filigran/chatbot 3.15.2 → 3.16.1

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/CHANGELOG.md CHANGED
@@ -8,7 +8,38 @@ the versions follow [semantic versioning](https://semver.org/spec/v2.0.0.html).
8
8
  This file starts at 3.10.0; earlier releases are on the
9
9
  [releases page](https://github.com/FiligranHQ/filigran-ui/releases).
10
10
 
11
- ## 3.15.2 — unreleased
11
+ ## 3.16.1 — unreleased
12
+
13
+ ### Fixed
14
+
15
+ - An empty workspace's hint shows the glyph of its New conversation button,
16
+ where it said `+`, a button the list does not have. Its key changed: a host
17
+ translating `Drop a conversation here, or start one with +.` translates
18
+ `Drop a conversation here, or start one with {icon}.` instead, keeping
19
+ `{icon}` where the glyph goes. Until then the panel's own catalog answers
20
+ for a `locale` it has one for (fr, es, ja), and English for any other.
21
+ - A long conversation shown inline or fullscreen no longer lets the page
22
+ scroll the panel out of view: each message's screen-reader time, positioned
23
+ outside the transcript's scroll, laid the page out as tall as the whole
24
+ conversation.
25
+
26
+ ## 3.16.0 — 2026-10-28
27
+
28
+ ### Added
29
+
30
+ - `theme`: the host's colours, type and shapes (surfaces, menus, subtle and
31
+ hover fills, text fields, text, secondary and muted text, borders, a user's message, an
32
+ answer's text size, code), set as `--filigran-chat-*` variables on the panel
33
+ root. Every entry left out keeps the panel's own look, light and dark, so a
34
+ host that sets nothing sees the same panel (#460).
35
+
36
+ ### Fixed
37
+
38
+ - In dark mode, the hover and focus colours an element carries show as they do
39
+ in light mode (an accent border on hover, the composer's focus border); its
40
+ dark colour used to hide them (#460).
41
+
42
+ ## 3.15.2 — 2026-10-28
12
43
 
13
44
  ### Fixed
14
45
 
package/README.md CHANGED
@@ -121,6 +121,7 @@ import { ChatPanel } from '@filigran/chatbot';
121
121
  | `waitingMessages` | `string[]` | built-in | The waiting panel's rotating messages, already translated |
122
122
  | `renderWaitingPanel` | `() => React.ReactNode` | — | Replaces the waiting panel's content (its messages and the invitation to play) |
123
123
  | `fontFamily` | `string` | — | Font of the panel's text |
124
+ | `theme` | `ChatPanelTheme` | — | The host's colours, type and shapes; see [Custom Theme](#custom-theme) |
124
125
  | `agentMentions` | `boolean` | `false` | `@` also mentions agents of the agent list; the message carries their ids as `mentioned_agent_ids` |
125
126
  | `steerAttachments` | `boolean` | `false` | Uploaded files may steer the running turn (the steer route takes `file_ids`) |
126
127
  | `onReady` | `() => void` | — | Called once, when the panel has chosen its agent and read back the conversation on screen; handle calls made earlier wait for it and then run in order |
@@ -1211,6 +1212,44 @@ import { MyLogo } from './icons';
1211
1212
  />
1212
1213
  ```
1213
1214
 
1215
+ ### Custom Theme
1216
+
1217
+ `theme` gives the panel the host's design system. Each entry is a CSS value
1218
+ and sets the `--filigran-chat-*` variable named beside it on the panel root,
1219
+ where everything the panel renders (its dialogs and menus included) reads it;
1220
+ an entry left out keeps the panel's own look, light and dark. A host's own
1221
+ variables (`var(--x)`) follow its light and dark modes, so one value serves
1222
+ both. The same variables may be set in CSS on an ancestor instead.
1223
+
1224
+ | Entry | Variable | Styles |
1225
+ | ------------------ | ----------------------------------- | ------ |
1226
+ | `surface` | `--filigran-chat-surface` | The background inline and fullscreen |
1227
+ | `surfaceRaised` | `--filigran-chat-surface-raised` | The background as a sidebar or floating card, and of its dialogs and menus |
1228
+ | `surfaceSubtle` | `--filigran-chat-surface-subtle` | Cards, search boxes, a table's or a code block's header |
1229
+ | `surfaceHover` | `--filigran-chat-surface-hover` | A row or a button under the pointer |
1230
+ | `inputSurface` | `--filigran-chat-input-surface` | A text field: the composer (no fill unless set), a rename field, the feedback and approval comments |
1231
+ | `headerBackground` | `--filigran-chat-header-background` | The header's background, a colour or an image (`none` for the surface alone) |
1232
+ | `text` | `--filigran-chat-text` | Text |
1233
+ | `textMuted` | `--filigran-chat-text-muted` | Times, labels, hints and placeholders |
1234
+ | `textSecondary` | `--filigran-chat-text-secondary` | Table cells, chips, descriptions, notices |
1235
+ | `border` | `--filigran-chat-border` | Dividers, outlines, a gauge's track and the loading skeleton |
1236
+ | `textSize` | `--filigran-chat-text-size` | An answer's prose, its headings in proportion, and a user's message unless `userTextSize` |
1237
+ | `userBackground`, `userText`, `userRadius`, `userPadding`, `userTextSize` | `--filigran-chat-user-*` | A user's message |
1238
+ | `fontMono`, `codeSize`, `codeSurface` | `--filigran-chat-font-mono`, `-code-size`, `-code-surface` | Code, in a block or inline |
1239
+
1240
+ ```tsx
1241
+ <ChatPanel
1242
+ theme={{
1243
+ surface: 'var(--page-background)',
1244
+ text: 'var(--text-primary)',
1245
+ userBackground: 'color-mix(in oklab, var(--accent) 10%, transparent)',
1246
+ userText: 'var(--text-primary)',
1247
+ textSize: '1rem',
1248
+ }}
1249
+ // ...
1250
+ />
1251
+ ```
1252
+
1214
1253
  ### Custom Prompt Suggestions
1215
1254
 
1216
1255
  ```tsx
package/dist/index.d.ts CHANGED
@@ -374,6 +374,44 @@ interface ChatContextBreakdown {
374
374
  /** Output of tool calls still held verbatim in the context. */
375
375
  toolResults?: number;
376
376
  }
377
+ /**
378
+ * What a host's design system sets on the panel (`ChatPanelProps.theme`):
379
+ * CSS values, each the `--filigran-chat-*` variable named beside it.
380
+ */
381
+ interface ChatPanelTheme {
382
+ /** The panel's background inline and fullscreen (`--filigran-chat-surface`). */
383
+ surface?: string;
384
+ /** The panel's background as a sidebar or floating card, and its dialogs' (`--filigran-chat-surface-raised`). */
385
+ surfaceRaised?: string;
386
+ /** Cards, search boxes, a table's or a code block's header: a shade off the surface (`--filigran-chat-surface-subtle`). */
387
+ surfaceSubtle?: string;
388
+ /** A row or a button under the pointer (`--filigran-chat-surface-hover`). */
389
+ surfaceHover?: string;
390
+ /** A text field: the composer (no fill unless set), a rename field, the feedback and approval comments (`--filigran-chat-input-surface`). */
391
+ inputSurface?: string;
392
+ /** The header's background, a colour or an image; `none` for the surface alone (`--filigran-chat-header-background`). */
393
+ headerBackground?: string;
394
+ /** Text (`--filigran-chat-text`). */
395
+ text?: string;
396
+ /** Faint text: times, labels, hints, placeholders (`--filigran-chat-text-muted`). */
397
+ textMuted?: string;
398
+ /** Secondary text: table cells, chips, descriptions, notices (`--filigran-chat-text-secondary`). */
399
+ textSecondary?: string;
400
+ /** Dividers, outlines, a gauge's track and the loading skeleton (`--filigran-chat-border`). */
401
+ border?: string;
402
+ /** The size of an answer's prose, its headings in proportion, and of a user's message unless `userTextSize` (`--filigran-chat-text-size`). */
403
+ textSize?: string;
404
+ /** A user's message: background, text, corners, padding and size (`--filigran-chat-user-*`). */
405
+ userBackground?: string;
406
+ userText?: string;
407
+ userRadius?: string;
408
+ userPadding?: string;
409
+ userTextSize?: string;
410
+ /** Code: its font, size and background (`--filigran-chat-font-mono`, `-code-size`, `-code-surface`). */
411
+ fontMono?: string;
412
+ codeSize?: string;
413
+ codeSurface?: string;
414
+ }
377
415
  interface ChatPanelProps {
378
416
  mode: ChatPanelMode;
379
417
  /** Shows the close button; inline mode has none. */
@@ -636,6 +674,13 @@ interface ChatPanelProps {
636
674
  renderWaitingPanel?: () => React.ReactNode;
637
675
  /** Font of the panel's text; the package's own otherwise. */
638
676
  fontFamily?: string;
677
+ /**
678
+ * The host's colours, type and shapes, as CSS values (a host's own
679
+ * variables, `var(--x)`, follow its light and dark modes); each one unset
680
+ * keeps the panel's own. The same `--filigran-chat-*` variables can be set
681
+ * in CSS on an ancestor instead.
682
+ */
683
+ theme?: ChatPanelTheme;
639
684
  /**
640
685
  * Called once, when the panel has chosen its agent and read back the
641
686
  * conversation on screen. Calls made through the handle before then wait
@@ -1150,4 +1195,4 @@ interface TransferredAgent {
1150
1195
  declare const voiceCallSupported: () => boolean;
1151
1196
 
1152
1197
  export { ChatPanel, ChatToggleButton, voiceCallSupported };
1153
- export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatStreamEventInfo, ChatToggleButtonProps, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };
1198
+ export type { AgentStatusState, ApiEndpoints, BackendType, ChatAnsweredBy, ChatArtifact, ChatArtifactKind, ChatAttachment, ChatCodeBlockContext, ChatCodeBlockRenderer, ChatContextBreakdown, ChatContextUsage, ChatConversationRef, ChatConversationReferenceCandidate, ChatConversationSummary, ChatFile, ChatHeldOutcome, ChatMarkerContext, ChatMarkerRenderer, ChatMessage, ChatMessagePersistedFeedback, ChatMessageSlotContext, ChatMode, ChatPanelHandle, ChatPanelMode, ChatPanelProps, ChatPanelTheme, ChatPromptTemplate, ChatQuotaStatus, ChatSendDecision, ChatSendDraft, ChatSendOptions, ChatSendOutcome, ChatStreamEventInfo, ChatToggleButtonProps, ChatTurnEnd, ChatTurnOutcome, ChatWorkspace, MessageFeedback, ToolApprovalDecision, ToolApprovalProposal, ToolApprovalVerdict, TransferredAgent, Translate, XtmAgent };