@vendoai/ui 0.4.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 (525) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +7 -0
  3. package/dist/chrome/activity-ledger.d.ts +14 -0
  4. package/dist/chrome/activity-ledger.d.ts.map +1 -0
  5. package/dist/chrome/activity-ledger.js +40 -0
  6. package/dist/chrome/activity-ledger.js.map +1 -0
  7. package/dist/chrome/activity-panel.d.ts +7 -0
  8. package/dist/chrome/activity-panel.d.ts.map +1 -0
  9. package/dist/chrome/activity-panel.js +27 -0
  10. package/dist/chrome/activity-panel.js.map +1 -0
  11. package/dist/chrome/activity-semantics.d.ts +42 -0
  12. package/dist/chrome/activity-semantics.d.ts.map +1 -0
  13. package/dist/chrome/activity-semantics.js +119 -0
  14. package/dist/chrome/activity-semantics.js.map +1 -0
  15. package/dist/chrome/approval-card.d.ts +22 -0
  16. package/dist/chrome/approval-card.d.ts.map +1 -0
  17. package/dist/chrome/approval-card.js +95 -0
  18. package/dist/chrome/approval-card.js.map +1 -0
  19. package/dist/chrome/approval-sheet.d.ts +23 -0
  20. package/dist/chrome/approval-sheet.d.ts.map +1 -0
  21. package/dist/chrome/approval-sheet.js +72 -0
  22. package/dist/chrome/approval-sheet.js.map +1 -0
  23. package/dist/chrome/automations-panel.d.ts +3 -0
  24. package/dist/chrome/automations-panel.d.ts.map +1 -0
  25. package/dist/chrome/automations-panel.js +305 -0
  26. package/dist/chrome/automations-panel.js.map +1 -0
  27. package/dist/chrome/build-beat.d.ts +70 -0
  28. package/dist/chrome/build-beat.d.ts.map +1 -0
  29. package/dist/chrome/build-beat.js +101 -0
  30. package/dist/chrome/build-beat.js.map +1 -0
  31. package/dist/chrome/chrome-css.d.ts +7 -0
  32. package/dist/chrome/chrome-css.d.ts.map +1 -0
  33. package/dist/chrome/chrome-css.js +2042 -0
  34. package/dist/chrome/chrome-css.js.map +1 -0
  35. package/dist/chrome/chrome-root.d.ts +13 -0
  36. package/dist/chrome/chrome-root.d.ts.map +1 -0
  37. package/dist/chrome/chrome-root.js +39 -0
  38. package/dist/chrome/chrome-root.js.map +1 -0
  39. package/dist/chrome/clipboard.d.ts +4 -0
  40. package/dist/chrome/clipboard.d.ts.map +1 -0
  41. package/dist/chrome/clipboard.js +49 -0
  42. package/dist/chrome/clipboard.js.map +1 -0
  43. package/dist/chrome/connect-card.d.ts +19 -0
  44. package/dist/chrome/connect-card.d.ts.map +1 -0
  45. package/dist/chrome/connect-card.js +57 -0
  46. package/dist/chrome/connect-card.js.map +1 -0
  47. package/dist/chrome/connect-dock.d.ts +25 -0
  48. package/dist/chrome/connect-dock.d.ts.map +1 -0
  49. package/dist/chrome/connect-dock.js +192 -0
  50. package/dist/chrome/connect-dock.js.map +1 -0
  51. package/dist/chrome/connected-accounts-panel.d.ts +14 -0
  52. package/dist/chrome/connected-accounts-panel.d.ts.map +1 -0
  53. package/dist/chrome/connected-accounts-panel.js +157 -0
  54. package/dist/chrome/connected-accounts-panel.js.map +1 -0
  55. package/dist/chrome/dev-mode.d.ts +5 -0
  56. package/dist/chrome/dev-mode.d.ts.map +1 -0
  57. package/dist/chrome/dev-mode.js +7 -0
  58. package/dist/chrome/dev-mode.js.map +1 -0
  59. package/dist/chrome/discoverability.d.ts +33 -0
  60. package/dist/chrome/discoverability.d.ts.map +1 -0
  61. package/dist/chrome/discoverability.js +63 -0
  62. package/dist/chrome/discoverability.js.map +1 -0
  63. package/dist/chrome/embeds.d.ts +21 -0
  64. package/dist/chrome/embeds.d.ts.map +1 -0
  65. package/dist/chrome/embeds.js +181 -0
  66. package/dist/chrome/embeds.js.map +1 -0
  67. package/dist/chrome/fluid-thinking.d.ts +15 -0
  68. package/dist/chrome/fluid-thinking.d.ts.map +1 -0
  69. package/dist/chrome/fluid-thinking.js +37 -0
  70. package/dist/chrome/fluid-thinking.js.map +1 -0
  71. package/dist/chrome/humanize.d.ts +46 -0
  72. package/dist/chrome/humanize.d.ts.map +1 -0
  73. package/dist/chrome/humanize.js +104 -0
  74. package/dist/chrome/humanize.js.map +1 -0
  75. package/dist/chrome/index.d.ts +39 -0
  76. package/dist/chrome/index.d.ts.map +1 -0
  77. package/dist/chrome/index.js +38 -0
  78. package/dist/chrome/index.js.map +1 -0
  79. package/dist/chrome/markdown.d.ts +23 -0
  80. package/dist/chrome/markdown.d.ts.map +1 -0
  81. package/dist/chrome/markdown.js +149 -0
  82. package/dist/chrome/markdown.js.map +1 -0
  83. package/dist/chrome/morph-toast.d.ts +43 -0
  84. package/dist/chrome/morph-toast.d.ts.map +1 -0
  85. package/dist/chrome/morph-toast.js +89 -0
  86. package/dist/chrome/morph-toast.js.map +1 -0
  87. package/dist/chrome/no-policy-notice.d.ts +8 -0
  88. package/dist/chrome/no-policy-notice.d.ts.map +1 -0
  89. package/dist/chrome/no-policy-notice.js +18 -0
  90. package/dist/chrome/no-policy-notice.js.map +1 -0
  91. package/dist/chrome/onest-font.gen.d.ts +10 -0
  92. package/dist/chrome/onest-font.gen.d.ts.map +1 -0
  93. package/dist/chrome/onest-font.gen.js +10 -0
  94. package/dist/chrome/onest-font.gen.js.map +1 -0
  95. package/dist/chrome/overlay-registry.d.ts +66 -0
  96. package/dist/chrome/overlay-registry.d.ts.map +1 -0
  97. package/dist/chrome/overlay-registry.js +103 -0
  98. package/dist/chrome/overlay-registry.js.map +1 -0
  99. package/dist/chrome/palette-hotkey.d.ts +42 -0
  100. package/dist/chrome/palette-hotkey.d.ts.map +1 -0
  101. package/dist/chrome/palette-hotkey.js +91 -0
  102. package/dist/chrome/palette-hotkey.js.map +1 -0
  103. package/dist/chrome/policy-notice-body.d.ts +3 -0
  104. package/dist/chrome/policy-notice-body.d.ts.map +1 -0
  105. package/dist/chrome/policy-notice-body.js +6 -0
  106. package/dist/chrome/policy-notice-body.js.map +1 -0
  107. package/dist/chrome/takeover-portal.d.ts +16 -0
  108. package/dist/chrome/takeover-portal.d.ts.map +1 -0
  109. package/dist/chrome/takeover-portal.js +21 -0
  110. package/dist/chrome/takeover-portal.js.map +1 -0
  111. package/dist/chrome/thread/attachments.d.ts +24 -0
  112. package/dist/chrome/thread/attachments.d.ts.map +1 -0
  113. package/dist/chrome/thread/attachments.js +50 -0
  114. package/dist/chrome/thread/attachments.js.map +1 -0
  115. package/dist/chrome/thread/composer.d.ts +63 -0
  116. package/dist/chrome/thread/composer.d.ts.map +1 -0
  117. package/dist/chrome/thread/composer.js +259 -0
  118. package/dist/chrome/thread/composer.js.map +1 -0
  119. package/dist/chrome/thread/index.d.ts +41 -0
  120. package/dist/chrome/thread/index.d.ts.map +1 -0
  121. package/dist/chrome/thread/index.js +258 -0
  122. package/dist/chrome/thread/index.js.map +1 -0
  123. package/dist/chrome/thread/message-data.d.ts +35 -0
  124. package/dist/chrome/thread/message-data.d.ts.map +1 -0
  125. package/dist/chrome/thread/message-data.js +127 -0
  126. package/dist/chrome/thread/message-data.js.map +1 -0
  127. package/dist/chrome/thread/message-list.d.ts +30 -0
  128. package/dist/chrome/thread/message-list.d.ts.map +1 -0
  129. package/dist/chrome/thread/message-list.js +11 -0
  130. package/dist/chrome/thread/message-list.js.map +1 -0
  131. package/dist/chrome/thread/message.d.ts +18 -0
  132. package/dist/chrome/thread/message.d.ts.map +1 -0
  133. package/dist/chrome/thread/message.js +57 -0
  134. package/dist/chrome/thread/message.js.map +1 -0
  135. package/dist/chrome/thread/parts.d.ts +53 -0
  136. package/dist/chrome/thread/parts.d.ts.map +1 -0
  137. package/dist/chrome/thread/parts.js +184 -0
  138. package/dist/chrome/thread/parts.js.map +1 -0
  139. package/dist/chrome/thread/scrolling.d.ts +26 -0
  140. package/dist/chrome/thread/scrolling.d.ts.map +1 -0
  141. package/dist/chrome/thread/scrolling.js +214 -0
  142. package/dist/chrome/thread/scrolling.js.map +1 -0
  143. package/dist/chrome/truncate.d.ts +12 -0
  144. package/dist/chrome/truncate.d.ts.map +1 -0
  145. package/dist/chrome/truncate.js +18 -0
  146. package/dist/chrome/truncate.js.map +1 -0
  147. package/dist/chrome/vendo-activities.d.ts +24 -0
  148. package/dist/chrome/vendo-activities.d.ts.map +1 -0
  149. package/dist/chrome/vendo-activities.js +38 -0
  150. package/dist/chrome/vendo-activities.js.map +1 -0
  151. package/dist/chrome/vendo-overlay.d.ts +63 -0
  152. package/dist/chrome/vendo-overlay.d.ts.map +1 -0
  153. package/dist/chrome/vendo-overlay.js +256 -0
  154. package/dist/chrome/vendo-overlay.js.map +1 -0
  155. package/dist/chrome/vendo-page.d.ts +3 -0
  156. package/dist/chrome/vendo-page.d.ts.map +1 -0
  157. package/dist/chrome/vendo-page.js +162 -0
  158. package/dist/chrome/vendo-page.js.map +1 -0
  159. package/dist/chrome/vendo-palette.d.ts +29 -0
  160. package/dist/chrome/vendo-palette.d.ts.map +1 -0
  161. package/dist/chrome/vendo-palette.js +95 -0
  162. package/dist/chrome/vendo-palette.js.map +1 -0
  163. package/dist/chrome/vendo-slot.d.ts +79 -0
  164. package/dist/chrome/vendo-slot.d.ts.map +1 -0
  165. package/dist/chrome/vendo-slot.js +153 -0
  166. package/dist/chrome/vendo-slot.js.map +1 -0
  167. package/dist/chrome/vendo-toasts.d.ts +40 -0
  168. package/dist/chrome/vendo-toasts.d.ts.map +1 -0
  169. package/dist/chrome/vendo-toasts.js +135 -0
  170. package/dist/chrome/vendo-toasts.js.map +1 -0
  171. package/dist/chrome/vendo-trigger.d.ts +24 -0
  172. package/dist/chrome/vendo-trigger.d.ts.map +1 -0
  173. package/dist/chrome/vendo-trigger.js +30 -0
  174. package/dist/chrome/vendo-trigger.js.map +1 -0
  175. package/dist/chrome/waiting-queue.d.ts +8 -0
  176. package/dist/chrome/waiting-queue.d.ts.map +1 -0
  177. package/dist/chrome/waiting-queue.js +21 -0
  178. package/dist/chrome/waiting-queue.js.map +1 -0
  179. package/dist/client-impl.d.ts +4 -0
  180. package/dist/client-impl.d.ts.map +1 -0
  181. package/dist/client-impl.js +160 -0
  182. package/dist/client-impl.js.map +1 -0
  183. package/dist/client.d.ts +136 -0
  184. package/dist/client.d.ts.map +1 -0
  185. package/dist/client.js +2 -0
  186. package/dist/client.js.map +1 -0
  187. package/dist/context.d.ts +97 -0
  188. package/dist/context.d.ts.map +1 -0
  189. package/dist/context.js +71 -0
  190. package/dist/context.js.map +1 -0
  191. package/dist/eject-templates/activities/index.tsx +113 -0
  192. package/dist/eject-templates/templates.json +29 -0
  193. package/dist/eject-templates/thread/attachments.tsx +69 -0
  194. package/dist/eject-templates/thread/composer.tsx +409 -0
  195. package/dist/eject-templates/thread/index.tsx +422 -0
  196. package/dist/eject-templates/thread/message-data.ts +151 -0
  197. package/dist/eject-templates/thread/message-list.tsx +123 -0
  198. package/dist/eject-templates/thread/message.tsx +149 -0
  199. package/dist/eject-templates/thread/parts.tsx +293 -0
  200. package/dist/eject-templates/thread/scrolling.ts +223 -0
  201. package/dist/embeds.d.ts +28 -0
  202. package/dist/embeds.d.ts.map +1 -0
  203. package/dist/embeds.js +2 -0
  204. package/dist/embeds.js.map +1 -0
  205. package/dist/hooks/index.d.ts +18 -0
  206. package/dist/hooks/index.d.ts.map +1 -0
  207. package/dist/hooks/index.js +19 -0
  208. package/dist/hooks/index.js.map +1 -0
  209. package/dist/hooks/scripted-transport.d.ts +44 -0
  210. package/dist/hooks/scripted-transport.d.ts.map +1 -0
  211. package/dist/hooks/scripted-transport.js +58 -0
  212. package/dist/hooks/scripted-transport.js.map +1 -0
  213. package/dist/hooks/use-activity.d.ts +17 -0
  214. package/dist/hooks/use-activity.d.ts.map +1 -0
  215. package/dist/hooks/use-activity.js +50 -0
  216. package/dist/hooks/use-activity.js.map +1 -0
  217. package/dist/hooks/use-app.d.ts +19 -0
  218. package/dist/hooks/use-app.d.ts.map +1 -0
  219. package/dist/hooks/use-app.js +66 -0
  220. package/dist/hooks/use-app.js.map +1 -0
  221. package/dist/hooks/use-approvals.d.ts +13 -0
  222. package/dist/hooks/use-approvals.d.ts.map +1 -0
  223. package/dist/hooks/use-approvals.js +14 -0
  224. package/dist/hooks/use-approvals.js.map +1 -0
  225. package/dist/hooks/use-apps.d.ts +17 -0
  226. package/dist/hooks/use-apps.d.ts.map +1 -0
  227. package/dist/hooks/use-apps.js +30 -0
  228. package/dist/hooks/use-apps.js.map +1 -0
  229. package/dist/hooks/use-automations.d.ts +25 -0
  230. package/dist/hooks/use-automations.d.ts.map +1 -0
  231. package/dist/hooks/use-automations.js +30 -0
  232. package/dist/hooks/use-automations.js.map +1 -0
  233. package/dist/hooks/use-connections.d.ts +12 -0
  234. package/dist/hooks/use-connections.d.ts.map +1 -0
  235. package/dist/hooks/use-connections.js +15 -0
  236. package/dist/hooks/use-connections.js.map +1 -0
  237. package/dist/hooks/use-connector-catalog.d.ts +8 -0
  238. package/dist/hooks/use-connector-catalog.d.ts.map +1 -0
  239. package/dist/hooks/use-connector-catalog.js +52 -0
  240. package/dist/hooks/use-connector-catalog.js.map +1 -0
  241. package/dist/hooks/use-grants.d.ts +13 -0
  242. package/dist/hooks/use-grants.d.ts.map +1 -0
  243. package/dist/hooks/use-grants.js +14 -0
  244. package/dist/hooks/use-grants.js.map +1 -0
  245. package/dist/hooks/use-mobile-takeover.d.ts +22 -0
  246. package/dist/hooks/use-mobile-takeover.d.ts.map +1 -0
  247. package/dist/hooks/use-mobile-takeover.js +66 -0
  248. package/dist/hooks/use-mobile-takeover.js.map +1 -0
  249. package/dist/hooks/use-resource.d.ts +21 -0
  250. package/dist/hooks/use-resource.d.ts.map +1 -0
  251. package/dist/hooks/use-resource.js +79 -0
  252. package/dist/hooks/use-resource.js.map +1 -0
  253. package/dist/hooks/use-slot-app.d.ts +19 -0
  254. package/dist/hooks/use-slot-app.d.ts.map +1 -0
  255. package/dist/hooks/use-slot-app.js +18 -0
  256. package/dist/hooks/use-slot-app.js.map +1 -0
  257. package/dist/hooks/use-threads.d.ts +16 -0
  258. package/dist/hooks/use-threads.d.ts.map +1 -0
  259. package/dist/hooks/use-threads.js +15 -0
  260. package/dist/hooks/use-threads.js.map +1 -0
  261. package/dist/hooks/use-vendo-overlay.d.ts +31 -0
  262. package/dist/hooks/use-vendo-overlay.d.ts.map +1 -0
  263. package/dist/hooks/use-vendo-overlay.js +23 -0
  264. package/dist/hooks/use-vendo-overlay.js.map +1 -0
  265. package/dist/hooks/use-vendo-status.d.ts +6 -0
  266. package/dist/hooks/use-vendo-status.d.ts.map +1 -0
  267. package/dist/hooks/use-vendo-status.js +28 -0
  268. package/dist/hooks/use-vendo-status.js.map +1 -0
  269. package/dist/hooks/use-vendo-thread.d.ts +39 -0
  270. package/dist/hooks/use-vendo-thread.d.ts.map +1 -0
  271. package/dist/hooks/use-vendo-thread.js +185 -0
  272. package/dist/hooks/use-vendo-thread.js.map +1 -0
  273. package/dist/index.d.ts +12 -0
  274. package/dist/index.d.ts.map +1 -0
  275. package/dist/index.js +12 -0
  276. package/dist/index.js.map +1 -0
  277. package/dist/kit/charts/bar.d.ts +16 -0
  278. package/dist/kit/charts/bar.d.ts.map +1 -0
  279. package/dist/kit/charts/bar.js +21 -0
  280. package/dist/kit/charts/bar.js.map +1 -0
  281. package/dist/kit/charts/donut.d.ts +16 -0
  282. package/dist/kit/charts/donut.d.ts.map +1 -0
  283. package/dist/kit/charts/donut.js +17 -0
  284. package/dist/kit/charts/donut.js.map +1 -0
  285. package/dist/kit/charts/line.d.ts +19 -0
  286. package/dist/kit/charts/line.d.ts.map +1 -0
  287. package/dist/kit/charts/line.js +21 -0
  288. package/dist/kit/charts/line.js.map +1 -0
  289. package/dist/kit/charts/progress.d.ts +12 -0
  290. package/dist/kit/charts/progress.d.ts.map +1 -0
  291. package/dist/kit/charts/progress.js +25 -0
  292. package/dist/kit/charts/progress.js.map +1 -0
  293. package/dist/kit/charts/sanitize.d.ts +24 -0
  294. package/dist/kit/charts/sanitize.d.ts.map +1 -0
  295. package/dist/kit/charts/sanitize.js +50 -0
  296. package/dist/kit/charts/sanitize.js.map +1 -0
  297. package/dist/kit/charts/sparkline.d.ts +11 -0
  298. package/dist/kit/charts/sparkline.d.ts.map +1 -0
  299. package/dist/kit/charts/sparkline.js +17 -0
  300. package/dist/kit/charts/sparkline.js.map +1 -0
  301. package/dist/kit/data/badge.d.ts +13 -0
  302. package/dist/kit/data/badge.d.ts.map +1 -0
  303. package/dist/kit/data/badge.js +12 -0
  304. package/dist/kit/data/badge.js.map +1 -0
  305. package/dist/kit/data/card-list.d.ts +23 -0
  306. package/dist/kit/data/card-list.d.ts.map +1 -0
  307. package/dist/kit/data/card-list.js +43 -0
  308. package/dist/kit/data/card-list.js.map +1 -0
  309. package/dist/kit/data/data-table.d.ts +32 -0
  310. package/dist/kit/data/data-table.d.ts.map +1 -0
  311. package/dist/kit/data/data-table.js +153 -0
  312. package/dist/kit/data/data-table.js.map +1 -0
  313. package/dist/kit/data/stat.d.ts +15 -0
  314. package/dist/kit/data/stat.d.ts.map +1 -0
  315. package/dist/kit/data/stat.js +28 -0
  316. package/dist/kit/data/stat.js.map +1 -0
  317. package/dist/kit/feedback/accordion.d.ts +15 -0
  318. package/dist/kit/feedback/accordion.d.ts.map +1 -0
  319. package/dist/kit/feedback/accordion.js +33 -0
  320. package/dist/kit/feedback/accordion.js.map +1 -0
  321. package/dist/kit/feedback/callout.d.ts +13 -0
  322. package/dist/kit/feedback/callout.d.ts.map +1 -0
  323. package/dist/kit/feedback/callout.js +24 -0
  324. package/dist/kit/feedback/callout.js.map +1 -0
  325. package/dist/kit/feedback/tabs.d.ts +14 -0
  326. package/dist/kit/feedback/tabs.d.ts.map +1 -0
  327. package/dist/kit/feedback/tabs.js +37 -0
  328. package/dist/kit/feedback/tabs.js.map +1 -0
  329. package/dist/kit/format.d.ts +60 -0
  330. package/dist/kit/format.d.ts.map +1 -0
  331. package/dist/kit/format.js +123 -0
  332. package/dist/kit/format.js.map +1 -0
  333. package/dist/kit/forms/button.d.ts +17 -0
  334. package/dist/kit/forms/button.d.ts.map +1 -0
  335. package/dist/kit/forms/button.js +33 -0
  336. package/dist/kit/forms/button.js.map +1 -0
  337. package/dist/kit/forms/checkbox.d.ts +9 -0
  338. package/dist/kit/forms/checkbox.d.ts.map +1 -0
  339. package/dist/kit/forms/checkbox.js +9 -0
  340. package/dist/kit/forms/checkbox.js.map +1 -0
  341. package/dist/kit/forms/date-picker.d.ts +13 -0
  342. package/dist/kit/forms/date-picker.d.ts.map +1 -0
  343. package/dist/kit/forms/date-picker.js +9 -0
  344. package/dist/kit/forms/date-picker.js.map +1 -0
  345. package/dist/kit/forms/disclaimer.d.ts +8 -0
  346. package/dist/kit/forms/disclaimer.d.ts.map +1 -0
  347. package/dist/kit/forms/disclaimer.js +20 -0
  348. package/dist/kit/forms/disclaimer.js.map +1 -0
  349. package/dist/kit/forms/field.d.ts +18 -0
  350. package/dist/kit/forms/field.d.ts.map +1 -0
  351. package/dist/kit/forms/field.js +19 -0
  352. package/dist/kit/forms/field.js.map +1 -0
  353. package/dist/kit/forms/form.d.ts +10 -0
  354. package/dist/kit/forms/form.d.ts.map +1 -0
  355. package/dist/kit/forms/form.js +9 -0
  356. package/dist/kit/forms/form.js.map +1 -0
  357. package/dist/kit/forms/input.d.ts +14 -0
  358. package/dist/kit/forms/input.d.ts.map +1 -0
  359. package/dist/kit/forms/input.js +9 -0
  360. package/dist/kit/forms/input.js.map +1 -0
  361. package/dist/kit/forms/select.d.ts +21 -0
  362. package/dist/kit/forms/select.d.ts.map +1 -0
  363. package/dist/kit/forms/select.js +35 -0
  364. package/dist/kit/forms/select.js.map +1 -0
  365. package/dist/kit/forms/textarea.d.ts +12 -0
  366. package/dist/kit/forms/textarea.d.ts.map +1 -0
  367. package/dist/kit/forms/textarea.js +9 -0
  368. package/dist/kit/forms/textarea.js.map +1 -0
  369. package/dist/kit/index.d.ts +42 -0
  370. package/dist/kit/index.d.ts.map +1 -0
  371. package/dist/kit/index.js +45 -0
  372. package/dist/kit/index.js.map +1 -0
  373. package/dist/kit/kit-prompt.d.ts +7 -0
  374. package/dist/kit/kit-prompt.d.ts.map +1 -0
  375. package/dist/kit/kit-prompt.js +7 -0
  376. package/dist/kit/kit-prompt.js.map +1 -0
  377. package/dist/kit/layout.d.ts +29 -0
  378. package/dist/kit/layout.d.ts.map +1 -0
  379. package/dist/kit/layout.js +64 -0
  380. package/dist/kit/layout.js.map +1 -0
  381. package/dist/kit/registry.d.ts +11 -0
  382. package/dist/kit/registry.d.ts.map +1 -0
  383. package/dist/kit/registry.js +34 -0
  384. package/dist/kit/registry.js.map +1 -0
  385. package/dist/kit/schema.d.ts +9 -0
  386. package/dist/kit/schema.d.ts.map +1 -0
  387. package/dist/kit/schema.js +9 -0
  388. package/dist/kit/schema.js.map +1 -0
  389. package/dist/kit/tokens.d.ts +33 -0
  390. package/dist/kit/tokens.d.ts.map +1 -0
  391. package/dist/kit/tokens.js +48 -0
  392. package/dist/kit/tokens.js.map +1 -0
  393. package/dist/kit/values.d.ts +55 -0
  394. package/dist/kit/values.d.ts.map +1 -0
  395. package/dist/kit/values.js +108 -0
  396. package/dist/kit/values.js.map +1 -0
  397. package/dist/theme.d.ts +25 -0
  398. package/dist/theme.d.ts.map +1 -0
  399. package/dist/theme.js +100 -0
  400. package/dist/theme.js.map +1 -0
  401. package/dist/tree/bindings.d.ts +4 -0
  402. package/dist/tree/bindings.d.ts.map +1 -0
  403. package/dist/tree/bindings.js +20 -0
  404. package/dist/tree/bindings.js.map +1 -0
  405. package/dist/tree/branded.d.ts +124 -0
  406. package/dist/tree/branded.d.ts.map +1 -0
  407. package/dist/tree/branded.js +319 -0
  408. package/dist/tree/branded.js.map +1 -0
  409. package/dist/tree/error-boundary.d.ts +22 -0
  410. package/dist/tree/error-boundary.d.ts.map +1 -0
  411. package/dist/tree/error-boundary.js +25 -0
  412. package/dist/tree/error-boundary.js.map +1 -0
  413. package/dist/tree/fluid-reveal.d.ts +22 -0
  414. package/dist/tree/fluid-reveal.d.ts.map +1 -0
  415. package/dist/tree/fluid-reveal.js +28 -0
  416. package/dist/tree/fluid-reveal.js.map +1 -0
  417. package/dist/tree/forming-skeleton.d.ts +14 -0
  418. package/dist/tree/forming-skeleton.d.ts.map +1 -0
  419. package/dist/tree/forming-skeleton.js +36 -0
  420. package/dist/tree/forming-skeleton.js.map +1 -0
  421. package/dist/tree/frames.d.ts +52 -0
  422. package/dist/tree/frames.d.ts.map +1 -0
  423. package/dist/tree/frames.js +143 -0
  424. package/dist/tree/frames.js.map +1 -0
  425. package/dist/tree/host-mount.d.ts +24 -0
  426. package/dist/tree/host-mount.d.ts.map +1 -0
  427. package/dist/tree/host-mount.js +0 -0
  428. package/dist/tree/host-mount.js.map +1 -0
  429. package/dist/tree/index.d.ts +9 -0
  430. package/dist/tree/index.d.ts.map +1 -0
  431. package/dist/tree/index.js +9 -0
  432. package/dist/tree/index.js.map +1 -0
  433. package/dist/tree/jail/JailedComponent.d.ts +41 -0
  434. package/dist/tree/jail/JailedComponent.d.ts.map +1 -0
  435. package/dist/tree/jail/JailedComponent.js +269 -0
  436. package/dist/tree/jail/JailedComponent.js.map +1 -0
  437. package/dist/tree/jail/runtime-bundle.gen.d.ts +3 -0
  438. package/dist/tree/jail/runtime-bundle.gen.d.ts.map +1 -0
  439. package/dist/tree/jail/runtime-bundle.gen.js +3 -0
  440. package/dist/tree/jail/runtime-bundle.gen.js.map +1 -0
  441. package/dist/tree/jail/runtime-entry.d.ts +18 -0
  442. package/dist/tree/jail/runtime-entry.d.ts.map +1 -0
  443. package/dist/tree/jail/runtime-entry.js +440 -0
  444. package/dist/tree/jail/runtime-entry.js.map +1 -0
  445. package/dist/tree/jail/viewport-css.d.ts +17 -0
  446. package/dist/tree/jail/viewport-css.d.ts.map +1 -0
  447. package/dist/tree/jail/viewport-css.js +32 -0
  448. package/dist/tree/jail/viewport-css.js.map +1 -0
  449. package/dist/tree/mcp-shim/entry.d.ts +2 -0
  450. package/dist/tree/mcp-shim/entry.d.ts.map +1 -0
  451. package/dist/tree/mcp-shim/entry.js +45 -0
  452. package/dist/tree/mcp-shim/entry.js.map +1 -0
  453. package/dist/tree/mcp-shim/http-open-card.d.ts +5 -0
  454. package/dist/tree/mcp-shim/http-open-card.d.ts.map +1 -0
  455. package/dist/tree/mcp-shim/http-open-card.js +61 -0
  456. package/dist/tree/mcp-shim/http-open-card.js.map +1 -0
  457. package/dist/tree/mcp-shim/shim-core.d.ts +58 -0
  458. package/dist/tree/mcp-shim/shim-core.d.ts.map +1 -0
  459. package/dist/tree/mcp-shim/shim-core.js +176 -0
  460. package/dist/tree/mcp-shim/shim-core.js.map +1 -0
  461. package/dist/tree/mcp-shim/theme.d.ts +8 -0
  462. package/dist/tree/mcp-shim/theme.d.ts.map +1 -0
  463. package/dist/tree/mcp-shim/theme.js +36 -0
  464. package/dist/tree/mcp-shim/theme.js.map +1 -0
  465. package/dist/tree/notice.d.ts +8 -0
  466. package/dist/tree/notice.d.ts.map +1 -0
  467. package/dist/tree/notice.js +30 -0
  468. package/dist/tree/notice.js.map +1 -0
  469. package/dist/tree/primitives.d.ts +30 -0
  470. package/dist/tree/primitives.d.ts.map +1 -0
  471. package/dist/tree/primitives.js +105 -0
  472. package/dist/tree/primitives.js.map +1 -0
  473. package/dist/tree/renderer-v2.d.ts +15 -0
  474. package/dist/tree/renderer-v2.d.ts.map +1 -0
  475. package/dist/tree/renderer-v2.js +71 -0
  476. package/dist/tree/renderer-v2.js.map +1 -0
  477. package/dist/tree/renderer.d.ts +77 -0
  478. package/dist/tree/renderer.d.ts.map +1 -0
  479. package/dist/tree/renderer.js +376 -0
  480. package/dist/tree/renderer.js.map +1 -0
  481. package/dist/voice/driver.d.ts +94 -0
  482. package/dist/voice/driver.d.ts.map +1 -0
  483. package/dist/voice/driver.js +2 -0
  484. package/dist/voice/driver.js.map +1 -0
  485. package/dist/voice/index.d.ts +7 -0
  486. package/dist/voice/index.d.ts.map +1 -0
  487. package/dist/voice/index.js +5 -0
  488. package/dist/voice/index.js.map +1 -0
  489. package/dist/voice/realtime-driver.d.ts +57 -0
  490. package/dist/voice/realtime-driver.d.ts.map +1 -0
  491. package/dist/voice/realtime-driver.js +592 -0
  492. package/dist/voice/realtime-driver.js.map +1 -0
  493. package/dist/voice/stage.d.ts +12 -0
  494. package/dist/voice/stage.d.ts.map +1 -0
  495. package/dist/voice/stage.js +259 -0
  496. package/dist/voice/stage.js.map +1 -0
  497. package/dist/voice/use-voice-approvals.d.ts +16 -0
  498. package/dist/voice/use-voice-approvals.d.ts.map +1 -0
  499. package/dist/voice/use-voice-approvals.js +77 -0
  500. package/dist/voice/use-voice-approvals.js.map +1 -0
  501. package/dist/voice/use-voice.d.ts +26 -0
  502. package/dist/voice/use-voice.d.ts.map +1 -0
  503. package/dist/voice/use-voice.js +201 -0
  504. package/dist/voice/use-voice.js.map +1 -0
  505. package/dist/voice/voice-act.d.ts +13 -0
  506. package/dist/voice/voice-act.d.ts.map +1 -0
  507. package/dist/voice/voice-act.js +301 -0
  508. package/dist/voice/voice-act.js.map +1 -0
  509. package/dist/voice/voice-blob.d.ts +17 -0
  510. package/dist/voice/voice-blob.d.ts.map +1 -0
  511. package/dist/voice/voice-blob.js +67 -0
  512. package/dist/voice/voice-blob.js.map +1 -0
  513. package/dist/voice/voice-consent.d.ts +17 -0
  514. package/dist/voice/voice-consent.d.ts.map +1 -0
  515. package/dist/voice/voice-consent.js +45 -0
  516. package/dist/voice/voice-consent.js.map +1 -0
  517. package/dist/voice/voice-drawer.d.ts +10 -0
  518. package/dist/voice/voice-drawer.d.ts.map +1 -0
  519. package/dist/voice/voice-drawer.js +22 -0
  520. package/dist/voice/voice-drawer.js.map +1 -0
  521. package/dist/wire-types.d.ts +238 -0
  522. package/dist/wire-types.d.ts.map +1 -0
  523. package/dist/wire-types.js +2 -0
  524. package/dist/wire-types.js.map +1 -0
  525. package/package.json +106 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.js","sourceRoot":"","sources":["../../../src/chrome/thread/message.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAkB,MAAM,IAAI,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACj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IAC3H,kBAEC,CACV,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACA,CACX,IACQ,CACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,53 @@
1
+ import type { ApprovalRequest, RiskLabel } from "@vendoai/core";
2
+ import { type UIMessage } from "ai";
3
+ import type { MorphToastProps } from "../morph-toast.js";
4
+ /** One stream part in a turn: text (user verbatim / assistant markdown with the
5
+ ENG-217 caret choreography), assistant files, tool build beats, and the
6
+ jailed generated-view app card (06-apps §§8–9). */
7
+ export declare function ThreadPart({ part, partKey, role, restored, count, risks }: {
8
+ part: UIMessage["parts"][number];
9
+ partKey: string;
10
+ role: UIMessage["role"];
11
+ restored: boolean;
12
+ count?: number;
13
+ risks: Map<string, RiskLabel>;
14
+ }): import("react").JSX.Element | null;
15
+ type ToolPart = Extract<UIMessage["parts"][number], {
16
+ toolCallId: string;
17
+ }>;
18
+ /** The parked in-thread approval cards: each synthesizes an ApprovalRequest
19
+ from the wire parts (ENG-216), morphs into the top-right toast on approve
20
+ (ENG-205), and decides the guard's record over the wire before resuming
21
+ the model loop (05 §1). */
22
+ export declare function ThreadApprovals({ approvals, risks, guardApprovals, cardRefs, respond, onMorph }: {
23
+ approvals: (ToolPart & {
24
+ state: "approval-requested";
25
+ approval: {
26
+ id: string;
27
+ };
28
+ })[];
29
+ risks: Map<string, RiskLabel>;
30
+ guardApprovals: Map<string, {
31
+ approvalId?: string;
32
+ invalidatedGrant?: ApprovalRequest["invalidatedGrant"];
33
+ }>;
34
+ cardRefs: React.MutableRefObject<Map<string, HTMLDivElement | null>>;
35
+ respond: (response: {
36
+ id: string;
37
+ approved: boolean;
38
+ }) => void;
39
+ onMorph: (morph: Omit<MorphToastProps, "onDone">) => void;
40
+ }): import("react").JSX.Element;
41
+ /** 04-actions §3 — connector calls that ended `connect-required`, from the
42
+ LAST assistant message only: a stale turn must not re-offer a connect
43
+ (the persistent panel covers standing management). The typed outcome on
44
+ the native tool part is the source of truth; the data-vendo-connect part
45
+ mirrors it for streaming consumers, matching the approvals pattern. */
46
+ export declare function ThreadConnectRequests({ messages, sendMessage }: {
47
+ messages: UIMessage[];
48
+ sendMessage: (message: {
49
+ text: string;
50
+ }) => unknown;
51
+ }): import("react").JSX.Element;
52
+ export {};
53
+ //# sourceMappingURL=parts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../../src/chrome/thread/parts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAQ,SAAS,EAAiB,MAAM,eAAe,CAAC;AACrF,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,IAAI,CAAC;AAWlD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAmCzD;;sDAEsD;AACtD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAS,EAAE,KAAK,EAAE,EAAE;IAC9E,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CAC/B,sCAyFA;AAED,KAAK,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE5E;;;8BAG8B;AAC9B,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;IAChG,SAAS,EAAE,CAAC,QAAQ,GAAG;QAAE,KAAK,EAAE,oBAAoB,CAAC;QAAC,QAAQ,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC,EAAE,CAAC;IACpF,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC9B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAA;KAAE,CAAC,CAAC;IAC7G,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC,CAAC,CAAC;IACrE,OAAO,EAAE,CAAC,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;CAC3D,+BA+EA;AAED;;;;0EAI0E;AAC1E,wBAAgB,qBAAqB,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE;IAC/D,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,WAAW,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;CACrD,+BAqCA"}
@@ -0,0 +1,184 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { isToolUIPart } from "ai";
3
+ import { useState } from "react";
4
+ import { useVendoContext } from "../../context.js";
5
+ import { useMobileTakeover } from "../../hooks/use-mobile-takeover.js";
6
+ import { PayloadView } from "../../tree/renderer.js";
7
+ import { ApprovalCard } from "../approval-card.js";
8
+ import { ApprovalSheet } from "../approval-sheet.js";
9
+ import { BuildBeat, toolPresentation } from "../build-beat.js";
10
+ import { ConnectCard } from "../connect-card.js";
11
+ import { toolTitle } from "../humanize.js";
12
+ import { Markdown } from "../markdown.js";
13
+ import { LONG_TEXT_CAP, truncateHead } from "../truncate.js";
14
+ import { SentAttachment } from "./attachments.js";
15
+ import { appTitle, partData, preview, SYNTHESIZED_CREATED_AT, toolName, } from "./message-data.js";
16
+ /** ENG-218 — a plain user turn (rendered verbatim, not markdown) collapses when
17
+ huge so a pasted log doesn't flood the thread with DOM. Assistant turns get
18
+ the same treatment inside <Markdown>. */
19
+ function UserText({ text, restored }) {
20
+ const [expanded, setExpanded] = useState(false);
21
+ const collapsible = restored === true && text.length > LONG_TEXT_CAP;
22
+ const shown = collapsible && !expanded ? truncateHead(text) : text;
23
+ if (!collapsible)
24
+ return _jsx("div", { className: "fl-usertext", children: text });
25
+ // Lane pick 3D — the collapsed head sits under a gradient fade with a
26
+ // centered pill (GitHub-fold style) instead of a hard cut + inline link:
27
+ // the fade shows the content continues, and the control sits where the
28
+ // eye stops. Expanded keeps the pill below for symmetry.
29
+ return (_jsxs("div", { className: `fl-fold${expanded ? " fl-fold--open" : ""}`, children: [_jsx("div", { className: "fl-usertext", children: shown }), _jsx("div", { className: "fl-fold-veil", children: _jsx("button", { type: "button", className: "fl-more fl-fold-pill", "aria-expanded": expanded, onClick: () => setExpanded(value => !value), children: expanded ? "Show less" : `Show full message (${(text.length / 1000).toFixed(0)}k chars)` }) })] }));
30
+ }
31
+ /** One stream part in a turn: text (user verbatim / assistant markdown with the
32
+ ENG-217 caret choreography), assistant files, tool build beats, and the
33
+ jailed generated-view app card (06-apps §§8–9). */
34
+ export function ThreadPart({ part, partKey, role, restored, count = 1, risks }) {
35
+ const { client, components, onPin } = useVendoContext();
36
+ if (part.type === "text") {
37
+ if (role === "user")
38
+ return _jsx(UserText, { text: part.text, restored: restored });
39
+ // ENG-217 — lone caret while the streamed turn is still empty (stable
40
+ // line box); once text flows, Markdown's .fl-md--streaming trailing
41
+ // caret takes over.
42
+ if (part.state === "streaming" && part.text.trim().length === 0) {
43
+ return _jsx("span", { className: "fl-caret", "aria-hidden": "true" });
44
+ }
45
+ return _jsx(Markdown, { text: part.text, streaming: part.state === "streaming", restored: restored });
46
+ }
47
+ if (part.type === "file") {
48
+ // ENG-225 — user attachments render beside the bubble (see the message
49
+ // map); an assistant-authored file lands inline in the turn.
50
+ if (role === "user")
51
+ return null;
52
+ return _jsx(SentAttachment, { part: part });
53
+ }
54
+ if (isToolUIPart(part)) {
55
+ // Lane pick C1 — live progress moved to the StatusRibbon above the
56
+ // composer, so working/done calls leave NO transcript line (the
57
+ // mechanical record stays in the Activity panel). A FAILED call is
58
+ // content, not progress: it keeps the error beat so the failure stays
59
+ // readable after the turn settles.
60
+ if (part.state !== "output-error")
61
+ return null;
62
+ const risk = risks.get(part.toolCallId) ?? "read";
63
+ return _jsx(BuildBeat, { part: part, risk: risk, count: count });
64
+ }
65
+ if (part.type === "data-vendo-view") {
66
+ const data = partData(part);
67
+ if (typeof data.appId !== "string" || !data.payload)
68
+ return null;
69
+ // 06-apps §§8–9 — in-thread surfaces are conversational previews, never
70
+ // the approved in-client venue and never a drift report: both fields are
71
+ // server-authoritative, so whatever the stream carried, render jailed
72
+ // and notice-free.
73
+ const { inClient: _neverInThread, pinDrift: _serverOnly, ...payload } = data.payload;
74
+ const streaming = payload.streaming === true;
75
+ const appId = data.appId;
76
+ return (
77
+ // The generated view lives inside a clear app boundary — a titled
78
+ // frame — so it reads as a distinct piece of software, not loose
79
+ // content bleeding into the surrounding chat text.
80
+ _jsxs("div", { className: "fl-uihost fl-appcard", children: [_jsxs("div", { className: "fl-appcard-bar", "data-state": streaming ? "building" : "ready", children: [_jsx("span", { className: "fl-appcard-dot", "aria-hidden": "true" }), _jsxs("span", { className: "fl-boot-labels fl-appcard-name", children: [_jsx("span", { className: "fl-boot-building", "aria-hidden": !streaming, children: "Building your view\u2026" }), _jsx("span", { className: "fl-boot-ready", "aria-hidden": streaming, children: appTitle(payload) ?? "Your app" })] }), !streaming && onPin ? (_jsxs("button", { type: "button", className: "fl-barpin", onClick: () => onPin({ appId, payload }), children: [_jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: _jsx("path", { d: "M12 17v5M9 3h6l-1 7 3 3H7l3-3-1-7Z" }) }), "Pin to dashboard"] })) : null, _jsx("span", { className: "fl-boot-hairline", "aria-hidden": "true" })] }), _jsx("div", { className: "fl-appcard-body", children: _jsx(PayloadView, { payload: payload, components: components, onAction: ({ action, payload: actionPayload }) => client.apps.call(appId, action, actionPayload ?? {}) }) })] }, `${partKey}-${appId}`));
81
+ }
82
+ return null;
83
+ }
84
+ /** The parked in-thread approval cards: each synthesizes an ApprovalRequest
85
+ from the wire parts (ENG-216), morphs into the top-right toast on approve
86
+ (ENG-205), and decides the guard's record over the wire before resuming
87
+ the model loop (05 §1). */
88
+ export function ThreadApprovals({ approvals, risks, guardApprovals, cardRefs, respond, onMorph }) {
89
+ const { client, theme, tools } = useVendoContext();
90
+ // Lane pick 1-H — below the mobile breakpoint the NEWEST parked approval
91
+ // presents as a bottom sheet (thumb-zone consent); older parked ones stay
92
+ // in-list behind it so the thread record is complete when the sheet closes.
93
+ const mobile = useMobileTakeover().active;
94
+ return (_jsx(_Fragment, { children: approvals.map((part, index) => {
95
+ const risk = risks.get(part.toolCallId) ?? "read";
96
+ const input = "input" in part ? part.input : undefined;
97
+ const guardApproval = guardApprovals.get(part.toolCallId);
98
+ const name = toolName(part);
99
+ const approval = {
100
+ id: part.approval.id,
101
+ call: { id: part.toolCallId, tool: name, args: input },
102
+ // The wire approval part carries no descriptor (01-core), so the
103
+ // name is the raw tool id (ApprovalCard humanizes it) and the
104
+ // description is left to host metadata — never a fabricated
105
+ // "Approve <tool>" sentence.
106
+ descriptor: { name, description: tools[name]?.description ?? "", inputSchema: {}, risk },
107
+ inputPreview: preview(input),
108
+ ...(guardApproval?.invalidatedGrant === undefined
109
+ ? {}
110
+ : { invalidatedGrant: guardApproval.invalidatedGrant }),
111
+ // ENG-216 — the in-thread card renders inside the live conversation,
112
+ // which IS its context, and the wire carries no ctx: rather than
113
+ // invent a principal/venue/presence and stamp a per-render `new
114
+ // Date()`, we hide the context byline in-thread (showContext=false)
115
+ // and only structurally-true, stable values ride here (never shown).
116
+ ctx: { principal: { kind: "user", subject: "" }, venue: "chat", presence: "present" },
117
+ createdAt: SYNTHESIZED_CREATED_AT,
118
+ };
119
+ const guardApprovalId = guardApproval?.approvalId;
120
+ const asSheet = mobile && index === approvals.length - 1;
121
+ const card = (_jsx("div", { ref: element => { cardRefs.current.set(part.approval.id, element); }, children: _jsx(ApprovalCard, { approval: approval, showContext: false, allowRemember: guardApprovalId !== undefined, onDecide: async (decision) => {
122
+ // The approved card lifts into the top-right notification
123
+ // (ENG-205 morph) as the run resumes underneath it.
124
+ if (decision.approve) {
125
+ const card = cardRefs.current.get(part.approval.id)?.querySelector(".fl-approval");
126
+ if (card) {
127
+ const presentation = toolPresentation(name, input, tools[name]);
128
+ const rect = card.getBoundingClientRect();
129
+ card.style.transition = "opacity .22s ease";
130
+ card.style.opacity = "0";
131
+ onMorph({
132
+ startRect: { top: rect.top, left: rect.left, width: rect.width, height: rect.height },
133
+ title: `${presentation.title} — approved`,
134
+ sub: presentation.sub ?? "Runs as you · recorded in Activity",
135
+ logoUrl: presentation.logoUrl,
136
+ theme,
137
+ });
138
+ }
139
+ }
140
+ // Decide the guard's approval record over the wire FIRST so the
141
+ // resumed execution replays as approved (05 §1) — the native
142
+ // response alone only tells the model loop to continue.
143
+ if (guardApprovalId !== undefined) {
144
+ await client.approvals.decide([guardApprovalId], decision);
145
+ }
146
+ respond({ id: part.approval.id, approved: decision.approve });
147
+ } }) }, part.approval.id));
148
+ return asSheet ? (_jsx(ApprovalSheet, { label: `Approval for ${toolTitle(name, tools[name])}`, children: card }, part.approval.id)) : card;
149
+ }) }));
150
+ }
151
+ /** 04-actions §3 — connector calls that ended `connect-required`, from the
152
+ LAST assistant message only: a stale turn must not re-offer a connect
153
+ (the persistent panel covers standing management). The typed outcome on
154
+ the native tool part is the source of truth; the data-vendo-connect part
155
+ mirrors it for streaming consumers, matching the approvals pattern. */
156
+ export function ThreadConnectRequests({ messages, sendMessage }) {
157
+ const lastMessage = messages.at(-1);
158
+ const connectRequests = (lastMessage?.role === "assistant" ? lastMessage.parts : [])
159
+ .filter(isToolUIPart)
160
+ .flatMap(part => {
161
+ if (part.state !== "output-available")
162
+ return [];
163
+ const output = part.output;
164
+ const connect = output?.status === "connect-required"
165
+ ? output.connect
166
+ : undefined;
167
+ if (typeof connect?.connector !== "string" || typeof connect.toolkit !== "string")
168
+ return [];
169
+ return [{
170
+ part,
171
+ connector: connect.connector,
172
+ toolkit: connect.toolkit,
173
+ message: typeof connect.message === "string" ? connect.message : `Connect ${connect.toolkit} to continue.`,
174
+ }];
175
+ });
176
+ return (_jsx(_Fragment, { children: connectRequests.map(({ part, connector, toolkit, message }) => (_jsx(ConnectCard, { connector: connector, toolkit: toolkit, message: message, onConnected: () => {
177
+ // The retry: the account is live, so continue the turn — the
178
+ // model re-issues the call, which now executes.
179
+ void sendMessage({
180
+ text: `I connected my ${toolkit} account — retry ${toolName(part)}.`,
181
+ });
182
+ } }, `connect-${part.toolCallId}`))) }));
183
+ }
184
+ //# sourceMappingURL=parts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts.js","sourceRoot":"","sources":["../../../src/chrome/thread/parts.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAkB,MAAM,IAAI,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,E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@ -0,0 +1,26 @@
1
+ import type { UIMessage } from "ai";
2
+ export declare function useMessageWindow(messages: UIMessage[], listRef: React.RefObject<HTMLDivElement | null>, threadKey?: string): {
3
+ windowed: UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>[];
4
+ hasOlder: boolean;
5
+ olderCount: number;
6
+ loadOlder: () => void;
7
+ onNearTop: () => void;
8
+ };
9
+ /** ENG-213 — scroll management for the message list.
10
+
11
+ Stick-to-bottom: while the reader is at the end, every content change
12
+ (history load, streamed deltas, tool chips, approvals) keeps the latest
13
+ content in view. The moment the reader scrolls up, the stick releases —
14
+ streaming must never yank them — and it re-arms when they return to the
15
+ bottom on their own. Jump-to-latest: when new content lands while the
16
+ reader is scrolled up, the stylesheet's .fl-jump affordance appears;
17
+ activating it scrolls to the latest turn and re-sticks. */
18
+ export declare function useStickToBottom(messages: UIMessage[], threadKey?: string, contentRevision?: unknown): {
19
+ listRef: import("react").RefObject<HTMLDivElement | null>;
20
+ onScroll: () => void;
21
+ jumpToLatest: () => void;
22
+ showJump: boolean;
23
+ unseenCount: number;
24
+ snippet: string;
25
+ };
26
+ //# sourceMappingURL=scrolling.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scrolling.d.ts","sourceRoot":"","sources":["../../../src/chrome/thread/scrolling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAgBpC,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;EAkC1H;AAOD;;;;;;;;8DAQ8D;AAC9D,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO;;;;;;;EAuJpG"}
@@ -0,0 +1,214 @@
1
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
2
+ /** ENG-218 — windowing for long threads. Rendering a reopened 200-turn thread
3
+ mounts every turn's DOM (and runs every entrance animation) at once. Instead
4
+ we render only a trailing window of the most recent messages and reveal older
5
+ ones in chunks when the reader scrolls to the top — the DOM stays bounded, so
6
+ scroll and paint stay smooth no matter how long the transcript is.
7
+
8
+ The trailing window is what stick-to-bottom and jump-to-latest already care
9
+ about (both operate at the end), so those behaviors are untouched. Only the
10
+ unseen head of a genuinely long thread is deferred. */
11
+ const WINDOW_INITIAL = 60;
12
+ const WINDOW_STEP = 40;
13
+ const NEAR_TOP_PX = 200;
14
+ export function useMessageWindow(messages, listRef, threadKey) {
15
+ // How many trailing messages to render. Grows (never shrinks the head back
16
+ // out from under the reader) as they scroll up; resets when the thread swaps.
17
+ const [count, setCount] = useState(WINDOW_INITIAL);
18
+ useEffect(() => { setCount(WINDOW_INITIAL); }, [threadKey]);
19
+ const start = Math.max(0, messages.length - count);
20
+ const windowed = start === 0 ? messages : messages.slice(start);
21
+ const hasOlder = start > 0;
22
+ // Anchor the viewport across a window growth: prepending older turns balloons
23
+ // scrollHeight, which would otherwise yank the reader. Capture distance-from-
24
+ // bottom at expand time and restore it after the new nodes lay out.
25
+ const anchorRef = useRef(null);
26
+ const loadOlder = () => {
27
+ if (start === 0)
28
+ return;
29
+ const node = listRef.current;
30
+ anchorRef.current = node ? node.scrollHeight - node.scrollTop : null;
31
+ setCount(current => current + WINDOW_STEP);
32
+ };
33
+ useLayoutEffect(() => {
34
+ const node = listRef.current;
35
+ if (anchorRef.current === null || !node)
36
+ return;
37
+ node.scrollTop = node.scrollHeight - anchorRef.current;
38
+ anchorRef.current = null;
39
+ });
40
+ // Reveal more when the reader reaches the top of the rendered window.
41
+ const onNearTop = () => {
42
+ const node = listRef.current;
43
+ if (node && node.scrollTop <= NEAR_TOP_PX)
44
+ loadOlder();
45
+ };
46
+ return { windowed, hasOlder, olderCount: start, loadOlder, onNearTop };
47
+ }
48
+ /** Within this many pixels of the end the reader counts as "at the bottom" —
49
+ a paragraph of slack so sub-line wobble (fractional scroll positions,
50
+ entrance easing) never breaks the stick. */
51
+ const BOTTOM_SLACK_PX = 32;
52
+ /** ENG-213 — scroll management for the message list.
53
+
54
+ Stick-to-bottom: while the reader is at the end, every content change
55
+ (history load, streamed deltas, tool chips, approvals) keeps the latest
56
+ content in view. The moment the reader scrolls up, the stick releases —
57
+ streaming must never yank them — and it re-arms when they return to the
58
+ bottom on their own. Jump-to-latest: when new content lands while the
59
+ reader is scrolled up, the stylesheet's .fl-jump affordance appears;
60
+ activating it scrolls to the latest turn and re-sticks. */
61
+ export function useStickToBottom(messages, threadKey, contentRevision) {
62
+ const listRef = useRef(null);
63
+ // The stick is a ref, not state: it flips inside scroll/effect timing and
64
+ // must be readable synchronously without re-render races.
65
+ const stuckRef = useRef(true);
66
+ const lastScrollHeightRef = useRef(0);
67
+ const [unseen, setUnseen] = useState(false);
68
+ // Lane pick 3A — the jump affordance grew into a bar with a COUNT of turns
69
+ // that landed while scrolled away and a snippet of the newest text. Count =
70
+ // messages appended since the stick released; snippet = the latest turn's
71
+ // trailing text (best-effort, purely presentational).
72
+ const [unseenCount, setUnseenCount] = useState(0);
73
+ const seenLengthRef = useRef(messages.length);
74
+ // A different conversation is a different reader position: when the caller
75
+ // switches the hook to another thread, re-arm the stick and forget the
76
+ // previous thread's growth baseline — otherwise a scroll-up in the old
77
+ // thread would keep the new one from opening at its latest turn.
78
+ const previousThreadKeyRef = useRef(threadKey);
79
+ useEffect(() => {
80
+ const previousKey = previousThreadKeyRef.current;
81
+ previousThreadKeyRef.current = threadKey;
82
+ // ENG-222 id mint is NOT a thread switch: a conversation started without
83
+ // an id gets its server-minted thr_ fed back mid-first-stream (VendoPage's
84
+ // onThreadId loop), flipping this key while the reader is mid-read. The
85
+ // messages are the same conversation — KEEP the growth baseline: zeroing
86
+ // it makes previousHeight === 0 read as "at bottom by definition", so the
87
+ // next streamed chunk yanks a reader who had scrolled up (deterministic on
88
+ // slow runners — the "streaming must never yank" conformance failure).
89
+ // Re-arm the stick and clear the bar though: with the real baseline
90
+ // intact, the next mutation's previous-height guard releases a genuinely
91
+ // scrolled-up reader, while a bottom reader stays pinned instead of
92
+ // leaking a transient new-replies bar.
93
+ if (previousKey === undefined && threadKey !== undefined && messages.length > 0) {
94
+ stuckRef.current = true;
95
+ setUnseen(false);
96
+ setUnseenCount(0);
97
+ return;
98
+ }
99
+ stuckRef.current = true;
100
+ lastScrollHeightRef.current = 0;
101
+ setUnseen(false);
102
+ setUnseenCount(0);
103
+ // messages.length is deliberately unlisted: this effect keys on identity
104
+ // changes only, and the mint guard needs the length at flip time.
105
+ // eslint-disable-next-line react-hooks/exhaustive-deps
106
+ }, [threadKey]);
107
+ const atBottom = (node) => node.scrollHeight - node.scrollTop - node.clientHeight <= BOTTOM_SLACK_PX;
108
+ const onScroll = () => {
109
+ const node = listRef.current;
110
+ if (!node)
111
+ return;
112
+ // Both user scrolls and our own programmatic sticks land here; either way
113
+ // the reader's actual position is the single source of truth.
114
+ stuckRef.current = atBottom(node);
115
+ if (stuckRef.current) {
116
+ setUnseen(false);
117
+ setUnseenCount(0);
118
+ seenLengthRef.current = messages.length;
119
+ }
120
+ };
121
+ const jumpToLatest = () => {
122
+ const node = listRef.current;
123
+ if (!node)
124
+ return;
125
+ stuckRef.current = true;
126
+ setUnseen(false);
127
+ setUnseenCount(0);
128
+ seenLengthRef.current = messages.length;
129
+ node.scrollTop = node.scrollHeight;
130
+ };
131
+ // After every content change: stick if the reader is at the bottom, or flag
132
+ // the new content if they've scrolled away. Layout effects would run before
133
+ // paint, but streamed markdown re-renders arrive in bursts — post-paint is
134
+ // indistinguishable here and cheaper.
135
+ useEffect(() => {
136
+ const node = listRef.current;
137
+ if (!node)
138
+ return;
139
+ const previousHeight = lastScrollHeightRef.current;
140
+ const grew = node.scrollHeight > previousHeight;
141
+ lastScrollHeightRef.current = node.scrollHeight;
142
+ // The scroll event that releases the stick is ASYNC: a reader who just
143
+ // scrolled up can have content land before onScroll flips stuckRef, and
144
+ // trusting the stale ref would yank them back down ("streaming must never
145
+ // yank"). Their position against the PREVIOUS content height is ground
146
+ // truth: stuck growth leaves scrollTop at the old bottom; a scroll-up
147
+ // puts it well above. Release the stick here instead of yanking.
148
+ const atPreviousBottom = previousHeight === 0
149
+ || previousHeight - node.scrollTop - node.clientHeight <= BOTTOM_SLACK_PX;
150
+ // …unless they are at the CURRENT bottom: when content SHRINKS (a connect
151
+ // card or generated view swaps out), scrollTop can no longer equal the old
152
+ // taller bottom, and the previous-height test alone misreads the reader as
153
+ // scrolled-up — releasing the stick and leaking a new-replies bar on the
154
+ // next turn even though they never moved. At-current-bottom is at bottom.
155
+ if (stuckRef.current && !atPreviousBottom && !atBottom(node))
156
+ stuckRef.current = false;
157
+ if (stuckRef.current) {
158
+ node.scrollTop = node.scrollHeight;
159
+ seenLengthRef.current = messages.length;
160
+ }
161
+ else if (grew) {
162
+ setUnseen(true);
163
+ setUnseenCount(Math.max(1, messages.length - seenLengthRef.current));
164
+ }
165
+ // contentRevision — ENG-215: turn-actions (Edit/Regenerate) mount below the
166
+ // last turn the instant a stream settles (busy→false), adding height AFTER
167
+ // the message-driven stick already ran. Re-run so the reader stays pinned.
168
+ }, [messages, contentRevision]);
169
+ // A generated view mounts and grows AFTER the messages effect runs (the jail
170
+ // renders async; logos/images load late). Without watching actual size, the
171
+ // stick fires before the growth and the newest content — the approval card,
172
+ // the closing line — lands below the fold. Observe the content box and
173
+ // re-stick whenever it grows while the reader is at the bottom.
174
+ useEffect(() => {
175
+ const node = listRef.current;
176
+ if (!node || typeof ResizeObserver === "undefined")
177
+ return;
178
+ const observer = new ResizeObserver(() => {
179
+ // Same async-scroll-event guard as the messages effect: only re-stick a
180
+ // reader who was actually at the bottom of the previous content.
181
+ const previousHeight = lastScrollHeightRef.current;
182
+ const atPreviousBottom = previousHeight === 0
183
+ || previousHeight - node.scrollTop - node.clientHeight <= BOTTOM_SLACK_PX;
184
+ lastScrollHeightRef.current = node.scrollHeight;
185
+ if (stuckRef.current && !atPreviousBottom && !atBottom(node))
186
+ stuckRef.current = false;
187
+ if (stuckRef.current)
188
+ node.scrollTop = node.scrollHeight;
189
+ });
190
+ for (const child of Array.from(node.children))
191
+ observer.observe(child);
192
+ const mutation = new MutationObserver(() => {
193
+ for (const child of Array.from(node.children))
194
+ observer.observe(child);
195
+ });
196
+ mutation.observe(node, { childList: true, subtree: true });
197
+ return () => {
198
+ observer.disconnect();
199
+ mutation.disconnect();
200
+ };
201
+ }, []);
202
+ // 3A snippet: trailing text of the newest message (bounded; presentational).
203
+ const lastMessage = messages.at(-1);
204
+ const snippet = unseen && lastMessage
205
+ ? lastMessage.parts
206
+ .filter((part) => part.type === "text")
207
+ .map(part => part.text)
208
+ .join(" ")
209
+ .trim()
210
+ .slice(0, 120)
211
+ : "";
212
+ return { listRef, onScroll, jumpToLatest, showJump: unseen, unseenCount, snippet };
213
+ }
214
+ //# sourceMappingURL=scrolling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scrolling.js","sourceRoot":"","sources":["../../../src/chrome/thread/scrolling.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAErE;;;;;;;;0DAQ0D;AAC1D,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,MAAM,UAAU,gBAAgB,CAAC,QAAqB,EAAE,OAA+C,EAAE,SAAkB;IACzH,2EAA2E;IAC3E,8EAA8E;IAC9E,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IACnD,SAAS,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5D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AAO,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,UAAU,EAAE,CAAC;YACtB,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,6EAA6E;IAC7E,MAAM,WAAW,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,MAAM,IAAI,WAAW;QACnC,CAAC,CAAC,WAAW,CAAC,KAAK;aACd,MAAM,CAAC,CAAC,IAAI,EAAkD,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;aACtF,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;aACtB,IAAI,CAAC,GAAG,CAAC;aACT,IAAI,EAAE;aACN,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;QAClB,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AACrF,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** ENG-218 — extreme-content solidity. Shared bound for how much of a single
2
+ message body is rendered before it collapses behind an expand affordance.
3
+ Huge pasted logs / model dumps otherwise (a) force react-markdown to parse a
4
+ six-figure string on every keystroke-sized re-render and (b) blow the DOM up
5
+ with thousands of nodes. Chat prose sits far below this; only outliers clip. */
6
+ export declare const LONG_TEXT_CAP = 6000;
7
+ /** Cut `text` to at most `cap` characters, preferring the last line break within
8
+ the final 20% of the budget so a collapsed markdown block breaks on a
9
+ paragraph rather than mid-token. Returns the head only — callers add the
10
+ expand control. */
11
+ export declare function truncateHead(text: string, cap?: number): string;
12
+ //# sourceMappingURL=truncate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../src/chrome/truncate.ts"],"names":[],"mappings":"AAAA;;;;mFAImF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC;;;sBAGsB;AACtB,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,MAAsB,GAAG,MAAM,CAK9E"}
@@ -0,0 +1,18 @@
1
+ /** ENG-218 — extreme-content solidity. Shared bound for how much of a single
2
+ message body is rendered before it collapses behind an expand affordance.
3
+ Huge pasted logs / model dumps otherwise (a) force react-markdown to parse a
4
+ six-figure string on every keystroke-sized re-render and (b) blow the DOM up
5
+ with thousands of nodes. Chat prose sits far below this; only outliers clip. */
6
+ export const LONG_TEXT_CAP = 6000;
7
+ /** Cut `text` to at most `cap` characters, preferring the last line break within
8
+ the final 20% of the budget so a collapsed markdown block breaks on a
9
+ paragraph rather than mid-token. Returns the head only — callers add the
10
+ expand control. */
11
+ export function truncateHead(text, cap = LONG_TEXT_CAP) {
12
+ if (text.length <= cap)
13
+ return text;
14
+ const hard = text.slice(0, cap);
15
+ const lastBreak = hard.lastIndexOf("\n", cap);
16
+ return lastBreak > cap * 0.8 ? hard.slice(0, lastBreak) : hard;
17
+ }
18
+ //# sourceMappingURL=truncate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"truncate.js","sourceRoot":"","sources":["../../src/chrome/truncate.ts"],"names":[],"mappings":"AAAA;;;;mFAImF;AACnF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAElC;;;sBAGsB;AACtB,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,MAAc,aAAa;IACpE,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC9C,OAAO,SAAS,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC"}
@@ -0,0 +1,24 @@
1
+ export interface VendoActivitiesProps {
2
+ /**
3
+ * Poll interval (ms) shared by the approvals queue and the activity feed, so
4
+ * an approval raised elsewhere (a thread turn, the MCP door, an automation)
5
+ * appears here on its own — no page remount. Default 5000; `0` disables
6
+ * polling (initial fetch only).
7
+ */
8
+ pollMs?: number;
9
+ /** Cap on recent-activity rows shown (this piece is a feed, not the full
10
+ * paginated audit — that stays `ActivityPanel`). Default 8. */
11
+ maxItems?: number;
12
+ }
13
+ /**
14
+ * The shelf's drop-in feed of what the agent did + what it is waiting on
15
+ * (ui-usage-dx §2) — placeable in any host page. Pending approvals render as
16
+ * ONE card with a "1 of N" pager (ui-lane-panels pick B): deciding slides the
17
+ * next approval into place instead of stacking a wall of cards. Recent
18
+ * activity renders as the shared icon ledger below. When nothing has happened
19
+ * yet it shows a quiet one-line empty state rather than rendering nothing —
20
+ * hosts place this in their own pages, and an invisible component would read
21
+ * as broken.
22
+ */
23
+ export declare function VendoActivities({ pollMs, maxItems }?: VendoActivitiesProps): import("react").JSX.Element;
24
+ //# sourceMappingURL=vendo-activities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendo-activities.d.ts","sourceRoot":"","sources":["../../src/chrome/vendo-activities.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;oEACgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,MAAa,EAAE,QAAY,EAAE,GAAE,oBAAyB,+BA4EzF"}