@vvedantb/ui 0.66.0 → 0.69.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 (423) hide show
  1. package/app/src/auth/useStableAuth.ts +0 -2
  2. package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
  3. package/app/src/confirm/useAltHeld.ts +0 -17
  4. package/app/src/convex/ConvexClerkProvider.tsx +0 -3
  5. package/app/src/convex/env.ts +0 -4
  6. package/app/src/convex/errorMessage.ts +0 -1
  7. package/app/src/convex/useHeldResult.ts +0 -3
  8. package/app/src/page-motion/PageMotionProvider.tsx +0 -6
  9. package/app/src/page-title/createPageTitleContext.tsx +0 -14
  10. package/app/src/settings/SettingsEmptyState.tsx +0 -4
  11. package/app/src/settings/SettingsField.tsx +0 -4
  12. package/app/src/settings/SettingsPage.tsx +0 -12
  13. package/app/src/settings/SettingsSection.tsx +0 -14
  14. package/app/src/settings/ThemeModePicker.tsx +0 -6
  15. package/app/src/theme/createThemeProvider.tsx +0 -33
  16. package/app/src/time/compactRelativeTime.ts +0 -16
  17. package/app/src/update/staleDeployReload.ts +0 -40
  18. package/app/src/update/updateWatcher.ts +0 -8
  19. package/dist/app/src/auth/useStableAuth.js +0 -1
  20. package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
  21. package/dist/app/src/confirm/useAltHeld.js +0 -17
  22. package/dist/app/src/convex/env.js +0 -3
  23. package/dist/app/src/convex/errorMessage.js +0 -2
  24. package/dist/app/src/settings/ThemeModePicker.js +0 -1
  25. package/dist/app/src/theme/createThemeProvider.js +1 -11
  26. package/dist/app/src/time/compactRelativeTime.js +0 -8
  27. package/dist/app/src/update/staleDeployReload.js +3 -38
  28. package/dist/app/src/update/updateWatcher.js +1 -3
  29. package/dist/shell/src/AppShell.js +0 -14
  30. package/dist/shell/src/PageHeaderBar.js +0 -3
  31. package/dist/shell/src/SessionsHoverCard.js +0 -9
  32. package/dist/shell/src/SidePanelTabs.js +0 -36
  33. package/dist/shell/src/Sidebar.js +0 -1
  34. package/dist/shell/src/SidebarAccountMenu.js +1 -1
  35. package/dist/shell/src/SidebarChrome.js +0 -19
  36. package/dist/shell/src/SidebarIconTooltip.js +0 -1
  37. package/dist/shell/src/SidebarRail.js +0 -12
  38. package/dist/shell/src/SidebarResize.js +1 -4
  39. package/dist/shell/src/app-shell-classes.js +0 -10
  40. package/dist/shell/src/index.js +0 -1
  41. package/dist/shell/src/shell-panel-motion.js +0 -12
  42. package/dist/src/ai-elements/activity-shared.js +0 -6
  43. package/dist/src/ai-elements/activity-step-label.js +0 -6
  44. package/dist/src/ai-elements/activity-step-types.js +0 -4
  45. package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
  46. package/dist/src/ai-elements/activity-tasks.js +0 -55
  47. package/dist/src/ai-elements/artifact.js +0 -4
  48. package/dist/src/ai-elements/attachments.js +0 -41
  49. package/dist/src/ai-elements/code-block.js +0 -18
  50. package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
  51. package/dist/src/ai-elements/context.js +0 -13
  52. package/dist/src/ai-elements/conversation.js +0 -4
  53. package/dist/src/ai-elements/jump-rail.js +0 -5
  54. package/dist/src/ai-elements/message.js +3 -9
  55. package/dist/src/ai-elements/model-picker-types.js +0 -1
  56. package/dist/src/ai-elements/model-picker.js +1 -6
  57. package/dist/src/ai-elements/model-selector.js +0 -4
  58. package/dist/src/ai-elements/prompt-input-speech.js +0 -13
  59. package/dist/src/ai-elements/prompt-input.js +0 -1
  60. package/dist/src/ai-elements/provider-icon.js +0 -4
  61. package/dist/src/ai-elements/queue.js +2 -16
  62. package/dist/src/ai-elements/shimmer.js +0 -14
  63. package/dist/src/ai-elements/speech-input.js +0 -7
  64. package/dist/src/artifacts/artifact-card.js +1 -1
  65. package/dist/src/artifacts/artifact-frame.js +0 -2
  66. package/dist/src/artifacts/artifact-viewer.js +2 -1
  67. package/dist/src/audio/playChime.js +0 -2
  68. package/dist/src/audio/playTone.js +1 -4
  69. package/dist/src/brand/AppWordmark.js +0 -5
  70. package/dist/src/brand/svg.js +0 -6
  71. package/dist/src/client.js +0 -43
  72. package/dist/src/composer/Composer.js +0 -27
  73. package/dist/src/composer/input-area/InputArea.js +0 -3
  74. package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
  75. package/dist/src/composer/input-area/composerPrediction.js +0 -3
  76. package/dist/src/generative-ui/content.js +0 -2
  77. package/dist/src/generative-ui/index.js +0 -3
  78. package/dist/src/generative-ui/layout.js +0 -5
  79. package/dist/src/hooks/use-count-up-display.js +0 -2
  80. package/dist/src/hooks/use-idle-callback.js +0 -3
  81. package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
  82. package/dist/src/icons/animated/index.js +0 -4
  83. package/dist/src/icons/board-icon.js +74 -41
  84. package/dist/src/icons/bolt-icon.js +30 -20
  85. package/dist/src/icons/building-icon.js +125 -61
  86. package/dist/src/icons/files-icon.js +103 -43
  87. package/dist/src/icons/inbox-icon.js +101 -49
  88. package/dist/src/icons/index.js +2 -1
  89. package/dist/src/icons/memory-icon.js +135 -58
  90. package/dist/src/icons/search-icon.js +143 -46
  91. package/dist/src/icons/settings-icon.js +113 -53
  92. package/dist/src/icons/solid-icons.js +665 -0
  93. package/dist/src/icons/with-active.js +25 -0
  94. package/dist/src/index.js +0 -40
  95. package/dist/src/kibo/gantt-features.js +0 -10
  96. package/dist/src/kibo/gantt-provider.js +0 -34
  97. package/dist/src/kibo/kanban.js +0 -15
  98. package/dist/src/kibo/list.js +0 -3
  99. package/dist/src/kibo/video-player.js +0 -7
  100. package/dist/src/logos/index.js +0 -4
  101. package/dist/src/markdown/Markdown.js +0 -15
  102. package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
  103. package/dist/src/markdown/MarkdownInlineCode.js +0 -6
  104. package/dist/src/markdown/MarkdownLink.js +0 -5
  105. package/dist/src/markdown/codeFence.js +0 -1
  106. package/dist/src/markdown/codeHighlight.js +0 -19
  107. package/dist/src/markdown/incrementalBlocks.js +0 -45
  108. package/dist/src/markdown/markdownClipboard.js +0 -13
  109. package/dist/src/markdown/mermaid.js +0 -25
  110. package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
  111. package/dist/src/markdown/useSmoothText.js +0 -5
  112. package/dist/src/marketing/PricingModal.js +0 -2
  113. package/dist/src/marketing/ProductHero.js +0 -2
  114. package/dist/src/marketing/createLandingKit.js +0 -5
  115. package/dist/src/marketing/marketing-classes.js +0 -7
  116. package/dist/src/motion/dock-motion.js +0 -27
  117. package/dist/src/motion/panel-transition.js +0 -2
  118. package/dist/src/ui/_field-classes.js +0 -3
  119. package/dist/src/ui/_menu-classes.js +6 -6
  120. package/dist/src/ui/_picker-classes.js +0 -9
  121. package/dist/src/ui/accordion.alt.js +0 -12
  122. package/dist/src/ui/badge.js +0 -1
  123. package/dist/src/ui/border-beam.js +0 -2
  124. package/dist/src/ui/breadcrumb.js +0 -15
  125. package/dist/src/ui/bulk-action-bar.js +0 -11
  126. package/dist/src/ui/button.js +0 -20
  127. package/dist/src/ui/calendar.js +1 -20
  128. package/dist/src/ui/card.js +0 -3
  129. package/dist/src/ui/carousel.js +0 -1
  130. package/dist/src/ui/clear-input.alt.js +0 -9
  131. package/dist/src/ui/clearInputDissolve.js +0 -4
  132. package/dist/src/ui/command.js +0 -15
  133. package/dist/src/ui/confetti-burst.js +0 -3
  134. package/dist/src/ui/confirm-dialog-parts.js +0 -11
  135. package/dist/src/ui/confirm-dialog.js +0 -6
  136. package/dist/src/ui/context-menu.js +40 -34
  137. package/dist/src/ui/crossfade-icon.js +0 -2
  138. package/dist/src/ui/date-picker.js +0 -22
  139. package/dist/src/ui/dialog.js +0 -5
  140. package/dist/src/ui/dropdown-menu.js +40 -34
  141. package/dist/src/ui/empty-state.js +0 -7
  142. package/dist/src/ui/field.js +0 -21
  143. package/dist/src/ui/image-lightbox.js +0 -5
  144. package/dist/src/ui/input-group.alt.js +0 -24
  145. package/dist/src/ui/input-group.js +0 -4
  146. package/dist/src/ui/kbd.js +0 -3
  147. package/dist/src/ui/loading-state.js +0 -17
  148. package/dist/src/ui/marquee-on-hover.js +0 -3
  149. package/dist/src/ui/media-preview.js +0 -2
  150. package/dist/src/ui/modalTransition.js +0 -33
  151. package/dist/src/ui/overlay-a11y.js +0 -1
  152. package/dist/src/ui/page-title.js +0 -3
  153. package/dist/src/ui/refresh-spin-icon.js +0 -12
  154. package/dist/src/ui/search-input.js +0 -1
  155. package/dist/src/ui/select-field.js +0 -1
  156. package/dist/src/ui/send-queue-icon.js +0 -3
  157. package/dist/src/ui/sheet.js +0 -33
  158. package/dist/src/ui/slider.js +103 -82
  159. package/dist/src/ui/sonner-icons.js +0 -5
  160. package/dist/src/ui/sonner.js +0 -60
  161. package/dist/src/ui/spinner.js +0 -35
  162. package/dist/src/ui/status-dot.js +0 -2
  163. package/dist/src/ui/surface.js +0 -14
  164. package/dist/src/ui/switch.js +213 -36
  165. package/dist/src/ui/table.js +0 -1
  166. package/dist/src/ui/tabs-transition.js +0 -1
  167. package/dist/src/ui/tabs.js +0 -17
  168. package/dist/src/ui/tabsSliding.js +0 -6
  169. package/dist/src/ui/time-picker.js +0 -15
  170. package/dist/src/ui/toggle-search.js +0 -3
  171. package/dist/src/ui/ui-config.js +0 -16
  172. package/dist/src/utils/cat-color.js +0 -17
  173. package/dist/src/utils/cn.js +0 -5
  174. package/dist/src/utils/gesture.js +0 -8
  175. package/dist/src/utils/ref.js +0 -1
  176. package/dist/src/utils/runtimeVisibility.js +1 -22
  177. package/dist/src/utils/surface-radius.js +0 -11
  178. package/dist/src/utils/useDragSensors.js +0 -4
  179. package/dist/tokens/src/tailwind-preset.mjs +0 -3
  180. package/package.json +3 -3
  181. package/scripts/build-brand-assets.mjs +0 -8
  182. package/shell/src/AppShell.tsx +0 -37
  183. package/shell/src/AppSidebar.tsx +0 -14
  184. package/shell/src/ButtonTrack.tsx +0 -1
  185. package/shell/src/PageHeaderBar.tsx +0 -61
  186. package/shell/src/PageWrapper.tsx +0 -26
  187. package/shell/src/PillTabs.tsx +0 -1
  188. package/shell/src/SessionsHoverCard.tsx +0 -40
  189. package/shell/src/SidePanelTabs.tsx +0 -61
  190. package/shell/src/Sidebar.tsx +0 -1
  191. package/shell/src/SidebarAccountMenu.tsx +1 -41
  192. package/shell/src/SidebarChrome.tsx +0 -32
  193. package/shell/src/SidebarIconTooltip.tsx +0 -3
  194. package/shell/src/SidebarPanel.tsx +0 -20
  195. package/shell/src/SidebarRail.tsx +0 -44
  196. package/shell/src/SidebarResize.tsx +0 -6
  197. package/shell/src/SidebarUpgradeCard.tsx +0 -2
  198. package/shell/src/SignOutDialog.tsx +0 -6
  199. package/shell/src/app-shell-classes.ts +0 -15
  200. package/shell/src/index.ts +0 -1
  201. package/shell/src/shell-panel-motion.ts +0 -11
  202. package/shell/src/shell-variant.ts +0 -6
  203. package/src/ai-elements/__snapshots__/queue.test.tsx.snap +2 -2
  204. package/src/ai-elements/activity-question.tsx +0 -2
  205. package/src/ai-elements/activity-shared.tsx +0 -11
  206. package/src/ai-elements/activity-step-detail.tsx +0 -2
  207. package/src/ai-elements/activity-step-label.ts +0 -5
  208. package/src/ai-elements/activity-step-types.ts +0 -24
  209. package/src/ai-elements/activity-tasks-utils.ts +0 -13
  210. package/src/ai-elements/activity-tasks.tsx +0 -61
  211. package/src/ai-elements/artifact.tsx +0 -7
  212. package/src/ai-elements/attachments.tsx +0 -33
  213. package/src/ai-elements/chat-day-divider.tsx +0 -3
  214. package/src/ai-elements/chat-jump-rail.tsx +0 -9
  215. package/src/ai-elements/code-block.tsx +0 -28
  216. package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
  217. package/src/ai-elements/context.tsx +0 -10
  218. package/src/ai-elements/conversation.tsx +0 -16
  219. package/src/ai-elements/jump-rail.tsx +0 -31
  220. package/src/ai-elements/message.tsx +3 -34
  221. package/src/ai-elements/model-picker-content.tsx +0 -17
  222. package/src/ai-elements/model-picker-types.ts +0 -5
  223. package/src/ai-elements/model-picker.tsx +0 -36
  224. package/src/ai-elements/model-selector.tsx +0 -5
  225. package/src/ai-elements/prompt-input-speech.tsx +0 -11
  226. package/src/ai-elements/prompt-input.tsx +0 -26
  227. package/src/ai-elements/provider-icon.tsx +0 -2
  228. package/src/ai-elements/queue.tsx +2 -20
  229. package/src/ai-elements/reasoning.tsx +0 -4
  230. package/src/ai-elements/shimmer.tsx +0 -16
  231. package/src/ai-elements/simple-model-ladder.tsx +0 -1
  232. package/src/ai-elements/speech-input.tsx +0 -6
  233. package/src/ai-elements/test-results.tsx +0 -5
  234. package/src/ai-elements/trace.tsx +0 -2
  235. package/src/ai-elements/web-preview.tsx +0 -7
  236. package/src/artifacts/artifact-card.tsx +1 -8
  237. package/src/artifacts/artifact-dialogs.tsx +0 -4
  238. package/src/artifacts/artifact-frame.tsx +0 -10
  239. package/src/artifacts/artifact-list-toolbar.tsx +0 -6
  240. package/src/artifacts/artifact-list.tsx +0 -4
  241. package/src/artifacts/artifact-type-icon.tsx +0 -1
  242. package/src/artifacts/artifact-versions-menu.tsx +0 -3
  243. package/src/artifacts/artifact-viewer.tsx +2 -6
  244. package/src/artifacts/types.ts +0 -1
  245. package/src/audio/playChime.ts +0 -1
  246. package/src/audio/playTone.ts +0 -7
  247. package/src/brand/AppIcons.tsx +0 -5
  248. package/src/brand/AppMark.tsx +0 -6
  249. package/src/brand/AppWordmark.tsx +0 -10
  250. package/src/brand/familyApps.ts +0 -2
  251. package/src/brand/svg.ts +0 -9
  252. package/src/client.ts +0 -34
  253. package/src/composer/Composer.tsx +0 -70
  254. package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
  255. package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
  256. package/src/composer/input-area/FadePresence.tsx +0 -4
  257. package/src/composer/input-area/InputActions.tsx +0 -5
  258. package/src/composer/input-area/InputArea.tsx +1 -28
  259. package/src/composer/input-area/InputAreaEditor.tsx +0 -39
  260. package/src/composer/input-area/InputBanners.tsx +0 -1
  261. package/src/composer/input-area/PromoBanner.tsx +0 -1
  262. package/src/composer/input-area/composerPrediction.ts +0 -2
  263. package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
  264. package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
  265. package/src/composer/prediction.ts +0 -6
  266. package/src/composer/useComposerPrediction.ts +0 -2
  267. package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
  268. package/src/generative-ui/content.tsx +0 -2
  269. package/src/generative-ui/index.ts +0 -3
  270. package/src/generative-ui/layout.tsx +0 -5
  271. package/src/hooks/use-count-up-display.ts +0 -1
  272. package/src/hooks/use-idle-callback.ts +0 -5
  273. package/src/hooks/use-persisted-scroll-parent.ts +0 -4
  274. package/src/hooks/use-single-flight.ts +0 -5
  275. package/src/icons/animated/animated-bell-icon.tsx +0 -6
  276. package/src/icons/animated/animated-counter.tsx +0 -5
  277. package/src/icons/animated/animated-key-icon.tsx +0 -4
  278. package/src/icons/animated/animated-notification-icon.tsx +0 -14
  279. package/src/icons/animated/animated-progress.tsx +0 -10
  280. package/src/icons/animated/animated-status-dot.tsx +0 -4
  281. package/src/icons/animated/index.ts +0 -4
  282. package/src/icons/animated/morphing-menu-icon.tsx +0 -5
  283. package/src/icons/animated/morphing-mic-icon.tsx +0 -2
  284. package/src/icons/animated/pulsing-rings.tsx +0 -4
  285. package/src/icons/automation-icon.tsx +0 -1
  286. package/src/icons/board-icon.tsx +13 -10
  287. package/src/icons/bolt-icon.tsx +5 -4
  288. package/src/icons/building-icon.tsx +11 -9
  289. package/src/icons/draft-icon.tsx +0 -1
  290. package/src/icons/files-icon.tsx +9 -5
  291. package/src/icons/inbox-arrow-icon.tsx +0 -1
  292. package/src/icons/inbox-icon.tsx +9 -5
  293. package/src/icons/index.ts +12 -1
  294. package/src/icons/memory-icon.tsx +9 -11
  295. package/src/icons/nav-icon-base.tsx +0 -10
  296. package/src/icons/search-icon.tsx +7 -6
  297. package/src/icons/settings-icon.tsx +11 -13
  298. package/src/icons/sidebar-toggle-icon.tsx +0 -1
  299. package/src/icons/solid-icons.tsx +138 -0
  300. package/src/icons/with-active.tsx +14 -0
  301. package/src/index.ts +0 -30
  302. package/src/kibo/gantt-features.tsx +0 -16
  303. package/src/kibo/gantt-header.tsx +0 -4
  304. package/src/kibo/gantt-provider.tsx +0 -36
  305. package/src/kibo/gantt-sidebar.tsx +0 -7
  306. package/src/kibo/gantt-timeline.tsx +0 -4
  307. package/src/kibo/kanban.tsx +0 -49
  308. package/src/kibo/list.tsx +0 -8
  309. package/src/kibo/theme-switcher.tsx +0 -5
  310. package/src/kibo/video-player.tsx +0 -9
  311. package/src/logos/index.ts +0 -3
  312. package/src/logos/logo-svg.tsx +0 -5
  313. package/src/markdown/Markdown.tsx +0 -20
  314. package/src/markdown/MarkdownCodeBlock.tsx +0 -14
  315. package/src/markdown/MarkdownInlineCode.tsx +0 -6
  316. package/src/markdown/MarkdownLink.tsx +0 -4
  317. package/src/markdown/codeFence.ts +0 -3
  318. package/src/markdown/codeHighlight.ts +0 -16
  319. package/src/markdown/incrementalBlocks.ts +0 -49
  320. package/src/markdown/markdownClipboard.ts +0 -12
  321. package/src/markdown/mermaid.ts +0 -22
  322. package/src/markdown/rehypeGithubAlerts.ts +0 -3
  323. package/src/markdown/useSmoothText.ts +0 -5
  324. package/src/marketing/FloatingBar.tsx +0 -3
  325. package/src/marketing/PricingModal.tsx +0 -45
  326. package/src/marketing/ProductHero.tsx +0 -23
  327. package/src/marketing/ProductHeroOrbit.tsx +0 -5
  328. package/src/marketing/SiteFooter.tsx +0 -23
  329. package/src/marketing/SiteHeader.tsx +0 -14
  330. package/src/marketing/VProPricingModal.tsx +0 -5
  331. package/src/marketing/createLandingKit.tsx +0 -12
  332. package/src/marketing/landing.tsx +0 -12
  333. package/src/marketing/marketing-classes.ts +0 -7
  334. package/src/motion/dock-motion.ts +0 -25
  335. package/src/motion/list-enter.tsx +0 -4
  336. package/src/motion/panel-transition.tsx +0 -5
  337. package/src/ui/_field-classes.ts +0 -2
  338. package/src/ui/_menu-classes.ts +7 -4
  339. package/src/ui/_menu-parts.tsx +0 -5
  340. package/src/ui/_picker-classes.ts +0 -6
  341. package/src/ui/accordion.alt.tsx +0 -8
  342. package/src/ui/accordion.tsx +0 -4
  343. package/src/ui/badge.tsx +0 -1
  344. package/src/ui/border-beam.tsx +0 -11
  345. package/src/ui/breadcrumb.tsx +0 -13
  346. package/src/ui/bulk-action-bar.tsx +0 -24
  347. package/src/ui/button.tsx +0 -27
  348. package/src/ui/calendar.tsx +0 -18
  349. package/src/ui/card.tsx +0 -3
  350. package/src/ui/carousel.tsx +0 -4
  351. package/src/ui/checkbox.tsx +0 -1
  352. package/src/ui/clear-input.alt.tsx +0 -8
  353. package/src/ui/clear-input.tsx +0 -16
  354. package/src/ui/clearInputDissolve.ts +0 -4
  355. package/src/ui/command.tsx +0 -22
  356. package/src/ui/confetti-burst.tsx +0 -4
  357. package/src/ui/confirm-dialog-parts.tsx +0 -45
  358. package/src/ui/confirm-dialog.tsx +0 -26
  359. package/src/ui/context-menu.tsx +4 -11
  360. package/src/ui/count-pop.tsx +0 -2
  361. package/src/ui/crossfade-icon.tsx +0 -3
  362. package/src/ui/date-picker.tsx +0 -40
  363. package/src/ui/dialog.tsx +0 -18
  364. package/src/ui/dropdown-menu.tsx +4 -12
  365. package/src/ui/empty-state.tsx +0 -15
  366. package/src/ui/error-boundary.tsx +0 -7
  367. package/src/ui/field.tsx +0 -18
  368. package/src/ui/hover-card.tsx +0 -6
  369. package/src/ui/image-lightbox.tsx +0 -7
  370. package/src/ui/input-group.alt.tsx +0 -16
  371. package/src/ui/input-group.tsx +0 -3
  372. package/src/ui/kbd.tsx +0 -3
  373. package/src/ui/label.tsx +0 -1
  374. package/src/ui/labeled-slider-row.tsx +0 -2
  375. package/src/ui/list-row.tsx +0 -46
  376. package/src/ui/loading-state.tsx +0 -23
  377. package/src/ui/marquee-on-hover.tsx +1 -6
  378. package/src/ui/media-preview.tsx +0 -5
  379. package/src/ui/modalTransition.ts +0 -25
  380. package/src/ui/overlay-a11y.ts +0 -1
  381. package/src/ui/page-title.tsx +0 -4
  382. package/src/ui/popover.tsx +0 -8
  383. package/src/ui/progress.tsx +0 -1
  384. package/src/ui/refresh-spin-icon.tsx +0 -11
  385. package/src/ui/relative-date-time.tsx +0 -3
  386. package/src/ui/rolling-number.tsx +0 -2
  387. package/src/ui/search-input.tsx +0 -9
  388. package/src/ui/select-field.tsx +0 -5
  389. package/src/ui/select.tsx +0 -8
  390. package/src/ui/send-queue-icon.tsx +0 -3
  391. package/src/ui/separator.tsx +0 -1
  392. package/src/ui/sheet.tsx +0 -42
  393. package/src/ui/slide-over-panel.tsx +0 -2
  394. package/src/ui/slider.tsx +21 -9
  395. package/src/ui/sonner-icons.tsx +0 -4
  396. package/src/ui/sonner.tsx +0 -78
  397. package/src/ui/spinner.tsx +0 -50
  398. package/src/ui/status-dot.tsx +0 -10
  399. package/src/ui/surface.tsx +0 -13
  400. package/src/ui/switch.tsx +72 -3
  401. package/src/ui/table.tsx +0 -3
  402. package/src/ui/tabs-transition.tsx +0 -12
  403. package/src/ui/tabs.tsx +0 -17
  404. package/src/ui/tabsSliding.ts +0 -5
  405. package/src/ui/time-picker.tsx +0 -17
  406. package/src/ui/toggle-search.tsx +0 -6
  407. package/src/ui/toolbar-search-input.tsx +0 -3
  408. package/src/ui/tooltip.tsx +0 -5
  409. package/src/ui/ui-config.tsx +0 -19
  410. package/src/utils/cat-color.ts +0 -20
  411. package/src/utils/cn.ts +0 -4
  412. package/src/utils/gesture.ts +0 -8
  413. package/src/utils/ref.ts +0 -1
  414. package/src/utils/runtimeVisibility.ts +0 -19
  415. package/src/utils/surface-radius.ts +0 -11
  416. package/src/utils/useDragSensors.ts +0 -2
  417. package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
  418. package/tokens/examples/toaster/Fixture.tsx +0 -4
  419. package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
  420. package/tokens/examples/toaster/vite.config.ts +0 -2
  421. package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
  422. package/tokens/examples/tokens-moved/vite.config.ts +0 -2
  423. package/tokens/src/tailwind-preset.mjs +0 -3
@@ -59,7 +59,6 @@ import {
59
59
  import { useStreamingDisclosure } from "./use-streaming-disclosure";
60
60
  import { RollingNumber } from "../ui/rolling-number";
61
61
 
62
- /** The app's Markdown renderer (`UiConfig.ActivityTasks.markdown`), or the package `Markdown`. */
63
62
  function useActivityMarkdown(): ComponentType<ActivityMarkdownProps> {
64
63
  return useUiConfig("ActivityTasks")?.markdown ?? PackageMarkdown;
65
64
  }
@@ -76,7 +75,6 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
76
75
  const verb = useActivitySpinnerVerb(true);
77
76
  const elapsed = useActivityElapsedSeconds(startedAt, true);
78
77
  const defaultName = useUiConfig("ActivityTasks")?.name ?? "Agent";
79
- // Reply text is not a status: label the header from the work steps only.
80
78
  const work = steps.filter((s) => s.type !== "response");
81
79
  const activeStep = work.find((s) => s.status === "active") ?? work[0];
82
80
  const headerText =
@@ -88,7 +86,6 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
88
86
  <Shimmer as="span" duration={2.5} spread={1.5}>
89
87
  {headerText}
90
88
  </Shimmer>
91
- {/* Outside the shimmer: it takes a string, and the clock rolls. */}
92
89
  {startedAt ? (
93
90
  <>
94
91
  {" ("}
@@ -101,19 +98,12 @@ const ActivityStreamingHeader = memo(function ActivityStreamingHeader({
101
98
  );
102
99
  });
103
100
 
104
- /** Max timeline blocks shown before the overflow toggle appears. */
105
101
  const MAX_VISIBLE_ROWS = 8;
106
102
 
107
- /** Max nested child rows shown under a subtask before "+N more". */
108
103
  const MAX_VISIBLE_CHILDREN = 8;
109
104
 
110
- /**
111
- * Both layouts show mid-turn reply text in the timeline, in the order it was
112
- * written, so a live turn never stacks its first words below newer steps.
113
- */
114
105
  const HIDDEN_TYPES = new Set<ActivityStep["type"]>(["thinking"]);
115
106
 
116
- /** A subagent's own text belongs to its child thread view, not under its row. */
117
107
  const HIDDEN_CHILD_TYPES = new Set<ActivityStep["type"]>([
118
108
  "thinking",
119
109
  "response",
@@ -126,7 +116,6 @@ const HIDDEN_CHILD_TYPES = new Set<ActivityStep["type"]>([
126
116
  */
127
117
  export type ActivityLayout = "folded" | "inline";
128
118
 
129
- /** Nearest ancestor that actually scrolls — used to keep the overflow toggle pinned. */
130
119
  function findScrollParent(el: HTMLElement): HTMLElement | null {
131
120
  let current = el.parentElement;
132
121
  while (current) {
@@ -144,11 +133,6 @@ function findScrollParent(el: HTMLElement): HTMLElement | null {
144
133
  return null;
145
134
  }
146
135
 
147
- /**
148
- * Expand/collapse while keeping `anchor` visually fixed (t3code work-group
149
- * toggle pattern). Content inserted above the control would otherwise shove it
150
- * down the viewport.
151
- */
152
136
  function toggleWithScrollCompensation(
153
137
  anchor: HTMLElement,
154
138
  toggle: () => void,
@@ -165,11 +149,6 @@ function toggleWithScrollCompensation(
165
149
 
166
150
  export type { ActivityStep };
167
151
 
168
- /**
169
- * Asks the owner of the payload for the untrimmed steps. Passed by context
170
- * rather than props because all three collapsibles that can reveal a stripped
171
- * row sit at different depths, and none of them otherwise needs the callback.
172
- */
173
152
  const RequestFullDetailContext = createContext<(() => void) | undefined>(
174
153
  undefined,
175
154
  );
@@ -183,7 +162,6 @@ export const OpenSubagentContext = createContext<
183
162
  ((toolUseId: string) => void) | undefined
184
163
  >(undefined);
185
164
 
186
- /** "View" link on a subtask row that opens its child thread. */
187
165
  function OpenSubagentButton({ toolUseId }: { toolUseId: string | undefined }) {
188
166
  const open = useContext(OpenSubagentContext);
189
167
  if (!open || !toolUseId) return null;
@@ -202,7 +180,6 @@ function OpenSubagentButton({ toolUseId }: { toolUseId: string | undefined }) {
202
180
  );
203
181
  }
204
182
 
205
- /** `onOpenChange` handler that asks for the full payload the first time a fold opens. */
206
183
  function useRequestFullDetailOnOpen(): (open: boolean) => void {
207
184
  const request = useContext(RequestFullDetailContext);
208
185
  return (open: boolean) => {
@@ -217,24 +194,12 @@ export interface ActivityTasksProps extends ComponentProps<"div"> {
217
194
  icon?: ReactNode;
218
195
  startedAt?: number;
219
196
  duration?: string;
220
- /** @deprecated Unused; kept so existing call sites compile unchanged. */
221
197
  finalText?: string;
222
- /**
223
- * When provided, file chips with a known full path become clickable and call
224
- * this with the path. Pass a stable callback — {@link ActivityTasks} is memoised.
225
- */
226
198
  onOpenFile?: (path: string) => void;
227
- /**
228
- * Called when a reader opens a fold that may contain step detail the
229
- * transcript query stripped (see {@link ActivityStep.hasHiddenDetail}). Fires
230
- * on every open, so the owner is responsible for fetching once.
231
- */
232
199
  onRequestFullDetail?: () => void;
233
- /** Defaults to `folded`. See {@link ActivityLayout}. */
234
200
  layout?: ActivityLayout;
235
201
  }
236
202
 
237
- /** Status glyph for one todo row. */
238
203
  function TodoStatusIcon({ status }: { status: ActivityTodoItem["status"] }) {
239
204
  return (
240
205
  <CrossfadeIconSlot
@@ -253,7 +218,6 @@ function TodoStatusIcon({ status }: { status: ActivityTodoItem["status"] }) {
253
218
  );
254
219
  }
255
220
 
256
- /** Renders a todo checklist, or a plain fallback line for legacy/empty snapshots. */
257
221
  function TodoChecklist({
258
222
  todos,
259
223
  fallback,
@@ -299,7 +263,6 @@ function bashIconForKind(kind: CommandVisualKind) {
299
263
  return IconTerminal2;
300
264
  }
301
265
 
302
- /** Glyph for a step — shell steps swap in a glyph matching what they ran. */
303
266
  function iconForStep(step: ActivityStep) {
304
267
  if (step.type === "bash" && step.detail) {
305
268
  return bashIconForKind(resolveCommandVisualKind(step.detail));
@@ -314,17 +277,12 @@ function traceStatusForStep(step: ActivityStep): AgentTraceStatus | undefined {
314
277
  return undefined;
315
278
  }
316
279
 
317
- /** Whole seconds a finished step took; undefined when unknown or under 1s. */
318
280
  function stepSeconds(step: ActivityStep): number | undefined {
319
281
  if (step.status !== "complete" || !step.durationMs) return undefined;
320
282
  const seconds = Math.round(step.durationMs / 1000);
321
283
  return seconds >= 1 ? seconds : undefined;
322
284
  }
323
285
 
324
- /**
325
- * One thinking block behind a "Thought 12s" line. Streaming steps open
326
- * themselves so live thinking is readable as it lands, then auto-close.
327
- */
328
286
  function ActivityReasoningLine({ step }: { step: ActivityStep }) {
329
287
  const thoughts = step.detail?.trim() ?? "";
330
288
  const isActive = step.status === "active";
@@ -355,7 +313,6 @@ function ActivityReasoningLine({ step }: { step: ActivityStep }) {
355
313
  );
356
314
  }
357
315
 
358
- /** The to-do snapshot as one line with done/total, folding open to the checklist. */
359
316
  function ActivityTodosLine({ step }: { step: ActivityStep }) {
360
317
  const isActive = step.status === "active";
361
318
  const todos = step.todos ?? [];
@@ -384,7 +341,6 @@ function ActivityTodosLine({ step }: { step: ActivityStep }) {
384
341
  );
385
342
  }
386
343
 
387
- /** One per-call activity line with Synara-style humanized label. */
388
344
  function ActivityStepRow({
389
345
  row,
390
346
  onOpenFile,
@@ -452,14 +408,11 @@ function ActivityStepRow({
452
408
  );
453
409
  }
454
410
 
455
- // Subagent steps start open so their inner steps stay visible, as before.
456
411
  return (
457
412
  <AgentTraceCollapsible
458
413
  defaultOpen={shownChildren.length > 0}
459
414
  onOpenChange={requestFullDetail}
460
415
  >
461
- {/* The file chip opens the file viewer, so it sits beside the trigger:
462
- a button inside the trigger button would be invalid HTML. */}
463
416
  <AgentTraceCollapsibleTrigger
464
417
  trailing={
465
418
  fileChip || openSubagent ? (
@@ -495,8 +448,6 @@ function ActivityStepRow({
495
448
  );
496
449
  }
497
450
 
498
- /** Model reasoning, shown as ordinary prose rather than another muted row. */
499
- /** Reply text the agent wrote between tool runs, set like the final reply. */
500
451
  function ActivityResponseBlock({ step }: { step: ActivityStep }) {
501
452
  const Markdown = useActivityMarkdown();
502
453
  const text = step.detail?.trim();
@@ -522,7 +473,6 @@ function ActivityReasoningBlock({ step }: { step: ActivityStep }) {
522
473
  );
523
474
  }
524
475
 
525
- /** A run of tool calls, folded behind one muted "what happened" summary line. */
526
476
  function ActivityActionGroup({
527
477
  rows,
528
478
  onOpenFile,
@@ -539,9 +489,6 @@ function ActivityActionGroup({
539
489
 
540
490
  return (
541
491
  <AgentTraceCollapsible defaultOpen={isActive} onOpenChange={requestFullDetail}>
542
- {/* Summary stays muted even when a call inside failed: agents run failing
543
- commands on purpose, so one non-zero exit should not paint the run red.
544
- The failed line itself is still red once the fold is open. */}
545
492
  <AgentTraceCollapsibleTrigger>
546
493
  <AgentTraceLine status={isActive ? "running" : undefined}>
547
494
  <AgentTraceIcon iconKey={isActive ? "group-active" : "group-idle"}>
@@ -584,10 +531,6 @@ function ActivitySegmentBlock({
584
531
  return <ActivityActionGroup rows={segment.rows} onOpenFile={onOpenFile} />;
585
532
  }
586
533
 
587
- /**
588
- * Renders timeline blocks with an overflow cap. Settled turns cap from the front
589
- * (first N); streaming turns cap from the end (newest N) so latest stays visible.
590
- */
591
534
  function ActivityRowList({
592
535
  rows,
593
536
  isStreaming,
@@ -699,8 +642,6 @@ export const ActivityTasks = memo(
699
642
  const rows = buildActivityRows(steps).filter(
700
643
  (row) =>
701
644
  !HIDDEN_TYPES.has(row.step.type) &&
702
- // A subagent's text whose Agent row is missing still belongs to its
703
- // child thread, never to the parent's inline reply.
704
645
  !(row.step.type === "response" && row.step.parentToolUseId),
705
646
  );
706
647
 
@@ -714,8 +655,6 @@ export const ActivityTasks = memo(
714
655
  <Collapsible
715
656
  className={merge("group text-sm", className)}
716
657
  defaultOpen={false}
717
- // Opening the turn prefetches the stripped detail, so the rows
718
- // inside already have their bodies by the time one is clicked.
719
658
  onOpenChange={(open) => {
720
659
  if (open) onRequestFullDetail?.();
721
660
  }}
@@ -23,7 +23,6 @@ export interface ArtifactConfig {
23
23
  description?: string;
24
24
  actions?: string;
25
25
  action?: string;
26
- /** Class of an icon given as a component (`icon={IconCopy}`). */
27
26
  actionIcon?: string;
28
27
  content?: string;
29
28
  };
@@ -105,10 +104,8 @@ export const ArtifactActions = ({
105
104
 
106
105
  type ArtifactIcon = ComponentType<{ className?: string }>;
107
106
 
108
- /** A component (`IconCopy`) rather than a rendered node (`<IconCopy />`). */
109
107
  function isIconComponent(icon: ReactNode | ArtifactIcon): icon is ArtifactIcon {
110
108
  if (typeof icon === "function") return true;
111
- // forwardRef / memo components are objects with `render` / `type`.
112
109
  return (
113
110
  typeof icon === "object" &&
114
111
  icon !== null &&
@@ -119,7 +116,6 @@ function isIconComponent(icon: ReactNode | ArtifactIcon): icon is ArtifactIcon {
119
116
 
120
117
  const renderIcon = (Icon: ArtifactIcon, className: string) => <Icon className={className} />;
121
118
 
122
- /** Button shared by `ArtifactAction` and `ArtifactClose`. */
123
119
  function ArtifactActionButton({
124
120
  label,
125
121
  className,
@@ -146,9 +142,7 @@ function ArtifactActionButton({
146
142
  }
147
143
 
148
144
  export type ArtifactActionProps = ComponentProps<typeof Button> & {
149
- /** Without it the button renders alone, with no tooltip. */
150
145
  tooltip?: string;
151
- /** A node (`<IconCopy />`) or an icon component (`IconCopy`). */
152
146
  icon?: ReactNode | ArtifactIcon;
153
147
  label?: string;
154
148
  };
@@ -180,7 +174,6 @@ export const ArtifactAction = ({
180
174
  };
181
175
 
182
176
  export type ArtifactCloseProps = ComponentProps<typeof Button> & {
183
- /** Accessible name. Default `"Close"`. */
184
177
  label?: string;
185
178
  };
186
179
 
@@ -22,9 +22,6 @@ import {
22
22
  IconX,
23
23
  } from "@tabler/icons-react";
24
24
  import { createContext, useContext } from "react";
25
- // ============================================================================
26
- // Types
27
- // ============================================================================
28
25
  export type AttachmentData =
29
26
  | (FileUIPart & {
30
27
  id: string;
@@ -60,9 +57,6 @@ const mediaCategoryIcons: Record<AttachmentMediaCategory, typeof IconPhoto> = {
60
57
  unknown: IconPaperclip,
61
58
  video: IconVideo,
62
59
  };
63
- // ============================================================================
64
- // Utility Functions
65
- // ============================================================================
66
60
  export const getMediaCategory = (
67
61
  data: AttachmentData,
68
62
  ): AttachmentMediaCategory => {
@@ -113,9 +107,6 @@ const renderAttachmentImage = (
113
107
  width={20}
114
108
  />
115
109
  );
116
- // ============================================================================
117
- // Contexts
118
- // ============================================================================
119
110
  interface AttachmentsContextValue {
120
111
  variant: AttachmentVariant;
121
112
  }
@@ -127,9 +118,6 @@ interface AttachmentContextValue {
127
118
  variant: AttachmentVariant;
128
119
  }
129
120
  const AttachmentContext = createContext<AttachmentContextValue | null>(null);
130
- // ============================================================================
131
- // Hooks
132
- // ============================================================================
133
121
  export const useAttachmentsContext = () =>
134
122
  useContext(AttachmentsContext) ?? { variant: "grid" as const };
135
123
  export const useAttachmentContext = () => {
@@ -139,9 +127,6 @@ export const useAttachmentContext = () => {
139
127
  }
140
128
  return ctx;
141
129
  };
142
- // ============================================================================
143
- // Attachments - Container
144
- // ============================================================================
145
130
  export type AttachmentsProps = HTMLAttributes<HTMLDivElement> & {
146
131
  variant?: AttachmentVariant;
147
132
  };
@@ -169,9 +154,6 @@ export const Attachments = ({
169
154
  </AttachmentsContext.Provider>
170
155
  );
171
156
  };
172
- // ============================================================================
173
- // Attachment - Item
174
- // ============================================================================
175
157
  export type AttachmentProps = HTMLAttributes<HTMLDivElement> & {
176
158
  data: AttachmentData;
177
159
  onRemove?: () => void;
@@ -214,9 +196,6 @@ export const Attachment = ({
214
196
  </AttachmentContext.Provider>
215
197
  );
216
198
  };
217
- // ============================================================================
218
- // AttachmentPreview - Media preview
219
- // ============================================================================
220
199
  export type AttachmentPreviewProps = HTMLAttributes<HTMLDivElement> & {
221
200
  fallbackIcon?: ReactNode;
222
201
  };
@@ -258,9 +237,6 @@ export const AttachmentPreview = ({
258
237
  </div>
259
238
  );
260
239
  };
261
- // ============================================================================
262
- // AttachmentInfo - Name and type display
263
- // ============================================================================
264
240
  export type AttachmentInfoProps = HTMLAttributes<HTMLDivElement> & {
265
241
  showMediaType?: boolean;
266
242
  };
@@ -286,9 +262,6 @@ export const AttachmentInfo = ({
286
262
  </div>
287
263
  );
288
264
  };
289
- // ============================================================================
290
- // AttachmentRemove - Remove button
291
- // ============================================================================
292
265
  export type AttachmentRemoveProps = ComponentProps<typeof Button> & {
293
266
  label?: string;
294
267
  };
@@ -337,9 +310,6 @@ export const AttachmentRemove = ({
337
310
  </Button>
338
311
  );
339
312
  };
340
- // ============================================================================
341
- // AttachmentHoverCard - Hover preview
342
- // ============================================================================
343
313
  export type AttachmentHoverCardProps = ComponentProps<typeof HoverCard>;
344
314
  export const AttachmentHoverCard = ({
345
315
  openDelay = 0,
@@ -371,9 +341,6 @@ export const AttachmentHoverCardContent = ({
371
341
  />
372
342
  );
373
343
  };
374
- // ============================================================================
375
- // AttachmentEmpty - Empty state
376
- // ============================================================================
377
344
  export type AttachmentEmptyProps = HTMLAttributes<HTMLDivElement>;
378
345
  export const AttachmentEmpty = ({
379
346
  className,
@@ -24,11 +24,8 @@ export function formatChatClockTime(timestamp: number): string {
24
24
 
25
25
  export interface ChatDayDividerProps {
26
26
  timestamp: number;
27
- /** Override the day label. Defaults to {@link formatChatDayLabel}. */
28
27
  formatDay?: (timestamp: number) => string;
29
- /** Override the time label. Defaults to {@link formatChatClockTime}. */
30
28
  formatTime?: (timestamp: number) => string;
31
- /** Merged after the base classes; use to set the label size (e.g. `text-3xs`). */
32
29
  className?: string;
33
30
  }
34
31
 
@@ -14,7 +14,6 @@ export interface ChatJumpRailTranscriptMessage {
14
14
  id: string;
15
15
  role: string;
16
16
  content: string;
17
- /** System alerts are skipped, both as ticks and as replies. */
18
17
  isSystemAlert?: boolean;
19
18
  }
20
19
 
@@ -77,16 +76,9 @@ export interface ChatJumpRailProps
77
76
  JumpRailProps,
78
77
  "items" | "scrollRef" | "getScrollElement" | "onReveal" | "onBeforeScroll" | "observeKey"
79
78
  > {
80
- /** The whole transcript as ticks (see `buildChatJumpRailTicks`), rendered or not. */
81
79
  messages: readonly ChatJumpRailMessage[];
82
- /**
83
- * First row the transcript renders. A window that grows upwards has to
84
- * re-observe, so a change here does.
85
- */
86
80
  renderedFromId?: string;
87
- /** Renders an older turn outside the transcript window, then scrolls to it. */
88
81
  onRevealMessage?: (messageId: string) => void;
89
- /** Raw text to display text. Default: the text as is. */
90
82
  formatPreview?: (text: string) => string;
91
83
  }
92
84
 
@@ -105,7 +97,6 @@ export function ChatJumpRail({
105
97
  ...rest
106
98
  }: ChatJumpRailProps) {
107
99
  const { scrollRef, stopScroll } = useStickToBottomContext();
108
- // Memoised on `messages`, which keeps its identity while a turn streams.
109
100
  const items = useMemo(
110
101
  () => buildChatJumpRailItems(messages, formatPreview),
111
102
  [messages, formatPreview],
@@ -21,7 +21,6 @@ import { createContext, useContext, useEffect, useRef, useState } from "react";
21
21
  import { bundledLanguages, createHighlighter } from "shiki";
22
22
  const isBundledLanguage = (lang: string): lang is BundledLanguage =>
23
23
  lang in bundledLanguages;
24
- // Shiki uses bitflags for font styles: 1=italic, 2=bold, 4=underline
25
24
  // biome-ignore lint/suspicious/noBitwiseOperators: shiki bitflag check
26
25
  // eslint-disable-next-line no-bitwise -- shiki bitflag check
27
26
  const isItalic = (fontStyle: number | undefined) => fontStyle && fontStyle & 1;
@@ -33,7 +32,6 @@ const isUnderline = (fontStyle: number | undefined) =>
33
32
  // biome-ignore lint/suspicious/noBitwiseOperators: shiki bitflag check
34
33
  // oxlint-disable-next-line eslint(no-bitwise)
35
34
  fontStyle && fontStyle & 4;
36
- // Transform tokens to include pre-computed keys to avoid noArrayIndexKey lint
37
35
  interface KeyedToken {
38
36
  token: ThemedToken;
39
37
  key: string;
@@ -50,7 +48,6 @@ const addKeysToTokens = (lines: ThemedToken[][]): KeyedLine[] =>
50
48
  token,
51
49
  })),
52
50
  }));
53
- // Token rendering component
54
51
  const TokenSpan = ({ token }: { token: ThemedToken }) => (
55
52
  <span
56
53
  className="dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!"
@@ -68,7 +65,6 @@ const TokenSpan = ({ token }: { token: ThemedToken }) => (
68
65
  {token.content}
69
66
  </span>
70
67
  );
71
- // Line rendering component
72
68
  const LineSpan = ({
73
69
  keyedLine,
74
70
  showLineNumbers,
@@ -84,17 +80,10 @@ const LineSpan = ({
84
80
  ))}
85
81
  </span>
86
82
  );
87
- // Types
88
83
  type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {
89
84
  code: string;
90
- /** Shiki language id. Without it the code renders unhighlighted. */
91
85
  language?: string;
92
86
  showLineNumbers?: boolean;
93
- /**
94
- * Plain text, no shiki: a `pre` with the code. `children`, when given,
95
- * replace that `pre` (and carry their own copy button) instead of sitting
96
- * above the highlighted body.
97
- */
98
87
  plain?: boolean;
99
88
  };
100
89
  /**
@@ -114,7 +103,6 @@ export interface CodeBlockConfig {
114
103
  container?: string;
115
104
  pre?: string;
116
105
  copyButton?: string;
117
- /** Replaces the icon's `size={14}` with a class. */
118
106
  copyIcon?: string;
119
107
  };
120
108
  }
@@ -128,18 +116,14 @@ interface TokenizedCode {
128
116
  interface CodeBlockContextType {
129
117
  code: string;
130
118
  }
131
- // Context
132
119
  const CodeBlockContext = createContext<CodeBlockContextType>({
133
120
  code: "",
134
121
  });
135
- // Highlighter cache (singleton per language)
136
122
  const highlighterCache = new Map<
137
123
  string,
138
124
  Promise<HighlighterGeneric<BundledLanguage, BundledTheme>>
139
125
  >();
140
- // Token cache
141
126
  const tokensCache = new Map<string, TokenizedCode>();
142
- // Subscribers for async token updates
143
127
  const subscribers = new Map<string, Set<(result: TokenizedCode) => void>>();
144
128
  const getTokensCacheKey = (code: string, language: BundledLanguage) => {
145
129
  const start = code.slice(0, 100);
@@ -160,7 +144,6 @@ const getHighlighter = (
160
144
  highlighterCache.set(language, highlighterPromise);
161
145
  return highlighterPromise;
162
146
  };
163
- // Create raw tokens for immediate display while highlighting loads
164
147
  const createRawTokens = (code: string): TokenizedCode => ({
165
148
  bg: "transparent",
166
149
  fg: "inherit",
@@ -175,7 +158,6 @@ const createRawTokens = (code: string): TokenizedCode => ({
175
158
  ],
176
159
  ),
177
160
  });
178
- // Synchronous highlight with callback for async results
179
161
  export const highlightCode = (
180
162
  code: string,
181
163
  language: string,
@@ -184,19 +166,16 @@ export const highlightCode = (
184
166
  ): TokenizedCode | null => {
185
167
  if (!isBundledLanguage(language)) return null;
186
168
  const tokensCacheKey = getTokensCacheKey(code, language);
187
- // Return cached result if available
188
169
  const cached = tokensCache.get(tokensCacheKey);
189
170
  if (cached) {
190
171
  return cached;
191
172
  }
192
- // Subscribe callback if provided
193
173
  if (callback) {
194
174
  if (!subscribers.has(tokensCacheKey)) {
195
175
  subscribers.set(tokensCacheKey, new Set());
196
176
  }
197
177
  subscribers.get(tokensCacheKey)?.add(callback);
198
178
  }
199
- // Start highlighting in background - fire-and-forget async pattern
200
179
  getHighlighter(language)
201
180
  // oxlint-disable-next-line eslint-plugin-promise(prefer-await-to-then)
202
181
  .then((highlighter) => {
@@ -214,9 +193,7 @@ export const highlightCode = (
214
193
  fg: result.fg ?? "inherit",
215
194
  tokens: result.tokens,
216
195
  };
217
- // Cache the result
218
196
  tokensCache.set(tokensCacheKey, tokenized);
219
- // Notify all subscribers
220
197
  const subs = subscribers.get(tokensCacheKey);
221
198
  if (subs) {
222
199
  for (const sub of subs) {
@@ -232,7 +209,6 @@ export const highlightCode = (
232
209
  });
233
210
  return null;
234
211
  };
235
- // Line number styles using CSS counters
236
212
  const LINE_NUMBER_CLASSES = cn(
237
213
  "block",
238
214
  "before:content-[counter(line)]",
@@ -364,17 +340,13 @@ export const CodeBlockContent = ({
364
340
  language: string;
365
341
  showLineNumbers?: boolean;
366
342
  }) => {
367
- // Memoized raw tokens for immediate display
368
343
  const rawTokens = createRawTokens(code);
369
- // Try to get cached result synchronously, otherwise use raw tokens
370
344
  const [tokenized, setTokenized] = useState<TokenizedCode>(
371
345
  () => highlightCode(code, language) ?? rawTokens,
372
346
  );
373
347
  useEffect(() => {
374
348
  let cancelled = false;
375
- // Reset to raw tokens when code changes (shows current code, not stale tokens)
376
349
  setTokenized(highlightCode(code, language) ?? rawTokens);
377
- // Subscribe to async highlighting result
378
350
  highlightCode(code, language, (result) => {
379
351
  if (!cancelled) {
380
352
  setTokenized(result);
@@ -5,7 +5,6 @@ import { Button } from "../ui/button";
5
5
  import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../ui/collapsible";
6
6
  import { cn } from "../utils/cn";
7
7
 
8
- /** Match t3code MessagesTimeline collapsible user prompts. */
9
8
  const MAX_COLLAPSED_USER_MESSAGE_LINES = 8;
10
9
  const MAX_COLLAPSED_USER_MESSAGE_LENGTH = 600;
11
10
  const COLLAPSED_USER_MESSAGE_FADE_HEIGHT_REM = 1.75;
@@ -24,7 +23,6 @@ function shouldCollapseUserMessage(text: string): boolean {
24
23
  export interface CollapsibleUserMessageBodyProps {
25
24
  text: string;
26
25
  children: ReactNode;
27
- /** Merged after the trigger button's classes. */
28
26
  className?: string;
29
27
  }
30
28
 
@@ -19,10 +19,6 @@ const ICON_VIEWBOX = 24;
19
19
  const ICON_CENTER = 12;
20
20
  const ICON_STROKE_WIDTH = 2;
21
21
 
22
- /**
23
- * Per-category token counts. Cache reads and writes are priced very differently
24
- * (reads ~0.1x input, writes ~1.25x input), so they are tracked separately.
25
- */
26
22
  interface LanguageModelUsage {
27
23
  inputTokens?: number;
28
24
  outputTokens?: number;
@@ -30,11 +26,6 @@ interface LanguageModelUsage {
30
26
  cachedInputWriteTokens?: number;
31
27
  }
32
28
 
33
- /**
34
- * Pre-computed costs (USD). Pass these when the authoritative cost is known
35
- * (e.g. Claude returns `total_cost_usd` directly). Avoids needing a pricing
36
- * catalog at render time.
37
- */
38
29
  interface ContextCosts {
39
30
  totalUSD?: number;
40
31
  inputUSD?: number;
@@ -224,7 +215,6 @@ export const ContextUsageContentBody = ({
224
215
  const formatUSD = (value: number) =>
225
216
  new Intl.NumberFormat("en-US", {
226
217
  currency: "USD",
227
- // Claude's per-call cost is often sub-cent; show enough precision to be useful.
228
218
  maximumFractionDigits: 4,
229
219
  minimumFractionDigits: 2,
230
220
  style: "currency",
@@ -100,25 +100,11 @@ export const ConversationEmptyState = ({
100
100
  );
101
101
  };
102
102
  export type ConversationScrollButtonProps = ComponentProps<typeof Button> & {
103
- /** Text after the icon; also the button's `aria-label` and `title`. Without it, the icon-only button's `aria-label` is "Scroll to bottom". */
104
103
  label?: string;
105
- /** Replaces the arrow icon. */
106
104
  icon?: ReactNode;
107
- /**
108
- * Wait this long (ms) after leaving the bottom before showing the button,
109
- * so brief layout settles do not flash it. Hiding is immediate. Default 0.
110
- */
111
105
  showDelay?: number;
112
- /**
113
- * When this changes (for example the thread id), hide the button at once and
114
- * cancel a pending show; it shows again on the next scroll away.
115
- */
116
106
  resetKey?: string;
117
107
  };
118
- /**
119
- * `wanted`, or (with a delay or reset key) `wanted` held for `delay` ms, and
120
- * a function that hides it at once.
121
- */
122
108
  function useDelayedShow(
123
109
  wanted: boolean,
124
110
  delay: number,
@@ -132,7 +118,6 @@ function useDelayedShow(
132
118
  timerRef.current = null;
133
119
  setShown(false);
134
120
  };
135
- // The reset also cancels the pending show timer, a side effect.
136
121
  useEffect(() => {
137
122
  if (!debounced) return;
138
123
  if (timerRef.current !== null) clearTimeout(timerRef.current);
@@ -183,7 +168,6 @@ export const ConversationScrollButton = ({
183
168
  hide();
184
169
  scrollToBottom();
185
170
  };
186
- // The full-width row lets clicks through to the messages; the button takes them.
187
171
  const motionClass =
188
172
  classes?.scrollButtonMotion ?? "pointer-events-none absolute bottom-4 left-0 right-0 z-10 flex justify-center";
189
173
  const presence = (