@vvedantb/ui 0.66.0 → 0.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/app/src/auth/useStableAuth.ts +0 -2
  2. package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
  3. package/app/src/confirm/useAltHeld.ts +0 -17
  4. package/app/src/convex/ConvexClerkProvider.tsx +0 -3
  5. package/app/src/convex/env.ts +0 -4
  6. package/app/src/convex/errorMessage.ts +0 -1
  7. package/app/src/convex/useHeldResult.ts +0 -3
  8. package/app/src/page-motion/PageMotionProvider.tsx +0 -6
  9. package/app/src/page-title/createPageTitleContext.tsx +0 -14
  10. package/app/src/settings/SettingsEmptyState.tsx +0 -4
  11. package/app/src/settings/SettingsField.tsx +0 -4
  12. package/app/src/settings/SettingsPage.tsx +0 -12
  13. package/app/src/settings/SettingsSection.tsx +0 -14
  14. package/app/src/settings/ThemeModePicker.tsx +0 -6
  15. package/app/src/theme/createThemeProvider.tsx +0 -33
  16. package/app/src/time/compactRelativeTime.ts +0 -16
  17. package/app/src/update/staleDeployReload.ts +0 -40
  18. package/app/src/update/updateWatcher.ts +0 -8
  19. package/dist/app/src/auth/useStableAuth.js +0 -1
  20. package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
  21. package/dist/app/src/confirm/useAltHeld.js +0 -17
  22. package/dist/app/src/convex/env.js +0 -3
  23. package/dist/app/src/convex/errorMessage.js +0 -2
  24. package/dist/app/src/settings/ThemeModePicker.js +0 -1
  25. package/dist/app/src/theme/createThemeProvider.js +1 -11
  26. package/dist/app/src/time/compactRelativeTime.js +0 -8
  27. package/dist/app/src/update/staleDeployReload.js +3 -38
  28. package/dist/app/src/update/updateWatcher.js +1 -3
  29. package/dist/shell/src/AppShell.js +0 -14
  30. package/dist/shell/src/PageHeaderBar.js +0 -3
  31. package/dist/shell/src/SessionsHoverCard.js +0 -9
  32. package/dist/shell/src/SidePanelTabs.js +0 -36
  33. package/dist/shell/src/Sidebar.js +0 -1
  34. package/dist/shell/src/SidebarAccountMenu.js +1 -1
  35. package/dist/shell/src/SidebarChrome.js +0 -19
  36. package/dist/shell/src/SidebarIconTooltip.js +0 -1
  37. package/dist/shell/src/SidebarRail.js +0 -12
  38. package/dist/shell/src/SidebarResize.js +1 -4
  39. package/dist/shell/src/app-shell-classes.js +0 -10
  40. package/dist/shell/src/index.js +0 -1
  41. package/dist/shell/src/shell-panel-motion.js +0 -12
  42. package/dist/src/ai-elements/activity-shared.js +0 -6
  43. package/dist/src/ai-elements/activity-step-label.js +0 -6
  44. package/dist/src/ai-elements/activity-step-types.js +0 -4
  45. package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
  46. package/dist/src/ai-elements/activity-tasks.js +0 -55
  47. package/dist/src/ai-elements/artifact.js +0 -4
  48. package/dist/src/ai-elements/attachments.js +0 -41
  49. package/dist/src/ai-elements/code-block.js +0 -18
  50. package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
  51. package/dist/src/ai-elements/context.js +0 -13
  52. package/dist/src/ai-elements/conversation.js +0 -4
  53. package/dist/src/ai-elements/jump-rail.js +0 -5
  54. package/dist/src/ai-elements/message.js +3 -9
  55. package/dist/src/ai-elements/model-picker-types.js +0 -1
  56. package/dist/src/ai-elements/model-picker.js +1 -6
  57. package/dist/src/ai-elements/model-selector.js +0 -4
  58. package/dist/src/ai-elements/prompt-input-speech.js +0 -13
  59. package/dist/src/ai-elements/prompt-input.js +0 -1
  60. package/dist/src/ai-elements/provider-icon.js +0 -4
  61. package/dist/src/ai-elements/queue.js +2 -16
  62. package/dist/src/ai-elements/shimmer.js +0 -14
  63. package/dist/src/ai-elements/speech-input.js +0 -7
  64. package/dist/src/artifacts/artifact-card.js +1 -1
  65. package/dist/src/artifacts/artifact-frame.js +0 -2
  66. package/dist/src/artifacts/artifact-viewer.js +2 -1
  67. package/dist/src/audio/playChime.js +0 -2
  68. package/dist/src/audio/playTone.js +1 -4
  69. package/dist/src/brand/AppWordmark.js +0 -5
  70. package/dist/src/brand/svg.js +0 -6
  71. package/dist/src/client.js +0 -43
  72. package/dist/src/composer/Composer.js +0 -27
  73. package/dist/src/composer/input-area/InputArea.js +0 -3
  74. package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
  75. package/dist/src/composer/input-area/composerPrediction.js +0 -3
  76. package/dist/src/generative-ui/content.js +0 -2
  77. package/dist/src/generative-ui/index.js +0 -3
  78. package/dist/src/generative-ui/layout.js +0 -5
  79. package/dist/src/hooks/use-count-up-display.js +0 -2
  80. package/dist/src/hooks/use-idle-callback.js +0 -3
  81. package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
  82. package/dist/src/icons/animated/index.js +0 -4
  83. package/dist/src/icons/board-icon.js +74 -41
  84. package/dist/src/icons/bolt-icon.js +30 -20
  85. package/dist/src/icons/building-icon.js +125 -61
  86. package/dist/src/icons/files-icon.js +103 -43
  87. package/dist/src/icons/inbox-icon.js +101 -49
  88. package/dist/src/icons/index.js +2 -1
  89. package/dist/src/icons/memory-icon.js +135 -58
  90. package/dist/src/icons/search-icon.js +143 -46
  91. package/dist/src/icons/settings-icon.js +113 -53
  92. package/dist/src/icons/solid-icons.js +665 -0
  93. package/dist/src/icons/with-active.js +25 -0
  94. package/dist/src/index.js +0 -40
  95. package/dist/src/kibo/gantt-features.js +0 -10
  96. package/dist/src/kibo/gantt-provider.js +0 -34
  97. package/dist/src/kibo/kanban.js +0 -15
  98. package/dist/src/kibo/list.js +0 -3
  99. package/dist/src/kibo/video-player.js +0 -7
  100. package/dist/src/logos/index.js +0 -4
  101. package/dist/src/markdown/Markdown.js +0 -15
  102. package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
  103. package/dist/src/markdown/MarkdownInlineCode.js +0 -6
  104. package/dist/src/markdown/MarkdownLink.js +0 -5
  105. package/dist/src/markdown/codeFence.js +0 -1
  106. package/dist/src/markdown/codeHighlight.js +0 -19
  107. package/dist/src/markdown/incrementalBlocks.js +0 -45
  108. package/dist/src/markdown/markdownClipboard.js +0 -13
  109. package/dist/src/markdown/mermaid.js +0 -25
  110. package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
  111. package/dist/src/markdown/useSmoothText.js +0 -5
  112. package/dist/src/marketing/PricingModal.js +0 -2
  113. package/dist/src/marketing/ProductHero.js +0 -2
  114. package/dist/src/marketing/createLandingKit.js +0 -5
  115. package/dist/src/marketing/marketing-classes.js +0 -7
  116. package/dist/src/motion/dock-motion.js +0 -27
  117. package/dist/src/motion/panel-transition.js +0 -2
  118. package/dist/src/ui/_field-classes.js +0 -3
  119. package/dist/src/ui/_menu-classes.js +6 -6
  120. package/dist/src/ui/_picker-classes.js +0 -9
  121. package/dist/src/ui/accordion.alt.js +0 -12
  122. package/dist/src/ui/badge.js +0 -1
  123. package/dist/src/ui/border-beam.js +0 -2
  124. package/dist/src/ui/breadcrumb.js +0 -15
  125. package/dist/src/ui/bulk-action-bar.js +0 -11
  126. package/dist/src/ui/button.js +0 -20
  127. package/dist/src/ui/calendar.js +1 -20
  128. package/dist/src/ui/card.js +0 -3
  129. package/dist/src/ui/carousel.js +0 -1
  130. package/dist/src/ui/clear-input.alt.js +0 -9
  131. package/dist/src/ui/clearInputDissolve.js +0 -4
  132. package/dist/src/ui/command.js +0 -15
  133. package/dist/src/ui/confetti-burst.js +0 -3
  134. package/dist/src/ui/confirm-dialog-parts.js +0 -11
  135. package/dist/src/ui/confirm-dialog.js +0 -6
  136. package/dist/src/ui/context-menu.js +40 -34
  137. package/dist/src/ui/crossfade-icon.js +0 -2
  138. package/dist/src/ui/date-picker.js +0 -22
  139. package/dist/src/ui/dialog.js +0 -5
  140. package/dist/src/ui/dropdown-menu.js +40 -34
  141. package/dist/src/ui/empty-state.js +0 -7
  142. package/dist/src/ui/field.js +0 -21
  143. package/dist/src/ui/image-lightbox.js +0 -5
  144. package/dist/src/ui/input-group.alt.js +0 -24
  145. package/dist/src/ui/input-group.js +0 -4
  146. package/dist/src/ui/kbd.js +0 -3
  147. package/dist/src/ui/loading-state.js +0 -17
  148. package/dist/src/ui/marquee-on-hover.js +0 -3
  149. package/dist/src/ui/media-preview.js +0 -2
  150. package/dist/src/ui/modalTransition.js +0 -33
  151. package/dist/src/ui/overlay-a11y.js +0 -1
  152. package/dist/src/ui/page-title.js +0 -3
  153. package/dist/src/ui/refresh-spin-icon.js +0 -12
  154. package/dist/src/ui/search-input.js +0 -1
  155. package/dist/src/ui/select-field.js +0 -1
  156. package/dist/src/ui/send-queue-icon.js +0 -3
  157. package/dist/src/ui/sheet.js +0 -33
  158. package/dist/src/ui/slider.js +103 -82
  159. package/dist/src/ui/sonner-icons.js +0 -5
  160. package/dist/src/ui/sonner.js +0 -60
  161. package/dist/src/ui/spinner.js +0 -35
  162. package/dist/src/ui/status-dot.js +0 -2
  163. package/dist/src/ui/surface.js +0 -14
  164. package/dist/src/ui/switch.js +213 -36
  165. package/dist/src/ui/table.js +0 -1
  166. package/dist/src/ui/tabs-transition.js +0 -1
  167. package/dist/src/ui/tabs.js +0 -17
  168. package/dist/src/ui/tabsSliding.js +0 -6
  169. package/dist/src/ui/time-picker.js +0 -15
  170. package/dist/src/ui/toggle-search.js +0 -3
  171. package/dist/src/ui/ui-config.js +0 -16
  172. package/dist/src/utils/cat-color.js +0 -17
  173. package/dist/src/utils/cn.js +0 -5
  174. package/dist/src/utils/gesture.js +0 -8
  175. package/dist/src/utils/ref.js +0 -1
  176. package/dist/src/utils/runtimeVisibility.js +1 -22
  177. package/dist/src/utils/surface-radius.js +0 -11
  178. package/dist/src/utils/useDragSensors.js +0 -4
  179. package/dist/tokens/src/tailwind-preset.mjs +0 -3
  180. package/package.json +3 -3
  181. package/scripts/build-brand-assets.mjs +0 -8
  182. package/shell/src/AppShell.tsx +0 -37
  183. package/shell/src/AppSidebar.tsx +0 -14
  184. package/shell/src/ButtonTrack.tsx +0 -1
  185. package/shell/src/PageHeaderBar.tsx +0 -61
  186. package/shell/src/PageWrapper.tsx +0 -26
  187. package/shell/src/PillTabs.tsx +0 -1
  188. package/shell/src/SessionsHoverCard.tsx +0 -40
  189. package/shell/src/SidePanelTabs.tsx +0 -61
  190. package/shell/src/Sidebar.tsx +0 -1
  191. package/shell/src/SidebarAccountMenu.tsx +1 -41
  192. package/shell/src/SidebarChrome.tsx +0 -32
  193. package/shell/src/SidebarIconTooltip.tsx +0 -3
  194. package/shell/src/SidebarPanel.tsx +0 -20
  195. package/shell/src/SidebarRail.tsx +0 -44
  196. package/shell/src/SidebarResize.tsx +0 -6
  197. package/shell/src/SidebarUpgradeCard.tsx +0 -2
  198. package/shell/src/SignOutDialog.tsx +0 -6
  199. package/shell/src/app-shell-classes.ts +0 -15
  200. package/shell/src/index.ts +0 -1
  201. package/shell/src/shell-panel-motion.ts +0 -11
  202. package/shell/src/shell-variant.ts +0 -6
  203. package/src/ai-elements/__snapshots__/queue.test.tsx.snap +2 -2
  204. package/src/ai-elements/activity-question.tsx +0 -2
  205. package/src/ai-elements/activity-shared.tsx +0 -11
  206. package/src/ai-elements/activity-step-detail.tsx +0 -2
  207. package/src/ai-elements/activity-step-label.ts +0 -5
  208. package/src/ai-elements/activity-step-types.ts +0 -24
  209. package/src/ai-elements/activity-tasks-utils.ts +0 -13
  210. package/src/ai-elements/activity-tasks.tsx +0 -61
  211. package/src/ai-elements/artifact.tsx +0 -7
  212. package/src/ai-elements/attachments.tsx +0 -33
  213. package/src/ai-elements/chat-day-divider.tsx +0 -3
  214. package/src/ai-elements/chat-jump-rail.tsx +0 -9
  215. package/src/ai-elements/code-block.tsx +0 -28
  216. package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
  217. package/src/ai-elements/context.tsx +0 -10
  218. package/src/ai-elements/conversation.tsx +0 -16
  219. package/src/ai-elements/jump-rail.tsx +0 -31
  220. package/src/ai-elements/message.tsx +3 -34
  221. package/src/ai-elements/model-picker-content.tsx +0 -17
  222. package/src/ai-elements/model-picker-types.ts +0 -5
  223. package/src/ai-elements/model-picker.tsx +0 -36
  224. package/src/ai-elements/model-selector.tsx +0 -5
  225. package/src/ai-elements/prompt-input-speech.tsx +0 -11
  226. package/src/ai-elements/prompt-input.tsx +0 -26
  227. package/src/ai-elements/provider-icon.tsx +0 -2
  228. package/src/ai-elements/queue.tsx +2 -20
  229. package/src/ai-elements/reasoning.tsx +0 -4
  230. package/src/ai-elements/shimmer.tsx +0 -16
  231. package/src/ai-elements/simple-model-ladder.tsx +0 -1
  232. package/src/ai-elements/speech-input.tsx +0 -6
  233. package/src/ai-elements/test-results.tsx +0 -5
  234. package/src/ai-elements/trace.tsx +0 -2
  235. package/src/ai-elements/web-preview.tsx +0 -7
  236. package/src/artifacts/artifact-card.tsx +1 -8
  237. package/src/artifacts/artifact-dialogs.tsx +0 -4
  238. package/src/artifacts/artifact-frame.tsx +0 -10
  239. package/src/artifacts/artifact-list-toolbar.tsx +0 -6
  240. package/src/artifacts/artifact-list.tsx +0 -4
  241. package/src/artifacts/artifact-type-icon.tsx +0 -1
  242. package/src/artifacts/artifact-versions-menu.tsx +0 -3
  243. package/src/artifacts/artifact-viewer.tsx +2 -6
  244. package/src/artifacts/types.ts +0 -1
  245. package/src/audio/playChime.ts +0 -1
  246. package/src/audio/playTone.ts +0 -7
  247. package/src/brand/AppIcons.tsx +0 -5
  248. package/src/brand/AppMark.tsx +0 -6
  249. package/src/brand/AppWordmark.tsx +0 -10
  250. package/src/brand/familyApps.ts +0 -2
  251. package/src/brand/svg.ts +0 -9
  252. package/src/client.ts +0 -34
  253. package/src/composer/Composer.tsx +0 -70
  254. package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
  255. package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
  256. package/src/composer/input-area/FadePresence.tsx +0 -4
  257. package/src/composer/input-area/InputActions.tsx +0 -5
  258. package/src/composer/input-area/InputArea.tsx +1 -28
  259. package/src/composer/input-area/InputAreaEditor.tsx +0 -39
  260. package/src/composer/input-area/InputBanners.tsx +0 -1
  261. package/src/composer/input-area/PromoBanner.tsx +0 -1
  262. package/src/composer/input-area/composerPrediction.ts +0 -2
  263. package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
  264. package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
  265. package/src/composer/prediction.ts +0 -6
  266. package/src/composer/useComposerPrediction.ts +0 -2
  267. package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
  268. package/src/generative-ui/content.tsx +0 -2
  269. package/src/generative-ui/index.ts +0 -3
  270. package/src/generative-ui/layout.tsx +0 -5
  271. package/src/hooks/use-count-up-display.ts +0 -1
  272. package/src/hooks/use-idle-callback.ts +0 -5
  273. package/src/hooks/use-persisted-scroll-parent.ts +0 -4
  274. package/src/hooks/use-single-flight.ts +0 -5
  275. package/src/icons/animated/animated-bell-icon.tsx +0 -6
  276. package/src/icons/animated/animated-counter.tsx +0 -5
  277. package/src/icons/animated/animated-key-icon.tsx +0 -4
  278. package/src/icons/animated/animated-notification-icon.tsx +0 -14
  279. package/src/icons/animated/animated-progress.tsx +0 -10
  280. package/src/icons/animated/animated-status-dot.tsx +0 -4
  281. package/src/icons/animated/index.ts +0 -4
  282. package/src/icons/animated/morphing-menu-icon.tsx +0 -5
  283. package/src/icons/animated/morphing-mic-icon.tsx +0 -2
  284. package/src/icons/animated/pulsing-rings.tsx +0 -4
  285. package/src/icons/automation-icon.tsx +0 -1
  286. package/src/icons/board-icon.tsx +13 -10
  287. package/src/icons/bolt-icon.tsx +5 -4
  288. package/src/icons/building-icon.tsx +11 -9
  289. package/src/icons/draft-icon.tsx +0 -1
  290. package/src/icons/files-icon.tsx +9 -5
  291. package/src/icons/inbox-arrow-icon.tsx +0 -1
  292. package/src/icons/inbox-icon.tsx +9 -5
  293. package/src/icons/index.ts +12 -1
  294. package/src/icons/memory-icon.tsx +9 -11
  295. package/src/icons/nav-icon-base.tsx +0 -10
  296. package/src/icons/search-icon.tsx +7 -6
  297. package/src/icons/settings-icon.tsx +11 -13
  298. package/src/icons/sidebar-toggle-icon.tsx +0 -1
  299. package/src/icons/solid-icons.tsx +138 -0
  300. package/src/icons/with-active.tsx +14 -0
  301. package/src/index.ts +0 -30
  302. package/src/kibo/gantt-features.tsx +0 -16
  303. package/src/kibo/gantt-header.tsx +0 -4
  304. package/src/kibo/gantt-provider.tsx +0 -36
  305. package/src/kibo/gantt-sidebar.tsx +0 -7
  306. package/src/kibo/gantt-timeline.tsx +0 -4
  307. package/src/kibo/kanban.tsx +0 -49
  308. package/src/kibo/list.tsx +0 -8
  309. package/src/kibo/theme-switcher.tsx +0 -5
  310. package/src/kibo/video-player.tsx +0 -9
  311. package/src/logos/index.ts +0 -3
  312. package/src/logos/logo-svg.tsx +0 -5
  313. package/src/markdown/Markdown.tsx +0 -20
  314. package/src/markdown/MarkdownCodeBlock.tsx +0 -14
  315. package/src/markdown/MarkdownInlineCode.tsx +0 -6
  316. package/src/markdown/MarkdownLink.tsx +0 -4
  317. package/src/markdown/codeFence.ts +0 -3
  318. package/src/markdown/codeHighlight.ts +0 -16
  319. package/src/markdown/incrementalBlocks.ts +0 -49
  320. package/src/markdown/markdownClipboard.ts +0 -12
  321. package/src/markdown/mermaid.ts +0 -22
  322. package/src/markdown/rehypeGithubAlerts.ts +0 -3
  323. package/src/markdown/useSmoothText.ts +0 -5
  324. package/src/marketing/FloatingBar.tsx +0 -3
  325. package/src/marketing/PricingModal.tsx +0 -45
  326. package/src/marketing/ProductHero.tsx +0 -23
  327. package/src/marketing/ProductHeroOrbit.tsx +0 -5
  328. package/src/marketing/SiteFooter.tsx +0 -23
  329. package/src/marketing/SiteHeader.tsx +0 -14
  330. package/src/marketing/VProPricingModal.tsx +0 -5
  331. package/src/marketing/createLandingKit.tsx +0 -12
  332. package/src/marketing/landing.tsx +0 -12
  333. package/src/marketing/marketing-classes.ts +0 -7
  334. package/src/motion/dock-motion.ts +0 -25
  335. package/src/motion/list-enter.tsx +0 -4
  336. package/src/motion/panel-transition.tsx +0 -5
  337. package/src/ui/_field-classes.ts +0 -2
  338. package/src/ui/_menu-classes.ts +7 -4
  339. package/src/ui/_menu-parts.tsx +0 -5
  340. package/src/ui/_picker-classes.ts +0 -6
  341. package/src/ui/accordion.alt.tsx +0 -8
  342. package/src/ui/accordion.tsx +0 -4
  343. package/src/ui/badge.tsx +0 -1
  344. package/src/ui/border-beam.tsx +0 -11
  345. package/src/ui/breadcrumb.tsx +0 -13
  346. package/src/ui/bulk-action-bar.tsx +0 -24
  347. package/src/ui/button.tsx +0 -27
  348. package/src/ui/calendar.tsx +0 -18
  349. package/src/ui/card.tsx +0 -3
  350. package/src/ui/carousel.tsx +0 -4
  351. package/src/ui/checkbox.tsx +0 -1
  352. package/src/ui/clear-input.alt.tsx +0 -8
  353. package/src/ui/clear-input.tsx +0 -16
  354. package/src/ui/clearInputDissolve.ts +0 -4
  355. package/src/ui/command.tsx +0 -22
  356. package/src/ui/confetti-burst.tsx +0 -4
  357. package/src/ui/confirm-dialog-parts.tsx +0 -45
  358. package/src/ui/confirm-dialog.tsx +0 -26
  359. package/src/ui/context-menu.tsx +4 -11
  360. package/src/ui/count-pop.tsx +0 -2
  361. package/src/ui/crossfade-icon.tsx +0 -3
  362. package/src/ui/date-picker.tsx +0 -40
  363. package/src/ui/dialog.tsx +0 -18
  364. package/src/ui/dropdown-menu.tsx +4 -12
  365. package/src/ui/empty-state.tsx +0 -15
  366. package/src/ui/error-boundary.tsx +0 -7
  367. package/src/ui/field.tsx +0 -18
  368. package/src/ui/hover-card.tsx +0 -6
  369. package/src/ui/image-lightbox.tsx +0 -7
  370. package/src/ui/input-group.alt.tsx +0 -16
  371. package/src/ui/input-group.tsx +0 -3
  372. package/src/ui/kbd.tsx +0 -3
  373. package/src/ui/label.tsx +0 -1
  374. package/src/ui/labeled-slider-row.tsx +0 -2
  375. package/src/ui/list-row.tsx +0 -46
  376. package/src/ui/loading-state.tsx +0 -23
  377. package/src/ui/marquee-on-hover.tsx +1 -6
  378. package/src/ui/media-preview.tsx +0 -5
  379. package/src/ui/modalTransition.ts +0 -25
  380. package/src/ui/overlay-a11y.ts +0 -1
  381. package/src/ui/page-title.tsx +0 -4
  382. package/src/ui/popover.tsx +0 -8
  383. package/src/ui/progress.tsx +0 -1
  384. package/src/ui/refresh-spin-icon.tsx +0 -11
  385. package/src/ui/relative-date-time.tsx +0 -3
  386. package/src/ui/rolling-number.tsx +0 -2
  387. package/src/ui/search-input.tsx +0 -9
  388. package/src/ui/select-field.tsx +0 -5
  389. package/src/ui/select.tsx +0 -8
  390. package/src/ui/send-queue-icon.tsx +0 -3
  391. package/src/ui/separator.tsx +0 -1
  392. package/src/ui/sheet.tsx +0 -42
  393. package/src/ui/slide-over-panel.tsx +0 -2
  394. package/src/ui/slider.tsx +21 -9
  395. package/src/ui/sonner-icons.tsx +0 -4
  396. package/src/ui/sonner.tsx +0 -78
  397. package/src/ui/spinner.tsx +0 -50
  398. package/src/ui/status-dot.tsx +0 -10
  399. package/src/ui/surface.tsx +0 -13
  400. package/src/ui/switch.tsx +72 -3
  401. package/src/ui/table.tsx +0 -3
  402. package/src/ui/tabs-transition.tsx +0 -12
  403. package/src/ui/tabs.tsx +0 -17
  404. package/src/ui/tabsSliding.ts +0 -5
  405. package/src/ui/time-picker.tsx +0 -17
  406. package/src/ui/toggle-search.tsx +0 -6
  407. package/src/ui/toolbar-search-input.tsx +0 -3
  408. package/src/ui/tooltip.tsx +0 -5
  409. package/src/ui/ui-config.tsx +0 -19
  410. package/src/utils/cat-color.ts +0 -20
  411. package/src/utils/cn.ts +0 -4
  412. package/src/utils/gesture.ts +0 -8
  413. package/src/utils/ref.ts +0 -1
  414. package/src/utils/runtimeVisibility.ts +0 -19
  415. package/src/utils/surface-radius.ts +0 -11
  416. package/src/utils/useDragSensors.ts +0 -2
  417. package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
  418. package/tokens/examples/toaster/Fixture.tsx +0 -4
  419. package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
  420. package/tokens/examples/toaster/vite.config.ts +0 -2
  421. package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
  422. package/tokens/examples/tokens-moved/vite.config.ts +0 -2
  423. package/tokens/src/tailwind-preset.mjs +0 -3
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));
@@ -6,33 +6,19 @@ import {
6
6
  subscribeDocumentAppearance,
7
7
  } from "../hooks/use-document-appearance";
8
8
 
9
- /**
10
- * Mermaid for markdown, loaded on first use. `@streamdown/mermaid` imports
11
- * mermaid statically, so a plain plugin import put mermaid in every chunk
12
- * that renders markdown. Here the plugin is a dynamic import that runs only
13
- * when a finished mermaid fence mounts.
14
- *
15
- * One render serves two readers: `MarkdownMermaid` waits for it to decide
16
- * diagram or plain code block (a diagram that will not parse stays code), and
17
- * Streamdown's diagram view gets the same cached SVG through `mermaidPlugin`.
18
- */
19
-
20
9
  type MermaidTheme = Extract<MermaidConfig["theme"], "default" | "dark">;
21
- /** `id` is the element id mermaid baked into `svg` (its styles and markers use it). */
22
10
  type RenderResult = { svg: string; id: string };
23
11
  type Entry = {
24
12
  promise: Promise<RenderResult>;
25
13
  status: "pending" | "done" | "error";
26
14
  };
27
15
 
28
- /** Enough for every diagram on screen plus scroll-back; oldest dropped. */
29
16
  const CACHE_LIMIT = 50;
30
17
 
31
18
  const cache = new Map<string, Entry>();
32
19
  const listeners = new Map<string, Set<() => void>>();
33
20
 
34
21
  let pluginPromise: Promise<DiagramPlugin> | null = null;
35
- /** `initialize` is global to mermaid, so set-theme-then-render runs one at a time. */
36
22
  let queue: Promise<unknown> = Promise.resolve();
37
23
  let renderCount = 0;
38
24
 
@@ -40,7 +26,6 @@ function loadPlugin(): Promise<DiagramPlugin> {
40
26
  pluginPromise ??= import("@streamdown/mermaid").then(
41
27
  (module) => module.mermaid,
42
28
  (error) => {
43
- // A failed chunk load may succeed later; do not cache the failure.
44
29
  pluginPromise = null;
45
30
  throw error;
46
31
  },
@@ -52,7 +37,6 @@ function renderNow(theme: MermaidTheme, code: string): Promise<RenderResult> {
52
37
  const job = queue.then(async () => {
53
38
  const plugin = await loadPlugin();
54
39
  renderCount += 1;
55
- // The `-svg` suffix keeps one id from being a prefix of another.
56
40
  const id = `markdown-mermaid-${renderCount}-svg`;
57
41
  const { svg } = await plugin.getMermaid({ theme }).render(id, code);
58
42
  return { svg, id };
@@ -68,7 +52,6 @@ function cacheKey(theme: MermaidTheme, code: string): string {
68
52
  function store(key: string, entry: Entry): void {
69
53
  cache.delete(key);
70
54
  cache.set(key, entry);
71
- // Drop the oldest entries nobody is watching; mounted diagrams stay.
72
55
  for (const candidate of cache.keys()) {
73
56
  if (cache.size <= CACHE_LIMIT) return;
74
57
  if (!listeners.has(candidate)) cache.delete(candidate);
@@ -84,7 +67,6 @@ function request(theme: MermaidTheme, code: string): Entry {
84
67
  const entry: Entry = { promise, status: "pending" };
85
68
  store(key, entry);
86
69
  const settle = (status: Entry["status"]) => {
87
- // An entry evicted (or replaced) while pending stays gone.
88
70
  if (cache.get(key)?.promise !== promise) return;
89
71
  store(key, { promise, status });
90
72
  for (const notify of listeners.get(key) ?? []) notify();
@@ -106,7 +88,6 @@ function subscribe(key: string, notify: () => void): () => void {
106
88
  };
107
89
  }
108
90
 
109
- /** Mermaid's theme for the page's current appearance (neutral is dark-family). */
110
91
  function readTheme(): MermaidTheme {
111
92
  return readDocumentAppearance() === "dark" ? "dark" : "default";
112
93
  }
@@ -121,9 +102,6 @@ export const mermaidPlugin: DiagramPlugin = {
121
102
  language: "mermaid",
122
103
  getMermaid: () => ({
123
104
  initialize: () => {},
124
- // The cached SVG is shared, so give each copy the caller's unique id:
125
- // two copies with one id (inline + fullscreen, or a repeated diagram)
126
- // would share `#id` styles and `url(#id_marker)` references.
127
105
  render: (id, code) =>
128
106
  request(readTheme(), code).promise.then((result) => ({
129
107
  svg: result.svg.replaceAll(result.id, id),
@@ -39,7 +39,6 @@ function isBlank(node: HastNode): boolean {
39
39
  return node.type === "text" && (node.value ?? "").trim() === "";
40
40
  }
41
41
 
42
- /** Tags `blockquote` as an alert and strips its marker, if it has one. */
43
42
  function convert(blockquote: HastNode): void {
44
43
  const paragraph = blockquote.children?.find((child) => !isBlank(child));
45
44
  if (!paragraph || !isElement(paragraph, "p") || !paragraph.children) return;
@@ -52,8 +51,6 @@ function convert(blockquote: HastNode): void {
52
51
  const endsLine = match[2] !== "";
53
52
  const rest = (first.value ?? "").slice(match[0].length);
54
53
  if (!endsLine) {
55
- // Marker ran to the end of the text node: the line ends only if a hard
56
- // break (remark-breaks) or nothing follows it.
57
54
  if (second !== undefined && !isElement(second, "br")) return;
58
55
  paragraph.children.splice(1, second === undefined ? 0 : 1);
59
56
  const next = paragraph.children[1];
@@ -1,9 +1,5 @@
1
1
  import { useEffect, useRef, useState } from "react";
2
2
 
3
- /**
4
- * Share of the unshown text revealed on each frame. A burst of 400 characters
5
- * plays out over about half a second; a trickle shows as it arrives.
6
- */
7
3
  const REVEAL_PER_FRAME = 0.08;
8
4
 
9
5
  /**
@@ -18,7 +14,6 @@ export function useSmoothText(target: string, live: boolean): string {
18
14
 
19
15
  useEffect(() => {
20
16
  if (!live) return;
21
- // A rewrite can shorten the text; never point past its end.
22
17
  lengthRef.current = Math.min(lengthRef.current, target.length);
23
18
  let frame = 0;
24
19
  function tick() {
@@ -3,11 +3,8 @@ import { floatingSurfaceClass } from "../ui/_menu-classes";
3
3
  import { cn } from "../utils/cn";
4
4
 
5
5
  export type FloatingBarProps = {
6
- /** The bar's content, laid out in one row. */
7
6
  children: ReactNode;
8
- /** Classes for the fixed `<header>` wrapper, for example an entrance animation. */
9
7
  className?: string;
10
- /** Classes for the pill itself, for example another `max-w-*`. */
11
8
  barClassName?: string;
12
9
  };
13
10
 
@@ -13,121 +13,77 @@ import { pricingModalClasses, pricingMultiClasses, type PricingModalTone } from
13
13
  export type PricingModalPeriod = "month" | "year";
14
14
 
15
15
  export type PricingModalLegacyProps = {
16
- /** Absent in the single-plan layout. Set `plans` for the multi-plan layout. */
17
16
  plans?: undefined;
18
17
  open: boolean;
19
- /** Called when the dialog asks to close and by the `closeButton`. */
20
18
  onClose: () => void;
21
- /** Accessible dialog title, for example "Pro". Not visible. */
22
19
  title: string;
23
- /** Accessible description. Not visible. When set, the title is an `sr-only` `DialogTitle` followed by this. */
24
20
  description?: string;
25
- /** Logo before the wordmark: `dark` shows in dark mode, `light` in light mode. 28px. */
26
21
  logo: { dark: string; light: string };
27
- /** Text after the logo, before the PRO badge. */
28
22
  wordmark: string;
29
- /** For example "$9". */
30
23
  price: string;
31
- /** Adds a monthly/yearly toggle. Without it the modal is monthly only and `price` is the only price. */
32
24
  yearly?: {
33
- /** Yearly price per month, for example "$8.33". */
34
25
  pricePerMonth: string;
35
- /** Yearly total shown in the note, for example "$100". */
36
26
  total?: string;
37
- /** Badge on the yearly option. Default "Save 2 months". */
38
27
  saveLabel?: string;
39
28
  };
40
- /** Selected period, when the parent controls it. Needs `yearly`. */
41
29
  billingPeriod?: PricingModalPeriod;
42
- /** Called with the period the user picks. */
43
30
  onBillingPeriodChange?: (period: PricingModalPeriod) => void;
44
- /** Initial period when `billingPeriod` is not set. Default `"month"`. */
45
31
  defaultBillingPeriod?: PricingModalPeriod;
46
32
  tagline: ReactNode;
47
- /** Extra font class on the tagline, placed after `max-w-[28ch]`. */
48
33
  taglineFontClassName?: string;
49
- /** Plan features under "What you get". */
50
34
  features: readonly string[];
51
- /** Label of the full-width checkout button. Default "Get Pro". */
52
35
  ctaLabel?: string;
53
- /** Wraps the checkout button, for example in the billing provider's checkout and signed-in gates. `period` is the selected period, for `planPeriod`; it is always `"month"` without `yearly`. */
54
36
  renderCheckout: (button: ReactElement, period: PricingModalPeriod) => ReactNode;
55
- /** Second, compact close button in the top-right corner. Default `false`. */
56
37
  closeButton?: boolean;
57
- /** Secondary text colour class. Default `"muted"`. */
58
38
  tone?: PricingModalTone;
59
39
  };
60
40
 
61
41
  export type PricingPlanBenefit = {
62
42
  label: ReactNode;
63
- /** `"check"` (default) or an app mark. */
64
43
  icon?: "check" | AppName;
65
- /** Dimmed row. */
66
44
  muted?: boolean;
67
45
  };
68
46
 
69
47
  export type PricingPlan = {
70
48
  id: string;
71
49
  name: string;
72
- /** Display strings per month, for example `{ month: "$10", year: "$8" }`. The yearly price is still per month. */
73
50
  price: { month: string; year: string };
74
- /** Default "Get started". */
75
51
  ctaLabel?: string;
76
- /** Line above the highlight, for example "Everything in Free, and:". */
77
52
  intro?: ReactNode;
78
- /** Large title with small text under it. */
79
53
  highlight?: { title: string; description: string };
80
54
  benefits?: readonly PricingPlanBenefit[];
81
- /**
82
- * Grouped per app, shown after `benefits`. The `currentApp` group comes first, the rest keep the array order.
83
- * The `featured` / `highlighted` plan defaults to `V_PRO_APP_BENEFITS` when this is omitted, so apps usually pass only `currentApp`. Other plans show none unless set.
84
- */
85
55
  appBenefits?: readonly PricingPlanAppBenefit[];
86
- /** The plan the user is on: the button reads "Current plan" and is disabled. */
87
56
  current?: boolean;
88
- /** Subtle ring on the card. `highlighted` is an alias. */
89
57
  featured?: boolean;
90
58
  highlighted?: boolean;
91
- /** Text after the price. Default "/month". */
92
59
  periodSuffix?: string;
93
60
  };
94
61
 
95
62
  export type PricingModalMultiProps = {
96
63
  open: boolean;
97
64
  onClose: () => void;
98
- /** Accessible dialog title. Not visible. */
99
65
  title: string;
100
- /** Accessible description. Not visible. */
101
66
  description?: string;
102
- /** Cards, left to right. Sized for 1 to 4. */
103
67
  plans: readonly PricingPlan[];
104
- /** App marks at the top left. Family apps only: each links to its `FAMILY_APPS` site. */
105
68
  apps?: readonly FamilyAppName[];
106
- /** App the dialog is shown in. Its `appBenefits` group comes first. */
107
69
  currentApp?: ProductAppName;
108
- /** Centred headline, for example "One plan. Every V app." */
109
70
  headline?: ReactNode;
110
- /** Small print under the cards. */
111
71
  finePrint?: ReactNode;
112
72
  billingPeriod?: PricingModalPeriod;
113
73
  onBillingPeriodChange?: (period: PricingModalPeriod) => void;
114
- /** Default `"month"`. */
115
74
  defaultBillingPeriod?: PricingModalPeriod;
116
- /** Wraps each plan's button, for example in the billing provider's checkout. Not called for the `current` plan. */
117
75
  renderCheckout: (button: ReactElement, plan: PricingPlan, period: PricingModalPeriod) => ReactNode;
118
76
  tone?: PricingModalTone;
119
77
  };
120
78
 
121
79
  export type PricingModalProps = PricingModalLegacyProps | PricingModalMultiProps;
122
80
 
123
- /** Upgrade dialog. With `plans`: wide multi-plan layout. Without: the single-plan layout. */
124
81
  function AppIcon({ app, ...props }: AppIconProps & { app: AppName }) {
125
82
  const Icon = APP_ICONS[app];
126
83
  return <Icon {...props} />;
127
84
  }
128
85
 
129
86
  function sortAppBenefits(groups: readonly PricingPlanAppBenefit[], currentApp?: AppName) {
130
- // Stable sort: the current app moves to the front, the rest keep their order.
131
87
  return [...groups].sort((a, b) => Number(b.app === currentApp) - Number(a.app === currentApp));
132
88
  }
133
89
 
@@ -302,7 +258,6 @@ function PricingModalMulti({
302
258
  <DialogContent
303
259
  ref={contentRef}
304
260
  hideCloseButton
305
- // Focus the dialog, not the first segment button, so no ring shows on open.
306
261
  onOpenAutoFocus={(event) => {
307
262
  event.preventDefault();
308
263
  contentRef.current?.focus();