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,540 @@
1
+ /* Attachment — a file or image as a chip, a tile, a thumbnail or a row, with upload and error states. */
2
+
3
+ :where(:root, [data-platform="macos"]) {
4
+ --mb-attachment-chip-height: 40px;
5
+ --mb-attachment-chip-preview: 28px;
6
+ --mb-attachment-chip-max-width: 240px;
7
+ --mb-attachment-row-preview: 32px;
8
+ --mb-attachment-row-padding: 6px;
9
+ --mb-attachment-tile-width: 136px;
10
+ --mb-attachment-tile-preview-height: 84px;
11
+ --mb-attachment-thumbnail-size: 64px;
12
+ --mb-attachment-radius: var(--mb-radius-md);
13
+ --mb-attachment-preview-radius: var(--mb-radius-xs);
14
+ --mb-attachment-name-font: 500 12px/15px var(--mb-font);
15
+ --mb-attachment-meta-font: 400 11px/14px var(--mb-font);
16
+ --mb-attachment-remove-size: 18px;
17
+ --mb-attachment-gap: var(--mb-space-4);
18
+ }
19
+
20
+ :where([data-platform="ios"], [data-platform="ipados"]) {
21
+ --mb-attachment-chip-height: 52px;
22
+ --mb-attachment-chip-preview: 36px;
23
+ --mb-attachment-chip-max-width: 260px;
24
+ --mb-attachment-row-preview: 40px;
25
+ --mb-attachment-row-padding: 8px;
26
+ --mb-attachment-tile-width: 156px;
27
+ --mb-attachment-tile-preview-height: 100px;
28
+ --mb-attachment-thumbnail-size: 80px;
29
+ --mb-attachment-radius: var(--mb-radius-lg);
30
+ --mb-attachment-preview-radius: var(--mb-radius-sm);
31
+ --mb-attachment-name-font: 500 15px/20px var(--mb-font);
32
+ --mb-attachment-meta-font: 400 13px/18px var(--mb-font);
33
+ --mb-attachment-remove-size: 24px;
34
+ --mb-attachment-gap: var(--mb-space-5);
35
+ }
36
+
37
+ /* The list */
38
+ .mb-attachments {
39
+ display: flex;
40
+ flex-wrap: wrap;
41
+ gap: var(--mb-attachment-gap);
42
+ min-width: 0;
43
+ margin: 0;
44
+ padding: 0;
45
+ list-style: none;
46
+ }
47
+
48
+ .mb-attachments[data-layout="scroll"] {
49
+ flex-wrap: nowrap;
50
+ overflow-x: auto;
51
+ overscroll-behavior-x: contain;
52
+ scrollbar-width: none;
53
+ /* Room for the corner remove buttons, which sit just outside a tile. */
54
+ padding-block: var(--mb-space-3);
55
+ padding-inline: var(--mb-space-1);
56
+ }
57
+
58
+ .mb-attachments[data-layout="column"] {
59
+ flex-direction: column;
60
+ flex-wrap: nowrap;
61
+ gap: 0;
62
+ }
63
+
64
+ .mb-attachments-item {
65
+ display: flex;
66
+ flex: none;
67
+ min-width: 0;
68
+ }
69
+
70
+ .mb-attachments[data-layout="column"] > .mb-attachments-item > .mb-attachment {
71
+ flex: 1 1 auto;
72
+ }
73
+
74
+ /* One attachment */
75
+ .mb-attachment {
76
+ --mb-attachment-bg: var(--mb-fill-quaternary);
77
+ --mb-attachment-edge: var(--mb-separator);
78
+ --mb-attachment-preview-size: var(--mb-attachment-chip-preview);
79
+ --mb-attachment-tint: var(--mb-accent-text);
80
+
81
+ position: relative;
82
+ box-sizing: border-box;
83
+ display: inline-grid;
84
+ grid-template-columns: auto minmax(0, 1fr) auto;
85
+ grid-template-rows: auto auto;
86
+ align-items: center;
87
+ column-gap: var(--mb-space-4);
88
+ min-width: 0;
89
+ margin: 0;
90
+ border: 0;
91
+ border-radius: var(--mb-attachment-radius);
92
+ background: var(--mb-attachment-bg);
93
+ color: var(--mb-label);
94
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-attachment-edge);
95
+ font: var(--mb-attachment-name-font);
96
+ letter-spacing: var(--mb-tracking-caption);
97
+ text-align: start;
98
+ text-decoration: none;
99
+ -webkit-tap-highlight-color: transparent;
100
+ transition: background-color var(--mb-duration-fast) var(--mb-ease-out);
101
+ }
102
+
103
+ @supports (corner-shape: squircle) {
104
+ .mb-attachment,
105
+ .mb-attachment-preview {
106
+ corner-shape: var(--mb-corner-shape);
107
+ }
108
+
109
+ .mb-attachment {
110
+ border-radius: calc(var(--mb-attachment-radius) * var(--mb-corner-factor));
111
+ }
112
+
113
+ .mb-attachment-preview {
114
+ border-radius: calc(var(--mb-attachment-preview-radius) * var(--mb-corner-factor));
115
+ }
116
+ }
117
+
118
+ .mb-attachment[data-variant="chip"] {
119
+ min-height: var(--mb-attachment-chip-height);
120
+ max-width: var(--mb-attachment-chip-max-width);
121
+ padding: var(--mb-space-3);
122
+ padding-inline-end: var(--mb-space-5);
123
+ }
124
+
125
+ .mb-attachment[data-variant="chip"]:has(> .mb-attachment-remove) {
126
+ padding-inline-end: var(--mb-space-3);
127
+ }
128
+
129
+ .mb-attachment[data-variant="row"] {
130
+ --mb-attachment-bg: transparent;
131
+ --mb-attachment-edge: transparent;
132
+ --mb-attachment-preview-size: var(--mb-attachment-row-preview);
133
+ display: grid;
134
+ width: 100%;
135
+ padding: var(--mb-attachment-row-padding);
136
+ border-radius: var(--mb-row-radius);
137
+ }
138
+
139
+ .mb-attachment-preview {
140
+ position: relative;
141
+ container-type: size;
142
+ display: grid;
143
+ grid-row: 1 / span 2;
144
+ grid-column: 1;
145
+ place-items: center;
146
+ width: var(--mb-attachment-preview-size);
147
+ height: var(--mb-attachment-preview-size);
148
+ overflow: hidden;
149
+ border-radius: var(--mb-attachment-preview-radius);
150
+ color: var(--mb-attachment-tint);
151
+ }
152
+
153
+ .mb-attachment-preview > * {
154
+ grid-area: 1 / 1;
155
+ }
156
+
157
+ .mb-attachment-preview[data-image],
158
+ .mb-attachment-preview:has(> :not(.mb-attachment-document, .mb-attachment-progress, .mb-attachment-error)) {
159
+ background: var(--mb-fill-tertiary);
160
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
161
+ }
162
+
163
+ .mb-attachment-image,
164
+ .mb-attachment-preview > :where(img, svg:not(.mb-attachment-error), .mb-artwork) {
165
+ place-self: stretch;
166
+ width: 100%;
167
+ height: 100%;
168
+ object-fit: cover;
169
+ }
170
+
171
+ /* The document glyph: a page with a folded corner, its type printed low on the page. */
172
+ .mb-attachment-document {
173
+ position: relative;
174
+ display: grid;
175
+ place-items: center;
176
+ height: 86cqh;
177
+ aspect-ratio: 32 / 40;
178
+ }
179
+
180
+ .mb-attachment-document > * {
181
+ grid-area: 1 / 1;
182
+ }
183
+
184
+ .mb-attachment-glyph {
185
+ width: 100%;
186
+ height: 100%;
187
+ overflow: visible;
188
+ }
189
+
190
+ .mb-attachment-glyph-page {
191
+ /* Paper stays light in dark appearance, as document icons do on the Mac. */
192
+ fill: light-dark(white, color-mix(in oklch, var(--mb-ink) 86%, var(--mb-bg)));
193
+ stroke: var(--mb-separator-strong);
194
+ stroke-width: 1.25;
195
+ }
196
+
197
+ .mb-attachment-glyph-fold {
198
+ fill: light-dark(color-mix(in oklch, var(--mb-ink) 8%, white), color-mix(in oklch, var(--mb-ink) 66%, var(--mb-bg)));
199
+ stroke: var(--mb-separator-strong);
200
+ stroke-width: 1.25;
201
+ stroke-linejoin: round;
202
+ }
203
+
204
+ .mb-attachment-glyph-lines {
205
+ fill: none;
206
+ stroke: var(--mb-attachment-tint);
207
+ stroke-width: 1.75;
208
+ stroke-linecap: round;
209
+ opacity: 0.85;
210
+ }
211
+
212
+ .mb-attachment-extension {
213
+ align-self: end;
214
+ max-width: 88%;
215
+ margin-block-end: 22%;
216
+ overflow: hidden;
217
+ color: var(--mb-attachment-tint);
218
+ font: 700 max(7px, 17cqh) / 1 var(--mb-font);
219
+ letter-spacing: 0.02em;
220
+ text-transform: uppercase;
221
+ white-space: nowrap;
222
+ }
223
+
224
+ /* Too small to read the type: lines of text stand in, and the meta line carries the type. */
225
+ @container (height < 40px) {
226
+ .mb-attachment-extension {
227
+ display: none;
228
+ }
229
+ }
230
+
231
+ @container (height >= 40px) {
232
+ .mb-attachment-document:has(> .mb-attachment-extension) .mb-attachment-glyph-lines {
233
+ display: none;
234
+ }
235
+ }
236
+
237
+ /* Uploading: the preview veils and a ring fills over it. */
238
+ .mb-attachment-progress {
239
+ position: relative;
240
+ z-index: 1;
241
+ display: grid;
242
+ place-self: stretch;
243
+ place-items: center;
244
+ background: color-mix(in oklch, var(--mb-bg) 62%, transparent);
245
+ }
246
+
247
+ .mb-attachment-progress-ring {
248
+ --mb-progress-track-color: var(--mb-fill);
249
+ }
250
+
251
+ .mb-attachment[data-state="uploading"] :is(.mb-attachment-name, .mb-attachment-meta) {
252
+ color: var(--mb-label-secondary);
253
+ }
254
+
255
+ /* Error: a red alert badge on the preview, a red edge and red meta text. */
256
+ .mb-attachment[data-state="error"] {
257
+ --mb-attachment-edge: color-mix(in oklch, var(--mb-destructive) 70%, transparent);
258
+ }
259
+
260
+ .mb-attachment[data-state="error"] .mb-attachment-meta {
261
+ color: var(--mb-destructive-text);
262
+ }
263
+
264
+ .mb-attachment-error {
265
+ position: relative;
266
+ z-index: 1;
267
+ align-self: end;
268
+ justify-self: end;
269
+ width: min(16px, 46cqh);
270
+ height: min(16px, 46cqh);
271
+ margin: 2px;
272
+ fill: none;
273
+ stroke: var(--mb-on-destructive);
274
+ stroke-width: 1.6;
275
+ stroke-linecap: round;
276
+ }
277
+
278
+ .mb-attachment-error > circle:first-child {
279
+ fill: var(--mb-destructive-fill);
280
+ stroke: var(--mb-bg);
281
+ stroke-width: 1.25;
282
+ }
283
+
284
+ .mb-attachment-error > circle:last-child {
285
+ fill: var(--mb-on-destructive);
286
+ stroke-width: 0.8;
287
+ stroke: var(--mb-on-destructive);
288
+ }
289
+
290
+ /* Text */
291
+ .mb-attachment-name {
292
+ grid-row: 1;
293
+ grid-column: 2;
294
+ align-self: end;
295
+ min-width: 0;
296
+ overflow: hidden;
297
+ color: var(--mb-label);
298
+ font: var(--mb-attachment-name-font);
299
+ white-space: nowrap;
300
+ text-overflow: ellipsis;
301
+ text-decoration: none;
302
+ }
303
+
304
+ .mb-attachment-meta {
305
+ grid-row: 2;
306
+ grid-column: 2;
307
+ align-self: start;
308
+ min-width: 0;
309
+ overflow: hidden;
310
+ color: var(--mb-label-secondary);
311
+ font: var(--mb-attachment-meta-font);
312
+ font-variant-numeric: tabular-nums;
313
+ white-space: nowrap;
314
+ text-overflow: ellipsis;
315
+ }
316
+
317
+ .mb-attachment:not(:has(> .mb-attachment-meta)) > .mb-attachment-name {
318
+ grid-row: 1 / span 2;
319
+ align-self: center;
320
+ }
321
+
322
+ /* A name that's a link or button stretches its hit area over the whole attachment. */
323
+ :is(a, button).mb-attachment-name {
324
+ margin: 0;
325
+ padding: 0;
326
+ border: 0;
327
+ background: none;
328
+ text-align: start;
329
+ cursor: default;
330
+ }
331
+
332
+ :is(a, button).mb-attachment-name::after {
333
+ content: "";
334
+ position: absolute;
335
+ inset: 0;
336
+ border-radius: inherit;
337
+ }
338
+
339
+ .mb-attachment:has(> :is(a, button).mb-attachment-name) .mb-attachment-name::after {
340
+ border-radius: var(--mb-attachment-radius);
341
+ }
342
+
343
+ :is(a, button).mb-attachment-name:focus-visible {
344
+ outline: none;
345
+ }
346
+
347
+ :is(a, button).mb-attachment-name:focus-visible::after,
348
+ .mb-attachment[data-interactive]:focus-visible {
349
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
350
+ outline-offset: var(--mb-focus-ring-offset);
351
+ }
352
+
353
+ /* Remove */
354
+ .mb-attachment-remove {
355
+ position: relative;
356
+ z-index: 1;
357
+ display: inline-grid;
358
+ grid-row: 1 / span 2;
359
+ grid-column: 3;
360
+ place-items: center;
361
+ width: var(--mb-attachment-remove-size);
362
+ height: var(--mb-attachment-remove-size);
363
+ margin: 0;
364
+ padding: 0;
365
+ border: 0;
366
+ border-radius: 50%;
367
+ background: transparent;
368
+ color: var(--mb-label-secondary);
369
+ cursor: default;
370
+ -webkit-tap-highlight-color: transparent;
371
+ transition:
372
+ background-color var(--mb-duration-fast) var(--mb-ease-out),
373
+ color var(--mb-duration-fast) var(--mb-ease-out);
374
+ }
375
+
376
+ .mb-attachment-remove::after {
377
+ content: "";
378
+ position: absolute;
379
+ inset: 50% auto auto 50%;
380
+ width: max(100%, var(--mb-hit-target));
381
+ height: max(100%, var(--mb-hit-target));
382
+ translate: -50% -50%;
383
+ }
384
+
385
+ .mb-attachment-remove > svg {
386
+ width: 62%;
387
+ height: 62%;
388
+ fill: none;
389
+ stroke: currentColor;
390
+ stroke-width: 1.7;
391
+ stroke-linecap: round;
392
+ }
393
+
394
+ .mb-attachment-remove:focus-visible {
395
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
396
+ outline-offset: var(--mb-focus-ring-offset);
397
+ }
398
+
399
+ .mb-attachment-remove:active {
400
+ background: var(--mb-fill);
401
+ color: var(--mb-label);
402
+ transition-duration: 0ms;
403
+ }
404
+
405
+ /* Tile: preview on top, name and meta below, remove in the corner. */
406
+ .mb-attachment[data-variant="tile"] {
407
+ grid-template-columns: minmax(0, 1fr);
408
+ grid-template-rows: auto auto auto;
409
+ row-gap: var(--mb-space-1);
410
+ width: var(--mb-attachment-tile-width);
411
+ padding: var(--mb-space-3);
412
+ padding-block-end: var(--mb-space-4);
413
+ }
414
+
415
+ .mb-attachment[data-variant="tile"] > .mb-attachment-preview {
416
+ grid-row: 1;
417
+ grid-column: 1;
418
+ width: 100%;
419
+ height: var(--mb-attachment-tile-preview-height);
420
+ margin-block-end: var(--mb-space-3);
421
+ background: var(--mb-fill-quaternary);
422
+ }
423
+
424
+ .mb-attachment[data-variant="tile"] > .mb-attachment-name {
425
+ grid-row: 2;
426
+ grid-column: 1;
427
+ padding-inline: var(--mb-space-2);
428
+ }
429
+
430
+ .mb-attachment[data-variant="tile"] > .mb-attachment-meta {
431
+ grid-row: 3;
432
+ grid-column: 1;
433
+ padding-inline: var(--mb-space-2);
434
+ }
435
+
436
+ .mb-attachment[data-variant="tile"]:not(:has(> .mb-attachment-meta)) > .mb-attachment-name {
437
+ grid-row: 2 / span 2;
438
+ }
439
+
440
+ /* Thumbnail: the picture alone. The name stays for assistive technology. */
441
+ .mb-attachment[data-variant="thumbnail"] {
442
+ --mb-attachment-preview-size: var(--mb-attachment-thumbnail-size);
443
+ display: inline-grid;
444
+ grid-template-columns: auto;
445
+ grid-template-rows: auto;
446
+ width: var(--mb-attachment-thumbnail-size);
447
+ height: var(--mb-attachment-thumbnail-size);
448
+ padding: 0;
449
+ background: transparent;
450
+ }
451
+
452
+ .mb-attachment[data-variant="thumbnail"] > .mb-attachment-preview {
453
+ grid-row: 1;
454
+ border-radius: var(--mb-attachment-radius);
455
+ background: var(--mb-fill-tertiary);
456
+ }
457
+
458
+ @supports (corner-shape: squircle) {
459
+ .mb-attachment[data-variant="thumbnail"] > .mb-attachment-preview {
460
+ border-radius: calc(var(--mb-attachment-radius) * var(--mb-corner-factor));
461
+ }
462
+ }
463
+
464
+ .mb-attachment[data-variant="thumbnail"] > :is(.mb-attachment-name, .mb-attachment-meta) {
465
+ position: absolute;
466
+ width: 1px;
467
+ height: 1px;
468
+ overflow: hidden;
469
+ clip-path: inset(50%);
470
+ white-space: nowrap;
471
+ }
472
+
473
+ .mb-attachment[data-variant="thumbnail"] {
474
+ box-shadow: none;
475
+ }
476
+
477
+ .mb-attachment[data-variant="thumbnail"] > .mb-attachment-preview {
478
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-attachment-edge);
479
+ }
480
+
481
+ /* The corner remove button of tiles and thumbnails: a filled circle over the edge, as in Messages. */
482
+ .mb-attachment:is([data-variant="tile"], [data-variant="thumbnail"]) > .mb-attachment-remove {
483
+ position: absolute;
484
+ inset-block-start: calc(var(--mb-attachment-remove-size) / -3);
485
+ inset-inline-end: calc(var(--mb-attachment-remove-size) / -3);
486
+ background: var(--mb-label-secondary);
487
+ color: var(--mb-bg);
488
+ box-shadow: 0 0 0 1.5px var(--mb-bg);
489
+ }
490
+
491
+ .mb-attachment:is([data-variant="tile"], [data-variant="thumbnail"]) > .mb-attachment-remove > svg {
492
+ stroke-width: 2;
493
+ }
494
+
495
+ .mb-attachment:is([data-variant="tile"], [data-variant="thumbnail"]) > .mb-attachment-remove:active {
496
+ background: var(--mb-label);
497
+ color: var(--mb-bg);
498
+ }
499
+
500
+ /* Interactive: a whole attachment that's a link or button, or one whose name is. */
501
+ :is(a, button).mb-attachment {
502
+ font: var(--mb-attachment-name-font);
503
+ cursor: default;
504
+ }
505
+
506
+ @media (hover: hover) and (pointer: fine) {
507
+ .mb-attachment-remove:hover {
508
+ background: var(--mb-fill-secondary);
509
+ color: var(--mb-label);
510
+ }
511
+
512
+ .mb-attachment:is([data-variant="tile"], [data-variant="thumbnail"]) > .mb-attachment-remove:hover {
513
+ background: var(--mb-label);
514
+ color: var(--mb-bg);
515
+ }
516
+
517
+ .mb-attachment[data-interactive]:hover,
518
+ .mb-attachment:has(> :is(a, button).mb-attachment-name:hover) {
519
+ --mb-attachment-bg: var(--mb-fill-tertiary);
520
+ }
521
+
522
+ .mb-attachment[data-variant="row"][data-interactive]:hover,
523
+ .mb-attachment[data-variant="row"]:has(> :is(a, button).mb-attachment-name:hover) {
524
+ --mb-attachment-bg: var(--mb-fill-quaternary);
525
+ }
526
+ }
527
+
528
+ .mb-attachment[data-interactive]:active,
529
+ .mb-attachment:has(> :is(a, button).mb-attachment-name:active) {
530
+ --mb-attachment-bg: var(--mb-fill-secondary);
531
+ transition-duration: 0ms;
532
+ }
533
+
534
+ .mb-attachment[data-variant="thumbnail"]:is([data-interactive]:active, :has(> :is(a, button).mb-attachment-name:active)) > .mb-attachment-preview {
535
+ filter: brightness(0.85);
536
+ }
537
+
538
+ .mb-attachment:is([data-variant="tile"], [data-variant="thumbnail"]) .mb-attachment-progress-ring {
539
+ --mb-progress-circle-size-sm: var(--mb-progress-circle-size);
540
+ }
@@ -0,0 +1,52 @@
1
+ /* Automation row — a List row whose body opens the automation and whose switch turns it on or off.
2
+ The open button lies under the row's text and the switch sits above it, so the two never nest. */
3
+
4
+ .mb-automation-row {
5
+ isolation: isolate;
6
+ }
7
+
8
+ .mb-automation-row-open {
9
+ position: absolute;
10
+ inset: 0;
11
+ z-index: 0;
12
+ margin: 0;
13
+ padding: 0;
14
+ border: 0;
15
+ border-radius: inherit;
16
+ background: transparent;
17
+ cursor: default;
18
+ -webkit-tap-highlight-color: transparent;
19
+ }
20
+
21
+ .mb-automation-row-open:focus-visible {
22
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
23
+ outline-offset: calc(var(--mb-focus-ring-width) * -1);
24
+ }
25
+
26
+ .mb-automation-row > :where(.mb-list-row-icon, .mb-list-row-title, .mb-list-row-subtitle) {
27
+ pointer-events: none;
28
+ }
29
+
30
+ .mb-automation-row-switch {
31
+ position: relative;
32
+ z-index: 1;
33
+ }
34
+
35
+ /* A turned-off automation keeps its row; its title and icon step back. */
36
+ .mb-automation-row:has(> .mb-automation-row-switch[data-off]) > :where(.mb-list-row-title) {
37
+ color: var(--mb-label-secondary);
38
+ }
39
+
40
+ .mb-automation-row:has(> .mb-automation-row-switch[data-off]) > :where(.mb-list-row-icon) {
41
+ opacity: 0.55;
42
+ }
43
+
44
+ @media (hover: hover) and (pointer: fine) {
45
+ .mb-automation-row:has(> .mb-automation-row-open:hover) {
46
+ background: var(--mb-fill-quaternary);
47
+ }
48
+ }
49
+
50
+ .mb-automation-row:has(> .mb-automation-row-open:active) {
51
+ background: var(--mb-fill-tertiary);
52
+ }