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,303 @@
1
+ /*
2
+ * Response — reading typography for the assistant's reply. Element selectors
3
+ * stay inside the response and stop at any nested macbetter component, so a
4
+ * code block or a card inside a reply keeps its own styles.
5
+ */
6
+
7
+ :where(:root, [data-platform="macos"]) {
8
+ --mb-response-leading: 20px;
9
+ --mb-response-space: 12px;
10
+ --mb-response-heading-space: 20px;
11
+ --mb-response-list-indent: 22px;
12
+ --mb-response-code-font: 400 12px/18px var(--mb-font-mono);
13
+ --mb-response-code-padding: 12px 14px;
14
+ --mb-response-cell-padding: 6px 12px;
15
+ --mb-response-caret-height: 15px;
16
+ }
17
+
18
+ :where([data-platform="ios"], [data-platform="ipados"]) {
19
+ --mb-response-leading: 25px;
20
+ --mb-response-space: 14px;
21
+ --mb-response-heading-space: 24px;
22
+ --mb-response-list-indent: 26px;
23
+ --mb-response-code-font: 400 15px/21px var(--mb-font-mono);
24
+ --mb-response-code-padding: 14px 16px;
25
+ --mb-response-cell-padding: 9px 14px;
26
+ --mb-response-caret-height: 19px;
27
+ }
28
+
29
+ .mb-response {
30
+ --mb-response-caret-animation: mb-response-blink 1.06s steps(1, end) infinite;
31
+
32
+ min-width: 0;
33
+ color: var(--mb-label);
34
+ font: var(--mb-text-body);
35
+ line-height: var(--mb-response-leading);
36
+ letter-spacing: var(--mb-tracking-body);
37
+ overflow-wrap: break-word;
38
+ text-wrap: pretty;
39
+ }
40
+
41
+ .mb-response > :first-child {
42
+ margin-block-start: 0;
43
+ }
44
+
45
+ .mb-response > :last-child {
46
+ margin-block-end: 0;
47
+ }
48
+
49
+ /* A nested component keeps its own styles, but sits in the flow with the same space around it. */
50
+ :is(.mb-response, .mb-response > div:only-child) > :where([class^="mb-"], [class*=" mb-"]):not(:last-child) {
51
+ margin-block-end: var(--mb-response-space);
52
+ }
53
+
54
+ @scope (.mb-response) to (:scope :is([class^="mb-"], [class*=" mb-"]):not(.mb-response-caret)) {
55
+ :where(p, ul, ol, blockquote, pre, table, figure, img, hr) {
56
+ margin-block: 0 var(--mb-response-space);
57
+ }
58
+
59
+ :where(h1, h2, h3, h4, h5, h6) {
60
+ margin-block: var(--mb-response-heading-space) 8px;
61
+ color: var(--mb-label);
62
+ text-wrap: balance;
63
+ }
64
+
65
+ :where(h1) {
66
+ font: var(--mb-text-title-2);
67
+ letter-spacing: var(--mb-tracking-title);
68
+ }
69
+
70
+ :where(h2) {
71
+ font: var(--mb-text-title-3);
72
+ letter-spacing: var(--mb-tracking-title);
73
+ }
74
+
75
+ :where(h3, h4, h5, h6) {
76
+ font: var(--mb-text-headline);
77
+ line-height: var(--mb-response-leading);
78
+ }
79
+
80
+ :where(h4, h5, h6) {
81
+ color: var(--mb-label-secondary);
82
+ }
83
+
84
+ :where(strong, b) {
85
+ font-weight: 600;
86
+ }
87
+
88
+ :where(a) {
89
+ color: var(--mb-accent-text);
90
+ text-decoration: underline;
91
+ text-decoration-color: color-mix(in oklch, var(--mb-accent-text) 40%, transparent);
92
+ text-decoration-thickness: 1px;
93
+ text-underline-offset: 2px;
94
+ border-radius: 2px;
95
+ }
96
+
97
+ @media (hover: hover) and (pointer: fine) {
98
+ :where(a):hover {
99
+ text-decoration-color: currentColor;
100
+ }
101
+ }
102
+
103
+ :where(a):focus-visible {
104
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
105
+ outline-offset: 1px;
106
+ }
107
+
108
+ :where(ul, ol) {
109
+ padding-inline-start: var(--mb-response-list-indent);
110
+ }
111
+
112
+ /* Stated outright: CSS resets often strip list markers. */
113
+ :where(ul) {
114
+ list-style-type: disc;
115
+ }
116
+
117
+ :where(ol) {
118
+ list-style-type: decimal;
119
+ }
120
+
121
+ :where(ul ul, ol ul) {
122
+ list-style-type: circle;
123
+ }
124
+
125
+ :where(li) {
126
+ padding-inline-start: 2px;
127
+ }
128
+
129
+ :where(li + li) {
130
+ margin-block-start: 4px;
131
+ }
132
+
133
+ :where(li > :is(ul, ol)) {
134
+ margin-block: 4px 0;
135
+ }
136
+
137
+ :where(li > p) {
138
+ margin-block: 0 4px;
139
+ }
140
+
141
+ :where(li)::marker {
142
+ color: var(--mb-label-secondary);
143
+ }
144
+
145
+ :where(ol > li)::marker {
146
+ font-variant-numeric: tabular-nums;
147
+ }
148
+
149
+ :where(code) {
150
+ padding: 0.1em 0.35em;
151
+ border-radius: var(--mb-radius-xs);
152
+ background: var(--mb-fill-tertiary);
153
+ font-family: var(--mb-font-mono);
154
+ font-size: 0.88em;
155
+ overflow-wrap: anywhere;
156
+ }
157
+
158
+ :where(pre) {
159
+ overflow-x: auto;
160
+ padding: var(--mb-response-code-padding);
161
+ border-radius: var(--mb-radius-lg);
162
+ background: var(--mb-fill-quaternary);
163
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator);
164
+ font: var(--mb-response-code-font);
165
+ tab-size: 2;
166
+ white-space: pre;
167
+ overflow-wrap: normal;
168
+ scrollbar-width: thin;
169
+ }
170
+
171
+ :where(pre code) {
172
+ padding: 0;
173
+ border-radius: 0;
174
+ background: none;
175
+ font: inherit;
176
+ overflow-wrap: normal;
177
+ }
178
+
179
+ :where(pre):focus-visible {
180
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
181
+ outline-offset: 0;
182
+ }
183
+
184
+ :where(blockquote) {
185
+ margin-inline: 0;
186
+ padding-inline-start: 12px;
187
+ border-inline-start: 3px solid var(--mb-separator-strong);
188
+ color: var(--mb-label-secondary);
189
+ }
190
+
191
+ :where(hr) {
192
+ height: var(--mb-hairline);
193
+ margin-block: var(--mb-response-heading-space);
194
+ border: 0;
195
+ background: var(--mb-separator);
196
+ }
197
+
198
+ :where(img) {
199
+ display: block;
200
+ max-width: 100%;
201
+ height: auto;
202
+ border-radius: var(--mb-radius-lg);
203
+ }
204
+
205
+ /* A wide table scrolls on its own instead of widening the thread. */
206
+ :where(table) {
207
+ display: block;
208
+ width: max-content;
209
+ max-width: 100%;
210
+ overflow-x: auto;
211
+ border-collapse: collapse;
212
+ font-variant-numeric: tabular-nums;
213
+ scrollbar-width: thin;
214
+ }
215
+
216
+ :where(th, td) {
217
+ padding: var(--mb-response-cell-padding);
218
+ border-block-end: var(--mb-hairline) solid var(--mb-separator);
219
+ text-align: start;
220
+ vertical-align: top;
221
+ }
222
+
223
+ :where(th:first-child, td:first-child) {
224
+ padding-inline-start: 0;
225
+ }
226
+
227
+ :where(th) {
228
+ border-block-end-color: var(--mb-separator-strong);
229
+ color: var(--mb-label-secondary);
230
+ font-weight: 600;
231
+ }
232
+
233
+ :where(tbody tr:last-child) > :where(td, th) {
234
+ border-block-end: 0;
235
+ }
236
+
237
+ :where(mark) {
238
+ border-radius: 2px;
239
+ background: color-mix(in oklch, var(--mb-yellow) 40%, transparent);
240
+ color: inherit;
241
+ }
242
+
243
+ :where(kbd) {
244
+ padding: 0 0.35em;
245
+ border-radius: var(--mb-radius-xs);
246
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-separator-strong);
247
+ font-family: var(--mb-font);
248
+ font-size: 0.88em;
249
+ }
250
+ }
251
+
252
+ /* ── Caret ───────────────────────────────────────────────────── */
253
+
254
+ .mb-response-caret {
255
+ display: inline-block;
256
+ width: 2px;
257
+ height: var(--mb-response-caret-height);
258
+ margin-inline-start: 2px;
259
+ border-radius: 1px;
260
+ background: var(--mb-accent);
261
+ vertical-align: text-bottom;
262
+ animation: var(--mb-response-caret-animation, mb-response-blink 1.06s steps(1, end) infinite);
263
+ }
264
+
265
+ /*
266
+ * With `streaming` and no caret placed by hand, the last block carries one. The
267
+ * block may sit in a single wrapper, as a Markdown renderer's output does.
268
+ */
269
+ :is(.mb-response, .mb-response > div:only-child)
270
+ > :is(p, h1, h2, h3, h4, h5, h6, blockquote):last-child:where(.mb-response[data-streaming]:not(:has(.mb-response-caret)) *)::after,
271
+ :is(.mb-response, .mb-response > div:only-child)
272
+ > :is(ul, ol):last-child
273
+ > li:last-child:where(.mb-response[data-streaming]:not(:has(.mb-response-caret)) *)::after {
274
+ content: "";
275
+ display: inline-block;
276
+ width: 2px;
277
+ height: var(--mb-response-caret-height);
278
+ margin-inline-start: 2px;
279
+ border-radius: 1px;
280
+ background: var(--mb-accent);
281
+ vertical-align: text-bottom;
282
+ animation: var(--mb-response-caret-animation);
283
+ }
284
+
285
+ @keyframes mb-response-blink {
286
+ 50% {
287
+ opacity: 0;
288
+ }
289
+ }
290
+
291
+ @media (prefers-reduced-motion: reduce) {
292
+ :where(:root:not([data-motion="full"])) {
293
+ .mb-response {
294
+ --mb-response-caret-animation: none;
295
+ }
296
+ }
297
+ }
298
+
299
+ @media (forced-colors: active) {
300
+ .mb-response-caret {
301
+ background: CanvasText;
302
+ }
303
+ }
@@ -0,0 +1,295 @@
1
+ /* Scene tile — runs a scene. It shares the accessory tile's off and on looks: dim when the home doesn't match the
2
+ scene, bright with dark text when every accessory in it is set the way the scene sets it. */
3
+
4
+ :where(:root, [data-platform="macos"]) {
5
+ --mb-scene-tile-height: 44px;
6
+ --mb-scene-tile-height-sm: 36px;
7
+ --mb-scene-tile-radius: 12px;
8
+ --mb-scene-tile-icon-size: 26px;
9
+ --mb-scene-tile-glyph-size: 15px;
10
+ --mb-scene-tile-font: 600 13px/16px var(--mb-font);
11
+ --mb-scene-row-gap: 8px;
12
+ --mb-scene-tile-min-width: 150px;
13
+ }
14
+
15
+ :where([data-platform="ios"], [data-platform="ipados"]) {
16
+ --mb-scene-tile-height: 56px;
17
+ --mb-scene-tile-height-sm: 44px;
18
+ --mb-scene-tile-radius: 16px;
19
+ --mb-scene-tile-icon-size: 32px;
20
+ --mb-scene-tile-glyph-size: 18px;
21
+ --mb-scene-tile-font: 600 15px/18px var(--mb-font);
22
+ --mb-scene-row-gap: 10px;
23
+ --mb-scene-tile-min-width: 150px;
24
+ }
25
+
26
+ .mb-scene-tile {
27
+ --mb-scene-tile-bg: light-dark(
28
+ color-mix(in oklch, var(--mb-ink) 7%, rgb(255 255 255 / 0.3)),
29
+ color-mix(in oklch, var(--mb-bg-elevated) 58%, transparent)
30
+ );
31
+ --mb-scene-tile-fg: var(--mb-label);
32
+ --mb-scene-tile-icon-bg: var(--mb-fill-secondary);
33
+ --mb-scene-tile-icon-fg: var(--mb-label-secondary);
34
+ --mb-scene-tile-edge: light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.08));
35
+
36
+ position: relative;
37
+ display: inline-flex;
38
+ flex: none;
39
+ align-items: center;
40
+ gap: 10px;
41
+ box-sizing: border-box;
42
+ min-width: var(--mb-scene-tile-min-width);
43
+ height: var(--mb-scene-tile-height);
44
+ margin: 0;
45
+ padding-block: 0;
46
+ padding-inline: calc((var(--mb-scene-tile-height) - var(--mb-scene-tile-icon-size)) / 2) 14px;
47
+ border: 0;
48
+ border-radius: var(--mb-scene-tile-radius);
49
+ background: var(--mb-scene-tile-bg);
50
+ box-shadow: inset 0 0 0 var(--mb-hairline) var(--mb-scene-tile-edge);
51
+ color: var(--mb-scene-tile-fg);
52
+ font: var(--mb-scene-tile-font);
53
+ letter-spacing: var(--mb-tracking-body);
54
+ text-align: start;
55
+ white-space: nowrap;
56
+ cursor: default;
57
+ user-select: none;
58
+ -webkit-user-select: none;
59
+ -webkit-tap-highlight-color: transparent;
60
+ transition:
61
+ background-color var(--mb-duration-base) var(--mb-ease-out),
62
+ color var(--mb-duration-base) var(--mb-ease-out),
63
+ scale var(--mb-spring-snappy-duration) var(--mb-spring-snappy);
64
+ }
65
+
66
+ .mb-scene-tile[data-size="sm"] {
67
+ --mb-scene-tile-height: var(--mb-scene-tile-height-sm);
68
+ --mb-scene-tile-icon-size: calc(var(--mb-scene-tile-height-sm) - 12px);
69
+ }
70
+
71
+ .mb-scene-tile[data-active] {
72
+ --mb-scene-tile-bg: light-dark(rgb(255 255 255 / 0.97), color-mix(in oklch, var(--mb-tint) 8%, rgb(246 246 248)));
73
+ --mb-scene-tile-fg: rgb(0 0 0 / 0.88);
74
+ --mb-scene-tile-icon-bg: oklch(from var(--mb-accent) min(l, 0.62) c h);
75
+ --mb-scene-tile-icon-fg: white;
76
+ --mb-scene-tile-edge: rgb(0 0 0 / 0.04);
77
+ box-shadow:
78
+ inset 0 0 0 var(--mb-hairline) var(--mb-scene-tile-edge),
79
+ 0 1px 3px rgb(0 0 0 / 0.12);
80
+ }
81
+
82
+ /* Art behind the tile. The tile's own fill becomes a veil over it, so the name reads as it does on a plain tile. */
83
+ .mb-scene-tile[data-background] {
84
+ isolation: isolate;
85
+ background: none;
86
+ }
87
+
88
+ .mb-scene-tile-background {
89
+ position: absolute;
90
+ z-index: -1;
91
+ inset: 0;
92
+ overflow: hidden;
93
+ border-radius: inherit;
94
+ pointer-events: none;
95
+ }
96
+
97
+ .mb-scene-tile-background > .mb-artwork {
98
+ position: absolute;
99
+ inset: 0;
100
+ inline-size: 100%;
101
+ block-size: 100%;
102
+ aspect-ratio: auto;
103
+ border-radius: 0;
104
+ }
105
+
106
+ .mb-scene-tile-background > .mb-artwork::after {
107
+ display: none;
108
+ }
109
+
110
+ .mb-scene-tile-background::after {
111
+ content: "";
112
+ position: absolute;
113
+ inset: 0;
114
+ background: var(--mb-scene-tile-veil, var(--mb-scene-tile-bg));
115
+ transition: background-color var(--mb-duration-base) var(--mb-ease-out);
116
+ }
117
+
118
+ .mb-scene-tile[data-background]:not([data-active]) {
119
+ --mb-scene-tile-veil: light-dark(rgb(255 255 255 / 0.32), rgb(0 0 0 / 0.3));
120
+ }
121
+
122
+ /* On, the art shows as a tint under the bright fill. */
123
+ .mb-scene-tile[data-background][data-active] {
124
+ --mb-scene-tile-veil: light-dark(rgb(255 255 255 / 0.8), rgb(246 246 248 / 0.84));
125
+ }
126
+
127
+ .mb-scene-tile-icon {
128
+ display: grid;
129
+ flex: none;
130
+ place-items: center;
131
+ width: var(--mb-scene-tile-icon-size);
132
+ height: var(--mb-scene-tile-icon-size);
133
+ border-radius: var(--mb-radius-full);
134
+ background: var(--mb-scene-tile-icon-bg);
135
+ color: var(--mb-scene-tile-icon-fg);
136
+ transition:
137
+ background-color var(--mb-duration-base) var(--mb-ease-out),
138
+ color var(--mb-duration-base) var(--mb-ease-out);
139
+ }
140
+
141
+ .mb-scene-tile-icon > :where(svg:not(.mb-activity-indicator-spokes)) {
142
+ width: var(--mb-scene-tile-glyph-size);
143
+ height: var(--mb-scene-tile-glyph-size);
144
+ }
145
+
146
+ .mb-scene-tile-name {
147
+ /* Two lines before truncating, as in the Home app. */
148
+ display: -webkit-box;
149
+ -webkit-box-orient: vertical;
150
+ -webkit-line-clamp: 2;
151
+ line-clamp: 2;
152
+ min-width: 0;
153
+ overflow: hidden;
154
+ white-space: normal;
155
+ }
156
+
157
+ .mb-scene-tile::after {
158
+ content: "";
159
+ position: absolute;
160
+ inset: 50% auto auto 50%;
161
+ width: max(100%, var(--mb-hit-target));
162
+ height: max(100%, var(--mb-hit-target));
163
+ translate: -50% -50%;
164
+ }
165
+
166
+ .mb-scene-tile:focus-visible {
167
+ outline: var(--mb-focus-ring-width) solid var(--mb-focus-ring);
168
+ outline-offset: var(--mb-focus-ring-offset);
169
+ }
170
+
171
+ .mb-scene-tile[data-disabled] {
172
+ opacity: 0.5;
173
+ }
174
+
175
+ @media (hover: hover) and (pointer: fine) {
176
+ .mb-scene-tile:not([data-active], [data-disabled]):hover {
177
+ --mb-scene-tile-bg: light-dark(
178
+ color-mix(in oklch, var(--mb-ink) 4%, rgb(255 255 255 / 0.5)),
179
+ color-mix(in oklch, var(--mb-bg-elevated) 68%, transparent)
180
+ );
181
+ }
182
+ }
183
+
184
+ @media (hover: hover) and (pointer: fine) {
185
+ .mb-scene-tile[data-background]:not([data-active], [data-disabled]):hover {
186
+ --mb-scene-tile-veil: light-dark(rgb(255 255 255 / 0.44), rgb(0 0 0 / 0.16));
187
+ }
188
+ }
189
+
190
+ @scope ([data-platform="ios"], [data-platform="ipados"]) to (:scope [data-platform]) {
191
+ .mb-scene-tile:not([data-disabled]):active {
192
+ scale: 0.96;
193
+ }
194
+ }
195
+
196
+ @scope ([data-platform="macos"]) to (:scope [data-platform]) {
197
+ .mb-scene-tile:not([data-disabled]):active {
198
+ --mb-scene-tile-bg: light-dark(
199
+ color-mix(in oklch, var(--mb-bg-elevated) 84%, transparent),
200
+ color-mix(in oklch, var(--mb-bg-elevated) 64%, transparent)
201
+ );
202
+ }
203
+ }
204
+
205
+ /* The row: two tiles abreast that scroll on iPhone; a wrapping grid on iPad and Mac. */
206
+ .mb-scene-row {
207
+ display: grid;
208
+ grid-template-columns: repeat(auto-fill, minmax(var(--mb-scene-tile-min-width), 1fr));
209
+ gap: var(--mb-scene-row-gap);
210
+ min-width: 0;
211
+ }
212
+
213
+ .mb-scene-row > .mb-scene-tile {
214
+ min-width: 0;
215
+ }
216
+
217
+ @scope ([data-platform="ios"]) to (:scope [data-platform]) {
218
+ .mb-scene-row {
219
+ grid-auto-flow: column;
220
+ grid-template-columns: none;
221
+ grid-auto-columns: calc((100% - var(--mb-scene-row-gap)) / 2);
222
+ overflow-x: auto;
223
+ overscroll-behavior-x: contain;
224
+ scroll-snap-type: x mandatory;
225
+ scroll-padding-inline: 0;
226
+ scrollbar-width: none;
227
+ }
228
+
229
+ .mb-scene-row::-webkit-scrollbar {
230
+ display: none;
231
+ }
232
+
233
+ .mb-scene-row > .mb-scene-tile {
234
+ scroll-snap-align: start;
235
+ }
236
+ }
237
+
238
+ @supports (corner-shape: squircle) {
239
+ .mb-scene-tile {
240
+ corner-shape: var(--mb-corner-shape);
241
+ border-radius: calc(var(--mb-scene-tile-radius) * var(--mb-corner-factor));
242
+ }
243
+
244
+ .mb-scene-tile-background {
245
+ corner-shape: inherit;
246
+ }
247
+ }
248
+
249
+ @media (prefers-contrast: more) {
250
+ .mb-scene-tile {
251
+ --mb-scene-tile-edge: var(--mb-control-border);
252
+ --mb-scene-tile-bg: var(--mb-bg-elevated);
253
+ -webkit-backdrop-filter: none;
254
+ backdrop-filter: none;
255
+ }
256
+
257
+ .mb-scene-tile[data-active] {
258
+ --mb-scene-tile-bg: rgb(255 255 255);
259
+ box-shadow: inset 0 0 0 2px var(--mb-scene-tile-icon-bg);
260
+ }
261
+ }
262
+
263
+ @media (prefers-reduced-transparency: reduce) {
264
+ :where(:root:not([data-transparency="full"])) {
265
+ .mb-scene-tile:not([data-active]) {
266
+ background-color: var(--mb-bg-elevated);
267
+ -webkit-backdrop-filter: none;
268
+ backdrop-filter: none;
269
+ }
270
+ }
271
+ }
272
+
273
+ @media (prefers-contrast: more) {
274
+ .mb-scene-tile-background {
275
+ display: none;
276
+ }
277
+
278
+ .mb-scene-tile[data-background] {
279
+ background: var(--mb-scene-tile-bg);
280
+ }
281
+ }
282
+
283
+ @media (forced-colors: active) {
284
+ .mb-scene-tile-background {
285
+ display: none;
286
+ }
287
+
288
+ .mb-scene-tile {
289
+ border: 1px solid ButtonText;
290
+ }
291
+
292
+ .mb-scene-tile[data-active] {
293
+ border: 3px solid Highlight;
294
+ }
295
+ }