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.
Files changed (310) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +92 -2
  3. package/dist/components/accessory-tile.d.ts +50 -0
  4. package/dist/components/accessory-tile.js +46 -0
  5. package/dist/components/activity-indicator.d.ts +15 -0
  6. package/dist/components/activity-indicator.js +15 -0
  7. package/dist/components/alert.d.ts +29 -0
  8. package/dist/components/alert.js +30 -0
  9. package/dist/components/artifact-card.d.ts +41 -0
  10. package/dist/components/artifact-card.js +57 -0
  11. package/dist/components/artwork.d.ts +44 -0
  12. package/dist/components/artwork.js +935 -0
  13. package/dist/components/attachment.d.ts +48 -0
  14. package/dist/components/attachment.js +65 -0
  15. package/dist/components/automation-row.d.ts +24 -0
  16. package/dist/components/automation-row.js +12 -0
  17. package/dist/components/avatar.d.ts +33 -0
  18. package/dist/components/avatar.js +45 -0
  19. package/dist/components/badge.d.ts +24 -0
  20. package/dist/components/badge.js +19 -0
  21. package/dist/components/button.d.ts +20 -0
  22. package/dist/components/button.js +10 -0
  23. package/dist/components/calendar.d.ts +30 -0
  24. package/dist/components/calendar.js +47 -0
  25. package/dist/components/camera-view.d.ts +40 -0
  26. package/dist/components/camera-view.js +44 -0
  27. package/dist/components/card.d.ts +14 -0
  28. package/dist/components/card.js +21 -0
  29. package/dist/components/carousel.d.ts +18 -0
  30. package/dist/components/carousel.js +33 -0
  31. package/dist/components/chat.d.ts +29 -0
  32. package/dist/components/chat.js +29 -0
  33. package/dist/components/checkbox.d.ts +13 -0
  34. package/dist/components/checkbox.js +16 -0
  35. package/dist/components/code-block.d.ts +39 -0
  36. package/dist/components/code-block.js +65 -0
  37. package/dist/components/code-field.d.ts +16 -0
  38. package/dist/components/code-field.js +29 -0
  39. package/dist/components/color-well.d.ts +23 -0
  40. package/dist/components/color-well.js +27 -0
  41. package/dist/components/combo-box.d.ts +42 -0
  42. package/dist/components/combo-box.js +102 -0
  43. package/dist/components/command-palette.d.ts +33 -0
  44. package/dist/components/command-palette.js +55 -0
  45. package/dist/components/confirmation.d.ts +24 -0
  46. package/dist/components/confirmation.js +50 -0
  47. package/dist/components/content-unavailable.d.ts +19 -0
  48. package/dist/components/content-unavailable.js +21 -0
  49. package/dist/components/context-menu.d.ts +9 -0
  50. package/dist/components/context-menu.js +15 -0
  51. package/dist/components/date-picker.d.ts +53 -0
  52. package/dist/components/date-picker.js +86 -0
  53. package/dist/components/description-list.d.ts +18 -0
  54. package/dist/components/description-list.js +17 -0
  55. package/dist/components/device-frame.d.ts +18 -0
  56. package/dist/components/device-frame.js +16 -0
  57. package/dist/components/dialog.d.ts +27 -0
  58. package/dist/components/dialog.js +35 -0
  59. package/dist/components/disclosure.d.ts +32 -0
  60. package/dist/components/disclosure.js +35 -0
  61. package/dist/components/dock.d.ts +28 -0
  62. package/dist/components/dock.js +80 -0
  63. package/dist/components/door-control.d.ts +20 -0
  64. package/dist/components/door-control.js +43 -0
  65. package/dist/components/energy-readout.d.ts +32 -0
  66. package/dist/components/energy-readout.js +27 -0
  67. package/dist/components/field.d.ts +28 -0
  68. package/dist/components/field.js +32 -0
  69. package/dist/components/gauge.d.ts +25 -0
  70. package/dist/components/gauge.js +42 -0
  71. package/dist/components/generated-image.d.ts +39 -0
  72. package/dist/components/generated-image.js +47 -0
  73. package/dist/components/glass.d.ts +34 -0
  74. package/dist/components/glass.js +31 -0
  75. package/dist/components/home-backdrop.d.ts +23 -0
  76. package/dist/components/home-backdrop.js +12 -0
  77. package/dist/components/home-section.d.ts +19 -0
  78. package/dist/components/home-section.js +21 -0
  79. package/dist/components/home-status.d.ts +24 -0
  80. package/dist/components/home-status.js +14 -0
  81. package/dist/components/hover-card.d.ts +14 -0
  82. package/dist/components/hover-card.js +16 -0
  83. package/dist/components/inspector.d.ts +29 -0
  84. package/dist/components/inspector.js +40 -0
  85. package/dist/components/level-control.d.ts +19 -0
  86. package/dist/components/level-control.js +13 -0
  87. package/dist/components/light-color-picker.d.ts +33 -0
  88. package/dist/components/light-color-picker.js +56 -0
  89. package/dist/components/list.d.ts +42 -0
  90. package/dist/components/list.js +42 -0
  91. package/dist/components/listbox.d.ts +16 -0
  92. package/dist/components/listbox.js +28 -0
  93. package/dist/components/lock-control.d.ts +20 -0
  94. package/dist/components/lock-control.js +35 -0
  95. package/dist/components/menu-bar.d.ts +14 -0
  96. package/dist/components/menu-bar.js +16 -0
  97. package/dist/components/menu.d.ts +40 -0
  98. package/dist/components/menu.js +54 -0
  99. package/dist/components/message.d.ts +65 -0
  100. package/dist/components/message.js +69 -0
  101. package/dist/components/model-picker.d.ts +61 -0
  102. package/dist/components/model-picker.js +59 -0
  103. package/dist/components/navigation-bar.d.ts +24 -0
  104. package/dist/components/navigation-bar.js +54 -0
  105. package/dist/components/outline.d.ts +21 -0
  106. package/dist/components/outline.js +40 -0
  107. package/dist/components/page-control.d.ts +10 -0
  108. package/dist/components/page-control.js +8 -0
  109. package/dist/components/plan.d.ts +25 -0
  110. package/dist/components/plan.js +43 -0
  111. package/dist/components/popover.d.ts +16 -0
  112. package/dist/components/popover.js +24 -0
  113. package/dist/components/progress.d.ts +27 -0
  114. package/dist/components/progress.js +27 -0
  115. package/dist/components/prompt-input.d.ts +93 -0
  116. package/dist/components/prompt-input.js +172 -0
  117. package/dist/components/radio.d.ts +16 -0
  118. package/dist/components/radio.js +13 -0
  119. package/dist/components/rating.d.ts +10 -0
  120. package/dist/components/rating.js +12 -0
  121. package/dist/components/reasoning.d.ts +28 -0
  122. package/dist/components/reasoning.js +52 -0
  123. package/dist/components/response.d.ts +14 -0
  124. package/dist/components/response.js +14 -0
  125. package/dist/components/scene-tile.d.ts +22 -0
  126. package/dist/components/scene-tile.js +13 -0
  127. package/dist/components/scroll-view.d.ts +21 -0
  128. package/dist/components/scroll-view.js +13 -0
  129. package/dist/components/search-field.d.ts +16 -0
  130. package/dist/components/search-field.js +12 -0
  131. package/dist/components/secure-field.d.ts +23 -0
  132. package/dist/components/secure-field.js +21 -0
  133. package/dist/components/segmented-control.d.ts +12 -0
  134. package/dist/components/segmented-control.js +10 -0
  135. package/dist/components/select.d.ts +45 -0
  136. package/dist/components/select.js +79 -0
  137. package/dist/components/sensor-readout.d.ts +29 -0
  138. package/dist/components/sensor-readout.js +12 -0
  139. package/dist/components/separator.d.ts +14 -0
  140. package/dist/components/separator.js +11 -0
  141. package/dist/components/setup-code.d.ts +29 -0
  142. package/dist/components/setup-code.js +47 -0
  143. package/dist/components/sheet.d.ts +31 -0
  144. package/dist/components/sheet.js +51 -0
  145. package/dist/components/shimmer.d.ts +18 -0
  146. package/dist/components/shimmer.js +17 -0
  147. package/dist/components/sidebar.d.ts +30 -0
  148. package/dist/components/sidebar.js +26 -0
  149. package/dist/components/slider.d.ts +27 -0
  150. package/dist/components/slider.js +43 -0
  151. package/dist/components/sources.d.ts +51 -0
  152. package/dist/components/sources.js +46 -0
  153. package/dist/components/split-view.d.ts +11 -0
  154. package/dist/components/split-view.js +13 -0
  155. package/dist/components/squircle.d.ts +41 -0
  156. package/dist/components/squircle.js +63 -0
  157. package/dist/components/stepper.d.ts +30 -0
  158. package/dist/components/stepper.js +28 -0
  159. package/dist/components/suggestion.d.ts +23 -0
  160. package/dist/components/suggestion.js +29 -0
  161. package/dist/components/switch.d.ts +10 -0
  162. package/dist/components/switch.js +10 -0
  163. package/dist/components/tab-bar.d.ts +20 -0
  164. package/dist/components/tab-bar.js +17 -0
  165. package/dist/components/table.d.ts +49 -0
  166. package/dist/components/table.js +179 -0
  167. package/dist/components/tabs.d.ts +16 -0
  168. package/dist/components/tabs.js +19 -0
  169. package/dist/components/text-area.d.ts +14 -0
  170. package/dist/components/text-area.js +9 -0
  171. package/dist/components/text-field.d.ts +26 -0
  172. package/dist/components/text-field.js +23 -0
  173. package/dist/components/thermostat-control.d.ts +30 -0
  174. package/dist/components/thermostat-control.js +139 -0
  175. package/dist/components/toast.d.ts +30 -0
  176. package/dist/components/toast.js +114 -0
  177. package/dist/components/toggle.d.ts +21 -0
  178. package/dist/components/toggle.js +19 -0
  179. package/dist/components/token-field.d.ts +31 -0
  180. package/dist/components/token-field.js +78 -0
  181. package/dist/components/tool-call.d.ts +48 -0
  182. package/dist/components/tool-call.js +77 -0
  183. package/dist/components/toolbar.d.ts +27 -0
  184. package/dist/components/toolbar.js +39 -0
  185. package/dist/components/tooltip.d.ts +11 -0
  186. package/dist/components/tooltip.js +18 -0
  187. package/dist/components/window.d.ts +56 -0
  188. package/dist/components/window.js +61 -0
  189. package/dist/index.d.ts +97 -0
  190. package/dist/index.js +98 -0
  191. package/dist/lib/agent-glyphs.d.ts +10 -0
  192. package/dist/lib/agent-glyphs.js +19 -0
  193. package/dist/lib/cx.d.ts +9 -0
  194. package/dist/lib/cx.js +14 -0
  195. package/dist/lib/derive.d.ts +53 -0
  196. package/dist/lib/derive.js +255 -0
  197. package/dist/lib/field-glyphs.d.ts +13 -0
  198. package/dist/lib/field-glyphs.js +28 -0
  199. package/dist/lib/menu-glyphs.d.ts +6 -0
  200. package/dist/lib/menu-glyphs.js +15 -0
  201. package/dist/lib/platform.d.ts +18 -0
  202. package/dist/lib/platform.js +17 -0
  203. package/dist/lib/squircle.d.ts +23 -0
  204. package/dist/lib/squircle.js +69 -0
  205. package/dist/lib/theme.d.ts +42 -0
  206. package/dist/lib/theme.js +62 -0
  207. package/dist/styles/base.css +115 -0
  208. package/dist/styles/components/accessory-tile.css +461 -0
  209. package/dist/styles/components/activity-indicator.css +63 -0
  210. package/dist/styles/components/alert.css +433 -0
  211. package/dist/styles/components/artifact-card.css +238 -0
  212. package/dist/styles/components/artwork.css +380 -0
  213. package/dist/styles/components/attachment.css +540 -0
  214. package/dist/styles/components/automation-row.css +52 -0
  215. package/dist/styles/components/avatar.css +230 -0
  216. package/dist/styles/components/badge.css +204 -0
  217. package/dist/styles/components/button.css +298 -0
  218. package/dist/styles/components/calendar.css +287 -0
  219. package/dist/styles/components/camera-view.css +239 -0
  220. package/dist/styles/components/card.css +100 -0
  221. package/dist/styles/components/carousel.css +210 -0
  222. package/dist/styles/components/chat.css +209 -0
  223. package/dist/styles/components/checkbox.css +212 -0
  224. package/dist/styles/components/code-block.css +162 -0
  225. package/dist/styles/components/code-field.css +163 -0
  226. package/dist/styles/components/color-well.css +452 -0
  227. package/dist/styles/components/combo-box.css +222 -0
  228. package/dist/styles/components/command-palette.css +379 -0
  229. package/dist/styles/components/confirmation.css +189 -0
  230. package/dist/styles/components/content-unavailable.css +105 -0
  231. package/dist/styles/components/context-menu.css +43 -0
  232. package/dist/styles/components/date-picker.css +356 -0
  233. package/dist/styles/components/description-list.css +92 -0
  234. package/dist/styles/components/device-frame.css +202 -0
  235. package/dist/styles/components/dialog.css +366 -0
  236. package/dist/styles/components/disclosure.css +197 -0
  237. package/dist/styles/components/dock.css +404 -0
  238. package/dist/styles/components/door-control.css +187 -0
  239. package/dist/styles/components/energy-readout.css +161 -0
  240. package/dist/styles/components/field.css +175 -0
  241. package/dist/styles/components/gauge.css +239 -0
  242. package/dist/styles/components/generated-image.css +248 -0
  243. package/dist/styles/components/glass.css +113 -0
  244. package/dist/styles/components/home-backdrop.css +81 -0
  245. package/dist/styles/components/home-section.css +100 -0
  246. package/dist/styles/components/home-status.css +215 -0
  247. package/dist/styles/components/hover-card.css +145 -0
  248. package/dist/styles/components/index.css +94 -0
  249. package/dist/styles/components/inspector.css +236 -0
  250. package/dist/styles/components/level-control.css +247 -0
  251. package/dist/styles/components/light-color-picker.css +94 -0
  252. package/dist/styles/components/list.css +411 -0
  253. package/dist/styles/components/listbox.css +168 -0
  254. package/dist/styles/components/lock-control.css +164 -0
  255. package/dist/styles/components/menu-bar.css +94 -0
  256. package/dist/styles/components/menu.css +454 -0
  257. package/dist/styles/components/message.css +236 -0
  258. package/dist/styles/components/model-picker.css +64 -0
  259. package/dist/styles/components/navigation-bar.css +249 -0
  260. package/dist/styles/components/outline.css +248 -0
  261. package/dist/styles/components/page-control.css +127 -0
  262. package/dist/styles/components/plan.css +212 -0
  263. package/dist/styles/components/popover.css +186 -0
  264. package/dist/styles/components/progress.css +228 -0
  265. package/dist/styles/components/prompt-input.css +503 -0
  266. package/dist/styles/components/radio.css +281 -0
  267. package/dist/styles/components/rating.css +122 -0
  268. package/dist/styles/components/reasoning.css +214 -0
  269. package/dist/styles/components/response.css +303 -0
  270. package/dist/styles/components/scene-tile.css +295 -0
  271. package/dist/styles/components/scroll-view.css +195 -0
  272. package/dist/styles/components/search-field.css +128 -0
  273. package/dist/styles/components/secure-field.css +189 -0
  274. package/dist/styles/components/segmented-control.css +183 -0
  275. package/dist/styles/components/select.css +290 -0
  276. package/dist/styles/components/sensor-readout.css +231 -0
  277. package/dist/styles/components/separator.css +62 -0
  278. package/dist/styles/components/setup-code.css +138 -0
  279. package/dist/styles/components/sheet.css +345 -0
  280. package/dist/styles/components/shimmer.css +60 -0
  281. package/dist/styles/components/sidebar.css +261 -0
  282. package/dist/styles/components/slider.css +208 -0
  283. package/dist/styles/components/sources.css +349 -0
  284. package/dist/styles/components/split-view.css +75 -0
  285. package/dist/styles/components/squircle.css +44 -0
  286. package/dist/styles/components/stepper.css +278 -0
  287. package/dist/styles/components/suggestion.css +203 -0
  288. package/dist/styles/components/switch.css +115 -0
  289. package/dist/styles/components/tab-bar.css +223 -0
  290. package/dist/styles/components/table.css +313 -0
  291. package/dist/styles/components/tabs.css +262 -0
  292. package/dist/styles/components/text-area.css +94 -0
  293. package/dist/styles/components/text-field.css +294 -0
  294. package/dist/styles/components/thermostat-control.css +214 -0
  295. package/dist/styles/components/toast.css +418 -0
  296. package/dist/styles/components/toggle.css +312 -0
  297. package/dist/styles/components/token-field.css +193 -0
  298. package/dist/styles/components/tool-call.css +391 -0
  299. package/dist/styles/components/toolbar.css +370 -0
  300. package/dist/styles/components/tooltip.css +69 -0
  301. package/dist/styles/components/window.css +428 -0
  302. package/dist/styles/index.css +17 -0
  303. package/dist/styles/materials.css +263 -0
  304. package/dist/styles/platforms.css +214 -0
  305. package/dist/styles/themes/ember.css +24 -0
  306. package/dist/styles/themes/graphite.css +16 -0
  307. package/dist/styles/themes/nebula.css +16 -0
  308. package/dist/styles/themes/system.css +28 -0
  309. package/dist/styles/tokens.css +299 -0
  310. package/package.json +82 -3
@@ -0,0 +1,433 @@
1
+ /* Alert — the system alert: a compact centered panel on macOS, the 270pt alert and action sheet on iOS. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-alert-width: 260px;
5
+ --mb-alert-radius: var(--mb-popup-radius);
6
+ --mb-alert-padding-block: 20px 16px;
7
+ --mb-alert-padding-inline: 16px;
8
+ --mb-alert-gap: 4px;
9
+ --mb-alert-title-font: 700 13px/16px var(--mb-font);
10
+ --mb-alert-message-font: 400 11px/14px var(--mb-font);
11
+ --mb-alert-enter-scale: 0.92;
12
+ /* macOS doesn't dim the window behind an alert; a light veil keeps the modality readable on the web. */
13
+ --mb-alert-scrim: color-mix(in oklch, var(--mb-scrim) 55%, transparent);
14
+ }
15
+
16
+ :where([data-platform="ios"], [data-platform="ipados"]) {
17
+ --mb-alert-width: 270px;
18
+ /* iOS alerts and action sheets round to 14pt, between the radius tokens. */
19
+ --mb-alert-radius: calc(14px * var(--mb-radius-scale));
20
+ --mb-alert-padding-block: 19px 20px;
21
+ --mb-alert-padding-inline: 16px;
22
+ --mb-alert-gap: 2px;
23
+ --mb-alert-title-font: 600 17px/22px var(--mb-font);
24
+ --mb-alert-message-font: 400 13px/18px var(--mb-font);
25
+ --mb-alert-enter-scale: 1.12;
26
+ --mb-alert-scrim: var(--mb-scrim);
27
+ }
28
+
29
+ .mb-alert-backdrop {
30
+ position: fixed;
31
+ inset: 0;
32
+ background: var(--mb-alert-scrim);
33
+ transition: opacity var(--mb-duration-base) var(--mb-ease-out);
34
+ }
35
+
36
+ .mb-alert-backdrop:is([data-starting-style], [data-ending-style]) {
37
+ opacity: 0;
38
+ }
39
+
40
+ .mb-alert-backdrop[data-ending-style] {
41
+ transition-duration: var(--mb-duration-fast);
42
+ }
43
+
44
+ .mb-alert {
45
+ position: fixed;
46
+ inset: 0;
47
+ display: flex;
48
+ flex-direction: column;
49
+ align-items: center;
50
+ gap: var(--mb-alert-gap);
51
+ width: min(var(--mb-alert-width), calc(100vw - 32px));
52
+ height: fit-content;
53
+ max-width: none;
54
+ max-height: calc(100dvh - 32px);
55
+ margin: auto;
56
+ padding: var(--mb-alert-padding-block);
57
+ padding-inline: var(--mb-alert-padding-inline);
58
+ overflow-y: auto;
59
+ overscroll-behavior: contain;
60
+ border: 0;
61
+ border-radius: var(--mb-alert-radius);
62
+ /* Denser than the thick material: an alert's message must read over any backdrop. Opaque under reduced transparency. */
63
+ background: color-mix(in oklch, var(--mb-material-thick), var(--mb-bg-elevated) 70%);
64
+ -webkit-backdrop-filter: var(--mb-material-filter);
65
+ backdrop-filter: var(--mb-material-filter);
66
+ box-shadow: var(--mb-glass-rim), var(--mb-shadow-window);
67
+ color: var(--mb-label);
68
+ text-align: center;
69
+ outline: none;
70
+ transition:
71
+ opacity var(--mb-duration-fast) var(--mb-ease-out),
72
+ scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
73
+ }
74
+
75
+ .mb-alert:is([data-starting-style], [data-ending-style]) {
76
+ opacity: 0;
77
+ }
78
+
79
+ .mb-alert[data-starting-style] {
80
+ scale: var(--mb-alert-enter-scale);
81
+ }
82
+
83
+ .mb-alert[data-ending-style] {
84
+ scale: 0.97;
85
+ transition-duration: var(--mb-duration-fast);
86
+ transition-timing-function: var(--mb-ease-out);
87
+ }
88
+
89
+ .mb-alert-icon {
90
+ display: grid;
91
+ place-items: center;
92
+ width: 64px;
93
+ height: 64px;
94
+ margin-block-end: 10px;
95
+ }
96
+
97
+ .mb-alert-icon > :where(img, svg) {
98
+ width: 100%;
99
+ height: 100%;
100
+ }
101
+
102
+ .mb-alert-title {
103
+ margin: 0;
104
+ font: var(--mb-alert-title-font);
105
+ letter-spacing: var(--mb-tracking-body);
106
+ text-wrap: balance;
107
+ }
108
+
109
+ .mb-alert-description {
110
+ margin: 0;
111
+ color: var(--mb-label);
112
+ font: var(--mb-alert-message-font);
113
+ letter-spacing: var(--mb-tracking-caption);
114
+ text-wrap: pretty;
115
+ }
116
+
117
+ /* Actions: side by side for two, stacked for one or three and more. */
118
+ .mb-alert-actions {
119
+ display: flex;
120
+ flex-direction: column;
121
+ align-self: stretch;
122
+ gap: 8px;
123
+ margin-block-start: 16px;
124
+ }
125
+
126
+ .mb-alert-actions:where(
127
+ [data-orientation="horizontal"],
128
+ [data-orientation="auto"]:has(> :nth-child(2):last-child)
129
+ ) {
130
+ flex-direction: row;
131
+ }
132
+
133
+ .mb-alert-actions:where(
134
+ [data-orientation="horizontal"],
135
+ [data-orientation="auto"]:has(> :nth-child(2):last-child)
136
+ )
137
+ > * {
138
+ flex: 1 1 0;
139
+ min-width: 0;
140
+ }
141
+
142
+ /* In a stack the cancel button sits at the bottom, wherever it is in the markup (and so in Tab order). */
143
+ .mb-alert-actions:where(
144
+ :not([data-orientation="horizontal"], [data-orientation="auto"]:has(> :nth-child(2):last-child))
145
+ )
146
+ > [data-variant="cancel"] {
147
+ order: 1;
148
+ }
149
+
150
+ .mb-alert-action {
151
+ --mb-alert-action-bg: var(--mb-bg-control);
152
+ --mb-alert-action-fg: var(--mb-label);
153
+
154
+ position: relative;
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: center;
158
+ height: var(--mb-control-height);
159
+ margin: 0;
160
+ padding: 0 var(--mb-control-padding-sm);
161
+ border: 0;
162
+ border-radius: var(--mb-control-radius);
163
+ background: var(--mb-alert-action-bg);
164
+ color: var(--mb-alert-action-fg);
165
+ font: var(--mb-control-font);
166
+ letter-spacing: var(--mb-tracking-body);
167
+ white-space: nowrap;
168
+ overflow: hidden;
169
+ text-overflow: ellipsis;
170
+ cursor: default;
171
+ user-select: none;
172
+ -webkit-user-select: none;
173
+ touch-action: manipulation;
174
+ box-shadow:
175
+ 0 0 0 var(--mb-hairline) var(--mb-control-border),
176
+ 0 0.5px 1.5px var(--mb-shadow-color);
177
+ transition:
178
+ background-color var(--mb-duration-fast) var(--mb-ease-out),
179
+ color var(--mb-duration-fast) var(--mb-ease-out);
180
+ }
181
+
182
+ .mb-alert-action[data-tone="destructive"] {
183
+ --mb-alert-action-fg: var(--mb-destructive-text);
184
+ }
185
+
186
+ .mb-alert-action[data-variant="primary"] {
187
+ --mb-alert-action-bg: var(--mb-accent);
188
+ --mb-alert-action-fg: var(--mb-on-accent);
189
+ font-weight: 600;
190
+ box-shadow:
191
+ inset 0 0.5px 0 rgb(255 255 255 / 0.28),
192
+ 0 0.5px 1.5px var(--mb-shadow-color);
193
+ }
194
+
195
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"] {
196
+ --mb-alert-action-bg: var(--mb-destructive);
197
+ --mb-alert-action-fg: var(--mb-on-destructive);
198
+ }
199
+
200
+ @media (hover: hover) and (pointer: fine) {
201
+ .mb-alert-action:hover {
202
+ --mb-alert-action-bg: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 5%);
203
+ }
204
+
205
+ .mb-alert-action[data-variant="primary"]:hover {
206
+ --mb-alert-action-bg: var(--mb-accent-hover);
207
+ }
208
+
209
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"]:hover {
210
+ --mb-alert-action-bg: oklch(from var(--mb-destructive) calc(l + 0.035) c h);
211
+ }
212
+ }
213
+
214
+ .mb-alert-action:active {
215
+ --mb-alert-action-bg: color-mix(in oklch, var(--mb-bg-control), var(--mb-ink) 12%);
216
+ transition-duration: 0ms;
217
+ }
218
+
219
+ .mb-alert-action[data-variant="primary"]:active {
220
+ --mb-alert-action-bg: var(--mb-accent-pressed);
221
+ }
222
+
223
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"]:active {
224
+ --mb-alert-action-bg: oklch(from var(--mb-destructive) calc(l - 0.06) c h);
225
+ }
226
+
227
+ .mb-alert-action:focus-visible {
228
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
229
+ outline-offset: var(--mb-focus-ring-offset);
230
+ }
231
+
232
+ .mb-alert-action[data-pending] {
233
+ opacity: 0.6;
234
+ cursor: progress;
235
+ }
236
+
237
+ /* iOS and iPadOS: full-bleed text buttons divided by hairlines. */
238
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
239
+ .mb-alert-icon {
240
+ display: none;
241
+ }
242
+
243
+ .mb-alert-actions {
244
+ gap: 0;
245
+ margin-block-start: 19px;
246
+ margin-inline: calc(-1 * var(--mb-alert-padding-inline));
247
+ margin-block-end: -20px;
248
+ }
249
+
250
+ .mb-alert-action {
251
+ --mb-alert-action-bg: transparent;
252
+ --mb-alert-action-fg: var(--mb-accent-text);
253
+
254
+ height: 44px;
255
+ padding-inline: 8px;
256
+ border-radius: 0;
257
+ border-block-start: var(--mb-hairline) solid var(--mb-separator-strong);
258
+ box-shadow: none;
259
+ font: 400 17px/22px var(--mb-font);
260
+ letter-spacing: var(--mb-tracking-body);
261
+ transition: background-color var(--mb-duration-base) var(--mb-ease-out);
262
+ }
263
+
264
+ .mb-alert-actions:where(
265
+ [data-orientation="horizontal"],
266
+ [data-orientation="auto"]:has(> :nth-child(2):last-child)
267
+ )
268
+ > * + * {
269
+ border-inline-start: var(--mb-hairline) solid var(--mb-separator-strong);
270
+ }
271
+
272
+ .mb-alert-action[data-variant="primary"] {
273
+ --mb-alert-action-bg: transparent;
274
+ --mb-alert-action-fg: var(--mb-accent-text);
275
+ font-weight: 600;
276
+ }
277
+
278
+ .mb-alert-action[data-tone="destructive"],
279
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"] {
280
+ --mb-alert-action-bg: transparent;
281
+ --mb-alert-action-fg: var(--mb-destructive-text);
282
+ }
283
+
284
+ /* An iPad with a pointer has hover; the Mac's bezel hover mustn't leak into text buttons. */
285
+ .mb-alert-action:hover,
286
+ .mb-alert-action[data-variant="primary"]:hover,
287
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"]:hover {
288
+ --mb-alert-action-bg: transparent;
289
+ }
290
+
291
+ .mb-alert-action:active,
292
+ .mb-alert-action[data-variant="primary"]:active,
293
+ .mb-alert-action[data-variant="primary"][data-tone="destructive"]:active {
294
+ --mb-alert-action-bg: var(--mb-fill-secondary);
295
+ }
296
+
297
+ .mb-alert-action:focus-visible {
298
+ outline-offset: -3px;
299
+ }
300
+ }
301
+
302
+ /* iOS action sheet: a card of choices docked to the bottom, with Cancel standing apart. */
303
+ @scope ([data-platform="ios"]) to (:scope [data-platform]) {
304
+ .mb-alert[data-variant="sheet"] {
305
+ inset: auto 0 calc(8px + env(safe-area-inset-bottom)) 0;
306
+ gap: 0;
307
+ width: min(calc(100vw - 16px), 420px);
308
+ max-height: calc(100dvh - 48px);
309
+ margin-block: 0;
310
+ padding: 0;
311
+ overflow: visible;
312
+ border-radius: 0;
313
+ background: none;
314
+ -webkit-backdrop-filter: none;
315
+ backdrop-filter: none;
316
+ box-shadow: none;
317
+ align-items: stretch;
318
+ transition:
319
+ opacity var(--mb-duration-fast) var(--mb-ease-out),
320
+ translate var(--mb-spring-sheet-duration) var(--mb-spring-sheet);
321
+ }
322
+
323
+ .mb-alert[data-variant="sheet"][data-starting-style] {
324
+ scale: none;
325
+ opacity: 1;
326
+ translate: 0 calc(100% + 16px);
327
+ }
328
+
329
+ .mb-alert[data-variant="sheet"][data-ending-style] {
330
+ scale: none;
331
+ opacity: 1;
332
+ translate: 0 calc(100% + 16px);
333
+ transition-duration: var(--mb-duration-base);
334
+ transition-timing-function: var(--mb-ease-in-out);
335
+ }
336
+
337
+ .mb-alert[data-variant="sheet"] > :is(.mb-alert-title, .mb-alert-description) {
338
+ padding-inline: 16px;
339
+ background: var(--mb-material-thick);
340
+ -webkit-backdrop-filter: var(--mb-material-filter);
341
+ backdrop-filter: var(--mb-material-filter);
342
+ color: var(--mb-label-secondary);
343
+ font: 400 13px/18px var(--mb-font);
344
+ }
345
+
346
+ .mb-alert[data-variant="sheet"] > .mb-alert-title {
347
+ padding-block-start: 14px;
348
+ border-start-start-radius: var(--mb-alert-radius);
349
+ border-start-end-radius: var(--mb-alert-radius);
350
+ font-weight: 600;
351
+ }
352
+
353
+ .mb-alert[data-variant="sheet"] > .mb-alert-title:not(:has(+ .mb-alert-description)) {
354
+ padding-block-end: 14px;
355
+ }
356
+
357
+ .mb-alert[data-variant="sheet"] > .mb-alert-description {
358
+ padding-block: 2px 14px;
359
+ }
360
+
361
+ .mb-alert[data-variant="sheet"] > .mb-alert-actions {
362
+ flex-direction: column;
363
+ margin: 0;
364
+ }
365
+
366
+ .mb-alert[data-variant="sheet"] .mb-alert-action {
367
+ flex: none;
368
+ height: 57px;
369
+ background-color: var(--mb-material-thick);
370
+ -webkit-backdrop-filter: var(--mb-material-filter);
371
+ backdrop-filter: var(--mb-material-filter);
372
+ border-inline-start: 0;
373
+ font: 400 20px/25px var(--mb-font);
374
+ letter-spacing: -0.02em;
375
+ }
376
+
377
+ .mb-alert[data-variant="sheet"] .mb-alert-action:active {
378
+ background-color: color-mix(in oklch, var(--mb-material-thick), var(--mb-ink) 10%);
379
+ }
380
+
381
+ .mb-alert[data-variant="sheet"] .mb-alert-action[data-variant="primary"] {
382
+ font-weight: 600;
383
+ }
384
+
385
+ .mb-alert[data-variant="sheet"] .mb-alert-action:nth-last-child(1 of :not([data-variant="cancel"])) {
386
+ border-end-start-radius: var(--mb-alert-radius);
387
+ border-end-end-radius: var(--mb-alert-radius);
388
+ }
389
+
390
+ .mb-alert[data-variant="sheet"] > .mb-alert-actions:first-child > :nth-child(1 of :not([data-variant="cancel"])) {
391
+ border-block-start: 0;
392
+ border-start-start-radius: var(--mb-alert-radius);
393
+ border-start-end-radius: var(--mb-alert-radius);
394
+ }
395
+
396
+ .mb-alert[data-variant="sheet"] .mb-alert-action[data-variant="cancel"] {
397
+ order: 1;
398
+ margin-block-start: 8px;
399
+ border-block-start: 0;
400
+ border-radius: var(--mb-alert-radius);
401
+ background-color: var(--mb-bg-elevated);
402
+ font-weight: 600;
403
+ }
404
+ }
405
+
406
+ @media (prefers-reduced-motion: reduce) {
407
+ :where(:root:not([data-motion="full"])) {
408
+ .mb-alert,
409
+ .mb-alert:is([data-starting-style], [data-ending-style]) {
410
+ scale: none;
411
+ translate: none;
412
+ }
413
+ }
414
+ }
415
+
416
+ /* Continuous corners: the panel, and the action sheet's cards. */
417
+ @supports (corner-shape: squircle) {
418
+ .mb-alert {
419
+ corner-shape: var(--mb-corner-shape);
420
+ border-radius: calc(var(--mb-alert-radius) * var(--mb-corner-factor));
421
+ }
422
+
423
+ @scope ([data-platform="ios"]) to (:scope [data-platform]) {
424
+ .mb-alert[data-variant="sheet"] {
425
+ --mb-alert-radius: calc(14px * var(--mb-radius-scale) * var(--mb-corner-factor));
426
+ }
427
+
428
+ .mb-alert[data-variant="sheet"] > .mb-alert-title,
429
+ .mb-alert[data-variant="sheet"] .mb-alert-action {
430
+ corner-shape: var(--mb-corner-shape);
431
+ }
432
+ }
433
+ }
@@ -0,0 +1,238 @@
1
+ /* Artifact card — a row for a file or document the assistant made: an icon tile, a title, a meta line. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-artifact-card-max-width: 420px;
5
+ --mb-artifact-card-padding: 10px;
6
+ --mb-artifact-card-gap: 10px;
7
+ --mb-artifact-card-radius: var(--mb-radius-lg);
8
+ --mb-artifact-card-icon-size: 36px;
9
+ --mb-artifact-card-icon-radius: 8px;
10
+ --mb-artifact-card-glyph-size: 18px;
11
+ --mb-artifact-card-title-font: 500 13px/16px var(--mb-font);
12
+ --mb-artifact-card-meta-font: 400 11px/14px var(--mb-font);
13
+ }
14
+
15
+ :where([data-platform="ios"], [data-platform="ipados"]) {
16
+ --mb-artifact-card-max-width: none;
17
+ --mb-artifact-card-padding: 12px;
18
+ --mb-artifact-card-gap: 12px;
19
+ --mb-artifact-card-radius: var(--mb-group-radius);
20
+ --mb-artifact-card-icon-size: 44px;
21
+ --mb-artifact-card-icon-radius: 10px;
22
+ --mb-artifact-card-glyph-size: 22px;
23
+ --mb-artifact-card-title-font: 600 15px/20px var(--mb-font);
24
+ --mb-artifact-card-meta-font: 400 13px/18px var(--mb-font);
25
+ }
26
+
27
+ .mb-artifact-card {
28
+ --mb-artifact-card-bg: var(--mb-fill-quaternary);
29
+
30
+ position: relative;
31
+ box-sizing: border-box;
32
+ display: grid;
33
+ grid-template-columns: auto minmax(0, 1fr) auto;
34
+ grid-template-rows: auto auto;
35
+ align-items: center;
36
+ column-gap: var(--mb-artifact-card-gap);
37
+ width: 100%;
38
+ max-width: var(--mb-artifact-card-max-width);
39
+ min-width: 0;
40
+ margin: 0;
41
+ padding: var(--mb-artifact-card-padding);
42
+ padding-inline-end: calc(var(--mb-artifact-card-padding) + var(--mb-space-2));
43
+ border: 0;
44
+ border-radius: var(--mb-artifact-card-radius);
45
+ background: var(--mb-artifact-card-bg);
46
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
47
+ color: var(--mb-label);
48
+ font: var(--mb-artifact-card-title-font);
49
+ letter-spacing: var(--mb-tracking-body);
50
+ text-align: start;
51
+ text-decoration: none;
52
+ -webkit-tap-highlight-color: transparent;
53
+ transition: background-color var(--mb-duration-fast) var(--mb-ease-out);
54
+ }
55
+
56
+ @supports (corner-shape: squircle) {
57
+ .mb-artifact-card,
58
+ .mb-artifact-card-icon,
59
+ .mb-artifact-card-title[data-interactive]::after {
60
+ corner-shape: var(--mb-corner-shape);
61
+ }
62
+
63
+ .mb-artifact-card {
64
+ border-radius: calc(var(--mb-artifact-card-radius) * var(--mb-corner-factor));
65
+ }
66
+
67
+ .mb-artifact-card-icon {
68
+ border-radius: calc(var(--mb-artifact-card-icon-radius) * var(--mb-corner-factor));
69
+ }
70
+ }
71
+
72
+ :is(a, button).mb-artifact-card {
73
+ cursor: default;
74
+ }
75
+
76
+ /* ── Icon tile ───────────────────────────────────────────────── */
77
+
78
+ .mb-artifact-card-icon {
79
+ --mb-artifact-card-tint: var(--mb-accent);
80
+
81
+ position: relative;
82
+ display: grid;
83
+ grid-row: 1 / span 2;
84
+ grid-column: 1;
85
+ place-items: center;
86
+ width: var(--mb-artifact-card-icon-size);
87
+ height: var(--mb-artifact-card-icon-size);
88
+ overflow: hidden;
89
+ border-radius: var(--mb-artifact-card-icon-radius);
90
+ background: var(--mb-artifact-card-tint);
91
+ color: white;
92
+ box-shadow: inset 0 0 0 var(--mb-hairline) rgb(0 0 0 / 0.08);
93
+ }
94
+
95
+ .mb-artifact-card-icon > * {
96
+ grid-area: 1 / 1;
97
+ }
98
+
99
+ .mb-artifact-card-glyph {
100
+ display: grid;
101
+ place-items: center;
102
+ place-self: stretch;
103
+ }
104
+
105
+ .mb-artifact-card-glyph > svg {
106
+ width: var(--mb-artifact-card-glyph-size);
107
+ height: var(--mb-artifact-card-glyph-size);
108
+ }
109
+
110
+ .mb-artifact-card-glyph > :where(img, .mb-artwork) {
111
+ width: 100%;
112
+ height: 100%;
113
+ object-fit: cover;
114
+ }
115
+
116
+ /* Generating: the tile veils and a ring turns over it. */
117
+ .mb-artifact-card-progress {
118
+ display: grid;
119
+ place-self: stretch;
120
+ place-items: center;
121
+ background: color-mix(in oklch, var(--mb-bg) 55%, transparent);
122
+ }
123
+
124
+ .mb-artifact-card-ring {
125
+ --mb-progress-track-color: var(--mb-fill);
126
+ }
127
+
128
+ .mb-artifact-card[data-state="generating"] .mb-artifact-card-glyph {
129
+ opacity: 0.7;
130
+ }
131
+
132
+ /* ── Text ────────────────────────────────────────────────────── */
133
+
134
+ .mb-artifact-card-title {
135
+ grid-row: 1;
136
+ grid-column: 2;
137
+ align-self: end;
138
+ min-width: 0;
139
+ overflow: hidden;
140
+ color: var(--mb-label);
141
+ font: var(--mb-artifact-card-title-font);
142
+ white-space: nowrap;
143
+ text-overflow: ellipsis;
144
+ text-decoration: none;
145
+ }
146
+
147
+ .mb-artifact-card-meta {
148
+ grid-row: 2;
149
+ grid-column: 2;
150
+ align-self: start;
151
+ min-width: 0;
152
+ margin-block-start: 1px;
153
+ overflow: hidden;
154
+ font: var(--mb-artifact-card-meta-font);
155
+ white-space: nowrap;
156
+ text-overflow: ellipsis;
157
+ }
158
+
159
+ .mb-artifact-card:not(:has(> .mb-artifact-card-meta)) > .mb-artifact-card-title {
160
+ grid-row: 1 / span 2;
161
+ align-self: center;
162
+ }
163
+
164
+ /* A title that's a link or button stretches its hit area over the whole card. */
165
+ :is(a, button).mb-artifact-card-title {
166
+ margin: 0;
167
+ padding: 0;
168
+ border: 0;
169
+ background: none;
170
+ text-align: start;
171
+ cursor: default;
172
+ }
173
+
174
+ :is(a, button).mb-artifact-card-title::after {
175
+ content: "";
176
+ position: absolute;
177
+ inset: 0;
178
+ border-radius: var(--mb-artifact-card-radius);
179
+ }
180
+
181
+ @supports (corner-shape: squircle) {
182
+ :is(a, button).mb-artifact-card-title::after {
183
+ border-radius: calc(var(--mb-artifact-card-radius) * var(--mb-corner-factor));
184
+ }
185
+ }
186
+
187
+ :is(a, button).mb-artifact-card-title:focus-visible {
188
+ outline: none;
189
+ }
190
+
191
+ :is(a, button).mb-artifact-card-title:focus-visible::after,
192
+ .mb-artifact-card[data-interactive]:focus-visible {
193
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
194
+ outline-offset: var(--mb-focus-ring-offset);
195
+ }
196
+
197
+ /* ── Actions ─────────────────────────────────────────────────── */
198
+
199
+ .mb-artifact-card-actions {
200
+ position: relative;
201
+ z-index: 1;
202
+ display: flex;
203
+ grid-row: 1 / span 2;
204
+ grid-column: 3;
205
+ align-items: center;
206
+ gap: var(--mb-space-1);
207
+ margin-inline-end: calc(var(--mb-space-2) * -1);
208
+ }
209
+
210
+ /* Quieter than the title: the card's own action is opening it. */
211
+ .mb-artifact-card-actions > .mb-artifact-card-action[data-variant] {
212
+ --mb-button-fg: var(--mb-label-secondary);
213
+ }
214
+
215
+ /* ── States ──────────────────────────────────────────────────── */
216
+
217
+ @media (hover: hover) and (pointer: fine) {
218
+ .mb-artifact-card[data-interactive]:hover,
219
+ .mb-artifact-card:has(> :is(a, button).mb-artifact-card-title:hover) {
220
+ --mb-artifact-card-bg: var(--mb-fill-tertiary);
221
+ }
222
+
223
+ .mb-artifact-card-actions > .mb-artifact-card-action[data-variant]:hover {
224
+ --mb-button-fg: var(--mb-label);
225
+ }
226
+ }
227
+
228
+ .mb-artifact-card[data-interactive]:active,
229
+ .mb-artifact-card:has(> :is(a, button).mb-artifact-card-title:active) {
230
+ --mb-artifact-card-bg: var(--mb-fill-secondary);
231
+ transition-duration: 0ms;
232
+ }
233
+
234
+ @media (forced-colors: active) {
235
+ .mb-artifact-card {
236
+ border: 1px solid CanvasText;
237
+ }
238
+ }