@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
@@ -23,17 +23,10 @@ export type ComposerStopMode = "replace" | "alongside";
23
23
  export type ComposerInputRenderContext = {
24
24
  value: string;
25
25
  onChange: (value: string) => void;
26
- /**
27
- * Shared key handler. Enter submits (preventDefault, not while composing),
28
- * Tab accepts the ghost text, Esc dismisses it. It ignores IME composition.
29
- * Shift+Enter is not handled: the caller decides what a newline does.
30
- */
31
26
  onKeyDown: (event: React.KeyboardEvent) => void;
32
- /** Visible ghost text including the joining space, or `""`. */
33
27
  ghostText: string;
34
28
  acceptGhost: () => void;
35
29
  dismissGhost: () => void;
36
- /** Attach to the input element (textarea or contenteditable root). */
37
30
  inputRef: React.RefObject<HTMLElement | null>;
38
31
  disabled: boolean;
39
32
  placeholder: string;
@@ -43,77 +36,38 @@ export type ComposerInputRenderContext = {
43
36
  };
44
37
 
45
38
  export type ComposerProps = {
46
- /** Controlled value. Omit it for an uncontrolled composer. */
47
39
  value?: string;
48
40
  defaultValue?: string;
49
41
  onChange?: (value: string) => void;
50
42
 
51
- /**
52
- * Called with the trimmed draft on Enter or the send button. By default it
53
- * is not called for an empty draft. A `canSend` override that allows an
54
- * empty draft calls it with `""`.
55
- */
56
43
  onSubmit?: (value: string) => void | Promise<void>;
57
44
  onStop?: () => void;
58
- /**
59
- * Shows the stop button. With `stopMode="replace"` (default) it takes the
60
- * place of send and Enter does not submit. Typing stays enabled.
61
- */
62
45
  streaming?: boolean;
63
- /** Disables the textarea and the send button. `canSend` cannot override it. */
64
46
  disabled?: boolean;
65
- /**
66
- * Overrides whether send is enabled. Default: the trimmed draft is not
67
- * empty. `disabled` and, with `stopMode="replace"`, `streaming` still block
68
- * send. A function receives the live draft (not trimmed), so check
69
- * `draft.trim()` yourself. Use it to allow an empty draft when attachments
70
- * exist: `canSend={(draft) => draft.trim() !== "" || hasAttachments}`.
71
- */
72
47
  canSend?: boolean | ((draft: string) => boolean);
73
- /** `"replace"` (default) or `"alongside"`. See `ComposerStopMode`. */
74
48
  stopMode?: ComposerStopMode;
75
49
 
76
50
  placeholder?: string;
77
- /** Maximum textarea height in px. The textarea scrolls after it. Default 200. */
78
51
  maxHeight?: number;
79
52
  autoFocus?: boolean;
80
- /** Classes for the outer shell. */
81
53
  className?: string;
82
- /** `"stacked"` (default): input above, footer bar below. `"inline"`: one row with plus, input and actions. */
83
54
  layout?: ComposerLayout;
84
- /**
85
- * Supplies your own input (for example a contenteditable editor) in place of
86
- * the textarea. The shell, slots, send/stop and predictions stay. Autosize
87
- * and the caret-at-end gate apply to the default textarea only: the caller
88
- * sizes the editor and decides when ghost text is valid.
89
- */
90
55
  renderInput?: (ctx: ComposerInputRenderContext) => React.ReactNode;
91
- /** Classes for the textarea. Also applied to the ghost text mirror, so keep padding and font here. */
92
56
  textareaClassName?: string;
93
57
 
94
- /** Left of the footer. */
95
58
  plusMenu?: React.ReactNode | ((ctx: ComposerSlotContext) => React.ReactNode);
96
- /** Right of the footer, before send or stop. */
97
59
  trailingActions?:
98
60
  | React.ReactNode
99
61
  | ((ctx: ComposerTrailingContext) => React.ReactNode);
100
- /** Row above the textarea. The caller renders the chips and their remove buttons. */
101
62
  attachments?: React.ReactNode;
102
63
 
103
- /**
104
- * Returns the continuation of a draft, shown as ghost text. The package makes
105
- * no requests: the caller owns the network call and should pass `signal` to it.
106
- */
107
64
  getPrediction?: (draft: string, opts: { signal: AbortSignal }) => Promise<string>;
108
- /** Default 500 ms. */
109
65
  predictionDebounceMs?: number;
110
- /** Default 12 characters (trimmed). */
111
66
  predictionMinLength?: number;
112
67
  };
113
68
 
114
69
  const DEFAULT_MAX_HEIGHT = 200;
115
70
 
116
- // The textarea and its ghost text mirror must share these metrics.
117
71
  const TEXT_METRICS_BASE = "block w-full text-sm leading-6 break-words whitespace-pre-wrap";
118
72
  const textMetrics = (layout: ComposerLayout) =>
119
73
  cn(TEXT_METRICS_BASE, layout === "inline" ? "px-2 py-1" : "px-4 pt-3.5 pb-1");
@@ -122,7 +76,6 @@ function isCaretAtEnd(el: HTMLTextAreaElement): boolean {
122
76
  return el.selectionStart === el.selectionEnd && el.selectionEnd === el.value.length;
123
77
  }
124
78
 
125
- /** Icon-only ghost button for the footer: `plusMenu` triggers, `trailingActions`. */
126
79
  const ComposerIconButton = React.forwardRef<
127
80
  HTMLButtonElement,
128
81
  React.ComponentProps<typeof Button>
@@ -145,9 +98,7 @@ export type ComposerShellProps = {
145
98
  layout?: ComposerLayout;
146
99
  disabled?: boolean;
147
100
  streaming?: boolean;
148
- /** Enables the send button. Always a boolean: `Composer` resolves its function form. */
149
101
  canSend?: boolean;
150
- /** `"replace"` (default) or `"alongside"`. Alongside while streaming: trailing actions, stop, send. */
151
102
  stopMode?: ComposerStopMode;
152
103
  onSend?: () => void;
153
104
  onStop?: () => void;
@@ -155,16 +106,9 @@ export type ComposerShellProps = {
155
106
  trailingActions?: SlotNode<ComposerTrailingContext>;
156
107
  attachments?: React.ReactNode;
157
108
  className?: string;
158
- /** The input region: a textarea, a contenteditable, plus any ghost overlay. */
159
109
  children?: React.ReactNode;
160
110
  };
161
111
 
162
- /**
163
- * Outer chrome of the composer: border, field tokens, focus ring, attachments,
164
- * plus-menu and trailing slots, and send or stop. Put your input in `children`.
165
- * The focus ring follows any descendant with the `data-composer-input`
166
- * attribute that matches `:focus-visible`.
167
- */
168
112
  function ComposerShell({
169
113
  layout = "stacked",
170
114
  disabled = false,
@@ -273,11 +217,6 @@ export type ComposerGhostTextProps = {
273
217
  className?: string;
274
218
  };
275
219
 
276
- /**
277
- * Input-agnostic ghost overlay. It renders the draft invisibly, then the ghost
278
- * text, so the ghost lands after the last character. Position it absolutely
279
- * under (or over) your input and give it the same padding and font classes.
280
- */
281
220
  const ComposerGhostText = React.forwardRef<HTMLDivElement, ComposerGhostTextProps>(
282
221
  function ComposerGhostText({ value, ghostText, className }, ref) {
283
222
  return (
@@ -297,11 +236,6 @@ const ComposerGhostText = React.forwardRef<HTMLDivElement, ComposerGhostTextProp
297
236
  },
298
237
  );
299
238
 
300
- /**
301
- * Chat composer: autosizing textarea, plus-menu and action slots, send/stop
302
- * button and optional ghost-text predictions. The ref points at the textarea.
303
- */
304
- /** @deprecated Use `InputArea` from `@vvedantb/ui`. Kept unchanged for existing consumers. */
305
239
  const Composer = React.forwardRef<HTMLTextAreaElement, ComposerProps>(function Composer(
306
240
  {
307
241
  value: valueProp,
@@ -354,7 +288,6 @@ const Composer = React.forwardRef<HTMLTextAreaElement, ComposerProps>(function C
354
288
  [isControlled, onChange],
355
289
  );
356
290
 
357
- // Ghost text shows only while the caret sits at the end of the draft.
358
291
  const [caretAtEnd, setCaretAtEnd] = React.useState(true);
359
292
  const prediction = useComposerPrediction({
360
293
  value,
@@ -365,7 +298,6 @@ const Composer = React.forwardRef<HTMLTextAreaElement, ComposerProps>(function C
365
298
  });
366
299
  const ghost = prediction.ghost;
367
300
 
368
- // Autosize: grow with the content up to `maxHeight`, then scroll.
369
301
  React.useLayoutEffect(() => {
370
302
  const el = textareaRef.current;
371
303
  if (custom || !el) return;
@@ -396,7 +328,6 @@ const Composer = React.forwardRef<HTMLTextAreaElement, ComposerProps>(function C
396
328
  if (!isControlled) onChange?.("");
397
329
  prediction.clear();
398
330
  if (result && typeof result.then === "function") {
399
- // A failed async submit gives the draft back, unless the user already typed again.
400
331
  result.then(undefined, () => {
401
332
  if (!isControlled) setInner((current) => (current === "" ? draft : current));
402
333
  });
@@ -415,7 +346,6 @@ const Composer = React.forwardRef<HTMLTextAreaElement, ComposerProps>(function C
415
346
  if (native.isComposing || event.keyCode === 229) return;
416
347
 
417
348
  if (event.key === "Tab" && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
418
- // The caret gate applies to the default textarea only. A custom input owns it.
419
349
  const atEnd = custom || !(el instanceof HTMLTextAreaElement) || isCaretAtEnd(el);
420
350
  if (ghost && atEnd) {
421
351
  event.preventDefault();
@@ -14,7 +14,6 @@ interface ComposerSlashMenuProps {
14
14
  selectedIndex: number;
15
15
  onHoverIndex: (index: number) => void;
16
16
  onSelectItem: (item: ComposerSlashItem) => void;
17
- /** Wrap the row, for example in a hover card. Return `row` to keep the default. */
18
17
  renderItem?: (item: ComposerSlashItem, row: ReactNode) => ReactNode;
19
18
  }
20
19
 
@@ -2,10 +2,8 @@ import type { ReactNode } from "react";
2
2
  import { DropdownMenuItem } from "../../ui/dropdown-menu";
3
3
 
4
4
  export type ConnectionStatusMenuItemProps = {
5
- /** Brand mark with its own status dot. The app owns it. */
6
5
  icon: ReactNode;
7
6
  label: ReactNode;
8
- /** Shown under the label while `connected` is true. */
9
7
  description?: ReactNode;
10
8
  connected: boolean;
11
9
  onClick?: () => void;
@@ -6,10 +6,6 @@ export type FadePresenceProps = {
6
6
  show: boolean;
7
7
  children: ReactNode;
8
8
  className?: string;
9
- /**
10
- * Optional `hidden` / `show` / `exit` variants, for example `fadeUpSpring`.
11
- * Omitted, the content fades opacity only.
12
- */
13
9
  variants?: Variants;
14
10
  };
15
11
 
@@ -17,13 +17,8 @@ export type InputActionsProps = {
17
17
  showFileUpload?: boolean;
18
18
  onAttachFile?: () => void;
19
19
  compact?: boolean;
20
- /** Extra menu rows after the attach row, such as a skill picker and a connection item. Include your own separators. */
21
20
  extra?: ReactNode;
22
21
  attachLabel?: ReactNode;
23
- /**
24
- * Props merged onto the menu content. Defaults: `align="start"`, `side="top"`,
25
- * `collisionPadding={12}`. Your keys win. A `className` replaces the default size classes.
26
- */
27
22
  menuContentProps?: InputActionsMenuContentProps;
28
23
  };
29
24
 
@@ -33,9 +33,6 @@ import { useInputAreaPrediction } from "./useInputAreaPrediction";
33
33
 
34
34
  const EXPANDED_EDITOR =
35
35
  "min-h-16 max-h-50 w-full self-stretch overflow-y-auto rounded-none px-4 pt-3.5 pb-1 text-left";
36
- // Block, not flex: chips and text must share one inline flow, or a click lands
37
- // the caret inside a chip. The 36px box (py-2 + leading-5) centres the line, and
38
- // `align-top` keeps chips level with the text as the old flex row did.
39
36
  const COMPACT_EDITOR =
40
37
  "block min-h-9 max-h-9 min-w-0 w-auto overflow-hidden whitespace-pre! rounded-none px-1 py-2 text-left leading-5 [&>[data-composer-chips-inline]>*]:align-top";
41
38
  const COMPACT_START_ADDON =
@@ -53,77 +50,55 @@ export const DEFAULT_ATTACH_ACCEPT =
53
50
  "image/png,image/jpeg,image/jpg,image/webp,application/pdf";
54
51
 
55
52
  export type InputAreaSlashContext = {
56
- /** Opens the file picker, as the `attach` slash action does. */
57
53
  openFilePicker: () => void;
58
54
  };
59
55
 
60
56
  export type InputAreaProps = {
61
57
  value?: string;
62
58
  onChange?: (value: string) => void;
63
- /** Initial text when `value` is omitted (uncontrolled). */
64
59
  defaultValue?: string;
65
60
  placeholder?: string;
66
61
 
67
- /** Called with the trimmed text. The input clears first, through `onChange`. */
68
62
  onSubmit?: (text: string) => void;
69
63
  onStop?: () => void;
70
64
  isStreaming?: boolean;
71
65
  isSending?: boolean;
72
66
  isUploading?: boolean;
73
- /** When omitted: the draft has text, or `fileCount` or `chipCount` is above 0. */
74
67
  canSubmit?: boolean;
75
68
 
76
- /** Files force the stacked card. */
77
69
  fileCount?: number;
78
- /** Chips never force the stacked card. They only enable send and Backspace removal. */
79
70
  chipCount?: number;
80
71
 
81
72
  showDictate?: boolean;
82
73
  showFileUpload?: boolean;
83
- /** Replaces the built-in file picker click. */
84
74
  onAttachFile?: () => void;
85
- /** Receives files chosen in the picker or dropped on the input. */
86
75
  onFilesSelected?: (files: FileList) => void;
87
76
  attachAccept?: string;
88
- /** Receives dictated text. Default: append it to the draft. */
89
77
  onDictateTranscription?: (text: string) => void;
90
78
 
91
79
  banners?: ReactNode;
92
80
  promoBanner?: ReactNode;
93
81
  queue?: ReactNode;
94
- /** Attachment strip. Shown inside the input, above the text. */
95
82
  attachments?: ReactNode;
96
- /** Chip row. Shown inside the input, before the text (see `chipsPlacement`). */
97
83
  chips?: ReactNode;
98
- /** `inline` (default): chips are non-editable atoms at the start of the same text flow, so wrapped lines start under them. `top`: chips sit in a strip above the text. */
99
84
  chipsPlacement?: "inline" | "top";
100
- /** Extra rows in the plus menu after the attach row. Include your own separators. */
101
85
  plusMenuExtra?: ReactNode;
102
- /** Props merged onto the plus-menu dropdown content, such as `align`, `side` or `sideOffset`. Defaults: `align="start"`, `side="top"`. */
103
86
  plusMenuContentProps?: InputActionsProps["menuContentProps"];
104
87
 
105
- /** Items for the `/` menu. Omit to turn the menu off. */
106
88
  slashItems?: ComposerSlashItem[];
107
89
  onSlashSelect?: (item: ComposerSlashItem, context: InputAreaSlashContext) => void;
108
- /** Wrap a slash row, for example in a hover card. Return `row` for the default. */
109
90
  renderSlashItem?: (item: ComposerSlashItem, row: ReactNode) => ReactNode;
110
91
 
111
- /** Returns a continuation for the draft. Omit to turn ghost text off. */
112
92
  getPrediction?: (text: string) => Promise<string>;
113
93
  predictionEnabled?: boolean;
114
- /** Classes for the ghost suggestion. With `chipsPlacement="top"` they sit on the overlay span. Inline mode copies their colour and opacity to the `::after` ghost text. */
115
94
  predictionTextClassName?: string;
116
95
 
117
- /** Wrapper around banners, queue and the input. */
118
96
  className?: string;
119
- /** Extra classes on the input container. */
120
97
  containerClassName?: string;
121
- /** Border and ring classes for the input container. */
122
98
  borderClassName?: string;
123
99
  submitButtonClassName?: string;
124
100
  submitIconClassName?: string;
125
101
 
126
- /** Called on Backspace at the start of the text while `chipCount` is above 0. */
127
102
  onRemoveLastChip?: () => void;
128
103
  };
129
104
 
@@ -175,7 +150,6 @@ export function InputArea({
175
150
  onChange?.(next);
176
151
  };
177
152
  const inputRef = useRef<HTMLElement>(null);
178
- // Measure once after mount so a long `defaultValue` expands on first paint.
179
153
  const [, setMeasured] = useState(false);
180
154
  useEffect(() => setMeasured(true), []);
181
155
  const fileInputRef = useRef<HTMLInputElement>(null);
@@ -215,7 +189,7 @@ export function InputArea({
215
189
  "smooth-typing-input focus-visible:outline-hidden",
216
190
  compact
217
191
  ? COMPACT_EDITOR
218
- : // `py-0` clears InputGroupTextarea's default `py-3`.
192
+ :
219
193
  cn(EXPANDED_EDITOR, "py-0 pt-3.5 pb-1"),
220
194
  !inlineMode && "field-sizing-content",
221
195
  );
@@ -364,7 +338,6 @@ export function InputArea({
364
338
  "aria-activedescendant": slashMenu.comboboxProps["aria-activedescendant"],
365
339
  };
366
340
 
367
- /** Slash menu and ghost text keys. Returns true when handled. */
368
341
  const handleCommonKeyDown = (
369
342
  event: Parameters<typeof slashMenu.onKeyDown>[0],
370
343
  ): boolean => {
@@ -23,17 +23,10 @@ export const GHOST_COLOR_VAR = "--composer-ghost-color";
23
23
  export const INLINE_EDITOR_CLASS =
24
24
  "relative block w-full cursor-text whitespace-pre-wrap wrap-break-word bg-transparent outline-hidden data-empty:after:pointer-events-none data-empty:after:select-none data-empty:after:text-muted-foreground data-empty:after:content-[attr(data-placeholder)] data-suggestion:after:pointer-events-none data-suggestion:after:select-none data-suggestion:after:text-[color:var(--composer-ghost-color,var(--color-muted-foreground))] data-suggestion:after:content-[attr(data-suggestion)]";
25
25
 
26
- // `contents` so each chip is an inline atom in the editor's own flow (same as
27
- // session-composer chip spans). A wrapping flex host becomes one box and puts
28
- // the text in a column beside it.
29
26
  const CHIPS_HOST_CLASS = "contents empty:hidden [&>*]:mr-1.5";
30
27
 
31
28
  const ZERO_WIDTH_SPACE = "\u200b";
32
29
 
33
- /**
34
- * A value of "\n" is an empty draft: Shift+Enter on an empty editor, or a
35
- * stray line holder that apps stored before 0.5.4. Mirrors `isComposerCompact`.
36
- */
37
30
  function isEmptyDraft(value: string): boolean {
38
31
  return value === "" || value === "\n";
39
32
  }
@@ -52,7 +45,6 @@ export function extractEditorText(root: HTMLElement): string {
52
45
  if (child instanceof HTMLElement) {
53
46
  if (child.hasAttribute(CHIPS_HOST_ATTR)) return;
54
47
  if (child.tagName === "BR") {
55
- // A trailing <br> only holds the line open.
56
48
  if (isRoot && index === node.childNodes.length - 1) {
57
49
  heldByBr = true;
58
50
  return;
@@ -77,22 +69,16 @@ export function extractEditorText(root: HTMLElement): string {
77
69
  return !heldByBr && out.endsWith("\n") ? out.slice(0, -1) : out;
78
70
  }
79
71
 
80
- /** The DOM text for a value: a trailing "\n" gets its line holder. */
81
72
  function editorTextFor(value: string): string {
82
73
  return value.endsWith("\n") ? `${value}\n` : value;
83
74
  }
84
75
 
85
- /** Every editor node except the chips host: the anchor, text and line breaks. */
86
76
  function textNodes(root: HTMLElement): ChildNode[] {
87
77
  return Array.from(root.childNodes).filter(
88
78
  (child) => !(child instanceof HTMLElement && child.hasAttribute(CHIPS_HOST_ATTR)),
89
79
  );
90
80
  }
91
81
 
92
- /**
93
- * True when the DOM shows `shown`. An empty draft must be the bare U+200B
94
- * anchor: a stray "\n" or `<br>` reads as "" but pushes the placeholder down.
95
- */
96
82
  function editorShows(root: HTMLElement, shown: string): boolean {
97
83
  if (shown !== "") return extractEditorText(root) === shown;
98
84
  const [only, ...rest] = textNodes(root);
@@ -106,11 +92,6 @@ function chipsHost(root: HTMLElement): HTMLElement | null {
106
92
  return null;
107
93
  }
108
94
 
109
- /**
110
- * Returns the text node right after the chips host, creating it if missing.
111
- * It starts with U+200B, so the caret always has an editable position after
112
- * the chips, even with an empty draft. `extractEditorText` strips U+200B.
113
- */
114
95
  function ensureCaretAnchor(root: HTMLElement): Text {
115
96
  const existing = findCaretAnchor(root);
116
97
  if (existing) return existing;
@@ -135,10 +116,6 @@ function setSelection(
135
116
  window.getSelection()?.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
136
117
  }
137
118
 
138
- /**
139
- * End of the text: the last text node before its trailing line holder, or the
140
- * end of the editor after a line break.
141
- */
142
119
  function textEnd(root: HTMLElement): [Node, number] {
143
120
  ensureCaretAnchor(root);
144
121
  const last = root.lastChild;
@@ -166,7 +143,6 @@ export function normaliseSelection(root: HTMLElement) {
166
143
  const anchor = ensureCaretAnchor(root);
167
144
  const first = document.createRange();
168
145
  first.setStart(anchor, 1);
169
- // The host comes first, so only the start can be before the text unless both are.
170
146
  if (first.comparePoint(startContainer, startOffset) >= 0) return;
171
147
  const endBefore = first.comparePoint(endContainer, endOffset) < 0;
172
148
  const [end, endAt]: [Node, number] = endBefore ? [anchor, 1] : [endContainer, endOffset];
@@ -178,7 +154,6 @@ export function normaliseSelection(root: HTMLElement) {
178
154
  else setSelection(anchor, 1, end, endAt);
179
155
  }
180
156
 
181
- /** Selects the text only, never the chips host. */
182
157
  function selectText(root: HTMLElement) {
183
158
  const anchor = ensureCaretAnchor(root);
184
159
  const [node, offset] = textEnd(root);
@@ -192,7 +167,6 @@ function selectText(root: HTMLElement) {
192
167
  export function readInlineChipsWidth(root: HTMLElement): number {
193
168
  const anchor = findCaretAnchor(root);
194
169
  if (!anchor || !chipsHost(root)?.childElementCount) return 0;
195
- // A text offset, not an element boundary: Chromium gives no rect for the latter.
196
170
  const textStart = document.createRange();
197
171
  textStart.setStart(anchor, 0);
198
172
  const style = getComputedStyle(root);
@@ -203,7 +177,6 @@ export function readInlineChipsWidth(root: HTMLElement): number {
203
177
  return Math.max(0, textStart.getBoundingClientRect().left - contentLeft);
204
178
  }
205
179
 
206
- /** True when nothing but the chips host sits before the caret. */
207
180
  function caretAtTextStart(root: HTMLElement): boolean {
208
181
  const sel = window.getSelection();
209
182
  if (!sel || sel.rangeCount === 0 || !sel.isCollapsed) return false;
@@ -222,7 +195,6 @@ function caretAtTextStart(root: HTMLElement): boolean {
222
195
  );
223
196
  }
224
197
 
225
- /** Clicks on chip controls, such as remove buttons, keep their own behaviour. */
226
198
  function isChipControl(target: EventTarget | null): boolean {
227
199
  if (!(target instanceof Element)) return false;
228
200
  const control = target.closest("button, a, input, [role=button]");
@@ -250,16 +222,13 @@ export type InputAreaEditorProps = {
250
222
  onValueChange: (value: string) => void;
251
223
  placeholder?: string;
252
224
  suggestion?: string;
253
- /** Classes for the ghost text. Its colour and opacity are copied to the `::after`. */
254
225
  suggestionClassName?: string;
255
226
  chips?: ReactNode;
256
227
  chipCount?: number;
257
228
  onRemoveLastChip?: () => void;
258
229
  className?: string;
259
- /** Runs first. Call `preventDefault` to stop the built-in Enter and Backspace handling. */
260
230
  onKeyDown?: (event: KeyboardEvent<HTMLDivElement>) => void;
261
231
  onBlur?: FocusEventHandler<HTMLDivElement>;
262
- /** ARIA props, such as the slash menu combobox props. */
263
232
  ariaProps?: Record<string, unknown>;
264
233
  };
265
234
 
@@ -299,8 +268,6 @@ export function InputAreaEditor({
299
268
  if (!composingRef.current) normaliseSelection(root);
300
269
  };
301
270
 
302
- // Native listeners: React has no `selectionchange`, and its `onBeforeInput`
303
- // does not see deletions.
304
271
  const setRefs = (node: HTMLDivElement) => {
305
272
  assignEditorRef(node);
306
273
  const keepSelectionOutsideChips = () => {
@@ -327,8 +294,6 @@ export function InputAreaEditor({
327
294
  ensureCaretAnchor(root);
328
295
  });
329
296
 
330
- // Copy the probe colour to the editor. Opacity below 1 is folded into the
331
- // colour, so the `::after` needs one variable.
332
297
  useLayoutEffect(() => {
333
298
  const root = rootRef.current;
334
299
  if (!root) return;
@@ -362,7 +327,6 @@ export function InputAreaEditor({
362
327
  selectText(root);
363
328
  return;
364
329
  }
365
- // Before the default action, so a selection never spans the chips host.
366
330
  normaliseSelection(root);
367
331
  if (event.key === "Enter") {
368
332
  if (event.shiftKey) return;
@@ -375,7 +339,6 @@ export function InputAreaEditor({
375
339
  form?.requestSubmit();
376
340
  return;
377
341
  }
378
- // Nothing visible to delete. The default would eat the U+200B anchor.
379
342
  if (event.key === "Backspace" && caretAtTextStart(root)) {
380
343
  event.preventDefault();
381
344
  if (chipCount > 0) onRemoveLastChip?.();
@@ -435,8 +398,6 @@ export function InputAreaEditor({
435
398
  </span>
436
399
  </div>
437
400
  {suggestion && suggestionClassName ? (
438
- // Outside the editor, so reconciliation and the text value never see it.
439
- // Zero-size, not `display: none`, so the computed colour is real.
440
401
  <span
441
402
  aria-hidden
442
403
  data-composer-ghost-probe=""
@@ -19,7 +19,6 @@ export const defaultInputBannerStyles: InputBannerStyles = {
19
19
 
20
20
  export type InputBannersProps = {
21
21
  features: BannerFeatures;
22
- /** Class strings for the privacy banner. The app passes its own for an exact match. */
23
22
  styles?: InputBannerStyles;
24
23
  privacyTitle?: ReactNode;
25
24
  privacyDetail?: ReactNode;
@@ -7,7 +7,6 @@ export type PromoBannerProps = {
7
7
  show: boolean;
8
8
  onUpgrade?: () => void;
9
9
  onDismiss?: () => void;
10
- /** Banner text. */
11
10
  children?: ReactNode;
12
11
  actionLabel?: ReactNode;
13
12
  icon?: ReactNode;
@@ -1,7 +1,5 @@
1
- /** Trailing-edge debounce: how long the user must pause before asking the model. */
2
1
  const PREDICTION_IDLE_MS = 500;
3
2
 
4
- /** Below this, there is not enough text to continue usefully. */
5
3
  const PREDICTION_MIN_CHARS = 12;
6
4
 
7
5
  /**
@@ -32,7 +32,6 @@ export function useComposerSlashMenu({
32
32
  items: ComposerSlashItem[];
33
33
  textareaRef: RefObject<HTMLElement | null>;
34
34
  onSelect: (item: ComposerSlashItem) => void;
35
- /** When false the menu never opens. */
36
35
  enabled?: boolean;
37
36
  }) {
38
37
  const listboxId = useId();
@@ -31,7 +31,6 @@ export function useInputAreaPrediction({
31
31
  shouldSkipPrediction(value);
32
32
  const settled = result?.forValue === value || dismissedFor === value;
33
33
 
34
- // Debounced request: it has to react to the draft changing.
35
34
  useEffect(() => {
36
35
  if (idle || settled || getPrediction === undefined) return;
37
36
  return scheduleCompletion(
@@ -33,20 +33,14 @@ export function joinComposerPrediction(draft: string, prediction: string): strin
33
33
 
34
34
  /** What `getPrediction` last returned, and the draft it was requested for. */
35
35
  export type ComposerPredictionState = {
36
- /** Draft the stored `text` answers, or `null` when there is none. */
37
36
  forValue: string | null;
38
- /** Raw text from `getPrediction` (no joining space). */
39
37
  text: string;
40
- /** Draft for which the user pressed Esc. Suppresses requests until the draft changes. */
41
38
  dismissedFor: string | null;
42
39
  };
43
40
 
44
41
  export type ComposerPredictionAction =
45
- /** A request finished. `current` is the draft at the time it finished. */
46
42
  | { type: "result"; forValue: string; text: string; current: string }
47
- /** Esc: hide the prediction for this draft. */
48
43
  | { type: "dismiss"; value: string }
49
- /** Tab accepted the prediction, or the caller reset it. */
50
44
  | { type: "clear" };
51
45
 
52
46
  export const initialComposerPredictionState: ComposerPredictionState = {
@@ -11,7 +11,6 @@ import {
11
11
 
12
12
  export type UseComposerPredictionOptions = {
13
13
  value: string;
14
- /** Off when there is no `getPrediction`, the composer is busy, or the caret is not at the end. */
15
14
  enabled: boolean;
16
15
  getPrediction?: (draft: string, opts: { signal: AbortSignal }) => Promise<string>;
17
16
  debounceMs?: number;
@@ -19,7 +18,6 @@ export type UseComposerPredictionOptions = {
19
18
  };
20
19
 
21
20
  export type ComposerPrediction = {
22
- /** Ghost text to render after the draft, including any joining space. `""` when none. */
23
21
  ghost: string;
24
22
  dismiss: () => void;
25
23
  clear: () => void;
@@ -7,15 +7,8 @@ import { Surface } from "../ui/surface";
7
7
  import { GenerativeUiRenderer } from "./renderer";
8
8
 
9
9
  export interface GenerativeUiPanelProps {
10
- /** The stored json-render spec, still serialised. */
11
10
  spec: string;
12
- /**
13
- * Sends a button's text back to the agent. Undefined when the app cannot
14
- * send now (an archived chat, a sleeping sandbox): the buttons are then
15
- * disabled, not silently inert.
16
- */
17
11
  onReply?: (message: string) => void;
18
- /** Opens a button's link. Only http(s) URLs reach it. Default: a new browser tab. */
19
12
  onOpenUrl?: (url: string) => void;
20
13
  "data-testid"?: string;
21
14
  }
@@ -46,8 +39,6 @@ export function GenerativeUiPanel({
46
39
  }
47
40
  if (actionName === "open_url") {
48
41
  const url = params?.url;
49
- // The composer already rejects other schemes, but a stored spec is data,
50
- // and `window.open("javascript:…")` would run it: check again here.
51
42
  if (typeof url === "string" && isHttpUrl(url)) onOpenUrl(url);
52
43
  }
53
44
  };
@@ -55,8 +46,6 @@ export function GenerativeUiPanel({
55
46
  return (
56
47
  <m.div initial={{ opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} transition={tokenTransition.fast}>
57
48
  <Surface density="tight" className="min-w-0 max-w-full" data-testid={testId}>
58
- {/* `display: contents` keeps the fieldset out of the layout, while its
59
- disabled state still reaches every button inside the spec. */}
60
49
  <fieldset className="contents" disabled={onReply === undefined}>
61
50
  <GenerativeUiRenderer spec={parsed} onAction={handleAction} />
62
51
  </fieldset>
@@ -9,8 +9,6 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from ".
9
9
  import { cn } from "../utils/cn";
10
10
  import { BADGE_VARIANT, TONE_SURFACE, TONE_TEXT } from "./toneStyles";
11
11
 
12
- /** The leaves of a composed panel: everything that shows the agent's content. */
13
-
14
12
  const TEXT_VARIANT = {
15
13
  body: "text-sm text-foreground",
16
14
  lead: "text-sm font-medium text-foreground",
@@ -1,5 +1,2 @@
1
- // Generative UI on the web: agent-composed panels from the shared catalog
2
- // (`@vvedantb/server/generative-ui`). Needs `@json-render/core` and
3
- // `@json-render/react`; a separate subpath, so the root export does not.
4
1
  export { GenerativeUiPanel, type GenerativeUiPanelProps } from "./GenerativeUiPanel";
5
2
  export { GenerativeUiRenderer, generativeUiCatalog } from "./renderer";
@@ -4,11 +4,6 @@ import { Separator } from "../ui/separator";
4
4
  import { Surface } from "../ui/surface";
5
5
  import { cn } from "../utils/cn";
6
6
 
7
- /**
8
- * The containers a composed panel is built from. Tailwind needs literal class
9
- * names, so every prop value maps through a lookup, never string interpolation.
10
- */
11
-
12
7
  const GAP = { sm: "gap-2", md: "gap-3", lg: "gap-4" };
13
8
  const ALIGN = { start: "items-start", center: "items-center", stretch: "items-stretch" };
14
9
 
@@ -3,7 +3,6 @@ import { useEffect, useRef, useState } from "react";
3
3
  import { useDisablePageMotion } from "../../app/src/page-motion/PageMotionProvider";
4
4
  import { motionEase, tokenTransition } from "../motion/presets";
5
5
 
6
- /** Suffixes we will count; compound durations like "1h 12m" stay static. */
7
6
  const COUNTABLE_SUFFIX = /^(?:%|h|k|m|s|ms)?$/i;
8
7
 
9
8
  /**