@mcp-b/react-components 0.2.2 → 0.4.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 (61) hide show
  1. package/dist/{CodeBlock-BrCoypnc.js → CodeBlock-C2Xjxu9M.js} +1 -1
  2. package/dist/FileTree-D0c9Yj9U.js +310 -0
  3. package/dist/attachment-preview-ChtC3HiU.js +25 -0
  4. package/dist/components/Activity.js +1 -1
  5. package/dist/components/AgentChat.d.ts +56 -9
  6. package/dist/components/AgentChat.js +146 -47
  7. package/dist/components/AgentConnection.js +3 -3
  8. package/dist/components/Artifact.js +1 -1
  9. package/dist/components/BrowserLiveView.d.ts +47 -0
  10. package/dist/components/BrowserLiveView.js +135 -0
  11. package/dist/components/BrowserReplay.d.ts +40 -0
  12. package/dist/components/BrowserReplay.js +187 -0
  13. package/dist/components/ChainOfThought.d.ts +1 -1
  14. package/dist/components/ChainOfThought.js +1 -1
  15. package/dist/components/CodeBlock.js +1 -1
  16. package/dist/components/Commit.js +1 -1
  17. package/dist/components/Context.d.ts +28 -27
  18. package/dist/components/Context.js +48 -47
  19. package/dist/components/ContextMenu.js +1 -1
  20. package/dist/components/Conversation.js +1 -1
  21. package/dist/components/Dialog.js +1 -1
  22. package/dist/components/EnvironmentVariables.js +1 -1
  23. package/dist/components/FileTree.js +1 -309
  24. package/dist/components/Menubar.js +1 -1
  25. package/dist/components/Message.d.ts +17 -2
  26. package/dist/components/Message.js +36 -2
  27. package/dist/components/ModelSelector.js +1 -1
  28. package/dist/components/NavigationMenu.js +1 -1
  29. package/dist/components/PricingPage.js +2 -2
  30. package/dist/components/PromptInput.d.ts +143 -10
  31. package/dist/components/PromptInput.js +318 -5
  32. package/dist/components/Queue.js +1 -1
  33. package/dist/components/Reasoning.js +1 -1
  34. package/dist/components/Select.js +1 -1
  35. package/dist/components/Sources.js +1 -1
  36. package/dist/components/Stepper.js +1 -1
  37. package/dist/components/Suggestion.d.ts +43 -0
  38. package/dist/components/Suggestion.js +39 -0
  39. package/dist/components/Task.js +1 -1
  40. package/dist/components/Terminal.js +2 -2
  41. package/dist/components/TestResults.js +1 -1
  42. package/dist/components/ThinkChat.d.ts +207 -0
  43. package/dist/components/ThinkChat.js +798 -0
  44. package/dist/components/Tool.d.ts +32 -28
  45. package/dist/components/Tool.js +29 -16
  46. package/dist/components/WebPreview.js +1 -1
  47. package/dist/components/WorkspaceExplorer.d.ts +102 -0
  48. package/dist/components/WorkspaceExplorer.js +352 -0
  49. package/dist/components/icons.d.ts +2 -2
  50. package/dist/components/icons.js +2 -2
  51. package/dist/{copy-button-DAPlB8Z0.js → copy-button-Dd6DEhOm.js} +1 -1
  52. package/dist/{icons-Bf7JMKk-.js → icons-DQC4Zw5R.js} +5 -1
  53. package/dist/{icons-BklFyZbx.d.ts → icons-ctdVxng0.d.ts} +2 -1
  54. package/dist/styles/agent-chat.css +19 -0
  55. package/dist/styles/attachment-preview.css +21 -0
  56. package/dist/styles/context.css +9 -17
  57. package/dist/styles/index.css +2 -0
  58. package/dist/styles/message.css +48 -0
  59. package/dist/styles/prompt-input.css +321 -0
  60. package/dist/styles/suggestions.css +21 -0
  61. package/package.json +26 -3
@@ -1,2 +1,2 @@
1
- import { A as SpinnerIcon, C as MinusIcon, D as PlusIcon, E as PlayIcon, F as XIcon, M as TerminalIcon, N as WarningIcon, O as RefreshIcon, P as WrenchIcon, S as MaximizeIcon, T as PauseIcon, _ as FolderOpenIcon, a as BrainIcon, b as InfoIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as SquareIcon, k as SearchIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as IconProps, w as MonitorIcon, x as LinkIcon, y as ImageIcon } from "../icons-BklFyZbx.js";
2
- export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
1
+ import { A as SearchIcon, C as MinusIcon, D as PlayIcon, E as PencilIcon, F as WrenchIcon, I as XIcon, M as SquareIcon, N as TerminalIcon, O as PlusIcon, P as WarningIcon, S as MaximizeIcon, T as PauseIcon, _ as FolderOpenIcon, a as BrainIcon, b as InfoIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as SpinnerIcon, k as RefreshIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as IconProps, w as MonitorIcon, x as LinkIcon, y as ImageIcon } from "../icons-ctdVxng0.js";
2
+ export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, IconProps, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
@@ -1,2 +1,2 @@
1
- import { A as SquareIcon, C as MonitorIcon, D as RefreshIcon, E as PlusIcon, M as WarningIcon, N as WrenchIcon, O as SearchIcon, P as XIcon, S as MinusIcon, T as PlayIcon, _ as FolderOpenIcon, a as BrainIcon, b as LinkIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as TerminalIcon, k as SpinnerIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as ImageIcon, w as PauseIcon, x as MaximizeIcon, y as InfoIcon } from "../icons-Bf7JMKk-.js";
2
- export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
1
+ import { A as SpinnerIcon, C as MonitorIcon, D as PlusIcon, E as PlayIcon, F as XIcon, M as TerminalIcon, N as WarningIcon, O as RefreshIcon, P as WrenchIcon, S as MinusIcon, T as PencilIcon, _ as FolderOpenIcon, a as BrainIcon, b as LinkIcon, c as ChevronLeftIcon, d as DotIcon, f as DownloadIcon, g as FolderIcon, h as FileIcon, i as ArrowUpIcon, j as SquareIcon, k as SearchIcon, l as ChevronRightIcon, m as EyeOffIcon, n as ArrowLeftIcon, o as CheckIcon, p as EyeIcon, r as ArrowRightIcon, s as ChevronDownIcon, t as ArrowDownIcon, u as CopyIcon, v as ImageIcon, w as PauseIcon, x as MaximizeIcon, y as InfoIcon } from "../icons-DQC4Zw5R.js";
2
+ export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BrainIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, DotIcon, DownloadIcon, EyeIcon, EyeOffIcon, FileIcon, FolderIcon, FolderOpenIcon, ImageIcon, InfoIcon, LinkIcon, MaximizeIcon, MinusIcon, MonitorIcon, PauseIcon, PencilIcon, PlayIcon, PlusIcon, RefreshIcon, SearchIcon, SpinnerIcon, SquareIcon, TerminalIcon, WarningIcon, WrenchIcon, XIcon };
@@ -1,4 +1,4 @@
1
- import { o as CheckIcon, u as CopyIcon } from "./icons-Bf7JMKk-.js";
1
+ import { o as CheckIcon, u as CopyIcon } from "./icons-DQC4Zw5R.js";
2
2
  import { Button } from "./components/Button.js";
3
3
  import { Tooltip, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipTrigger } from "./components/Tooltip.js";
4
4
  import * as React from "react";
@@ -51,6 +51,10 @@ const XIcon = (props) => /* @__PURE__ */ jsx(Icon, {
51
51
  ...props,
52
52
  children: /* @__PURE__ */ jsx("path", { d: "M4 4L12 12M12 4L4 12" })
53
53
  });
54
+ const PencilIcon = (props) => /* @__PURE__ */ jsx(Icon, {
55
+ ...props,
56
+ children: /* @__PURE__ */ jsx("path", { d: "M11.1 2.6a1.4 1.4 0 0 1 2 2L5.5 12.2l-2.8.8.8-2.8z" })
57
+ });
54
58
  const CopyIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
55
59
  ...props,
56
60
  children: [/* @__PURE__ */ jsx("rect", {
@@ -258,4 +262,4 @@ const MaximizeIcon = (props) => /* @__PURE__ */ jsxs(Icon, {
258
262
  ]
259
263
  });
260
264
  //#endregion
261
- export { SquareIcon as A, MonitorIcon as C, RefreshIcon as D, PlusIcon as E, WarningIcon as M, WrenchIcon as N, SearchIcon as O, XIcon as P, MinusIcon as S, PlayIcon as T, FolderOpenIcon as _, BrainIcon as a, LinkIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, TerminalIcon as j, SpinnerIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, ImageIcon as v, PauseIcon as w, MaximizeIcon as x, InfoIcon as y };
265
+ export { SpinnerIcon as A, MonitorIcon as C, PlusIcon as D, PlayIcon as E, XIcon as F, TerminalIcon as M, WarningIcon as N, RefreshIcon as O, WrenchIcon as P, MinusIcon as S, PencilIcon as T, FolderOpenIcon as _, BrainIcon as a, LinkIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SquareIcon as j, SearchIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, ImageIcon as v, PauseIcon as w, MaximizeIcon as x, InfoIcon as y };
@@ -16,6 +16,7 @@ declare const ChevronLeftIcon: (props: IconProps) => React.JSX.Element;
16
16
  declare const BrainIcon: (props: IconProps) => React.JSX.Element;
17
17
  declare const CheckIcon: (props: IconProps) => React.JSX.Element;
18
18
  declare const XIcon: (props: IconProps) => React.JSX.Element;
19
+ declare const PencilIcon: (props: IconProps) => React.JSX.Element;
19
20
  declare const CopyIcon: (props: IconProps) => React.JSX.Element;
20
21
  declare const EyeIcon: (props: IconProps) => React.JSX.Element;
21
22
  declare const EyeOffIcon: (props: IconProps) => React.JSX.Element;
@@ -45,4 +46,4 @@ declare const ImageIcon: (props: IconProps) => React.JSX.Element;
45
46
  declare const MonitorIcon: (props: IconProps) => React.JSX.Element;
46
47
  declare const MaximizeIcon: (props: IconProps) => React.JSX.Element;
47
48
  //#endregion
48
- export { SpinnerIcon as A, MinusIcon as C, PlusIcon as D, PlayIcon as E, XIcon as F, TerminalIcon as M, WarningIcon as N, RefreshIcon as O, WrenchIcon as P, MaximizeIcon as S, PauseIcon as T, FolderOpenIcon as _, BrainIcon as a, InfoIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SquareIcon as j, SearchIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, IconProps as v, MonitorIcon as w, LinkIcon as x, ImageIcon as y };
49
+ export { SearchIcon as A, MinusIcon as C, PlayIcon as D, PencilIcon as E, WrenchIcon as F, XIcon as I, SquareIcon as M, TerminalIcon as N, PlusIcon as O, WarningIcon as P, MaximizeIcon as S, PauseIcon as T, FolderOpenIcon as _, BrainIcon as a, InfoIcon as b, ChevronLeftIcon as c, DotIcon as d, DownloadIcon as f, FolderIcon as g, FileIcon as h, ArrowUpIcon as i, SpinnerIcon as j, RefreshIcon as k, ChevronRightIcon as l, EyeOffIcon as m, ArrowLeftIcon as n, CheckIcon as o, EyeIcon as p, ArrowRightIcon as r, ChevronDownIcon as s, ArrowDownIcon as t, CopyIcon as u, IconProps as v, MonitorIcon as w, LinkIcon as x, ImageIcon as y };
@@ -19,3 +19,22 @@
19
19
  padding: 0.75rem;
20
20
  background-color: var(--sigvelo-color-surface);
21
21
  }
22
+
23
+ /* Transient status pill between transcript and composer (recovery, errors). */
24
+ .agent-chat__notice {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 0.375rem;
28
+ margin-block-end: 0.5rem;
29
+ font-size: 0.75rem;
30
+ color: var(--sigvelo-color-text-muted);
31
+ }
32
+
33
+ .agent-chat__notice[data-tone="danger"],
34
+ .agent-chat__notice [data-tone="danger"] {
35
+ color: var(--sigvelo-color-danger-text);
36
+ }
37
+
38
+ .agent-chat__suggestions {
39
+ margin-block-end: 0.5rem;
40
+ }
@@ -0,0 +1,21 @@
1
+ /* Click-to-zoom lightbox for image attachments (composer chips + messages).
2
+ Scoped as .dialog__popup.attachment-preview so it beats the base dialog
3
+ sizing regardless of import order. */
4
+ .dialog__popup.attachment-preview {
5
+ width: fit-content;
6
+ max-width: min(90vw, 56rem);
7
+ }
8
+
9
+ .attachment-preview__image {
10
+ display: block;
11
+ max-width: 100%;
12
+ max-height: 70vh;
13
+ border-radius: var(--sigvelo-radius-md);
14
+ }
15
+
16
+ .attachment-preview__name {
17
+ margin-block-start: 0.5rem;
18
+ font-size: 0.75rem;
19
+ color: var(--sigvelo-color-text-muted);
20
+ text-align: center;
21
+ }
@@ -3,20 +3,19 @@
3
3
  font-family: var(--sigvelo-font-sans);
4
4
  }
5
5
 
6
+ /* Bare ring icon — undo the popover__trigger pill chrome. */
6
7
  .context__trigger {
7
8
  display: inline-flex;
8
9
  align-items: center;
9
- gap: 0.375rem;
10
- font-variant-numeric: tabular-nums;
11
- }
12
-
13
- .context__trigger-ring {
14
- display: inline-flex;
10
+ justify-content: center;
11
+ padding: 0.25rem;
12
+ background: none;
13
+ border: none;
14
+ border-radius: var(--sigvelo-radius-sm);
15
15
  }
16
16
 
17
- .context__trigger-label {
18
- font-size: 0.75rem;
19
- color: var(--sigvelo-color-text-muted);
17
+ .context__trigger:hover {
18
+ background-color: color-mix(in oklab, transparent, var(--sigvelo-color-text) 5%);
20
19
  }
21
20
 
22
21
  .context__content {
@@ -98,7 +97,7 @@
98
97
 
99
98
  .context__row {
100
99
  display: grid;
101
- grid-template-columns: 1fr auto auto;
100
+ grid-template-columns: 1fr auto;
102
101
  gap: 0.75rem;
103
102
  font-size: 0.75rem;
104
103
  align-items: baseline;
@@ -113,13 +112,6 @@
113
112
  font-variant-numeric: tabular-nums;
114
113
  }
115
114
 
116
- .context__row-cost {
117
- color: var(--sigvelo-color-text-muted);
118
- font-family: var(--sigvelo-font-mono);
119
- font-size: 0.6875rem;
120
- font-variant-numeric: tabular-nums;
121
- }
122
-
123
115
  .context__footer {
124
116
  display: flex;
125
117
  flex-direction: column;
@@ -12,6 +12,7 @@
12
12
  @import "./agent-connection.css" layer(components);
13
13
  @import "./agent-chat.css" layer(components);
14
14
  @import "./alert-dialog.css" layer(components);
15
+ @import "./attachment-preview.css" layer(components);
15
16
  @import "./autocomplete.css" layer(components);
16
17
  @import "./avatar.css" layer(components);
17
18
  @import "./badge.css" layer(components);
@@ -45,6 +46,7 @@
45
46
  @import "./separator.css" layer(components);
46
47
  @import "./slider.css" layer(components);
47
48
  @import "./stepper.css" layer(components);
49
+ @import "./suggestions.css" layer(components);
48
50
  @import "./switch.css" layer(components);
49
51
  @import "./tabs.css" layer(components);
50
52
  @import "./toast.css" layer(components);
@@ -57,6 +57,54 @@
57
57
  overflow: auto;
58
58
  }
59
59
 
60
+ .message__attachment {
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 0.375rem;
64
+ max-width: 100%;
65
+ font-size: 0.8125rem;
66
+ color: inherit;
67
+ text-decoration: none;
68
+ }
69
+
70
+ .message__attachment:hover .message__attachment-name {
71
+ text-decoration: underline;
72
+ }
73
+
74
+ .message__attachment-icon {
75
+ flex-shrink: 0;
76
+ }
77
+
78
+ .message__attachment-name {
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ .message__attachment-zoom {
85
+ display: block;
86
+ max-width: 100%;
87
+ padding: 0;
88
+ border: none;
89
+ background: none;
90
+ cursor: zoom-in;
91
+ }
92
+
93
+ .message__attachment-image {
94
+ display: block;
95
+ max-width: 16rem;
96
+ max-height: 16rem;
97
+ border-radius: var(--sigvelo-radius-md);
98
+ }
99
+
100
+ /* Quiet annotation under a part whose stored content was compacted. */
101
+ .message__compacted {
102
+ margin-block-start: 0.25rem;
103
+ font-size: var(--sigvelo-text-xs);
104
+ font-style: italic;
105
+ color: var(--sigvelo-color-text-muted);
106
+ }
107
+
60
108
  .message__actions {
61
109
  display: inline-flex;
62
110
  align-items: center;
@@ -43,6 +43,83 @@
43
43
  min-height: 1.5rem;
44
44
  }
45
45
 
46
+ .prompt-input__attachments {
47
+ display: flex;
48
+ flex-wrap: wrap;
49
+ align-items: center;
50
+ gap: 0.375rem;
51
+ }
52
+
53
+ /* Hairline chip, borderless-direction: no fill, just the outline. */
54
+ .prompt-input__attachment {
55
+ position: relative;
56
+ display: inline-flex;
57
+ align-items: center;
58
+ gap: 0.375rem;
59
+ max-width: 14rem;
60
+ padding: 0.25rem 0.5rem;
61
+ border: var(--sigvelo-border-style) var(--sigvelo-border-width)
62
+ var(--sigvelo-color-neutral-border-subtle);
63
+ border-radius: var(--sigvelo-radius-md);
64
+ font-size: 0.75rem;
65
+ color: var(--sigvelo-color-text);
66
+ }
67
+
68
+ .prompt-input__attachment[data-image] {
69
+ padding: 0;
70
+ overflow: hidden;
71
+ }
72
+
73
+ .prompt-input__attachment-zoom {
74
+ display: block;
75
+ padding: 0;
76
+ border: none;
77
+ background: none;
78
+ cursor: zoom-in;
79
+ }
80
+
81
+ .prompt-input__attachment-thumb {
82
+ display: block;
83
+ width: 3rem;
84
+ height: 3rem;
85
+ object-fit: cover;
86
+ }
87
+
88
+ .prompt-input__attachment-icon {
89
+ flex-shrink: 0;
90
+ color: var(--sigvelo-color-text-muted);
91
+ }
92
+
93
+ .prompt-input__attachment-name {
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ white-space: nowrap;
97
+ }
98
+
99
+ .prompt-input__attachment-remove {
100
+ display: inline-flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ padding: 0.125rem;
104
+ border: none;
105
+ border-radius: var(--sigvelo-radius-sm);
106
+ background: none;
107
+ color: var(--sigvelo-color-text-muted);
108
+ cursor: pointer;
109
+ }
110
+
111
+ .prompt-input__attachment[data-image] .prompt-input__attachment-remove {
112
+ position: absolute;
113
+ inset-block-start: 0.125rem;
114
+ inset-inline-end: 0.125rem;
115
+ background-color: color-mix(in oklab, var(--sigvelo-color-surface), transparent 20%);
116
+ }
117
+
118
+ .prompt-input__attachment-remove:hover {
119
+ color: var(--sigvelo-color-text);
120
+ background-color: color-mix(in oklab, transparent, var(--sigvelo-color-text) 8%);
121
+ }
122
+
46
123
  .prompt-input__body {
47
124
  display: flex;
48
125
  align-items: stretch;
@@ -84,6 +161,12 @@
84
161
  padding-block-start: 0.25rem;
85
162
  }
86
163
 
164
+ .prompt-input__footer-end {
165
+ display: inline-flex;
166
+ align-items: center;
167
+ gap: 0.25rem;
168
+ }
169
+
87
170
  .prompt-input__tools {
88
171
  display: inline-flex;
89
172
  align-items: center;
@@ -136,6 +219,95 @@
136
219
  margin-inline-end: 0.5rem;
137
220
  }
138
221
 
222
+ /* Undo .menu__trigger's boxed chrome — this trigger is a ghost footer button
223
+ like its neighbors: transparent at rest, background only on hover/open. */
224
+ .prompt-input__permissions-trigger {
225
+ gap: 0.25rem;
226
+ padding-block: 0.25rem;
227
+ padding-inline: 0.5rem;
228
+ font-size: 0.75rem;
229
+ font-weight: inherit;
230
+ background: none;
231
+ border: none;
232
+ }
233
+
234
+ .prompt-input__permissions-trigger:hover,
235
+ .prompt-input__permissions-trigger[data-popup-open] {
236
+ background-color: color-mix(in oklab, transparent, var(--sigvelo-color-text) 5%);
237
+ }
238
+
239
+ /* Bypass is the loud one — Codex-style warning tint so it can't be missed. */
240
+ .prompt-input__permissions-trigger[data-mode="bypass"],
241
+ .prompt-input__permissions-trigger[data-mode="bypass"]:hover:not([data-disabled]) {
242
+ color: var(--sigvelo-color-warning-text);
243
+ }
244
+
245
+ /* Both modes stacked in one cell; the trigger is always as wide as the
246
+ widest, so toggling can't shift the footer. */
247
+ .prompt-input__permissions-current {
248
+ display: inline-grid;
249
+ }
250
+
251
+ .prompt-input__permissions-current-option {
252
+ grid-area: 1 / 1;
253
+ display: inline-flex;
254
+ align-items: center;
255
+ gap: 0.25rem;
256
+ justify-self: start;
257
+ white-space: nowrap;
258
+ }
259
+
260
+ .prompt-input__permissions-current-option:not([data-active]) {
261
+ visibility: hidden;
262
+ }
263
+
264
+ .prompt-input__permissions-menu {
265
+ min-width: 17rem;
266
+ }
267
+
268
+ .prompt-input__permissions-question {
269
+ padding-block: 0.375rem;
270
+ padding-inline: 0.75rem;
271
+ font-size: 0.75rem;
272
+ color: var(--sigvelo-color-text-muted);
273
+ }
274
+
275
+ .prompt-input__permissions-option {
276
+ align-items: flex-start;
277
+ }
278
+
279
+ .prompt-input__permissions-option-text {
280
+ display: flex;
281
+ flex-direction: column;
282
+ gap: 0.125rem;
283
+ min-width: 0;
284
+ }
285
+
286
+ .prompt-input__permissions-option-label {
287
+ font-size: 0.8125rem;
288
+ }
289
+
290
+ .prompt-input__permissions-option-description {
291
+ font-size: 0.75rem;
292
+ color: var(--sigvelo-color-text-muted);
293
+ }
294
+
295
+ /* Check on the right, drawn like the checkbox indicator instead of the dot. */
296
+ .prompt-input__permissions-check {
297
+ margin-inline-start: auto;
298
+ align-self: center;
299
+ }
300
+
301
+ .prompt-input__permissions-check::before {
302
+ width: 0.625rem;
303
+ height: 0.375rem;
304
+ background-color: transparent;
305
+ border-radius: 0;
306
+ border-inline-start: 2px solid currentColor;
307
+ border-block-end: 2px solid currentColor;
308
+ transform: rotate(-45deg) translateY(-1px);
309
+ }
310
+
139
311
  .prompt-input__hover-card {
140
312
  position: relative;
141
313
  display: inline-block;
@@ -177,6 +349,155 @@
177
349
  flex-direction: column;
178
350
  }
179
351
 
352
+ /* Approval state: the composer becomes the confirmation */
353
+ .prompt-input__approval {
354
+ display: flex;
355
+ flex-direction: column;
356
+ gap: 0.5rem;
357
+ font-size: 0.875rem;
358
+ }
359
+
360
+ .prompt-input__approval-question {
361
+ display: flex;
362
+ align-items: baseline;
363
+ gap: 0.5rem;
364
+ line-height: 1.4;
365
+ }
366
+
367
+ .prompt-input__approval-question code {
368
+ font-family: var(--sigvelo-font-mono);
369
+ font-size: 0.8125em;
370
+ }
371
+
372
+ .prompt-input__approval-count {
373
+ margin-inline-start: auto;
374
+ flex-shrink: 0;
375
+ color: var(--sigvelo-color-text-muted);
376
+ font-size: 0.75rem;
377
+ }
378
+
379
+ .prompt-input__approval-preview {
380
+ max-height: 6rem;
381
+ padding-block: 0.375rem;
382
+ padding-inline: 0.625rem;
383
+ overflow: auto;
384
+ border: var(--sigvelo-border-style) var(--sigvelo-border-width)
385
+ var(--sigvelo-color-neutral-border-subtle);
386
+ border-radius: var(--sigvelo-radius-md);
387
+ color: var(--sigvelo-color-text-muted);
388
+ font-family: var(--sigvelo-font-mono);
389
+ font-size: 0.75rem;
390
+ line-height: 1.5;
391
+ }
392
+
393
+ .prompt-input__approval-preview-key {
394
+ color: var(--sigvelo-color-text);
395
+ }
396
+
397
+ .prompt-input__approval-preview-key::after {
398
+ content: ":";
399
+ }
400
+
401
+ .prompt-input__approval-options {
402
+ display: flex;
403
+ flex-direction: column;
404
+ gap: 0.125rem;
405
+ }
406
+
407
+ .prompt-input__approval-option {
408
+ display: flex;
409
+ align-items: center;
410
+ gap: 0.5rem;
411
+ width: 100%;
412
+ padding-block: 0.3125rem;
413
+ padding-inline: 0.5rem;
414
+ border: none;
415
+ border-radius: var(--sigvelo-radius-md);
416
+ background: transparent;
417
+ color: var(--sigvelo-color-text);
418
+ font: inherit;
419
+ text-align: start;
420
+ cursor: pointer;
421
+ }
422
+
423
+ .prompt-input__approval-option[data-selected] {
424
+ background-color: color-mix(in oklab, var(--sigvelo-color-text), transparent 92%);
425
+ }
426
+
427
+ .prompt-input__approval-option:disabled {
428
+ cursor: not-allowed;
429
+ opacity: 0.6;
430
+ }
431
+
432
+ .prompt-input__approval-key {
433
+ display: inline-flex;
434
+ align-items: center;
435
+ justify-content: center;
436
+ flex-shrink: 0;
437
+ inline-size: 1.125rem;
438
+ block-size: 1.125rem;
439
+ border: var(--sigvelo-border-style) var(--sigvelo-border-width)
440
+ var(--sigvelo-color-neutral-border-subtle);
441
+ border-radius: var(--sigvelo-radius-full);
442
+ color: var(--sigvelo-color-text-muted);
443
+ font-size: 0.6875rem;
444
+ }
445
+
446
+ .prompt-input__approval-option[data-selected] .prompt-input__approval-key {
447
+ border-color: var(--sigvelo-color-text);
448
+ background-color: var(--sigvelo-color-text);
449
+ color: var(--sigvelo-color-surface);
450
+ }
451
+
452
+ .prompt-input__approval-arrows {
453
+ margin-inline-start: auto;
454
+ color: var(--sigvelo-color-text-muted);
455
+ font-size: 0.75rem;
456
+ visibility: hidden;
457
+ }
458
+
459
+ .prompt-input__approval-option[data-selected] .prompt-input__approval-arrows {
460
+ visibility: visible;
461
+ }
462
+
463
+ .prompt-input__approval-deny {
464
+ cursor: text;
465
+ }
466
+
467
+ .prompt-input__approval-reason {
468
+ flex: 1;
469
+ min-width: 0;
470
+ padding: 0;
471
+ border: none;
472
+ background: transparent;
473
+ color: var(--sigvelo-color-text);
474
+ font: inherit;
475
+ }
476
+
477
+ .prompt-input__approval-reason::placeholder {
478
+ color: var(--sigvelo-color-text-muted);
479
+ }
480
+
481
+ .prompt-input__approval-reason:focus {
482
+ outline: none;
483
+ }
484
+
485
+ .prompt-input__approval-skip {
486
+ flex-shrink: 0;
487
+ color: var(--sigvelo-color-text-muted);
488
+ }
489
+
490
+ .prompt-input__approval-submit {
491
+ flex-shrink: 0;
492
+ gap: 0.375rem;
493
+ }
494
+
495
+ .prompt-input__approval-kbd {
496
+ font-family: inherit;
497
+ font-size: 0.75em;
498
+ opacity: 0.75;
499
+ }
500
+
180
501
  @keyframes prompt-input-spin {
181
502
  from {
182
503
  transform: rotate(0deg);
@@ -0,0 +1,21 @@
1
+ .suggestions {
2
+ width: 100%;
3
+ overflow-x: auto;
4
+ scrollbar-width: none;
5
+ }
6
+
7
+ .suggestions::-webkit-scrollbar {
8
+ display: none;
9
+ }
10
+
11
+ .suggestions__row {
12
+ display: flex;
13
+ width: max-content;
14
+ align-items: center;
15
+ gap: 0.5rem;
16
+ }
17
+
18
+ .suggestions__chip {
19
+ border-radius: var(--sigvelo-radius-full);
20
+ white-space: nowrap;
21
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.2.2",
4
- "description": "MCP-B React components built on Base UI and shared design tokens.",
3
+ "version": "0.4.0",
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": {
7
7
  "url": "https://github.com/WebMCP-org/design-system/issues"
@@ -40,6 +40,8 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@base-ui/react": "~1.6.0",
43
+ "@cloudflare/codemode": "^0.4.2",
44
+ "@rrweb/replay": "^2.1.0",
43
45
  "@streamdown/cjk": "^1.0.3",
44
46
  "@streamdown/code": "^1.1.1",
45
47
  "@streamdown/math": "^1.0.2",
@@ -47,9 +49,13 @@
47
49
  "anser": "^2.3.5",
48
50
  "shiki": "^3.23.0",
49
51
  "streamdown": "^2.5.0",
50
- "@mcp-b/design-tokens": "0.2.2"
52
+ "@mcp-b/design-tokens": "0.4.0"
51
53
  },
52
54
  "devDependencies": {
55
+ "@ai-sdk/react": "^3.0.194",
56
+ "@cloudflare/shell": "^0.4.1",
57
+ "@cloudflare/think": "^0.12.1",
58
+ "@cloudflare/workers-types": "^4.20260630.1",
53
59
  "@storybook/addon-a11y": "^10.4.6",
54
60
  "@storybook/addon-docs": "^10.4.6",
55
61
  "@storybook/addon-mcp": "^0.6.0",
@@ -62,6 +68,7 @@
62
68
  "@vitest/browser-playwright": "^4.1.9",
63
69
  "@vitest/coverage-v8": "^4.1.9",
64
70
  "@vitest/mocker": "^4.1.9",
71
+ "agents": "^0.17.3",
65
72
  "ai": "^6.0.182",
66
73
  "playwright": "^1.61.0",
67
74
  "react": "^19.2.7",
@@ -73,11 +80,27 @@
73
80
  "vitest": "^4.1.9"
74
81
  },
75
82
  "peerDependencies": {
83
+ "@ai-sdk/react": "^3.0.194",
84
+ "@cloudflare/shell": "^0.4.1",
85
+ "@cloudflare/think": "^0.12.1",
86
+ "agents": "^0.17.3",
76
87
  "ai": "^6.0.182",
77
88
  "react": "^19.0.0",
78
89
  "react-dom": "^19.0.0"
79
90
  },
80
91
  "peerDependenciesMeta": {
92
+ "@ai-sdk/react": {
93
+ "optional": true
94
+ },
95
+ "@cloudflare/shell": {
96
+ "optional": true
97
+ },
98
+ "@cloudflare/think": {
99
+ "optional": true
100
+ },
101
+ "agents": {
102
+ "optional": true
103
+ },
81
104
  "ai": {
82
105
  "optional": true
83
106
  }