even-toolkit 0.5.2 → 1.0.1

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 (592) hide show
  1. package/README.md +113 -71
  2. package/dist/glasses/action-bar.d.ts.map +1 -0
  3. package/dist/glasses/action-bar.js.map +1 -0
  4. package/dist/glasses/action-map.d.ts.map +1 -0
  5. package/dist/glasses/action-map.js.map +1 -0
  6. package/dist/glasses/bridge.d.ts.map +1 -0
  7. package/dist/glasses/bridge.js.map +1 -0
  8. package/dist/glasses/canvas-renderer.d.ts.map +1 -0
  9. package/dist/glasses/canvas-renderer.js.map +1 -0
  10. package/dist/glasses/composer.d.ts.map +1 -0
  11. package/dist/glasses/composer.js.map +1 -0
  12. package/dist/glasses/gestures.d.ts.map +1 -0
  13. package/dist/glasses/gestures.js.map +1 -0
  14. package/dist/glasses/index.d.ts.map +1 -0
  15. package/dist/glasses/index.js.map +1 -0
  16. package/dist/glasses/keep-alive.d.ts.map +1 -0
  17. package/dist/glasses/keep-alive.js.map +1 -0
  18. package/dist/glasses/keyboard.d.ts.map +1 -0
  19. package/dist/glasses/keyboard.js.map +1 -0
  20. package/dist/glasses/layout.d.ts.map +1 -0
  21. package/dist/glasses/layout.js.map +1 -0
  22. package/dist/glasses/paginate-text.d.ts.map +1 -0
  23. package/dist/glasses/paginate-text.js.map +1 -0
  24. package/dist/glasses/png-utils.d.ts.map +1 -0
  25. package/dist/glasses/png-utils.js.map +1 -0
  26. package/dist/glasses/splash.d.ts.map +1 -0
  27. package/dist/glasses/splash.js.map +1 -0
  28. package/dist/glasses/text-clean.d.ts.map +1 -0
  29. package/dist/glasses/text-clean.js.map +1 -0
  30. package/dist/glasses/text-utils.d.ts.map +1 -0
  31. package/dist/glasses/text-utils.js.map +1 -0
  32. package/dist/glasses/timer-display.d.ts.map +1 -0
  33. package/dist/glasses/timer-display.js.map +1 -0
  34. package/dist/glasses/types.d.ts.map +1 -0
  35. package/dist/glasses/types.js.map +1 -0
  36. package/dist/glasses/useFlashPhase.d.ts.map +1 -0
  37. package/dist/glasses/useFlashPhase.js.map +1 -0
  38. package/dist/glasses/useGlasses.d.ts.map +1 -0
  39. package/dist/glasses/useGlasses.js.map +1 -0
  40. package/dist/web/components/app-shell.d.ts +15 -0
  41. package/dist/web/components/app-shell.d.ts.map +1 -0
  42. package/dist/web/components/app-shell.js +11 -0
  43. package/dist/web/components/app-shell.js.map +1 -0
  44. package/dist/web/components/audio-player.d.ts +9 -0
  45. package/dist/web/components/audio-player.d.ts.map +1 -0
  46. package/dist/web/components/audio-player.js +54 -0
  47. package/dist/web/components/audio-player.js.map +1 -0
  48. package/dist/web/components/badge.d.ts +11 -0
  49. package/dist/web/components/badge.d.ts.map +1 -0
  50. package/dist/web/components/badge.js +21 -0
  51. package/dist/web/components/badge.js.map +1 -0
  52. package/dist/web/components/bottom-sheet.d.ts +11 -0
  53. package/dist/web/components/bottom-sheet.d.ts.map +1 -0
  54. package/dist/web/components/bottom-sheet.js +33 -0
  55. package/dist/web/components/bottom-sheet.js.map +1 -0
  56. package/dist/web/components/button.d.ts +12 -0
  57. package/dist/web/components/button.d.ts.map +1 -0
  58. package/dist/web/components/button.js +29 -0
  59. package/dist/web/components/button.js.map +1 -0
  60. package/dist/web/components/calendar.d.ts +48 -0
  61. package/dist/web/components/calendar.d.ts.map +1 -0
  62. package/dist/web/components/calendar.js +86 -0
  63. package/dist/web/components/calendar.js.map +1 -0
  64. package/dist/web/components/card.d.ts +12 -0
  65. package/dist/web/components/card.d.ts.map +1 -0
  66. package/dist/web/components/card.js +27 -0
  67. package/dist/web/components/card.js.map +1 -0
  68. package/dist/web/components/category-filter.d.ts +10 -0
  69. package/dist/web/components/category-filter.d.ts.map +1 -0
  70. package/dist/web/components/category-filter.js +9 -0
  71. package/dist/web/components/category-filter.js.map +1 -0
  72. package/dist/web/components/chart.d.ts +65 -0
  73. package/dist/web/components/chart.d.ts.map +1 -0
  74. package/dist/web/components/chart.js +62 -0
  75. package/dist/web/components/chart.js.map +1 -0
  76. package/dist/web/components/chat.d.ts +79 -0
  77. package/dist/web/components/chat.d.ts.map +1 -0
  78. package/dist/web/components/chat.js +166 -0
  79. package/dist/web/components/chat.js.map +1 -0
  80. package/dist/web/components/checkbox.d.ts +11 -0
  81. package/dist/web/components/checkbox.d.ts.map +1 -0
  82. package/dist/web/components/checkbox.js +7 -0
  83. package/dist/web/components/checkbox.js.map +1 -0
  84. package/dist/web/components/confirm-dialog.d.ts +14 -0
  85. package/dist/web/components/confirm-dialog.d.ts.map +1 -0
  86. package/dist/web/components/confirm-dialog.js +37 -0
  87. package/dist/web/components/confirm-dialog.js.map +1 -0
  88. package/dist/web/components/cta-group.d.ts +16 -0
  89. package/dist/web/components/cta-group.d.ts.map +1 -0
  90. package/dist/web/components/cta-group.js +22 -0
  91. package/dist/web/components/cta-group.js.map +1 -0
  92. package/dist/web/components/dialog.d.ts +19 -0
  93. package/dist/web/components/dialog.d.ts.map +1 -0
  94. package/dist/web/components/dialog.js +35 -0
  95. package/dist/web/components/dialog.js.map +1 -0
  96. package/dist/web/components/divider.d.ts +11 -0
  97. package/dist/web/components/divider.d.ts.map +1 -0
  98. package/dist/web/components/divider.js +19 -0
  99. package/dist/web/components/divider.js.map +1 -0
  100. package/dist/web/components/empty-state.d.ts +15 -0
  101. package/dist/web/components/empty-state.d.ts.map +1 -0
  102. package/dist/web/components/empty-state.js +7 -0
  103. package/dist/web/components/empty-state.js.map +1 -0
  104. package/dist/web/components/file-upload.d.ts +12 -0
  105. package/dist/web/components/file-upload.d.ts.map +1 -0
  106. package/dist/web/components/file-upload.js +38 -0
  107. package/dist/web/components/file-upload.js.map +1 -0
  108. package/dist/web/components/image-viewer.d.ts +23 -0
  109. package/dist/web/components/image-viewer.d.ts.map +1 -0
  110. package/dist/web/components/image-viewer.js +29 -0
  111. package/dist/web/components/image-viewer.js.map +1 -0
  112. package/dist/web/components/indicator.d.ts +15 -0
  113. package/dist/web/components/indicator.d.ts.map +1 -0
  114. package/dist/web/components/indicator.js +12 -0
  115. package/dist/web/components/indicator.js.map +1 -0
  116. package/dist/web/components/input-group.d.ts +9 -0
  117. package/dist/web/components/input-group.d.ts.map +1 -0
  118. package/dist/web/components/input-group.js +27 -0
  119. package/dist/web/components/input-group.js.map +1 -0
  120. package/dist/web/components/input.d.ts +7 -0
  121. package/dist/web/components/input.d.ts.map +1 -0
  122. package/dist/web/components/input.js +7 -0
  123. package/dist/web/components/input.js.map +1 -0
  124. package/dist/web/components/kbd.d.ts +9 -0
  125. package/dist/web/components/kbd.d.ts.map +1 -0
  126. package/dist/web/components/kbd.js +7 -0
  127. package/dist/web/components/kbd.js.map +1 -0
  128. package/dist/web/components/list-item.d.ts +14 -0
  129. package/dist/web/components/list-item.d.ts.map +1 -0
  130. package/dist/web/components/list-item.js +57 -0
  131. package/dist/web/components/list-item.js.map +1 -0
  132. package/dist/web/components/loading.d.ts +8 -0
  133. package/dist/web/components/loading.d.ts.map +1 -0
  134. package/dist/web/components/loading.js +41 -0
  135. package/dist/web/components/loading.js.map +1 -0
  136. package/dist/web/components/nav-bar.d.ts +14 -0
  137. package/dist/web/components/nav-bar.d.ts.map +1 -0
  138. package/dist/web/components/nav-bar.js +9 -0
  139. package/dist/web/components/nav-bar.js.map +1 -0
  140. package/dist/web/components/nav-header.d.ts +11 -0
  141. package/dist/web/components/nav-header.d.ts.map +1 -0
  142. package/dist/web/components/nav-header.js +7 -0
  143. package/dist/web/components/nav-header.js.map +1 -0
  144. package/dist/web/components/page.d.ts +9 -0
  145. package/dist/web/components/page.d.ts.map +1 -0
  146. package/dist/web/components/page.js +7 -0
  147. package/dist/web/components/page.js.map +1 -0
  148. package/dist/web/components/pill.d.ts +9 -0
  149. package/dist/web/components/pill.d.ts.map +1 -0
  150. package/dist/web/components/pill.js +7 -0
  151. package/dist/web/components/pill.js.map +1 -0
  152. package/dist/web/components/progress.d.ts +8 -0
  153. package/dist/web/components/progress.d.ts.map +1 -0
  154. package/dist/web/components/progress.js +7 -0
  155. package/dist/web/components/progress.js.map +1 -0
  156. package/dist/web/components/radio-group.d.ts +16 -0
  157. package/dist/web/components/radio-group.d.ts.map +1 -0
  158. package/dist/web/components/radio-group.js +10 -0
  159. package/dist/web/components/radio-group.js.map +1 -0
  160. package/dist/web/components/screen-header.d.ts +11 -0
  161. package/dist/web/components/screen-header.d.ts.map +1 -0
  162. package/dist/web/components/screen-header.js +7 -0
  163. package/dist/web/components/screen-header.js.map +1 -0
  164. package/dist/web/components/scroll-picker.d.ts +66 -0
  165. package/dist/web/components/scroll-picker.d.ts.map +1 -0
  166. package/dist/web/components/scroll-picker.js +243 -0
  167. package/dist/web/components/scroll-picker.js.map +1 -0
  168. package/dist/web/components/search-bar.d.ts +9 -0
  169. package/dist/web/components/search-bar.d.ts.map +1 -0
  170. package/dist/web/components/search-bar.js +8 -0
  171. package/dist/web/components/search-bar.js.map +1 -0
  172. package/dist/web/components/section-header.d.ts +10 -0
  173. package/dist/web/components/section-header.d.ts.map +1 -0
  174. package/dist/web/components/section-header.js +7 -0
  175. package/dist/web/components/section-header.js.map +1 -0
  176. package/dist/web/components/segmented-control.d.ts +15 -0
  177. package/dist/web/components/segmented-control.d.ts.map +1 -0
  178. package/dist/web/components/segmented-control.js +9 -0
  179. package/dist/web/components/segmented-control.js.map +1 -0
  180. package/dist/web/components/select.d.ts +13 -0
  181. package/dist/web/components/select.d.ts.map +1 -0
  182. package/dist/web/components/select.js +7 -0
  183. package/dist/web/components/select.js.map +1 -0
  184. package/dist/web/components/settings-group.d.ts +10 -0
  185. package/dist/web/components/settings-group.d.ts.map +1 -0
  186. package/dist/web/components/settings-group.js +7 -0
  187. package/dist/web/components/settings-group.js.map +1 -0
  188. package/dist/web/components/skeleton.d.ts +13 -0
  189. package/dist/web/components/skeleton.d.ts.map +1 -0
  190. package/dist/web/components/skeleton.js +23 -0
  191. package/dist/web/components/skeleton.js.map +1 -0
  192. package/dist/web/components/slider.d.ts +16 -0
  193. package/dist/web/components/slider.d.ts.map +1 -0
  194. package/dist/web/components/slider.js +8 -0
  195. package/dist/web/components/slider.js.map +1 -0
  196. package/dist/web/components/stat-grid.d.ts +14 -0
  197. package/dist/web/components/stat-grid.d.ts.map +1 -0
  198. package/dist/web/components/stat-grid.js +7 -0
  199. package/dist/web/components/stat-grid.js.map +1 -0
  200. package/dist/web/components/status-dot.d.ts +8 -0
  201. package/dist/web/components/status-dot.d.ts.map +1 -0
  202. package/dist/web/components/status-dot.js +7 -0
  203. package/dist/web/components/status-dot.js.map +1 -0
  204. package/dist/web/components/status-progress.d.ts +13 -0
  205. package/dist/web/components/status-progress.d.ts.map +1 -0
  206. package/dist/web/components/status-progress.js +7 -0
  207. package/dist/web/components/status-progress.js.map +1 -0
  208. package/dist/web/components/step-indicator.d.ts +13 -0
  209. package/dist/web/components/step-indicator.d.ts.map +1 -0
  210. package/dist/web/components/step-indicator.js +10 -0
  211. package/dist/web/components/step-indicator.js.map +1 -0
  212. package/dist/web/components/table.d.ts +9 -0
  213. package/dist/web/components/table.d.ts.map +1 -0
  214. package/dist/web/components/table.js +17 -0
  215. package/dist/web/components/table.js.map +1 -0
  216. package/dist/web/components/tag.d.ts +25 -0
  217. package/dist/web/components/tag.d.ts.map +1 -0
  218. package/dist/web/components/tag.js +15 -0
  219. package/dist/web/components/tag.js.map +1 -0
  220. package/dist/web/components/textarea.d.ts +7 -0
  221. package/dist/web/components/textarea.d.ts.map +1 -0
  222. package/dist/web/components/textarea.js +7 -0
  223. package/dist/web/components/textarea.js.map +1 -0
  224. package/dist/web/components/timeline.d.ts +17 -0
  225. package/dist/web/components/timeline.d.ts.map +1 -0
  226. package/dist/web/components/timeline.js +7 -0
  227. package/dist/web/components/timeline.js.map +1 -0
  228. package/dist/web/components/timer-ring.d.ts +12 -0
  229. package/dist/web/components/timer-ring.d.ts.map +1 -0
  230. package/dist/web/components/timer-ring.js +15 -0
  231. package/dist/web/components/timer-ring.js.map +1 -0
  232. package/dist/web/components/toast.d.ts +14 -0
  233. package/dist/web/components/toast.d.ts.map +1 -0
  234. package/dist/web/components/toast.js +21 -0
  235. package/dist/web/components/toast.js.map +1 -0
  236. package/dist/web/components/toggle.d.ts +10 -0
  237. package/dist/web/components/toggle.d.ts.map +1 -0
  238. package/dist/web/components/toggle.js +21 -0
  239. package/dist/web/components/toggle.js.map +1 -0
  240. package/dist/web/components/voice-input.d.ts +17 -0
  241. package/dist/web/components/voice-input.d.ts.map +1 -0
  242. package/dist/web/components/voice-input.js +60 -0
  243. package/dist/web/components/voice-input.js.map +1 -0
  244. package/dist/web/icons/index.d.ts +29 -0
  245. package/dist/web/icons/index.d.ts.map +1 -0
  246. package/dist/web/icons/index.js +47 -0
  247. package/dist/web/icons/index.js.map +1 -0
  248. package/dist/web/icons/svg-catalog.d.ts +7 -0
  249. package/dist/web/icons/svg-catalog.d.ts.map +1 -0
  250. package/dist/web/icons/svg-catalog.js +1389 -0
  251. package/dist/web/icons/svg-catalog.js.map +1 -0
  252. package/dist/web/icons/svg-icons.d.ts +207 -0
  253. package/dist/web/icons/svg-icons.d.ts.map +1 -0
  254. package/dist/web/icons/svg-icons.js +398 -0
  255. package/dist/web/icons/svg-icons.js.map +1 -0
  256. package/dist/web/index.d.ts +107 -0
  257. package/dist/web/index.d.ts.map +1 -0
  258. package/dist/web/index.js +69 -0
  259. package/dist/web/index.js.map +1 -0
  260. package/dist/web/utils/cn.d.ts +3 -0
  261. package/dist/web/utils/cn.d.ts.map +1 -0
  262. package/dist/web/utils/cn.js +6 -0
  263. package/dist/web/utils/cn.js.map +1 -0
  264. package/package.json +289 -46
  265. package/web/components/app-shell.tsx +29 -0
  266. package/web/components/audio-player.tsx +117 -0
  267. package/web/components/badge.tsx +39 -0
  268. package/web/components/bottom-sheet.tsx +61 -0
  269. package/web/components/button.tsx +48 -0
  270. package/web/components/calendar.tsx +333 -0
  271. package/web/components/card.tsx +42 -0
  272. package/web/components/category-filter.tsx +33 -0
  273. package/web/components/chart.tsx +411 -0
  274. package/web/components/chat.tsx +494 -0
  275. package/web/components/checkbox.tsx +52 -0
  276. package/web/components/confirm-dialog.tsx +100 -0
  277. package/web/components/cta-group.tsx +85 -0
  278. package/web/components/dialog.tsx +94 -0
  279. package/web/components/divider.tsx +25 -0
  280. package/web/components/empty-state.tsx +32 -0
  281. package/web/components/file-upload.tsx +100 -0
  282. package/web/components/image-viewer.tsx +131 -0
  283. package/web/components/indicator.tsx +50 -0
  284. package/web/components/input-group.tsx +39 -0
  285. package/web/components/input.tsx +23 -0
  286. package/web/components/kbd.tsx +22 -0
  287. package/web/components/list-item.tsx +106 -0
  288. package/web/components/loading.tsx +79 -0
  289. package/web/components/nav-bar.tsx +43 -0
  290. package/web/components/nav-header.tsx +24 -0
  291. package/web/components/page.tsx +14 -0
  292. package/web/components/pill.tsx +32 -0
  293. package/web/components/progress.tsx +26 -0
  294. package/web/components/radio-group.tsx +59 -0
  295. package/web/components/screen-header.tsx +26 -0
  296. package/web/components/scroll-picker.tsx +508 -0
  297. package/web/components/search-bar.tsx +28 -0
  298. package/web/components/section-header.tsx +20 -0
  299. package/web/components/segmented-control.tsx +50 -0
  300. package/web/components/select.tsx +37 -0
  301. package/web/components/settings-group.tsx +22 -0
  302. package/web/components/skeleton.tsx +36 -0
  303. package/web/components/slider.tsx +69 -0
  304. package/web/components/stat-grid.tsx +40 -0
  305. package/web/components/status-dot.tsx +21 -0
  306. package/web/components/status-progress.tsx +56 -0
  307. package/web/components/step-indicator.tsx +52 -0
  308. package/web/components/table.tsx +70 -0
  309. package/web/components/tag.tsx +72 -0
  310. package/web/components/textarea.tsx +23 -0
  311. package/web/components/timeline.tsx +52 -0
  312. package/web/components/timer-ring.tsx +69 -0
  313. package/web/components/toast.tsx +38 -0
  314. package/web/components/toggle.tsx +58 -0
  315. package/web/components/voice-input.tsx +165 -0
  316. package/web/icons/README.md +38 -0
  317. package/web/icons/index.ts +61 -0
  318. package/web/icons/svg/edit-add.svg +13 -0
  319. package/web/icons/svg/edit-checklist.svg +3 -0
  320. package/web/icons/svg/edit-copy.svg +12 -0
  321. package/web/icons/svg/edit-cross-small.svg +10 -0
  322. package/web/icons/svg/edit-cross.svg +10 -0
  323. package/web/icons/svg/edit-cut.svg +10 -0
  324. package/web/icons/svg/edit-display-adj.svg +3 -0
  325. package/web/icons/svg/edit-dist-adj.svg +3 -0
  326. package/web/icons/svg/edit-dot-lists.svg +3 -0
  327. package/web/icons/svg/edit-edit.svg +3 -0
  328. package/web/icons/svg/edit-hight-adj.svg +3 -0
  329. package/web/icons/svg/edit-import.svg +10 -0
  330. package/web/icons/svg/edit-layout-settings.svg +10 -0
  331. package/web/icons/svg/edit-multi-selection.svg +10 -0
  332. package/web/icons/svg/edit-new.svg +3 -0
  333. package/web/icons/svg/edit-number-list.svg +3 -0
  334. package/web/icons/svg/edit-options.svg +10 -0
  335. package/web/icons/svg/edit-paste.svg +10 -0
  336. package/web/icons/svg/edit-pause.svg +10 -0
  337. package/web/icons/svg/edit-pin.svg +10 -0
  338. package/web/icons/svg/edit-play.svg +10 -0
  339. package/web/icons/svg/edit-redo.svg +10 -0
  340. package/web/icons/svg/edit-restore.svg +10 -0
  341. package/web/icons/svg/edit-settings.svg +3 -0
  342. package/web/icons/svg/edit-share.svg +3 -0
  343. package/web/icons/svg/edit-sweep.svg +10 -0
  344. package/web/icons/svg/edit-switch.svg +3 -0
  345. package/web/icons/svg/edit-trash.svg +10 -0
  346. package/web/icons/svg/edit-undo.svg +10 -0
  347. package/web/icons/svg/edit-unpin.svg +3 -0
  348. package/web/icons/svg/edit-upload-to-cloud.svg +3 -0
  349. package/web/icons/svg/edit-width.svg +3 -0
  350. package/web/icons/svg/feat-access-control.svg +10 -0
  351. package/web/icons/svg/feat-account.svg +10 -0
  352. package/web/icons/svg/feat-calendar.svg +3 -0
  353. package/web/icons/svg/feat-camera.svg +3 -0
  354. package/web/icons/svg/feat-direct-push.svg +3 -0
  355. package/web/icons/svg/feat-eis.svg +10 -0
  356. package/web/icons/svg/feat-email.svg +10 -0
  357. package/web/icons/svg/feat-even-ai.svg +3 -0
  358. package/web/icons/svg/feat-facial-scan.svg +3 -0
  359. package/web/icons/svg/feat-feedback.svg +3 -0
  360. package/web/icons/svg/feat-headup-angle.svg +10 -0
  361. package/web/icons/svg/feat-inbox.svg +10 -0
  362. package/web/icons/svg/feat-interface-settings.svg +3 -0
  363. package/web/icons/svg/feat-languages.svg +10 -0
  364. package/web/icons/svg/feat-learn-explore.svg +3 -0
  365. package/web/icons/svg/feat-menu.svg +3 -0
  366. package/web/icons/svg/feat-message.svg +10 -0
  367. package/web/icons/svg/feat-navigate.svg +10 -0
  368. package/web/icons/svg/feat-news.svg +10 -0
  369. package/web/icons/svg/feat-notification.svg +10 -0
  370. package/web/icons/svg/feat-personal-info.svg +10 -0
  371. package/web/icons/svg/feat-phone-call.svg +10 -0
  372. package/web/icons/svg/feat-phone-voice-input.svg +3 -0
  373. package/web/icons/svg/feat-privacy.svg +3 -0
  374. package/web/icons/svg/feat-qr-code.svg +3 -0
  375. package/web/icons/svg/feat-quick-note.svg +3 -0
  376. package/web/icons/svg/feat-scan.svg +3 -0
  377. package/web/icons/svg/feat-screen-off.svg +16 -0
  378. package/web/icons/svg/feat-services.svg +3 -0
  379. package/web/icons/svg/feat-stocks.svg +10 -0
  380. package/web/icons/svg/feat-study.svg +10 -0
  381. package/web/icons/svg/feat-teleprompt.svg +3 -0
  382. package/web/icons/svg/feat-theme.svg +10 -0
  383. package/web/icons/svg/feat-time-counting.svg +10 -0
  384. package/web/icons/svg/feat-transcribe.svg +3 -0
  385. package/web/icons/svg/feat-translate.svg +3 -0
  386. package/web/icons/svg/feat-voice-print.svg +10 -0
  387. package/web/icons/svg/feat-wear-detect.svg +3 -0
  388. package/web/icons/svg/feat-weather.svg +10 -0
  389. package/web/icons/svg/feat-wiki.svg +3 -0
  390. package/web/icons/svg/guide-back.svg +10 -0
  391. package/web/icons/svg/guide-chevron-drill-back.svg +10 -0
  392. package/web/icons/svg/guide-chevron-drill-down.svg +10 -0
  393. package/web/icons/svg/guide-chevron-drill-up.svg +10 -0
  394. package/web/icons/svg/guide-chevron-small-back.svg +10 -0
  395. package/web/icons/svg/guide-chevron-small-drill-back.svg +3 -0
  396. package/web/icons/svg/guide-chevron-small-drill-down.svg +10 -0
  397. package/web/icons/svg/guide-chevron-small-drill-in.svg +3 -0
  398. package/web/icons/svg/guide-chevron-small-drill-up.svg +10 -0
  399. package/web/icons/svg/guide-double-tap.svg +3 -0
  400. package/web/icons/svg/guide-go.svg +10 -0
  401. package/web/icons/svg/guide-long-press.svg +3 -0
  402. package/web/icons/svg/guide-maximize-card.svg +10 -0
  403. package/web/icons/svg/guide-maximize.svg +10 -0
  404. package/web/icons/svg/guide-minimize-card.svg +10 -0
  405. package/web/icons/svg/guide-minimize.svg +3 -0
  406. package/web/icons/svg/guide-search.svg +3 -0
  407. package/web/icons/svg/guide-shift-to-top.svg +10 -0
  408. package/web/icons/svg/guide-single-tap.svg +3 -0
  409. package/web/icons/svg/guide-swip.svg +3 -0
  410. package/web/icons/svg/health-HRV.svg +3 -0
  411. package/web/icons/svg/health-heart-rate.svg +3 -0
  412. package/web/icons/svg/health-lift-2.svg +3 -0
  413. package/web/icons/svg/health-lift-3.svg +3 -0
  414. package/web/icons/svg/health-lift.svg +3 -0
  415. package/web/icons/svg/health-run.svg +3 -0
  416. package/web/icons/svg/health-sleep.svg +10 -0
  417. package/web/icons/svg/health-spo2.svg +7 -0
  418. package/web/icons/svg/health-stand.svg +3 -0
  419. package/web/icons/svg/health-steps.svg +10 -0
  420. package/web/icons/svg/health-temperature.svg +3 -0
  421. package/web/icons/svg/health-walk.svg +3 -0
  422. package/web/icons/svg/menu-even-hub-highlighted.svg +10 -0
  423. package/web/icons/svg/menu-even-hub.svg +10 -0
  424. package/web/icons/svg/menu-gear-highlighted.svg +10 -0
  425. package/web/icons/svg/menu-gear.svg +10 -0
  426. package/web/icons/svg/menu-healt-highlighted.svg +10 -0
  427. package/web/icons/svg/menu-healt.svg +10 -0
  428. package/web/icons/svg/menu-home-highlighted.svg +10 -0
  429. package/web/icons/svg/menu-home.svg +10 -0
  430. package/web/icons/svg/nav-bicycle.svg +10 -0
  431. package/web/icons/svg/nav-bus.svg +10 -0
  432. package/web/icons/svg/nav-business.svg +10 -0
  433. package/web/icons/svg/nav-cloth-shop.svg +10 -0
  434. package/web/icons/svg/nav-coffee-shop.svg +10 -0
  435. package/web/icons/svg/nav-compass.svg +3 -0
  436. package/web/icons/svg/nav-crown.svg +3 -0
  437. package/web/icons/svg/nav-direction.svg +10 -0
  438. package/web/icons/svg/nav-end-location.svg +3 -0
  439. package/web/icons/svg/nav-flag.svg +3 -0
  440. package/web/icons/svg/nav-gift.svg +3 -0
  441. package/web/icons/svg/nav-groceries.svg +10 -0
  442. package/web/icons/svg/nav-home-address.svg +10 -0
  443. package/web/icons/svg/nav-hotel.svg +10 -0
  444. package/web/icons/svg/nav-location.svg +3 -0
  445. package/web/icons/svg/nav-office-address.svg +10 -0
  446. package/web/icons/svg/nav-relocate.svg +10 -0
  447. package/web/icons/svg/nav-restaurant.svg +10 -0
  448. package/web/icons/svg/nav-shopping.svg +3 -0
  449. package/web/icons/svg/nav-train.svg +10 -0
  450. package/web/icons/svg/nav-walk.svg +3 -0
  451. package/web/icons/svg/nav-zoom-in.svg +3 -0
  452. package/web/icons/svg/nav-zoom-out.svg +3 -0
  453. package/web/icons/svg/status-alert.svg +5 -0
  454. package/web/icons/svg/status-archived-file.svg +3 -0
  455. package/web/icons/svg/status-bad-pressed.svg +23 -0
  456. package/web/icons/svg/status-bad.svg +20 -0
  457. package/web/icons/svg/status-battery-50.svg +10 -0
  458. package/web/icons/svg/status-battery-75.svg +10 -0
  459. package/web/icons/svg/status-battery-dying.svg +15 -0
  460. package/web/icons/svg/status-battery-full.svg +10 -0
  461. package/web/icons/svg/status-battery-low.svg +10 -0
  462. package/web/icons/svg/status-bluetooth-disconnected.svg +3 -0
  463. package/web/icons/svg/status-bluetooth.svg +10 -0
  464. package/web/icons/svg/status-brightness-auto.svg +3 -0
  465. package/web/icons/svg/status-brightness.svg +3 -0
  466. package/web/icons/svg/status-case-battery.svg +3 -0
  467. package/web/icons/svg/status-case-charging.svg +14 -0
  468. package/web/icons/svg/status-case.svg +3 -0
  469. package/web/icons/svg/status-checkbox.svg +3 -0
  470. package/web/icons/svg/status-checkmark.svg +3 -0
  471. package/web/icons/svg/status-clickbox.svg +3 -0
  472. package/web/icons/svg/status-complete.svg +10 -0
  473. package/web/icons/svg/status-disconnected.svg +10 -0
  474. package/web/icons/svg/status-display-adj-off.svg +11 -0
  475. package/web/icons/svg/status-dot.svg +10 -0
  476. package/web/icons/svg/status-eye-closed.svg +3 -0
  477. package/web/icons/svg/status-eye-open.svg +3 -0
  478. package/web/icons/svg/status-faqs.svg +10 -0
  479. package/web/icons/svg/status-fast.svg +3 -0
  480. package/web/icons/svg/status-fav.svg +29 -0
  481. package/web/icons/svg/status-file.svg +10 -0
  482. package/web/icons/svg/status-first-floor.svg +3 -0
  483. package/web/icons/svg/status-glasses-battery.svg +3 -0
  484. package/web/icons/svg/status-glasses-charging.svg +17 -0
  485. package/web/icons/svg/status-glasses.svg +3 -0
  486. package/web/icons/svg/status-good-pressed.svg +29 -0
  487. package/web/icons/svg/status-good.svg +20 -0
  488. package/web/icons/svg/status-grabber.svg +10 -0
  489. package/web/icons/svg/status-head-up.svg +3 -0
  490. package/web/icons/svg/status-hint.svg +14 -0
  491. package/web/icons/svg/status-info.svg +10 -0
  492. package/web/icons/svg/status-login.svg +10 -0
  493. package/web/icons/svg/status-logout.svg +10 -0
  494. package/web/icons/svg/status-more.svg +3 -0
  495. package/web/icons/svg/status-network-error.svg +3 -0
  496. package/web/icons/svg/status-reset.svg +3 -0
  497. package/web/icons/svg/status-saved.svg +10 -0
  498. package/web/icons/svg/status-second-floor.svg +3 -0
  499. package/web/icons/svg/status-sele.svg +3 -0
  500. package/web/icons/svg/status-selected-box.svg +3 -0
  501. package/web/icons/svg/status-selected.svg +3 -0
  502. package/web/icons/svg/status-slow.svg +3 -0
  503. package/web/icons/svg/status-speaker-off.svg +3 -0
  504. package/web/icons/svg/status-speaker-on.svg +3 -0
  505. package/web/icons/svg/status-text-sizing.svg +3 -0
  506. package/web/icons/svg/status-unbind.svg +10 -0
  507. package/web/icons/svg/status-undisturb.svg +10 -0
  508. package/web/icons/svg/status-unfav.svg +3 -0
  509. package/web/icons/svg-catalog.ts +1390 -0
  510. package/web/icons/svg-icons.tsx +2166 -0
  511. package/web/index.ts +172 -0
  512. package/web/theme/tokens-dark.css +46 -0
  513. package/web/theme/tokens-light.css +46 -0
  514. package/web/theme/typography.css +57 -0
  515. package/web/theme/utilities.css +46 -0
  516. package/web/utils/cn.ts +6 -0
  517. package/dist/action-bar.d.ts.map +0 -1
  518. package/dist/action-bar.js.map +0 -1
  519. package/dist/action-map.d.ts.map +0 -1
  520. package/dist/action-map.js.map +0 -1
  521. package/dist/bridge.d.ts.map +0 -1
  522. package/dist/bridge.js.map +0 -1
  523. package/dist/canvas-renderer.d.ts.map +0 -1
  524. package/dist/canvas-renderer.js.map +0 -1
  525. package/dist/composer.d.ts.map +0 -1
  526. package/dist/composer.js.map +0 -1
  527. package/dist/gestures.d.ts.map +0 -1
  528. package/dist/gestures.js.map +0 -1
  529. package/dist/index.d.ts.map +0 -1
  530. package/dist/index.js.map +0 -1
  531. package/dist/keep-alive.d.ts.map +0 -1
  532. package/dist/keep-alive.js.map +0 -1
  533. package/dist/keyboard.d.ts.map +0 -1
  534. package/dist/keyboard.js.map +0 -1
  535. package/dist/layout.d.ts.map +0 -1
  536. package/dist/layout.js.map +0 -1
  537. package/dist/paginate-text.d.ts.map +0 -1
  538. package/dist/paginate-text.js.map +0 -1
  539. package/dist/png-utils.d.ts.map +0 -1
  540. package/dist/png-utils.js.map +0 -1
  541. package/dist/splash.d.ts.map +0 -1
  542. package/dist/splash.js.map +0 -1
  543. package/dist/text-clean.d.ts.map +0 -1
  544. package/dist/text-clean.js.map +0 -1
  545. package/dist/text-utils.d.ts.map +0 -1
  546. package/dist/text-utils.js.map +0 -1
  547. package/dist/timer-display.d.ts.map +0 -1
  548. package/dist/timer-display.js.map +0 -1
  549. package/dist/types.d.ts.map +0 -1
  550. package/dist/types.js.map +0 -1
  551. package/dist/useFlashPhase.d.ts.map +0 -1
  552. package/dist/useFlashPhase.js.map +0 -1
  553. package/dist/useGlasses.d.ts.map +0 -1
  554. package/dist/useGlasses.js.map +0 -1
  555. /package/dist/{action-bar.d.ts → glasses/action-bar.d.ts} +0 -0
  556. /package/dist/{action-bar.js → glasses/action-bar.js} +0 -0
  557. /package/dist/{action-map.d.ts → glasses/action-map.d.ts} +0 -0
  558. /package/dist/{action-map.js → glasses/action-map.js} +0 -0
  559. /package/dist/{bridge.d.ts → glasses/bridge.d.ts} +0 -0
  560. /package/dist/{bridge.js → glasses/bridge.js} +0 -0
  561. /package/dist/{canvas-renderer.d.ts → glasses/canvas-renderer.d.ts} +0 -0
  562. /package/dist/{canvas-renderer.js → glasses/canvas-renderer.js} +0 -0
  563. /package/dist/{composer.d.ts → glasses/composer.d.ts} +0 -0
  564. /package/dist/{composer.js → glasses/composer.js} +0 -0
  565. /package/dist/{gestures.d.ts → glasses/gestures.d.ts} +0 -0
  566. /package/dist/{gestures.js → glasses/gestures.js} +0 -0
  567. /package/dist/{index.d.ts → glasses/index.d.ts} +0 -0
  568. /package/dist/{index.js → glasses/index.js} +0 -0
  569. /package/dist/{keep-alive.d.ts → glasses/keep-alive.d.ts} +0 -0
  570. /package/dist/{keep-alive.js → glasses/keep-alive.js} +0 -0
  571. /package/dist/{keyboard.d.ts → glasses/keyboard.d.ts} +0 -0
  572. /package/dist/{keyboard.js → glasses/keyboard.js} +0 -0
  573. /package/dist/{layout.d.ts → glasses/layout.d.ts} +0 -0
  574. /package/dist/{layout.js → glasses/layout.js} +0 -0
  575. /package/dist/{paginate-text.d.ts → glasses/paginate-text.d.ts} +0 -0
  576. /package/dist/{paginate-text.js → glasses/paginate-text.js} +0 -0
  577. /package/dist/{png-utils.d.ts → glasses/png-utils.d.ts} +0 -0
  578. /package/dist/{png-utils.js → glasses/png-utils.js} +0 -0
  579. /package/dist/{splash.d.ts → glasses/splash.d.ts} +0 -0
  580. /package/dist/{splash.js → glasses/splash.js} +0 -0
  581. /package/dist/{text-clean.d.ts → glasses/text-clean.d.ts} +0 -0
  582. /package/dist/{text-clean.js → glasses/text-clean.js} +0 -0
  583. /package/dist/{text-utils.d.ts → glasses/text-utils.d.ts} +0 -0
  584. /package/dist/{text-utils.js → glasses/text-utils.js} +0 -0
  585. /package/dist/{timer-display.d.ts → glasses/timer-display.d.ts} +0 -0
  586. /package/dist/{timer-display.js → glasses/timer-display.js} +0 -0
  587. /package/dist/{types.d.ts → glasses/types.d.ts} +0 -0
  588. /package/dist/{types.js → glasses/types.js} +0 -0
  589. /package/dist/{useFlashPhase.d.ts → glasses/useFlashPhase.d.ts} +0 -0
  590. /package/dist/{useFlashPhase.js → glasses/useFlashPhase.js} +0 -0
  591. /package/dist/{useGlasses.d.ts → glasses/useGlasses.d.ts} +0 -0
  592. /package/dist/{useGlasses.js → glasses/useGlasses.js} +0 -0
@@ -0,0 +1,494 @@
1
+ import * as React from 'react';
2
+ import { cn } from '../utils/cn';
3
+ import type { ReactNode } from 'react';
4
+
5
+ // ─── Types ──────────────────────────────────────────────────────
6
+
7
+ export interface ToolCall {
8
+ name: string;
9
+ input?: string;
10
+ output?: string;
11
+ status?: 'running' | 'complete' | 'error';
12
+ }
13
+
14
+ export interface CodeBlock {
15
+ language?: string;
16
+ content: string;
17
+ }
18
+
19
+ export interface ChatMessage {
20
+ id: string;
21
+ role: 'user' | 'assistant' | 'system';
22
+ content: string;
23
+ timestamp?: number;
24
+ thinking?: string;
25
+ isStreaming?: boolean;
26
+ toolCalls?: ToolCall[];
27
+ codeBlocks?: CodeBlock[];
28
+ diff?: string;
29
+ error?: string;
30
+ command?: string;
31
+ }
32
+
33
+ // ─── ChatThinking ───────────────────────────────────────────────
34
+
35
+ interface ChatThinkingProps {
36
+ content: string;
37
+ className?: string;
38
+ }
39
+
40
+ function ChatThinking({ content, className }: ChatThinkingProps) {
41
+ const [expanded, setExpanded] = React.useState(false);
42
+ const summary = content.length > 80 ? content.slice(0, 80) + '...' : content;
43
+
44
+ return (
45
+ <button
46
+ type="button"
47
+ onClick={() => setExpanded(!expanded)}
48
+ className={cn('text-left w-full', className)}
49
+ >
50
+ <div className="flex items-center gap-1 text-[13px] tracking-[-0.13px] text-text-dim cursor-pointer hover:text-text transition-colors">
51
+ <span>{expanded ? '\u25BE' : '\u25B8'}</span>
52
+ <span className="italic">Thinking...</span>
53
+ </div>
54
+ {expanded && (
55
+ <div className="border-l-2 border-accent pl-3 py-1 mt-1 text-[13px] tracking-[-0.13px] text-text-dim italic whitespace-pre-wrap">
56
+ {content}
57
+ </div>
58
+ )}
59
+ {!expanded && (
60
+ <div className="border-l-2 border-accent pl-3 py-1 mt-1 text-[11px] tracking-[-0.11px] text-text-muted truncate">
61
+ {summary}
62
+ </div>
63
+ )}
64
+ </button>
65
+ );
66
+ }
67
+
68
+ // ─── ChatCodeBlock ──────────────────────────────────────────────
69
+
70
+ interface ChatCodeBlockProps {
71
+ language?: string;
72
+ content: string;
73
+ className?: string;
74
+ }
75
+
76
+ function ChatCodeBlock({ language, content, className }: ChatCodeBlockProps) {
77
+ const lines = content.split('\n');
78
+
79
+ return (
80
+ <div className={cn('bg-surface-lighter rounded-[6px] overflow-hidden', className)}>
81
+ {language && (
82
+ <div className="px-3 py-1.5 text-[11px] tracking-[-0.11px] text-text-muted border-b border-border/30">
83
+ {language}
84
+ </div>
85
+ )}
86
+ <div className="overflow-x-auto">
87
+ <pre className="px-3 py-2 font-mono text-[13px] tracking-[-0.13px] text-text leading-5">
88
+ {lines.map((line, i) => (
89
+ <div key={i} className="flex">
90
+ <span className="w-8 shrink-0 text-right pr-3 text-text-muted select-none">{i + 1}</span>
91
+ <span className="whitespace-pre-wrap break-all">{line}</span>
92
+ </div>
93
+ ))}
94
+ </pre>
95
+ </div>
96
+ </div>
97
+ );
98
+ }
99
+
100
+ // ─── ChatDiff ───────────────────────────────────────────────────
101
+
102
+ interface ChatDiffProps {
103
+ content: string;
104
+ className?: string;
105
+ }
106
+
107
+ function ChatDiff({ content, className }: ChatDiffProps) {
108
+ const lines = content.split('\n');
109
+
110
+ return (
111
+ <div className={cn('rounded-[6px] overflow-hidden font-mono text-[13px] tracking-[-0.13px]', className)}>
112
+ {lines.map((line, i) => {
113
+ let bg = '';
114
+ let textColor = 'text-text';
115
+ if (line.startsWith('@@')) {
116
+ bg = 'bg-accent/10';
117
+ textColor = 'text-accent';
118
+ } else if (line.startsWith('+')) {
119
+ bg = 'bg-positive/10';
120
+ textColor = 'text-positive';
121
+ } else if (line.startsWith('-')) {
122
+ bg = 'bg-negative/10';
123
+ textColor = 'text-negative';
124
+ }
125
+ return (
126
+ <div key={i} className={cn('px-3 py-0.5 whitespace-pre-wrap', bg, textColor)}>
127
+ {line}
128
+ </div>
129
+ );
130
+ })}
131
+ </div>
132
+ );
133
+ }
134
+
135
+ // ─── ChatToolCall ───────────────────────────────────────────────
136
+
137
+ interface ChatToolCallProps {
138
+ toolCall: ToolCall;
139
+ className?: string;
140
+ }
141
+
142
+ function ChatToolCall({ toolCall, className }: ChatToolCallProps) {
143
+ const [expanded, setExpanded] = React.useState(false);
144
+
145
+ return (
146
+ <div className={cn('bg-surface-lighter rounded-[6px] overflow-hidden', className)}>
147
+ <button
148
+ type="button"
149
+ onClick={() => setExpanded(!expanded)}
150
+ className="w-full flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-surface-light/50 transition-colors"
151
+ >
152
+ {/* Status indicator */}
153
+ {toolCall.status === 'running' && (
154
+ <div className="w-3 h-3 animate-spin rounded-full border border-surface-lighter border-t-accent shrink-0" />
155
+ )}
156
+ {toolCall.status === 'complete' && (
157
+ <svg viewBox="0 0 12 12" className="w-3 h-3 text-positive shrink-0"><rect x={2} y={6} width={2} height={2} fill="currentColor" /><rect x={4} y={8} width={2} height={2} fill="currentColor" /><rect x={6} y={6} width={2} height={2} fill="currentColor" /><rect x={8} y={4} width={2} height={2} fill="currentColor" /></svg>
158
+ )}
159
+ {toolCall.status === 'error' && (
160
+ <svg viewBox="0 0 12 12" className="w-3 h-3 text-negative shrink-0"><rect x={2} y={2} width={2} height={2} fill="currentColor" /><rect x={4} y={4} width={2} height={2} fill="currentColor" /><rect x={6} y={6} width={2} height={2} fill="currentColor" /><rect x={8} y={8} width={2} height={2} fill="currentColor" /><rect x={8} y={2} width={2} height={2} fill="currentColor" /><rect x={6} y={4} width={2} height={2} fill="currentColor" /><rect x={4} y={6} width={2} height={2} fill="currentColor" /><rect x={2} y={8} width={2} height={2} fill="currentColor" /></svg>
161
+ )}
162
+ {!toolCall.status && (
163
+ <svg viewBox="0 0 12 12" className="w-3 h-3 text-text-dim shrink-0"><rect x={1} y={3} width={4} height={2} fill="currentColor" /><rect x={3} y={5} width={2} height={2} fill="currentColor" /><rect x={5} y={5} width={4} height={2} fill="currentColor" /><rect x={7} y={7} width={2} height={2} fill="currentColor" /></svg>
164
+ )}
165
+ <span className="font-mono text-[13px] tracking-[-0.13px] text-text">{toolCall.name}</span>
166
+ <span className="ml-auto text-[11px] text-text-muted">{expanded ? '\u25BE' : '\u25B8'}</span>
167
+ </button>
168
+ {expanded && (
169
+ <div className="border-t border-border/30 px-3 py-2 font-mono text-[13px] tracking-[-0.13px]">
170
+ {toolCall.input && (
171
+ <div className="mb-2">
172
+ <div className="text-[11px] text-text-muted mb-1">Input</div>
173
+ <pre className="whitespace-pre-wrap text-text-dim">{toolCall.input}</pre>
174
+ </div>
175
+ )}
176
+ {toolCall.output && (
177
+ <div>
178
+ <div className="text-[11px] text-text-muted mb-1">Output</div>
179
+ <pre className="whitespace-pre-wrap text-text-dim">{toolCall.output}</pre>
180
+ </div>
181
+ )}
182
+ </div>
183
+ )}
184
+ </div>
185
+ );
186
+ }
187
+
188
+ // ─── ChatCommand ────────────────────────────────────────────────
189
+
190
+ interface ChatCommandProps {
191
+ command: string;
192
+ output?: string;
193
+ className?: string;
194
+ }
195
+
196
+ function ChatCommand({ command, output, className }: ChatCommandProps) {
197
+ return (
198
+ <div className={cn('font-mono text-[13px] tracking-[-0.13px]', className)}>
199
+ <div className="flex items-center gap-1 text-text">
200
+ <span className="text-text-dim">$</span>
201
+ <span>{command}</span>
202
+ </div>
203
+ {output && (
204
+ <pre className="whitespace-pre-wrap text-text-dim mt-1">{output}</pre>
205
+ )}
206
+ </div>
207
+ );
208
+ }
209
+
210
+ // ─── ChatError ──────────────────────────────────────────────────
211
+
212
+ interface ChatErrorProps {
213
+ message: string;
214
+ className?: string;
215
+ }
216
+
217
+ function ChatError({ message, className }: ChatErrorProps) {
218
+ return (
219
+ <div className={cn('bg-negative/10 text-negative rounded-[6px] px-3 py-2 text-[13px] tracking-[-0.13px]', className)}>
220
+ {message}
221
+ </div>
222
+ );
223
+ }
224
+
225
+ // ─── Content Parser ─────────────────────────────────────────────
226
+
227
+ function parseAssistantContent(content: string): ReactNode[] {
228
+ const blocks: ReactNode[] = [];
229
+ const lines = content.split('\n');
230
+ let i = 0;
231
+ let textBuffer: string[] = [];
232
+
233
+ const flushText = () => {
234
+ if (textBuffer.length > 0) {
235
+ blocks.push(<span key={`t-${blocks.length}`}>{textBuffer.join('\n')}</span>);
236
+ textBuffer = [];
237
+ }
238
+ };
239
+
240
+ while (i < lines.length) {
241
+ const line = lines[i];
242
+
243
+ // Code fence
244
+ if (line.startsWith('```')) {
245
+ flushText();
246
+ const lang = line.slice(3).trim() || undefined;
247
+ const codeLines: string[] = [];
248
+ i++;
249
+ while (i < lines.length && !lines[i].startsWith('```')) {
250
+ codeLines.push(lines[i]);
251
+ i++;
252
+ }
253
+ blocks.push(<ChatCodeBlock key={`c-${blocks.length}`} language={lang} content={codeLines.join('\n')} />);
254
+ i++; // skip closing ```
255
+ continue;
256
+ }
257
+
258
+ // Diff block (consecutive +/- lines)
259
+ if ((line.startsWith('@@') || line.startsWith('+') || line.startsWith('-')) && i + 1 < lines.length) {
260
+ const diffStart = i;
261
+ const diffLines: string[] = [];
262
+ while (i < lines.length && (lines[i].startsWith('@@') || lines[i].startsWith('+') || lines[i].startsWith('-') || lines[i].startsWith(' '))) {
263
+ diffLines.push(lines[i]);
264
+ i++;
265
+ // Stop if we've captured a meaningful diff (at least 2 lines starting with +/-)
266
+ if (diffLines.length > 1 && i < lines.length && !lines[i].startsWith('@@') && !lines[i].startsWith('+') && !lines[i].startsWith('-') && !lines[i].startsWith(' ')) break;
267
+ }
268
+ if (diffLines.length >= 2 && diffLines.some(l => l.startsWith('+') || l.startsWith('-'))) {
269
+ flushText();
270
+ blocks.push(<ChatDiff key={`d-${blocks.length}`} content={diffLines.join('\n')} />);
271
+ continue;
272
+ }
273
+ // Not a real diff, treat as text
274
+ i = diffStart;
275
+ }
276
+
277
+ // Tool call line: >> toolName
278
+ if (line.startsWith('>> ')) {
279
+ flushText();
280
+ const name = line.slice(3).trim();
281
+ blocks.push(<ChatToolCall key={`tc-${blocks.length}`} toolCall={{ name, status: 'complete' }} />);
282
+ i++;
283
+ continue;
284
+ }
285
+
286
+ // Error line: ! message
287
+ if (line.startsWith('! ')) {
288
+ flushText();
289
+ blocks.push(<ChatError key={`e-${blocks.length}`} message={line.slice(2)} />);
290
+ i++;
291
+ continue;
292
+ }
293
+
294
+ // Command line: $ command
295
+ if (line.startsWith('$ ')) {
296
+ flushText();
297
+ blocks.push(<ChatCommand key={`cmd-${blocks.length}`} command={line.slice(2)} />);
298
+ i++;
299
+ continue;
300
+ }
301
+
302
+ textBuffer.push(line);
303
+ i++;
304
+ }
305
+
306
+ flushText();
307
+ return blocks;
308
+ }
309
+
310
+ // ─── ChatBubble ─────────────────────────────────────────────────
311
+
312
+ interface ChatBubbleProps {
313
+ message: ChatMessage;
314
+ className?: string;
315
+ }
316
+
317
+ function ChatBubble({ message, className }: ChatBubbleProps) {
318
+ const { role, content, thinking, isStreaming, toolCalls, codeBlocks, diff, error, command, timestamp } = message;
319
+
320
+ if (role === 'system') {
321
+ return (
322
+ <div className={cn('flex justify-center py-2', className)}>
323
+ <span className="text-[13px] tracking-[-0.13px] text-text-dim">{content}</span>
324
+ </div>
325
+ );
326
+ }
327
+
328
+ const isUser = role === 'user';
329
+
330
+ return (
331
+ <div className={cn('flex', isUser ? 'justify-end' : 'justify-start', 'mb-3', className)}>
332
+ <div className="max-w-[85%] flex flex-col gap-1.5">
333
+ {/* Thinking block */}
334
+ {thinking && <ChatThinking content={thinking} />}
335
+
336
+ {/* Main bubble */}
337
+ <div
338
+ className={cn(
339
+ 'px-4 py-3 text-[15px] tracking-[-0.15px]',
340
+ isUser
341
+ ? 'bg-accent text-text-highlight rounded-[6px] rounded-br-none'
342
+ : 'bg-surface text-text rounded-[6px] rounded-bl-none',
343
+ )}
344
+ >
345
+ {isUser ? content : (
346
+ <div className="flex flex-col gap-2">
347
+ {parseAssistantContent(content)}
348
+ </div>
349
+ )}
350
+ {isStreaming && (
351
+ <span className="inline-block w-[2px] h-[15px] bg-current ml-0.5 animate-pulse align-text-bottom" />
352
+ )}
353
+ </div>
354
+
355
+ {/* Code blocks (explicit) */}
356
+ {codeBlocks?.map((cb, i) => (
357
+ <ChatCodeBlock key={`cb-${i}`} language={cb.language} content={cb.content} />
358
+ ))}
359
+
360
+ {/* Diff (explicit) */}
361
+ {diff && <ChatDiff content={diff} />}
362
+
363
+ {/* Command (explicit) */}
364
+ {command && <ChatCommand command={command} />}
365
+
366
+ {/* Tool calls */}
367
+ {toolCalls?.map((tc, i) => (
368
+ <ChatToolCall key={`tc-${i}`} toolCall={tc} />
369
+ ))}
370
+
371
+ {/* Error */}
372
+ {error && <ChatError message={error} />}
373
+
374
+ {/* Timestamp */}
375
+ {timestamp && (
376
+ <span className={cn('text-[11px] tracking-[-0.11px] text-text-muted', isUser ? 'text-right' : 'text-left')}>
377
+ {new Date(timestamp).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
378
+ </span>
379
+ )}
380
+ </div>
381
+ </div>
382
+ );
383
+ }
384
+
385
+ // ─── ChatInput ──────────────────────────────────────────────────
386
+
387
+ interface ChatInputProps {
388
+ value: string;
389
+ onChange: (value: string) => void;
390
+ onSend: () => void;
391
+ placeholder?: string;
392
+ disabled?: boolean;
393
+ className?: string;
394
+ }
395
+
396
+ function ChatInput({ value, onChange, onSend, placeholder = 'Type a message...', disabled, className }: ChatInputProps) {
397
+ const textareaRef = React.useRef<HTMLTextAreaElement>(null);
398
+
399
+ const handleKeyDown = (e: React.KeyboardEvent) => {
400
+ if (e.key === 'Enter' && !e.shiftKey) {
401
+ e.preventDefault();
402
+ if (value.trim()) onSend();
403
+ }
404
+ };
405
+
406
+ // Auto-grow textarea
407
+ React.useEffect(() => {
408
+ const ta = textareaRef.current;
409
+ if (ta) {
410
+ ta.style.height = '0';
411
+ ta.style.height = Math.min(ta.scrollHeight, 120) + 'px';
412
+ }
413
+ }, [value]);
414
+
415
+ return (
416
+ <div className={cn('flex items-end gap-2 p-3 bg-bg', className)}>
417
+ <textarea
418
+ ref={textareaRef}
419
+ value={value}
420
+ onChange={(e) => onChange(e.target.value)}
421
+ onKeyDown={handleKeyDown}
422
+ placeholder={placeholder}
423
+ disabled={disabled}
424
+ rows={1}
425
+ className="flex-1 bg-input-bg text-text rounded-[6px] px-4 py-3 text-[15px] tracking-[-0.15px] outline-none placeholder:text-text-dim resize-none min-h-[44px] max-h-[120px]"
426
+ />
427
+ <button
428
+ type="button"
429
+ onClick={onSend}
430
+ disabled={disabled || !value.trim()}
431
+ className="shrink-0 h-11 w-11 rounded-[6px] bg-accent text-text-highlight flex items-center justify-center cursor-pointer disabled:opacity-50 disabled:pointer-events-none transition-colors"
432
+ >
433
+ <svg viewBox="0 0 24 24" className="w-5 h-5" fill="none">
434
+ <rect x={10} y={4} width={2} height={2} fill="currentColor" />
435
+ <rect x={10} y={6} width={2} height={2} fill="currentColor" />
436
+ <rect x={10} y={8} width={2} height={2} fill="currentColor" />
437
+ <rect x={10} y={10} width={2} height={2} fill="currentColor" />
438
+ <rect x={10} y={12} width={2} height={2} fill="currentColor" />
439
+ <rect x={10} y={14} width={2} height={2} fill="currentColor" />
440
+ <rect x={10} y={16} width={2} height={2} fill="currentColor" />
441
+ <rect x={8} y={6} width={2} height={2} fill="currentColor" />
442
+ <rect x={12} y={6} width={2} height={2} fill="currentColor" />
443
+ <rect x={6} y={8} width={2} height={2} fill="currentColor" />
444
+ <rect x={14} y={8} width={2} height={2} fill="currentColor" />
445
+ </svg>
446
+ </button>
447
+ </div>
448
+ );
449
+ }
450
+
451
+ // ─── ChatContainer ──────────────────────────────────────────────
452
+
453
+ interface ChatContainerProps {
454
+ messages: ChatMessage[];
455
+ input?: ReactNode;
456
+ className?: string;
457
+ }
458
+
459
+ function ChatContainer({ messages, input, className }: ChatContainerProps) {
460
+ const listRef = React.useRef<HTMLDivElement>(null);
461
+ const [autoScroll, setAutoScroll] = React.useState(true);
462
+
463
+ // Auto-scroll to bottom
464
+ React.useEffect(() => {
465
+ if (autoScroll && listRef.current) {
466
+ listRef.current.scrollTop = listRef.current.scrollHeight;
467
+ }
468
+ }, [messages, autoScroll]);
469
+
470
+ const handleScroll = () => {
471
+ const el = listRef.current;
472
+ if (!el) return;
473
+ const atBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 40;
474
+ setAutoScroll(atBottom);
475
+ };
476
+
477
+ return (
478
+ <div className={cn('flex flex-col h-full', className)}>
479
+ <div
480
+ ref={listRef}
481
+ onScroll={handleScroll}
482
+ className="flex-1 overflow-y-auto px-3 py-4"
483
+ >
484
+ {messages.map((msg) => (
485
+ <ChatBubble key={msg.id} message={msg} />
486
+ ))}
487
+ </div>
488
+ {input}
489
+ </div>
490
+ );
491
+ }
492
+
493
+ export { ChatContainer, ChatBubble, ChatInput, ChatThinking, ChatCodeBlock, ChatDiff, ChatToolCall, ChatCommand, ChatError };
494
+ export type { ChatContainerProps, ChatBubbleProps, ChatInputProps };
@@ -0,0 +1,52 @@
1
+ import { cn } from '../utils/cn';
2
+
3
+ interface CheckboxProps {
4
+ checked: boolean;
5
+ onChange: (checked: boolean) => void;
6
+ label?: string;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+
11
+ function Checkbox({ checked, onChange, label, disabled, className }: CheckboxProps) {
12
+ return (
13
+ <label
14
+ className={cn(
15
+ 'inline-flex items-center gap-3 cursor-pointer select-none',
16
+ disabled && 'opacity-50 pointer-events-none',
17
+ className,
18
+ )}
19
+ >
20
+ <button
21
+ type="button"
22
+ role="checkbox"
23
+ aria-checked={checked}
24
+ disabled={disabled}
25
+ onClick={() => onChange(!checked)}
26
+ className={cn(
27
+ 'relative shrink-0 w-5 h-5 rounded-[4px] transition-colors cursor-pointer',
28
+ checked ? 'bg-accent' : 'bg-surface-lighter',
29
+ )}
30
+ >
31
+ {checked && (
32
+ <svg
33
+ viewBox="0 0 12 12"
34
+ className="absolute inset-0 w-full h-full p-0.5"
35
+ fill="none"
36
+ >
37
+ <rect x={2} y={5} width={2} height={2} fill="var(--color-text-highlight)" />
38
+ <rect x={4} y={7} width={2} height={2} fill="var(--color-text-highlight)" />
39
+ <rect x={6} y={5} width={2} height={2} fill="var(--color-text-highlight)" />
40
+ <rect x={8} y={3} width={2} height={2} fill="var(--color-text-highlight)" />
41
+ </svg>
42
+ )}
43
+ </button>
44
+ {label && (
45
+ <span className="text-[15px] tracking-[-0.15px] text-text">{label}</span>
46
+ )}
47
+ </label>
48
+ );
49
+ }
50
+
51
+ export { Checkbox };
52
+ export type { CheckboxProps };
@@ -0,0 +1,100 @@
1
+ import * as React from 'react';
2
+ import { cn } from '../utils/cn';
3
+
4
+ interface ConfirmDialogProps {
5
+ open: boolean;
6
+ onClose: () => void;
7
+ onConfirm: () => void;
8
+ title: string;
9
+ description?: string;
10
+ confirmLabel?: string;
11
+ cancelLabel?: string;
12
+ variant?: 'default' | 'danger';
13
+ }
14
+
15
+ function ConfirmDialog({
16
+ open,
17
+ onClose,
18
+ onConfirm,
19
+ title,
20
+ description,
21
+ confirmLabel = 'Confirm',
22
+ cancelLabel = 'Cancel',
23
+ variant = 'default',
24
+ }: ConfirmDialogProps) {
25
+ const [visible, setVisible] = React.useState(false);
26
+ const [closing, setClosing] = React.useState(false);
27
+
28
+ React.useEffect(() => {
29
+ if (open) {
30
+ setVisible(true);
31
+ setClosing(false);
32
+ } else if (visible) {
33
+ setClosing(true);
34
+ const timer = setTimeout(() => { setVisible(false); setClosing(false); }, 200);
35
+ return () => clearTimeout(timer);
36
+ }
37
+ }, [open]);
38
+
39
+ React.useEffect(() => {
40
+ if (!visible) return;
41
+ const handler = (e: KeyboardEvent) => {
42
+ if (e.key === 'Escape') onClose();
43
+ };
44
+ document.addEventListener('keydown', handler);
45
+ return () => document.removeEventListener('keydown', handler);
46
+ }, [visible, onClose]);
47
+
48
+ if (!visible) return null;
49
+
50
+ return (
51
+ <div
52
+ className="fixed inset-0 z-50 flex items-end justify-center"
53
+ style={{
54
+ animation: closing ? 'fadeOut 200ms ease forwards' : 'fadeIn 200ms ease',
55
+ }}
56
+ >
57
+ <div className="absolute inset-0 bg-overlay" onClick={onClose} />
58
+ <div
59
+ className="relative z-10 w-full max-w-[393px] bg-bg rounded-t-[6px] shadow-[0px_-4px_12px_0px_rgba(0,0,0,0.12)] pt-3"
60
+ style={{
61
+ animation: closing ? 'slideDown 200ms ease forwards' : 'slideUp 250ms ease',
62
+ }}
63
+ >
64
+ <div className="px-4 py-3">
65
+ <h2 className="text-[17px] tracking-[-0.17px] font-normal text-text text-center">{title}</h2>
66
+ </div>
67
+ {description && (
68
+ <div className="px-3 pb-3">
69
+ <p className="text-[13px] tracking-[-0.13px] text-text-dim text-center">{description}</p>
70
+ </div>
71
+ )}
72
+ <div className="flex flex-col gap-3 px-3 pt-3">
73
+ <button
74
+ type="button"
75
+ onClick={onClose}
76
+ className="w-full h-12 rounded-[6px] text-[17px] tracking-[-0.17px] font-normal cursor-pointer transition-colors bg-surface text-text hover:bg-surface-light"
77
+ >
78
+ {cancelLabel}
79
+ </button>
80
+ <button
81
+ type="button"
82
+ onClick={() => { onConfirm(); onClose(); }}
83
+ className={cn(
84
+ 'w-full h-12 rounded-[6px] text-[17px] tracking-[-0.17px] font-normal cursor-pointer transition-colors bg-surface hover:bg-surface-light',
85
+ variant === 'danger' ? 'text-negative' : 'text-text',
86
+ )}
87
+ >
88
+ {confirmLabel}
89
+ </button>
90
+ </div>
91
+ <div className="flex items-center justify-center h-[42px]">
92
+ <div className="w-[139px] h-[5px] rounded-full bg-text" />
93
+ </div>
94
+ </div>
95
+ </div>
96
+ );
97
+ }
98
+
99
+ export { ConfirmDialog };
100
+ export type { ConfirmDialogProps };