@vvedantb/ui 0.67.0 → 0.70.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
@@ -32,20 +32,11 @@ function throttle(fn: () => void, ms: number): () => void {
32
32
  }
33
33
 
34
34
  export interface GanttConfig {
35
- /** Replaces the built-in classes of a part. */
36
35
  classes?: {
37
- /**
38
- * `GanttProvider`'s scroll container: grid, scrolling with no visible
39
- * scrollbar, radius and fill. The range name and `className` follow.
40
- */
41
36
  root?: string;
42
- /** `GanttToday`'s pill (the caller `className` merges after it). */
43
37
  today?: string;
44
- /** The date that slides open under "Today" on hover. */
45
38
  todayDate?: string;
46
- /** The resize grip inside `GanttFeatureDragHelper`. */
47
39
  dragHandle?: string;
48
- /** The date chip `GanttFeatureItem` pins to the edge when off screen. */
49
40
  offscreenIndicator?: string;
50
41
  };
51
42
  }
@@ -119,16 +110,8 @@ export type GanttContextProps = {
119
110
  setScrollX: (v: number) => void;
120
111
  };
121
112
 
122
- /** The issue-list column at desktop width. */
123
113
  const GANTT_SIDEBAR_WIDTH_PX = 300;
124
114
 
125
- /**
126
- * The sidebar is a grid track, not a sized element, so its width has to be a
127
- * number. Hardcoded at 300 it left roughly 90px of chart canvas on a 390px
128
- * phone — the timeline was there, just not wide enough to read. Capped at 45% of
129
- * the viewport, a phone keeps the majority of the width for the bars while
130
- * desktop is unchanged.
131
- */
132
115
  function ganttSidebarWidth(): number {
133
116
  return Math.min(GANTT_SIDEBAR_WIDTH_PX, Math.round(window.innerWidth * 0.45));
134
117
  }
@@ -320,8 +303,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
320
303
 
321
304
  const headerHeight = 60;
322
305
  const rowHeight = 36;
323
- // Daily is rendered as a Linear-style weekly grid (~16px/day → ~112px/week),
324
- // so the per-day column is narrow and only week starts are labelled.
325
306
  let columnWidth = 16;
326
307
 
327
308
  if (range === "monthly") {
@@ -341,11 +322,7 @@ export const GanttProvider: FC<GanttProviderProps> = ({
341
322
  return vars;
342
323
  }, [zoom, columnWidth, sidebarWidth]);
343
324
 
344
- // Center the canvas on today once the sidebar width is known, matching
345
- // Linear's default (today near the middle of the viewport). Runs once.
346
325
  const didCenterRef = useRef(false);
347
- /* Scrolls the real element and then records where it landed; the scroll
348
- position only exists after layout, so it cannot be derived during render. */
349
326
  useEffect(() => {
350
327
  const el = scrollRef.current;
351
328
  if (!el || didCenterRef.current || sidebarWidth === 0) return;
@@ -371,8 +348,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
371
348
  didCenterRef.current = true;
372
349
  }, [sidebarWidth, zoom, range, columnWidth, timelineData, onAddItem]);
373
350
 
374
- // Ctrl/Cmd + wheel (and trackpad pinch, which sends ctrlKey) zooms the
375
- // timeline like Linear, instead of zooming the page. Plain wheel scrolls.
376
351
  const zoomRef = useRef(zoom);
377
352
  zoomRef.current = zoom;
378
353
  useEffect(() => {
@@ -395,9 +370,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
395
370
  return () => el.removeEventListener("wheel", onWheel);
396
371
  }, [onZoomChange]);
397
372
 
398
- /* Measures the rendered sidebar via a MutationObserver plus resize. There is
399
- no snapshot to read before the first paint, so useSyncExternalStore has
400
- nothing to return on mount. */
401
373
  useEffect(() => {
402
374
  const updateSidebarWidth = () => {
403
375
  const sidebarElement = scrollRef.current?.querySelector(
@@ -414,9 +386,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
414
386
  observer.observe(el, { childList: true, subtree: true });
415
387
  }
416
388
 
417
- // The width is viewport-relative below the full 300px, so it has to be
418
- // recomputed on resize and rotation — this number is also the scroll maths'
419
- // origin, so letting it drift from the rendered track mis-centres the chart.
420
389
  window.addEventListener("resize", updateSidebarWidth);
421
390
 
422
391
  return () => {
@@ -496,10 +465,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
496
465
  return () => scrollElement.removeEventListener("scroll", handleScroll);
497
466
  }, [handleScroll]);
498
467
 
499
- // Drag-to-pan: with the scrollbar hidden, pressing on empty canvas and
500
- // dragging scrolls the timeline like Linear's roadmap. Bars, the sidebar and
501
- // any interactive control opt out via the selector below so their own
502
- // click/drag behaviour is preserved.
503
468
  useEffect(() => {
504
469
  const el = scrollRef.current;
505
470
  if (!el) return;
@@ -608,7 +573,6 @@ export const GanttProvider: FC<GanttProviderProps> = ({
608
573
  setScrollX: () => {},
609
574
  });
610
575
 
611
- // Centre today in the viewport rather than pinning it to the left edge.
612
576
  scrollElement.scrollTo({
613
577
  left: Math.max(0, offset - scrollElement.clientWidth / 2),
614
578
  behavior: "smooth",
@@ -7,9 +7,7 @@ import { useGanttContext, type GanttFeature } from "./gantt-provider";
7
7
  export type GanttSidebarItemProps = {
8
8
  feature: GanttFeature;
9
9
  onSelectItem?: (id: string) => void;
10
- /** Leading slot (e.g. a phase status icon). Falls back to a colour dot. */
11
10
  icon?: ReactNode;
12
- /** Trailing slot (e.g. avatars + progress). Falls back to the duration. */
13
11
  meta?: ReactNode;
14
12
  selected?: boolean;
15
13
  className?: string;
@@ -39,11 +37,6 @@ export const GanttSidebarItem: FC<GanttSidebarItemProps> = ({
39
37
  };
40
38
 
41
39
  return (
42
- // A plain row with a real `<button>` stretched across it, not a
43
- // `role="button" tabIndex={0}` div — see `ui/list-row.tsx`, which documents
44
- // why the div form needs a hand-written Enter/Space handler and still gets
45
- // the role, focus and press semantics wrong. The row keeps its own `relative`
46
- // so the overlay is bounded by it.
47
40
  <div
48
41
  className={merge(
49
42
  "relative flex cursor-pointer items-center gap-2.5 px-2.5 text-xs transition-colors hover:bg-surface-secondary/50 has-[button:focus-visible]:ring-2 has-[button:focus-visible]:ring-ring/35",
@@ -138,10 +138,6 @@ export const GanttToday: FC<GanttTodayProps> = ({ className }) => {
138
138
  )}
139
139
  >
140
140
  Today
141
- {/* Only max-height, not `all`: the pill inherits colour from its
142
- parent, so `transition-all` also dragged those along. The height
143
- animation relayouts nothing outside the marker, which is absolutely
144
- positioned at zero width. */}
145
141
  <span className={classes.todayDate}>
146
142
  {dayjs(date).format("MMM DD, YYYY")}
147
143
  </span>
@@ -28,19 +28,9 @@ import { useDragSensors } from "../utils/useDragSensors";
28
28
  import { resolveOverColumnId } from "./kanbanDropTarget";
29
29
 
30
30
  export interface KanbanConfig {
31
- /** Replaces the built-in classes of a part. */
32
31
  classes?: {
33
- /**
34
- * `KanbanCard`: grab cursor, the transitions it runs itself and press
35
- * feedback. The radius and the dragging state are added on top.
36
- */
37
32
  card?: string;
38
33
  };
39
- /**
40
- * The transitions `KanbanCard` runs itself (press scale and drag fade),
41
- * appended to the reorder transition dnd-kit writes inline. A CSS
42
- * `transition` list.
43
- */
44
34
  cardTransition?: string;
45
35
  }
46
36
 
@@ -66,11 +56,6 @@ type KanbanContextValue = {
66
56
  columns: KanbanColumnDef[];
67
57
  data: KanbanItem[];
68
58
  activeCardId: string | null;
69
- /**
70
- * Column the dragged card would land in. Distinct from a column's own
71
- * `isOver`: pointing at a card resolves `over` to that card, so the column
72
- * under the pointer never reports `isOver` once it holds any cards.
73
- */
74
59
  overColumnId: string | null;
75
60
  };
76
61
 
@@ -83,8 +68,6 @@ const KanbanContext = createContext<KanbanContextValue>({
83
68
 
84
69
  export const useKanbanContext = () => useContext(KanbanContext);
85
70
 
86
- // --- KanbanBoard: droppable column zone ---
87
-
88
71
  export type KanbanBoardProps = {
89
72
  id: string;
90
73
  children: ReactNode;
@@ -109,9 +92,6 @@ export const KanbanBoard = ({
109
92
  "flex size-full min-h-40 flex-col overflow-hidden bg-surface-secondary/40 text-xs transition-[background-color,border-color]",
110
93
  SURFACE_RADIUS_CLASS,
111
94
  className,
112
- // After `className` on purpose: callers set a column background, and
113
- // tailwind-merge keeps whichever `bg-*` / `border-*` comes last — so
114
- // the drop highlight has to be the last word or it never shows.
115
95
  isDropTarget && "border border-primary/40 bg-primary/10",
116
96
  )}
117
97
  ref={setNodeRef}
@@ -121,8 +101,6 @@ export const KanbanBoard = ({
121
101
  );
122
102
  };
123
103
 
124
- // --- KanbanCard: sortable item wrapper ---
125
-
126
104
  export type KanbanCardProps = {
127
105
  id: string;
128
106
  children: ReactNode;
@@ -149,18 +127,6 @@ export const KanbanCard = ({
149
127
  const merge = useCn();
150
128
 
151
129
  const style = {
152
- /**
153
- * `useSortable` hands back a `transition` string, and putting it in inline
154
- * style outranks every `transition-*` class on the element — the shorthand
155
- * resets `transition-property`, so while a sort is animating the class below
156
- * is not merely overridden on duration, it stops applying at all and the
157
- * press scale snaps. dnd-kit's own entry only ever names `transform`.
158
- *
159
- * Appending the two properties the card animates itself keeps the reflow
160
- * tween dnd-kit wants and the press and drag-fade the card wants. The value
161
- * is `undefined` when nothing is sorting, which is why it is filtered rather
162
- * than interpolated.
163
- */
164
130
  transition: [transition, config?.cardTransition ?? DEFAULT_CARD_TRANSITION]
165
131
  .filter(Boolean)
166
132
  .join(", "),
@@ -175,15 +141,6 @@ export const KanbanCard = ({
175
141
  ref={setNodeRef}
176
142
  onClick={onClick}
177
143
  className={merge(
178
- // Press feedback on pointer-down, not on release — the card has to
179
- // acknowledge the grab before the drag threshold is crossed, or the
180
- // first few pixels of every drag read as a dead control.
181
- //
182
- // `scale` is named explicitly alongside `transform`: an arbitrary
183
- // `transition-[…]` emits exactly the properties listed, and Tailwind
184
- // compiles `scale-[0.98]` to the individual `scale` property, which
185
- // `transform` does not match — so this press was a no-op. `transform`
186
- // stays for the inline one `useSortable` writes below.
187
144
  classes.card,
188
145
  SURFACE_RADIUS_CLASS,
189
146
  isDragging && "pointer-events-none cursor-grabbing opacity-30",
@@ -195,8 +152,6 @@ export const KanbanCard = ({
195
152
  );
196
153
  };
197
154
 
198
- // --- KanbanCards: SortableContext + auto-filter by column from context ---
199
-
200
155
  export type KanbanCardsProps = Omit<
201
156
  HTMLAttributes<HTMLDivElement>,
202
157
  "children" | "id"
@@ -225,8 +180,6 @@ export const KanbanCards = ({
225
180
  );
226
181
  };
227
182
 
228
- // --- KanbanHeader: simple styled header ---
229
-
230
183
  export type KanbanHeaderProps = HTMLAttributes<HTMLDivElement>;
231
184
 
232
185
  export const KanbanHeader = ({ className, ...props }: KanbanHeaderProps) => {
@@ -234,8 +187,6 @@ export const KanbanHeader = ({ className, ...props }: KanbanHeaderProps) => {
234
187
  return <div className={merge("m-0 p-2 font-medium text-sm", className)} {...props} />;
235
188
  };
236
189
 
237
- // --- KanbanProvider: DnD context + Kanban context + a11y ---
238
-
239
190
  export type KanbanProviderProps = {
240
191
  children: ReactNode;
241
192
  columns: KanbanColumnDef[];
package/src/kibo/list.tsx CHANGED
@@ -89,9 +89,6 @@ export type SortableListItemProps = {
89
89
  readonly className?: string;
90
90
  };
91
91
 
92
- // Not built on `ListRow`: that row always wraps its children in a padded body
93
- // `<div>` and adds its own surface, radius and hover, so rendering through it
94
- // would change this item's DOM for every caller. This item is only the draggable box.
95
92
  export const SortableListItem = ({
96
93
  id,
97
94
  name,
@@ -139,11 +136,6 @@ export const SortableListProvider = ({
139
136
  onDragEnd,
140
137
  className,
141
138
  }: SortableListProviderProps) => {
142
- // A lone `PointerSensor` armed on distance meant the list could not be
143
- // reordered by touch at all: the whole row is the drag handle, the drag is
144
- // restricted to the vertical axis, and that is the same axis the finger
145
- // scrolls on — so the browser claimed the gesture and cancelled the pointer
146
- // every time.
147
139
  const sensors = useDragSensors();
148
140
  const merge = useCn();
149
141
 
@@ -26,9 +26,7 @@ const themes = [
26
26
  type ThemeKey = "light" | "dark" | "system";
27
27
 
28
28
  export interface ThemeSwitcherConfig {
29
- /** Replaces the built-in classes of a part. */
30
29
  classes?: {
31
- /** Each theme button: size, shape and press feedback. */
32
30
  button?: string;
33
31
  };
34
32
  }
@@ -65,9 +63,6 @@ export const ThemeSwitcher = ({
65
63
  [setTheme],
66
64
  );
67
65
 
68
- // No mount gate: the selected theme comes from props rather than anything
69
- // browser-only, so a client render has no hydration mismatch to skip the
70
- // first paint for.
71
66
  return (
72
67
  <div
73
68
  className={merge(
@@ -15,11 +15,8 @@ import type { ComponentProps } from "react";
15
15
  import { useCn, useUiConfig } from "../ui/ui-config";
16
16
 
17
17
  export interface VideoPlayerConfig {
18
- /** Replaces the built-in classes of a part. */
19
18
  classes?: {
20
- /** `VideoPlayer` (the media controller): clipping, radius and shadow. */
21
19
  root?: string;
22
- /** `VideoPlayerControlBar`: backdrop, padding and control transitions. */
23
20
  controlBar?: string;
24
21
  };
25
22
  }
@@ -29,12 +26,6 @@ const defaultClasses = {
29
26
  controlBar: "bg-zinc-950/95 px-1 *:transition-colors *:duration-150",
30
27
  };
31
28
 
32
- // The control bar carries the dark backdrop (set via Tailwind on the bar),
33
- // so individual controls stay transparent and hover applies a subtle light
34
- // overlay on top — that reads as a "dimmer highlight" rather than going
35
- // transparent against the chat bubble behind.
36
- // Tooltip background is set explicitly because the default falls through
37
- // to --media-secondary-color, which is transparent here.
38
29
  const variables: Record<string, string> = {
39
30
  "--media-primary-color": "rgb(255 255 255 / 0.96)",
40
31
  "--media-secondary-color": "transparent",
@@ -1,6 +1,3 @@
1
- // Third-party brand logos (full-colour unless noted). Family app marks live in `../brand`.
2
- // Each logo takes `LogoProps`: `size` (default 24), `title` (labelled `role="img"`; otherwise
3
- // `aria-hidden`) and any other SVG prop. Paths are the vendors' own; do not recolour them.
4
1
  export type { LogoProps } from "./logo-svg";
5
2
  export { ChromeIcon } from "./chrome-icon";
6
3
  export { ClaudeIcon } from "./claude-icon";
@@ -2,12 +2,7 @@ import type { ComponentProps, ReactNode } from "react";
2
2
 
3
3
  /** Props shared by every third-party logo. Other SVG props (`id`, `style`, `data-*`, `ref`) go to the svg. */
4
4
  export interface LogoProps extends Omit<ComponentProps<"svg">, "children" | "width" | "height" | "viewBox"> {
5
- /** Width and height in px (or any CSS length). Default `24`. */
6
5
  size?: number | string;
7
- /**
8
- * Accessible name. With `title` (or an `aria-label`) the svg is a labelled
9
- * `role="img"`; without one it is decorative and `aria-hidden`.
10
- */
11
6
  title?: string;
12
7
  }
13
8
 
@@ -19,27 +19,14 @@ import { MarkdownLink } from "./MarkdownLink";
19
19
  import { mermaidPlugin } from "./mermaid";
20
20
  import { copyMarkdownSelection } from "./markdownClipboard";
21
21
  import { rehypeGithubAlerts } from "./rehypeGithubAlerts";
22
- // The math plugin renders KaTeX markup but ships no stylesheet with it.
23
22
  import "katex/dist/katex.min.css";
24
23
  import { useSmoothText } from "./useSmoothText";
25
24
 
26
25
  const PLUGINS = { cjk, code, math, mermaid: mermaidPlugin };
27
26
 
28
- /**
29
- * `remarkPlugins` / `rehypePlugins` REPLACE Streamdown's defaults rather than
30
- * extending them, so the defaults (GFM + fence meta; raw HTML, sanitise,
31
- * harden) are spread back in first. Alerts run after the sanitiser, which
32
- * would otherwise strip the attribute they set.
33
- */
34
27
  const REMARK_PLUGINS = Object.values(defaultRemarkPlugins);
35
28
  const REHYPE_PLUGINS = [...Object.values(defaultRehypePlugins), rehypeGithubAlerts];
36
29
 
37
- /**
38
- * Plain tags where Streamdown's defaults bake in Tailwind classes (text-3xl
39
- * headings, `list-inside` lists, a `span` for bold, padded table cells): the
40
- * `.markdown` stylesheet owns typography, so these render unstyled. `table`
41
- * itself stays Streamdown's, for its copy / download / fullscreen controls.
42
- */
43
30
  const MARKDOWN_COMPONENTS: Components = {
44
31
  h1: "h1",
45
32
  h2: "h2",
@@ -68,10 +55,6 @@ export type MarkdownProps = Omit<
68
55
  "plugins" | "rehypePlugins" | "parseMarkdownIntoBlocksFn"
69
56
  > & {
70
57
  children: string;
71
- /**
72
- * With `mode="streaming"`, ease text that arrives in bursts onto the screen
73
- * (`useSmoothText`). Default `true`; `false` shows each chunk as it lands.
74
- */
75
58
  smooth?: boolean;
76
59
  };
77
60
 
@@ -105,9 +88,6 @@ export const Markdown = memo(function Markdown({
105
88
  remarkPlugins ? [...REMARK_PLUGINS, ...remarkPlugins] : REMARK_PLUGINS
106
89
  }
107
90
  rehypePlugins={REHYPE_PLUGINS}
108
- // Streamdown re-renders only the block still being written, but its
109
- // default split re-lexes the whole reply behind every token. This one
110
- // reuses the blocks a byte-identical prefix already produced.
111
91
  parseMarkdownIntoBlocksFn={parseMarkdownIntoBlocksIncremental}
112
92
  {...props}
113
93
  >
@@ -17,11 +17,6 @@ import { useHighlightedLines } from "./codeHighlight";
17
17
  import { useMermaidRender } from "./mermaid";
18
18
  const COPIED_MS = 1200;
19
19
 
20
- /**
21
- * Token colours travel as custom properties so one render serves both
22
- * themes: `--md-c` is the light colour, `--shiki-dark` the dark one, and the
23
- * stylesheet picks between them.
24
- */
25
20
  function tokenStyle(token: HighlightToken): Record<string, string> {
26
21
  const style: Record<string, string> = {};
27
22
  if (token.color) style["--md-c"] = token.color;
@@ -122,16 +117,8 @@ function MarkdownCodeBlock({
122
117
  );
123
118
  }
124
119
 
125
- /** Start a diagram render this far before it scrolls into view. */
126
120
  const MERMAID_PRELOAD_MARGIN = "400px";
127
121
 
128
- /**
129
- * A mermaid fence: the plain code block until the diagram has rendered, then
130
- * Streamdown's diagram view (pan, zoom, fullscreen, download). A fence still
131
- * streaming, or one that will not parse, stays code — no error box. Nothing
132
- * renders (or loads mermaid) until the block nears the viewport, so a long
133
- * chat does not render every diagram in its history on open.
134
- */
135
122
  function MarkdownMermaid({
136
123
  fenced,
137
124
  diagram,
@@ -157,7 +144,6 @@ function MarkdownMermaid({
157
144
  return () => observer.disconnect();
158
145
  };
159
146
  if (status === "done") {
160
- // Streamdown renders once per mount, so a theme change remounts it.
161
147
  return <Fragment key={theme}>{diagram}</Fragment>;
162
148
  }
163
149
  return (
@@ -3,12 +3,6 @@ import { Children } from "react";
3
3
  import { IconFile } from "@tabler/icons-react";
4
4
  import type { ExtraProps } from "streamdown";
5
5
 
6
- /**
7
- * Inline code that names a file, optionally with a `:line[:col]` suffix. A
8
- * path with a directory (`src/a.ts`, `./x/y.md`, `~/z.json`) may end in any
9
- * extension; a bare name must end in a common source extension, because
10
- * `console.log` and `ctx.db` are code, not files.
11
- */
12
6
  const PATH_WITH_DIRECTORY =
13
7
  /^(?:~|\.{1,2})?\/?(?:[\w@.+-]+\/)*[\w@+-][\w@.+-]*\.[a-z][a-z0-9]{0,7}(?::\d+(?::\d+)?)?$/i;
14
8
  const BARE_FILE_NAME =
@@ -3,14 +3,10 @@ import { Children } from "react";
3
3
  import { IconBrandGithub, IconWorld } from "@tabler/icons-react";
4
4
  import type { ExtraProps } from "streamdown";
5
5
 
6
- /** Streamdown's placeholder href for a link whose `(url)` has not streamed yet. */
7
6
  const INCOMPLETE_LINK = "streamdown:incomplete-link";
8
- /** Break opportunities in a bare URL: after separators, never mid-word. */
9
7
  const URL_BREAK_AFTER = /([/.?&=#_-]+)/;
10
8
 
11
- /** Hosts whose favicon is a black glyph that vanishes in dark mode. */
12
9
  const MONOCHROME_HOSTS = new Set(["github.com", "gist.github.com"]);
13
- /** Hosts whose favicon failed this session; they get the globe from now on. */
14
10
  const failedFavicons = new Set<string>();
15
11
 
16
12
  function externalHost(href: string): string | null {
@@ -5,15 +5,12 @@ type HastChild = HastElement["children"][number];
5
5
 
6
6
  export interface FencedCode {
7
7
  code: string;
8
- /** Fence language as written (`ts`, `bash`), or "" for a bare fence. */
9
8
  language: string;
10
- /** File name from the fence meta (`title="a.ts"`, `file=a.ts`, `a.ts`). */
11
9
  title: string | null;
12
10
  }
13
11
 
14
12
  const LANGUAGE_CLASS = /^language-(.+)$/;
15
13
  const TITLE_ATTRIBUTE = /(?:^|\s)(?:title|file|filename)=(?:"([^"]+)"|'([^']+)'|(\S+))/;
16
- /** A bare meta token that names a file: has a dot or slash, no `=` or braces. */
17
14
  const BARE_FILE = /^[\w@~./\\-]*[./\\][\w@~./\\-]+$/;
18
15
 
19
16
  function textOf(node: HastChild): string {
@@ -2,30 +2,14 @@ import { code as shiki } from "@streamdown/code";
2
2
  import { useState, useSyncExternalStore } from "react";
3
3
  import type { CodeHighlighterPlugin } from "streamdown";
4
4
 
5
- /** A Shiki language id, as the plugin names it. */
6
5
  type BundledLanguage = ReturnType<typeof shiki.getSupportedLanguages>[number];
7
- /** Streamdown declares these without exporting them. */
8
6
  type HighlightResult = NonNullable<ReturnType<CodeHighlighterPlugin["highlight"]>>;
9
7
  export type HighlightToken = HighlightResult["tokens"][number][number];
10
8
 
11
- /**
12
- * Syntax highlighting for markdown code blocks, on the same Shiki plugin
13
- * Streamdown ships (JS regex engine, one lazily-created highlighter per
14
- * language, `github-light` / `github-dark` tokens in a single pass).
15
- *
16
- * The plugin's own cache is keyed by a hash of the code's length and edges and
17
- * starts a fresh job on every uncached call, so this module keeps a small
18
- * cache of its own that dedupes in-flight work and notifies subscribers — the
19
- * shape `useSyncExternalStore` needs, with no effect.
20
- */
21
-
22
9
  const THEMES = shiki.getThemes();
23
- /** Fence language (lowercased) → Shiki id. Aliases (`ts`, `sh`, `py`) are
24
- * keys too; the plugin resolves them to their grammar. */
25
10
  const LANGUAGES = new Map<string, BundledLanguage>(
26
11
  shiki.getSupportedLanguages().map((id) => [id, id]),
27
12
  );
28
- /** Enough for every code block on screen plus scroll-back; oldest dropped. */
29
13
  const CACHE_LIMIT = 200;
30
14
 
31
15
  type Entry = { status: "pending" } | { status: "done"; result: HighlightResult };
@@ -1,45 +1,13 @@
1
1
  import { parseMarkdownIntoBlocks } from "streamdown";
2
2
 
3
- /**
4
- * Streamdown already renders a streamed reply block by block: each block is
5
- * memoised on its own text, so appending a token only re-renders the block
6
- * still being written. What it does *not* skip is the split itself — the
7
- * default `parseMarkdownIntoBlocks` runs marked's block lexer over the whole
8
- * reply on every token, so a long answer costs O(length) lexing per token and
9
- * O(length^2) over the turn. That is the work behind the mid-stream freezes on
10
- * a slow laptop: the DOM update is small, the re-parse before it is not.
11
- *
12
- * This is the same split, done incrementally. Blocks already produced from a
13
- * byte-identical prefix are reused verbatim and only the tail is re-lexed, so
14
- * the per-token cost is one prefix comparison plus lexing the paragraph being
15
- * written. Identical output, not an approximation — see the invariant test.
16
- *
17
- * Reuse is only allowed up to a block that ends on a blank line. A blank line
18
- * closes every leaf block in CommonMark, so marked's tokeniser starts the next
19
- * block from a clean state and cannot reinterpret what came before it (a
20
- * setext underline, a lazy list continuation). Without such a boundary we fall
21
- * back to a full parse.
22
- */
23
-
24
- /** How many recent splits to keep. In practice: the streaming reply, plus the
25
- * streamed reasoning prose rendered alongside it, plus headroom. */
26
3
  const CACHE_SIZE = 4;
27
4
 
28
5
  interface BlockSplit {
29
6
  source: string;
30
7
  blocks: string[];
31
- /**
32
- * `blocks.join("") === source`, so a block index maps to a source offset.
33
- * False when marked normalised the input (CRLF, say); such a split can be
34
- * returned but never used as a base.
35
- */
36
8
  exact: boolean;
37
- /** Source offset at which block `i` ends. */
38
9
  offsets: number[];
39
- /** Whether block `i` ends on a blank line, i.e. is a safe cut point. */
40
10
  endsClean: boolean[];
41
- /** Longest reusable prefix: block count, source length, and the text itself.
42
- * Precomputed so a tick costs one string comparison, not a per-block scan. */
43
11
  cleanCount: number;
44
12
  cleanLength: number;
45
13
  cleanText: string;
@@ -47,23 +15,12 @@ interface BlockSplit {
47
15
 
48
16
  const cache: BlockSplit[] = [];
49
17
 
50
- /** A block that ends on a blank line closes cleanly. */
51
18
  const ENDS_ON_BLANK_LINE = /\n[ \t]*\n$/;
52
19
 
53
- /**
54
- * Footnotes make Streamdown emit the whole document as one block, because a
55
- * reference resolves against a definition anywhere in it. Any document that
56
- * could take that path is parsed whole — a prefix split from before the
57
- * footnote appeared would not match what a full parse produces now.
58
- */
59
20
  function mayContainFootnotes(markdown: string): boolean {
60
21
  return markdown.includes("[^");
61
22
  }
62
23
 
63
- /**
64
- * Indexes a split so later ticks can slice it by offset without re-scanning.
65
- * The final block is never a cut point: it is the one still being written.
66
- */
67
24
  function describeSplit(
68
25
  source: string,
69
26
  blocks: string[],
@@ -102,12 +59,6 @@ function fullSplit(markdown: string): BlockSplit {
102
59
  return describeSplit(markdown, blocks, blocks.join("") === markdown);
103
60
  }
104
61
 
105
- /**
106
- * How much of `base` is a byte-identical, cleanly-closed prefix of `markdown`.
107
- * The common case — the reply only grew — is one string comparison. The slow
108
- * walk is for a rewritten tail: Streamdown closes an open code fence before
109
- * splitting, so the string it hands us can change at the end between ticks.
110
- */
111
62
  function reusablePrefix(
112
63
  base: BlockSplit,
113
64
  markdown: string,
@@ -1,16 +1,5 @@
1
1
  import type { ClipboardEvent } from "react";
2
2
 
3
- /**
4
- * Copying rendered markdown puts markdown on the clipboard, not the flattened
5
- * text the browser produces (lists lose their bullets, code loses its fence,
6
- * links lose their URL). The selection's DOM is walked back into markdown;
7
- * `text/html` still carries the rich fragment for editors that want it.
8
- *
9
- * Elements can speak for themselves with `data-markdown-copy`: `"skip"` drops
10
- * them (code block headers), any other value replaces their content (alert
11
- * titles emit their `[!NOTE]` marker).
12
- */
13
-
14
3
  const SKIPPED_TAGS = new Set(["BUTTON", "SVG", "STYLE", "SCRIPT", "TEMPLATE", "WBR"]);
15
4
 
16
5
  function isElement(node: Node): node is HTMLElement {
@@ -26,7 +15,6 @@ function skipped(element: HTMLElement): boolean {
26
15
  );
27
16
  }
28
17
 
29
- /** A fence longer than any backtick run inside the code. */
30
18
  function fence(code: string): string {
31
19
  const longest = Math.max(0, ...(code.match(/`+/g) ?? []).map((run) => run.length));
32
20
  return "`".repeat(Math.max(3, longest + 1));