@vvedantb/ui 0.67.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 (417) 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/SidebarChrome.js +0 -19
  35. package/dist/shell/src/SidebarIconTooltip.js +0 -1
  36. package/dist/shell/src/SidebarRail.js +0 -12
  37. package/dist/shell/src/SidebarResize.js +1 -4
  38. package/dist/shell/src/app-shell-classes.js +0 -10
  39. package/dist/shell/src/index.js +0 -1
  40. package/dist/shell/src/shell-panel-motion.js +0 -12
  41. package/dist/src/ai-elements/activity-shared.js +0 -6
  42. package/dist/src/ai-elements/activity-step-label.js +0 -6
  43. package/dist/src/ai-elements/activity-step-types.js +0 -4
  44. package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
  45. package/dist/src/ai-elements/activity-tasks.js +0 -55
  46. package/dist/src/ai-elements/artifact.js +0 -4
  47. package/dist/src/ai-elements/attachments.js +0 -41
  48. package/dist/src/ai-elements/code-block.js +0 -18
  49. package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
  50. package/dist/src/ai-elements/context.js +0 -13
  51. package/dist/src/ai-elements/conversation.js +0 -4
  52. package/dist/src/ai-elements/jump-rail.js +0 -5
  53. package/dist/src/ai-elements/message.js +0 -7
  54. package/dist/src/ai-elements/model-picker-types.js +0 -1
  55. package/dist/src/ai-elements/model-picker.js +1 -6
  56. package/dist/src/ai-elements/model-selector.js +0 -4
  57. package/dist/src/ai-elements/prompt-input-speech.js +0 -13
  58. package/dist/src/ai-elements/prompt-input.js +0 -1
  59. package/dist/src/ai-elements/provider-icon.js +0 -4
  60. package/dist/src/ai-elements/queue.js +0 -15
  61. package/dist/src/ai-elements/shimmer.js +0 -14
  62. package/dist/src/ai-elements/speech-input.js +0 -7
  63. package/dist/src/artifacts/artifact-frame.js +0 -2
  64. package/dist/src/audio/playChime.js +0 -2
  65. package/dist/src/audio/playTone.js +1 -4
  66. package/dist/src/brand/AppWordmark.js +0 -5
  67. package/dist/src/brand/svg.js +0 -6
  68. package/dist/src/client.js +0 -43
  69. package/dist/src/composer/Composer.js +0 -27
  70. package/dist/src/composer/input-area/InputArea.js +0 -3
  71. package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
  72. package/dist/src/composer/input-area/composerPrediction.js +0 -3
  73. package/dist/src/generative-ui/content.js +0 -2
  74. package/dist/src/generative-ui/index.js +0 -3
  75. package/dist/src/generative-ui/layout.js +0 -5
  76. package/dist/src/hooks/use-count-up-display.js +0 -2
  77. package/dist/src/hooks/use-idle-callback.js +0 -3
  78. package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
  79. package/dist/src/icons/animated/index.js +0 -4
  80. package/dist/src/icons/board-icon.js +74 -41
  81. package/dist/src/icons/bolt-icon.js +30 -20
  82. package/dist/src/icons/building-icon.js +125 -61
  83. package/dist/src/icons/files-icon.js +103 -43
  84. package/dist/src/icons/inbox-icon.js +101 -49
  85. package/dist/src/icons/index.js +2 -1
  86. package/dist/src/icons/memory-icon.js +135 -58
  87. package/dist/src/icons/search-icon.js +143 -46
  88. package/dist/src/icons/settings-icon.js +113 -53
  89. package/dist/src/icons/solid-icons.js +665 -0
  90. package/dist/src/icons/with-active.js +25 -0
  91. package/dist/src/index.js +0 -40
  92. package/dist/src/kibo/gantt-features.js +0 -10
  93. package/dist/src/kibo/gantt-provider.js +0 -34
  94. package/dist/src/kibo/kanban.js +0 -15
  95. package/dist/src/kibo/list.js +0 -3
  96. package/dist/src/kibo/video-player.js +0 -7
  97. package/dist/src/logos/index.js +0 -4
  98. package/dist/src/markdown/Markdown.js +0 -15
  99. package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
  100. package/dist/src/markdown/MarkdownInlineCode.js +0 -6
  101. package/dist/src/markdown/MarkdownLink.js +0 -5
  102. package/dist/src/markdown/codeFence.js +0 -1
  103. package/dist/src/markdown/codeHighlight.js +0 -19
  104. package/dist/src/markdown/incrementalBlocks.js +0 -45
  105. package/dist/src/markdown/markdownClipboard.js +0 -13
  106. package/dist/src/markdown/mermaid.js +0 -25
  107. package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
  108. package/dist/src/markdown/useSmoothText.js +0 -5
  109. package/dist/src/marketing/PricingModal.js +0 -2
  110. package/dist/src/marketing/ProductHero.js +0 -2
  111. package/dist/src/marketing/createLandingKit.js +0 -5
  112. package/dist/src/marketing/marketing-classes.js +0 -7
  113. package/dist/src/motion/dock-motion.js +0 -27
  114. package/dist/src/motion/panel-transition.js +0 -2
  115. package/dist/src/ui/_field-classes.js +0 -3
  116. package/dist/src/ui/_menu-classes.js +0 -6
  117. package/dist/src/ui/_picker-classes.js +0 -9
  118. package/dist/src/ui/accordion.alt.js +0 -12
  119. package/dist/src/ui/badge.js +0 -1
  120. package/dist/src/ui/border-beam.js +0 -2
  121. package/dist/src/ui/breadcrumb.js +0 -15
  122. package/dist/src/ui/bulk-action-bar.js +0 -11
  123. package/dist/src/ui/button.js +0 -20
  124. package/dist/src/ui/calendar.js +1 -20
  125. package/dist/src/ui/card.js +0 -3
  126. package/dist/src/ui/carousel.js +0 -1
  127. package/dist/src/ui/clear-input.alt.js +0 -9
  128. package/dist/src/ui/clearInputDissolve.js +0 -4
  129. package/dist/src/ui/command.js +0 -15
  130. package/dist/src/ui/confetti-burst.js +0 -3
  131. package/dist/src/ui/confirm-dialog-parts.js +0 -11
  132. package/dist/src/ui/confirm-dialog.js +0 -6
  133. package/dist/src/ui/crossfade-icon.js +0 -2
  134. package/dist/src/ui/date-picker.js +0 -22
  135. package/dist/src/ui/dialog.js +0 -5
  136. package/dist/src/ui/empty-state.js +0 -7
  137. package/dist/src/ui/field.js +0 -21
  138. package/dist/src/ui/image-lightbox.js +0 -5
  139. package/dist/src/ui/input-group.alt.js +0 -24
  140. package/dist/src/ui/input-group.js +0 -4
  141. package/dist/src/ui/kbd.js +0 -3
  142. package/dist/src/ui/loading-state.js +0 -17
  143. package/dist/src/ui/marquee-on-hover.js +0 -3
  144. package/dist/src/ui/media-preview.js +0 -2
  145. package/dist/src/ui/modalTransition.js +0 -33
  146. package/dist/src/ui/overlay-a11y.js +0 -1
  147. package/dist/src/ui/page-title.js +0 -3
  148. package/dist/src/ui/refresh-spin-icon.js +0 -12
  149. package/dist/src/ui/search-input.js +0 -1
  150. package/dist/src/ui/select-field.js +0 -1
  151. package/dist/src/ui/send-queue-icon.js +0 -3
  152. package/dist/src/ui/sheet.js +0 -33
  153. package/dist/src/ui/slider.js +103 -82
  154. package/dist/src/ui/sonner-icons.js +0 -5
  155. package/dist/src/ui/sonner.js +0 -60
  156. package/dist/src/ui/spinner.js +0 -35
  157. package/dist/src/ui/status-dot.js +0 -2
  158. package/dist/src/ui/surface.js +0 -14
  159. package/dist/src/ui/switch.js +213 -36
  160. package/dist/src/ui/table.js +0 -1
  161. package/dist/src/ui/tabs-transition.js +0 -1
  162. package/dist/src/ui/tabs.js +0 -17
  163. package/dist/src/ui/tabsSliding.js +0 -6
  164. package/dist/src/ui/time-picker.js +0 -15
  165. package/dist/src/ui/toggle-search.js +0 -3
  166. package/dist/src/ui/ui-config.js +0 -16
  167. package/dist/src/utils/cat-color.js +0 -17
  168. package/dist/src/utils/cn.js +0 -5
  169. package/dist/src/utils/gesture.js +0 -8
  170. package/dist/src/utils/ref.js +0 -1
  171. package/dist/src/utils/runtimeVisibility.js +1 -22
  172. package/dist/src/utils/surface-radius.js +0 -11
  173. package/dist/src/utils/useDragSensors.js +0 -4
  174. package/dist/tokens/src/tailwind-preset.mjs +0 -3
  175. package/package.json +1 -1
  176. package/scripts/build-brand-assets.mjs +0 -8
  177. package/shell/src/AppShell.tsx +0 -37
  178. package/shell/src/AppSidebar.tsx +0 -14
  179. package/shell/src/ButtonTrack.tsx +0 -1
  180. package/shell/src/PageHeaderBar.tsx +0 -61
  181. package/shell/src/PageWrapper.tsx +0 -26
  182. package/shell/src/PillTabs.tsx +0 -1
  183. package/shell/src/SessionsHoverCard.tsx +0 -40
  184. package/shell/src/SidePanelTabs.tsx +0 -61
  185. package/shell/src/Sidebar.tsx +0 -1
  186. package/shell/src/SidebarAccountMenu.tsx +0 -40
  187. package/shell/src/SidebarChrome.tsx +0 -32
  188. package/shell/src/SidebarIconTooltip.tsx +0 -3
  189. package/shell/src/SidebarPanel.tsx +0 -20
  190. package/shell/src/SidebarRail.tsx +0 -44
  191. package/shell/src/SidebarResize.tsx +0 -6
  192. package/shell/src/SidebarUpgradeCard.tsx +0 -2
  193. package/shell/src/SignOutDialog.tsx +0 -6
  194. package/shell/src/app-shell-classes.ts +0 -15
  195. package/shell/src/index.ts +0 -1
  196. package/shell/src/shell-panel-motion.ts +0 -11
  197. package/shell/src/shell-variant.ts +0 -6
  198. package/src/ai-elements/activity-question.tsx +0 -2
  199. package/src/ai-elements/activity-shared.tsx +0 -11
  200. package/src/ai-elements/activity-step-detail.tsx +0 -2
  201. package/src/ai-elements/activity-step-label.ts +0 -5
  202. package/src/ai-elements/activity-step-types.ts +0 -24
  203. package/src/ai-elements/activity-tasks-utils.ts +0 -13
  204. package/src/ai-elements/activity-tasks.tsx +0 -61
  205. package/src/ai-elements/artifact.tsx +0 -7
  206. package/src/ai-elements/attachments.tsx +0 -33
  207. package/src/ai-elements/chat-day-divider.tsx +0 -3
  208. package/src/ai-elements/chat-jump-rail.tsx +0 -9
  209. package/src/ai-elements/code-block.tsx +0 -28
  210. package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
  211. package/src/ai-elements/context.tsx +0 -10
  212. package/src/ai-elements/conversation.tsx +0 -16
  213. package/src/ai-elements/jump-rail.tsx +0 -31
  214. package/src/ai-elements/message.tsx +0 -32
  215. package/src/ai-elements/model-picker-content.tsx +0 -17
  216. package/src/ai-elements/model-picker-types.ts +0 -5
  217. package/src/ai-elements/model-picker.tsx +0 -36
  218. package/src/ai-elements/model-selector.tsx +0 -5
  219. package/src/ai-elements/prompt-input-speech.tsx +0 -11
  220. package/src/ai-elements/prompt-input.tsx +0 -26
  221. package/src/ai-elements/provider-icon.tsx +0 -2
  222. package/src/ai-elements/queue.tsx +0 -19
  223. package/src/ai-elements/reasoning.tsx +0 -4
  224. package/src/ai-elements/shimmer.tsx +0 -16
  225. package/src/ai-elements/simple-model-ladder.tsx +0 -1
  226. package/src/ai-elements/speech-input.tsx +0 -6
  227. package/src/ai-elements/test-results.tsx +0 -5
  228. package/src/ai-elements/trace.tsx +0 -2
  229. package/src/ai-elements/web-preview.tsx +0 -7
  230. package/src/artifacts/artifact-card.tsx +0 -7
  231. package/src/artifacts/artifact-dialogs.tsx +0 -4
  232. package/src/artifacts/artifact-frame.tsx +0 -10
  233. package/src/artifacts/artifact-list-toolbar.tsx +0 -6
  234. package/src/artifacts/artifact-list.tsx +0 -4
  235. package/src/artifacts/artifact-type-icon.tsx +0 -1
  236. package/src/artifacts/artifact-versions-menu.tsx +0 -3
  237. package/src/artifacts/artifact-viewer.tsx +0 -5
  238. package/src/artifacts/types.ts +0 -1
  239. package/src/audio/playChime.ts +0 -1
  240. package/src/audio/playTone.ts +0 -7
  241. package/src/brand/AppIcons.tsx +0 -5
  242. package/src/brand/AppMark.tsx +0 -6
  243. package/src/brand/AppWordmark.tsx +0 -10
  244. package/src/brand/familyApps.ts +0 -2
  245. package/src/brand/svg.ts +0 -9
  246. package/src/client.ts +0 -34
  247. package/src/composer/Composer.tsx +0 -70
  248. package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
  249. package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
  250. package/src/composer/input-area/FadePresence.tsx +0 -4
  251. package/src/composer/input-area/InputActions.tsx +0 -5
  252. package/src/composer/input-area/InputArea.tsx +1 -28
  253. package/src/composer/input-area/InputAreaEditor.tsx +0 -39
  254. package/src/composer/input-area/InputBanners.tsx +0 -1
  255. package/src/composer/input-area/PromoBanner.tsx +0 -1
  256. package/src/composer/input-area/composerPrediction.ts +0 -2
  257. package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
  258. package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
  259. package/src/composer/prediction.ts +0 -6
  260. package/src/composer/useComposerPrediction.ts +0 -2
  261. package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
  262. package/src/generative-ui/content.tsx +0 -2
  263. package/src/generative-ui/index.ts +0 -3
  264. package/src/generative-ui/layout.tsx +0 -5
  265. package/src/hooks/use-count-up-display.ts +0 -1
  266. package/src/hooks/use-idle-callback.ts +0 -5
  267. package/src/hooks/use-persisted-scroll-parent.ts +0 -4
  268. package/src/hooks/use-single-flight.ts +0 -5
  269. package/src/icons/animated/animated-bell-icon.tsx +0 -6
  270. package/src/icons/animated/animated-counter.tsx +0 -5
  271. package/src/icons/animated/animated-key-icon.tsx +0 -4
  272. package/src/icons/animated/animated-notification-icon.tsx +0 -14
  273. package/src/icons/animated/animated-progress.tsx +0 -10
  274. package/src/icons/animated/animated-status-dot.tsx +0 -4
  275. package/src/icons/animated/index.ts +0 -4
  276. package/src/icons/animated/morphing-menu-icon.tsx +0 -5
  277. package/src/icons/animated/morphing-mic-icon.tsx +0 -2
  278. package/src/icons/animated/pulsing-rings.tsx +0 -4
  279. package/src/icons/automation-icon.tsx +0 -1
  280. package/src/icons/board-icon.tsx +13 -10
  281. package/src/icons/bolt-icon.tsx +5 -4
  282. package/src/icons/building-icon.tsx +11 -9
  283. package/src/icons/draft-icon.tsx +0 -1
  284. package/src/icons/files-icon.tsx +9 -5
  285. package/src/icons/inbox-arrow-icon.tsx +0 -1
  286. package/src/icons/inbox-icon.tsx +9 -5
  287. package/src/icons/index.ts +12 -1
  288. package/src/icons/memory-icon.tsx +9 -11
  289. package/src/icons/nav-icon-base.tsx +0 -10
  290. package/src/icons/search-icon.tsx +7 -6
  291. package/src/icons/settings-icon.tsx +11 -13
  292. package/src/icons/sidebar-toggle-icon.tsx +0 -1
  293. package/src/icons/solid-icons.tsx +138 -0
  294. package/src/icons/with-active.tsx +14 -0
  295. package/src/index.ts +0 -30
  296. package/src/kibo/gantt-features.tsx +0 -16
  297. package/src/kibo/gantt-header.tsx +0 -4
  298. package/src/kibo/gantt-provider.tsx +0 -36
  299. package/src/kibo/gantt-sidebar.tsx +0 -7
  300. package/src/kibo/gantt-timeline.tsx +0 -4
  301. package/src/kibo/kanban.tsx +0 -49
  302. package/src/kibo/list.tsx +0 -8
  303. package/src/kibo/theme-switcher.tsx +0 -5
  304. package/src/kibo/video-player.tsx +0 -9
  305. package/src/logos/index.ts +0 -3
  306. package/src/logos/logo-svg.tsx +0 -5
  307. package/src/markdown/Markdown.tsx +0 -20
  308. package/src/markdown/MarkdownCodeBlock.tsx +0 -14
  309. package/src/markdown/MarkdownInlineCode.tsx +0 -6
  310. package/src/markdown/MarkdownLink.tsx +0 -4
  311. package/src/markdown/codeFence.ts +0 -3
  312. package/src/markdown/codeHighlight.ts +0 -16
  313. package/src/markdown/incrementalBlocks.ts +0 -49
  314. package/src/markdown/markdownClipboard.ts +0 -12
  315. package/src/markdown/mermaid.ts +0 -22
  316. package/src/markdown/rehypeGithubAlerts.ts +0 -3
  317. package/src/markdown/useSmoothText.ts +0 -5
  318. package/src/marketing/FloatingBar.tsx +0 -3
  319. package/src/marketing/PricingModal.tsx +0 -45
  320. package/src/marketing/ProductHero.tsx +0 -23
  321. package/src/marketing/ProductHeroOrbit.tsx +0 -5
  322. package/src/marketing/SiteFooter.tsx +0 -23
  323. package/src/marketing/SiteHeader.tsx +0 -14
  324. package/src/marketing/VProPricingModal.tsx +0 -5
  325. package/src/marketing/createLandingKit.tsx +0 -12
  326. package/src/marketing/landing.tsx +0 -12
  327. package/src/marketing/marketing-classes.ts +0 -7
  328. package/src/motion/dock-motion.ts +0 -25
  329. package/src/motion/list-enter.tsx +0 -4
  330. package/src/motion/panel-transition.tsx +0 -5
  331. package/src/ui/_field-classes.ts +0 -2
  332. package/src/ui/_menu-classes.ts +0 -4
  333. package/src/ui/_menu-parts.tsx +0 -5
  334. package/src/ui/_picker-classes.ts +0 -6
  335. package/src/ui/accordion.alt.tsx +0 -8
  336. package/src/ui/accordion.tsx +0 -4
  337. package/src/ui/badge.tsx +0 -1
  338. package/src/ui/border-beam.tsx +0 -11
  339. package/src/ui/breadcrumb.tsx +0 -13
  340. package/src/ui/bulk-action-bar.tsx +0 -24
  341. package/src/ui/button.tsx +0 -27
  342. package/src/ui/calendar.tsx +0 -18
  343. package/src/ui/card.tsx +0 -3
  344. package/src/ui/carousel.tsx +0 -4
  345. package/src/ui/checkbox.tsx +0 -1
  346. package/src/ui/clear-input.alt.tsx +0 -8
  347. package/src/ui/clear-input.tsx +0 -16
  348. package/src/ui/clearInputDissolve.ts +0 -4
  349. package/src/ui/command.tsx +0 -22
  350. package/src/ui/confetti-burst.tsx +0 -4
  351. package/src/ui/confirm-dialog-parts.tsx +0 -45
  352. package/src/ui/confirm-dialog.tsx +0 -26
  353. package/src/ui/context-menu.tsx +0 -10
  354. package/src/ui/count-pop.tsx +0 -2
  355. package/src/ui/crossfade-icon.tsx +0 -3
  356. package/src/ui/date-picker.tsx +0 -40
  357. package/src/ui/dialog.tsx +0 -18
  358. package/src/ui/dropdown-menu.tsx +0 -11
  359. package/src/ui/empty-state.tsx +0 -15
  360. package/src/ui/error-boundary.tsx +0 -7
  361. package/src/ui/field.tsx +0 -18
  362. package/src/ui/hover-card.tsx +0 -6
  363. package/src/ui/image-lightbox.tsx +0 -7
  364. package/src/ui/input-group.alt.tsx +0 -16
  365. package/src/ui/input-group.tsx +0 -3
  366. package/src/ui/kbd.tsx +0 -3
  367. package/src/ui/label.tsx +0 -1
  368. package/src/ui/labeled-slider-row.tsx +0 -2
  369. package/src/ui/list-row.tsx +0 -46
  370. package/src/ui/loading-state.tsx +0 -23
  371. package/src/ui/marquee-on-hover.tsx +1 -6
  372. package/src/ui/media-preview.tsx +0 -5
  373. package/src/ui/modalTransition.ts +0 -25
  374. package/src/ui/overlay-a11y.ts +0 -1
  375. package/src/ui/page-title.tsx +0 -4
  376. package/src/ui/popover.tsx +0 -8
  377. package/src/ui/progress.tsx +0 -1
  378. package/src/ui/refresh-spin-icon.tsx +0 -11
  379. package/src/ui/relative-date-time.tsx +0 -3
  380. package/src/ui/rolling-number.tsx +0 -2
  381. package/src/ui/search-input.tsx +0 -9
  382. package/src/ui/select-field.tsx +0 -5
  383. package/src/ui/select.tsx +0 -8
  384. package/src/ui/send-queue-icon.tsx +0 -3
  385. package/src/ui/separator.tsx +0 -1
  386. package/src/ui/sheet.tsx +0 -42
  387. package/src/ui/slide-over-panel.tsx +0 -2
  388. package/src/ui/slider.tsx +21 -9
  389. package/src/ui/sonner-icons.tsx +0 -4
  390. package/src/ui/sonner.tsx +0 -78
  391. package/src/ui/spinner.tsx +0 -50
  392. package/src/ui/status-dot.tsx +0 -10
  393. package/src/ui/surface.tsx +0 -13
  394. package/src/ui/switch.tsx +72 -3
  395. package/src/ui/table.tsx +0 -3
  396. package/src/ui/tabs-transition.tsx +0 -12
  397. package/src/ui/tabs.tsx +0 -17
  398. package/src/ui/tabsSliding.ts +0 -5
  399. package/src/ui/time-picker.tsx +0 -17
  400. package/src/ui/toggle-search.tsx +0 -6
  401. package/src/ui/toolbar-search-input.tsx +0 -3
  402. package/src/ui/tooltip.tsx +0 -5
  403. package/src/ui/ui-config.tsx +0 -19
  404. package/src/utils/cat-color.ts +0 -20
  405. package/src/utils/cn.ts +0 -4
  406. package/src/utils/gesture.ts +0 -8
  407. package/src/utils/ref.ts +0 -1
  408. package/src/utils/runtimeVisibility.ts +0 -19
  409. package/src/utils/surface-radius.ts +0 -11
  410. package/src/utils/useDragSensors.ts +0 -2
  411. package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
  412. package/tokens/examples/toaster/Fixture.tsx +0 -4
  413. package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
  414. package/tokens/examples/toaster/vite.config.ts +0 -2
  415. package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
  416. package/tokens/examples/tokens-moved/vite.config.ts +0 -2
  417. package/tokens/src/tailwind-preset.mjs +0 -3
package/src/brand/svg.ts CHANGED
@@ -1,6 +1,3 @@
1
- // Geometry and raw SVG strings for the family app marks. No imports, so the
2
- // asset script can load this file directly with Node.
3
-
4
1
  /** Every mark. `eva` and `bee` are marks and icons only: they are not family apps, so `FAMILY_APPS` leaves them out. */
5
2
  export const APP_NAMES = ["projectv", "vibot", "vhub", "vmem", "verve", "velth", "eva", "bee"] as const;
6
3
 
@@ -14,13 +11,9 @@ export const MARK_STROKE_WIDTH = 50;
14
11
  export const TILE_RADIUS = 224;
15
12
 
16
13
  export type MarkShape = {
17
- /** Filled shapes (no stroke) versus lines (50 wide, round caps by default). */
18
14
  kind: "fill" | "stroke";
19
- /** Path data on the 1024 grid. */
20
15
  paths: readonly string[];
21
- /** Stroke width override on the 1024 grid. Defaults to `MARK_STROKE_WIDTH`. */
22
16
  strokeWidth?: number;
23
- /** Line cap override. Defaults to `"round"`. */
24
17
  linecap?: "butt" | "round";
25
18
  };
26
19
 
@@ -101,7 +94,6 @@ export const APP_MARKS: Record<AppName, MarkShape> = {
101
94
  type Point = [number, number];
102
95
  type Box = [minX: number, minY: number, maxX: number, maxY: number];
103
96
 
104
- /** Roots in (0, 1) of the derivative of a Bezier with 1D control values `v` (quadratic or cubic). */
105
97
  function bezierExtrema(v: number[]): number[] {
106
98
  const roots: number[] = [];
107
99
  if (v.length === 3) {
@@ -127,7 +119,6 @@ function bezierAt(v: number[], t: number): number {
127
119
  return v.length === 3 ? u * u * p0 + 2 * u * t * p1 + t * t * p2 : u ** 3 * p0 + 3 * u * u * t * p1 + 3 * u * t * t * p2 + t ** 3 * p3;
128
120
  }
129
121
 
130
- /** Extreme points of an SVG elliptical arc (endpoint form, no rotation), including both ends. */
131
122
  function arcPoints(from: Point, [rx0, ry0, , large, sweep, x, y]: [number, number, number, number, number, number, number]): Point[] {
132
123
  const [x0, y0] = from;
133
124
  let rx = Math.abs(rx0);
package/src/client.ts CHANGED
@@ -1,9 +1,3 @@
1
- // @vvedantb/ui/client: the root without `@vvedantb/server`, convex or Clerk, for
2
- // Chrome extensions and other pages that cannot load them. It leaves out the
3
- // artifact viewers (`src/artifacts`), `ConvexClerkProvider`, `useStableAuth`
4
- // and `useEnsureUser`; everything else matches the root. Keep it in step with
5
- // src/index.ts: src/client-exports.test.ts compares the two, and
6
- // app/tests-node/client-graph.test.mjs checks the module graph.
7
1
  export { cn } from "./utils/cn";
8
2
  export { UiConfigProvider, useUiConfig } from "./ui/ui-config";
9
3
  export type { UiConfig, UiConfigProviderProps } from "./ui/ui-config";
@@ -14,8 +8,6 @@ export * from "./motion/presets";
14
8
  export * from "./motion/panel-transition";
15
9
  export { ListEnter, useFirstPaintGate } from "./motion/list-enter";
16
10
  export type { ListEnterProps } from "./motion/list-enter";
17
- // Gesture physics and animation budget helpers (shared clock, on-screen and
18
- // page-visibility pausing for infinite animations).
19
11
  export { DRAG_ACTIVATION_DISTANCE_PX, projectVelocity, rubberband } from "./utils/gesture";
20
12
  export {
21
13
  bindRuntimeAnimation,
@@ -28,8 +20,6 @@ export { CAT_SLOT_COUNT, catColorForId, catColorForSlot, catSlotForId } from "./
28
20
  export type { CatColorClasses, CatSlot } from "./utils/cat-color";
29
21
  export { CONTROL_RADIUS_CLASS, SURFACE_RADIUS_CLASS } from "./utils/surface-radius";
30
22
  export { restoreModalScrollLock } from "./ui/overlay-a11y";
31
- // Generic hooks: media query, page visibility, trailing debounce,
32
- // single-flight async calls and a persisted scroll container.
33
23
  export * from "./hooks";
34
24
  export { ErrorBoundary } from "./ui/error-boundary";
35
25
  export type { ErrorBoundaryProps } from "./ui/error-boundary";
@@ -132,11 +122,8 @@ export * from "./ui/sheet";
132
122
  export * from "./ui/visually-hidden";
133
123
  export * from "./ui/clearInputDissolve";
134
124
 
135
- // Animated nav icons. Styles: `@vvedantb/ui/tokens/css/nav-icons.css`.
136
125
  export * from "./icons";
137
126
 
138
- // Dual copies: the richer file uses the plain name. The deprecated `Alt` exports
139
- // (accordion, clear input, input group) wrap the main parts with the old markup.
140
127
  export * from "./ui/accordion";
141
128
  export {
142
129
  AccordionAlt,
@@ -188,9 +175,6 @@ export * from "./ai-elements/sources";
188
175
  export * from "./ai-elements/speech-input";
189
176
  export * from "./ai-elements/suggestion";
190
177
 
191
- // Agent activity and run surfaces (moved from an app): the activity timeline and
192
- // its step model, Trace lines, plan, test results, web preview, context usage
193
- // and the model picker.
194
178
  export * from "./ai-elements/activity-shared";
195
179
  export * from "./ai-elements/activity-question";
196
180
  export * from "./ai-elements/activity-tasks";
@@ -203,14 +187,9 @@ export * from "./ai-elements/context";
203
187
  export * from "./ai-elements/model-picker";
204
188
  export * from "./ai-elements/provider-icon";
205
189
 
206
- // Kibo UI blocks: gantt, kanban, list, contribution graph, video player,
207
- // cursor, avatar stack, theme switcher. Kanban, list and gantt drag with
208
- // `useDragSensors`, the shared dnd-kit sensor split.
209
190
  export * from "./kibo";
210
191
  export { useDragSensors } from "./utils/useDragSensors";
211
192
 
212
- // Markdown renderer (Streamdown + code blocks, callouts, links, KaTeX).
213
- // Styles: `@vvedantb/ui/tokens/css/markdown.css`.
214
193
  export * from "./markdown";
215
194
 
216
195
  export * from "./audio";
@@ -218,8 +197,6 @@ export * from "./audio";
218
197
  export * from "./composer";
219
198
  export { toast } from "sonner";
220
199
 
221
- // Shell: router-free pieces. Shell's own `cn` and `ClassValue` are not re-exported;
222
- // use the root `cn` (clsx + tailwind-merge).
223
200
  export { SidebarHeader } from "../shell/src/SidebarHeader";
224
201
  export type { SidebarHeaderProps } from "../shell/src/SidebarHeader";
225
202
  export { SidebarUpgradeCard } from "../shell/src/SidebarUpgradeCard";
@@ -233,8 +210,6 @@ export type {
233
210
  SessionsHoverCardSurface,
234
211
  } from "../shell/src/SessionsHoverCard";
235
212
 
236
- // App shell: sidebar and main page layout. Widths come from the
237
- // `--app-shell-*` CSS variables that `AppShell` sets.
238
213
  export { AppShell } from "../shell/src/AppShell";
239
214
  export type {
240
215
  AppShellContentProps,
@@ -263,7 +238,6 @@ export type {
263
238
  } from "../shell/src/SidePanelTabs";
264
239
  export { AppSidebar } from "../shell/src/AppSidebar";
265
240
  export type { AppSidebarProps } from "../shell/src/AppSidebar";
266
- // Composable sidebar parts (`Sidebar.Root`, `Sidebar.Rail`, ...) and their prop types.
267
241
  export * from "../shell/src/Sidebar";
268
242
  export { SidebarRail, RailTile, RailDivider, RailCollapseTile, shellDockTileProps, useInRailGroup } from "../shell/src/SidebarRail";
269
243
  export type {
@@ -313,8 +287,6 @@ export {
313
287
  } from "../shell/src/app-shell-classes";
314
288
  export type { SidebarNavItemClassOptions } from "../shell/src/app-shell-classes";
315
289
 
316
- // Marketing: landing kit, site footer and pricing dialog. Router- and Motion-free;
317
- // `createLandingKit` takes the app's `motion`. Styles: `@vvedantb/ui/landing.css`.
318
290
  export {
319
291
  LandingFeatureCard,
320
292
  LandingFooter,
@@ -383,9 +355,6 @@ export type {
383
355
  PricingPlanBenefit,
384
356
  } from "./marketing/PricingModal";
385
357
 
386
- // App helpers: confirm skip, update watcher, settings chrome, theme, page title,
387
- // page motion, time, VITE env and error messages. Not here: `ConvexClerkProvider`,
388
- // `useStableAuth` and `useEnsureUser`, which import convex or Clerk.
389
358
  export {
390
359
  bindToWindow,
391
360
  createAltHeldStore,
@@ -467,12 +436,9 @@ export {
467
436
  export { convexErrorMessage, userFacingErrorMessage } from "../app/src/convex/errorMessage";
468
437
  export { useHeldResult } from "../app/src/convex/useHeldResult";
469
438
 
470
- // Family app marks (Icon* components, deprecated AppMark and raw SVG strings for favicons).
471
439
  export * from "./brand";
472
440
 
473
- // Third-party brand logos (`GitHubIcon`, `SlackIcon`, `ClaudeIcon`, ...). Also `@vvedantb/ui/logos`.
474
441
  export * from "./logos";
475
442
 
476
- // Native tokens (JS values that match tokens.css).
477
443
  export { tokens } from "../tokens/src/native";
478
444
  export type { Tokens } from "../tokens/src/native";
@@ -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;