macbetter 0.0.0-stage → 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/LICENSE +201 -0
- package/README.md +92 -2
- package/dist/components/accessory-tile.d.ts +50 -0
- package/dist/components/accessory-tile.js +46 -0
- package/dist/components/activity-indicator.d.ts +15 -0
- package/dist/components/activity-indicator.js +15 -0
- package/dist/components/alert.d.ts +29 -0
- package/dist/components/alert.js +30 -0
- package/dist/components/artifact-card.d.ts +41 -0
- package/dist/components/artifact-card.js +57 -0
- package/dist/components/artwork.d.ts +44 -0
- package/dist/components/artwork.js +935 -0
- package/dist/components/attachment.d.ts +48 -0
- package/dist/components/attachment.js +65 -0
- package/dist/components/automation-row.d.ts +24 -0
- package/dist/components/automation-row.js +12 -0
- package/dist/components/avatar.d.ts +33 -0
- package/dist/components/avatar.js +45 -0
- package/dist/components/badge.d.ts +24 -0
- package/dist/components/badge.js +19 -0
- package/dist/components/button.d.ts +20 -0
- package/dist/components/button.js +10 -0
- package/dist/components/calendar.d.ts +30 -0
- package/dist/components/calendar.js +47 -0
- package/dist/components/camera-view.d.ts +40 -0
- package/dist/components/camera-view.js +44 -0
- package/dist/components/card.d.ts +14 -0
- package/dist/components/card.js +21 -0
- package/dist/components/carousel.d.ts +18 -0
- package/dist/components/carousel.js +33 -0
- package/dist/components/chat.d.ts +29 -0
- package/dist/components/chat.js +29 -0
- package/dist/components/checkbox.d.ts +13 -0
- package/dist/components/checkbox.js +16 -0
- package/dist/components/code-block.d.ts +39 -0
- package/dist/components/code-block.js +65 -0
- package/dist/components/code-field.d.ts +16 -0
- package/dist/components/code-field.js +29 -0
- package/dist/components/color-well.d.ts +23 -0
- package/dist/components/color-well.js +27 -0
- package/dist/components/combo-box.d.ts +42 -0
- package/dist/components/combo-box.js +102 -0
- package/dist/components/command-palette.d.ts +33 -0
- package/dist/components/command-palette.js +55 -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/context-menu.d.ts +9 -0
- package/dist/components/context-menu.js +15 -0
- package/dist/components/date-picker.d.ts +53 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/description-list.d.ts +18 -0
- package/dist/components/description-list.js +17 -0
- package/dist/components/device-frame.d.ts +18 -0
- package/dist/components/device-frame.js +16 -0
- package/dist/components/dialog.d.ts +27 -0
- package/dist/components/dialog.js +35 -0
- package/dist/components/disclosure.d.ts +32 -0
- package/dist/components/disclosure.js +35 -0
- package/dist/components/dock.d.ts +28 -0
- package/dist/components/dock.js +80 -0
- package/dist/components/door-control.d.ts +20 -0
- package/dist/components/door-control.js +43 -0
- package/dist/components/energy-readout.d.ts +32 -0
- package/dist/components/energy-readout.js +27 -0
- package/dist/components/field.d.ts +28 -0
- package/dist/components/field.js +32 -0
- package/dist/components/gauge.d.ts +25 -0
- package/dist/components/gauge.js +42 -0
- package/dist/components/generated-image.d.ts +39 -0
- package/dist/components/generated-image.js +47 -0
- package/dist/components/glass.d.ts +34 -0
- package/dist/components/glass.js +31 -0
- package/dist/components/home-backdrop.d.ts +23 -0
- package/dist/components/home-backdrop.js +12 -0
- package/dist/components/home-section.d.ts +19 -0
- package/dist/components/home-section.js +21 -0
- package/dist/components/home-status.d.ts +24 -0
- package/dist/components/home-status.js +14 -0
- package/dist/components/hover-card.d.ts +14 -0
- package/dist/components/hover-card.js +16 -0
- package/dist/components/inspector.d.ts +29 -0
- package/dist/components/inspector.js +40 -0
- package/dist/components/level-control.d.ts +19 -0
- package/dist/components/level-control.js +13 -0
- package/dist/components/light-color-picker.d.ts +33 -0
- package/dist/components/light-color-picker.js +56 -0
- package/dist/components/list.d.ts +42 -0
- package/dist/components/list.js +42 -0
- package/dist/components/listbox.d.ts +16 -0
- package/dist/components/listbox.js +28 -0
- package/dist/components/lock-control.d.ts +20 -0
- package/dist/components/lock-control.js +35 -0
- package/dist/components/menu-bar.d.ts +14 -0
- package/dist/components/menu-bar.js +16 -0
- package/dist/components/menu.d.ts +40 -0
- package/dist/components/menu.js +54 -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/navigation-bar.d.ts +24 -0
- package/dist/components/navigation-bar.js +54 -0
- package/dist/components/outline.d.ts +21 -0
- package/dist/components/outline.js +40 -0
- package/dist/components/page-control.d.ts +10 -0
- package/dist/components/page-control.js +8 -0
- package/dist/components/plan.d.ts +25 -0
- package/dist/components/plan.js +43 -0
- package/dist/components/popover.d.ts +16 -0
- package/dist/components/popover.js +24 -0
- package/dist/components/progress.d.ts +27 -0
- package/dist/components/progress.js +27 -0
- package/dist/components/prompt-input.d.ts +93 -0
- package/dist/components/prompt-input.js +172 -0
- package/dist/components/radio.d.ts +16 -0
- package/dist/components/radio.js +13 -0
- package/dist/components/rating.d.ts +10 -0
- package/dist/components/rating.js +12 -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/scene-tile.d.ts +22 -0
- package/dist/components/scene-tile.js +13 -0
- package/dist/components/scroll-view.d.ts +21 -0
- package/dist/components/scroll-view.js +13 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.js +12 -0
- package/dist/components/secure-field.d.ts +23 -0
- package/dist/components/secure-field.js +21 -0
- package/dist/components/segmented-control.d.ts +12 -0
- package/dist/components/segmented-control.js +10 -0
- package/dist/components/select.d.ts +45 -0
- package/dist/components/select.js +79 -0
- package/dist/components/sensor-readout.d.ts +29 -0
- package/dist/components/sensor-readout.js +12 -0
- package/dist/components/separator.d.ts +14 -0
- package/dist/components/separator.js +11 -0
- package/dist/components/setup-code.d.ts +29 -0
- package/dist/components/setup-code.js +47 -0
- package/dist/components/sheet.d.ts +31 -0
- package/dist/components/sheet.js +51 -0
- package/dist/components/shimmer.d.ts +18 -0
- package/dist/components/shimmer.js +17 -0
- package/dist/components/sidebar.d.ts +30 -0
- package/dist/components/sidebar.js +26 -0
- package/dist/components/slider.d.ts +27 -0
- package/dist/components/slider.js +43 -0
- package/dist/components/sources.d.ts +51 -0
- package/dist/components/sources.js +46 -0
- package/dist/components/split-view.d.ts +11 -0
- package/dist/components/split-view.js +13 -0
- package/dist/components/squircle.d.ts +41 -0
- package/dist/components/squircle.js +63 -0
- package/dist/components/stepper.d.ts +30 -0
- package/dist/components/stepper.js +28 -0
- package/dist/components/suggestion.d.ts +23 -0
- package/dist/components/suggestion.js +29 -0
- package/dist/components/switch.d.ts +10 -0
- package/dist/components/switch.js +10 -0
- package/dist/components/tab-bar.d.ts +20 -0
- package/dist/components/tab-bar.js +17 -0
- package/dist/components/table.d.ts +49 -0
- package/dist/components/table.js +179 -0
- package/dist/components/tabs.d.ts +16 -0
- package/dist/components/tabs.js +19 -0
- package/dist/components/text-area.d.ts +14 -0
- package/dist/components/text-area.js +9 -0
- package/dist/components/text-field.d.ts +26 -0
- package/dist/components/text-field.js +23 -0
- package/dist/components/thermostat-control.d.ts +30 -0
- package/dist/components/thermostat-control.js +139 -0
- package/dist/components/toast.d.ts +30 -0
- package/dist/components/toast.js +114 -0
- package/dist/components/toggle.d.ts +21 -0
- package/dist/components/toggle.js +19 -0
- package/dist/components/token-field.d.ts +31 -0
- package/dist/components/token-field.js +78 -0
- package/dist/components/tool-call.d.ts +48 -0
- package/dist/components/tool-call.js +77 -0
- package/dist/components/toolbar.d.ts +27 -0
- package/dist/components/toolbar.js +39 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +18 -0
- package/dist/components/window.d.ts +56 -0
- package/dist/components/window.js +61 -0
- package/dist/index.d.ts +97 -0
- package/dist/index.js +98 -0
- package/dist/lib/agent-glyphs.d.ts +10 -0
- package/dist/lib/agent-glyphs.js +19 -0
- package/dist/lib/cx.d.ts +9 -0
- package/dist/lib/cx.js +14 -0
- package/dist/lib/derive.d.ts +53 -0
- package/dist/lib/derive.js +255 -0
- package/dist/lib/field-glyphs.d.ts +13 -0
- package/dist/lib/field-glyphs.js +28 -0
- package/dist/lib/menu-glyphs.d.ts +6 -0
- package/dist/lib/menu-glyphs.js +15 -0
- package/dist/lib/platform.d.ts +18 -0
- package/dist/lib/platform.js +17 -0
- package/dist/lib/squircle.d.ts +23 -0
- package/dist/lib/squircle.js +69 -0
- package/dist/lib/theme.d.ts +42 -0
- package/dist/lib/theme.js +62 -0
- package/dist/styles/base.css +115 -0
- package/dist/styles/components/accessory-tile.css +461 -0
- package/dist/styles/components/activity-indicator.css +63 -0
- package/dist/styles/components/alert.css +433 -0
- package/dist/styles/components/artifact-card.css +238 -0
- package/dist/styles/components/artwork.css +380 -0
- package/dist/styles/components/attachment.css +540 -0
- package/dist/styles/components/automation-row.css +52 -0
- package/dist/styles/components/avatar.css +230 -0
- package/dist/styles/components/badge.css +204 -0
- package/dist/styles/components/button.css +298 -0
- package/dist/styles/components/calendar.css +287 -0
- package/dist/styles/components/camera-view.css +239 -0
- package/dist/styles/components/card.css +100 -0
- package/dist/styles/components/carousel.css +210 -0
- package/dist/styles/components/chat.css +209 -0
- package/dist/styles/components/checkbox.css +212 -0
- package/dist/styles/components/code-block.css +162 -0
- package/dist/styles/components/code-field.css +163 -0
- package/dist/styles/components/color-well.css +452 -0
- package/dist/styles/components/combo-box.css +222 -0
- package/dist/styles/components/command-palette.css +379 -0
- package/dist/styles/components/confirmation.css +189 -0
- package/dist/styles/components/content-unavailable.css +105 -0
- package/dist/styles/components/context-menu.css +43 -0
- package/dist/styles/components/date-picker.css +356 -0
- package/dist/styles/components/description-list.css +92 -0
- package/dist/styles/components/device-frame.css +202 -0
- package/dist/styles/components/dialog.css +366 -0
- package/dist/styles/components/disclosure.css +197 -0
- package/dist/styles/components/dock.css +404 -0
- package/dist/styles/components/door-control.css +187 -0
- package/dist/styles/components/energy-readout.css +161 -0
- package/dist/styles/components/field.css +175 -0
- package/dist/styles/components/gauge.css +239 -0
- package/dist/styles/components/generated-image.css +248 -0
- package/dist/styles/components/glass.css +113 -0
- package/dist/styles/components/home-backdrop.css +81 -0
- package/dist/styles/components/home-section.css +100 -0
- package/dist/styles/components/home-status.css +215 -0
- package/dist/styles/components/hover-card.css +145 -0
- package/dist/styles/components/index.css +94 -0
- package/dist/styles/components/inspector.css +236 -0
- package/dist/styles/components/level-control.css +247 -0
- package/dist/styles/components/light-color-picker.css +94 -0
- package/dist/styles/components/list.css +411 -0
- package/dist/styles/components/listbox.css +168 -0
- package/dist/styles/components/lock-control.css +164 -0
- package/dist/styles/components/menu-bar.css +94 -0
- package/dist/styles/components/menu.css +454 -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 +249 -0
- package/dist/styles/components/outline.css +248 -0
- package/dist/styles/components/page-control.css +127 -0
- package/dist/styles/components/plan.css +212 -0
- package/dist/styles/components/popover.css +186 -0
- package/dist/styles/components/progress.css +228 -0
- package/dist/styles/components/prompt-input.css +503 -0
- package/dist/styles/components/radio.css +281 -0
- package/dist/styles/components/rating.css +122 -0
- package/dist/styles/components/reasoning.css +214 -0
- package/dist/styles/components/response.css +303 -0
- package/dist/styles/components/scene-tile.css +295 -0
- package/dist/styles/components/scroll-view.css +195 -0
- package/dist/styles/components/search-field.css +128 -0
- package/dist/styles/components/secure-field.css +189 -0
- package/dist/styles/components/segmented-control.css +183 -0
- package/dist/styles/components/select.css +290 -0
- package/dist/styles/components/sensor-readout.css +231 -0
- package/dist/styles/components/separator.css +62 -0
- package/dist/styles/components/setup-code.css +138 -0
- package/dist/styles/components/sheet.css +345 -0
- package/dist/styles/components/shimmer.css +60 -0
- package/dist/styles/components/sidebar.css +261 -0
- package/dist/styles/components/slider.css +208 -0
- package/dist/styles/components/sources.css +349 -0
- package/dist/styles/components/split-view.css +75 -0
- package/dist/styles/components/squircle.css +44 -0
- package/dist/styles/components/stepper.css +278 -0
- package/dist/styles/components/suggestion.css +203 -0
- package/dist/styles/components/switch.css +115 -0
- package/dist/styles/components/tab-bar.css +223 -0
- package/dist/styles/components/table.css +313 -0
- package/dist/styles/components/tabs.css +262 -0
- package/dist/styles/components/text-area.css +94 -0
- package/dist/styles/components/text-field.css +294 -0
- package/dist/styles/components/thermostat-control.css +214 -0
- package/dist/styles/components/toast.css +418 -0
- package/dist/styles/components/toggle.css +312 -0
- package/dist/styles/components/token-field.css +193 -0
- package/dist/styles/components/tool-call.css +391 -0
- package/dist/styles/components/toolbar.css +370 -0
- package/dist/styles/components/tooltip.css +69 -0
- package/dist/styles/components/window.css +428 -0
- package/dist/styles/index.css +17 -0
- package/dist/styles/materials.css +263 -0
- package/dist/styles/platforms.css +214 -0
- package/dist/styles/themes/ember.css +24 -0
- package/dist/styles/themes/graphite.css +16 -0
- package/dist/styles/themes/nebula.css +16 -0
- package/dist/styles/themes/system.css +28 -0
- package/dist/styles/tokens.css +299 -0
- package/package.json +82 -3
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/* Message — one turn: the person's trailing bubble, the assistant's plain reply, and the actions under it. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-message-gap: 6px;
|
|
5
|
+
--mb-message-bubble-max-width: 75%;
|
|
6
|
+
--mb-message-bubble-font: 400 13px/18px var(--mb-font);
|
|
7
|
+
--mb-message-bubble-padding: 7px 12px;
|
|
8
|
+
--mb-message-bubble-radius: 16px;
|
|
9
|
+
--mb-message-action-size: 24px;
|
|
10
|
+
--mb-message-action-icon: 15px;
|
|
11
|
+
--mb-message-action-radius: var(--mb-radius-sm);
|
|
12
|
+
--mb-message-meta-font: var(--mb-text-subheadline);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
16
|
+
--mb-message-gap: 6px;
|
|
17
|
+
--mb-message-bubble-max-width: 75%;
|
|
18
|
+
--mb-message-bubble-font: 400 17px/22px var(--mb-font);
|
|
19
|
+
--mb-message-bubble-padding: 8px 14px;
|
|
20
|
+
--mb-message-bubble-radius: 18px;
|
|
21
|
+
--mb-message-action-size: 34px;
|
|
22
|
+
--mb-message-action-icon: 19px;
|
|
23
|
+
--mb-message-action-radius: var(--mb-radius-full);
|
|
24
|
+
--mb-message-meta-font: var(--mb-text-footnote);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mb-message {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: stretch;
|
|
31
|
+
gap: var(--mb-message-gap);
|
|
32
|
+
min-width: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mb-message[data-from="user"] {
|
|
37
|
+
align-items: flex-end;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mb-message-content {
|
|
41
|
+
min-width: 0;
|
|
42
|
+
color: var(--mb-label);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mb-message[data-from="user"] > .mb-message-content {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
align-items: flex-end;
|
|
49
|
+
gap: 2px;
|
|
50
|
+
max-width: var(--mb-message-bubble-max-width);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ── Bubble ──────────────────────────────────────────────────── */
|
|
54
|
+
|
|
55
|
+
.mb-message-bubble {
|
|
56
|
+
--mb-message-bubble-bg: var(--mb-accent);
|
|
57
|
+
--mb-message-bubble-fg: var(--mb-on-accent);
|
|
58
|
+
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
padding: var(--mb-message-bubble-padding);
|
|
62
|
+
border-radius: var(--mb-message-bubble-radius);
|
|
63
|
+
background: var(--mb-message-bubble-bg);
|
|
64
|
+
color: var(--mb-message-bubble-fg);
|
|
65
|
+
font: var(--mb-message-bubble-font);
|
|
66
|
+
letter-spacing: var(--mb-tracking-body);
|
|
67
|
+
white-space: pre-wrap;
|
|
68
|
+
overflow-wrap: anywhere;
|
|
69
|
+
text-align: start;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mb-message-bubble[data-variant="neutral"] {
|
|
73
|
+
--mb-message-bubble-bg: light-dark(
|
|
74
|
+
color-mix(in oklch, var(--mb-tint) 14%, var(--mb-bg)),
|
|
75
|
+
color-mix(in oklch, var(--mb-tint) 30%, var(--mb-bg))
|
|
76
|
+
);
|
|
77
|
+
--mb-message-bubble-fg: var(--mb-label);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mb-message-bubble :where(p) {
|
|
81
|
+
margin: 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mb-message-bubble :where(p + p) {
|
|
85
|
+
margin-block-start: 0.5em;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mb-message-bubble :where(a) {
|
|
89
|
+
color: inherit;
|
|
90
|
+
text-decoration: underline;
|
|
91
|
+
text-underline-offset: 2px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.mb-message-bubble ::selection {
|
|
95
|
+
background: color-mix(in oklch, var(--mb-message-bubble-fg) 28%, transparent);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (prefers-contrast: more) {
|
|
99
|
+
.mb-message-bubble[data-variant="neutral"] {
|
|
100
|
+
box-shadow: inset 0 0 0 1px var(--mb-control-border);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (forced-colors: active) {
|
|
105
|
+
.mb-message-bubble {
|
|
106
|
+
border: 1px solid CanvasText;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* ── Attachments and meta ────────────────────────────────────── */
|
|
111
|
+
|
|
112
|
+
.mb-message-attachments {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-wrap: wrap;
|
|
115
|
+
gap: 8px;
|
|
116
|
+
min-width: 0;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mb-message[data-from="user"] > .mb-message-attachments,
|
|
120
|
+
.mb-message[data-from="user"] > .mb-message-content > .mb-message-attachments {
|
|
121
|
+
justify-content: flex-end;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mb-message-meta {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
align-items: center;
|
|
128
|
+
gap: 6px;
|
|
129
|
+
color: var(--mb-label-secondary);
|
|
130
|
+
font: var(--mb-message-meta-font);
|
|
131
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
132
|
+
font-variant-numeric: tabular-nums;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.mb-message[data-from="user"] > .mb-message-meta {
|
|
136
|
+
justify-content: flex-end;
|
|
137
|
+
padding-inline-end: 4px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ── Actions ─────────────────────────────────────────────────── */
|
|
141
|
+
|
|
142
|
+
.mb-message-actions {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: 2px;
|
|
147
|
+
min-height: var(--mb-message-action-size);
|
|
148
|
+
/* Pulls the first glyph into line with the text above it. */
|
|
149
|
+
margin-inline-start: calc((var(--mb-message-action-size) - var(--mb-message-action-icon)) / -2);
|
|
150
|
+
transition: opacity var(--mb-duration-fast) var(--mb-ease-out);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.mb-message[data-from="user"] > .mb-message-actions {
|
|
154
|
+
margin-inline: 0 calc((var(--mb-message-action-size) - var(--mb-message-action-icon)) / -2);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.mb-message-action {
|
|
158
|
+
position: relative;
|
|
159
|
+
display: inline-flex;
|
|
160
|
+
flex: none;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
width: var(--mb-message-action-size);
|
|
164
|
+
height: var(--mb-message-action-size);
|
|
165
|
+
margin: 0;
|
|
166
|
+
padding: 0;
|
|
167
|
+
border: 0;
|
|
168
|
+
border-radius: var(--mb-message-action-radius);
|
|
169
|
+
background: transparent;
|
|
170
|
+
color: var(--mb-label-secondary);
|
|
171
|
+
cursor: default;
|
|
172
|
+
touch-action: manipulation;
|
|
173
|
+
transition:
|
|
174
|
+
background-color var(--mb-duration-fast) var(--mb-ease-out),
|
|
175
|
+
color var(--mb-duration-fast) var(--mb-ease-out);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.mb-message-action::after {
|
|
179
|
+
content: "";
|
|
180
|
+
position: absolute;
|
|
181
|
+
inset: 50% auto auto 50%;
|
|
182
|
+
width: max(100%, var(--mb-hit-target));
|
|
183
|
+
height: max(100%, var(--mb-hit-target));
|
|
184
|
+
translate: -50% -50%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.mb-message-action :where(svg) {
|
|
188
|
+
flex: none;
|
|
189
|
+
width: var(--mb-message-action-icon);
|
|
190
|
+
height: var(--mb-message-action-icon);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mb-message-action:focus-visible {
|
|
194
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
195
|
+
outline-offset: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@media (hover: hover) and (pointer: fine) {
|
|
199
|
+
.mb-message-action:hover {
|
|
200
|
+
background: var(--mb-fill-tertiary);
|
|
201
|
+
color: var(--mb-label);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Older turns keep their actions out of the way until you point at or move into them. */
|
|
205
|
+
.mb-message:not([data-latest], :nth-last-child(1 of .mb-message), :hover, :focus-within, :has([data-open]))
|
|
206
|
+
> .mb-message-actions {
|
|
207
|
+
opacity: 0;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.mb-message-action:active {
|
|
212
|
+
background: var(--mb-fill-secondary);
|
|
213
|
+
color: var(--mb-label);
|
|
214
|
+
transition-duration: 0ms;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.mb-message-action[data-pressed] {
|
|
218
|
+
background: var(--mb-accent-soft);
|
|
219
|
+
color: var(--mb-accent-text);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.mb-message-action[data-copied] {
|
|
223
|
+
color: var(--mb-label);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.mb-message-action:is([data-disabled], :disabled) {
|
|
227
|
+
opacity: 0.35;
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
|
|
232
|
+
.mb-message-action:active {
|
|
233
|
+
background: transparent;
|
|
234
|
+
opacity: 0.45;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* Model Picker — a plain pull-down showing the model and effort, opening a menu of both. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-model-picker-item-padding-block: 4px;
|
|
5
|
+
--mb-model-picker-description-font: 400 11px/14px var(--mb-font);
|
|
6
|
+
--mb-model-picker-content-width: 260px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
10
|
+
--mb-model-picker-item-padding-block: 10px;
|
|
11
|
+
--mb-model-picker-description-font: 400 15px/20px var(--mb-font);
|
|
12
|
+
--mb-model-picker-content-width: 300px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mb-model-picker {
|
|
16
|
+
gap: 4px;
|
|
17
|
+
padding-inline: 8px 6px;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mb-model-picker-name {
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mb-model-picker-dot,
|
|
27
|
+
.mb-model-picker-effort {
|
|
28
|
+
color: var(--mb-label-secondary);
|
|
29
|
+
font-weight: 400;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mb-model-picker-content {
|
|
33
|
+
width: max-content;
|
|
34
|
+
min-width: min(var(--mb-model-picker-content-width), calc(100vw - 16px));
|
|
35
|
+
max-width: min(340px, calc(100vw - 16px));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mb-model-picker-item {
|
|
39
|
+
padding-block: var(--mb-model-picker-item-padding-block);
|
|
40
|
+
white-space: normal;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mb-model-picker-item-text {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
gap: 1px;
|
|
47
|
+
min-width: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mb-model-picker-item-description {
|
|
51
|
+
color: var(--mb-label-secondary);
|
|
52
|
+
font: var(--mb-model-picker-description-font);
|
|
53
|
+
letter-spacing: var(--mb-tracking-caption);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* On macOS the highlight is a solid accent fill; the description goes with the label onto it. */
|
|
57
|
+
.mb-model-picker-item[data-highlighted] .mb-model-picker-item-description {
|
|
58
|
+
color: inherit;
|
|
59
|
+
opacity: 0.82;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mb-model-picker-item[data-disabled] .mb-model-picker-item-description {
|
|
63
|
+
color: inherit;
|
|
64
|
+
}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/* Navigation Bar — iOS's bar of back button, title and actions, with a large title that collapses on scroll. */
|
|
2
|
+
|
|
3
|
+
:where(:root, [data-platform="macos"]) {
|
|
4
|
+
--mb-navigation-bar-row: var(--mb-bar-height);
|
|
5
|
+
--mb-navigation-bar-title-font: 600 13px/16px var(--mb-font);
|
|
6
|
+
--mb-navigation-large-title-height: 50px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where([data-platform="ios"], [data-platform="ipados"]) {
|
|
10
|
+
/* 44pt on iPhone, 50pt on iPad (the platform's bar height). */
|
|
11
|
+
--mb-navigation-bar-row: var(--mb-bar-height);
|
|
12
|
+
--mb-navigation-bar-title-font: 600 17px/22px var(--mb-font);
|
|
13
|
+
--mb-navigation-large-title-height: 52px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.mb-navigation-stack {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: block;
|
|
19
|
+
height: 100%;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
overflow-x: clip;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
overscroll-behavior: contain;
|
|
24
|
+
padding-bottom: var(--mb-content-inset-bottom, var(--mb-safe-bottom, 0px));
|
|
25
|
+
background: var(--mb-bg);
|
|
26
|
+
scroll-timeline: --mb-navigation block;
|
|
27
|
+
scrollbar-width: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Sticky content (a plain list's section headers) pins below the bar, not under it. */
|
|
31
|
+
.mb-navigation-stack:has(> .mb-navigation-bar) {
|
|
32
|
+
--mb-content-inset-top: calc(var(--mb-safe-top, 0px) + var(--mb-navigation-bar-row));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mb-navigation-stack::-webkit-scrollbar {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* The bar */
|
|
40
|
+
.mb-navigation-bar {
|
|
41
|
+
position: sticky;
|
|
42
|
+
z-index: var(--mb-z-chrome);
|
|
43
|
+
top: 0;
|
|
44
|
+
isolation: isolate;
|
|
45
|
+
display: grid;
|
|
46
|
+
/* The sides keep room for their buttons; the title takes what is left and truncates. */
|
|
47
|
+
grid-template-columns: minmax(min-content, 1fr) minmax(0, auto) minmax(min-content, 1fr);
|
|
48
|
+
align-items: center;
|
|
49
|
+
column-gap: var(--mb-space-4);
|
|
50
|
+
height: calc(var(--mb-safe-top, 0px) + var(--mb-navigation-bar-row));
|
|
51
|
+
padding-top: var(--mb-safe-top, 0px);
|
|
52
|
+
padding-inline: max(var(--mb-space-4), var(--mb-safe-left, 0px)) max(var(--mb-space-4), var(--mb-safe-right, 0px));
|
|
53
|
+
color: var(--mb-label);
|
|
54
|
+
user-select: none;
|
|
55
|
+
-webkit-user-select: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* The chrome only appears once content scrolls under it, as on iOS. */
|
|
59
|
+
.mb-navigation-bar::before {
|
|
60
|
+
content: "";
|
|
61
|
+
position: absolute;
|
|
62
|
+
z-index: -1;
|
|
63
|
+
inset: 0;
|
|
64
|
+
background: var(--mb-material-chrome);
|
|
65
|
+
-webkit-backdrop-filter: var(--mb-material-filter);
|
|
66
|
+
backdrop-filter: var(--mb-material-filter);
|
|
67
|
+
box-shadow: inset 0 calc(-1 * var(--mb-hairline)) 0 var(--mb-separator);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
animation: mb-navigation-reveal linear both;
|
|
70
|
+
animation-timeline: --mb-navigation;
|
|
71
|
+
animation-range: 0px 10px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mb-navigation-bar[data-large-title]::before {
|
|
75
|
+
animation-range: calc(var(--mb-navigation-large-title-height) - 16px) var(--mb-navigation-large-title-height);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.mb-navigation-bar-title {
|
|
79
|
+
grid-row: 1;
|
|
80
|
+
grid-column: 2;
|
|
81
|
+
min-width: 0;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
margin: 0;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
clip-path: var(--mb-navigation-bar-title-clip, none);
|
|
86
|
+
font: var(--mb-navigation-bar-title-font);
|
|
87
|
+
letter-spacing: var(--mb-tracking-body);
|
|
88
|
+
text-align: center;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
text-overflow: ellipsis;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mb-navigation-bar-title[data-large-title] {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
animation: mb-navigation-reveal linear both;
|
|
96
|
+
animation-timeline: --mb-navigation;
|
|
97
|
+
animation-range: calc(var(--mb-navigation-large-title-height) - 22px) calc(var(--mb-navigation-large-title-height) - 4px);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mb-navigation-bar-leading,
|
|
101
|
+
.mb-navigation-bar-back {
|
|
102
|
+
grid-row: 1;
|
|
103
|
+
grid-column: 1;
|
|
104
|
+
justify-self: start;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.mb-navigation-bar-leading,
|
|
108
|
+
.mb-navigation-bar-trailing {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: var(--mb-space-2);
|
|
112
|
+
min-width: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mb-navigation-bar-trailing {
|
|
116
|
+
grid-row: 1;
|
|
117
|
+
grid-column: 3;
|
|
118
|
+
justify-self: end;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Large title: it scrolls under the bar and is cut off at the bar's bottom edge, as UIKit's is. */
|
|
122
|
+
.mb-navigation-bar-large-title {
|
|
123
|
+
box-sizing: border-box;
|
|
124
|
+
height: var(--mb-navigation-large-title-height);
|
|
125
|
+
margin: 0;
|
|
126
|
+
padding: 3px var(--mb-content-padding) 8px;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
font: var(--mb-text-large-title);
|
|
129
|
+
letter-spacing: var(--mb-tracking-large-title);
|
|
130
|
+
color: var(--mb-label);
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
animation: mb-navigation-collapse linear both;
|
|
134
|
+
animation-timeline: --mb-navigation;
|
|
135
|
+
animation-range: 0px var(--mb-navigation-large-title-height);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Back button */
|
|
139
|
+
.mb-navigation-bar-back {
|
|
140
|
+
position: relative;
|
|
141
|
+
display: inline-flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
gap: 5px;
|
|
144
|
+
min-width: 0;
|
|
145
|
+
max-width: 100%;
|
|
146
|
+
height: var(--mb-navigation-bar-row);
|
|
147
|
+
margin: 0;
|
|
148
|
+
margin-inline-start: -2px;
|
|
149
|
+
padding: 0 var(--mb-space-2) 0 0;
|
|
150
|
+
border: 0;
|
|
151
|
+
border-radius: var(--mb-radius-sm);
|
|
152
|
+
background: transparent;
|
|
153
|
+
color: var(--mb-accent-text);
|
|
154
|
+
font: var(--mb-text-body);
|
|
155
|
+
letter-spacing: var(--mb-tracking-body);
|
|
156
|
+
cursor: default;
|
|
157
|
+
touch-action: manipulation;
|
|
158
|
+
transition: opacity var(--mb-duration-fast) var(--mb-ease-out);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.mb-navigation-bar-back-chevron {
|
|
162
|
+
flex: none;
|
|
163
|
+
width: 12px;
|
|
164
|
+
height: 21px;
|
|
165
|
+
fill: none;
|
|
166
|
+
stroke: currentColor;
|
|
167
|
+
stroke-width: 2.6;
|
|
168
|
+
stroke-linecap: round;
|
|
169
|
+
stroke-linejoin: round;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
:where([dir="rtl"]) .mb-navigation-bar-back-chevron {
|
|
173
|
+
scale: -1 1;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mb-navigation-bar-back-label {
|
|
177
|
+
overflow: hidden;
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
text-overflow: ellipsis;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mb-navigation-bar-back-label:empty {
|
|
183
|
+
display: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.mb-navigation-bar-back:active {
|
|
187
|
+
opacity: 0.35;
|
|
188
|
+
transition-duration: 0ms;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@media (hover: hover) and (pointer: fine) {
|
|
192
|
+
.mb-navigation-bar-back:hover {
|
|
193
|
+
opacity: 0.7;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mb-navigation-bar-back:focus-visible {
|
|
198
|
+
outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
|
|
199
|
+
outline-offset: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@scope ([data-platform="macos"]) to (:scope [data-platform]) {
|
|
203
|
+
.mb-navigation-bar-back-chevron {
|
|
204
|
+
width: 9px;
|
|
205
|
+
height: 15px;
|
|
206
|
+
stroke-width: 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.mb-navigation-bar-large-title {
|
|
210
|
+
padding-top: 6px;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@keyframes mb-navigation-collapse {
|
|
215
|
+
from {
|
|
216
|
+
clip-path: inset(0 0 0 0);
|
|
217
|
+
}
|
|
218
|
+
to {
|
|
219
|
+
clip-path: inset(100% 0 0 0);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@keyframes mb-navigation-reveal {
|
|
224
|
+
from {
|
|
225
|
+
opacity: 0;
|
|
226
|
+
}
|
|
227
|
+
to {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Without scroll-driven animations, NavigationStack sets [data-scrolled] from a scroll listener. */
|
|
233
|
+
@supports not (animation-timeline: scroll()) {
|
|
234
|
+
.mb-navigation-stack[data-scrolled] {
|
|
235
|
+
--mb-navigation-progress: 1;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.mb-navigation-bar-large-title {
|
|
239
|
+
animation: none;
|
|
240
|
+
clip-path: inset(min(var(--mb-navigation-offset, 0px), 100%) 0 0 0);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.mb-navigation-bar::before,
|
|
244
|
+
.mb-navigation-bar-title[data-large-title] {
|
|
245
|
+
animation: none;
|
|
246
|
+
opacity: var(--mb-navigation-progress, 0);
|
|
247
|
+
transition: opacity var(--mb-duration-base) var(--mb-ease-out);
|
|
248
|
+
}
|
|
249
|
+
}
|