@mcp-b/react-components 0.36.0 → 0.38.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.
Files changed (117) hide show
  1. package/dist/{AgentActivity-SP1WfLDW.d.ts → AgentActivity-Cc_oDYum.d.ts} +1 -1
  2. package/dist/{CodeBlock-Bk4nn7l-.js → CodeBlock-DO4Hdu1R.js} +1 -1
  3. package/dist/{FileTree-4WP4Uc_m.js → FileTree-DbQMpvxV.js} +1 -1
  4. package/dist/Message-DBsHHhcM.d.ts +228 -0
  5. package/dist/{ThinkChat-ByR-QT_D.js → ThinkChat-DkA4Wr71.js} +9 -4
  6. package/dist/{ThinkChatActivity-Dkmm2pIj.d.ts → ThinkChatActivity-D6-_5Phw.d.ts} +1 -1
  7. package/dist/{ThinkChatActivitySummary-teRjrPxW.d.ts → ThinkChatActivitySummary-BtBQgMg6.d.ts} +1 -1
  8. package/dist/{ToggleGroup-BrQZOQn_.d.ts → ToggleGroup-_pQMyHGM.d.ts} +1 -1
  9. package/dist/{WorkspaceFileView-DTHJLKW_.js → WorkspaceFileView-DeGzWwhK.js} +5 -5
  10. package/dist/{WorkspaceLink-DQogVe8E.d.ts → WorkspaceLink-Bh9-Jo1r.d.ts} +1 -1
  11. package/dist/{WorkspaceLink-DZeLe_jN.js → WorkspaceLink-DtH66bAY.js} +4 -3
  12. package/dist/{WorkspaceMessageResponse-BWbkIELl.js → WorkspaceMessageResponse-CJCmGvTx.js} +64 -7
  13. package/dist/WorkspaceMessageResponse-Cy28WGSz.d.ts +24 -0
  14. package/dist/components/agents-sdk/AgentActivity.d.ts +1 -1
  15. package/dist/components/agents-sdk/AgentActivity.js +1 -1
  16. package/dist/components/agents-sdk/AgentActivityPreview.d.ts +2 -2
  17. package/dist/components/agents-sdk/AgentActivityPreview.js +3 -3
  18. package/dist/components/agents-sdk/AgentChat.js +9 -9
  19. package/dist/components/agents-sdk/BrowserLiveView.js +2 -2
  20. package/dist/components/agents-sdk/BrowserReplay.js +1 -1
  21. package/dist/components/agents-sdk/BrowserRunPanel.js +2 -2
  22. package/dist/components/agents-sdk/McpConnectionRequest.js +2 -2
  23. package/dist/components/agents-sdk/McpConnectorForm.js +1 -1
  24. package/dist/components/agents-sdk/McpPluginCatalog.js +4 -4
  25. package/dist/components/agents-sdk/McpServerPicker.js +2 -2
  26. package/dist/components/agents-sdk/ModelSelector.js +3 -3
  27. package/dist/components/agents-sdk/PromptInputApproval.js +1 -1
  28. package/dist/components/agents-sdk/PromptInputCommands.js +1 -1
  29. package/dist/components/agents-sdk/SubagentRunIndicator.js +1 -1
  30. package/dist/components/agents-sdk/SubagentRunSelector.js +2 -2
  31. package/dist/components/agents-sdk/ThinkChat.d.ts +5 -2
  32. package/dist/components/agents-sdk/ThinkChat.js +1 -1
  33. package/dist/components/agents-sdk/ThinkChatActivity.d.ts +1 -1
  34. package/dist/components/agents-sdk/ThinkChatActivity.js +1 -1
  35. package/dist/components/agents-sdk/ThinkChatActivitySummary.d.ts +1 -1
  36. package/dist/components/agents-sdk/ThinkChatToolPanels.js +2 -2
  37. package/dist/components/agents-sdk/ThinkExecutionDetail.js +1 -1
  38. package/dist/components/agents-sdk/ThinkExecutionStatus.js +1 -1
  39. package/dist/components/agents-sdk/ThinkExecutionWorkbench.js +4 -4
  40. package/dist/components/agents-sdk/ThinkFullApp.d.ts +1 -1
  41. package/dist/components/agents-sdk/ThinkFullApp.js +6 -6
  42. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.d.ts +1 -1
  43. package/dist/components/agents-sdk/ThinkFullAppViewSwitch.js +1 -1
  44. package/dist/components/agents-sdk/ThinkRecoveryNotice.js +1 -1
  45. package/dist/components/agents-sdk/ThinkRoutineBrowser.js +2 -2
  46. package/dist/components/agents-sdk/ThinkRoutineDetail.js +1 -1
  47. package/dist/components/agents-sdk/ThinkRoutineForm.js +2 -2
  48. package/dist/components/agents-sdk/ThinkRoutineLibrary.js +4 -4
  49. package/dist/components/agents-sdk/ThinkRoutineRuns.js +2 -2
  50. package/dist/components/agents-sdk/ThinkThreadPicker.js +4 -4
  51. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  52. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +1 -1
  53. package/dist/components/agents-sdk/WorkspaceExplorer.js +2 -2
  54. package/dist/components/agents-sdk/WorkspaceFileView.js +1 -1
  55. package/dist/components/agents-sdk/WorkspaceHeader.js +1 -1
  56. package/dist/components/agents-sdk/WorkspaceLink.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspaceLink.js +1 -1
  58. package/dist/components/agents-sdk/WorkspaceMessageResponse.d.ts +2 -12
  59. package/dist/components/agents-sdk/WorkspaceMessageResponse.js +1 -1
  60. package/dist/components/agents-sdk/WorkspaceMountManager.js +2 -2
  61. package/dist/components/ai-sdk/Activity.js +1 -1
  62. package/dist/components/ai-sdk/AgentChatStartScreen.js +1 -1
  63. package/dist/components/ai-sdk/Approval.js +2 -2
  64. package/dist/components/ai-sdk/Artifact.d.ts +44 -1
  65. package/dist/components/ai-sdk/Artifact.js +79 -3
  66. package/dist/components/ai-sdk/ChainOfThought.js +1 -1
  67. package/dist/components/ai-sdk/Checkpoint.js +1 -1
  68. package/dist/components/ai-sdk/CodeBlock.js +1 -1
  69. package/dist/components/ai-sdk/Conversation.js +1 -1
  70. package/dist/components/ai-sdk/Goal.js +1 -1
  71. package/dist/components/ai-sdk/InlineCitation.js +1 -1
  72. package/dist/components/ai-sdk/MediaPreviewCard.js +1 -1
  73. package/dist/components/ai-sdk/Message.d.ts +1 -227
  74. package/dist/components/ai-sdk/Message.js +1 -1
  75. package/dist/components/ai-sdk/MessageScroller.js +1 -1
  76. package/dist/components/ai-sdk/MessageScrollerVirtual.js +1 -1
  77. package/dist/components/ai-sdk/Plan.js +1 -1
  78. package/dist/components/ai-sdk/PromptInput.js +3 -3
  79. package/dist/components/ai-sdk/Queue.js +1 -1
  80. package/dist/components/ai-sdk/Reasoning.js +1 -1
  81. package/dist/components/ai-sdk/Sources.js +1 -1
  82. package/dist/components/ai-sdk/Task.js +1 -1
  83. package/dist/components/extension/ChatGptSignInScreen.js +1 -1
  84. package/dist/components/extension/CodexModelSelector.js +2 -2
  85. package/dist/components/extension/ConversationTabPicker.js +3 -3
  86. package/dist/components/foundations/Card.d.ts +3 -3
  87. package/dist/components/foundations/Card.js +3 -3
  88. package/dist/components/foundations/Checkbox.js +1 -1
  89. package/dist/components/foundations/Collapsible.js +1 -1
  90. package/dist/components/foundations/ContextMenu.js +1 -1
  91. package/dist/components/foundations/Menubar.js +1 -1
  92. package/dist/components/foundations/SearchField.js +1 -1
  93. package/dist/components/foundations/Select.js +1 -1
  94. package/dist/components/foundations/Stepper.js +1 -1
  95. package/dist/components/foundations/Toast.js +1 -1
  96. package/dist/components/foundations/ToggleGroup.d.ts +1 -1
  97. package/dist/components/foundations/ToggleGroup.js +1 -1
  98. package/dist/components/foundations/icons.js +1 -1
  99. package/dist/components/general-purpose/Commit.js +3 -3
  100. package/dist/components/general-purpose/EnvironmentVariables.js +2 -2
  101. package/dist/components/general-purpose/FileTree.js +1 -1
  102. package/dist/components/general-purpose/PricingBillingToggle.js +1 -1
  103. package/dist/components/general-purpose/PricingPlanCard.js +2 -2
  104. package/dist/components/general-purpose/PricingUsageCalculator.js +2 -2
  105. package/dist/components/general-purpose/ResponsiveSidebarShell.js +1 -1
  106. package/dist/components/general-purpose/SettingsFormDialog.js +2 -2
  107. package/dist/components/general-purpose/SetupChecklist.js +1 -1
  108. package/dist/components/general-purpose/Terminal.js +2 -2
  109. package/dist/components/general-purpose/TestResults.js +1 -1
  110. package/dist/components/general-purpose/ThemeModeControl.js +1 -1
  111. package/dist/components/general-purpose/WebPreview.js +1 -1
  112. package/dist/components/nanites/AgentConnection.js +2 -2
  113. package/dist/components/nanites/AgentToolDetail.js +4 -4
  114. package/dist/{copy-button-CsNSSKYG.js → copy-button-4YvddK4e.js} +1 -1
  115. package/dist/styles/artifact.css +65 -0
  116. package/package.json +3 -3
  117. package/dist/{icons-B1Qw05te.js → icons-B4mGvCvc.js} +1 -1
@@ -1,14 +1,14 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { H as PlusIcon, J as SpinnerIcon, b as EllipsisIcon, o as ArrowUpRightIcon, rt as XIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
3
- import { AppIcon } from "../foundations/AppIcon.js";
2
+ import { H as PlusIcon, J as SpinnerIcon, b as EllipsisIcon, o as ArrowUpRightIcon, rt as XIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { Button } from "../foundations/Button.js";
4
+ import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
5
5
  import { IconButton } from "../foundations/IconButton.js";
6
6
  import { Dialog } from "../foundations/Dialog.js";
7
7
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
8
8
  import { Separator } from "../foundations/Separator.js";
9
- import { AgentAttention, AgentAttentionBody, AgentAttentionHeader } from "../ai-sdk/AgentAttention.js";
10
- import { n as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-SD_S-IpB.js";
9
+ import { AppIcon } from "../foundations/AppIcon.js";
11
10
  import { SearchField } from "../foundations/SearchField.js";
11
+ import { n as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-SD_S-IpB.js";
12
12
  import * as React from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region src/components/agents-sdk/McpPluginCatalog.tsx
@@ -1,9 +1,9 @@
1
1
  import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
2
- import { J as SpinnerIcon, P as MinusIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
2
+ import { J as SpinnerIcon, P as MinusIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { buttonVariants } from "../foundations/Button.js";
4
+ import { Menu } from "../foundations/Menu.js";
4
5
  import { Dialog } from "../foundations/Dialog.js";
5
6
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
6
- import { Menu } from "../foundations/Menu.js";
7
7
  import { PromptInputActionMenu, PromptInputActionMenuContent, PromptInputActionMenuTrigger } from "../ai-sdk/PromptInput.js";
8
8
  import { n as getMcpServerProjection, t as McpServerIcon } from "../../mcp-server-SD_S-IpB.js";
9
9
  import { McpConnectorForm } from "./McpConnectorForm.js";
@@ -1,13 +1,13 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { G as SearchIcon, f as ChevronDownIcon } from "../../icons-B1Qw05te.js";
2
+ import { G as SearchIcon, f as ChevronDownIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Button } from "../foundations/Button.js";
4
+ import { Autocomplete } from "../foundations/Autocomplete.js";
4
5
  import { Dialog } from "../foundations/Dialog.js";
5
6
  import { o as titleCase } from "../../format-DB2mX9DA.js";
6
7
  import { Separator } from "../foundations/Separator.js";
7
- import { EmptyState } from "../foundations/EmptyState.js";
8
8
  import { ScrollArea } from "../foundations/ScrollArea.js";
9
- import { Autocomplete } from "../foundations/Autocomplete.js";
10
9
  import { t as ProviderLogo } from "../../provider-logos-zjZycgV6.js";
10
+ import { EmptyState } from "../foundations/EmptyState.js";
11
11
  import * as React from "react";
12
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
13
13
  import { createPortal } from "react-dom";
@@ -1,6 +1,6 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
3
2
  import { ToolApproval } from "../ai-sdk/ToolApproval.js";
3
+ import { ThinkExecutionApproval, ThinkPendingApproval, getPausedExecution } from "./ThinkPendingApproval.js";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { isToolUIPart } from "ai";
@@ -1,4 +1,4 @@
1
- import { c as BoxIcon, j as McpIcon } from "../../icons-B1Qw05te.js";
1
+ import { c as BoxIcon, j as McpIcon } from "../../icons-B4mGvCvc.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  //#region src/components/agents-sdk/PromptInputCommands.tsx
4
4
  /** Project whole upstream Agents MCP state into composer mention commands. */
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { J as SpinnerIcon, X as StopIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
2
+ import { J as SpinnerIcon, X as StopIcon, d as CheckIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/components/agents-sdk/SubagentRunIndicator.tsx
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { l as BrainIcon } from "../../icons-B1Qw05te.js";
3
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { l as BrainIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { buttonVariants } from "../foundations/Button.js";
5
4
  import { Tooltip } from "../foundations/Tooltip.js";
5
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
6
6
  import { SubagentRunIndicator, getSubagentRunName, getSubagentRunTooltip } from "./SubagentRunIndicator.js";
7
7
  import "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -3,9 +3,10 @@ import { K as PromptInputMessage } from "../../PromptInput-BRX7FhjH.js";
3
3
  import { r as AgentChatProps } from "../../AgentChat-CVO7xyLC.js";
4
4
  import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
5
5
  import { o as UseSessionCompactionResult } from "../../SessionCompaction-CmTJFpzj.js";
6
- import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-Dkmm2pIj.js";
6
+ import { o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
7
7
  import { i as ThinkChatValue } from "../../ThinkChatContext-COIgzkYp.js";
8
8
  import { t as ThinkRecoveryNotice } from "../../ThinkRecoveryNotice-DGWr94rk.js";
9
+ import { n as WorkspaceHtmlArtifactRenderer } from "../../WorkspaceMessageResponse-Cy28WGSz.js";
9
10
  import * as React from "react";
10
11
  import { UIMessage } from "ai";
11
12
  import { UseAgentOptions } from "agents/react";
@@ -67,7 +68,8 @@ type ThinkChatMessagesProps<MessageT extends UIMessage = UIMessage> = Omit<Agent
67
68
  * that does not exist yet.
68
69
  */
69
70
  draft?: ThinkChatDraft<MessageT>; /** Whole `useSessionCompaction` result for built-in progress and error notices. */
70
- sessionCompaction?: UseSessionCompactionResult;
71
+ sessionCompaction?: UseSessionCompactionResult; /** Promotes assistant-authored workspace HTML links through a host runtime hydrator. */
72
+ renderWorkspaceHtmlArtifact?: WorkspaceHtmlArtifactRenderer;
71
73
  };
72
74
  /** Shared pending-approval options for components and TanStack Router loaders. */
73
75
  declare function thinkPendingExecutionApprovalsQueryOptions(stub: AgentStub<Think>, sourceKey: string): ThinkPendingExecutionApprovalsQueryOptions;
@@ -128,6 +130,7 @@ declare function ThinkChatMessages<State = unknown, MessageT extends UIMessage =
128
130
  renderPart,
129
131
  excludeTools,
130
132
  renderAgentToolRunLink,
133
+ renderWorkspaceHtmlArtifact,
131
134
  toolRenderers,
132
135
  thinkStub,
133
136
  onExecutionSettled,
@@ -1,2 +1,2 @@
1
- import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-ByR-QT_D.js";
1
+ import { a as thinkPendingExecutionApprovalsQueryOptions, i as ThinkChatRoot, n as ThinkChatMessages, o as useThinkChat, r as ThinkChatProvider, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DkA4Wr71.js";
2
2
  export { ThinkChat, ThinkChatMessages, ThinkChatProvider, ThinkChatRoot, thinkPendingExecutionApprovalsQueryOptions, useThinkChat, useThinkPendingExecutionApprovals };
@@ -1,2 +1,2 @@
1
- import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-Dkmm2pIj.js";
1
+ import { a as ThinkChatToolRenderers, i as ThinkChatToolRenderer, n as ThinkChatActivityProps, o as createThinkChatActivityRenderer, r as ThinkChatActivityRendererOptions, s as renderThinkChatActivityPart, t as ThinkChatActivity } from "../../ThinkChatActivity-D6-_5Phw.js";
2
2
  export { ThinkChatActivity, ThinkChatActivityProps, ThinkChatActivityRendererOptions, ThinkChatToolRenderer, ThinkChatToolRenderers, createThinkChatActivityRenderer, renderThinkChatActivityPart };
@@ -1,10 +1,10 @@
1
- import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
2
1
  import { useExpansionState } from "../ai-sdk/ExpansionState.js";
3
2
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityText, ActivityTrigger } from "../ai-sdk/Activity.js";
4
3
  import { Button } from "../foundations/Button.js";
5
4
  import { MessageResponse } from "../ai-sdk/Message.js";
6
5
  import { useOptionalAgentToolRuns } from "./AgentToolRunsContext.js";
7
6
  import { SubagentRunList } from "./SubagentRunList.js";
7
+ import { AgentActivityFavicon, AgentActivityIcon } from "./AgentActivity.js";
8
8
  import { useOptionalThinkChatLive } from "./ThinkChatContext.js";
9
9
  import { isBrowserToolPart, isExecuteToolPart, isFetchToolPart, isPartWorking, isSessionContextToolPart, isSkillToolPart, isThinkChatActivityPart, isWorkspaceToolPart } from "./ThinkChatToolParts.js";
10
10
  import { ThinkChatBrowserPanel, ThinkChatExecutePanel, ThinkChatFetchPanel, ThinkChatSessionContextPanel, ThinkChatSkillPanel, ThinkChatWorkspacePanel } from "./ThinkChatToolPanels.js";
@@ -1,2 +1,2 @@
1
- import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-teRjrPxW.js";
1
+ import { a as ThinkChatToolLifecycleSnapshot, c as deriveThinkChatActivityHeader, d as summarizeActivitySteps, i as ThinkChatToolDescribers, l as deriveThinkChatToolLifecycleHeader, n as ThinkChatActivityHeader, o as activityPartIconKind, r as ThinkChatToolDescriber, s as activityPartUrl, t as ThinkChatActivityDescription, u as describeThinkChatActivityPart } from "../../ThinkChatActivitySummary-BtBQgMg6.js";
2
2
  export { ThinkChatActivityDescription, ThinkChatActivityHeader, ThinkChatToolDescriber, ThinkChatToolDescribers, ThinkChatToolLifecycleSnapshot, activityPartIconKind, activityPartUrl, deriveThinkChatActivityHeader, deriveThinkChatToolLifecycleHeader, describeThinkChatActivityPart, summarizeActivitySteps };
@@ -1,8 +1,8 @@
1
1
  import { ActivityOutput, ActivityPanel } from "../ai-sdk/Activity.js";
2
- import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
3
2
  import { Tabs } from "../foundations/Tabs.js";
3
+ import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
4
+ import { t as CodeBlock } from "../../CodeBlock-DO4Hdu1R.js";
4
5
  import { BrowserLiveView } from "./BrowserLiveView.js";
5
- import { t as CodeBlock } from "../../CodeBlock-Bk4nn7l-.js";
6
6
  import { inferWorkspaceLanguage } from "./WorkspaceFile.js";
7
7
  import { displayUrl, isSessionContextToolFailure } from "./ThinkChatToolParts.js";
8
8
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as TerminalIcon, C as FileIcon, O as InfoIcon, W as RefreshIcon, d as CheckIcon, n as ArrowDownIcon, rt as XIcon } from "../../icons-B1Qw05te.js";
2
+ import { $ as TerminalIcon, C as FileIcon, O as InfoIcon, W as RefreshIcon, d as CheckIcon, n as ArrowDownIcon, rt as XIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Activity, ActivityContent, ActivityItem, ActivityItemGroup, ActivityOutput, ActivityPanel, ActivityTrigger } from "../ai-sdk/Activity.js";
4
4
  import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
5
5
  import { EmptyState } from "../foundations/EmptyState.js";
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { J as SpinnerIcon, O as InfoIcon, d as CheckIcon, rt as XIcon, z as PauseIcon } from "../../icons-B1Qw05te.js";
2
+ import { J as SpinnerIcon, O as InfoIcon, d as CheckIcon, rt as XIcon, z as PauseIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Tooltip } from "../foundations/Tooltip.js";
4
4
  import { formatThinkExecutionRunProgress, formatThinkExecutionStatus, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, getThinkExecutionRunSubtitle, getThinkExecutionRunTitle } from "./ThinkExecutionRun.js";
5
5
  import "react";
@@ -1,15 +1,15 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { W as RefreshIcon, b as EllipsisIcon } from "../../icons-B1Qw05te.js";
3
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { W as RefreshIcon, b as EllipsisIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { buttonVariants } from "../foundations/Button.js";
5
4
  import { IconButton } from "../foundations/IconButton.js";
5
+ import { Menu } from "../foundations/Menu.js";
6
6
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
7
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
8
  import { EmptyState } from "../foundations/EmptyState.js";
8
- import { Menu } from "../foundations/Menu.js";
9
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
9
10
  import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, getThinkExecutionRunStatus, getThinkExecutionRunStatusTone, isSameThinkExecutionRun, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
10
11
  import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
11
12
  import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
12
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
13
13
  import * as React from "react";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  import { queryOptions, useMutation, useSuspenseQuery } from "@tanstack/react-query";
@@ -1,4 +1,4 @@
1
- import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-DQogVe8E.js";
1
+ import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
2
  import { n as AgentToolEventsValue } from "../../AgentToolRunsContext-BCVqCtJ1.js";
3
3
  import { McpPluginCatalogProps } from "./McpPluginCatalog.js";
4
4
  import { ThinkChatMessagesProps } from "./ThinkChat.js";
@@ -1,14 +1,14 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { $ as TerminalIcon, C as FileIcon, J as SpinnerIcon, c as BoxIcon, f as ChevronDownIcon } from "../../icons-B1Qw05te.js";
2
+ import { $ as TerminalIcon, C as FileIcon, J as SpinnerIcon, c as BoxIcon, f as ChevronDownIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Button } from "../foundations/Button.js";
4
- import { ScrollArea } from "../foundations/ScrollArea.js";
5
4
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
6
- import { McpPluginCatalog } from "./McpPluginCatalog.js";
7
- import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DZeLe_jN.js";
8
- import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-ByR-QT_D.js";
5
+ import { ScrollArea } from "../foundations/ScrollArea.js";
9
6
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
10
- import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
11
7
  import { ResizableSidePanel } from "../general-purpose/ResizableSidePanel.js";
8
+ import { a as WorkspaceNavigationRestorationBoundary, i as WorkspaceNavigationFocusRestorer, n as WorkspaceNavigationProvider } from "../../WorkspaceLink-DtH66bAY.js";
9
+ import { c as resolveThinkApprovalProps, s as useThinkPendingExecutionApprovals, t as ThinkChat } from "../../ThinkChat-DkA4Wr71.js";
10
+ import { McpPluginCatalog } from "./McpPluginCatalog.js";
11
+ import { ThinkExecutionWorkbench } from "./ThinkExecutionWorkbench.js";
12
12
  import { ThinkFullAppViewSwitch } from "./ThinkFullAppViewSwitch.js";
13
13
  import { ThinkThreadStatusIndicators } from "./ThinkThreadPicker.js";
14
14
  import { ThinkThreadShell } from "./ThinkThreadShell.js";
@@ -1,4 +1,4 @@
1
- import { r as ToggleGroupProps } from "../../ToggleGroup-BrQZOQn_.js";
1
+ import { r as ToggleGroupProps } from "../../ToggleGroup-_pQMyHGM.js";
2
2
  import * as React from "react";
3
3
 
4
4
  //#region src/components/agents-sdk/ThinkFullAppViewSwitch.d.ts
@@ -1,6 +1,6 @@
1
1
  import { n as mergeBaseClassName } from "../../class-names-BiMDVpUo.js";
2
- import { AppTopBar } from "../general-purpose/AppTopBar.js";
3
2
  import { ToggleGroup } from "../foundations/ToggleGroup.js";
3
+ import { AppTopBar } from "../general-purpose/AppTopBar.js";
4
4
  import "react";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/components/agents-sdk/ThinkFullAppViewSwitch.tsx
@@ -1,5 +1,5 @@
1
- import { TransitionSurface } from "../foundations/TransitionSurface.js";
2
1
  import { AgentChatTurnError } from "../ai-sdk/AgentChatTurnError.js";
2
+ import { TransitionSurface } from "../foundations/TransitionSurface.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/components/agents-sdk/ThinkRecoveryNotice.tsx
5
5
  function connectionReason(error) {
@@ -1,9 +1,9 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { H as PlusIcon } from "../../icons-B1Qw05te.js";
3
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { H as PlusIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { buttonVariants } from "../foundations/Button.js";
5
4
  import { Tooltip } from "../foundations/Tooltip.js";
6
5
  import { t as capitalize } from "../../format-DB2mX9DA.js";
6
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
7
  import { EmptyState } from "../foundations/EmptyState.js";
8
8
  import { SearchField } from "../foundations/SearchField.js";
9
9
  import { ToggleGroup } from "../foundations/ToggleGroup.js";
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { Badge } from "../foundations/Badge.js";
3
- import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
4
3
  import { Switch } from "../foundations/Switch.js";
4
+ import { getThinkRoutineNextRun } from "./ThinkRoutine.js";
5
5
  import { ThinkRoutineRuns } from "./ThinkRoutineRuns.js";
6
6
  import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,10 +1,10 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { J as SpinnerIcon } from "../../icons-B1Qw05te.js";
3
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { J as SpinnerIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { Button, buttonVariants } from "../foundations/Button.js";
5
4
  import { Field } from "../foundations/Field.js";
6
5
  import { Form } from "../foundations/Form.js";
7
6
  import { Textarea } from "../foundations/Textarea.js";
7
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
8
8
  import { Select } from "../foundations/Select.js";
9
9
  import * as React from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,12 +1,12 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { J as SpinnerIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIcon, tt as WarningIcon } from "../../icons-B1Qw05te.js";
3
- import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { J as SpinnerIcon, V as PlayIcon, b as EllipsisIcon, f as ChevronDownIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { Button, buttonVariants } from "../foundations/Button.js";
4
+ import { Menu } from "../foundations/Menu.js";
5
5
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
6
+ import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
+ import { AlertDialog } from "../foundations/AlertDialog.js";
6
8
  import { EmptyState } from "../foundations/EmptyState.js";
7
- import { Menu } from "../foundations/Menu.js";
8
9
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
9
- import { AlertDialog } from "../foundations/AlertDialog.js";
10
10
  import { ResponsiveSidebarShell } from "../general-purpose/ResponsiveSidebarShell.js";
11
11
  import { ThinkRoutineBrowser } from "./ThinkRoutineBrowser.js";
12
12
  import { ThinkRoutineDetail } from "./ThinkRoutineDetail.js";
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
3
2
  import { buttonVariants } from "../foundations/Button.js";
4
- import { EmptyState } from "../foundations/EmptyState.js";
3
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
5
4
  import { Badge } from "../foundations/Badge.js";
5
+ import { EmptyState } from "../foundations/EmptyState.js";
6
6
  import { getThinkExecutionRunAccessibleName, getThinkExecutionRunId, isThinkSubmissionRun } from "./ThinkExecutionRun.js";
7
7
  import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
8
8
  import * as React from "react";
@@ -1,12 +1,12 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { H as PlusIcon, J as SpinnerIcon, t as ArchiveIcon, tt as WarningIcon, v as DotIcon } from "../../icons-B1Qw05te.js";
3
- import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
2
+ import { H as PlusIcon, J as SpinnerIcon, t as ArchiveIcon, tt as WarningIcon, v as DotIcon } from "../../icons-B4mGvCvc.js";
4
3
  import { Button, buttonVariants } from "../foundations/Button.js";
5
4
  import { i as formatErrorMessage } from "../../format-DB2mX9DA.js";
6
- import { EmptyState } from "../foundations/EmptyState.js";
5
+ import { n as isPlainPrimaryLinkActivation, t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
7
6
  import { ScrollArea } from "../foundations/ScrollArea.js";
8
- import { SearchField } from "../foundations/SearchField.js";
9
7
  import { AlertDialog } from "../foundations/AlertDialog.js";
8
+ import { EmptyState } from "../foundations/EmptyState.js";
9
+ import { SearchField } from "../foundations/SearchField.js";
10
10
  import * as React from "react";
11
11
  import { jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/components/agents-sdk/ThinkThreadPicker.tsx
@@ -1,5 +1,5 @@
1
1
  import { SearchField } from "../foundations/SearchField.js";
2
- import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-4WP4Uc_m.js";
2
+ import { i as FileTreeFolder, r as FileTreeFile, t as FileTree } from "../../FileTree-DbQMpvxV.js";
3
3
  import { WorkspaceHeader } from "./WorkspaceHeader.js";
4
4
  import * as React from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-DQogVe8E.js";
1
+ import { l as WorkspaceNavigationAdapter } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
2
  import { WorkspaceState } from "./Workspace.js";
3
3
  import * as React from "react";
4
4
 
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
2
  import { n as mergeRefs } from "../../merge-refs-DF_7w2x_.js";
3
- import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DZeLe_jN.js";
3
+ import { a as WorkspaceNavigationRestorationBoundary, n as WorkspaceNavigationProvider, o as useRequiredWorkspaceNavigationRestoration, r as resolveWorkspaceLink } from "../../WorkspaceLink-DtH66bAY.js";
4
4
  import { WorkspaceBrowser } from "./WorkspaceBrowser.js";
5
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-DTHJLKW_.js";
5
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DeGzWwhK.js";
6
6
  import * as React from "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/components/agents-sdk/WorkspaceExplorer.tsx
@@ -1,2 +1,2 @@
1
- import { t as WorkspaceFileView } from "../../WorkspaceFileView-DTHJLKW_.js";
1
+ import { t as WorkspaceFileView } from "../../WorkspaceFileView-DeGzWwhK.js";
2
2
  export { WorkspaceFileView };
@@ -1,4 +1,4 @@
1
- import { W as RefreshIcon } from "../../icons-B1Qw05te.js";
1
+ import { W as RefreshIcon } from "../../icons-B4mGvCvc.js";
2
2
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
3
3
  import "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,2 +1,2 @@
1
- import { a as WorkspaceFileLinkProps, c as WorkspaceLinkResolution, d as WorkspaceNavigationProvider, f as WorkspaceNavigationProviderProps, i as WorkspaceFileLink, l as WorkspaceNavigationAdapter, n as WorkspaceDestination, o as WorkspaceInvalidDestination, p as resolveWorkspaceLink, r as WorkspaceExternalDestination, s as WorkspaceLinkBase, t as ResolveWorkspaceLinkOptions, u as WorkspaceNavigationEntry } from "../../WorkspaceLink-DQogVe8E.js";
1
+ import { a as WorkspaceFileLinkProps, c as WorkspaceLinkResolution, d as WorkspaceNavigationProvider, f as WorkspaceNavigationProviderProps, i as WorkspaceFileLink, l as WorkspaceNavigationAdapter, n as WorkspaceDestination, o as WorkspaceInvalidDestination, p as resolveWorkspaceLink, r as WorkspaceExternalDestination, s as WorkspaceLinkBase, t as ResolveWorkspaceLinkOptions, u as WorkspaceNavigationEntry } from "../../WorkspaceLink-Bh9-Jo1r.js";
2
2
  export { ResolveWorkspaceLinkOptions, WorkspaceDestination, WorkspaceExternalDestination, WorkspaceFileLink, WorkspaceFileLinkProps, WorkspaceInvalidDestination, WorkspaceLinkBase, WorkspaceLinkResolution, WorkspaceNavigationAdapter, WorkspaceNavigationEntry, WorkspaceNavigationProvider, WorkspaceNavigationProviderProps, resolveWorkspaceLink };
@@ -1,2 +1,2 @@
1
- import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DZeLe_jN.js";
1
+ import { n as WorkspaceNavigationProvider, r as resolveWorkspaceLink, t as WorkspaceFileLink } from "../../WorkspaceLink-DtH66bAY.js";
2
2
  export { WorkspaceFileLink, WorkspaceNavigationProvider, resolveWorkspaceLink };
@@ -1,12 +1,2 @@
1
- import { MessageResponseProps } from "../ai-sdk/Message.js";
2
- import * as React from "react";
3
-
4
- //#region src/components/agents-sdk/WorkspaceMessageResponse.d.ts
5
- /** Adds workspace-aware Markdown links when rendered inside a workspace provider. */
6
- declare const WorkspaceMessageResponse: React.MemoExoticComponent<({
7
- components,
8
- rehypePlugins,
9
- ...props
10
- }: MessageResponseProps) => React.JSX.Element>;
11
- //#endregion
12
- export { WorkspaceMessageResponse };
1
+ import { i as WorkspaceMessageResponseProps, n as WorkspaceHtmlArtifactRenderer, r as WorkspaceMessageResponse, t as WorkspaceHtmlArtifactRenderInput } from "../../WorkspaceMessageResponse-Cy28WGSz.js";
2
+ export { WorkspaceHtmlArtifactRenderInput, WorkspaceHtmlArtifactRenderer, WorkspaceMessageResponse, WorkspaceMessageResponseProps };
@@ -1,2 +1,2 @@
1
- import { t as WorkspaceMessageResponse } from "../../WorkspaceMessageResponse-BWbkIELl.js";
1
+ import { t as WorkspaceMessageResponse } from "../../WorkspaceMessageResponse-CJCmGvTx.js";
2
2
  export { WorkspaceMessageResponse };
@@ -1,10 +1,10 @@
1
- import { R as PaperclipIcon } from "../../icons-B1Qw05te.js";
1
+ import { R as PaperclipIcon } from "../../icons-B4mGvCvc.js";
2
2
  import { Button } from "../foundations/Button.js";
3
3
  import { Popover } from "../foundations/Popover.js";
4
+ import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
4
5
  import { EmptyState } from "../foundations/EmptyState.js";
5
6
  import { StatusPill } from "../foundations/StatusPill.js";
6
7
  import { AppTopBar } from "../general-purpose/AppTopBar.js";
7
- import { Card, CardAction, CardFooter, CardHeader, CardTitle } from "../foundations/Card.js";
8
8
  import "react";
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/components/agents-sdk/WorkspaceMountManager.tsx
@@ -1,7 +1,7 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { m as ChevronRightIcon } from "../../icons-B1Qw05te.js";
3
2
  import { Collapsible } from "../foundations/Collapsible.js";
4
3
  import { useExpansionState } from "./ExpansionState.js";
4
+ import { m as ChevronRightIcon } from "../../icons-B4mGvCvc.js";
5
5
  import * as React from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/ai-sdk/Activity.tsx
@@ -1,5 +1,5 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { rt as XIcon } from "../../icons-B1Qw05te.js";
2
+ import { rt as XIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Button } from "../foundations/Button.js";
4
4
  import { IconButton } from "../foundations/IconButton.js";
5
5
  import { PromptInputTray } from "./PromptInput.js";
@@ -1,8 +1,8 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { B as PencilIcon } from "../../icons-B1Qw05te.js";
2
+ import { B as PencilIcon } from "../../icons-B4mGvCvc.js";
3
3
  import { Button } from "../foundations/Button.js";
4
- import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
5
4
  import { Kbd } from "../foundations/Kbd.js";
5
+ import { a as formatUnknownValue } from "../../format-DB2mX9DA.js";
6
6
  import * as React from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region src/components/ai-sdk/Approval.tsx
@@ -118,5 +118,48 @@ declare function ArtifactContent({
118
118
  }: ArtifactContentProps & {
119
119
  ref?: React.Ref<HTMLDivElement>;
120
120
  }): React.JSX.Element;
121
+ /** Host error messages render verbatim and must be user-readable rather than raw diagnostics.
122
+ * Sandbox policy is a host concern the preview never mediates: a host that blocks a resource
123
+ * reports it through the error states, so there is no approval state here. */
124
+ type ArtifactPreviewState = {
125
+ status: "loading";
126
+ } | {
127
+ message: string;
128
+ onRetry: () => void;
129
+ status: "error";
130
+ } | {
131
+ content: React.ReactNode;
132
+ status: "ready";
133
+ } | {
134
+ content: React.ReactNode;
135
+ message: string;
136
+ onRetry: () => void;
137
+ status: "runtime-error";
138
+ };
139
+ interface ArtifactPreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
140
+ /** Accessible artifact name, usually derived from the source link label. */
141
+ label: string;
142
+ /** Navigation element for the source artifact. */
143
+ sourceLink: React.ReactElement;
144
+ /** Host-resolved artifact lifecycle facts and callables. */
145
+ state: ArtifactPreviewState;
146
+ }
147
+ /**
148
+ * Controlled inline preview for host-hydrated generated UI runtimes.
149
+ *
150
+ * The design system owns artifact chrome, status copy, disclosure, responsive
151
+ * layout, and accessible announcements. The host owns source reads, sandbox
152
+ * policy, runtime messaging, and the rendered content element.
153
+ */
154
+ declare function ArtifactPreview({
155
+ className,
156
+ label,
157
+ sourceLink,
158
+ state,
159
+ ref,
160
+ ...props
161
+ }: ArtifactPreviewProps & {
162
+ ref?: React.Ref<HTMLDivElement>;
163
+ }): React.JSX.Element;
121
164
  //#endregion
122
- export { Artifact, ArtifactAction, ArtifactActionProps, ArtifactActions, ArtifactActionsProps, ArtifactClose, ArtifactCloseProps, ArtifactContent, ArtifactContentProps, ArtifactDescription, ArtifactDescriptionProps, ArtifactHeader, ArtifactHeaderProps, ArtifactProps, ArtifactTitle, ArtifactTitleProps };
165
+ export { Artifact, ArtifactAction, ArtifactActionProps, ArtifactActions, ArtifactActionsProps, ArtifactClose, ArtifactCloseProps, ArtifactContent, ArtifactContentProps, ArtifactDescription, ArtifactDescriptionProps, ArtifactHeader, ArtifactHeaderProps, ArtifactPreview, ArtifactPreviewProps, ArtifactPreviewState, ArtifactProps, ArtifactTitle, ArtifactTitleProps };
@@ -1,8 +1,10 @@
1
1
  import { t as cx } from "../../class-names-BiMDVpUo.js";
2
- import { rt as XIcon } from "../../icons-B1Qw05te.js";
2
+ import { J as SpinnerIcon, rt as XIcon, tt as WarningIcon } from "../../icons-B4mGvCvc.js";
3
+ import { Button, buttonVariants } from "../foundations/Button.js";
3
4
  import { IconButton } from "../foundations/IconButton.js";
5
+ import { t as NavigationLink } from "../../navigation-link-kqMa81v5.js";
4
6
  import "react";
5
- import { jsx } from "react/jsx-runtime";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
6
8
  //#region src/components/ai-sdk/Artifact.tsx
7
9
  /**
8
10
  * A container for generated content (code, documents, outputs) with a header
@@ -107,5 +109,79 @@ function ArtifactContent({ className, children, ref, ...props }) {
107
109
  children
108
110
  });
109
111
  }
112
+ /**
113
+ * Controlled inline preview for host-hydrated generated UI runtimes.
114
+ *
115
+ * The design system owns artifact chrome, status copy, disclosure, responsive
116
+ * layout, and accessible announcements. The host owns source reads, sandbox
117
+ * policy, runtime messaging, and the rendered content element.
118
+ */
119
+ function ArtifactPreview({ className, label, sourceLink, state, ref, ...props }) {
120
+ const liveMessage = state.status === "loading" ? "Loading interactive UI." : state.status === "error" ? `Interactive UI failed to load: ${state.message}` : state.status === "runtime-error" ? `Interactive UI error: ${state.message}` : "Interactive UI loaded.";
121
+ return /* @__PURE__ */ jsxs(Artifact, {
122
+ ref,
123
+ ...props,
124
+ "aria-busy": state.status === "loading" || void 0,
125
+ "aria-label": props["aria-label"] ?? label,
126
+ className: cx("artifact-preview", className),
127
+ "data-state": state.status,
128
+ role: props.role ?? "region",
129
+ children: [
130
+ /* @__PURE__ */ jsx("span", {
131
+ className: "sigvelo-visually-hidden",
132
+ role: "status",
133
+ "aria-atomic": "true",
134
+ children: liveMessage
135
+ }),
136
+ /* @__PURE__ */ jsx(ArtifactHeader, {
137
+ className: "artifact-preview__header",
138
+ children: /* @__PURE__ */ jsx(NavigationLink, {
139
+ render: sourceLink,
140
+ className: buttonVariants({
141
+ variant: "ghost",
142
+ color: "neutral",
143
+ size: "xs"
144
+ }),
145
+ children: "View source"
146
+ })
147
+ }),
148
+ state.status === "loading" ? /* @__PURE__ */ jsxs(ArtifactContent, {
149
+ className: "artifact-preview__status",
150
+ children: [/* @__PURE__ */ jsx(SpinnerIcon, {}), "Loading interactive UI…"]
151
+ }) : state.status === "error" ? /* @__PURE__ */ jsx(ArtifactPreviewError, {
152
+ message: state.message,
153
+ onRetry: state.onRetry
154
+ }) : /* @__PURE__ */ jsxs(ArtifactContent, {
155
+ className: "artifact-preview__frame-shell",
156
+ children: [/* @__PURE__ */ jsx("div", {
157
+ className: "artifact-preview__runtime",
158
+ inert: state.status === "runtime-error" || void 0,
159
+ children: state.content
160
+ }), state.status === "runtime-error" ? /* @__PURE__ */ jsx(ArtifactPreviewError, {
161
+ message: state.message,
162
+ onRetry: state.onRetry,
163
+ overlay: true
164
+ }) : null]
165
+ })
166
+ ]
167
+ });
168
+ }
169
+ function ArtifactPreviewError({ message, onRetry, overlay = false }) {
170
+ return /* @__PURE__ */ jsxs(ArtifactContent, {
171
+ className: cx("artifact-preview__status", overlay && "artifact-preview__status--overlay"),
172
+ children: [
173
+ /* @__PURE__ */ jsx(WarningIcon, {}),
174
+ /* @__PURE__ */ jsx("span", { children: message }),
175
+ /* @__PURE__ */ jsx(Button, {
176
+ type: "button",
177
+ variant: "outline",
178
+ color: "neutral",
179
+ size: "sm",
180
+ onClick: onRetry,
181
+ children: "Retry"
182
+ })
183
+ ]
184
+ });
185
+ }
110
186
  //#endregion
111
- export { Artifact, ArtifactAction, ArtifactActions, ArtifactClose, ArtifactContent, ArtifactDescription, ArtifactHeader, ArtifactTitle };
187
+ export { Artifact, ArtifactAction, ArtifactActions, ArtifactClose, ArtifactContent, ArtifactDescription, ArtifactHeader, ArtifactPreview, ArtifactTitle };