@mcp-b/react-components 0.31.2 → 0.31.3
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/dist/{ThinkChat-ldbrNiAx.js → ThinkChat-BIEryLy0.js} +14 -2
- package/dist/components/agents-sdk/ThinkChat.js +1 -1
- package/dist/components/agents-sdk/ThinkFullApp.js +1 -1
- package/dist/components/nanites/AgentToolDetail.js +1 -1
- package/dist/styles/approval.css +11 -2
- package/dist/styles/context.css +7 -0
- package/dist/styles/prompt-input.css +50 -1
- package/dist/styles/think-full-app.css +8 -1
- package/package.json +2 -2
|
@@ -40,6 +40,13 @@ function resolveThinkApprovalProps(overrides, ambient) {
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/components/agents-sdk/ThinkChat.tsx
|
|
42
42
|
const EMPTY_PENDING_APPROVALS = [];
|
|
43
|
+
const STREAMED_TEXT_ANIMATION = {
|
|
44
|
+
animation: "fadeIn",
|
|
45
|
+
duration: 150,
|
|
46
|
+
easing: "cubic-bezier(0.37, 0.55, 0.86, 0.88)",
|
|
47
|
+
sep: "word",
|
|
48
|
+
stagger: 0
|
|
49
|
+
};
|
|
43
50
|
/**
|
|
44
51
|
* Acknowledgement copy for a landed compaction. Both numbers are Session's own
|
|
45
52
|
* estimates, so the text is hedged ("about", rounded to thousands) and falls
|
|
@@ -224,11 +231,16 @@ function ThinkChatMessages({ composerHeader, draft, renderPart, excludeTools, re
|
|
|
224
231
|
renderAgentToolRunLink,
|
|
225
232
|
toolRenderers
|
|
226
233
|
]);
|
|
234
|
+
const streamingMessageId = (chat ? chat.isStreaming : draft?.status === "streaming") ? (chat?.messages ?? draft?.messages)?.at(-1)?.id : void 0;
|
|
227
235
|
const defaultRenderPart = React.useCallback((context) => {
|
|
228
236
|
const activity = activityRenderPart(context);
|
|
229
237
|
if (activity !== void 0) return activity;
|
|
230
|
-
return isTextUIPart(context.part) && context.part.text ? /* @__PURE__ */ jsx(WorkspaceMessageResponse, {
|
|
231
|
-
|
|
238
|
+
return isTextUIPart(context.part) && context.part.text ? /* @__PURE__ */ jsx(WorkspaceMessageResponse, {
|
|
239
|
+
animated: STREAMED_TEXT_ANIMATION,
|
|
240
|
+
isAnimating: context.message.role === "assistant" && context.message.id === streamingMessageId && context.part.state === "streaming",
|
|
241
|
+
children: context.part.text
|
|
242
|
+
}) : void 0;
|
|
243
|
+
}, [activityRenderPart, streamingMessageId]);
|
|
232
244
|
const resolvedRenderPart = React.useMemo(() => renderPart ? (context) => {
|
|
233
245
|
const renderBuiltIn = () => {
|
|
234
246
|
const builtIn = defaultRenderPart(context);
|
|
@@ -6,7 +6,7 @@ import { isThinkChatActivityPart } from "./ThinkChatToolParts.js";
|
|
|
6
6
|
import { describeThinkChatActivityPart } from "./ThinkChatActivitySummary.js";
|
|
7
7
|
import { ThinkChatActivity, createThinkChatActivityRenderer, renderThinkChatActivityPart } from "./ThinkChatActivity.js";
|
|
8
8
|
import { ThinkRecoveryNotice } from "./ThinkRecoveryNotice.js";
|
|
9
|
-
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
9
|
+
import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-BIEryLy0.js";
|
|
10
10
|
import { useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions } from "./Workspace.js";
|
|
11
11
|
import { WorkspaceExplorer } from "./WorkspaceExplorer.js";
|
|
12
12
|
export { AgentToolRunsProvider, BrowserLiveView, BrowserReplay, ThinkChat, ThinkChatActivity, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, ThinkRecoveryNotice, WorkspaceExplorer, createThinkChatActivityRenderer, describeThinkChatActivityPart, inferWorkspaceLanguage, isThinkChatActivityPart, renderThinkChatActivityPart, thinkPendingExecutionApprovalsQueryOptions, useOptionalAgentToolRuns, useThinkChat, useThinkPendingExecutionApprovals, useWorkspace, workspaceBinaryFileQueryOptions, workspaceDirectoryQueryKey, workspaceDirectoryQueryOptions, workspaceDirectoryQueryPrefix, workspaceFileAssetQueryOptions, workspaceFileStatQueryOptions, workspaceInfoQueryOptions, workspaceQueryKey, workspaceTextFileQueryOptions };
|
|
@@ -4,7 +4,7 @@ import { Button } from "../foundations/Button.js";
|
|
|
4
4
|
import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
|
|
5
5
|
import { ScrollArea } from "../foundations/ScrollArea.js";
|
|
6
6
|
import { McpPluginCatalog } from "./McpPluginCatalog.js";
|
|
7
|
-
import { c as resolveThinkApprovalProps, l as useSourceScopedAgentToolEvents, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-
|
|
7
|
+
import { c as resolveThinkApprovalProps, l as useSourceScopedAgentToolEvents, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-BIEryLy0.js";
|
|
8
8
|
import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DZeLe_jN.js";
|
|
9
9
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
10
10
|
import { useWorkspace } from "./Workspace.js";
|
|
@@ -3,7 +3,7 @@ import { r as ArrowLeftIcon } from "../../icons-B1Qw05te.js";
|
|
|
3
3
|
import { TransitionSurface } from "../foundations/TransitionSurface.js";
|
|
4
4
|
import { SubagentRunMilestone, SubagentRunMilestones, SubagentRunProgress } from "../agents-sdk/SubagentRunDetails.js";
|
|
5
5
|
import { SubagentRunIndicator, getSubagentRunName } from "../agents-sdk/SubagentRunIndicator.js";
|
|
6
|
-
import { t as ThinkChat } from "../../ThinkChat-
|
|
6
|
+
import { t as ThinkChat } from "../../ThinkChat-BIEryLy0.js";
|
|
7
7
|
import { AppTopBar } from "../general-purpose/AppTopBar.js";
|
|
8
8
|
import { NaniteMark } from "./NaniteScene.js";
|
|
9
9
|
import * as React from "react";
|
package/dist/styles/approval.css
CHANGED
|
@@ -164,8 +164,17 @@
|
|
|
164
164
|
font-size: var(--sigvelo-text-xs);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
@media (pointer: coarse) {
|
|
167
|
+
@media (any-pointer: coarse) {
|
|
168
|
+
.approval .button {
|
|
169
|
+
--sigvelo-recipe-button-height: var(--sigvelo-control-height-xl);
|
|
170
|
+
}
|
|
171
|
+
|
|
168
172
|
.approval__option {
|
|
169
|
-
min-block-size: var(--sigvelo-control-height-
|
|
173
|
+
min-block-size: var(--sigvelo-control-height-xl);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.approval__reason {
|
|
177
|
+
font-size: var(--sigvelo-text-base);
|
|
178
|
+
line-height: var(--sigvelo-text-base-leading);
|
|
170
179
|
}
|
|
171
180
|
}
|
package/dist/styles/context.css
CHANGED
|
@@ -113,6 +113,13 @@
|
|
|
113
113
|
font-variant-numeric: tabular-nums;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
@media (any-pointer: coarse) {
|
|
117
|
+
.context__trigger {
|
|
118
|
+
min-inline-size: var(--sigvelo-control-height-xl);
|
|
119
|
+
min-block-size: var(--sigvelo-control-height-xl);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
116
123
|
.context__footer {
|
|
117
124
|
display: flex;
|
|
118
125
|
flex-direction: column;
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
position: relative;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
|
+
inline-size: 100%;
|
|
9
|
+
max-inline-size: 100%;
|
|
10
|
+
min-inline-size: 0;
|
|
8
11
|
gap: var(--sigvelo-density-compact-control-gap);
|
|
9
12
|
padding-block: var(--sigvelo-spacing-2);
|
|
10
13
|
padding-inline: var(--sigvelo-density-compact-control-padding-inline);
|
|
@@ -186,12 +189,13 @@
|
|
|
186
189
|
flex-wrap: wrap;
|
|
187
190
|
gap: var(--sigvelo-spacing-1);
|
|
188
191
|
inline-size: 100%;
|
|
192
|
+
min-inline-size: 0;
|
|
189
193
|
min-block-size: var(--sigvelo-spacing-8);
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
.prompt-input__textarea {
|
|
193
197
|
flex: 1;
|
|
194
|
-
min-inline-size:
|
|
198
|
+
min-inline-size: 0;
|
|
195
199
|
inline-size: 100%;
|
|
196
200
|
padding: 0;
|
|
197
201
|
border: none;
|
|
@@ -369,6 +373,11 @@
|
|
|
369
373
|
}
|
|
370
374
|
|
|
371
375
|
@container prompt-input (inline-size <= 36rem) {
|
|
376
|
+
.prompt-input__textarea {
|
|
377
|
+
font-size: var(--sigvelo-text-base);
|
|
378
|
+
line-height: var(--sigvelo-text-base-leading);
|
|
379
|
+
}
|
|
380
|
+
|
|
372
381
|
.prompt-input__footer {
|
|
373
382
|
gap: var(--sigvelo-spacing-1);
|
|
374
383
|
}
|
|
@@ -410,6 +419,19 @@
|
|
|
410
419
|
}
|
|
411
420
|
|
|
412
421
|
@container prompt-input (inline-size <= 22rem) {
|
|
422
|
+
.prompt-input__footer {
|
|
423
|
+
flex-wrap: wrap;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.prompt-input__tools {
|
|
427
|
+
flex: 1 1 100%;
|
|
428
|
+
flex-wrap: wrap;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.prompt-input__footer-end {
|
|
432
|
+
margin-inline-start: auto;
|
|
433
|
+
}
|
|
434
|
+
|
|
413
435
|
.prompt-input__context-trigger {
|
|
414
436
|
inline-size: var(--sigvelo-control-height-xs);
|
|
415
437
|
padding-inline: 0;
|
|
@@ -647,6 +669,33 @@
|
|
|
647
669
|
margin-inline-start: auto;
|
|
648
670
|
}
|
|
649
671
|
|
|
672
|
+
@media (any-pointer: coarse) {
|
|
673
|
+
.prompt-input__textarea {
|
|
674
|
+
font-size: var(--sigvelo-text-base);
|
|
675
|
+
line-height: var(--sigvelo-text-base-leading);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
.prompt-input__button,
|
|
679
|
+
.prompt-input__footer .button,
|
|
680
|
+
.prompt-input__attachment-remove {
|
|
681
|
+
--sigvelo-recipe-button-height: var(--sigvelo-control-height-xl);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.prompt-input__button {
|
|
685
|
+
min-block-size: var(--sigvelo-control-height-xl);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.prompt-input__button[data-responsive-label],
|
|
689
|
+
.prompt-input__permissions-trigger,
|
|
690
|
+
.prompt-input__context-trigger {
|
|
691
|
+
min-inline-size: var(--sigvelo-control-height-xl);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.prompt-input__attachment[data-image] .prompt-input__attachment-remove {
|
|
695
|
+
position: static;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
650
699
|
@media (forced-colors: active) {
|
|
651
700
|
.prompt-input {
|
|
652
701
|
border: var(--sigvelo-border-style) var(--sigvelo-border-width) CanvasText;
|
|
@@ -178,6 +178,10 @@ body.is-resizing-side-panel .think-full-app__view-scope {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
@container think-full-app (inline-size <= 56rem) {
|
|
181
|
+
.think-full-app__view-scope {
|
|
182
|
+
grid-template-columns: minmax(0, 1fr);
|
|
183
|
+
}
|
|
184
|
+
|
|
181
185
|
/* A side panel or phone has no desktop chrome around the app, so the
|
|
182
186
|
floating application plane reads as a card in a frame. Flatten to one
|
|
183
187
|
edge-to-edge surface, app bar included — the frame never shows. */
|
|
@@ -283,7 +287,10 @@ body.is-resizing-side-panel .think-full-app__view-scope {
|
|
|
283
287
|
|
|
284
288
|
/* The base composer scrim already dissolves the transcript above the box. */
|
|
285
289
|
.think-full-app .agent-chat__composer {
|
|
286
|
-
padding: var(--sigvelo-spacing-2)
|
|
290
|
+
padding-block: var(--sigvelo-spacing-2)
|
|
291
|
+
max(var(--sigvelo-spacing-2), env(safe-area-inset-bottom, 0px));
|
|
292
|
+
padding-inline: max(var(--sigvelo-spacing-2), env(safe-area-inset-left, 0px))
|
|
293
|
+
max(var(--sigvelo-spacing-2), env(safe-area-inset-right, 0px));
|
|
287
294
|
}
|
|
288
295
|
|
|
289
296
|
.think-full-app .prompt-input {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/react-components",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.3",
|
|
4
4
|
"description": "MCP-B React components built on Base UI and shared design tokens, including Cloudflare Think chat primitives.",
|
|
5
5
|
"homepage": "https://design-system.sigvelo.com",
|
|
6
6
|
"bugs": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"streamdown": "^2.5.0",
|
|
59
59
|
"unist-util-visit": "^5.1.0",
|
|
60
60
|
"yet-another-react-lightbox": "^3.32.1",
|
|
61
|
-
"@mcp-b/design-tokens": "0.31.
|
|
61
|
+
"@mcp-b/design-tokens": "0.31.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@ai-sdk/react": "^3.0.230",
|