@major-tech/ui 0.0.0-stage → 1.0.0

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 (495) hide show
  1. package/CHANGELOG.md +101 -0
  2. package/THIRD_PARTY_NOTICES.md +27 -0
  3. package/dist/components/accordion.d.ts +33 -0
  4. package/dist/components/accordion.d.ts.map +1 -0
  5. package/dist/components/accordion.js +51 -0
  6. package/dist/components/accordion.js.map +1 -0
  7. package/dist/components/activity-chart.d.ts +26 -0
  8. package/dist/components/activity-chart.d.ts.map +1 -0
  9. package/dist/components/activity-chart.js +56 -0
  10. package/dist/components/activity-chart.js.map +1 -0
  11. package/dist/components/alert-dialog.d.ts +28 -0
  12. package/dist/components/alert-dialog.d.ts.map +1 -0
  13. package/dist/components/alert-dialog.js +51 -0
  14. package/dist/components/alert-dialog.js.map +1 -0
  15. package/dist/components/alert.d.ts +34 -0
  16. package/dist/components/alert.d.ts.map +1 -0
  17. package/dist/components/alert.js +59 -0
  18. package/dist/components/alert.js.map +1 -0
  19. package/dist/components/ask-user-question.d.ts +103 -0
  20. package/dist/components/ask-user-question.d.ts.map +1 -0
  21. package/dist/components/ask-user-question.js +401 -0
  22. package/dist/components/ask-user-question.js.map +1 -0
  23. package/dist/components/attachment-gallery.d.ts +137 -0
  24. package/dist/components/attachment-gallery.d.ts.map +1 -0
  25. package/dist/components/attachment-gallery.js +317 -0
  26. package/dist/components/attachment-gallery.js.map +1 -0
  27. package/dist/components/avatar.d.ts +37 -0
  28. package/dist/components/avatar.d.ts.map +1 -0
  29. package/dist/components/avatar.js +62 -0
  30. package/dist/components/avatar.js.map +1 -0
  31. package/dist/components/badge.d.ts +29 -0
  32. package/dist/components/badge.d.ts.map +1 -0
  33. package/dist/components/badge.js +50 -0
  34. package/dist/components/badge.js.map +1 -0
  35. package/dist/components/brand-tile.d.ts +33 -0
  36. package/dist/components/brand-tile.d.ts.map +1 -0
  37. package/dist/components/brand-tile.js +36 -0
  38. package/dist/components/brand-tile.js.map +1 -0
  39. package/dist/components/button.d.ts +51 -0
  40. package/dist/components/button.d.ts.map +1 -0
  41. package/dist/components/button.js +90 -0
  42. package/dist/components/button.js.map +1 -0
  43. package/dist/components/calendar.d.ts +18 -0
  44. package/dist/components/calendar.d.ts.map +1 -0
  45. package/dist/components/calendar.js +78 -0
  46. package/dist/components/calendar.js.map +1 -0
  47. package/dist/components/card.d.ts +18 -0
  48. package/dist/components/card.d.ts.map +1 -0
  49. package/dist/components/card.js +34 -0
  50. package/dist/components/card.js.map +1 -0
  51. package/dist/components/carousel.d.ts +48 -0
  52. package/dist/components/carousel.d.ts.map +1 -0
  53. package/dist/components/carousel.js +227 -0
  54. package/dist/components/carousel.js.map +1 -0
  55. package/dist/components/catalog-card.d.ts +29 -0
  56. package/dist/components/catalog-card.d.ts.map +1 -0
  57. package/dist/components/catalog-card.js +20 -0
  58. package/dist/components/catalog-card.js.map +1 -0
  59. package/dist/components/chart.d.ts +118 -0
  60. package/dist/components/chart.d.ts.map +1 -0
  61. package/dist/components/chart.js +209 -0
  62. package/dist/components/chart.js.map +1 -0
  63. package/dist/components/checkbox.d.ts +8 -0
  64. package/dist/components/checkbox.d.ts.map +1 -0
  65. package/dist/components/checkbox.js +14 -0
  66. package/dist/components/checkbox.js.map +1 -0
  67. package/dist/components/chip.d.ts +68 -0
  68. package/dist/components/chip.d.ts.map +1 -0
  69. package/dist/components/chip.js +100 -0
  70. package/dist/components/chip.js.map +1 -0
  71. package/dist/components/code-block.d.ts +99 -0
  72. package/dist/components/code-block.d.ts.map +1 -0
  73. package/dist/components/code-block.js +144 -0
  74. package/dist/components/code-block.js.map +1 -0
  75. package/dist/components/collapsible.d.ts +17 -0
  76. package/dist/components/collapsible.d.ts.map +1 -0
  77. package/dist/components/collapsible.js +25 -0
  78. package/dist/components/collapsible.js.map +1 -0
  79. package/dist/components/command.d.ts +51 -0
  80. package/dist/components/command.d.ts.map +1 -0
  81. package/dist/components/command.js +120 -0
  82. package/dist/components/command.js.map +1 -0
  83. package/dist/components/composer.d.ts +211 -0
  84. package/dist/components/composer.d.ts.map +1 -0
  85. package/dist/components/composer.js +605 -0
  86. package/dist/components/composer.js.map +1 -0
  87. package/dist/components/connector-request.d.ts +63 -0
  88. package/dist/components/connector-request.d.ts.map +1 -0
  89. package/dist/components/connector-request.js +57 -0
  90. package/dist/components/connector-request.js.map +1 -0
  91. package/dist/components/context-menu.d.ts +26 -0
  92. package/dist/components/context-menu.d.ts.map +1 -0
  93. package/dist/components/context-menu.js +33 -0
  94. package/dist/components/context-menu.js.map +1 -0
  95. package/dist/components/data-table.d.ts +61 -0
  96. package/dist/components/data-table.d.ts.map +1 -0
  97. package/dist/components/data-table.js +79 -0
  98. package/dist/components/data-table.js.map +1 -0
  99. package/dist/components/date-range-picker.d.ts +54 -0
  100. package/dist/components/date-range-picker.d.ts.map +1 -0
  101. package/dist/components/date-range-picker.js +451 -0
  102. package/dist/components/date-range-picker.js.map +1 -0
  103. package/dist/components/dialog.d.ts +46 -0
  104. package/dist/components/dialog.d.ts.map +1 -0
  105. package/dist/components/dialog.js +75 -0
  106. package/dist/components/dialog.js.map +1 -0
  107. package/dist/components/drawer.d.ts +85 -0
  108. package/dist/components/drawer.d.ts.map +1 -0
  109. package/dist/components/drawer.js +166 -0
  110. package/dist/components/drawer.js.map +1 -0
  111. package/dist/components/dropdown-menu.d.ts +77 -0
  112. package/dist/components/dropdown-menu.d.ts.map +1 -0
  113. package/dist/components/dropdown-menu.js +112 -0
  114. package/dist/components/dropdown-menu.js.map +1 -0
  115. package/dist/components/editor-tabs.d.ts +49 -0
  116. package/dist/components/editor-tabs.d.ts.map +1 -0
  117. package/dist/components/editor-tabs.js +157 -0
  118. package/dist/components/editor-tabs.js.map +1 -0
  119. package/dist/components/empty-state.d.ts +21 -0
  120. package/dist/components/empty-state.d.ts.map +1 -0
  121. package/dist/components/empty-state.js +14 -0
  122. package/dist/components/empty-state.js.map +1 -0
  123. package/dist/components/entity-card.d.ts +301 -0
  124. package/dist/components/entity-card.d.ts.map +1 -0
  125. package/dist/components/entity-card.js +392 -0
  126. package/dist/components/entity-card.js.map +1 -0
  127. package/dist/components/entity-row.d.ts +37 -0
  128. package/dist/components/entity-row.d.ts.map +1 -0
  129. package/dist/components/entity-row.js +65 -0
  130. package/dist/components/entity-row.js.map +1 -0
  131. package/dist/components/env-var-request.d.ts +51 -0
  132. package/dist/components/env-var-request.d.ts.map +1 -0
  133. package/dist/components/env-var-request.js +50 -0
  134. package/dist/components/env-var-request.js.map +1 -0
  135. package/dist/components/field.d.ts +30 -0
  136. package/dist/components/field.d.ts.map +1 -0
  137. package/dist/components/field.js +48 -0
  138. package/dist/components/field.js.map +1 -0
  139. package/dist/components/file-upload.d.ts +108 -0
  140. package/dist/components/file-upload.d.ts.map +1 -0
  141. package/dist/components/file-upload.js +217 -0
  142. package/dist/components/file-upload.js.map +1 -0
  143. package/dist/components/hover-card.d.ts +18 -0
  144. package/dist/components/hover-card.d.ts.map +1 -0
  145. package/dist/components/hover-card.js +84 -0
  146. package/dist/components/hover-card.js.map +1 -0
  147. package/dist/components/input-group.d.ts +29 -0
  148. package/dist/components/input-group.d.ts.map +1 -0
  149. package/dist/components/input-group.js +61 -0
  150. package/dist/components/input-group.js.map +1 -0
  151. package/dist/components/input.d.ts +9 -0
  152. package/dist/components/input.d.ts.map +1 -0
  153. package/dist/components/input.js +13 -0
  154. package/dist/components/input.js.map +1 -0
  155. package/dist/components/island.d.ts +18 -0
  156. package/dist/components/island.d.ts.map +1 -0
  157. package/dist/components/island.js +30 -0
  158. package/dist/components/island.js.map +1 -0
  159. package/dist/components/kbd.d.ts +7 -0
  160. package/dist/components/kbd.d.ts.map +1 -0
  161. package/dist/components/kbd.js +11 -0
  162. package/dist/components/kbd.js.map +1 -0
  163. package/dist/components/label.d.ts +8 -0
  164. package/dist/components/label.d.ts.map +1 -0
  165. package/dist/components/label.js +12 -0
  166. package/dist/components/label.js.map +1 -0
  167. package/dist/components/markdown.d.ts +24 -0
  168. package/dist/components/markdown.d.ts.map +1 -0
  169. package/dist/components/markdown.js +38 -0
  170. package/dist/components/markdown.js.map +1 -0
  171. package/dist/components/message.d.ts +38 -0
  172. package/dist/components/message.d.ts.map +1 -0
  173. package/dist/components/message.js +25 -0
  174. package/dist/components/message.js.map +1 -0
  175. package/dist/components/page-header.d.ts +31 -0
  176. package/dist/components/page-header.d.ts.map +1 -0
  177. package/dist/components/page-header.js +94 -0
  178. package/dist/components/page-header.js.map +1 -0
  179. package/dist/components/pagination.d.ts +22 -0
  180. package/dist/components/pagination.d.ts.map +1 -0
  181. package/dist/components/pagination.js +36 -0
  182. package/dist/components/pagination.js.map +1 -0
  183. package/dist/components/password-input.d.ts +5 -0
  184. package/dist/components/password-input.d.ts.map +1 -0
  185. package/dist/components/password-input.js +12 -0
  186. package/dist/components/password-input.js.map +1 -0
  187. package/dist/components/pepper.d.ts +92 -0
  188. package/dist/components/pepper.d.ts.map +1 -0
  189. package/dist/components/pepper.js +1279 -0
  190. package/dist/components/pepper.js.map +1 -0
  191. package/dist/components/permission-request.d.ts +53 -0
  192. package/dist/components/permission-request.d.ts.map +1 -0
  193. package/dist/components/permission-request.js +54 -0
  194. package/dist/components/permission-request.js.map +1 -0
  195. package/dist/components/popover.d.ts +42 -0
  196. package/dist/components/popover.d.ts.map +1 -0
  197. package/dist/components/popover.js +76 -0
  198. package/dist/components/popover.js.map +1 -0
  199. package/dist/components/progress.d.ts +9 -0
  200. package/dist/components/progress.d.ts.map +1 -0
  201. package/dist/components/progress.js +12 -0
  202. package/dist/components/progress.js.map +1 -0
  203. package/dist/components/progressive-blur.d.ts +31 -0
  204. package/dist/components/progressive-blur.d.ts.map +1 -0
  205. package/dist/components/progressive-blur.js +44 -0
  206. package/dist/components/progressive-blur.js.map +1 -0
  207. package/dist/components/radio-group.d.ts +8 -0
  208. package/dist/components/radio-group.d.ts.map +1 -0
  209. package/dist/components/radio-group.js +15 -0
  210. package/dist/components/radio-group.js.map +1 -0
  211. package/dist/components/request-card.d.ts +34 -0
  212. package/dist/components/request-card.d.ts.map +1 -0
  213. package/dist/components/request-card.js +50 -0
  214. package/dist/components/request-card.js.map +1 -0
  215. package/dist/components/resizable.d.ts +24 -0
  216. package/dist/components/resizable.d.ts.map +1 -0
  217. package/dist/components/resizable.js +40 -0
  218. package/dist/components/resizable.js.map +1 -0
  219. package/dist/components/responsive-overlay.d.ts +136 -0
  220. package/dist/components/responsive-overlay.d.ts.map +1 -0
  221. package/dist/components/responsive-overlay.js +302 -0
  222. package/dist/components/responsive-overlay.js.map +1 -0
  223. package/dist/components/scroll-shadows.d.ts +11 -0
  224. package/dist/components/scroll-shadows.d.ts.map +1 -0
  225. package/dist/components/scroll-shadows.js +53 -0
  226. package/dist/components/scroll-shadows.js.map +1 -0
  227. package/dist/components/search-field.d.ts +16 -0
  228. package/dist/components/search-field.d.ts.map +1 -0
  229. package/dist/components/search-field.js +50 -0
  230. package/dist/components/search-field.js.map +1 -0
  231. package/dist/components/searchable-select.d.ts +43 -0
  232. package/dist/components/searchable-select.d.ts.map +1 -0
  233. package/dist/components/searchable-select.js +39 -0
  234. package/dist/components/searchable-select.js.map +1 -0
  235. package/dist/components/select.d.ts +60 -0
  236. package/dist/components/select.d.ts.map +1 -0
  237. package/dist/components/select.js +94 -0
  238. package/dist/components/select.js.map +1 -0
  239. package/dist/components/separator.d.ts +7 -0
  240. package/dist/components/separator.d.ts.map +1 -0
  241. package/dist/components/separator.js +12 -0
  242. package/dist/components/separator.js.map +1 -0
  243. package/dist/components/settings-section.d.ts +41 -0
  244. package/dist/components/settings-section.d.ts.map +1 -0
  245. package/dist/components/settings-section.js +50 -0
  246. package/dist/components/settings-section.js.map +1 -0
  247. package/dist/components/sidebar-item.d.ts +41 -0
  248. package/dist/components/sidebar-item.d.ts.map +1 -0
  249. package/dist/components/sidebar-item.js +59 -0
  250. package/dist/components/sidebar-item.js.map +1 -0
  251. package/dist/components/skeleton.d.ts +7 -0
  252. package/dist/components/skeleton.d.ts.map +1 -0
  253. package/dist/components/skeleton.js +11 -0
  254. package/dist/components/skeleton.js.map +1 -0
  255. package/dist/components/slider.d.ts +10 -0
  256. package/dist/components/slider.d.ts.map +1 -0
  257. package/dist/components/slider.js +36 -0
  258. package/dist/components/slider.js.map +1 -0
  259. package/dist/components/sonner.d.ts +8 -0
  260. package/dist/components/sonner.d.ts.map +1 -0
  261. package/dist/components/sonner.js +21 -0
  262. package/dist/components/sonner.js.map +1 -0
  263. package/dist/components/spinner.d.ts +7 -0
  264. package/dist/components/spinner.d.ts.map +1 -0
  265. package/dist/components/spinner.js +12 -0
  266. package/dist/components/spinner.js.map +1 -0
  267. package/dist/components/stat-strip.d.ts +20 -0
  268. package/dist/components/stat-strip.d.ts.map +1 -0
  269. package/dist/components/stat-strip.js +11 -0
  270. package/dist/components/stat-strip.js.map +1 -0
  271. package/dist/components/status-dot.d.ts +25 -0
  272. package/dist/components/status-dot.d.ts.map +1 -0
  273. package/dist/components/status-dot.js +31 -0
  274. package/dist/components/status-dot.js.map +1 -0
  275. package/dist/components/subagent-run.d.ts +27 -0
  276. package/dist/components/subagent-run.d.ts.map +1 -0
  277. package/dist/components/subagent-run.js +38 -0
  278. package/dist/components/subagent-run.js.map +1 -0
  279. package/dist/components/switch.d.ts +8 -0
  280. package/dist/components/switch.d.ts.map +1 -0
  281. package/dist/components/switch.js +13 -0
  282. package/dist/components/switch.js.map +1 -0
  283. package/dist/components/system-notice.d.ts +34 -0
  284. package/dist/components/system-notice.d.ts.map +1 -0
  285. package/dist/components/system-notice.js +52 -0
  286. package/dist/components/system-notice.js.map +1 -0
  287. package/dist/components/table.d.ts +27 -0
  288. package/dist/components/table.d.ts.map +1 -0
  289. package/dist/components/table.js +37 -0
  290. package/dist/components/table.js.map +1 -0
  291. package/dist/components/tabs.d.ts +40 -0
  292. package/dist/components/tabs.d.ts.map +1 -0
  293. package/dist/components/tabs.js +52 -0
  294. package/dist/components/tabs.js.map +1 -0
  295. package/dist/components/textarea.d.ts +5 -0
  296. package/dist/components/textarea.d.ts.map +1 -0
  297. package/dist/components/textarea.js +9 -0
  298. package/dist/components/textarea.js.map +1 -0
  299. package/dist/components/thinking-indicator.d.ts +21 -0
  300. package/dist/components/thinking-indicator.d.ts.map +1 -0
  301. package/dist/components/thinking-indicator.js +136 -0
  302. package/dist/components/thinking-indicator.js.map +1 -0
  303. package/dist/components/thread-status.d.ts +25 -0
  304. package/dist/components/thread-status.d.ts.map +1 -0
  305. package/dist/components/thread-status.js +41 -0
  306. package/dist/components/thread-status.js.map +1 -0
  307. package/dist/components/todo-list.d.ts +52 -0
  308. package/dist/components/todo-list.d.ts.map +1 -0
  309. package/dist/components/todo-list.js +137 -0
  310. package/dist/components/todo-list.js.map +1 -0
  311. package/dist/components/toggle-group.d.ts +17 -0
  312. package/dist/components/toggle-group.d.ts.map +1 -0
  313. package/dist/components/toggle-group.js +26 -0
  314. package/dist/components/toggle-group.js.map +1 -0
  315. package/dist/components/toggle.d.ts +27 -0
  316. package/dist/components/toggle.d.ts.map +1 -0
  317. package/dist/components/toggle.js +44 -0
  318. package/dist/components/toggle.js.map +1 -0
  319. package/dist/components/tool-call.d.ts +60 -0
  320. package/dist/components/tool-call.d.ts.map +1 -0
  321. package/dist/components/tool-call.js +94 -0
  322. package/dist/components/tool-call.js.map +1 -0
  323. package/dist/components/tool-result.d.ts +127 -0
  324. package/dist/components/tool-result.d.ts.map +1 -0
  325. package/dist/components/tool-result.js +155 -0
  326. package/dist/components/tool-result.js.map +1 -0
  327. package/dist/components/tooltip.d.ts +18 -0
  328. package/dist/components/tooltip.d.ts.map +1 -0
  329. package/dist/components/tooltip.js +38 -0
  330. package/dist/components/tooltip.js.map +1 -0
  331. package/dist/components/trace.d.ts +38 -0
  332. package/dist/components/trace.d.ts.map +1 -0
  333. package/dist/components/trace.js +52 -0
  334. package/dist/components/trace.js.map +1 -0
  335. package/dist/components/turn-summary.d.ts +17 -0
  336. package/dist/components/turn-summary.d.ts.map +1 -0
  337. package/dist/components/turn-summary.js +19 -0
  338. package/dist/components/turn-summary.js.map +1 -0
  339. package/dist/components/usage-meter.d.ts +16 -0
  340. package/dist/components/usage-meter.d.ts.map +1 -0
  341. package/dist/components/usage-meter.js +10 -0
  342. package/dist/components/usage-meter.js.map +1 -0
  343. package/dist/components/view-switcher.d.ts +25 -0
  344. package/dist/components/view-switcher.d.ts.map +1 -0
  345. package/dist/components/view-switcher.js +196 -0
  346. package/dist/components/view-switcher.js.map +1 -0
  347. package/dist/docs/components/accordion.md +151 -0
  348. package/dist/docs/components/activity-chart.md +104 -0
  349. package/dist/docs/components/alert-dialog.md +216 -0
  350. package/dist/docs/components/alert.md +203 -0
  351. package/dist/docs/components/ask-user-question.md +429 -0
  352. package/dist/docs/components/attachment-gallery.md +377 -0
  353. package/dist/docs/components/avatar.md +197 -0
  354. package/dist/docs/components/badge.md +162 -0
  355. package/dist/docs/components/brand-tile.md +138 -0
  356. package/dist/docs/components/button.md +392 -0
  357. package/dist/docs/components/calendar.md +113 -0
  358. package/dist/docs/components/card.md +157 -0
  359. package/dist/docs/components/carousel.md +144 -0
  360. package/dist/docs/components/catalog-card.md +136 -0
  361. package/dist/docs/components/chart.md +608 -0
  362. package/dist/docs/components/checkbox.md +164 -0
  363. package/dist/docs/components/chip.md +411 -0
  364. package/dist/docs/components/code-block.md +389 -0
  365. package/dist/docs/components/collapsible.md +93 -0
  366. package/dist/docs/components/command.md +276 -0
  367. package/dist/docs/components/composer.md +1092 -0
  368. package/dist/docs/components/connector-request.md +497 -0
  369. package/dist/docs/components/context-menu.md +127 -0
  370. package/dist/docs/components/data-table.md +462 -0
  371. package/dist/docs/components/date-range-picker.md +425 -0
  372. package/dist/docs/components/dialog.md +263 -0
  373. package/dist/docs/components/drawer.md +505 -0
  374. package/dist/docs/components/dropdown-menu.md +336 -0
  375. package/dist/docs/components/editor-tabs.md +283 -0
  376. package/dist/docs/components/empty-state.md +134 -0
  377. package/dist/docs/components/entity-card.md +640 -0
  378. package/dist/docs/components/entity-row.md +291 -0
  379. package/dist/docs/components/env-var-request.md +223 -0
  380. package/dist/docs/components/field.md +272 -0
  381. package/dist/docs/components/file-upload.md +255 -0
  382. package/dist/docs/components/hover-card.md +335 -0
  383. package/dist/docs/components/input-group.md +134 -0
  384. package/dist/docs/components/input.md +97 -0
  385. package/dist/docs/components/island.md +97 -0
  386. package/dist/docs/components/kbd.md +91 -0
  387. package/dist/docs/components/markdown.md +180 -0
  388. package/dist/docs/components/message.md +336 -0
  389. package/dist/docs/components/page-header.md +203 -0
  390. package/dist/docs/components/pagination.md +211 -0
  391. package/dist/docs/components/password-input.md +68 -0
  392. package/dist/docs/components/pepper.md +238 -0
  393. package/dist/docs/components/permission-request.md +265 -0
  394. package/dist/docs/components/popover.md +206 -0
  395. package/dist/docs/components/progress.md +142 -0
  396. package/dist/docs/components/progressive-blur.md +195 -0
  397. package/dist/docs/components/radio-group.md +129 -0
  398. package/dist/docs/components/request-card.md +305 -0
  399. package/dist/docs/components/resizable.md +318 -0
  400. package/dist/docs/components/responsive-overlay.md +449 -0
  401. package/dist/docs/components/scroll-shadows.md +161 -0
  402. package/dist/docs/components/search-field.md +86 -0
  403. package/dist/docs/components/searchable-select.md +144 -0
  404. package/dist/docs/components/select.md +331 -0
  405. package/dist/docs/components/separator.md +80 -0
  406. package/dist/docs/components/settings-section.md +246 -0
  407. package/dist/docs/components/sidebar-item.md +307 -0
  408. package/dist/docs/components/skeleton.md +107 -0
  409. package/dist/docs/components/slider.md +171 -0
  410. package/dist/docs/components/sonner.md +122 -0
  411. package/dist/docs/components/spinner.md +112 -0
  412. package/dist/docs/components/stat-strip.md +85 -0
  413. package/dist/docs/components/status-dot.md +190 -0
  414. package/dist/docs/components/subagent-run.md +196 -0
  415. package/dist/docs/components/switch.md +91 -0
  416. package/dist/docs/components/system-notice.md +144 -0
  417. package/dist/docs/components/table.md +201 -0
  418. package/dist/docs/components/tabs.md +233 -0
  419. package/dist/docs/components/textarea.md +89 -0
  420. package/dist/docs/components/thinking-indicator.md +164 -0
  421. package/dist/docs/components/thread-status.md +143 -0
  422. package/dist/docs/components/todo-list.md +225 -0
  423. package/dist/docs/components/toggle-group.md +117 -0
  424. package/dist/docs/components/toggle.md +132 -0
  425. package/dist/docs/components/tool-call.md +237 -0
  426. package/dist/docs/components/tool-result.md +418 -0
  427. package/dist/docs/components/tooltip.md +136 -0
  428. package/dist/docs/components/trace.md +319 -0
  429. package/dist/docs/components/turn-summary.md +218 -0
  430. package/dist/docs/components/usage-meter.md +69 -0
  431. package/dist/docs/components/view-switcher.md +193 -0
  432. package/dist/docs/foundations/colors.md +83 -0
  433. package/dist/docs/foundations/elevation.md +19 -0
  434. package/dist/docs/foundations/iconography.md +34 -0
  435. package/dist/docs/foundations/layout.md +42 -0
  436. package/dist/docs/foundations/logo.md +111 -0
  437. package/dist/docs/foundations/motion.md +91 -0
  438. package/dist/docs/foundations/radius.md +13 -0
  439. package/dist/docs/foundations/spacing.md +23 -0
  440. package/dist/docs/foundations/typography.md +42 -0
  441. package/dist/docs/getting-started/installation.md +116 -0
  442. package/dist/docs/getting-started/releases.md +59 -0
  443. package/dist/docs/getting-started/theming.md +58 -0
  444. package/dist/docs/guidelines/accessibility.md +28 -0
  445. package/dist/docs/guidelines/content.md +36 -0
  446. package/dist/docs/guidelines/forms.md +36 -0
  447. package/dist/docs/guidelines/principles.md +30 -0
  448. package/dist/docs/hooks/use-is-mobile.md +134 -0
  449. package/dist/docs/index.md +182 -0
  450. package/dist/docs/overview.md +35 -0
  451. package/dist/docs/patterns/chat.md +477 -0
  452. package/dist/docs/patterns/index.md +13 -0
  453. package/dist/docs/patterns/login.md +311 -0
  454. package/dist/docs/patterns/share.md +415 -0
  455. package/dist/hooks/use-is-mobile.d.ts +9 -0
  456. package/dist/hooks/use-is-mobile.d.ts.map +1 -0
  457. package/dist/hooks/use-is-mobile.js +26 -0
  458. package/dist/hooks/use-is-mobile.js.map +1 -0
  459. package/dist/lib/cn.d.ts +4 -0
  460. package/dist/lib/cn.d.ts.map +1 -0
  461. package/dist/lib/cn.js +31 -0
  462. package/dist/lib/cn.js.map +1 -0
  463. package/dist/lib/code-language.d.ts +8 -0
  464. package/dist/lib/code-language.d.ts.map +1 -0
  465. package/dist/lib/code-language.js +48 -0
  466. package/dist/lib/code-language.js.map +1 -0
  467. package/dist/lib/date-range.d.ts +122 -0
  468. package/dist/lib/date-range.d.ts.map +1 -0
  469. package/dist/lib/date-range.js +281 -0
  470. package/dist/lib/date-range.js.map +1 -0
  471. package/dist/lib/major-tokens.d.ts +40 -0
  472. package/dist/lib/major-tokens.d.ts.map +1 -0
  473. package/dist/lib/major-tokens.js +602 -0
  474. package/dist/lib/major-tokens.js.map +1 -0
  475. package/dist/lib/markdown.d.ts +25 -0
  476. package/dist/lib/markdown.d.ts.map +1 -0
  477. package/dist/lib/markdown.js +87 -0
  478. package/dist/lib/markdown.js.map +1 -0
  479. package/dist/lib/overlay-portal-branch.d.ts +6 -0
  480. package/dist/lib/overlay-portal-branch.d.ts.map +1 -0
  481. package/dist/lib/overlay-portal-branch.js +15 -0
  482. package/dist/lib/overlay-portal-branch.js.map +1 -0
  483. package/dist/lib/pepper-matcap.d.ts +2 -0
  484. package/dist/lib/pepper-matcap.d.ts.map +1 -0
  485. package/dist/lib/pepper-matcap.js +4 -0
  486. package/dist/lib/pepper-matcap.js.map +1 -0
  487. package/dist/lib/scroll-fade.d.ts +28 -0
  488. package/dist/lib/scroll-fade.d.ts.map +1 -0
  489. package/dist/lib/scroll-fade.js +57 -0
  490. package/dist/lib/scroll-fade.js.map +1 -0
  491. package/dist/tailwind.css +7 -0
  492. package/dist/theme.css +428 -0
  493. package/package.json +145 -3
  494. package/tokens.json +841 -0
  495. package/README.md +0 -3
@@ -0,0 +1,40 @@
1
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
2
+ export declare const TABS_LIST_VARIANTS: {
3
+ /** Segments on a grey track: Monthly · Annual, Production · Staging. */
4
+ readonly DEFAULT: "default";
5
+ /** Text tabs over a rule, the selected one underlined: categories of a gallery ("Get started with"). */
6
+ readonly UNDERLINE: "underline";
7
+ };
8
+ type TabsListVariant = (typeof TABS_LIST_VARIANTS)[keyof typeof TABS_LIST_VARIANTS];
9
+ export declare const TABS_LIST_SIZES: {
10
+ readonly DEFAULT: "default";
11
+ /** 24px segments in 12px type: a view switch tucked under a page title (a connector's views). */
12
+ readonly SM: "sm";
13
+ };
14
+ type TabsListSize = (typeof TABS_LIST_SIZES)[keyof typeof TABS_LIST_SIZES];
15
+ /**
16
+ * One of a few mutually exclusive options, set in place, always one selected. Controlled with `value` /
17
+ * `onValueChange`, or uncontrolled with `defaultValue`. Its list and content sit 8px apart.
18
+ */
19
+ export declare function Tabs({ className, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
20
+ type TabsListProps = TabsPrimitive.List.Props & {
21
+ /** `default` segments on a track, or `underline` text tabs over a rule. */
22
+ variant?: TabsListVariant;
23
+ /** `sm`: 24px segments in 12px type. */
24
+ size?: TabsListSize;
25
+ };
26
+ /**
27
+ * The track: `secondary` with a 3px inset (default), or a full-width rule (underline). Arrow keys move focus between
28
+ * tabs and Enter or Space selects (`activateOnFocus` selects on focus).
29
+ */
30
+ export declare function TabsList({ className, variant, size, ...props }: TabsListProps): import("react").JSX.Element;
31
+ /**
32
+ * A 28px segment. The selected one is the white `surface` with `shadow-card`, never green. A count goes in
33
+ * `<b>` (rendered `faint`); an icon is 14px, and an icon alone names its tab with `aria-label` and a Tooltip. Selection is styled off `aria-selected` as well as `data-active`, so a trigger that
34
+ * another part renders (`<TooltipTrigger render={<TabsTrigger … />}>`) still looks selected.
35
+ */
36
+ export declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react").JSX.Element;
37
+ /** The panel of the selected tab. No styles of its own beyond filling the space. */
38
+ export declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react").JSX.Element;
39
+ export {};
40
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG5D,eAAO,MAAM,kBAAkB;IAC7B,wEAAwE;;IAExE,wGAAwG;;CAEhG,CAAC;AAEX,KAAK,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAEpF,eAAO,MAAM,eAAe;;IAE1B,iGAAiG;;CAEzF,CAAC;AAEX,KAAK,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAS3E;;;GAGG;AACH,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,KAAK,+BAErE;AAED,KAAK,aAAa,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,GAAG;IAC9C,2EAA2E;IAC3E,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,wCAAwC;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,SAAS,EACT,OAAoC,EACpC,IAA8B,EAC9B,GAAG,KAAK,EACT,EAAE,aAAa,+BAUf;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,+BAsB3E;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,CAAC,KAAK,CAAC,KAAK,+BAE7E"}
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
4
+ import { cn } from "../lib/cn.js";
5
+ export const TABS_LIST_VARIANTS = {
6
+ /** Segments on a grey track: Monthly · Annual, Production · Staging. */
7
+ DEFAULT: "default",
8
+ /** Text tabs over a rule, the selected one underlined: categories of a gallery ("Get started with"). */
9
+ UNDERLINE: "underline",
10
+ };
11
+ export const TABS_LIST_SIZES = {
12
+ DEFAULT: "default",
13
+ /** 24px segments in 12px type: a view switch tucked under a page title (a connector's views). */
14
+ SM: "sm",
15
+ };
16
+ const TABS_LIST_VARIANT_CLASSES = {
17
+ [TABS_LIST_VARIANTS.DEFAULT]: "gap-space-2 rounded-row bg-secondary p-0.75 data-[size=sm]:gap-px data-[size=sm]:p-0.5",
18
+ // The rule is an inset shadow, not a border: tabs then sit inside the list, and a scrolling list doesn't clip their underline.
19
+ [TABS_LIST_VARIANTS.UNDERLINE]: "w-full gap-space-4 shadow-[inset_0_-1px_0_var(--color-line)]",
20
+ };
21
+ /**
22
+ * One of a few mutually exclusive options, set in place, always one selected. Controlled with `value` /
23
+ * `onValueChange`, or uncontrolled with `defaultValue`. Its list and content sit 8px apart.
24
+ */
25
+ export function Tabs({ className, ...props }) {
26
+ return _jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: cn("flex flex-col gap-space-8", className), ...props });
27
+ }
28
+ /**
29
+ * The track: `secondary` with a 3px inset (default), or a full-width rule (underline). Arrow keys move focus between
30
+ * tabs and Enter or Space selects (`activateOnFocus` selects on focus).
31
+ */
32
+ export function TabsList({ className, variant = TABS_LIST_VARIANTS.DEFAULT, size = TABS_LIST_SIZES.DEFAULT, ...props }) {
33
+ return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", "data-variant": variant, "data-size": size, className: cn("group/tabs-list inline-flex w-fit items-center", TABS_LIST_VARIANT_CLASSES[variant], className), ...props }));
34
+ }
35
+ /**
36
+ * A 28px segment. The selected one is the white `surface` with `shadow-card`, never green. A count goes in
37
+ * `<b>` (rendered `faint`); an icon is 14px, and an icon alone names its tab with `aria-label` and a Tooltip. Selection is styled off `aria-selected` as well as `data-active`, so a trigger that
38
+ * another part renders (`<TooltipTrigger render={<TabsTrigger … />}>`) still looks selected.
39
+ */
40
+ export function TabsTrigger({ className, ...props }) {
41
+ return (_jsx(TabsPrimitive.Tab, { "data-slot": "tabs-trigger", className: cn("inline-flex h-7 cursor-pointer items-center gap-space-6 whitespace-nowrap rounded-segment px-space-12 font-sans text-ui font-medium text-muted outline-none transition-[background-color,color] duration-150",
42
+ // A disabled tab keeps focus (Base UI sets aria-disabled, not disabled), so it's styled off data-disabled.
43
+ "focus-visible:ring-2 focus-visible:ring-faint data-disabled:pointer-events-none data-disabled:opacity-50", "data-active:bg-surface data-active:text-ink data-active:shadow-card", "aria-selected:bg-surface aria-selected:text-ink aria-selected:shadow-card", "[&_b]:font-normal [&_b]:text-faint [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5", "group-data-[size=sm]/tabs-list:h-6 group-data-[size=sm]/tabs-list:gap-1.25 group-data-[size=sm]/tabs-list:px-2.25 group-data-[size=sm]/tabs-list:text-small",
44
+ // Underline: no segment; the selected tab draws a 2px accent rule over the list's. `shadow-accent` sets the rule's
45
+ // colour: `shadow-card` above also reads as the card colour, and would turn the rule white.
46
+ "group-data-[variant=underline]/tabs-list:h-9.5 group-data-[variant=underline]/tabs-list:rounded-none group-data-[variant=underline]/tabs-list:px-3.5 group-data-[variant=underline]/tabs-list:text-card-title group-data-[variant=underline]/tabs-list:font-normal", "group-data-[variant=underline]/tabs-list:data-active:bg-transparent group-data-[variant=underline]/tabs-list:data-active:font-medium group-data-[variant=underline]/tabs-list:data-active:shadow-[inset_0_-2px_0_var(--color-accent)] group-data-[variant=underline]/tabs-list:data-active:shadow-accent", "group-data-[variant=underline]/tabs-list:aria-selected:bg-transparent group-data-[variant=underline]/tabs-list:aria-selected:font-medium group-data-[variant=underline]/tabs-list:aria-selected:shadow-[inset_0_-2px_0_var(--color-accent)] group-data-[variant=underline]/tabs-list:aria-selected:shadow-accent", className), ...props }));
47
+ }
48
+ /** The panel of the selected tab. No styles of its own beyond filling the space. */
49
+ export function TabsContent({ className, ...props }) {
50
+ return _jsx(TabsPrimitive.Panel, { "data-slot": "tabs-content", className: cn("flex-1 outline-none", className), ...props });
51
+ }
52
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,wEAAwE;IACxE,OAAO,EAAE,SAAS;IAClB,wGAAwG;IACxG,SAAS,EAAE,WAAW;CACd,CAAC;AAIX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,SAAS;IAClB,iGAAiG;IACjG,EAAE,EAAE,IAAI;CACA,CAAC;AAIX,MAAM,yBAAyB,GAAG;IAChC,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAC1B,wFAAwF;IAC1F,+HAA+H;IAC/H,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,8DAA8D;CACrD,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA4B;IACpE,OAAO,KAAC,aAAa,CAAC,IAAI,iBAAW,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACnH,CAAC;AASD;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,SAAS,EACT,OAAO,GAAG,kBAAkB,CAAC,OAAO,EACpC,IAAI,GAAG,eAAe,CAAC,OAAO,EAC9B,GAAG,KAAK,EACM;IACd,OAAO,CACL,KAAC,aAAa,CAAC,IAAI,iBACP,WAAW,kBACP,OAAO,eACV,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,gDAAgD,EAAE,yBAAyB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,KAC1G,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA2B;IAC1E,OAAO,CACL,KAAC,aAAa,CAAC,GAAG,iBACN,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,8MAA8M;QAC9M,2GAA2G;QAC3G,0GAA0G,EAC1G,qEAAqE,EACrE,2EAA2E,EAC3E,4FAA4F,EAC5F,6JAA6J;QAC7J,mHAAmH;QACnH,4FAA4F;QAC5F,oQAAoQ,EACpQ,0SAA0S,EAC1S,kTAAkT,EAClT,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IAC5E,OAAO,KAAC,aAAa,CAAC,KAAK,iBAAW,cAAc,EAAC,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACtH,CAAC","sourcesContent":["\"use client\";\n\nimport { Tabs as TabsPrimitive } from \"@base-ui/react/tabs\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport const TABS_LIST_VARIANTS = {\n /** Segments on a grey track: Monthly · Annual, Production · Staging. */\n DEFAULT: \"default\",\n /** Text tabs over a rule, the selected one underlined: categories of a gallery (\"Get started with\"). */\n UNDERLINE: \"underline\",\n} as const;\n\ntype TabsListVariant = (typeof TABS_LIST_VARIANTS)[keyof typeof TABS_LIST_VARIANTS];\n\nexport const TABS_LIST_SIZES = {\n DEFAULT: \"default\",\n /** 24px segments in 12px type: a view switch tucked under a page title (a connector's views). */\n SM: \"sm\",\n} as const;\n\ntype TabsListSize = (typeof TABS_LIST_SIZES)[keyof typeof TABS_LIST_SIZES];\n\nconst TABS_LIST_VARIANT_CLASSES = {\n [TABS_LIST_VARIANTS.DEFAULT]:\n \"gap-space-2 rounded-row bg-secondary p-0.75 data-[size=sm]:gap-px data-[size=sm]:p-0.5\",\n // The rule is an inset shadow, not a border: tabs then sit inside the list, and a scrolling list doesn't clip their underline.\n [TABS_LIST_VARIANTS.UNDERLINE]: \"w-full gap-space-4 shadow-[inset_0_-1px_0_var(--color-line)]\",\n} satisfies Record<TabsListVariant, string>;\n\n/**\n * One of a few mutually exclusive options, set in place, always one selected. Controlled with `value` /\n * `onValueChange`, or uncontrolled with `defaultValue`. Its list and content sit 8px apart.\n */\nexport function Tabs({ className, ...props }: TabsPrimitive.Root.Props) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn(\"flex flex-col gap-space-8\", className)} {...props} />;\n}\n\ntype TabsListProps = TabsPrimitive.List.Props & {\n /** `default` segments on a track, or `underline` text tabs over a rule. */\n variant?: TabsListVariant;\n /** `sm`: 24px segments in 12px type. */\n size?: TabsListSize;\n};\n\n/**\n * The track: `secondary` with a 3px inset (default), or a full-width rule (underline). Arrow keys move focus between\n * tabs and Enter or Space selects (`activateOnFocus` selects on focus).\n */\nexport function TabsList({\n className,\n variant = TABS_LIST_VARIANTS.DEFAULT,\n size = TABS_LIST_SIZES.DEFAULT,\n ...props\n}: TabsListProps) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n data-variant={variant}\n data-size={size}\n className={cn(\"group/tabs-list inline-flex w-fit items-center\", TABS_LIST_VARIANT_CLASSES[variant], className)}\n {...props}\n />\n );\n}\n\n/**\n * A 28px segment. The selected one is the white `surface` with `shadow-card`, never green. A count goes in\n * `<b>` (rendered `faint`); an icon is 14px, and an icon alone names its tab with `aria-label` and a Tooltip. Selection is styled off `aria-selected` as well as `data-active`, so a trigger that\n * another part renders (`<TooltipTrigger render={<TabsTrigger … />}>`) still looks selected.\n */\nexport function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n <TabsPrimitive.Tab\n data-slot=\"tabs-trigger\"\n className={cn(\n \"inline-flex h-7 cursor-pointer items-center gap-space-6 whitespace-nowrap rounded-segment px-space-12 font-sans text-ui font-medium text-muted outline-none transition-[background-color,color] duration-150\",\n // A disabled tab keeps focus (Base UI sets aria-disabled, not disabled), so it's styled off data-disabled.\n \"focus-visible:ring-2 focus-visible:ring-faint data-disabled:pointer-events-none data-disabled:opacity-50\",\n \"data-active:bg-surface data-active:text-ink data-active:shadow-card\",\n \"aria-selected:bg-surface aria-selected:text-ink aria-selected:shadow-card\",\n \"[&_b]:font-normal [&_b]:text-faint [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n \"group-data-[size=sm]/tabs-list:h-6 group-data-[size=sm]/tabs-list:gap-1.25 group-data-[size=sm]/tabs-list:px-2.25 group-data-[size=sm]/tabs-list:text-small\",\n // Underline: no segment; the selected tab draws a 2px accent rule over the list's. `shadow-accent` sets the rule's\n // colour: `shadow-card` above also reads as the card colour, and would turn the rule white.\n \"group-data-[variant=underline]/tabs-list:h-9.5 group-data-[variant=underline]/tabs-list:rounded-none group-data-[variant=underline]/tabs-list:px-3.5 group-data-[variant=underline]/tabs-list:text-card-title group-data-[variant=underline]/tabs-list:font-normal\",\n \"group-data-[variant=underline]/tabs-list:data-active:bg-transparent group-data-[variant=underline]/tabs-list:data-active:font-medium group-data-[variant=underline]/tabs-list:data-active:shadow-[inset_0_-2px_0_var(--color-accent)] group-data-[variant=underline]/tabs-list:data-active:shadow-accent\",\n \"group-data-[variant=underline]/tabs-list:aria-selected:bg-transparent group-data-[variant=underline]/tabs-list:aria-selected:font-medium group-data-[variant=underline]/tabs-list:aria-selected:shadow-[inset_0_-2px_0_var(--color-accent)] group-data-[variant=underline]/tabs-list:aria-selected:shadow-accent\",\n className\n )}\n {...props}\n />\n );\n}\n\n/** The panel of the selected tab. No styles of its own beyond filling the space. */\nexport function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return <TabsPrimitive.Panel data-slot=\"tabs-content\" className={cn(\"flex-1 outline-none\", className)} {...props} />;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { ComponentProps } from "react";
2
+ /** The multi-line field: the Input's frame, 13px/1.55, 76px tall at least and resizable vertically. */
3
+ declare function Textarea({ className, ...props }: ComponentProps<"textarea">): import("react").JSX.Element;
4
+ export { Textarea };
5
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,uGAAuG;AACvG,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,UAAU,CAAC,+BAcpE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../lib/cn.js";
4
+ /** The multi-line field: the Input's frame, 13px/1.55, 76px tall at least and resizable vertically. */
5
+ function Textarea({ className, ...props }) {
6
+ return (_jsx("textarea", { "data-slot": "textarea", className: cn("min-h-19 w-full min-w-0 resize-y rounded-md border border-line bg-surface px-space-10 py-space-8 font-sans text-ui leading-[1.55] text-ink outline-none transition-[border-color,box-shadow] duration-120", "placeholder:text-muted disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:border-faint focus-visible:ring-2 focus-visible:ring-secondary", "aria-invalid:border-danger/60 aria-invalid:ring-2 aria-invalid:ring-danger/14", className), ...props }));
7
+ }
8
+ export { Textarea };
9
+ //# sourceMappingURL=textarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,uGAAuG;AACvG,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACnE,OAAO,CACL,gCACY,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,2MAA2M,EAC3M,wEAAwE,EACxE,8EAA8E,EAC9E,+EAA+E,EAC/E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/** The multi-line field: the Input's frame, 13px/1.55, 76px tall at least and resizable vertically. */\nfunction Textarea({ className, ...props }: ComponentProps<\"textarea\">) {\n return (\n <textarea\n data-slot=\"textarea\"\n className={cn(\n \"min-h-19 w-full min-w-0 resize-y rounded-md border border-line bg-surface px-space-10 py-space-8 font-sans text-ui leading-[1.55] text-ink outline-none transition-[border-color,box-shadow] duration-120\",\n \"placeholder:text-muted disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:border-faint focus-visible:ring-2 focus-visible:ring-secondary\",\n \"aria-invalid:border-danger/60 aria-invalid:ring-2 aria-invalid:ring-danger/14\",\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Textarea };\n"]}
@@ -0,0 +1,21 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ /**
3
+ * The Major mark at 22px as seven bottle-green glass cubes, drawn with CSS 3D transforms. It sways, turns about the
4
+ * vertical, then turns about the diagonal it is symmetric about, every 7.2s, for as long as it is shown; with reduced
5
+ * motion it holds its first frame. Decorative (`aria-hidden`).
6
+ */
7
+ export declare function ThinkingMark({ className, style, ...props }: ComponentProps<"span">): import("react").JSX.Element;
8
+ export type ThinkingIndicatorProps = Omit<ComponentProps<"div">, "children"> & {
9
+ /** What Major is doing now, in a word or two of present tense: “Searching”, “Writing a response”. */
10
+ label: string;
11
+ /** Stands in for the ThinkingMark, for a surface with a character of its own (Pepper). */
12
+ mark?: ReactNode;
13
+ };
14
+ /**
15
+ * Major at work in the chat, at the end of its turn: the ThinkingMark beside a 13px shimmering label of what it is
16
+ * doing now. It rises in as it mounts; a new label rolls up into the old one's place, and each label stays at least
17
+ * 700ms; with reduced motion they fade instead. A polite live region (`role="status"`) reads each label once. Mount it
18
+ * while the turn runs and unmount it when the turn ends.
19
+ */
20
+ export declare function ThinkingIndicator({ label, mark, className, ...props }: ThinkingIndicatorProps): import("react").JSX.Element;
21
+ //# sourceMappingURL=thinking-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thinking-indicator.d.ts","sourceRoot":"","sources":["../../src/components/thinking-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA2GzF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,MAAM,CAAC,+BA+BlF;AAgCD,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7E,qGAAqG;IACrG,KAAK,EAAE,MAAM,CAAC;IACd,0FAA0F;IAC1F,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,+BAmC7F"}
@@ -0,0 +1,136 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from "react";
4
+ import { AnimatePresence, easeInOut, easeOut, motion, useReducedMotion, useTime, useTransform } from "motion/react";
5
+ import { cn } from "../lib/cn.js";
6
+ /** As big as the indicator's mark slot. */
7
+ const MARK_SIZE = 22;
8
+ /** Edge-on along its diagonal the mark spans tile × √2, so this keeps it inside the square. */
9
+ const TILE_SIZE = MARK_SIZE * 0.68;
10
+ const CELL_PITCH = TILE_SIZE / 3;
11
+ /** Share of its cell a cube fills; the rest is the cut between the squares. */
12
+ const CUBE_FILL = 0.92;
13
+ const CUBE_SIZE = CELL_PITCH * CUBE_FILL;
14
+ const CUBE_INSET = (CELL_PITCH - CUBE_SIZE) / 2;
15
+ const HALF_CUBE = CUBE_SIZE / 2;
16
+ /** The mark's seven cells on its 3×3 grid as [column, row]. */
17
+ const MARK_CELLS = [
18
+ [0, 0],
19
+ [1, 0],
20
+ [2, 0],
21
+ [1, 1],
22
+ [2, 1],
23
+ [0, 2],
24
+ [2, 2],
25
+ ];
26
+ /** The Major mark's own colours: its deep green tile and the mint glow from its top-right corner. */
27
+ const BRAND_DEEP = "var(--color-brand-deep)";
28
+ const BRAND_MINT = "var(--color-brand-mint)";
29
+ const mixMint = (percent) => `color-mix(in oklab, ${BRAND_MINT} ${percent}%, ${BRAND_DEEP})`;
30
+ /**
31
+ * Bottle-green glass, only slightly see-through: the faces toward the light (front, top, right) are clearer and
32
+ * greener, the far ones denser, and every edge catches a light green rim.
33
+ */
34
+ const GLASS_FILLS = {
35
+ FRONT: `color-mix(in oklab, ${mixMint(38)} 84%, transparent)`,
36
+ BACK: `color-mix(in oklab, ${mixMint(18)} 88%, transparent)`,
37
+ SIDE_LIT: `color-mix(in oklab, ${mixMint(46)} 86%, transparent)`,
38
+ SIDE_SHADE: `color-mix(in oklab, ${BRAND_DEEP} 92%, transparent)`,
39
+ };
40
+ const GLASS_RIM = `inset 0 0 0 0.75px color-mix(in oklab, ${mixMint(72)} 70%, transparent)`;
41
+ /**
42
+ * Spans the whole mark's front, so the mint glow and the glint run across the cubes as across one piece of glass. The
43
+ * glint is white at half strength in both themes, a highlight on glass rather than a colour, so it has no token.
44
+ */
45
+ const GLASS_FRONT_LIGHT = `linear-gradient(135deg, transparent 30%, rgb(255 255 255 / 0.5) 37%, transparent 44%), radial-gradient(circle at 100% 0%, color-mix(in oklab, ${BRAND_MINT} 75%, transparent), transparent 75%)`;
46
+ /** Every face but the front, which also carries the mark-wide light. */
47
+ const CUBE_FACES = [
48
+ { key: "back", transform: `rotateY(180deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.BACK },
49
+ { key: "right", transform: `rotateY(90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_LIT },
50
+ { key: "left", transform: `rotateY(-90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_SHADE },
51
+ { key: "top", transform: `rotateX(90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_LIT },
52
+ { key: "bottom", transform: `rotateX(-90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_SHADE },
53
+ ];
54
+ /**
55
+ * One cycle: a sway, a full turn about the vertical axis, a beat, then a full turn about the diagonal the mark is
56
+ * symmetric about (its top-right corner to its notch), and a rest. Both turns end where they began.
57
+ */
58
+ const CYCLE_MS = 7200;
59
+ const CYCLE_TIMES = [0, 0.1, 0.4, 0.5, 0.86, 1];
60
+ const linear = (progress) => progress;
61
+ const CYCLE_EASES = [easeOut, easeInOut, easeOut, easeInOut, linear];
62
+ const TURN_Y = [0, -24, 360, 360, 360, 360];
63
+ const TILT_X = [14, 8, 14, 14, 14, 14];
64
+ const TURN_DIAGONAL = [0, 0, 0, 0, 360, 360];
65
+ /** A label stays at least this long, so a tool that finishes in a few hundred ms never rolls a label in and out. */
66
+ const MIN_LABEL_MS = 700;
67
+ /** How far the indicator rises as it mounts, and a label rolls in and out. */
68
+ const RISE_PX = 4;
69
+ const ROLL_PX = 14;
70
+ const CONTAINER_TRANSITION = { duration: 0.25, ease: [0.25, 0.1, 0.25, 1] };
71
+ const LABEL_TRANSITION = { duration: 0.35, ease: [0.16, 1, 0.3, 1] };
72
+ /** One cell of the mark as a glass cube, centred on the mark's middle plane. */
73
+ function GlassCube({ column, row }) {
74
+ const left = column * CELL_PITCH + CUBE_INSET;
75
+ const top = row * CELL_PITCH + CUBE_INSET;
76
+ return (_jsxs("span", { className: "absolute transform-3d", style: { left, top, width: CUBE_SIZE, height: CUBE_SIZE }, children: [_jsx("span", { className: "absolute inset-0", style: {
77
+ transform: `translateZ(${HALF_CUBE}px)`,
78
+ backgroundColor: GLASS_FILLS.FRONT,
79
+ backgroundImage: GLASS_FRONT_LIGHT,
80
+ backgroundSize: `${TILE_SIZE}px ${TILE_SIZE}px`,
81
+ backgroundPosition: `${-left}px ${-top}px`,
82
+ boxShadow: GLASS_RIM,
83
+ } }), CUBE_FACES.map((face) => (_jsx("span", { className: "absolute inset-0", style: { transform: face.transform, backgroundColor: face.fill, boxShadow: GLASS_RIM } }, face.key)))] }));
84
+ }
85
+ /**
86
+ * The Major mark at 22px as seven bottle-green glass cubes, drawn with CSS 3D transforms. It sways, turns about the
87
+ * vertical, then turns about the diagonal it is symmetric about, every 7.2s, for as long as it is shown; with reduced
88
+ * motion it holds its first frame. Decorative (`aria-hidden`).
89
+ */
90
+ export function ThinkingMark({ className, style, ...props }) {
91
+ // One clock drives every rotation, so the turns stay in step.
92
+ const isReducedMotion = useReducedMotion();
93
+ const time = useTime();
94
+ const cycleProgress = useTransform(time, (ms) => (isReducedMotion ? 0 : (ms / CYCLE_MS) % 1));
95
+ const turnY = useTransform(cycleProgress, CYCLE_TIMES, TURN_Y, { ease: CYCLE_EASES });
96
+ const tiltX = useTransform(cycleProgress, CYCLE_TIMES, TILT_X, { ease: CYCLE_EASES });
97
+ const turnDiagonal = useTransform(cycleProgress, CYCLE_TIMES, TURN_DIAGONAL, { ease: CYCLE_EASES });
98
+ return (_jsx("span", { "aria-hidden": true, "data-slot": "thinking-mark", className: cn("grid shrink-0 place-items-center", className), style: { width: MARK_SIZE, height: MARK_SIZE, perspective: MARK_SIZE * 5, ...style }, ...props, children: _jsx(motion.span, { className: "block transform-3d", style: { width: TILE_SIZE, height: TILE_SIZE, rotateY: turnY, rotateX: tiltX }, children: _jsx("span", { className: "block size-full transform-3d", style: { transform: "rotateZ(-45deg)" }, children: _jsx(motion.span, { className: "block size-full transform-3d", style: { rotateX: turnDiagonal }, children: _jsx("span", { className: "relative block size-full transform-3d", style: { transform: "rotateZ(45deg)" }, children: MARK_CELLS.map(([column, row]) => (_jsx(GlassCube, { column: column, row: row }, `${column}-${row}`))) }) }) }) }) }));
99
+ }
100
+ /**
101
+ * The label to show: the first one at once, then at most one change per MIN_LABEL_MS, so a burst of changes settles on
102
+ * its last value and short-lived ones are never shown (the web's trailing useThrottled).
103
+ */
104
+ function useHeldLabel(label) {
105
+ const [heldLabel, setHeldLabel] = useState(label);
106
+ const holdUntilRef = useRef(0);
107
+ useEffect(() => {
108
+ if (label === heldLabel) {
109
+ return;
110
+ }
111
+ const now = performance.now();
112
+ if (holdUntilRef.current <= now) {
113
+ holdUntilRef.current = now + MIN_LABEL_MS;
114
+ }
115
+ const timeout = setTimeout(() => {
116
+ holdUntilRef.current = performance.now() + MIN_LABEL_MS;
117
+ setHeldLabel(label);
118
+ }, Math.max(0, holdUntilRef.current - now));
119
+ return () => clearTimeout(timeout);
120
+ }, [label, heldLabel]);
121
+ return heldLabel;
122
+ }
123
+ /**
124
+ * Major at work in the chat, at the end of its turn: the ThinkingMark beside a 13px shimmering label of what it is
125
+ * doing now. It rises in as it mounts; a new label rolls up into the old one's place, and each label stays at least
126
+ * 700ms; with reduced motion they fade instead. A polite live region (`role="status"`) reads each label once. Mount it
127
+ * while the turn runs and unmount it when the turn ends.
128
+ */
129
+ export function ThinkingIndicator({ label, mark, className, ...props }) {
130
+ const heldLabel = useHeldLabel(label);
131
+ const isReducedMotion = useReducedMotion();
132
+ const rise = isReducedMotion ? 0 : RISE_PX;
133
+ const roll = isReducedMotion ? 0 : ROLL_PX;
134
+ return (_jsxs("div", { "data-slot": "thinking-indicator", role: "status", "aria-live": "polite", className: className, ...props, children: [_jsx("span", { className: "sr-only", children: heldLabel }), _jsxs(motion.div, { "aria-hidden": true, initial: { y: rise, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: CONTAINER_TRANSITION, className: "flex min-h-12 w-full items-center gap-3 py-3", children: [mark ?? _jsx(ThinkingMark, {}), _jsx("div", { className: "relative h-6 min-w-0 flex-1 overflow-hidden", children: _jsx(AnimatePresence, { initial: false, mode: "popLayout", children: _jsx(motion.span, { initial: { y: roll, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -roll, opacity: 0 }, transition: LABEL_TRANSITION, className: "absolute inset-x-0 truncate text-ui leading-6 shimmer-text", children: heldLabel }, heldLabel) }) })] })] }));
135
+ }
136
+ //# sourceMappingURL=thinking-indicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thinking-indicator.js","sourceRoot":"","sources":["../../src/components/thinking-indicator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAuC,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACpH,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,2CAA2C;AAC3C,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,+FAA+F;AAC/F,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AACnC,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC;AACjC,+EAA+E;AAC/E,MAAM,SAAS,GAAG,IAAI,CAAC;AACvB,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AACzC,MAAM,UAAU,GAAG,CAAC,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AAChD,MAAM,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC;AAEhC,+DAA+D;AAC/D,MAAM,UAAU,GAAG;IACjB,CAAC,CAAC,EAAE,CAAC,CAAC;IACN,CAAC,CAAC,EAAE,CAAC,CAAC;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e,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAC3C,MAAM,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAE3C,OAAO,CACL,4BAAe,oBAAoB,EAAC,IAAI,EAAC,QAAQ,eAAW,QAAQ,EAAC,SAAS,EAAE,SAAS,KAAM,KAAK,aAElG,eAAM,SAAS,EAAC,SAAS,YAAE,SAAS,GAAQ,EAC5C,MAAC,MAAM,CAAC,GAAG,yBAET,OAAO,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAChC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAC7B,UAAU,EAAE,oBAAoB,EAChC,SAAS,EAAC,8CAA8C,aAEvD,IAAI,IAAI,KAAC,YAAY,KAAG,EACzB,cAAK,SAAS,EAAC,6CAA6C,YAC1D,KAAC,eAAe,IAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAC,WAAW,YAC/C,KAAC,MAAM,CAAC,IAAI,IAEV,OAAO,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAChC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAC7B,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAC9B,UAAU,EAAE,gBAAgB,EAC5B,SAAS,EAAC,4DAA4D,YAErE,SAAS,IAPL,SAAS,CAQF,GACE,GACd,IACK,IACT,CACP,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport { useEffect, useRef, useState, type ComponentProps, type ReactNode } from \"react\";\nimport { AnimatePresence, easeInOut, easeOut, motion, useReducedMotion, useTime, useTransform } from \"motion/react\";\nimport { cn } from \"../lib/cn.ts\";\n\n/** As big as the indicator's mark slot. */\nconst MARK_SIZE = 22;\n/** Edge-on along its diagonal the mark spans tile × √2, so this keeps it inside the square. */\nconst TILE_SIZE = MARK_SIZE * 0.68;\nconst CELL_PITCH = TILE_SIZE / 3;\n/** Share of its cell a cube fills; the rest is the cut between the squares. */\nconst CUBE_FILL = 0.92;\nconst CUBE_SIZE = CELL_PITCH * CUBE_FILL;\nconst CUBE_INSET = (CELL_PITCH - CUBE_SIZE) / 2;\nconst HALF_CUBE = CUBE_SIZE / 2;\n\n/** The mark's seven cells on its 3×3 grid as [column, row]. */\nconst MARK_CELLS = [\n [0, 0],\n [1, 0],\n [2, 0],\n [1, 1],\n [2, 1],\n [0, 2],\n [2, 2],\n] as const;\n\n/** The Major mark's own colours: its deep green tile and the mint glow from its top-right corner. */\nconst BRAND_DEEP = \"var(--color-brand-deep)\";\nconst BRAND_MINT = \"var(--color-brand-mint)\";\n\nconst mixMint = (percent: number) => `color-mix(in oklab, ${BRAND_MINT} ${percent}%, ${BRAND_DEEP})`;\n\n/**\n * Bottle-green glass, only slightly see-through: the faces toward the light (front, top, right) are clearer and\n * greener, the far ones denser, and every edge catches a light green rim.\n */\nconst GLASS_FILLS = {\n FRONT: `color-mix(in oklab, ${mixMint(38)} 84%, transparent)`,\n BACK: `color-mix(in oklab, ${mixMint(18)} 88%, transparent)`,\n SIDE_LIT: `color-mix(in oklab, ${mixMint(46)} 86%, transparent)`,\n SIDE_SHADE: `color-mix(in oklab, ${BRAND_DEEP} 92%, transparent)`,\n} as const;\nconst GLASS_RIM = `inset 0 0 0 0.75px color-mix(in oklab, ${mixMint(72)} 70%, transparent)`;\n/**\n * Spans the whole mark's front, so the mint glow and the glint run across the cubes as across one piece of glass. The\n * glint is white at half strength in both themes, a highlight on glass rather than a colour, so it has no token.\n */\nconst GLASS_FRONT_LIGHT = `linear-gradient(135deg, transparent 30%, rgb(255 255 255 / 0.5) 37%, transparent 44%), radial-gradient(circle at 100% 0%, color-mix(in oklab, ${BRAND_MINT} 75%, transparent), transparent 75%)`;\n\n/** Every face but the front, which also carries the mark-wide light. */\nconst CUBE_FACES = [\n { key: \"back\", transform: `rotateY(180deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.BACK },\n { key: \"right\", transform: `rotateY(90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_LIT },\n { key: \"left\", transform: `rotateY(-90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_SHADE },\n { key: \"top\", transform: `rotateX(90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_LIT },\n { key: \"bottom\", transform: `rotateX(-90deg) translateZ(${HALF_CUBE}px)`, fill: GLASS_FILLS.SIDE_SHADE },\n] as const;\n\n/**\n * One cycle: a sway, a full turn about the vertical axis, a beat, then a full turn about the diagonal the mark is\n * symmetric about (its top-right corner to its notch), and a rest. Both turns end where they began.\n */\nconst CYCLE_MS = 7200;\nconst CYCLE_TIMES = [0, 0.1, 0.4, 0.5, 0.86, 1];\nconst linear = (progress: number) => progress;\nconst CYCLE_EASES = [easeOut, easeInOut, easeOut, easeInOut, linear];\nconst TURN_Y = [0, -24, 360, 360, 360, 360];\nconst TILT_X = [14, 8, 14, 14, 14, 14];\nconst TURN_DIAGONAL = [0, 0, 0, 0, 360, 360];\n\n/** A label stays at least this long, so a tool that finishes in a few hundred ms never rolls a label in and out. */\nconst MIN_LABEL_MS = 700;\n/** How far the indicator rises as it mounts, and a label rolls in and out. */\nconst RISE_PX = 4;\nconst ROLL_PX = 14;\nconst CONTAINER_TRANSITION = { duration: 0.25, ease: [0.25, 0.1, 0.25, 1] as const };\nconst LABEL_TRANSITION = { duration: 0.35, ease: [0.16, 1, 0.3, 1] as const };\n\n/** One cell of the mark as a glass cube, centred on the mark's middle plane. */\nfunction GlassCube({ column, row }: { column: number; row: number }) {\n const left = column * CELL_PITCH + CUBE_INSET;\n const top = row * CELL_PITCH + CUBE_INSET;\n\n return (\n <span className=\"absolute transform-3d\" style={{ left, top, width: CUBE_SIZE, height: CUBE_SIZE }}>\n <span\n className=\"absolute inset-0\"\n style={{\n transform: `translateZ(${HALF_CUBE}px)`,\n backgroundColor: GLASS_FILLS.FRONT,\n backgroundImage: GLASS_FRONT_LIGHT,\n backgroundSize: `${TILE_SIZE}px ${TILE_SIZE}px`,\n backgroundPosition: `${-left}px ${-top}px`,\n boxShadow: GLASS_RIM,\n }}\n />\n {CUBE_FACES.map((face) => (\n <span\n key={face.key}\n className=\"absolute inset-0\"\n style={{ transform: face.transform, backgroundColor: face.fill, boxShadow: GLASS_RIM }}\n />\n ))}\n </span>\n );\n}\n\n/**\n * The Major mark at 22px as seven bottle-green glass cubes, drawn with CSS 3D transforms. It sways, turns about the\n * vertical, then turns about the diagonal it is symmetric about, every 7.2s, for as long as it is shown; with reduced\n * motion it holds its first frame. Decorative (`aria-hidden`).\n */\nexport function ThinkingMark({ className, style, ...props }: ComponentProps<\"span\">) {\n // One clock drives every rotation, so the turns stay in step.\n const isReducedMotion = useReducedMotion();\n const time = useTime();\n const cycleProgress = useTransform(time, (ms) => (isReducedMotion ? 0 : (ms / CYCLE_MS) % 1));\n const turnY = useTransform(cycleProgress, CYCLE_TIMES, TURN_Y, { ease: CYCLE_EASES });\n const tiltX = useTransform(cycleProgress, CYCLE_TIMES, TILT_X, { ease: CYCLE_EASES });\n const turnDiagonal = useTransform(cycleProgress, CYCLE_TIMES, TURN_DIAGONAL, { ease: CYCLE_EASES });\n\n return (\n <span\n aria-hidden\n data-slot=\"thinking-mark\"\n className={cn(\"grid shrink-0 place-items-center\", className)}\n style={{ width: MARK_SIZE, height: MARK_SIZE, perspective: MARK_SIZE * 5, ...style }}\n {...props}\n >\n <motion.span className=\"block transform-3d\" style={{ width: TILE_SIZE, height: TILE_SIZE, rotateY: turnY, rotateX: tiltX }}>\n {/* The diagonal turn: tip the axes 45° so X runs corner to notch, turn about X, then tip them back. */}\n <span className=\"block size-full transform-3d\" style={{ transform: \"rotateZ(-45deg)\" }}>\n <motion.span className=\"block size-full transform-3d\" style={{ rotateX: turnDiagonal }}>\n <span className=\"relative block size-full transform-3d\" style={{ transform: \"rotateZ(45deg)\" }}>\n {MARK_CELLS.map(([column, row]) => (\n <GlassCube key={`${column}-${row}`} column={column} row={row} />\n ))}\n </span>\n </motion.span>\n </span>\n </motion.span>\n </span>\n );\n}\n\n/**\n * The label to show: the first one at once, then at most one change per MIN_LABEL_MS, so a burst of changes settles on\n * its last value and short-lived ones are never shown (the web's trailing useThrottled).\n */\nfunction useHeldLabel(label: string) {\n const [heldLabel, setHeldLabel] = useState(label);\n const holdUntilRef = useRef(0);\n\n useEffect(() => {\n if (label === heldLabel) {\n return;\n }\n\n const now = performance.now();\n\n if (holdUntilRef.current <= now) {\n holdUntilRef.current = now + MIN_LABEL_MS;\n }\n\n const timeout = setTimeout(() => {\n holdUntilRef.current = performance.now() + MIN_LABEL_MS;\n setHeldLabel(label);\n }, Math.max(0, holdUntilRef.current - now));\n\n return () => clearTimeout(timeout);\n }, [label, heldLabel]);\n\n return heldLabel;\n}\n\nexport type ThinkingIndicatorProps = Omit<ComponentProps<\"div\">, \"children\"> & {\n /** What Major is doing now, in a word or two of present tense: “Searching”, “Writing a response”. */\n label: string;\n /** Stands in for the ThinkingMark, for a surface with a character of its own (Pepper). */\n mark?: ReactNode;\n};\n\n/**\n * Major at work in the chat, at the end of its turn: the ThinkingMark beside a 13px shimmering label of what it is\n * doing now. It rises in as it mounts; a new label rolls up into the old one's place, and each label stays at least\n * 700ms; with reduced motion they fade instead. A polite live region (`role=\"status\"`) reads each label once. Mount it\n * while the turn runs and unmount it when the turn ends.\n */\nexport function ThinkingIndicator({ label, mark, className, ...props }: ThinkingIndicatorProps) {\n const heldLabel = useHeldLabel(label);\n const isReducedMotion = useReducedMotion();\n const rise = isReducedMotion ? 0 : RISE_PX;\n const roll = isReducedMotion ? 0 : ROLL_PX;\n\n return (\n <div data-slot=\"thinking-indicator\" role=\"status\" aria-live=\"polite\" className={className} {...props}>\n {/* Read out on its own, so the label rolling out isn't read with the one rolling in. */}\n <span className=\"sr-only\">{heldLabel}</span>\n <motion.div\n aria-hidden\n initial={{ y: rise, opacity: 0 }}\n animate={{ y: 0, opacity: 1 }}\n transition={CONTAINER_TRANSITION}\n className=\"flex min-h-12 w-full items-center gap-3 py-3\"\n >\n {mark ?? <ThinkingMark />}\n <div className=\"relative h-6 min-w-0 flex-1 overflow-hidden\">\n <AnimatePresence initial={false} mode=\"popLayout\">\n <motion.span\n key={heldLabel}\n initial={{ y: roll, opacity: 0 }}\n animate={{ y: 0, opacity: 1 }}\n exit={{ y: -roll, opacity: 0 }}\n transition={LABEL_TRANSITION}\n className=\"absolute inset-x-0 truncate text-ui leading-6 shimmer-text\"\n >\n {heldLabel}\n </motion.span>\n </AnimatePresence>\n </div>\n </motion.div>\n </div>\n );\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import type { ComponentProps } from "react";
2
+ export declare const THREAD_STATUSES: {
3
+ /** Major is working in the conversation: three pulsing dots. */
4
+ readonly WORKING: "working";
5
+ /** Something in the conversation waits for the person: a question, a permission, a connector. */
6
+ readonly WAITING: "waiting";
7
+ /** Major replied since the person last opened it. */
8
+ readonly UNREAD: "unread";
9
+ /** Nothing new. */
10
+ readonly IDLE: "idle";
11
+ };
12
+ export type ThreadStatusValue = (typeof THREAD_STATUSES)[keyof typeof THREAD_STATUSES];
13
+ export type ThreadStatusProps = Omit<ComponentProps<"span">, "children"> & {
14
+ /** Default: idle. */
15
+ status?: ThreadStatusValue;
16
+ /** The conversation is the one open on screen: it shows no waiting or unread dot, and its idle dot is `chart-1`. */
17
+ isActive?: boolean;
18
+ };
19
+ /**
20
+ * A conversation's state at the start of its row, in a 10px slot so titles line up whatever the state: three `link`
21
+ * dots that turn and pulse while Major works (they hold still with reduced motion), a 6px `link` dot while it waits
22
+ * for the person or has unread news, a 4px `ink/16` dot otherwise.
23
+ */
24
+ export declare function ThreadStatus({ status, isActive, className, ...props }: ThreadStatusProps): import("react").JSX.Element;
25
+ //# sourceMappingURL=thread-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread-status.d.ts","sourceRoot":"","sources":["../../src/components/thread-status.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,eAAO,MAAM,eAAe;IAC1B,gEAAgE;;IAEhE,iGAAiG;;IAEjG,qDAAqD;;IAErD,mBAAmB;;CAEX,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAkBvF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,qBAAqB;IACrB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,oHAAoH;IACpH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAA6B,EAAE,QAAgB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAkCvH"}
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { cn } from "../lib/cn.js";
4
+ export const THREAD_STATUSES = {
5
+ /** Major is working in the conversation: three pulsing dots. */
6
+ WORKING: "working",
7
+ /** Something in the conversation waits for the person: a question, a permission, a connector. */
8
+ WAITING: "waiting",
9
+ /** Major replied since the person last opened it. */
10
+ UNREAD: "unread",
11
+ /** Nothing new. */
12
+ IDLE: "idle",
13
+ };
14
+ /** The three dots of the working mark, on a 14×14 grid: top, bottom right, bottom left. */
15
+ const WORKING_DOTS = [
16
+ [7, 2.6],
17
+ [10.8, 9.2],
18
+ [3.2, 9.2],
19
+ ];
20
+ const WORKING_DOT_RADIUS = 1.6;
21
+ /** Each dot pulses this long after the one before it. */
22
+ const WORKING_DOT_STAGGER_S = 0.2;
23
+ const ATTENTION_LABELS = {
24
+ [THREAD_STATUSES.WAITING]: "Waiting for your input",
25
+ [THREAD_STATUSES.UNREAD]: "Unread",
26
+ };
27
+ /**
28
+ * A conversation's state at the start of its row, in a 10px slot so titles line up whatever the state: three `link`
29
+ * dots that turn and pulse while Major works (they hold still with reduced motion), a 6px `link` dot while it waits
30
+ * for the person or has unread news, a 4px `ink/16` dot otherwise.
31
+ */
32
+ export function ThreadStatus({ status = THREAD_STATUSES.IDLE, isActive = false, className, ...props }) {
33
+ if (status === THREAD_STATUSES.WORKING) {
34
+ return (_jsx("span", { "data-slot": "thread-status", "data-status": status, className: cn("flex w-2.5 shrink-0 justify-center", className), ...props, children: _jsx("svg", { viewBox: "0 0 14 14", role: "img", "aria-label": "Working", className: "size-3 shrink-0 fill-link motion-safe:animate-think-spin", children: WORKING_DOTS.map(([cx, cy], index) => (_jsx("circle", { cx: cx, cy: cy, r: WORKING_DOT_RADIUS, className: "origin-center [transform-box:fill-box] motion-safe:animate-think-pulse", style: { animationDelay: `${index * WORKING_DOT_STAGGER_S}s` } }, `${cx}-${cy}`))) }) }));
35
+ }
36
+ // An open conversation has nothing new to tell its viewer: without this the row flickers green at the end of every
37
+ // turn, before the open view marks it read.
38
+ const attentionLabel = !isActive && (status === THREAD_STATUSES.WAITING || status === THREAD_STATUSES.UNREAD) ? ATTENTION_LABELS[status] : undefined;
39
+ return (_jsx("span", { "data-slot": "thread-status", "data-status": status, className: cn("flex w-2.5 shrink-0 justify-center", className), ...props, children: _jsx("span", { role: attentionLabel ? "img" : undefined, "aria-label": attentionLabel, className: cn("rounded-full", attentionLabel ? "size-1.5 bg-link" : "size-1 bg-ink/16", isActive && "bg-chart-1") }) }));
40
+ }
41
+ //# sourceMappingURL=thread-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thread-status.js","sourceRoot":"","sources":["../../src/components/thread-status.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,M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AE,EAAE,cAAc,EAAE,GAAG,KAAK,GAAG,qBAAqB,GAAG,EAAE,IALzD,GAAG,EAAE,IAAI,EAAE,EAAE,CAMlB,CACH,CAAC,GACE,GACD,CACR,CAAC;IACJ,CAAC;IAED,mHAAmH;IACnH,4CAA4C;IAC5C,MAAM,cAAc,GAClB,CAAC,QAAQ,IAAI,CAAC,MAAM,KAAK,eAAe,CAAC,OAAO,IAAI,MAAM,KAAK,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhI,OAAO,CACL,4BAAgB,eAAe,iBAAc,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAAM,KAAK,YAC5H,eACE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,gBAC5B,cAAc,EAC1B,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,EAAE,QAAQ,IAAI,YAAY,CAAC,GACjH,GACG,CACR,CAAC;AACJ,CAAC","sourcesContent":["\"use client\";\n\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"../lib/cn.ts\";\n\nexport const THREAD_STATUSES = {\n /** Major is working in the conversation: three pulsing dots. */\n WORKING: \"working\",\n /** Something in the conversation waits for the person: a question, a permission, a connector. */\n WAITING: \"waiting\",\n /** Major replied since the person last opened it. */\n UNREAD: \"unread\",\n /** Nothing new. */\n IDLE: \"idle\",\n} as const;\n\nexport type ThreadStatusValue = (typeof THREAD_STATUSES)[keyof typeof THREAD_STATUSES];\n\n/** The three dots of the working mark, on a 14×14 grid: top, bottom right, bottom left. */\nconst WORKING_DOTS = [\n [7, 2.6],\n [10.8, 9.2],\n [3.2, 9.2],\n] as const;\n\nconst WORKING_DOT_RADIUS = 1.6;\n/** Each dot pulses this long after the one before it. */\nconst WORKING_DOT_STAGGER_S = 0.2;\n\nconst ATTENTION_LABELS = {\n [THREAD_STATUSES.WAITING]: \"Waiting for your input\",\n [THREAD_STATUSES.UNREAD]: \"Unread\",\n} as const;\n\nexport type ThreadStatusProps = Omit<ComponentProps<\"span\">, \"children\"> & {\n /** Default: idle. */\n status?: ThreadStatusValue;\n /** The conversation is the one open on screen: it shows no waiting or unread dot, and its idle dot is `chart-1`. */\n isActive?: boolean;\n};\n\n/**\n * A conversation's state at the start of its row, in a 10px slot so titles line up whatever the state: three `link`\n * dots that turn and pulse while Major works (they hold still with reduced motion), a 6px `link` dot while it waits\n * for the person or has unread news, a 4px `ink/16` dot otherwise.\n */\nexport function ThreadStatus({ status = THREAD_STATUSES.IDLE, isActive = false, className, ...props }: ThreadStatusProps) {\n if (status === THREAD_STATUSES.WORKING) {\n return (\n <span data-slot=\"thread-status\" data-status={status} className={cn(\"flex w-2.5 shrink-0 justify-center\", className)} {...props}>\n <svg viewBox=\"0 0 14 14\" role=\"img\" aria-label=\"Working\" className=\"size-3 shrink-0 fill-link motion-safe:animate-think-spin\">\n {WORKING_DOTS.map(([cx, cy], index) => (\n <circle\n key={`${cx}-${cy}`}\n cx={cx}\n cy={cy}\n r={WORKING_DOT_RADIUS}\n className=\"origin-center [transform-box:fill-box] motion-safe:animate-think-pulse\"\n style={{ animationDelay: `${index * WORKING_DOT_STAGGER_S}s` }}\n />\n ))}\n </svg>\n </span>\n );\n }\n\n // An open conversation has nothing new to tell its viewer: without this the row flickers green at the end of every\n // turn, before the open view marks it read.\n const attentionLabel =\n !isActive && (status === THREAD_STATUSES.WAITING || status === THREAD_STATUSES.UNREAD) ? ATTENTION_LABELS[status] : undefined;\n\n return (\n <span data-slot=\"thread-status\" data-status={status} className={cn(\"flex w-2.5 shrink-0 justify-center\", className)} {...props}>\n <span\n role={attentionLabel ? \"img\" : undefined}\n aria-label={attentionLabel}\n className={cn(\"rounded-full\", attentionLabel ? \"size-1.5 bg-link\" : \"size-1 bg-ink/16\", isActive && \"bg-chart-1\")}\n />\n </span>\n );\n}\n"]}
@@ -0,0 +1,52 @@
1
+ import { type ComponentProps } from "react";
2
+ export declare const TODO_STATUSES: {
3
+ /** Not started: an empty `faint` circle. */
4
+ readonly PENDING: "pending";
5
+ /** Being worked on now: a spinner, the text in `ink`. */
6
+ readonly IN_PROGRESS: "in_progress";
7
+ /** Done: a `success` check, the text in `muted`. */
8
+ readonly COMPLETED: "completed";
9
+ /** Dropped: a `faint` cross, the text struck through. */
10
+ readonly CANCELLED: "cancelled";
11
+ };
12
+ export type TodoStatus = (typeof TODO_STATUSES)[keyof typeof TODO_STATUSES];
13
+ export declare const TODO_LIST_VARIANTS: {
14
+ /** The card in the chat's stream, where Major wrote the list: it opens to 500px wide, then shows the items. */
15
+ readonly INLINE: "inline";
16
+ /** The card that floats over the chat while Major works through the list: translucent; closed, it shows the item in hand. */
17
+ readonly STICKY: "sticky";
18
+ };
19
+ export type TodoListVariant = (typeof TODO_LIST_VARIANTS)[keyof typeof TODO_LIST_VARIANTS];
20
+ export interface TodoItem {
21
+ id: string;
22
+ /** What the step does, in a few words: “Create database schema”. */
23
+ content: string;
24
+ status: TodoStatus;
25
+ }
26
+ export type TodoListItemProps = ComponentProps<"li"> & {
27
+ status: TodoStatus;
28
+ };
29
+ /**
30
+ * One item: a 16px icon for its state (it scales out and the next one in as the state changes) and 13px text in the
31
+ * state's colour. Its state is read out before the text.
32
+ */
33
+ export declare function TodoListItem({ status, className, children, ...props }: TodoListItemProps): import("react").JSX.Element;
34
+ export type TodoListProps = Omit<ComponentProps<"div">, "children"> & {
35
+ items: TodoItem[];
36
+ /** The card's name. */
37
+ title?: string;
38
+ /** How long the list took, after the title: “12.3s”. Inline only. */
39
+ duration?: string;
40
+ variant?: TodoListVariant;
41
+ /** Controlled open state. */
42
+ open?: boolean;
43
+ defaultOpen?: boolean;
44
+ onOpenChange?: (open: boolean) => void;
45
+ };
46
+ /**
47
+ * Major's checklist for a task. The header names it and carries a StatusDot: `off`, fading in and out, until every
48
+ * item that wasn't dropped is done, then `ok`. `inline` is the card in the stream; `sticky` floats over the chat while
49
+ * Major works through the list and, closed, shows the item in hand beside a spinner. Both open by default.
50
+ */
51
+ export declare function TodoList({ items, title, duration, variant, open, defaultOpen, onOpenChange, className, ...props }: TodoListProps): import("react").JSX.Element;
52
+ //# sourceMappingURL=todo-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todo-list.d.ts","sourceRoot":"","sources":["../../src/components/todo-list.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAO7D,eAAO,MAAM,aAAa;IACxB,4CAA4C;;IAE5C,yDAAyD;;IAEzD,oDAAoD;;IAEpD,yDAAyD;;CAEjD,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE5E,eAAO,MAAM,kBAAkB;IAC7B,+GAA+G;;IAE/G,6HAA6H;;CAErH,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE3F,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;CACpB;AA+DD,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG;IACrD,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,+BAUxF;AAaD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACpE,KAAK,EAAE,QA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