@mcp-b/react-components 0.3.0 → 0.5.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 (59) hide show
  1. package/dist/{CodeBlock-C2Xjxu9M.js → CodeBlock-D-a84xBL.js} +1 -1
  2. package/dist/{FileTree-D0c9Yj9U.js → FileTree-D8rtTLgK.js} +1 -1
  3. package/dist/attachment-preview-ChtC3HiU.js +25 -0
  4. package/dist/components/Activity.js +1 -1
  5. package/dist/components/AgentChat.d.ts +31 -1
  6. package/dist/components/AgentChat.js +166 -38
  7. package/dist/components/AgentConnection.js +3 -3
  8. package/dist/components/Artifact.js +1 -1
  9. package/dist/components/BrowserLiveView.js +2 -2
  10. package/dist/components/BrowserReplay.js +1 -1
  11. package/dist/components/ChainOfThought.d.ts +1 -1
  12. package/dist/components/ChainOfThought.js +1 -1
  13. package/dist/components/CodeBlock.js +1 -1
  14. package/dist/components/Commit.js +2 -2
  15. package/dist/components/Context.d.ts +28 -27
  16. package/dist/components/Context.js +48 -47
  17. package/dist/components/ContextMenu.js +1 -1
  18. package/dist/components/Conversation.js +1 -1
  19. package/dist/components/Dialog.js +1 -1
  20. package/dist/components/EnvironmentVariables.js +1 -1
  21. package/dist/components/FileTree.js +1 -1
  22. package/dist/components/Menubar.js +1 -1
  23. package/dist/components/Message.d.ts +16 -2
  24. package/dist/components/Message.js +39 -5
  25. package/dist/components/ModelSelector.js +1 -1
  26. package/dist/components/NavigationMenu.js +1 -1
  27. package/dist/components/PricingPage.js +2 -2
  28. package/dist/components/PromptInput.d.ts +532 -2
  29. package/dist/components/PromptInput.js +158 -20
  30. package/dist/components/Queue.js +1 -1
  31. package/dist/components/Reasoning.js +9 -17
  32. package/dist/components/Select.js +1 -1
  33. package/dist/components/Sources.js +1 -1
  34. package/dist/components/Stepper.js +1 -1
  35. package/dist/components/Task.js +1 -1
  36. package/dist/components/Terminal.js +2 -2
  37. package/dist/components/TestResults.js +1 -1
  38. package/dist/components/ThinkChat.d.ts +24 -5
  39. package/dist/components/ThinkChat.js +87 -19
  40. package/dist/components/WebPreview.js +1 -1
  41. package/dist/components/WorkspaceExplorer.js +3 -3
  42. package/dist/components/icons.d.ts +2 -2
  43. package/dist/components/icons.js +2 -2
  44. package/dist/{copy-button-Dd6DEhOm.js → copy-button-BmJEAKuP.js} +1 -1
  45. package/dist/{icons-DQC4Zw5R.js → icons-CZRH4FVH.js} +1 -15
  46. package/dist/{icons-ctdVxng0.d.ts → icons-CmO7-pNY.d.ts} +1 -2
  47. package/dist/styles/agent-chat.css +39 -6
  48. package/dist/styles/attachment-preview.css +21 -0
  49. package/dist/styles/context.css +9 -17
  50. package/dist/styles/conversation.css +3 -3
  51. package/dist/styles/index.css +1 -1
  52. package/dist/styles/message.css +50 -2
  53. package/dist/styles/prompt-input.css +189 -6
  54. package/dist/styles/reasoning.css +0 -1
  55. package/package.json +2 -2
  56. package/dist/PromptInput-Dzn-fOPc.d.ts +0 -444
  57. package/dist/components/Tool.d.ts +0 -123
  58. package/dist/components/Tool.js +0 -209
  59. package/dist/styles/tool.css +0 -203
@@ -1,9 +1,9 @@
1
1
  .prompt-input {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- gap: 0.5rem;
5
- padding-block: 0.875rem;
6
- padding-inline: 1rem;
4
+ gap: 0.375rem;
5
+ padding-block: 0.625rem;
6
+ padding-inline: 0.75rem;
7
7
  background-color: var(--sigvelo-color-surface);
8
8
  /* Fields keep their border; hairline + soft shadow for the floating-composer look */
9
9
  border: var(--sigvelo-border-style) var(--sigvelo-border-width)
@@ -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;
@@ -57,7 +134,7 @@
57
134
  background-color: transparent;
58
135
  color: var(--sigvelo-color-text);
59
136
  font-family: inherit;
60
- font-size: 0.9375rem;
137
+ font-size: 0.875rem;
61
138
  line-height: 1.5;
62
139
  resize: none;
63
140
  overflow-y: hidden;
@@ -84,12 +161,18 @@
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;
90
173
  gap: 0.25rem;
91
174
  flex-wrap: wrap;
92
- min-height: 2rem;
175
+ min-height: 1.75rem;
93
176
  }
94
177
 
95
178
  .prompt-input__button {
@@ -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;
@@ -182,7 +354,11 @@
182
354
  display: flex;
183
355
  flex-direction: column;
184
356
  gap: 0.5rem;
185
- font-size: 0.875rem;
357
+ font-size: 0.8125rem;
358
+ /* Zero intrinsic inline size: long tool names, paths, and one-line JSON in
359
+ the confirmation must never widen the composer or the chat column around
360
+ it — same containment trick as the conversation viewport. */
361
+ contain: inline-size;
186
362
  }
187
363
 
188
364
  .prompt-input__approval-question {
@@ -192,6 +368,11 @@
192
368
  line-height: 1.4;
193
369
  }
194
370
 
371
+ .prompt-input__approval-question > span:first-child {
372
+ min-width: 0;
373
+ overflow-wrap: anywhere;
374
+ }
375
+
195
376
  .prompt-input__approval-question code {
196
377
  font-family: var(--sigvelo-font-mono);
197
378
  font-size: 0.8125em;
@@ -209,6 +390,8 @@
209
390
  padding-block: 0.375rem;
210
391
  padding-inline: 0.625rem;
211
392
  overflow: auto;
393
+ /* Long values wrap and scroll vertically within the cap — never sideways. */
394
+ overflow-wrap: anywhere;
212
395
  border: var(--sigvelo-border-style) var(--sigvelo-border-width)
213
396
  var(--sigvelo-color-neutral-border-subtle);
214
397
  border-radius: var(--sigvelo-radius-md);
@@ -51,7 +51,6 @@
51
51
  margin: 0;
52
52
  }
53
53
 
54
- .reasoning__trigger-leading-icon,
55
54
  .reasoning__trigger-icon {
56
55
  display: inline-flex;
57
56
  color: var(--sigvelo-color-text-muted);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-b/react-components",
3
- "version": "0.3.0",
3
+ "version": "0.5.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": {
@@ -49,7 +49,7 @@
49
49
  "anser": "^2.3.5",
50
50
  "shiki": "^3.23.0",
51
51
  "streamdown": "^2.5.0",
52
- "@mcp-b/design-tokens": "0.3.0"
52
+ "@mcp-b/design-tokens": "0.5.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@ai-sdk/react": "^3.0.194",