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,92 @@
|
|
|
1
|
+
/* Description list — label and value pairs, in a label column or stacked. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-description-list-font: var(--mb-text-body);
|
|
5
|
+
--mb-description-list-font-sm: var(--mb-text-callout);
|
|
6
|
+
--mb-description-list-mono-font: 400 12px/16px var(--mb-font-mono);
|
|
7
|
+
--mb-description-list-mono-font-sm: 400 11px/15px var(--mb-font-mono);
|
|
8
|
+
--mb-description-list-row-gap: 6px;
|
|
9
|
+
--mb-description-list-row-gap-sm: 4px;
|
|
10
|
+
--mb-description-list-column-gap: 16px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
14
|
+
--mb-description-list-font: var(--mb-text-body);
|
|
15
|
+
--mb-description-list-font-sm: var(--mb-text-subheadline);
|
|
16
|
+
--mb-description-list-mono-font: 400 15px/22px var(--mb-font-mono);
|
|
17
|
+
--mb-description-list-mono-font-sm: 400 13px/20px var(--mb-font-mono);
|
|
18
|
+
--mb-description-list-row-gap: 10px;
|
|
19
|
+
--mb-description-list-row-gap-sm: 8px;
|
|
20
|
+
--mb-description-list-column-gap: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mb-description-list {
|
|
24
|
+
/* The label column: as wide as the widest label, up to 40% of the list. Any track size works. */
|
|
25
|
+
--mb-description-list-term-width: fit-content(40%);
|
|
26
|
+
--mb-description-list-current-font: var(--mb-description-list-font);
|
|
27
|
+
--mb-description-list-current-mono: var(--mb-description-list-mono-font);
|
|
28
|
+
--mb-description-list-gap: var(--mb-description-list-row-gap);
|
|
29
|
+
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: var(--mb-description-list-term-width) minmax(0, 1fr);
|
|
32
|
+
column-gap: var(--mb-description-list-column-gap);
|
|
33
|
+
row-gap: var(--mb-description-list-gap);
|
|
34
|
+
min-width: 0;
|
|
35
|
+
margin: 0;
|
|
36
|
+
color: var(--mb-label);
|
|
37
|
+
font: var(--mb-description-list-current-font);
|
|
38
|
+
letter-spacing: var(--mb-tracking-body);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.mb-description-list[data-size="sm"] {
|
|
42
|
+
--mb-description-list-current-font: var(--mb-description-list-font-sm);
|
|
43
|
+
--mb-description-list-current-mono: var(--mb-description-list-mono-font-sm);
|
|
44
|
+
--mb-description-list-gap: var(--mb-description-list-row-gap-sm);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Each item spans both columns and shares them, so every label lines up with the others. */
|
|
48
|
+
.mb-description-item {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-column: 1 / -1;
|
|
51
|
+
grid-template-columns: subgrid;
|
|
52
|
+
align-items: baseline;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mb-description-term {
|
|
57
|
+
grid-column: 1;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
color: var(--mb-label-secondary);
|
|
60
|
+
overflow-wrap: break-word;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.mb-description-details {
|
|
64
|
+
grid-column: 2;
|
|
65
|
+
min-width: 0;
|
|
66
|
+
margin: 0;
|
|
67
|
+
color: var(--mb-label);
|
|
68
|
+
overflow-wrap: break-word;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mb-description-details[data-mono] {
|
|
72
|
+
font: var(--mb-description-list-current-mono);
|
|
73
|
+
/* Ids and hashes have no break points of their own. */
|
|
74
|
+
overflow-wrap: anywhere;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Stacked: one column, each label above its value. */
|
|
78
|
+
.mb-description-list[data-layout="stacked"] {
|
|
79
|
+
grid-template-columns: minmax(0, 1fr);
|
|
80
|
+
row-gap: calc(var(--mb-description-list-gap) * 2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mb-description-list[data-layout="stacked"] .mb-description-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: var(--mb-space-1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mb-description-list[data-layout="stacked"] .mb-description-term {
|
|
90
|
+
font: var(--mb-text-subheadline);
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
}
|
|
@@ -191,4 +191,12 @@
|
|
|
191
191
|
border-radius: calc(var(--mb-device-screen-radius) * var(--mb-corner-factor));
|
|
192
192
|
clip-path: none;
|
|
193
193
|
}
|
|
194
|
+
|
|
195
|
+
/* A backdrop filter isn't clipped to the screen's corner shape, so a bar's material at the top of the
|
|
196
|
+
screen takes the same corners itself. */
|
|
197
|
+
.mb-device-frame-screen .mb-navigation-bar::before {
|
|
198
|
+
corner-shape: var(--mb-corner-shape);
|
|
199
|
+
border-start-start-radius: calc(var(--mb-device-screen-radius) * var(--mb-corner-factor));
|
|
200
|
+
border-start-end-radius: calc(var(--mb-device-screen-radius) * var(--mb-corner-factor));
|
|
201
|
+
}
|
|
194
202
|
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/* Generated image — a large image on a dark stage, glass actions over it, and a strip of thumbnails. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-generated-image-max-width: 520px;
|
|
5
|
+
--mb-generated-image-radius: var(--mb-radius-xl);
|
|
6
|
+
--mb-generated-image-gap: 8px;
|
|
7
|
+
--mb-generated-image-thumbnail-size: 56px;
|
|
8
|
+
--mb-generated-image-thumbnail-radius: var(--mb-radius-md);
|
|
9
|
+
--mb-generated-image-actions-inset: 10px;
|
|
10
|
+
--mb-generated-image-status-font: var(--mb-text-body);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
14
|
+
--mb-generated-image-max-width: none;
|
|
15
|
+
--mb-generated-image-radius: var(--mb-radius-2xl);
|
|
16
|
+
--mb-generated-image-gap: 10px;
|
|
17
|
+
--mb-generated-image-thumbnail-size: 60px;
|
|
18
|
+
--mb-generated-image-thumbnail-radius: var(--mb-radius-lg);
|
|
19
|
+
--mb-generated-image-actions-inset: 12px;
|
|
20
|
+
--mb-generated-image-status-font: var(--mb-text-subheadline);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mb-generated-image {
|
|
24
|
+
--mb-generated-image-aspect: 1;
|
|
25
|
+
/* Opaque, so nothing behind the reply shows through the stage or the placeholder. */
|
|
26
|
+
--mb-generated-image-stage-bg: var(--mb-bg-secondary);
|
|
27
|
+
--mb-generated-image-strip-direction: column;
|
|
28
|
+
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-areas: "stage";
|
|
31
|
+
grid-template-columns: minmax(0, 1fr);
|
|
32
|
+
gap: var(--mb-generated-image-gap);
|
|
33
|
+
width: 100%;
|
|
34
|
+
max-width: var(--mb-generated-image-max-width);
|
|
35
|
+
min-width: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* With thumbnails: a strip on the trailing side on macOS, a row below on iOS. */
|
|
39
|
+
.mb-generated-image:has(> .mb-generated-image-thumbnails) {
|
|
40
|
+
grid-template-areas: "stage strip";
|
|
41
|
+
grid-template-columns: minmax(0, 1fr) var(--mb-generated-image-thumbnail-size);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
45
|
+
.mb-generated-image:has(> .mb-generated-image-thumbnails) {
|
|
46
|
+
--mb-generated-image-strip-direction: row;
|
|
47
|
+
grid-template-areas: "stage" "strip";
|
|
48
|
+
grid-template-columns: minmax(0, 1fr);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ── Stage ───────────────────────────────────────────────────── */
|
|
53
|
+
|
|
54
|
+
.mb-generated-image-stage {
|
|
55
|
+
position: relative;
|
|
56
|
+
display: grid;
|
|
57
|
+
grid-area: stage;
|
|
58
|
+
place-items: center;
|
|
59
|
+
aspect-ratio: var(--mb-generated-image-aspect);
|
|
60
|
+
min-width: 0;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
border-radius: var(--mb-generated-image-radius);
|
|
63
|
+
background: var(--mb-generated-image-stage-bg);
|
|
64
|
+
box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mb-generated-image-stage > * {
|
|
68
|
+
grid-area: 1 / 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mb-generated-image-stage > :where(img, video, svg, .mb-artwork) {
|
|
72
|
+
display: block;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: 100%;
|
|
75
|
+
object-fit: contain;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@supports (corner-shape: squircle) {
|
|
79
|
+
.mb-generated-image-stage,
|
|
80
|
+
.mb-generated-image-thumbnail {
|
|
81
|
+
corner-shape: var(--mb-corner-shape);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mb-generated-image-stage {
|
|
85
|
+
border-radius: calc(var(--mb-generated-image-radius) * var(--mb-corner-factor));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-generated-image-thumbnail {
|
|
89
|
+
border-radius: calc(var(--mb-generated-image-thumbnail-radius) * var(--mb-corner-factor));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Generating: a slow drift of the theme's colors, with the status in the middle. */
|
|
94
|
+
.mb-generated-image-placeholder {
|
|
95
|
+
display: grid;
|
|
96
|
+
place-self: stretch;
|
|
97
|
+
place-items: center;
|
|
98
|
+
background:
|
|
99
|
+
radial-gradient(60% 60% at 30% 35%, color-mix(in oklch, var(--mb-accent) 34%, transparent), transparent),
|
|
100
|
+
radial-gradient(55% 55% at 70% 65%, color-mix(in oklch, var(--mb-purple) 30%, transparent), transparent),
|
|
101
|
+
radial-gradient(50% 50% at 75% 25%, color-mix(in oklch, var(--mb-pink) 24%, transparent), transparent),
|
|
102
|
+
var(--mb-generated-image-stage-bg);
|
|
103
|
+
background-size: 180% 180%, 180% 180%, 180% 180%, 100% 100%;
|
|
104
|
+
animation: mb-generated-image-drift 9s var(--mb-ease-in-out) infinite alternate;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@keyframes mb-generated-image-drift {
|
|
108
|
+
0% {
|
|
109
|
+
background-position: 0% 0%, 100% 100%, 100% 0%, 0 0;
|
|
110
|
+
}
|
|
111
|
+
50% {
|
|
112
|
+
background-position: 60% 40%, 30% 60%, 40% 80%, 0 0;
|
|
113
|
+
}
|
|
114
|
+
100% {
|
|
115
|
+
background-position: 100% 100%, 0% 0%, 0% 60%, 0 0;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mb-generated-image-status {
|
|
120
|
+
font: var(--mb-generated-image-status-font);
|
|
121
|
+
letter-spacing: var(--mb-tracking-body);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
:where(:root:not([data-motion="full"])) {
|
|
126
|
+
.mb-generated-image-placeholder {
|
|
127
|
+
animation: none;
|
|
128
|
+
background-position: 30% 30%, 70% 70%, 60% 30%, 0 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ── Actions over the stage ─────────────────────────────────── */
|
|
134
|
+
|
|
135
|
+
.mb-generated-image-actions {
|
|
136
|
+
z-index: 1;
|
|
137
|
+
display: flex;
|
|
138
|
+
grid-area: stage;
|
|
139
|
+
align-self: end;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: var(--mb-space-4);
|
|
142
|
+
min-width: 0;
|
|
143
|
+
padding: var(--mb-generated-image-actions-inset);
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mb-generated-image-actions > * {
|
|
148
|
+
pointer-events: auto;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mb-generated-image-actions > :first-child {
|
|
152
|
+
margin-inline-end: auto;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mb-generated-image[data-state="generating"] > .mb-generated-image-actions {
|
|
156
|
+
visibility: hidden;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* ── Thumbnails ──────────────────────────────────────────────── */
|
|
160
|
+
|
|
161
|
+
.mb-generated-image-thumbnails {
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: var(--mb-generated-image-strip-direction);
|
|
164
|
+
grid-area: strip;
|
|
165
|
+
gap: var(--mb-generated-image-gap);
|
|
166
|
+
/* The strip never sets the stage's height: it scrolls inside it instead. */
|
|
167
|
+
height: 0;
|
|
168
|
+
min-height: 100%;
|
|
169
|
+
min-width: 0;
|
|
170
|
+
/* Room for the selection ring, which sits outside each thumbnail. */
|
|
171
|
+
margin: -4px;
|
|
172
|
+
padding: 4px;
|
|
173
|
+
overflow: auto;
|
|
174
|
+
overscroll-behavior: contain;
|
|
175
|
+
scrollbar-width: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
179
|
+
.mb-generated-image-thumbnails {
|
|
180
|
+
height: auto;
|
|
181
|
+
min-height: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.mb-generated-image-thumbnail {
|
|
186
|
+
position: relative;
|
|
187
|
+
box-sizing: border-box;
|
|
188
|
+
display: grid;
|
|
189
|
+
flex: none;
|
|
190
|
+
place-items: stretch;
|
|
191
|
+
width: var(--mb-generated-image-thumbnail-size);
|
|
192
|
+
height: var(--mb-generated-image-thumbnail-size);
|
|
193
|
+
margin: 0;
|
|
194
|
+
padding: 0;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
border: 0;
|
|
197
|
+
border-radius: var(--mb-generated-image-thumbnail-radius);
|
|
198
|
+
background: var(--mb-generated-image-stage-bg);
|
|
199
|
+
cursor: default;
|
|
200
|
+
-webkit-tap-highlight-color: transparent;
|
|
201
|
+
transition:
|
|
202
|
+
box-shadow var(--mb-duration-fast) var(--mb-ease-out),
|
|
203
|
+
filter var(--mb-duration-fast) var(--mb-ease-out);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.mb-generated-image-thumbnail > :where(img, svg, .mb-artwork) {
|
|
207
|
+
display: block;
|
|
208
|
+
width: 100%;
|
|
209
|
+
height: 100%;
|
|
210
|
+
object-fit: cover;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.mb-generated-image-thumbnail[data-checked] {
|
|
214
|
+
box-shadow:
|
|
215
|
+
0 0 0 2px var(--mb-bg),
|
|
216
|
+
0 0 0 4px var(--mb-accent);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mb-generated-image-thumbnail:focus-visible {
|
|
220
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
221
|
+
outline-offset: 4px;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.mb-generated-image-thumbnail[data-checked]:focus-visible {
|
|
225
|
+
outline-offset: 5px;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@media (hover: hover) and (pointer: fine) {
|
|
229
|
+
.mb-generated-image-thumbnail:not([data-checked]):hover {
|
|
230
|
+
filter: brightness(1.08);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mb-generated-image-thumbnail:active {
|
|
235
|
+
filter: brightness(0.85);
|
|
236
|
+
transition-duration: 0ms;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.mb-generated-image-thumbnail[data-disabled] {
|
|
240
|
+
opacity: 0.4;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@media (forced-colors: active) {
|
|
244
|
+
.mb-generated-image-thumbnail[data-checked] {
|
|
245
|
+
outline: 3px solid Highlight;
|
|
246
|
+
outline-offset: 2px;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
@import "./accessory-tile.css";
|
|
3
3
|
@import "./activity-indicator.css";
|
|
4
4
|
@import "./alert.css";
|
|
5
|
+
@import "./artifact-card.css";
|
|
5
6
|
@import "./artwork.css";
|
|
7
|
+
@import "./attachment.css";
|
|
6
8
|
@import "./automation-row.css";
|
|
7
9
|
@import "./avatar.css";
|
|
8
10
|
@import "./badge.css";
|
|
@@ -11,13 +13,18 @@
|
|
|
11
13
|
@import "./camera-view.css";
|
|
12
14
|
@import "./card.css";
|
|
13
15
|
@import "./carousel.css";
|
|
16
|
+
@import "./chat.css";
|
|
14
17
|
@import "./checkbox.css";
|
|
18
|
+
@import "./code-block.css";
|
|
15
19
|
@import "./code-field.css";
|
|
16
20
|
@import "./color-well.css";
|
|
17
21
|
@import "./combo-box.css";
|
|
18
22
|
@import "./command-palette.css";
|
|
23
|
+
@import "./confirmation.css";
|
|
24
|
+
@import "./content-unavailable.css";
|
|
19
25
|
@import "./context-menu.css";
|
|
20
26
|
@import "./date-picker.css";
|
|
27
|
+
@import "./description-list.css";
|
|
21
28
|
@import "./device-frame.css";
|
|
22
29
|
@import "./dialog.css";
|
|
23
30
|
@import "./disclosure.css";
|
|
@@ -26,11 +33,13 @@
|
|
|
26
33
|
@import "./energy-readout.css";
|
|
27
34
|
@import "./field.css";
|
|
28
35
|
@import "./gauge.css";
|
|
36
|
+
@import "./generated-image.css";
|
|
29
37
|
@import "./glass.css";
|
|
30
38
|
@import "./home-backdrop.css";
|
|
31
39
|
@import "./home-section.css";
|
|
32
40
|
@import "./home-status.css";
|
|
33
41
|
@import "./hover-card.css";
|
|
42
|
+
@import "./inspector.css";
|
|
34
43
|
@import "./level-control.css";
|
|
35
44
|
@import "./light-color-picker.css";
|
|
36
45
|
@import "./list.css";
|
|
@@ -38,13 +47,19 @@
|
|
|
38
47
|
@import "./lock-control.css";
|
|
39
48
|
@import "./menu-bar.css";
|
|
40
49
|
@import "./menu.css";
|
|
50
|
+
@import "./message.css";
|
|
51
|
+
@import "./model-picker.css";
|
|
41
52
|
@import "./navigation-bar.css";
|
|
42
53
|
@import "./outline.css";
|
|
43
54
|
@import "./page-control.css";
|
|
55
|
+
@import "./plan.css";
|
|
44
56
|
@import "./popover.css";
|
|
45
57
|
@import "./progress.css";
|
|
58
|
+
@import "./prompt-input.css";
|
|
46
59
|
@import "./radio.css";
|
|
47
60
|
@import "./rating.css";
|
|
61
|
+
@import "./reasoning.css";
|
|
62
|
+
@import "./response.css";
|
|
48
63
|
@import "./scene-tile.css";
|
|
49
64
|
@import "./scroll-view.css";
|
|
50
65
|
@import "./search-field.css";
|
|
@@ -55,11 +70,14 @@
|
|
|
55
70
|
@import "./separator.css";
|
|
56
71
|
@import "./setup-code.css";
|
|
57
72
|
@import "./sheet.css";
|
|
73
|
+
@import "./shimmer.css";
|
|
58
74
|
@import "./sidebar.css";
|
|
59
75
|
@import "./slider.css";
|
|
76
|
+
@import "./sources.css";
|
|
60
77
|
@import "./split-view.css";
|
|
61
78
|
@import "./squircle.css";
|
|
62
79
|
@import "./stepper.css";
|
|
80
|
+
@import "./suggestion.css";
|
|
63
81
|
@import "./switch.css";
|
|
64
82
|
@import "./tab-bar.css";
|
|
65
83
|
@import "./table.css";
|
|
@@ -70,6 +88,7 @@
|
|
|
70
88
|
@import "./toast.css";
|
|
71
89
|
@import "./toggle.css";
|
|
72
90
|
@import "./token-field.css";
|
|
91
|
+
@import "./tool-call.css";
|
|
73
92
|
@import "./toolbar.css";
|
|
74
93
|
@import "./tooltip.css";
|
|
75
94
|
@import "./window.css";
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/* Inspector — a trailing panel with details about the selected content, as SwiftUI's .inspector draws it. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-inspector-width: 264px;
|
|
5
|
+
--mb-inspector-padding: 16px;
|
|
6
|
+
--mb-inspector-header-height: 44px;
|
|
7
|
+
--mb-inspector-title-font: var(--mb-text-headline);
|
|
8
|
+
--mb-inspector-section-title-font: var(--mb-text-headline);
|
|
9
|
+
--mb-inspector-section-gap: var(--mb-space-4);
|
|
10
|
+
--mb-inspector-section-padding-block: 12px;
|
|
11
|
+
--mb-inspector-floating-inset: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where([data-platform="ipados"]) {
|
|
15
|
+
--mb-inspector-width: 320px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where([data-platform="ios"]) {
|
|
19
|
+
/* On iPhone the inspector is a sheet's content, so it takes the sheet's width. */
|
|
20
|
+
--mb-inspector-width: 100%;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
24
|
+
--mb-inspector-padding: 20px;
|
|
25
|
+
--mb-inspector-header-height: 56px;
|
|
26
|
+
--mb-inspector-title-font: var(--mb-text-title-3);
|
|
27
|
+
--mb-inspector-section-title-font: var(--mb-text-title-3);
|
|
28
|
+
--mb-inspector-section-gap: var(--mb-space-4);
|
|
29
|
+
--mb-inspector-section-padding-block: 16px;
|
|
30
|
+
--mb-inspector-floating-inset: 10px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mb-inspector {
|
|
34
|
+
--mb-inspector-bg: var(--mb-bg);
|
|
35
|
+
|
|
36
|
+
position: relative;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
width: var(--mb-inspector-width);
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
min-height: 0;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
background: var(--mb-inspector-bg);
|
|
45
|
+
color: var(--mb-label);
|
|
46
|
+
font: var(--mb-text-body);
|
|
47
|
+
letter-spacing: var(--mb-tracking-body);
|
|
48
|
+
text-align: start;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.mb-window > .mb-inspector[data-variant="edge"] {
|
|
52
|
+
box-shadow: inset var(--mb-hairline) 0 0 var(--mb-separator);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where([dir="rtl"]) .mb-window > .mb-inspector[data-variant="edge"] {
|
|
56
|
+
box-shadow: inset calc(-1 * var(--mb-hairline)) 0 0 var(--mb-separator);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Floating: a pane of material over the content, inset from the window's edges. */
|
|
60
|
+
.mb-inspector[data-variant="floating"] {
|
|
61
|
+
--mb-inspector-radius: calc(var(--mb-radius-xl) - var(--mb-inspector-floating-inset) / 2);
|
|
62
|
+
--mb-inspector-bg: var(--mb-material-regular);
|
|
63
|
+
border-radius: var(--mb-inspector-radius);
|
|
64
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
65
|
+
backdrop-filter: var(--mb-material-filter);
|
|
66
|
+
box-shadow:
|
|
67
|
+
var(--mb-glass-rim),
|
|
68
|
+
0 0 0 var(--mb-hairline) var(--mb-glass-border),
|
|
69
|
+
var(--mb-shadow-3);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@supports (corner-shape: squircle) {
|
|
73
|
+
.mb-inspector[data-variant="floating"] {
|
|
74
|
+
corner-shape: var(--mb-corner-shape);
|
|
75
|
+
border-radius: calc(var(--mb-inspector-radius) * var(--mb-corner-factor));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* Inside a Window. Edge: a third column beside the body, below the title bar, which runs over it
|
|
81
|
+
* as a unified toolbar does. Floating: the body keeps the full width and the pane sits over it.
|
|
82
|
+
* The extra attribute outweighs window.css, which places every non-sidebar child in column 2.
|
|
83
|
+
*/
|
|
84
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) {
|
|
85
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) {
|
|
89
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) > .mb-window-titlebar {
|
|
93
|
+
grid-column: 1 / -1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) > .mb-window-titlebar {
|
|
97
|
+
grid-column: 2 / -1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mb-window:has(> .mb-inspector) > .mb-window-body {
|
|
101
|
+
grid-row: 2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mb-window:has(> .mb-inspector[data-variant="edge"]) > .mb-window-body {
|
|
105
|
+
grid-column: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Floating: the body and the pane share the last column, the pane on top. */
|
|
109
|
+
.mb-window:has(> .mb-window-sidebar):has(> .mb-inspector[data-variant="edge"]) > .mb-window-body {
|
|
110
|
+
grid-column: 2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.mb-window:has(> .mb-inspector[data-variant="floating"]) > .mb-window-body {
|
|
114
|
+
grid-column: -2 / -1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mb-window:has(> .mb-inspector) > .mb-inspector[data-variant] {
|
|
118
|
+
grid-row: 2;
|
|
119
|
+
grid-column: -2 / -1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.mb-window > .mb-inspector[data-variant="floating"] {
|
|
123
|
+
z-index: 2;
|
|
124
|
+
justify-self: end;
|
|
125
|
+
margin: var(--mb-inspector-floating-inset);
|
|
126
|
+
margin-block-start: calc(var(--mb-inspector-floating-inset) / 2);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Header */
|
|
130
|
+
.mb-inspector-header {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex: none;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: var(--mb-space-4);
|
|
135
|
+
min-width: 0;
|
|
136
|
+
min-height: var(--mb-inspector-header-height);
|
|
137
|
+
padding-inline: var(--mb-inspector-padding) calc(var(--mb-inspector-padding) - var(--mb-space-3));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.mb-inspector-title {
|
|
141
|
+
flex: 1 1 auto;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
margin: 0;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
color: var(--mb-label);
|
|
146
|
+
font: var(--mb-inspector-title-font);
|
|
147
|
+
letter-spacing: var(--mb-tracking-title);
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mb-inspector-header > .mb-inspector-close {
|
|
153
|
+
margin-inline-start: auto;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Body */
|
|
157
|
+
.mb-inspector-body {
|
|
158
|
+
flex: 1 1 auto;
|
|
159
|
+
min-height: 0;
|
|
160
|
+
overflow-y: auto;
|
|
161
|
+
overscroll-behavior: contain;
|
|
162
|
+
padding-block-end: var(--mb-space-4);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.mb-inspector:not(:has(> .mb-inspector-header)) > .mb-inspector-body {
|
|
166
|
+
padding-block-start: var(--mb-space-2);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Sections: a title row, then their content, with a hairline between them. */
|
|
170
|
+
.mb-inspector-section {
|
|
171
|
+
position: relative;
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
gap: var(--mb-inspector-section-gap);
|
|
175
|
+
min-width: 0;
|
|
176
|
+
padding: var(--mb-inspector-section-padding-block) var(--mb-inspector-padding);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* The divider is inset to the content, as AppKit draws it between inspector sections. */
|
|
180
|
+
.mb-inspector-section + .mb-inspector-section::before {
|
|
181
|
+
content: "";
|
|
182
|
+
position: absolute;
|
|
183
|
+
inset-block-start: 0;
|
|
184
|
+
inset-inline: var(--mb-inspector-padding);
|
|
185
|
+
border-block-start: var(--mb-hairline) solid var(--mb-separator);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mb-inspector-section-header {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
gap: var(--mb-space-4);
|
|
192
|
+
min-width: 0;
|
|
193
|
+
min-height: var(--mb-control-height-sm);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.mb-inspector-section-title {
|
|
197
|
+
flex: 1 1 auto;
|
|
198
|
+
min-width: 0;
|
|
199
|
+
margin: 0;
|
|
200
|
+
color: var(--mb-label);
|
|
201
|
+
font: var(--mb-inspector-section-title-font);
|
|
202
|
+
letter-spacing: var(--mb-tracking-body);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mb-inspector-section-action {
|
|
206
|
+
display: flex;
|
|
207
|
+
flex: none;
|
|
208
|
+
align-items: center;
|
|
209
|
+
gap: var(--mb-space-2);
|
|
210
|
+
margin-inline-end: calc(-1 * var(--mb-space-3));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* Rows and plain buttons bleed into the padding, so their text lines up with the section title. */
|
|
214
|
+
.mb-inspector-section > .mb-attachments[data-layout="column"],
|
|
215
|
+
.mb-inspector-section > .mb-attachment[data-variant="row"] {
|
|
216
|
+
margin-inline: calc(-1 * var(--mb-attachment-row-padding));
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mb-inspector-section > .mb-button[data-variant="plain"] {
|
|
220
|
+
align-self: flex-start;
|
|
221
|
+
margin-inline-start: calc(-1 * var(--mb-button-padding));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Touch: the inspector is a sheet's content, so it drops its own fill and lets the sheet's show. */
|
|
225
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
226
|
+
/* Outside a window it's a sheet's content: the sheet already pads it. */
|
|
227
|
+
.mb-inspector[data-variant="edge"] {
|
|
228
|
+
--mb-inspector-bg: transparent;
|
|
229
|
+
--mb-inspector-padding: 0px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.mb-window > .mb-inspector[data-variant="edge"] {
|
|
233
|
+
--mb-inspector-bg: var(--mb-bg);
|
|
234
|
+
--mb-inspector-padding: 20px;
|
|
235
|
+
}
|
|
236
|
+
}
|