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