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,303 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Response — reading typography for the assistant's reply. Element selectors
|
|
3
|
+
* stay inside the response and stop at any nested macbetter component, so a
|
|
4
|
+
* code block or a card inside a reply keeps its own styles.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:where(:root, [data-platform="macos"]) {
|
|
8
|
+
--mb-response-leading: 20px;
|
|
9
|
+
--mb-response-space: 12px;
|
|
10
|
+
--mb-response-heading-space: 20px;
|
|
11
|
+
--mb-response-list-indent: 22px;
|
|
12
|
+
--mb-response-code-font: 400 12px/18px var(--mb-font-mono);
|
|
13
|
+
--mb-response-code-padding: 12px 14px;
|
|
14
|
+
--mb-response-cell-padding: 6px 12px;
|
|
15
|
+
--mb-response-caret-height: 15px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
19
|
+
--mb-response-leading: 25px;
|
|
20
|
+
--mb-response-space: 14px;
|
|
21
|
+
--mb-response-heading-space: 24px;
|
|
22
|
+
--mb-response-list-indent: 26px;
|
|
23
|
+
--mb-response-code-font: 400 15px/21px var(--mb-font-mono);
|
|
24
|
+
--mb-response-code-padding: 14px 16px;
|
|
25
|
+
--mb-response-cell-padding: 9px 14px;
|
|
26
|
+
--mb-response-caret-height: 19px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mb-response {
|
|
30
|
+
--mb-response-caret-animation: mb-response-blink 1.06s steps(1, end) infinite;
|
|
31
|
+
|
|
32
|
+
min-width: 0;
|
|
33
|
+
color: var(--mb-label);
|
|
34
|
+
font: var(--mb-text-body);
|
|
35
|
+
line-height: var(--mb-response-leading);
|
|
36
|
+
letter-spacing: var(--mb-tracking-body);
|
|
37
|
+
overflow-wrap: break-word;
|
|
38
|
+
text-wrap: pretty;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mb-response > :first-child {
|
|
42
|
+
margin-block-start: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mb-response > :last-child {
|
|
46
|
+
margin-block-end: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* A nested component keeps its own styles, but sits in the flow with the same space around it. */
|
|
50
|
+
:is(.mb-response, .mb-response > div:only-child) > :where([class^="mb-"], [class*=" mb-"]):not(:last-child) {
|
|
51
|
+
margin-block-end: var(--mb-response-space);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@scope (.mb-response) to (:scope :is([class^="mb-"], [class*=" mb-"]):not(.mb-response-caret)) {
|
|
55
|
+
:where(p, ul, ol, blockquote, pre, table, figure, img, hr) {
|
|
56
|
+
margin-block: 0 var(--mb-response-space);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
60
|
+
margin-block: var(--mb-response-heading-space) 8px;
|
|
61
|
+
color: var(--mb-label);
|
|
62
|
+
text-wrap: balance;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:where(h1) {
|
|
66
|
+
font: var(--mb-text-title-2);
|
|
67
|
+
letter-spacing: var(--mb-tracking-title);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where(h2) {
|
|
71
|
+
font: var(--mb-text-title-3);
|
|
72
|
+
letter-spacing: var(--mb-tracking-title);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(h3, h4, h5, h6) {
|
|
76
|
+
font: var(--mb-text-headline);
|
|
77
|
+
line-height: var(--mb-response-leading);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:where(h4, h5, h6) {
|
|
81
|
+
color: var(--mb-label-secondary);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:where(strong, b) {
|
|
85
|
+
font-weight: 600;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
:where(a) {
|
|
89
|
+
color: var(--mb-accent-text);
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
text-decoration-color: color-mix(in oklch, var(--mb-accent-text) 40%, transparent);
|
|
92
|
+
text-decoration-thickness: 1px;
|
|
93
|
+
text-underline-offset: 2px;
|
|
94
|
+
border-radius: 2px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (hover: hover) and (pointer: fine) {
|
|
98
|
+
:where(a):hover {
|
|
99
|
+
text-decoration-color: currentColor;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(a):focus-visible {
|
|
104
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
105
|
+
outline-offset: 1px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where(ul, ol) {
|
|
109
|
+
padding-inline-start: var(--mb-response-list-indent);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Stated outright: CSS resets often strip list markers. */
|
|
113
|
+
:where(ul) {
|
|
114
|
+
list-style-type: disc;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where(ol) {
|
|
118
|
+
list-style-type: decimal;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:where(ul ul, ol ul) {
|
|
122
|
+
list-style-type: circle;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(li) {
|
|
126
|
+
padding-inline-start: 2px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where(li + li) {
|
|
130
|
+
margin-block-start: 4px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
:where(li > :is(ul, ol)) {
|
|
134
|
+
margin-block: 4px 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where(li > p) {
|
|
138
|
+
margin-block: 0 4px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:where(li)::marker {
|
|
142
|
+
color: var(--mb-label-secondary);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:where(ol > li)::marker {
|
|
146
|
+
font-variant-numeric: tabular-nums;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:where(code) {
|
|
150
|
+
padding: 0.1em 0.35em;
|
|
151
|
+
border-radius: var(--mb-radius-xs);
|
|
152
|
+
background: var(--mb-fill-tertiary);
|
|
153
|
+
font-family: var(--mb-font-mono);
|
|
154
|
+
font-size: 0.88em;
|
|
155
|
+
overflow-wrap: anywhere;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:where(pre) {
|
|
159
|
+
overflow-x: auto;
|
|
160
|
+
padding: var(--mb-response-code-padding);
|
|
161
|
+
border-radius: var(--mb-radius-lg);
|
|
162
|
+
background: var(--mb-fill-quaternary);
|
|
163
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
|
|
164
|
+
font: var(--mb-response-code-font);
|
|
165
|
+
tab-size: 2;
|
|
166
|
+
white-space: pre;
|
|
167
|
+
overflow-wrap: normal;
|
|
168
|
+
scrollbar-width: thin;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:where(pre code) {
|
|
172
|
+
padding: 0;
|
|
173
|
+
border-radius: 0;
|
|
174
|
+
background: none;
|
|
175
|
+
font: inherit;
|
|
176
|
+
overflow-wrap: normal;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where(pre):focus-visible {
|
|
180
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
181
|
+
outline-offset: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:where(blockquote) {
|
|
185
|
+
margin-inline: 0;
|
|
186
|
+
padding-inline-start: 12px;
|
|
187
|
+
border-inline-start: 3px solid var(--mb-separator-strong);
|
|
188
|
+
color: var(--mb-label-secondary);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(hr) {
|
|
192
|
+
height: var(--mb-hairline);
|
|
193
|
+
margin-block: var(--mb-response-heading-space);
|
|
194
|
+
border: 0;
|
|
195
|
+
background: var(--mb-separator);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:where(img) {
|
|
199
|
+
display: block;
|
|
200
|
+
max-width: 100%;
|
|
201
|
+
height: auto;
|
|
202
|
+
border-radius: var(--mb-radius-lg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/* A wide table scrolls on its own instead of widening the thread. */
|
|
206
|
+
:where(table) {
|
|
207
|
+
display: block;
|
|
208
|
+
width: max-content;
|
|
209
|
+
max-width: 100%;
|
|
210
|
+
overflow-x: auto;
|
|
211
|
+
border-collapse: collapse;
|
|
212
|
+
font-variant-numeric: tabular-nums;
|
|
213
|
+
scrollbar-width: thin;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
:where(th, td) {
|
|
217
|
+
padding: var(--mb-response-cell-padding);
|
|
218
|
+
border-block-end: var(--mb-hairline) solid var(--mb-separator);
|
|
219
|
+
text-align: start;
|
|
220
|
+
vertical-align: top;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:where(th:first-child, td:first-child) {
|
|
224
|
+
padding-inline-start: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:where(th) {
|
|
228
|
+
border-block-end-color: var(--mb-separator-strong);
|
|
229
|
+
color: var(--mb-label-secondary);
|
|
230
|
+
font-weight: 600;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:where(tbody tr:last-child) > :where(td, th) {
|
|
234
|
+
border-block-end: 0;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:where(mark) {
|
|
238
|
+
border-radius: 2px;
|
|
239
|
+
background: color-mix(in oklch, var(--mb-yellow) 40%, transparent);
|
|
240
|
+
color: inherit;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:where(kbd) {
|
|
244
|
+
padding: 0 0.35em;
|
|
245
|
+
border-radius: var(--mb-radius-xs);
|
|
246
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
|
|
247
|
+
font-family: var(--mb-font);
|
|
248
|
+
font-size: 0.88em;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* ── Caret ───────────────────────────────────────────────────── */
|
|
253
|
+
|
|
254
|
+
.mb-response-caret {
|
|
255
|
+
display: inline-block;
|
|
256
|
+
width: 2px;
|
|
257
|
+
height: var(--mb-response-caret-height);
|
|
258
|
+
margin-inline-start: 2px;
|
|
259
|
+
border-radius: 1px;
|
|
260
|
+
background: var(--mb-accent);
|
|
261
|
+
vertical-align: text-bottom;
|
|
262
|
+
animation: var(--mb-response-caret-animation, mb-response-blink 1.06s steps(1, end) infinite);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/*
|
|
266
|
+
* With `streaming` and no caret placed by hand, the last block carries one. The
|
|
267
|
+
* block may sit in a single wrapper, as a Markdown renderer's output does.
|
|
268
|
+
*/
|
|
269
|
+
:is(.mb-response, .mb-response > div:only-child)
|
|
270
|
+
> :is(p, h1, h2, h3, h4, h5, h6, blockquote):last-child:where(.mb-response[data-streaming]:not(:has(.mb-response-caret)) *)::after,
|
|
271
|
+
:is(.mb-response, .mb-response > div:only-child)
|
|
272
|
+
> :is(ul, ol):last-child
|
|
273
|
+
> li:last-child:where(.mb-response[data-streaming]:not(:has(.mb-response-caret)) *)::after {
|
|
274
|
+
content: "";
|
|
275
|
+
display: inline-block;
|
|
276
|
+
width: 2px;
|
|
277
|
+
height: var(--mb-response-caret-height);
|
|
278
|
+
margin-inline-start: 2px;
|
|
279
|
+
border-radius: 1px;
|
|
280
|
+
background: var(--mb-accent);
|
|
281
|
+
vertical-align: text-bottom;
|
|
282
|
+
animation: var(--mb-response-caret-animation);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@keyframes mb-response-blink {
|
|
286
|
+
50% {
|
|
287
|
+
opacity: 0;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@media (prefers-reduced-motion: reduce) {
|
|
292
|
+
:where(:root:not([data-motion="full"])) {
|
|
293
|
+
.mb-response {
|
|
294
|
+
--mb-response-caret-animation: none;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@media (forced-colors: active) {
|
|
300
|
+
.mb-response-caret {
|
|
301
|
+
background: CanvasText;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* Shimmer — secondary text with a brighter band sweeping along it while work is in progress. */
|
|
2
|
+
|
|
3
|
+
.mb-shimmer {
|
|
4
|
+
--mb-shimmer-duration: 2s;
|
|
5
|
+
/* The band only moves toward the label color, so every frame holds the secondary label's 4.5:1. */
|
|
6
|
+
--mb-shimmer-base: var(--mb-label-secondary);
|
|
7
|
+
--mb-shimmer-highlight: var(--mb-label);
|
|
8
|
+
|
|
9
|
+
color: var(--mb-shimmer-base);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mb-shimmer[data-active] {
|
|
13
|
+
background-image: linear-gradient(
|
|
14
|
+
90deg,
|
|
15
|
+
var(--mb-shimmer-base) 0% 38%,
|
|
16
|
+
var(--mb-shimmer-highlight) 50%,
|
|
17
|
+
var(--mb-shimmer-base) 62% 100%
|
|
18
|
+
);
|
|
19
|
+
background-size: 300% 100%;
|
|
20
|
+
background-repeat: no-repeat;
|
|
21
|
+
-webkit-background-clip: text;
|
|
22
|
+
background-clip: text;
|
|
23
|
+
-webkit-text-fill-color: transparent;
|
|
24
|
+
color: transparent;
|
|
25
|
+
animation: mb-shimmer var(--mb-shimmer-duration) linear infinite;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where([dir="rtl"]) .mb-shimmer[data-active] {
|
|
29
|
+
animation-direction: reverse;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes mb-shimmer {
|
|
33
|
+
from {
|
|
34
|
+
background-position: 100% 0;
|
|
35
|
+
}
|
|
36
|
+
to {
|
|
37
|
+
background-position: 0% 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Reduce Motion: the band stops and the text is plain secondary text, not a frozen gradient. */
|
|
42
|
+
@media (prefers-reduced-motion: reduce) {
|
|
43
|
+
:where(:root:not([data-motion="full"])) {
|
|
44
|
+
.mb-shimmer[data-active] {
|
|
45
|
+
animation: none;
|
|
46
|
+
background-image: none;
|
|
47
|
+
-webkit-text-fill-color: currentColor;
|
|
48
|
+
color: var(--mb-shimmer-base);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@media (forced-colors: active) {
|
|
54
|
+
.mb-shimmer[data-active] {
|
|
55
|
+
animation: none;
|
|
56
|
+
background-image: none;
|
|
57
|
+
-webkit-text-fill-color: currentColor;
|
|
58
|
+
color: CanvasText;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/* Sources — what a reply drew on: a collapsible list of links, and inline citation chips that preview them. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-sources-font: var(--mb-text-body);
|
|
5
|
+
--mb-sources-min-height: 22px;
|
|
6
|
+
--mb-sources-chevron-width: 5px;
|
|
7
|
+
--mb-sources-chevron-height: 9px;
|
|
8
|
+
--mb-sources-chevron-stroke: 1.8;
|
|
9
|
+
--mb-source-row-height: 28px;
|
|
10
|
+
--mb-source-padding-inline: 8px;
|
|
11
|
+
--mb-source-font: var(--mb-text-body);
|
|
12
|
+
--mb-source-site-font: var(--mb-text-callout);
|
|
13
|
+
--mb-source-icon-size: 16px;
|
|
14
|
+
--mb-source-icon-radius: 4px;
|
|
15
|
+
--mb-source-icon-font: 700 9.5px/1 var(--mb-font-rounded);
|
|
16
|
+
--mb-citation-height: 16px;
|
|
17
|
+
--mb-citation-padding: 6px;
|
|
18
|
+
--mb-citation-font: 500 11px/14px var(--mb-font);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
22
|
+
--mb-sources-font: var(--mb-text-subheadline);
|
|
23
|
+
--mb-sources-min-height: 28px;
|
|
24
|
+
--mb-sources-chevron-width: 6px;
|
|
25
|
+
--mb-sources-chevron-height: 11px;
|
|
26
|
+
--mb-sources-chevron-stroke: 2;
|
|
27
|
+
--mb-source-row-height: 44px;
|
|
28
|
+
--mb-source-padding-inline: 10px;
|
|
29
|
+
--mb-source-font: var(--mb-text-subheadline);
|
|
30
|
+
--mb-source-site-font: var(--mb-text-footnote);
|
|
31
|
+
--mb-source-icon-size: 20px;
|
|
32
|
+
--mb-source-icon-radius: 5px;
|
|
33
|
+
--mb-source-icon-font: 700 12px/1 var(--mb-font-rounded);
|
|
34
|
+
--mb-citation-height: 20px;
|
|
35
|
+
--mb-citation-padding: 7px;
|
|
36
|
+
--mb-citation-font: 500 13px/18px var(--mb-font);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* ── The line ────────────────────────────────────────────────── */
|
|
40
|
+
|
|
41
|
+
.mb-sources {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
color: var(--mb-label-secondary);
|
|
47
|
+
font: var(--mb-sources-font);
|
|
48
|
+
letter-spacing: var(--mb-tracking-body);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mb-sources-trigger {
|
|
52
|
+
position: relative;
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 4px;
|
|
56
|
+
max-width: 100%;
|
|
57
|
+
min-height: var(--mb-sources-min-height);
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
border: 0;
|
|
61
|
+
border-radius: var(--mb-radius-xs);
|
|
62
|
+
background: transparent;
|
|
63
|
+
color: var(--mb-label-secondary);
|
|
64
|
+
font: inherit;
|
|
65
|
+
letter-spacing: inherit;
|
|
66
|
+
text-align: start;
|
|
67
|
+
cursor: default;
|
|
68
|
+
-webkit-tap-highlight-color: transparent;
|
|
69
|
+
touch-action: manipulation;
|
|
70
|
+
user-select: none;
|
|
71
|
+
-webkit-user-select: none;
|
|
72
|
+
transition: color var(--mb-duration-fast) var(--mb-ease-out);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mb-sources-trigger::after {
|
|
76
|
+
content: "";
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset: 50% -4px auto;
|
|
79
|
+
height: max(100%, var(--mb-hit-target));
|
|
80
|
+
translate: 0 -50%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mb-sources-trigger:focus-visible {
|
|
84
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
85
|
+
outline-offset: var(--mb-focus-ring-offset);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-sources-label {
|
|
89
|
+
min-width: 0;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
white-space: nowrap;
|
|
92
|
+
text-overflow: ellipsis;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.mb-sources-chevron {
|
|
96
|
+
flex: none;
|
|
97
|
+
box-sizing: content-box;
|
|
98
|
+
width: var(--mb-sources-chevron-width);
|
|
99
|
+
height: var(--mb-sources-chevron-height);
|
|
100
|
+
padding-inline: calc((var(--mb-sources-chevron-height) - var(--mb-sources-chevron-width)) / 2);
|
|
101
|
+
fill: none;
|
|
102
|
+
stroke: currentColor;
|
|
103
|
+
stroke-width: var(--mb-sources-chevron-stroke);
|
|
104
|
+
stroke-linecap: round;
|
|
105
|
+
stroke-linejoin: round;
|
|
106
|
+
transition: rotate var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mb-sources-trigger[data-open] .mb-sources-chevron {
|
|
110
|
+
rotate: 90deg;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:where([dir="rtl"]) .mb-sources-chevron {
|
|
114
|
+
scale: -1 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:where([dir="rtl"]) .mb-sources-trigger[data-open] .mb-sources-chevron {
|
|
118
|
+
rotate: -90deg;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@media (hover: hover) and (pointer: fine) {
|
|
122
|
+
.mb-sources-trigger:hover {
|
|
123
|
+
color: var(--mb-label);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.mb-sources-trigger:active {
|
|
128
|
+
color: var(--mb-label);
|
|
129
|
+
transition-duration: 0ms;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mb-sources-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-sources-panel:is([data-starting-style], [data-ending-style]) {
|
|
140
|
+
height: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.mb-sources-panel[data-ending-style] {
|
|
144
|
+
transition-duration: var(--mb-duration-slow);
|
|
145
|
+
transition-timing-function: var(--mb-ease-out);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* ── The list ────────────────────────────────────────────────── */
|
|
149
|
+
|
|
150
|
+
.mb-sources-list {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
margin: var(--mb-space-3) 0 0;
|
|
154
|
+
/* Rows' fills reach past the text, so the text lines up with the line above. */
|
|
155
|
+
margin-inline: calc(var(--mb-source-padding-inline) * -1);
|
|
156
|
+
padding: 0;
|
|
157
|
+
list-style: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.mb-sources-item {
|
|
161
|
+
display: block;
|
|
162
|
+
min-width: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mb-source {
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
gap: var(--mb-space-4);
|
|
170
|
+
min-width: 0;
|
|
171
|
+
min-height: var(--mb-source-row-height);
|
|
172
|
+
padding: var(--mb-space-2) var(--mb-source-padding-inline);
|
|
173
|
+
border-radius: var(--mb-row-radius);
|
|
174
|
+
color: var(--mb-label);
|
|
175
|
+
font: var(--mb-source-font);
|
|
176
|
+
text-decoration: none;
|
|
177
|
+
cursor: default;
|
|
178
|
+
-webkit-tap-highlight-color: transparent;
|
|
179
|
+
transition: background-color var(--mb-duration-fast) var(--mb-ease-out);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mb-source:focus-visible {
|
|
183
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
184
|
+
outline-offset: calc(var(--mb-focus-ring-width) * -1);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@media (hover: hover) and (pointer: fine) {
|
|
188
|
+
.mb-source:hover {
|
|
189
|
+
background: var(--mb-fill-quaternary);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mb-source:active {
|
|
194
|
+
background: var(--mb-fill-tertiary);
|
|
195
|
+
transition-duration: 0ms;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.mb-source-title {
|
|
199
|
+
flex: 1 1 auto;
|
|
200
|
+
min-width: 0;
|
|
201
|
+
overflow: hidden;
|
|
202
|
+
white-space: nowrap;
|
|
203
|
+
text-overflow: ellipsis;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.mb-source-site {
|
|
207
|
+
flex: 0 1 auto;
|
|
208
|
+
min-width: 0;
|
|
209
|
+
max-width: 40%;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
color: var(--mb-label-secondary);
|
|
212
|
+
font: var(--mb-source-site-font);
|
|
213
|
+
white-space: nowrap;
|
|
214
|
+
text-overflow: ellipsis;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ── Favicon slot ────────────────────────────────────────────── */
|
|
218
|
+
|
|
219
|
+
.mb-source-icon {
|
|
220
|
+
--mb-source-tint: var(--mb-accent);
|
|
221
|
+
|
|
222
|
+
display: inline-grid;
|
|
223
|
+
flex: none;
|
|
224
|
+
place-items: center;
|
|
225
|
+
width: var(--mb-source-icon-size);
|
|
226
|
+
height: var(--mb-source-icon-size);
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
border-radius: var(--mb-source-icon-radius);
|
|
229
|
+
background: var(--mb-fill-tertiary);
|
|
230
|
+
color: var(--mb-label-secondary);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.mb-source-icon[data-letter] {
|
|
234
|
+
/* Deep enough that the white letter reads on every system color. */
|
|
235
|
+
background: oklch(from var(--mb-source-tint) min(l, 0.58) c h);
|
|
236
|
+
color: white;
|
|
237
|
+
font: var(--mb-source-icon-font);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mb-source-icon > :where(svg, img, .mb-artwork) {
|
|
241
|
+
width: 100%;
|
|
242
|
+
height: 100%;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@supports (corner-shape: squircle) {
|
|
246
|
+
.mb-source-icon {
|
|
247
|
+
corner-shape: var(--mb-corner-shape);
|
|
248
|
+
border-radius: calc(var(--mb-source-icon-radius) * var(--mb-corner-factor));
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* ── Citation chip ───────────────────────────────────────────── */
|
|
253
|
+
|
|
254
|
+
.mb-citation {
|
|
255
|
+
display: inline-flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
justify-content: center;
|
|
258
|
+
box-sizing: border-box;
|
|
259
|
+
min-width: var(--mb-citation-height);
|
|
260
|
+
height: var(--mb-citation-height);
|
|
261
|
+
margin-inline: 2px;
|
|
262
|
+
padding-inline: var(--mb-citation-padding);
|
|
263
|
+
border-radius: var(--mb-radius-full);
|
|
264
|
+
background: var(--mb-fill-secondary);
|
|
265
|
+
color: var(--mb-label-secondary);
|
|
266
|
+
font: var(--mb-citation-font);
|
|
267
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
268
|
+
white-space: nowrap;
|
|
269
|
+
text-decoration: none;
|
|
270
|
+
/* Sits on the text's x-height rather than hanging below the baseline. */
|
|
271
|
+
vertical-align: 0.08em;
|
|
272
|
+
cursor: default;
|
|
273
|
+
-webkit-tap-highlight-color: transparent;
|
|
274
|
+
transition:
|
|
275
|
+
background-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
276
|
+
color var(--mb-duration-fast) var(--mb-ease-out);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.mb-citation + .mb-citation {
|
|
280
|
+
margin-inline-start: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.mb-citation:focus-visible {
|
|
284
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
285
|
+
outline-offset: 1px;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.mb-citation[data-open] {
|
|
289
|
+
background: var(--mb-fill);
|
|
290
|
+
color: var(--mb-label);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@media (hover: hover) and (pointer: fine) {
|
|
294
|
+
.mb-citation:hover {
|
|
295
|
+
background: var(--mb-fill);
|
|
296
|
+
color: var(--mb-label);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.mb-citation:active {
|
|
301
|
+
background: var(--mb-label-secondary);
|
|
302
|
+
color: var(--mb-bg);
|
|
303
|
+
transition-duration: 0ms;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.mb-citation-label {
|
|
307
|
+
max-width: 12em;
|
|
308
|
+
overflow: hidden;
|
|
309
|
+
text-overflow: ellipsis;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* ── Preview card ────────────────────────────────────────────── */
|
|
313
|
+
|
|
314
|
+
.mb-citation-card {
|
|
315
|
+
gap: var(--mb-space-2);
|
|
316
|
+
width: min(300px, var(--available-width, 100vw));
|
|
317
|
+
padding: var(--mb-space-5) var(--mb-space-6) var(--mb-space-6);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.mb-citation-card-site {
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
gap: var(--mb-space-3);
|
|
324
|
+
margin-block-end: var(--mb-space-1);
|
|
325
|
+
color: var(--mb-label-secondary);
|
|
326
|
+
font: var(--mb-text-subheadline);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.mb-citation-card-title {
|
|
330
|
+
color: var(--mb-label);
|
|
331
|
+
font: var(--mb-text-headline);
|
|
332
|
+
text-wrap: balance;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.mb-citation-card-description {
|
|
336
|
+
display: -webkit-box;
|
|
337
|
+
overflow: hidden;
|
|
338
|
+
color: var(--mb-label-secondary);
|
|
339
|
+
font: var(--mb-text-callout);
|
|
340
|
+
-webkit-box-orient: vertical;
|
|
341
|
+
-webkit-line-clamp: 3;
|
|
342
|
+
line-clamp: 3;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
@media (forced-colors: active) {
|
|
346
|
+
.mb-citation {
|
|
347
|
+
border: 1px solid LinkText;
|
|
348
|
+
}
|
|
349
|
+
}
|