macbetter 0.1.0-beta.1 → 0.1.0-beta.2
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/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -0
- package/dist/components/confirmation.d.ts +24 -0
- package/dist/components/confirmation.js +50 -0
- package/dist/components/content-unavailable.d.ts +19 -0
- package/dist/components/content-unavailable.js +21 -0
- package/dist/components/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -0
- package/dist/components/message.d.ts +65 -0
- package/dist/components/message.js +69 -0
- package/dist/components/model-picker.d.ts +61 -0
- package/dist/components/model-picker.js +59 -0
- package/dist/components/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -0
- package/dist/components/reasoning.d.ts +28 -0
- package/dist/components/reasoning.js +52 -0
- package/dist/components/response.d.ts +14 -0
- package/dist/components/response.js +14 -0
- package/dist/components/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +19 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +8 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/index.css +19 -0
- package/dist/styles/components/inspector.css +236 -0
- package/dist/styles/components/message.css +236 -0
- package/dist/styles/components/model-picker.css +64 -0
- package/dist/styles/components/navigation-bar.css +2 -1
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/package.json +1 -1
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Prompt Input — the composer: a rounded box holding attachments, a field
|
|
3
|
+
* that grows and a toolbar, with an optional strip attached under it. A solid
|
|
4
|
+
* raised surface on macOS; Liquid Glass floating over the thread on iOS and iPadOS.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:where(:root, [data-platform="macos"]) {
|
|
8
|
+
--mb-prompt-input-radius: 18px;
|
|
9
|
+
--mb-prompt-input-radius-lg: 22px;
|
|
10
|
+
--mb-prompt-input-padding: 8px;
|
|
11
|
+
--mb-prompt-input-padding-lg: 12px;
|
|
12
|
+
--mb-prompt-input-field-font: 400 13px/18px var(--mb-font);
|
|
13
|
+
--mb-prompt-input-field-line: 18px;
|
|
14
|
+
--mb-prompt-input-field-padding: 6px 8px;
|
|
15
|
+
--mb-prompt-input-field-padding-lg: 6px 8px 10px;
|
|
16
|
+
--mb-prompt-input-min-rows: 1;
|
|
17
|
+
--mb-prompt-input-min-rows-lg: 3;
|
|
18
|
+
--mb-prompt-input-max-rows: 10;
|
|
19
|
+
--mb-prompt-input-control: 28px;
|
|
20
|
+
--mb-prompt-input-icon: 16px;
|
|
21
|
+
--mb-prompt-input-submit: 28px;
|
|
22
|
+
--mb-prompt-input-accessory-font: 400 12px/15px var(--mb-font);
|
|
23
|
+
--mb-prompt-input-accessory-padding: 6px 10px;
|
|
24
|
+
--mb-prompt-input-glow-width: 1.5px;
|
|
25
|
+
--mb-prompt-input-glow-blur: 14px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
29
|
+
--mb-prompt-input-radius: 24px;
|
|
30
|
+
--mb-prompt-input-radius-lg: 28px;
|
|
31
|
+
--mb-prompt-input-padding: 6px;
|
|
32
|
+
--mb-prompt-input-padding-lg: 10px;
|
|
33
|
+
--mb-prompt-input-field-font: 400 17px/22px var(--mb-font);
|
|
34
|
+
--mb-prompt-input-field-line: 22px;
|
|
35
|
+
--mb-prompt-input-field-padding: 9px 10px 4px;
|
|
36
|
+
--mb-prompt-input-field-padding-lg: 10px 10px 12px;
|
|
37
|
+
--mb-prompt-input-min-rows: 1;
|
|
38
|
+
--mb-prompt-input-min-rows-lg: 3;
|
|
39
|
+
--mb-prompt-input-max-rows: 6;
|
|
40
|
+
--mb-prompt-input-control: 36px;
|
|
41
|
+
--mb-prompt-input-icon: 20px;
|
|
42
|
+
--mb-prompt-input-submit: 34px;
|
|
43
|
+
--mb-prompt-input-accessory-font: 400 15px/20px var(--mb-font);
|
|
44
|
+
--mb-prompt-input-accessory-padding: 8px 14px;
|
|
45
|
+
--mb-prompt-input-glow-width: 2px;
|
|
46
|
+
--mb-prompt-input-glow-blur: 18px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@property --mb-prompt-input-glow-angle {
|
|
50
|
+
syntax: "<angle>";
|
|
51
|
+
inherits: false;
|
|
52
|
+
initial-value: 0deg;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mb-prompt-input {
|
|
56
|
+
--mb-prompt-input-current-radius: var(--mb-prompt-input-radius);
|
|
57
|
+
--mb-prompt-input-current-padding: var(--mb-prompt-input-padding);
|
|
58
|
+
--mb-prompt-input-current-rows: var(--mb-prompt-input-min-rows);
|
|
59
|
+
--mb-prompt-input-bg: var(--mb-bg-elevated);
|
|
60
|
+
--mb-prompt-input-edge: 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
|
|
61
|
+
--mb-prompt-input-shadow: var(--mb-shadow-2);
|
|
62
|
+
|
|
63
|
+
position: relative;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
width: 100%;
|
|
68
|
+
min-width: 0;
|
|
69
|
+
margin: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mb-prompt-input[data-size="lg"] {
|
|
73
|
+
--mb-prompt-input-current-radius: var(--mb-prompt-input-radius-lg);
|
|
74
|
+
--mb-prompt-input-current-padding: var(--mb-prompt-input-padding-lg);
|
|
75
|
+
--mb-prompt-input-current-rows: var(--mb-prompt-input-min-rows-lg);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Holds the box, and the glow's halo behind it. */
|
|
79
|
+
.mb-prompt-input-files {
|
|
80
|
+
position: relative;
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
min-width: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* ── The box ─────────────────────────────────────────────────── */
|
|
87
|
+
|
|
88
|
+
.mb-prompt-input-box {
|
|
89
|
+
position: relative;
|
|
90
|
+
z-index: 1;
|
|
91
|
+
isolation: isolate;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
gap: 2px;
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
padding: var(--mb-prompt-input-current-padding);
|
|
98
|
+
border-radius: var(--mb-prompt-input-current-radius);
|
|
99
|
+
background: var(--mb-prompt-input-bg);
|
|
100
|
+
box-shadow: var(--mb-prompt-input-edge), var(--mb-prompt-input-shadow);
|
|
101
|
+
color: var(--mb-label);
|
|
102
|
+
cursor: text;
|
|
103
|
+
outline: var(--mb-focus-ring-width) solid transparent;
|
|
104
|
+
outline-offset: 0;
|
|
105
|
+
transition:
|
|
106
|
+
outline-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
107
|
+
box-shadow var(--mb-duration-fast) var(--mb-ease-out);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@supports (corner-shape: squircle) {
|
|
111
|
+
.mb-prompt-input-box {
|
|
112
|
+
corner-shape: var(--mb-corner-shape);
|
|
113
|
+
border-radius: calc(var(--mb-prompt-input-current-radius) * var(--mb-corner-factor));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.mb-prompt-input-box::before {
|
|
117
|
+
corner-shape: inherit;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* A text field shows the focus halo whenever it's focused, as on macOS. */
|
|
122
|
+
.mb-prompt-input-box:has(.mb-prompt-input-field:focus) {
|
|
123
|
+
outline-color: var(--mb-focus-ring);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mb-prompt-input-box[data-dragging] {
|
|
127
|
+
outline-color: var(--mb-focus-ring);
|
|
128
|
+
outline-style: dashed;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mb-prompt-input-box[data-drag-reject] {
|
|
132
|
+
outline-color: var(--mb-destructive);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mb-prompt-input[data-disabled] .mb-prompt-input-box {
|
|
136
|
+
cursor: default;
|
|
137
|
+
opacity: 0.6;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ── Field ───────────────────────────────────────────────────── */
|
|
141
|
+
|
|
142
|
+
.mb-prompt-input-field {
|
|
143
|
+
display: block;
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
width: 100%;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
min-height: calc(
|
|
148
|
+
var(--mb-prompt-input-current-rows) * var(--mb-prompt-input-field-line) + var(--mb-prompt-input-field-pad-y, 12px)
|
|
149
|
+
);
|
|
150
|
+
max-height: calc(var(--mb-prompt-input-max-rows) * var(--mb-prompt-input-field-line) + 12px);
|
|
151
|
+
margin: 0;
|
|
152
|
+
padding: var(--mb-prompt-input-field-padding);
|
|
153
|
+
border: 0;
|
|
154
|
+
border-radius: 0;
|
|
155
|
+
background: transparent;
|
|
156
|
+
color: var(--mb-label);
|
|
157
|
+
font: var(--mb-prompt-input-field-font);
|
|
158
|
+
line-height: var(--mb-prompt-input-field-line);
|
|
159
|
+
letter-spacing: var(--mb-tracking-body);
|
|
160
|
+
caret-color: var(--mb-accent);
|
|
161
|
+
resize: none;
|
|
162
|
+
overflow-y: auto;
|
|
163
|
+
scrollbar-width: thin;
|
|
164
|
+
appearance: none;
|
|
165
|
+
outline: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.mb-prompt-input[data-size="lg"] .mb-prompt-input-field {
|
|
169
|
+
padding: var(--mb-prompt-input-field-padding-lg);
|
|
170
|
+
--mb-prompt-input-field-pad-y: 16px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.mb-prompt-input-field::placeholder {
|
|
174
|
+
color: var(--mb-placeholder);
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mb-prompt-input-field:focus-visible {
|
|
179
|
+
outline: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* ── Attachments ─────────────────────────────────────────────── */
|
|
183
|
+
|
|
184
|
+
.mb-prompt-input-attachments {
|
|
185
|
+
display: flex;
|
|
186
|
+
flex-wrap: nowrap;
|
|
187
|
+
gap: var(--mb-attachment-gap, 8px);
|
|
188
|
+
min-width: 0;
|
|
189
|
+
margin: 0;
|
|
190
|
+
padding: 2px 2px 6px;
|
|
191
|
+
overflow-x: auto;
|
|
192
|
+
overscroll-behavior-x: contain;
|
|
193
|
+
scrollbar-width: none;
|
|
194
|
+
cursor: default;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mb-prompt-input-attachment {
|
|
198
|
+
display: flex;
|
|
199
|
+
flex: none;
|
|
200
|
+
min-width: 0;
|
|
201
|
+
border-radius: var(--mb-attachment-radius, 8px);
|
|
202
|
+
outline: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mb-prompt-input-attachment:focus-visible {
|
|
206
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
207
|
+
outline-offset: 1px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* ── Toolbar ─────────────────────────────────────────────────── */
|
|
211
|
+
|
|
212
|
+
.mb-prompt-input-toolbar {
|
|
213
|
+
display: flex;
|
|
214
|
+
align-items: center;
|
|
215
|
+
justify-content: space-between;
|
|
216
|
+
gap: 8px;
|
|
217
|
+
min-width: 0;
|
|
218
|
+
cursor: default;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.mb-prompt-input-tools {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: 2px;
|
|
225
|
+
min-width: 0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.mb-prompt-input-tools:last-child:not(:first-child) {
|
|
229
|
+
margin-inline-start: auto;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.mb-prompt-input-button.mb-button {
|
|
233
|
+
--mb-button-height: var(--mb-prompt-input-control);
|
|
234
|
+
--mb-button-fg: var(--mb-label-secondary);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.mb-prompt-input-button.mb-button :where(svg) {
|
|
238
|
+
width: var(--mb-prompt-input-icon);
|
|
239
|
+
height: var(--mb-prompt-input-icon);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@media (hover: hover) and (pointer: fine) {
|
|
243
|
+
.mb-prompt-input-button.mb-button:hover {
|
|
244
|
+
--mb-button-fg: var(--mb-label);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.mb-prompt-input-button.mb-button[data-open] {
|
|
249
|
+
--mb-button-bg: var(--mb-fill-secondary);
|
|
250
|
+
--mb-button-fg: var(--mb-label);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.mb-prompt-input-tools > .mb-model-picker.mb-button {
|
|
254
|
+
--mb-button-height: var(--mb-prompt-input-control);
|
|
255
|
+
--mb-button-fg: var(--mb-label-secondary);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.mb-prompt-input-submit.mb-button {
|
|
259
|
+
--mb-button-height: var(--mb-prompt-input-submit);
|
|
260
|
+
margin-inline-start: 4px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.mb-prompt-input-submit.mb-button :where(svg) {
|
|
264
|
+
width: calc(var(--mb-prompt-input-submit) * 0.52);
|
|
265
|
+
height: calc(var(--mb-prompt-input-submit) * 0.52);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* Disabled, the send button keeps its shape as a quiet gray circle rather than fading the accent. */
|
|
269
|
+
.mb-prompt-input-submit.mb-button:is([data-disabled], :disabled) {
|
|
270
|
+
--mb-button-bg: var(--mb-fill-secondary);
|
|
271
|
+
--mb-button-fg: var(--mb-label-tertiary);
|
|
272
|
+
box-shadow: none;
|
|
273
|
+
opacity: 1;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* ── Suggestions at the caret ────────────────────────────────── */
|
|
277
|
+
|
|
278
|
+
.mb-prompt-input-suggestions {
|
|
279
|
+
min-width: 220px;
|
|
280
|
+
max-width: min(360px, calc(100vw - 16px));
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.mb-prompt-input-suggestions :where([data-slot="trigger-menu-item"]) {
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
gap: var(--mb-menu-icon-gap);
|
|
287
|
+
min-height: var(--mb-menu-item-height);
|
|
288
|
+
padding-block: var(--mb-menu-row-padding-block);
|
|
289
|
+
padding-inline: var(--mb-menu-row-padding);
|
|
290
|
+
border-radius: var(--mb-menu-row-radius);
|
|
291
|
+
color: var(--mb-label);
|
|
292
|
+
white-space: nowrap;
|
|
293
|
+
cursor: default;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.mb-prompt-input-suggestions :where([data-slot="trigger-menu-item"])[data-highlighted]:not([data-disabled]) {
|
|
297
|
+
background: var(--mb-menu-highlight);
|
|
298
|
+
color: var(--mb-menu-on-highlight);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.mb-prompt-input-suggestions :where([data-slot="trigger-menu-item"])[data-disabled] {
|
|
302
|
+
color: var(--mb-label-tertiary);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.mb-prompt-input-suggestions :where([data-slot="trigger-menu-group-label"]) {
|
|
306
|
+
padding: var(--mb-menu-label-padding);
|
|
307
|
+
color: var(--mb-label-secondary);
|
|
308
|
+
font: var(--mb-menu-label-font);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.mb-prompt-input-suggestions :where([data-slot="trigger-menu-separator"]) {
|
|
312
|
+
height: var(--mb-hairline);
|
|
313
|
+
margin: 5px 10px;
|
|
314
|
+
background: var(--mb-separator);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.mb-prompt-input-suggestions-empty {
|
|
318
|
+
padding: 4px var(--mb-menu-row-padding);
|
|
319
|
+
color: var(--mb-label-secondary);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* ── Accessory strip ─────────────────────────────────────────── */
|
|
323
|
+
|
|
324
|
+
.mb-prompt-input-accessory {
|
|
325
|
+
display: flex;
|
|
326
|
+
flex-wrap: wrap;
|
|
327
|
+
align-items: center;
|
|
328
|
+
gap: 4px 8px;
|
|
329
|
+
box-sizing: border-box;
|
|
330
|
+
margin-block-start: calc(var(--mb-prompt-input-current-radius) * -1);
|
|
331
|
+
margin-inline: 1px;
|
|
332
|
+
padding: var(--mb-prompt-input-accessory-padding);
|
|
333
|
+
padding-block-start: calc(var(--mb-prompt-input-current-radius) + 6px);
|
|
334
|
+
border-radius: 0 0 var(--mb-prompt-input-current-radius) var(--mb-prompt-input-current-radius);
|
|
335
|
+
background: var(--mb-fill-quaternary);
|
|
336
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
|
|
337
|
+
color: var(--mb-label-secondary);
|
|
338
|
+
font: var(--mb-prompt-input-accessory-font);
|
|
339
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@supports (corner-shape: squircle) {
|
|
343
|
+
.mb-prompt-input-accessory {
|
|
344
|
+
corner-shape: var(--mb-corner-shape);
|
|
345
|
+
border-radius: 0 0 calc(var(--mb-prompt-input-current-radius) * var(--mb-corner-factor))
|
|
346
|
+
calc(var(--mb-prompt-input-current-radius) * var(--mb-corner-factor));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.mb-prompt-input-accessory > :last-child:not(:first-child) {
|
|
351
|
+
margin-inline-start: auto;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* ── Intelligence glow ───────────────────────────────────────── */
|
|
355
|
+
|
|
356
|
+
/*
|
|
357
|
+
* A thin ring of the accent and the system colors turns around the box, with a
|
|
358
|
+
* soft blurred copy behind it. Drawn from theme tokens, so every theme glows in its own colors.
|
|
359
|
+
*/
|
|
360
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-box {
|
|
361
|
+
--mb-prompt-input-glow: conic-gradient(
|
|
362
|
+
from var(--mb-prompt-input-glow-angle),
|
|
363
|
+
var(--mb-accent),
|
|
364
|
+
var(--mb-pink),
|
|
365
|
+
var(--mb-purple),
|
|
366
|
+
var(--mb-indigo),
|
|
367
|
+
var(--mb-cyan),
|
|
368
|
+
var(--mb-mint),
|
|
369
|
+
var(--mb-yellow),
|
|
370
|
+
var(--mb-accent)
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-box::before,
|
|
375
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-files::before {
|
|
376
|
+
content: "";
|
|
377
|
+
position: absolute;
|
|
378
|
+
inset: calc(var(--mb-prompt-input-glow-width) * -1);
|
|
379
|
+
border-radius: inherit;
|
|
380
|
+
background: var(--mb-prompt-input-glow);
|
|
381
|
+
opacity: 0;
|
|
382
|
+
pointer-events: none;
|
|
383
|
+
transition: opacity var(--mb-duration-slow) var(--mb-ease-out);
|
|
384
|
+
animation: mb-prompt-input-glow-turn 5s linear infinite;
|
|
385
|
+
animation-play-state: paused;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/* The ring: the gradient masked down to its border. */
|
|
389
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-box::before {
|
|
390
|
+
z-index: 1;
|
|
391
|
+
padding: var(--mb-prompt-input-glow-width);
|
|
392
|
+
-webkit-mask:
|
|
393
|
+
linear-gradient(#000 0 0) content-box,
|
|
394
|
+
linear-gradient(#000 0 0);
|
|
395
|
+
-webkit-mask-composite: xor;
|
|
396
|
+
mask:
|
|
397
|
+
linear-gradient(#000 0 0) content-box exclude,
|
|
398
|
+
linear-gradient(#000 0 0);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* The halo, behind the box. */
|
|
402
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-files::before {
|
|
403
|
+
z-index: 0;
|
|
404
|
+
inset: 2px;
|
|
405
|
+
border-radius: var(--mb-prompt-input-current-radius);
|
|
406
|
+
filter: blur(var(--mb-prompt-input-glow-blur));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.mb-prompt-input[data-glowing] .mb-prompt-input-box::before {
|
|
410
|
+
opacity: 1;
|
|
411
|
+
animation-play-state: running;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.mb-prompt-input[data-glowing] .mb-prompt-input-files::before {
|
|
415
|
+
opacity: 0.5;
|
|
416
|
+
animation-play-state: running;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
@keyframes mb-prompt-input-glow-turn {
|
|
420
|
+
to {
|
|
421
|
+
--mb-prompt-input-glow-angle: 360deg;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* While it glows, the gradient is the edge: the focus halo steps aside. */
|
|
426
|
+
.mb-prompt-input[data-glowing] .mb-prompt-input-box {
|
|
427
|
+
outline-color: transparent;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@media (prefers-reduced-motion: reduce) {
|
|
431
|
+
:where(:root:not([data-motion="full"])) {
|
|
432
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-box::before,
|
|
433
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-files::before {
|
|
434
|
+
animation: none;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* ── Floating ────────────────────────────────────────────────── */
|
|
440
|
+
|
|
441
|
+
.mb-prompt-input[data-floating] {
|
|
442
|
+
position: absolute;
|
|
443
|
+
z-index: var(--mb-z-floating);
|
|
444
|
+
inset-inline: max(var(--mb-chat-padding-inline, 16px), calc((100% - var(--mb-chat-max-width, 720px)) / 2));
|
|
445
|
+
inset-block-end: calc(var(--mb-safe-bottom) + 10px);
|
|
446
|
+
width: auto;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* ── iOS and iPadOS: Liquid Glass over the thread ────────────── */
|
|
450
|
+
|
|
451
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
452
|
+
.mb-prompt-input {
|
|
453
|
+
--mb-prompt-input-bg: var(--mb-material-thick);
|
|
454
|
+
--mb-prompt-input-edge: inset 0 1px 0 0 var(--mb-glass-edge), inset 0 0 0 var(--mb-hairline) var(--mb-glass-edge-soft),
|
|
455
|
+
0 0 0 var(--mb-hairline) var(--mb-glass-border);
|
|
456
|
+
--mb-prompt-input-shadow: var(--mb-shadow-3);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.mb-prompt-input-box {
|
|
460
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
461
|
+
backdrop-filter: var(--mb-material-filter);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* iOS text views show the caret, not a ring. */
|
|
465
|
+
.mb-prompt-input-box:has(.mb-prompt-input-field:focus) {
|
|
466
|
+
outline-color: transparent;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.mb-prompt-input-button.mb-button:active {
|
|
470
|
+
--mb-button-bg: transparent;
|
|
471
|
+
opacity: 0.45;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.mb-prompt-input-accessory {
|
|
475
|
+
background: var(--mb-fill-tertiary);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
480
|
+
:where(:root:not([data-transparency="full"])) {
|
|
481
|
+
.mb-prompt-input-box {
|
|
482
|
+
-webkit-backdrop-filter: none;
|
|
483
|
+
backdrop-filter: none;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
@media (prefers-contrast: more) {
|
|
489
|
+
.mb-prompt-input {
|
|
490
|
+
--mb-prompt-input-edge: 0 0 0 1px var(--mb-control-border);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
@media (forced-colors: active) {
|
|
495
|
+
.mb-prompt-input-box {
|
|
496
|
+
border: 1px solid CanvasText;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-box::before,
|
|
500
|
+
.mb-prompt-input[data-glow] .mb-prompt-input-files::before {
|
|
501
|
+
display: none;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/* Reasoning — a quiet line that says what the model is doing, and opens to show how it got there. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-reasoning-font: var(--mb-text-body);
|
|
5
|
+
--mb-reasoning-content-font: var(--mb-text-body);
|
|
6
|
+
--mb-reasoning-content-leading: 18px;
|
|
7
|
+
--mb-reasoning-min-height: 22px;
|
|
8
|
+
--mb-reasoning-gap: 4px;
|
|
9
|
+
--mb-reasoning-chevron-width: 5px;
|
|
10
|
+
--mb-reasoning-chevron-height: 9px;
|
|
11
|
+
--mb-reasoning-chevron-stroke: 1.8;
|
|
12
|
+
--mb-reasoning-content-indent: 12px;
|
|
13
|
+
--mb-reasoning-content-space: 6px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
17
|
+
--mb-reasoning-font: var(--mb-text-subheadline);
|
|
18
|
+
--mb-reasoning-content-font: var(--mb-text-subheadline);
|
|
19
|
+
--mb-reasoning-content-leading: 21px;
|
|
20
|
+
--mb-reasoning-min-height: 28px;
|
|
21
|
+
--mb-reasoning-gap: 5px;
|
|
22
|
+
--mb-reasoning-chevron-width: 6px;
|
|
23
|
+
--mb-reasoning-chevron-height: 11px;
|
|
24
|
+
--mb-reasoning-chevron-stroke: 2;
|
|
25
|
+
--mb-reasoning-content-indent: 14px;
|
|
26
|
+
--mb-reasoning-content-space: 8px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mb-reasoning {
|
|
30
|
+
position: relative;
|
|
31
|
+
isolation: isolate;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
min-width: 0;
|
|
36
|
+
color: var(--mb-label-secondary);
|
|
37
|
+
font: var(--mb-reasoning-font);
|
|
38
|
+
letter-spacing: var(--mb-tracking-body);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mb-reasoning-trigger {
|
|
42
|
+
position: relative;
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
gap: var(--mb-reasoning-gap);
|
|
46
|
+
max-width: 100%;
|
|
47
|
+
min-height: var(--mb-reasoning-min-height);
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
border: 0;
|
|
51
|
+
border-radius: var(--mb-radius-xs);
|
|
52
|
+
background: transparent;
|
|
53
|
+
color: var(--mb-label-secondary);
|
|
54
|
+
font: inherit;
|
|
55
|
+
letter-spacing: inherit;
|
|
56
|
+
text-align: start;
|
|
57
|
+
cursor: default;
|
|
58
|
+
-webkit-tap-highlight-color: transparent;
|
|
59
|
+
touch-action: manipulation;
|
|
60
|
+
user-select: none;
|
|
61
|
+
-webkit-user-select: none;
|
|
62
|
+
transition: color var(--mb-duration-fast) var(--mb-ease-out);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* The line is short; its hit area still meets the platform minimum. */
|
|
66
|
+
.mb-reasoning-trigger::after {
|
|
67
|
+
content: "";
|
|
68
|
+
position: absolute;
|
|
69
|
+
inset: 50% -4px auto;
|
|
70
|
+
height: max(100%, var(--mb-hit-target));
|
|
71
|
+
translate: 0 -50%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mb-reasoning-trigger:focus-visible {
|
|
75
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
76
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mb-reasoning-label {
|
|
80
|
+
min-width: 0;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
white-space: nowrap;
|
|
83
|
+
text-overflow: ellipsis;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.mb-reasoning-chevron {
|
|
87
|
+
flex: none;
|
|
88
|
+
box-sizing: content-box;
|
|
89
|
+
width: var(--mb-reasoning-chevron-width);
|
|
90
|
+
height: var(--mb-reasoning-chevron-height);
|
|
91
|
+
/* A square box, so the turn pivots on the chevron's center. */
|
|
92
|
+
padding-inline: calc((var(--mb-reasoning-chevron-height) - var(--mb-reasoning-chevron-width)) / 2);
|
|
93
|
+
fill: none;
|
|
94
|
+
stroke: currentColor;
|
|
95
|
+
stroke-width: var(--mb-reasoning-chevron-stroke);
|
|
96
|
+
stroke-linecap: round;
|
|
97
|
+
stroke-linejoin: round;
|
|
98
|
+
transition: rotate var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.mb-reasoning-trigger[data-open] .mb-reasoning-chevron {
|
|
102
|
+
rotate: 90deg;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:where([dir="rtl"]) .mb-reasoning-chevron {
|
|
106
|
+
scale: -1 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:where([dir="rtl"]) .mb-reasoning-trigger[data-open] .mb-reasoning-chevron {
|
|
110
|
+
rotate: -90deg;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (hover: hover) and (pointer: fine) {
|
|
114
|
+
.mb-reasoning-trigger:hover {
|
|
115
|
+
color: var(--mb-label);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mb-reasoning-trigger:hover .mb-reasoning-label:not([data-active]) {
|
|
119
|
+
color: var(--mb-label);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mb-reasoning-trigger:active {
|
|
124
|
+
color: var(--mb-label);
|
|
125
|
+
transition-duration: 0ms;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mb-reasoning-trigger:active .mb-reasoning-label:not([data-active]) {
|
|
129
|
+
color: var(--mb-label);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mb-reasoning-panel {
|
|
133
|
+
align-self: stretch;
|
|
134
|
+
height: var(--collapsible-panel-height, auto);
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
transition: height var(--mb-spring-smooth-duration) var(--mb-spring-smooth);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.mb-reasoning-panel:is([data-starting-style], [data-ending-style]) {
|
|
140
|
+
height: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.mb-reasoning-panel[data-ending-style] {
|
|
144
|
+
transition-duration: var(--mb-duration-slow);
|
|
145
|
+
transition-timing-function: var(--mb-ease-out);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.mb-reasoning-content {
|
|
149
|
+
margin-block: var(--mb-reasoning-content-space) var(--mb-space-2);
|
|
150
|
+
padding-inline-start: var(--mb-reasoning-content-indent);
|
|
151
|
+
border-inline-start: 1px solid var(--mb-separator-strong);
|
|
152
|
+
color: var(--mb-label-secondary);
|
|
153
|
+
font: var(--mb-reasoning-content-font);
|
|
154
|
+
line-height: var(--mb-reasoning-content-leading);
|
|
155
|
+
text-wrap: pretty;
|
|
156
|
+
overflow-wrap: break-word;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mb-reasoning-content > :where(p, ul, ol) {
|
|
160
|
+
margin: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mb-reasoning-content > :where(p, ul, ol) + :where(p, ul, ol) {
|
|
164
|
+
margin-block-start: var(--mb-reasoning-content-space);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.mb-reasoning-content :where(ul, ol) {
|
|
168
|
+
padding-inline-start: 1.25em;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Glow: a soft wash of the theme's colors drifting behind the line while the model works. */
|
|
172
|
+
.mb-reasoning[data-glow][data-state="running"]::before {
|
|
173
|
+
content: "";
|
|
174
|
+
position: absolute;
|
|
175
|
+
z-index: -1;
|
|
176
|
+
inset-block-start: calc(var(--mb-reasoning-min-height) / 2 - 18px);
|
|
177
|
+
inset-inline-start: -18px;
|
|
178
|
+
width: min(260px, calc(100% + 36px));
|
|
179
|
+
height: 36px;
|
|
180
|
+
border-radius: var(--mb-radius-full);
|
|
181
|
+
background:
|
|
182
|
+
radial-gradient(closest-side at 20% 50%, color-mix(in oklch, var(--mb-accent) 55%, transparent), transparent),
|
|
183
|
+
radial-gradient(closest-side at 55% 50%, color-mix(in oklch, var(--mb-purple) 45%, transparent), transparent),
|
|
184
|
+
radial-gradient(closest-side at 85% 50%, color-mix(in oklch, var(--mb-pink) 40%, transparent), transparent);
|
|
185
|
+
background-size: 200% 100%;
|
|
186
|
+
filter: blur(14px);
|
|
187
|
+
opacity: 0.38;
|
|
188
|
+
pointer-events: none;
|
|
189
|
+
animation: mb-reasoning-glow 5s var(--mb-ease-in-out) infinite alternate;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@keyframes mb-reasoning-glow {
|
|
193
|
+
from {
|
|
194
|
+
background-position: 0% 50%;
|
|
195
|
+
}
|
|
196
|
+
to {
|
|
197
|
+
background-position: 100% 50%;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media (prefers-reduced-motion: reduce) {
|
|
202
|
+
:where(:root:not([data-motion="full"])) {
|
|
203
|
+
.mb-reasoning[data-glow][data-state="running"]::before {
|
|
204
|
+
animation: none;
|
|
205
|
+
background-position: 50% 50%;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@media (forced-colors: active) {
|
|
211
|
+
.mb-reasoning[data-glow]::before {
|
|
212
|
+
display: none;
|
|
213
|
+
}
|
|
214
|
+
}
|