@mcp-b/react-components 0.23.0 → 0.25.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/dist/{AgentChat-Bm1qYbOo.d.ts → AgentChat-DHxdTjwF.d.ts} +34 -7
- package/dist/{CodeBlock-Cp67Njo3.js → CodeBlock-B3RLU3ez.js} +1 -1
- package/dist/{FileTree-DW60q1w7.js → FileTree-CYr5og0q.js} +1 -1
- package/dist/{Message-_-bEYLAO.js → Message-KlK8tlBZ.js} +1 -1
- package/dist/{ModelSelector-Brvj9Cab.js → ModelSelector-YTlqkIjs.js} +1 -1
- package/dist/{ThinkChat-E_HrfH76.js → ThinkChat-DVhCEjq-.js} +11 -2
- package/dist/{ThinkChatActivity-2BobmuvR.d.ts → ThinkChatActivity-DMTHKWrI.d.ts} +11 -9
- package/dist/{ThinkChatContext-DrsZqdaO.d.ts → ThinkChatContext-B-Nk84Wi.d.ts} +13 -1
- package/dist/{ThinkRecoveryNotice-DFIcG9UX.d.ts → ThinkRecoveryNotice-D6gYcBbr.d.ts} +1 -1
- package/dist/{WorkspaceFileView-rUEN2iox.js → WorkspaceFileView-CuMjXYQn.js} +3 -3
- package/dist/components/Activity.d.ts +11 -0
- package/dist/components/Activity.js +16 -4
- package/dist/components/AgentActivity.js +1 -1
- package/dist/components/AgentActivityPreview.js +1 -1
- package/dist/components/AgentChat.d.ts +1 -1
- package/dist/components/AgentChat.js +174 -94
- package/dist/components/AgentChatStartScreen.js +1 -1
- package/dist/components/AgentConnection.js +2 -2
- package/dist/components/AgentMessageParts.js +6 -2
- package/dist/components/AgentToolDetail.d.ts +1 -1
- package/dist/components/AgentToolDetail.js +2 -2
- package/dist/components/Approval.js +1 -1
- package/dist/components/Artifact.js +1 -1
- package/dist/components/BrowserLiveView.js +1 -1
- package/dist/components/BrowserReplay.js +1 -1
- package/dist/components/BrowserRunPanel.js +1 -1
- package/dist/components/ChainOfThought.d.ts +1 -1
- package/dist/components/ChainOfThought.js +1 -1
- package/dist/components/ChatGptSignInScreen.js +2 -2
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/Checkpoint.js +1 -1
- package/dist/components/CodeBlock.js +1 -1
- package/dist/components/CodexModelSelector.js +1 -1
- package/dist/components/Commit.js +2 -2
- package/dist/components/ContextMenu.js +1 -1
- package/dist/components/Conversation.js +1 -1
- package/dist/components/EnvironmentVariables.js +2 -2
- package/dist/components/ExpansionState.d.ts +51 -0
- package/dist/components/ExpansionState.js +46 -0
- package/dist/components/FileTree.js +1 -1
- package/dist/components/FormattedDate.d.ts +21 -0
- package/dist/components/FormattedDate.js +20 -0
- package/dist/components/Goal.d.ts +87 -0
- package/dist/components/Goal.js +92 -0
- package/dist/components/LinkButton.d.ts +46 -0
- package/dist/components/LinkButton.js +28 -0
- package/dist/components/McpConnectionRequest.js +1 -1
- package/dist/components/McpPluginCatalog.js +1 -1
- package/dist/components/McpServerPicker.js +1 -1
- package/dist/components/MediaPreviewCard.js +13 -2
- package/dist/components/Menubar.js +1 -1
- package/dist/components/Message.js +1 -1
- package/dist/components/MessageScroller.js +1 -1
- package/dist/components/MessageScrollerVirtual.d.ts +72 -0
- package/dist/components/MessageScrollerVirtual.js +110 -0
- package/dist/components/ModelSelector.js +1 -1
- package/dist/components/Plan.js +1 -1
- package/dist/components/PricingPlanCard.js +1 -1
- package/dist/components/PromptInput.js +1 -1
- package/dist/components/Queue.js +1 -1
- package/dist/components/Reasoning.js +2 -2
- package/dist/components/ResponsiveSidebarShell.js +1 -1
- package/dist/components/SearchField.js +1 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/SessionCompaction.d.ts +58 -0
- package/dist/components/SessionCompaction.js +117 -0
- package/dist/components/Shell.d.ts +149 -0
- package/dist/components/Shell.js +116 -0
- package/dist/components/Sources.js +1 -1
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SubagentRunIndicator.js +1 -1
- package/dist/components/Task.js +1 -1
- package/dist/components/Terminal.js +2 -2
- package/dist/components/TestResults.js +1 -1
- package/dist/components/ThemeModeControl.js +1 -1
- package/dist/components/ThinkChat.d.ts +6 -6
- package/dist/components/ThinkChat.js +1 -1
- package/dist/components/ThinkChatActivity.d.ts +1 -1
- package/dist/components/ThinkChatActivity.js +68 -14
- package/dist/components/ThinkChatContext.d.ts +2 -2
- package/dist/components/ThinkChatContext.js +5 -1
- package/dist/components/ThinkChatToolPanels.js +1 -1
- package/dist/components/ThinkExecutionDetail.js +1 -1
- package/dist/components/ThinkExecutionStatus.js +1 -1
- package/dist/components/ThinkExecutionWorkbench.d.ts +4 -3
- package/dist/components/ThinkExecutionWorkbench.js +7 -10
- package/dist/components/ThinkFullApp.js +65 -54
- package/dist/components/ThinkRecoveryNotice.d.ts +1 -1
- package/dist/components/ThinkRoutineBrowser.js +1 -1
- package/dist/components/ThinkRoutineForm.js +1 -1
- package/dist/components/ThinkRoutineLibrary.js +1 -1
- package/dist/components/ThinkThreadPicker.js +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/components/ToolInvocation.d.ts +8 -1
- package/dist/components/ToolInvocation.js +3 -2
- package/dist/components/WebPreview.js +1 -1
- package/dist/components/WorkspaceBrowser.js +1 -1
- package/dist/components/WorkspaceExplorer.js +1 -1
- package/dist/components/WorkspaceFileView.js +1 -1
- package/dist/components/WorkspaceHeader.js +1 -1
- package/dist/components/icons.d.ts +2 -2
- package/dist/components/icons.js +2 -2
- package/dist/{copy-button-TWq8nZhc.js → copy-button-Buxmtmp9.js} +1 -1
- package/dist/{icons-wP1yFUXF.d.ts → icons-Cih3W-zM.d.ts} +6 -1
- package/dist/{icons-ua6f_GH3.js → icons-w5PpKGRz.js} +3 -2
- package/dist/styles/activity.css +6 -0
- package/dist/styles/agent-chat.css +20 -4
- package/dist/styles/composition-motion.css +13 -23
- package/dist/styles/goal.css +57 -0
- package/dist/styles/index.css +2 -0
- package/dist/styles/message-scroller.css +25 -0
- package/dist/styles/responsive-sidebar-shell.css +12 -0
- package/dist/styles/shell.css +122 -0
- package/dist/styles/think-full-app.css +22 -14
- package/package.json +7 -6
- package/dist/view-transitions-DyUP0lSg.js +0 -77
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, BookmarkIcon, BoxIcon, BrainIcon, BrandIconProps, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CodeIcon, CopyIcon, DiscordIcon, DotIcon, DownloadIcon, EllipsisIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, HashIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, McpIcon, MessageSquareIcon, MicrophoneIcon, MinusIcon, MonitorIcon, MoonIcon, MoveToFrontIcon, PaperclipIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, QueueIcon, RefreshIcon, SearchIcon, SidebarIcon, SpinnerIcon, SquareIcon, StopIcon, SunIcon, TerminalIcon, TrashIcon, WarningIcon, WrenchIcon, XIcon };
|
|
1
|
+
import { $ as TargetIcon, A as InfoIcon, B as PaperclipIcon, C as EyeOffIcon, D as HashIcon, E as FolderOpenIcon, F as MicrophoneIcon, G as QueueIcon, H as PencilIcon, I as MinusIcon, J as SidebarIcon, K as RefreshIcon, L as MonitorIcon, M as MaximizeIcon, N as McpIcon, O as IconProps, P as MessageSquareIcon, Q as SunIcon, R as MoonIcon, S as EyeIcon, T as FolderIcon, U as PlayIcon, V as PauseIcon, W as PlusIcon, X as SquareIcon, Y as SpinnerIcon, Z as StopIcon, _ as CopyIcon, a as ArrowUpIcon, b as DownloadIcon, c as BoxIcon, d as CalendarIcon, et as TerminalIcon, f as CheckIcon, g as CodeIcon, h as ChevronRightIcon, i as ArrowRightIcon, it as XIcon, j as LinkIcon, k as ImageIcon, l as BrainIcon, m as ChevronLeftIcon, n as ArrowDownIcon, nt as WarningIcon, o as ArrowUpRightIcon, p as ChevronDownIcon, q as SearchIcon, r as ArrowLeftIcon, rt as WrenchIcon, s as BookmarkIcon, t as ArchiveIcon, tt as TrashIcon, u as BrandIconProps, v as DiscordIcon, w as FileIcon, x as EllipsisIcon, y as DotIcon, z as MoveToFrontIcon } from "../icons-Cih3W-zM.js";
|
|
2
|
+
export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, BookmarkIcon, BoxIcon, BrainIcon, BrandIconProps, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CodeIcon, CopyIcon, DiscordIcon, DotIcon, DownloadIcon, EllipsisIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, HashIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, McpIcon, MessageSquareIcon, MicrophoneIcon, MinusIcon, MonitorIcon, MoonIcon, MoveToFrontIcon, PaperclipIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, QueueIcon, RefreshIcon, SearchIcon, SidebarIcon, SpinnerIcon, SquareIcon, StopIcon, SunIcon, TargetIcon, TerminalIcon, TrashIcon, WarningIcon, WrenchIcon, XIcon };
|
package/dist/components/icons.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, BookmarkIcon, BoxIcon, BrainIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CodeIcon, CopyIcon, DiscordIcon, DotIcon, DownloadIcon, EllipsisIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, HashIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, McpIcon, MessageSquareIcon, MicrophoneIcon, MinusIcon, MonitorIcon, MoonIcon, MoveToFrontIcon, PaperclipIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, QueueIcon, RefreshIcon, SearchIcon, SidebarIcon, SpinnerIcon, SquareIcon, StopIcon, SunIcon, TerminalIcon, TrashIcon, WarningIcon, WrenchIcon, XIcon };
|
|
1
|
+
import { $ as TrashIcon, A as MaximizeIcon, B as PencilIcon, C as FileIcon, D as ImageIcon, E as HashIcon, F as MonitorIcon, G as SearchIcon, H as PlusIcon, I as MoonIcon, J as SquareIcon, K as SidebarIcon, L as MoveToFrontIcon, M as MessageSquareIcon, N as MicrophoneIcon, O as InfoIcon, P as MinusIcon, Q as TerminalIcon, R as PaperclipIcon, S as EyeOffIcon, T as FolderOpenIcon, U as QueueIcon, V as PlayIcon, W as RefreshIcon, X as SunIcon, Y as StopIcon, Z as TargetIcon, _ as DiscordIcon, a as ArrowUpIcon, b as EllipsisIcon, c as BoxIcon, d as CheckIcon, et as WarningIcon, f as ChevronDownIcon, g as CopyIcon, h as CodeIcon, i as ArrowRightIcon, j as McpIcon, k as LinkIcon, l as BrainIcon, m as ChevronRightIcon, n as ArrowDownIcon, nt as XIcon, o as ArrowUpRightIcon, p as ChevronLeftIcon, q as SpinnerIcon, r as ArrowLeftIcon, s as BookmarkIcon, t as ArchiveIcon, tt as WrenchIcon, u as CalendarIcon, v as DotIcon, w as FolderIcon, x as EyeIcon, y as DownloadIcon, z as PauseIcon } from "../icons-w5PpKGRz.js";
|
|
2
|
+
export { ArchiveIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, BookmarkIcon, BoxIcon, BrainIcon, CalendarIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CodeIcon, CopyIcon, DiscordIcon, DotIcon, DownloadIcon, EllipsisIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, HashIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, McpIcon, MessageSquareIcon, MicrophoneIcon, MinusIcon, MonitorIcon, MoonIcon, MoveToFrontIcon, PaperclipIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, QueueIcon, RefreshIcon, SearchIcon, SidebarIcon, SpinnerIcon, SquareIcon, StopIcon, SunIcon, TargetIcon, TerminalIcon, TrashIcon, WarningIcon, WrenchIcon, XIcon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as CheckIcon, g as CopyIcon } from "./icons-
|
|
1
|
+
import { d as CheckIcon, g as CopyIcon } from "./icons-w5PpKGRz.js";
|
|
2
2
|
import { IconButton } from "./components/IconButton.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -281,10 +281,15 @@ declare const SunIcon: ({
|
|
|
281
281
|
strokeWidth,
|
|
282
282
|
...props
|
|
283
283
|
}: IconProps) => import("react").JSX.Element;
|
|
284
|
+
declare const TargetIcon: ({
|
|
285
|
+
size,
|
|
286
|
+
strokeWidth,
|
|
287
|
+
...props
|
|
288
|
+
}: IconProps) => import("react").JSX.Element;
|
|
284
289
|
declare const MaximizeIcon: ({
|
|
285
290
|
size,
|
|
286
291
|
strokeWidth,
|
|
287
292
|
...props
|
|
288
293
|
}: IconProps) => import("react").JSX.Element;
|
|
289
294
|
//#endregion
|
|
290
|
-
export {
|
|
295
|
+
export { TargetIcon as $, InfoIcon as A, PaperclipIcon as B, EyeOffIcon as C, HashIcon as D, FolderOpenIcon as E, MicrophoneIcon as F, QueueIcon as G, PencilIcon as H, MinusIcon as I, SidebarIcon as J, RefreshIcon as K, MonitorIcon as L, MaximizeIcon as M, McpIcon as N, IconProps as O, MessageSquareIcon as P, SunIcon as Q, MoonIcon as R, EyeIcon as S, FolderIcon as T, PlayIcon as U, PauseIcon as V, PlusIcon as W, SquareIcon as X, SpinnerIcon as Y, StopIcon as Z, CopyIcon as _, ArrowUpIcon as a, DownloadIcon as b, BoxIcon as c, CalendarIcon as d, TerminalIcon as et, CheckIcon as f, CodeIcon as g, ChevronRightIcon as h, ArrowRightIcon as i, XIcon as it, LinkIcon as j, ImageIcon as k, BrainIcon as l, ChevronLeftIcon as m, ArrowDownIcon as n, WarningIcon as nt, ArrowUpRightIcon as o, ChevronDownIcon as p, SearchIcon as q, ArrowLeftIcon as r, WrenchIcon as rt, BookmarkIcon as s, ArchiveIcon as t, TrashIcon as tt, BrandIconProps as u, DiscordIcon as v, FileIcon as w, EllipsisIcon as x, DotIcon as y, MoveToFrontIcon as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cx } from "./class-names-BiMDVpUo.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpRight, Bookmark, Box, Brain, CalendarDays, Check, ChevronDown, ChevronLeft, ChevronRight, CircleStop, CodeXml, Copy, CornerDownRight, Dot, Download, Ellipsis, Eye, EyeOff, File, Folder, FolderOpen, Hash, Image, Info, Link2, ListRestart, LoaderCircle, Maximize2, MessageSquare, Mic, Minus, Monitor, Moon, PanelLeft, Paperclip, Pause, Pencil, Play, Plus, RefreshCw, Search, Square, Sun, Terminal, Trash2, TriangleAlert, Wrench, X } from "lucide-react";
|
|
3
|
+
import { Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpRight, Bookmark, Box, Brain, CalendarDays, Check, ChevronDown, ChevronLeft, ChevronRight, CircleStop, CodeXml, Copy, CornerDownRight, Dot, Download, Ellipsis, Eye, EyeOff, File, Folder, FolderOpen, Hash, Image, Info, Link2, ListRestart, LoaderCircle, Maximize2, MessageSquare, Mic, Minus, Monitor, Moon, PanelLeft, Paperclip, Pause, Pencil, Play, Plus, RefreshCw, Search, Square, Sun, Target, Terminal, Trash2, TriangleAlert, Wrench, X } from "lucide-react";
|
|
4
4
|
import { SiDiscord, SiModelcontextprotocol } from "react-icons/si";
|
|
5
5
|
//#region src/components/_internal/icons.tsx
|
|
6
6
|
function icon(Component) {
|
|
@@ -87,6 +87,7 @@ const McpIcon = brandIcon(SiModelcontextprotocol);
|
|
|
87
87
|
const DiscordIcon = brandIcon(SiDiscord);
|
|
88
88
|
const MoonIcon = icon(Moon);
|
|
89
89
|
const SunIcon = icon(Sun);
|
|
90
|
+
const TargetIcon = icon(Target);
|
|
90
91
|
const MaximizeIcon = icon(Maximize2);
|
|
91
92
|
//#endregion
|
|
92
|
-
export {
|
|
93
|
+
export { TrashIcon as $, MaximizeIcon as A, PencilIcon as B, FileIcon as C, ImageIcon as D, HashIcon as E, MonitorIcon as F, SearchIcon as G, PlusIcon as H, MoonIcon as I, SquareIcon as J, SidebarIcon as K, MoveToFrontIcon as L, MessageSquareIcon as M, MicrophoneIcon as N, InfoIcon as O, MinusIcon as P, TerminalIcon as Q, PaperclipIcon as R, EyeOffIcon as S, FolderOpenIcon as T, QueueIcon as U, PlayIcon as V, RefreshIcon as W, SunIcon as X, StopIcon as Y, TargetIcon as Z, DiscordIcon as _, ArrowUpIcon as a, EllipsisIcon as b, BoxIcon as c, CheckIcon as d, WarningIcon as et, ChevronDownIcon as f, CopyIcon as g, CodeIcon as h, ArrowRightIcon as i, McpIcon as j, LinkIcon as k, BrainIcon as l, ChevronRightIcon as m, ArrowDownIcon as n, XIcon as nt, ArrowUpRightIcon as o, ChevronLeftIcon as p, SpinnerIcon as q, ArrowLeftIcon as r, BookmarkIcon as s, ArchiveIcon as t, WrenchIcon as tt, CalendarIcon as u, DotIcon as v, FolderIcon as w, EyeIcon as x, DownloadIcon as y, PauseIcon as z };
|
package/dist/styles/activity.css
CHANGED
|
@@ -85,6 +85,12 @@
|
|
|
85
85
|
padding-inline: var(--sigvelo-spacing-2);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
/* Reveal row for step logs capped at the trailing window. */
|
|
89
|
+
.activity__show-earlier {
|
|
90
|
+
align-self: flex-start;
|
|
91
|
+
color: var(--sigvelo-color-text-muted);
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
.activity__item {
|
|
89
95
|
display: flex;
|
|
90
96
|
align-items: baseline;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.agent-chat {
|
|
2
2
|
--agent-chat-content-max-inline-size: 64rem;
|
|
3
|
+
--agent-chat-composer-scrim-fade: 2.5rem;
|
|
3
4
|
|
|
4
5
|
container: agent-chat / inline-size;
|
|
5
6
|
position: relative;
|
|
@@ -21,13 +22,20 @@
|
|
|
21
22
|
/* Room for the last message to scroll clear of the floating composer.
|
|
22
23
|
--agent-chat-composer-size is set from a ResizeObserver in AgentChat. */
|
|
23
24
|
.agent-chat__transcript-content {
|
|
24
|
-
|
|
25
|
+
/* Also the virtual rows' block-start offset — keep padding and rows in
|
|
26
|
+
lockstep (see .message-scroller__virtual-item). Row spacing is NOT css
|
|
27
|
+
gap: rows are absolutely positioned, so the virtualizer's JS gap option
|
|
28
|
+
owns it (see VirtualMessageScroller). */
|
|
29
|
+
--message-scroller-virtual-block-start: var(--sigvelo-spacing-8);
|
|
30
|
+
|
|
25
31
|
min-inline-size: 0;
|
|
26
32
|
max-inline-size: 100%;
|
|
27
33
|
inline-size: min(100%, var(--agent-chat-content-max-inline-size));
|
|
28
34
|
margin-inline: auto;
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
/* Clearance = composer + its scrim band, so a transcript resting at the
|
|
36
|
+
bottom never sits inside the fade. */
|
|
37
|
+
padding-block: var(--message-scroller-virtual-block-start)
|
|
38
|
+
calc(var(--agent-chat-composer-size, 5rem) + var(--agent-chat-composer-scrim-fade));
|
|
31
39
|
padding-inline: var(--sigvelo-spacing-4);
|
|
32
40
|
}
|
|
33
41
|
|
|
@@ -272,13 +280,21 @@
|
|
|
272
280
|
padding: 0 var(--sigvelo-spacing-6) var(--sigvelo-spacing-6);
|
|
273
281
|
}
|
|
274
282
|
|
|
283
|
+
/* Solid behind the composer itself, dissolving upward so passing transcript
|
|
284
|
+
content fades into the surface instead of hitting a hard edge (Codex and
|
|
285
|
+
Claude both ship an equivalent bottom fade band). */
|
|
275
286
|
.agent-chat__composer::after {
|
|
276
287
|
position: absolute;
|
|
277
288
|
z-index: -1;
|
|
278
289
|
inset: 0;
|
|
290
|
+
inset-block-start: calc(-1 * var(--agent-chat-composer-scrim-fade));
|
|
279
291
|
content: "";
|
|
280
292
|
pointer-events: none;
|
|
281
|
-
background
|
|
293
|
+
background: linear-gradient(
|
|
294
|
+
to bottom,
|
|
295
|
+
transparent,
|
|
296
|
+
var(--sigvelo-color-surface) var(--agent-chat-composer-scrim-fade)
|
|
297
|
+
);
|
|
282
298
|
}
|
|
283
299
|
|
|
284
300
|
.agent-chat__composer > .prompt-input {
|
|
@@ -52,32 +52,22 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/*
|
|
56
|
-
|
|
57
|
-
* default. Element-scoped pseudo-trees attach to their transition root, while
|
|
58
|
-
* the :root selector also covers the document fallback.
|
|
59
|
-
*/
|
|
60
|
-
:where(
|
|
61
|
-
:root,
|
|
62
|
-
.workspace-explorer,
|
|
63
|
-
.responsive-sidebar-shell__frame,
|
|
64
|
-
.think-execution-workbench,
|
|
65
|
-
.think-routine-library,
|
|
66
|
-
.think-full-app__view-scope,
|
|
67
|
-
.think-full-app__workbench-panel
|
|
68
|
-
)::view-transition {
|
|
55
|
+
/* React owns native snapshots; the class comes from <ViewTransition>. */
|
|
56
|
+
::view-transition {
|
|
69
57
|
pointer-events: none;
|
|
70
58
|
}
|
|
71
59
|
|
|
72
|
-
|
|
73
|
-
:root,
|
|
74
|
-
.workspace-explorer,
|
|
75
|
-
.responsive-sidebar-shell__frame,
|
|
76
|
-
.think-execution-workbench,
|
|
77
|
-
.think-routine-library,
|
|
78
|
-
.think-full-app__view-scope,
|
|
79
|
-
.think-full-app__workbench-panel
|
|
80
|
-
)::view-transition-group(*) {
|
|
60
|
+
::view-transition-group(.sigvelo-layout-transition) {
|
|
81
61
|
animation-duration: var(--sigvelo-motion-duration-layout);
|
|
82
62
|
animation-timing-function: var(--sigvelo-motion-ease-change);
|
|
83
63
|
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
::view-transition-group(.sigvelo-layout-transition) {
|
|
67
|
+
animation: none !important;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:root[data-motion="reduce"]::view-transition-group(.sigvelo-layout-transition) {
|
|
72
|
+
animation: none !important;
|
|
73
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.goal {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
min-inline-size: 0;
|
|
5
|
+
min-block-size: var(--sigvelo-spacing-6);
|
|
6
|
+
gap: var(--sigvelo-spacing-1-5);
|
|
7
|
+
padding-block: var(--sigvelo-spacing-1);
|
|
8
|
+
padding-inline: var(--sigvelo-spacing-2-5);
|
|
9
|
+
color: var(--sigvelo-color-text);
|
|
10
|
+
font-size: var(--sigvelo-text-compact);
|
|
11
|
+
line-height: var(--sigvelo-leading-snug);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.goal__icon {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
flex: none;
|
|
17
|
+
color: var(--sigvelo-color-text-muted);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.goal__content {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex: 1;
|
|
23
|
+
flex-wrap: wrap;
|
|
24
|
+
gap: 0 var(--sigvelo-spacing-1);
|
|
25
|
+
align-items: baseline;
|
|
26
|
+
min-inline-size: 0;
|
|
27
|
+
overflow-wrap: anywhere;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.goal__title {
|
|
31
|
+
min-inline-size: 0;
|
|
32
|
+
font-weight: var(--sigvelo-font-weight-semibold);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.goal__objective {
|
|
36
|
+
min-inline-size: 0;
|
|
37
|
+
color: var(--sigvelo-color-text-muted);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.goal__meta {
|
|
41
|
+
min-inline-size: 0;
|
|
42
|
+
color: var(--sigvelo-color-text-muted);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.goal__objective + .goal__meta::before,
|
|
46
|
+
.goal__title + .goal__meta::before {
|
|
47
|
+
content: "\00b7";
|
|
48
|
+
margin-inline-end: var(--sigvelo-spacing-1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.goal__actions {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
flex: none;
|
|
54
|
+
gap: var(--sigvelo-spacing-1);
|
|
55
|
+
align-items: center;
|
|
56
|
+
margin-inline-start: auto;
|
|
57
|
+
}
|
package/dist/styles/index.css
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
@import "./search-field.css" layer(components);
|
|
66
66
|
@import "./select.css" layer(components);
|
|
67
67
|
@import "./separator.css" layer(components);
|
|
68
|
+
@import "./shell.css" layer(components);
|
|
68
69
|
@import "./slider.css" layer(components);
|
|
69
70
|
@import "./status-pill.css" layer(components);
|
|
70
71
|
@import "./stepper.css" layer(components);
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
@import "./codex-model-selector.css" layer(components);
|
|
98
99
|
@import "./environment-variables.css" layer(components);
|
|
99
100
|
@import "./file-tree.css" layer(components);
|
|
101
|
+
@import "./goal.css" layer(components);
|
|
100
102
|
@import "./inline-citation.css" layer(components);
|
|
101
103
|
@import "./message.css" layer(components);
|
|
102
104
|
@import "./model-selector.css" layer(components);
|
|
@@ -41,6 +41,31 @@
|
|
|
41
41
|
.message-scroller__item {
|
|
42
42
|
min-width: 0;
|
|
43
43
|
flex-shrink: 0;
|
|
44
|
+
/* Off-screen rows skip layout/paint entirely (Codex ships the same pair on
|
|
45
|
+
turn content). `auto` keeps the last rendered size once measured; 15rem is
|
|
46
|
+
only the pre-first-render estimate, so scroll math stays sane. */
|
|
47
|
+
content-visibility: auto;
|
|
48
|
+
contain-intrinsic-size: auto 15rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Virtualized variant: rows are windowed and absolutely positioned by
|
|
52
|
+
TanStack Virtual, so no gap/content-visibility here — the window itself
|
|
53
|
+
bounds DOM cost, and translateY replaces flow layout. */
|
|
54
|
+
.message-scroller__virtual-content {
|
|
55
|
+
position: relative;
|
|
56
|
+
width: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Absolutely positioned rows resolve against the wrapper's padding box, so
|
|
60
|
+
its padding never insets them. Rows inherit the inline padding to restore
|
|
61
|
+
the gutters, and start below the block-start padding via the variable the
|
|
62
|
+
padded wrapper re-exports (0 when the wrapper is unpadded). */
|
|
63
|
+
.message-scroller__virtual-item {
|
|
64
|
+
position: absolute;
|
|
65
|
+
inset-block-start: var(--message-scroller-virtual-block-start, 0px);
|
|
66
|
+
inset-inline: 0;
|
|
67
|
+
min-width: 0;
|
|
68
|
+
padding-inline: inherit;
|
|
44
69
|
}
|
|
45
70
|
|
|
46
71
|
.message-scroller__button {
|
|
@@ -92,6 +92,18 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
@container responsive-sidebar-shell (inline-size <= 56rem) {
|
|
95
|
+
/* Narrow hosts flatten the application plane: no desktop chrome remains
|
|
96
|
+
around it, so margins and elevation would read as a card in a frame. */
|
|
97
|
+
.responsive-sidebar-shell__main {
|
|
98
|
+
margin: 0;
|
|
99
|
+
border-radius: 0;
|
|
100
|
+
box-shadow: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.responsive-sidebar-shell > .app-top-bar {
|
|
104
|
+
background: var(--sigvelo-color-surface);
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
.responsive-sidebar-shell__frame {
|
|
96
108
|
grid-template-columns: minmax(0, 1fr);
|
|
97
109
|
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/* Shell Component */
|
|
2
|
+
.shell {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
height: 100%;
|
|
6
|
+
min-height: 25rem;
|
|
7
|
+
border-radius: var(--sigvelo-radius-md);
|
|
8
|
+
border: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
9
|
+
var(--sigvelo-color-neutral-border-subtle);
|
|
10
|
+
background: var(--sigvelo-color-surface-raised);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.shell__header {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: var(--sigvelo-spacing-3) var(--sigvelo-spacing-4);
|
|
18
|
+
background: var(--sigvelo-color-surface-sunken);
|
|
19
|
+
border-block-end: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
20
|
+
var(--sigvelo-color-neutral-border-subtle);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.shell__heading {
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-size: var(--sigvelo-text-sm);
|
|
26
|
+
font-weight: var(--sigvelo-font-weight-semibold);
|
|
27
|
+
color: var(--sigvelo-color-text);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.shell__body {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-height: 0;
|
|
34
|
+
position: relative;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Action Bar */
|
|
38
|
+
.shell__action-bar {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
gap: var(--sigvelo-spacing-1);
|
|
42
|
+
padding: var(--sigvelo-spacing-2);
|
|
43
|
+
background: var(--sigvelo-color-surface-sunken);
|
|
44
|
+
border-inline-end: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
45
|
+
var(--sigvelo-color-neutral-border-subtle);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.shell__action {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
width: var(--sigvelo-spacing-10);
|
|
53
|
+
height: var(--sigvelo-spacing-10);
|
|
54
|
+
padding: 0;
|
|
55
|
+
border: none;
|
|
56
|
+
border-radius: var(--sigvelo-radius-md);
|
|
57
|
+
background: transparent;
|
|
58
|
+
color: var(--sigvelo-color-text-muted);
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition:
|
|
61
|
+
background-color var(--sigvelo-motion-duration-interaction) var(--sigvelo-motion-ease-change),
|
|
62
|
+
color var(--sigvelo-motion-duration-interaction) var(--sigvelo-motion-ease-change);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.shell__action:hover {
|
|
66
|
+
background: var(--sigvelo-color-surface-sunken);
|
|
67
|
+
color: var(--sigvelo-color-text);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.shell__action--active {
|
|
71
|
+
background: var(--sigvelo-color-primary-bg);
|
|
72
|
+
color: var(--sigvelo-color-primary-text-on-bg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.shell__action--active:hover {
|
|
76
|
+
background: color-mix(in oklab, var(--sigvelo-color-primary-bg), black 5%);
|
|
77
|
+
color: var(--sigvelo-color-primary-text-on-bg);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.shell__action svg {
|
|
81
|
+
width: var(--sigvelo-spacing-5);
|
|
82
|
+
height: var(--sigvelo-spacing-5);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Panel */
|
|
86
|
+
.shell__panel {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
width: 16.25rem;
|
|
90
|
+
max-width: 100%;
|
|
91
|
+
background: var(--sigvelo-color-surface-raised);
|
|
92
|
+
border-inline-end: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
93
|
+
var(--sigvelo-color-neutral-border-subtle);
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.shell__panel[hidden] {
|
|
98
|
+
display: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.shell__panel-heading {
|
|
102
|
+
padding: var(--sigvelo-spacing-3) var(--sigvelo-spacing-4);
|
|
103
|
+
font-size: var(--sigvelo-text-sm);
|
|
104
|
+
font-weight: var(--sigvelo-font-weight-bold);
|
|
105
|
+
color: var(--sigvelo-color-text);
|
|
106
|
+
border-block-end: var(--sigvelo-border-style) var(--sigvelo-border-width)
|
|
107
|
+
var(--sigvelo-color-neutral-border-subtle);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.shell__panel-content {
|
|
111
|
+
flex: 1;
|
|
112
|
+
overflow-y: auto;
|
|
113
|
+
padding: var(--sigvelo-spacing-4);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Content */
|
|
117
|
+
.shell__content {
|
|
118
|
+
flex: 1;
|
|
119
|
+
min-width: 0;
|
|
120
|
+
position: relative;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
}
|
|
@@ -178,6 +178,20 @@ body.is-resizing-side-panel .think-full-app__view-scope {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
@container think-full-app (inline-size <= 56rem) {
|
|
181
|
+
/* A side panel or phone has no desktop chrome around the app, so the
|
|
182
|
+
floating application plane reads as a card in a frame. Flatten to one
|
|
183
|
+
edge-to-edge surface, app bar included — the frame never shows. */
|
|
184
|
+
.think-full-app > .think-full-app__view-scope,
|
|
185
|
+
.think-full-app[data-has-workbench-topbar="false"] > .think-full-app__view-scope {
|
|
186
|
+
margin: 0;
|
|
187
|
+
border-radius: 0;
|
|
188
|
+
box-shadow: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.think-full-app > .think-full-app__app-bar {
|
|
192
|
+
background: var(--sigvelo-color-surface);
|
|
193
|
+
}
|
|
194
|
+
|
|
181
195
|
.think-full-app__workbench-view-switch {
|
|
182
196
|
display: none;
|
|
183
197
|
}
|
|
@@ -254,28 +268,22 @@ body.is-resizing-side-panel .think-full-app__view-scope {
|
|
|
254
268
|
}
|
|
255
269
|
|
|
256
270
|
.think-full-app .think-full-app__chat .message-scroller__viewport {
|
|
257
|
-
--message-scroller-fade-
|
|
258
|
-
--message-scroller-fade-b-size: 3rem;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.think-full-app .think-full-app__chat .message-scroller__viewport[data-scrollable~="start"] {
|
|
262
|
-
--message-scroller-fade-t: var(--message-scroller-fade-t-size);
|
|
271
|
+
--message-scroller-fade-size: 3rem;
|
|
263
272
|
}
|
|
264
273
|
|
|
265
274
|
.think-full-app .think-full-app__chat .agent-chat__transcript-content {
|
|
266
|
-
|
|
267
|
-
|
|
275
|
+
--message-scroller-virtual-block-start: calc(
|
|
276
|
+
var(--sigvelo-spacing-5) + env(safe-area-inset-top, 0px)
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
padding-block-start: var(--message-scroller-virtual-block-start);
|
|
280
|
+
/* Matches Codex's side-panel gutter (--padding-panel: 12px). */
|
|
268
281
|
padding-inline: var(--sigvelo-spacing-3);
|
|
269
282
|
}
|
|
270
283
|
|
|
284
|
+
/* The base composer scrim already dissolves the transcript above the box. */
|
|
271
285
|
.think-full-app .agent-chat__composer {
|
|
272
286
|
padding: var(--sigvelo-spacing-2);
|
|
273
|
-
padding-block-start: var(--sigvelo-spacing-4);
|
|
274
|
-
background: linear-gradient(
|
|
275
|
-
to top,
|
|
276
|
-
var(--sigvelo-color-surface) calc(100% - var(--sigvelo-spacing-4)),
|
|
277
|
-
transparent
|
|
278
|
-
);
|
|
279
287
|
}
|
|
280
288
|
|
|
281
289
|
.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.
|
|
3
|
+
"version": "0.25.0",
|
|
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": {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@streamdown/code": "^1.1.1",
|
|
48
48
|
"@streamdown/math": "^1.0.2",
|
|
49
49
|
"@streamdown/mermaid": "^1.0.2",
|
|
50
|
+
"@tanstack/react-virtual": "^3.14.8",
|
|
50
51
|
"agent-skills-ts-sdk": "^2.4.1",
|
|
51
52
|
"anser": "^2.3.5",
|
|
52
53
|
"cloudflare": "^7.0.0",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"streamdown": "^2.5.0",
|
|
58
59
|
"unist-util-visit": "^5.1.0",
|
|
59
60
|
"yet-another-react-lightbox": "^3.32.1",
|
|
60
|
-
"@mcp-b/design-tokens": "0.
|
|
61
|
+
"@mcp-b/design-tokens": "0.25.0"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"@ai-sdk/react": "^3.0.222",
|
|
@@ -83,8 +84,8 @@
|
|
|
83
84
|
"agents": "^0.17.4",
|
|
84
85
|
"ai": "^6.0.220",
|
|
85
86
|
"playwright": "^1.61.0",
|
|
86
|
-
"react": "
|
|
87
|
-
"react-dom": "
|
|
87
|
+
"react": "19.3.0-canary-711c445b-20260722",
|
|
88
|
+
"react-dom": "19.3.0-canary-711c445b-20260722",
|
|
88
89
|
"storybook": "^10.5.2",
|
|
89
90
|
"typescript": "^6.0.3",
|
|
90
91
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.4",
|
|
@@ -100,8 +101,8 @@
|
|
|
100
101
|
"@tanstack/react-router": "^1.170.18",
|
|
101
102
|
"agents": "^0.17.4",
|
|
102
103
|
"ai": "^6.0.182",
|
|
103
|
-
"react": "
|
|
104
|
-
"react-dom": "
|
|
104
|
+
"react": "19.3.0-canary-711c445b-20260722",
|
|
105
|
+
"react-dom": "19.3.0-canary-711c445b-20260722"
|
|
105
106
|
},
|
|
106
107
|
"peerDependenciesMeta": {
|
|
107
108
|
"@ai-sdk/react": {
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { flushSync } from "react-dom";
|
|
2
|
-
//#region src/components/_internal/view-transitions.ts
|
|
3
|
-
let documentScopeSequence = 0;
|
|
4
|
-
let restoreActiveDocumentScope = null;
|
|
5
|
-
/**
|
|
6
|
-
* Reports whether motion should be suppressed, honoring both the app-level
|
|
7
|
-
* `data-motion="reduce"` override and the `prefers-reduced-motion` media query.
|
|
8
|
-
* Returns `true` (reduced) when there is no document, e.g. during SSR.
|
|
9
|
-
*/
|
|
10
|
-
function motionIsReduced() {
|
|
11
|
-
if (typeof document === "undefined") return true;
|
|
12
|
-
if (document.documentElement.dataset.motion === "reduce") return true;
|
|
13
|
-
return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? false;
|
|
14
|
-
}
|
|
15
|
-
function isReactTestEnvironment() {
|
|
16
|
-
return globalThis.IS_REACT_ACT_ENVIRONMENT;
|
|
17
|
-
}
|
|
18
|
-
function scopeDocumentTransition(scope) {
|
|
19
|
-
if (!(scope instanceof HTMLElement || scope instanceof SVGElement)) return null;
|
|
20
|
-
restoreActiveDocumentScope?.();
|
|
21
|
-
const rootStyle = document.documentElement.style;
|
|
22
|
-
const scopeStyle = scope.style;
|
|
23
|
-
const rootValue = rootStyle.getPropertyValue("view-transition-name");
|
|
24
|
-
const rootPriority = rootStyle.getPropertyPriority("view-transition-name");
|
|
25
|
-
const scopeValue = scopeStyle.getPropertyValue("view-transition-name");
|
|
26
|
-
const scopePriority = scopeStyle.getPropertyPriority("view-transition-name");
|
|
27
|
-
rootStyle.setProperty("view-transition-name", "none", "important");
|
|
28
|
-
scopeStyle.setProperty("view-transition-name", `sigvelo-transition-scope-${++documentScopeSequence}`, "important");
|
|
29
|
-
let active = true;
|
|
30
|
-
const restore = () => {
|
|
31
|
-
if (!active) return;
|
|
32
|
-
active = false;
|
|
33
|
-
if (rootValue) rootStyle.setProperty("view-transition-name", rootValue, rootPriority);
|
|
34
|
-
else rootStyle.removeProperty("view-transition-name");
|
|
35
|
-
if (scopeValue) scopeStyle.setProperty("view-transition-name", scopeValue, scopePriority);
|
|
36
|
-
else scopeStyle.removeProperty("view-transition-name");
|
|
37
|
-
if (restoreActiveDocumentScope === restore) restoreActiveDocumentScope = null;
|
|
38
|
-
};
|
|
39
|
-
restoreActiveDocumentScope = restore;
|
|
40
|
-
return restore;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Runs one synchronous React update inside the narrowest supported native view
|
|
44
|
-
* transition. Unsupported and reduced-motion environments commit immediately.
|
|
45
|
-
*/
|
|
46
|
-
function runViewTransition({ scope, update }) {
|
|
47
|
-
let committed = false;
|
|
48
|
-
const commitOnce = () => {
|
|
49
|
-
if (committed) return;
|
|
50
|
-
committed = true;
|
|
51
|
-
flushSync(update);
|
|
52
|
-
};
|
|
53
|
-
if (typeof document === "undefined" || motionIsReduced() || isReactTestEnvironment()) {
|
|
54
|
-
commitOnce();
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
const scopedHost = scope;
|
|
58
|
-
const documentHost = document;
|
|
59
|
-
const useScopedHost = typeof scopedHost?.startViewTransition === "function";
|
|
60
|
-
const host = useScopedHost ? scopedHost : typeof documentHost.startViewTransition === "function" ? documentHost : null;
|
|
61
|
-
if (!host?.startViewTransition) {
|
|
62
|
-
commitOnce();
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
const restoreDocumentScope = useScopedHost ? null : scopeDocumentTransition(scope);
|
|
66
|
-
try {
|
|
67
|
-
const transition = host.startViewTransition(commitOnce);
|
|
68
|
-
if (restoreDocumentScope) transition.finished.finally(restoreDocumentScope).catch(() => void 0);
|
|
69
|
-
return transition;
|
|
70
|
-
} catch {
|
|
71
|
-
restoreDocumentScope?.();
|
|
72
|
-
commitOnce();
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
export { runViewTransition as n, motionIsReduced as t };
|