@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.
- package/app/src/auth/useStableAuth.ts +0 -2
- package/app/src/confirm/ConfirmSkipHint.tsx +0 -2
- package/app/src/confirm/useAltHeld.ts +0 -17
- package/app/src/convex/ConvexClerkProvider.tsx +0 -3
- package/app/src/convex/env.ts +0 -4
- package/app/src/convex/errorMessage.ts +0 -1
- package/app/src/convex/useHeldResult.ts +0 -3
- package/app/src/page-motion/PageMotionProvider.tsx +0 -6
- package/app/src/page-title/createPageTitleContext.tsx +0 -14
- package/app/src/settings/SettingsEmptyState.tsx +0 -4
- package/app/src/settings/SettingsField.tsx +0 -4
- package/app/src/settings/SettingsPage.tsx +0 -12
- package/app/src/settings/SettingsSection.tsx +0 -14
- package/app/src/settings/ThemeModePicker.tsx +0 -6
- package/app/src/theme/createThemeProvider.tsx +0 -33
- package/app/src/time/compactRelativeTime.ts +0 -16
- package/app/src/update/staleDeployReload.ts +0 -40
- package/app/src/update/updateWatcher.ts +0 -8
- package/dist/app/src/auth/useStableAuth.js +0 -1
- package/dist/app/src/confirm/ConfirmSkipHint.js +0 -3
- package/dist/app/src/confirm/useAltHeld.js +0 -17
- package/dist/app/src/convex/env.js +0 -3
- package/dist/app/src/convex/errorMessage.js +0 -2
- package/dist/app/src/settings/ThemeModePicker.js +0 -1
- package/dist/app/src/theme/createThemeProvider.js +1 -11
- package/dist/app/src/time/compactRelativeTime.js +0 -8
- package/dist/app/src/update/staleDeployReload.js +3 -38
- package/dist/app/src/update/updateWatcher.js +1 -3
- package/dist/shell/src/AppShell.js +0 -14
- package/dist/shell/src/PageHeaderBar.js +0 -3
- package/dist/shell/src/SessionsHoverCard.js +0 -9
- package/dist/shell/src/SidePanelTabs.js +0 -36
- package/dist/shell/src/Sidebar.js +0 -1
- package/dist/shell/src/SidebarAccountMenu.js +1 -1
- package/dist/shell/src/SidebarChrome.js +0 -19
- package/dist/shell/src/SidebarIconTooltip.js +0 -1
- package/dist/shell/src/SidebarRail.js +0 -12
- package/dist/shell/src/SidebarResize.js +1 -4
- package/dist/shell/src/app-shell-classes.js +0 -10
- package/dist/shell/src/index.js +0 -1
- package/dist/shell/src/shell-panel-motion.js +0 -12
- package/dist/src/ai-elements/activity-shared.js +0 -6
- package/dist/src/ai-elements/activity-step-label.js +0 -6
- package/dist/src/ai-elements/activity-step-types.js +0 -4
- package/dist/src/ai-elements/activity-tasks-utils.js +0 -17
- package/dist/src/ai-elements/activity-tasks.js +0 -55
- package/dist/src/ai-elements/artifact.js +0 -4
- package/dist/src/ai-elements/attachments.js +0 -41
- package/dist/src/ai-elements/code-block.js +0 -18
- package/dist/src/ai-elements/collapsible-user-message-body.js +0 -2
- package/dist/src/ai-elements/context.js +0 -13
- package/dist/src/ai-elements/conversation.js +0 -4
- package/dist/src/ai-elements/jump-rail.js +0 -5
- package/dist/src/ai-elements/message.js +3 -9
- package/dist/src/ai-elements/model-picker-types.js +0 -1
- package/dist/src/ai-elements/model-picker.js +1 -6
- package/dist/src/ai-elements/model-selector.js +0 -4
- package/dist/src/ai-elements/prompt-input-speech.js +0 -13
- package/dist/src/ai-elements/prompt-input.js +0 -1
- package/dist/src/ai-elements/provider-icon.js +0 -4
- package/dist/src/ai-elements/queue.js +2 -16
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-card.js +1 -1
- package/dist/src/artifacts/artifact-frame.js +0 -2
- package/dist/src/artifacts/artifact-viewer.js +2 -1
- package/dist/src/audio/playChime.js +0 -2
- package/dist/src/audio/playTone.js +1 -4
- package/dist/src/brand/AppWordmark.js +0 -5
- package/dist/src/brand/svg.js +0 -6
- package/dist/src/client.js +0 -43
- package/dist/src/composer/Composer.js +0 -27
- package/dist/src/composer/input-area/InputArea.js +0 -3
- package/dist/src/composer/input-area/InputAreaEditor.js +1 -50
- package/dist/src/composer/input-area/composerPrediction.js +0 -3
- package/dist/src/generative-ui/content.js +0 -2
- package/dist/src/generative-ui/index.js +0 -3
- package/dist/src/generative-ui/layout.js +0 -5
- package/dist/src/hooks/use-count-up-display.js +0 -2
- package/dist/src/hooks/use-idle-callback.js +0 -3
- package/dist/src/hooks/use-persisted-scroll-parent.js +1 -8
- package/dist/src/icons/animated/index.js +0 -4
- package/dist/src/icons/board-icon.js +74 -41
- package/dist/src/icons/bolt-icon.js +30 -20
- package/dist/src/icons/building-icon.js +125 -61
- package/dist/src/icons/files-icon.js +103 -43
- package/dist/src/icons/inbox-icon.js +101 -49
- package/dist/src/icons/index.js +2 -1
- package/dist/src/icons/memory-icon.js +135 -58
- package/dist/src/icons/search-icon.js +143 -46
- package/dist/src/icons/settings-icon.js +113 -53
- package/dist/src/icons/solid-icons.js +665 -0
- package/dist/src/icons/with-active.js +25 -0
- package/dist/src/index.js +0 -40
- package/dist/src/kibo/gantt-features.js +0 -10
- package/dist/src/kibo/gantt-provider.js +0 -34
- package/dist/src/kibo/kanban.js +0 -15
- package/dist/src/kibo/list.js +0 -3
- package/dist/src/kibo/video-player.js +0 -7
- package/dist/src/logos/index.js +0 -4
- package/dist/src/markdown/Markdown.js +0 -15
- package/dist/src/markdown/MarkdownCodeBlock.js +0 -16
- package/dist/src/markdown/MarkdownInlineCode.js +0 -6
- package/dist/src/markdown/MarkdownLink.js +0 -5
- package/dist/src/markdown/codeFence.js +0 -1
- package/dist/src/markdown/codeHighlight.js +0 -19
- package/dist/src/markdown/incrementalBlocks.js +0 -45
- package/dist/src/markdown/markdownClipboard.js +0 -13
- package/dist/src/markdown/mermaid.js +0 -25
- package/dist/src/markdown/rehypeGithubAlerts.js +0 -4
- package/dist/src/markdown/useSmoothText.js +0 -5
- package/dist/src/marketing/PricingModal.js +0 -2
- package/dist/src/marketing/ProductHero.js +0 -2
- package/dist/src/marketing/createLandingKit.js +0 -5
- package/dist/src/marketing/marketing-classes.js +0 -7
- package/dist/src/motion/dock-motion.js +0 -27
- package/dist/src/motion/panel-transition.js +0 -2
- package/dist/src/ui/_field-classes.js +0 -3
- package/dist/src/ui/_menu-classes.js +6 -6
- package/dist/src/ui/_picker-classes.js +0 -9
- package/dist/src/ui/accordion.alt.js +0 -12
- package/dist/src/ui/badge.js +0 -1
- package/dist/src/ui/border-beam.js +0 -2
- package/dist/src/ui/breadcrumb.js +0 -15
- package/dist/src/ui/bulk-action-bar.js +0 -11
- package/dist/src/ui/button.js +0 -20
- package/dist/src/ui/calendar.js +1 -20
- package/dist/src/ui/card.js +0 -3
- package/dist/src/ui/carousel.js +0 -1
- package/dist/src/ui/clear-input.alt.js +0 -9
- package/dist/src/ui/clearInputDissolve.js +0 -4
- package/dist/src/ui/command.js +0 -15
- package/dist/src/ui/confetti-burst.js +0 -3
- package/dist/src/ui/confirm-dialog-parts.js +0 -11
- package/dist/src/ui/confirm-dialog.js +0 -6
- package/dist/src/ui/context-menu.js +40 -34
- package/dist/src/ui/crossfade-icon.js +0 -2
- package/dist/src/ui/date-picker.js +0 -22
- package/dist/src/ui/dialog.js +0 -5
- package/dist/src/ui/dropdown-menu.js +40 -34
- package/dist/src/ui/empty-state.js +0 -7
- package/dist/src/ui/field.js +0 -21
- package/dist/src/ui/image-lightbox.js +0 -5
- package/dist/src/ui/input-group.alt.js +0 -24
- package/dist/src/ui/input-group.js +0 -4
- package/dist/src/ui/kbd.js +0 -3
- package/dist/src/ui/loading-state.js +0 -17
- package/dist/src/ui/marquee-on-hover.js +0 -3
- package/dist/src/ui/media-preview.js +0 -2
- package/dist/src/ui/modalTransition.js +0 -33
- package/dist/src/ui/overlay-a11y.js +0 -1
- package/dist/src/ui/page-title.js +0 -3
- package/dist/src/ui/refresh-spin-icon.js +0 -12
- package/dist/src/ui/search-input.js +0 -1
- package/dist/src/ui/select-field.js +0 -1
- package/dist/src/ui/send-queue-icon.js +0 -3
- package/dist/src/ui/sheet.js +0 -33
- package/dist/src/ui/slider.js +103 -82
- package/dist/src/ui/sonner-icons.js +0 -5
- package/dist/src/ui/sonner.js +0 -60
- package/dist/src/ui/spinner.js +0 -35
- package/dist/src/ui/status-dot.js +0 -2
- package/dist/src/ui/surface.js +0 -14
- package/dist/src/ui/switch.js +213 -36
- package/dist/src/ui/table.js +0 -1
- package/dist/src/ui/tabs-transition.js +0 -1
- package/dist/src/ui/tabs.js +0 -17
- package/dist/src/ui/tabsSliding.js +0 -6
- package/dist/src/ui/time-picker.js +0 -15
- package/dist/src/ui/toggle-search.js +0 -3
- package/dist/src/ui/ui-config.js +0 -16
- package/dist/src/utils/cat-color.js +0 -17
- package/dist/src/utils/cn.js +0 -5
- package/dist/src/utils/gesture.js +0 -8
- package/dist/src/utils/ref.js +0 -1
- package/dist/src/utils/runtimeVisibility.js +1 -22
- package/dist/src/utils/surface-radius.js +0 -11
- package/dist/src/utils/useDragSensors.js +0 -4
- package/dist/tokens/src/tailwind-preset.mjs +0 -3
- package/package.json +3 -3
- package/scripts/build-brand-assets.mjs +0 -8
- package/shell/src/AppShell.tsx +0 -37
- package/shell/src/AppSidebar.tsx +0 -14
- package/shell/src/ButtonTrack.tsx +0 -1
- package/shell/src/PageHeaderBar.tsx +0 -61
- package/shell/src/PageWrapper.tsx +0 -26
- package/shell/src/PillTabs.tsx +0 -1
- package/shell/src/SessionsHoverCard.tsx +0 -40
- package/shell/src/SidePanelTabs.tsx +0 -61
- package/shell/src/Sidebar.tsx +0 -1
- package/shell/src/SidebarAccountMenu.tsx +1 -41
- package/shell/src/SidebarChrome.tsx +0 -32
- package/shell/src/SidebarIconTooltip.tsx +0 -3
- package/shell/src/SidebarPanel.tsx +0 -20
- package/shell/src/SidebarRail.tsx +0 -44
- package/shell/src/SidebarResize.tsx +0 -6
- package/shell/src/SidebarUpgradeCard.tsx +0 -2
- package/shell/src/SignOutDialog.tsx +0 -6
- package/shell/src/app-shell-classes.ts +0 -15
- package/shell/src/index.ts +0 -1
- package/shell/src/shell-panel-motion.ts +0 -11
- package/shell/src/shell-variant.ts +0 -6
- package/src/ai-elements/__snapshots__/queue.test.tsx.snap +2 -2
- package/src/ai-elements/activity-question.tsx +0 -2
- package/src/ai-elements/activity-shared.tsx +0 -11
- package/src/ai-elements/activity-step-detail.tsx +0 -2
- package/src/ai-elements/activity-step-label.ts +0 -5
- package/src/ai-elements/activity-step-types.ts +0 -24
- package/src/ai-elements/activity-tasks-utils.ts +0 -13
- package/src/ai-elements/activity-tasks.tsx +0 -61
- package/src/ai-elements/artifact.tsx +0 -7
- package/src/ai-elements/attachments.tsx +0 -33
- package/src/ai-elements/chat-day-divider.tsx +0 -3
- package/src/ai-elements/chat-jump-rail.tsx +0 -9
- package/src/ai-elements/code-block.tsx +0 -28
- package/src/ai-elements/collapsible-user-message-body.tsx +0 -2
- package/src/ai-elements/context.tsx +0 -10
- package/src/ai-elements/conversation.tsx +0 -16
- package/src/ai-elements/jump-rail.tsx +0 -31
- package/src/ai-elements/message.tsx +3 -34
- package/src/ai-elements/model-picker-content.tsx +0 -17
- package/src/ai-elements/model-picker-types.ts +0 -5
- package/src/ai-elements/model-picker.tsx +0 -36
- package/src/ai-elements/model-selector.tsx +0 -5
- package/src/ai-elements/prompt-input-speech.tsx +0 -11
- package/src/ai-elements/prompt-input.tsx +0 -26
- package/src/ai-elements/provider-icon.tsx +0 -2
- package/src/ai-elements/queue.tsx +2 -20
- package/src/ai-elements/reasoning.tsx +0 -4
- package/src/ai-elements/shimmer.tsx +0 -16
- package/src/ai-elements/simple-model-ladder.tsx +0 -1
- package/src/ai-elements/speech-input.tsx +0 -6
- package/src/ai-elements/test-results.tsx +0 -5
- package/src/ai-elements/trace.tsx +0 -2
- package/src/ai-elements/web-preview.tsx +0 -7
- package/src/artifacts/artifact-card.tsx +1 -8
- package/src/artifacts/artifact-dialogs.tsx +0 -4
- package/src/artifacts/artifact-frame.tsx +0 -10
- package/src/artifacts/artifact-list-toolbar.tsx +0 -6
- package/src/artifacts/artifact-list.tsx +0 -4
- package/src/artifacts/artifact-type-icon.tsx +0 -1
- package/src/artifacts/artifact-versions-menu.tsx +0 -3
- package/src/artifacts/artifact-viewer.tsx +2 -6
- package/src/artifacts/types.ts +0 -1
- package/src/audio/playChime.ts +0 -1
- package/src/audio/playTone.ts +0 -7
- package/src/brand/AppIcons.tsx +0 -5
- package/src/brand/AppMark.tsx +0 -6
- package/src/brand/AppWordmark.tsx +0 -10
- package/src/brand/familyApps.ts +0 -2
- package/src/brand/svg.ts +0 -9
- package/src/client.ts +0 -34
- package/src/composer/Composer.tsx +0 -70
- package/src/composer/input-area/ComposerSlashMenu.tsx +0 -1
- package/src/composer/input-area/ConnectionStatusMenuItem.tsx +0 -2
- package/src/composer/input-area/FadePresence.tsx +0 -4
- package/src/composer/input-area/InputActions.tsx +0 -5
- package/src/composer/input-area/InputArea.tsx +1 -28
- package/src/composer/input-area/InputAreaEditor.tsx +0 -39
- package/src/composer/input-area/InputBanners.tsx +0 -1
- package/src/composer/input-area/PromoBanner.tsx +0 -1
- package/src/composer/input-area/composerPrediction.ts +0 -2
- package/src/composer/input-area/useComposerSlashMenu.ts +0 -1
- package/src/composer/input-area/useInputAreaPrediction.ts +0 -1
- package/src/composer/prediction.ts +0 -6
- package/src/composer/useComposerPrediction.ts +0 -2
- package/src/generative-ui/GenerativeUiPanel.tsx +0 -11
- package/src/generative-ui/content.tsx +0 -2
- package/src/generative-ui/index.ts +0 -3
- package/src/generative-ui/layout.tsx +0 -5
- package/src/hooks/use-count-up-display.ts +0 -1
- package/src/hooks/use-idle-callback.ts +0 -5
- package/src/hooks/use-persisted-scroll-parent.ts +0 -4
- package/src/hooks/use-single-flight.ts +0 -5
- package/src/icons/animated/animated-bell-icon.tsx +0 -6
- package/src/icons/animated/animated-counter.tsx +0 -5
- package/src/icons/animated/animated-key-icon.tsx +0 -4
- package/src/icons/animated/animated-notification-icon.tsx +0 -14
- package/src/icons/animated/animated-progress.tsx +0 -10
- package/src/icons/animated/animated-status-dot.tsx +0 -4
- package/src/icons/animated/index.ts +0 -4
- package/src/icons/animated/morphing-menu-icon.tsx +0 -5
- package/src/icons/animated/morphing-mic-icon.tsx +0 -2
- package/src/icons/animated/pulsing-rings.tsx +0 -4
- package/src/icons/automation-icon.tsx +0 -1
- package/src/icons/board-icon.tsx +13 -10
- package/src/icons/bolt-icon.tsx +5 -4
- package/src/icons/building-icon.tsx +11 -9
- package/src/icons/draft-icon.tsx +0 -1
- package/src/icons/files-icon.tsx +9 -5
- package/src/icons/inbox-arrow-icon.tsx +0 -1
- package/src/icons/inbox-icon.tsx +9 -5
- package/src/icons/index.ts +12 -1
- package/src/icons/memory-icon.tsx +9 -11
- package/src/icons/nav-icon-base.tsx +0 -10
- package/src/icons/search-icon.tsx +7 -6
- package/src/icons/settings-icon.tsx +11 -13
- package/src/icons/sidebar-toggle-icon.tsx +0 -1
- package/src/icons/solid-icons.tsx +138 -0
- package/src/icons/with-active.tsx +14 -0
- package/src/index.ts +0 -30
- package/src/kibo/gantt-features.tsx +0 -16
- package/src/kibo/gantt-header.tsx +0 -4
- package/src/kibo/gantt-provider.tsx +0 -36
- package/src/kibo/gantt-sidebar.tsx +0 -7
- package/src/kibo/gantt-timeline.tsx +0 -4
- package/src/kibo/kanban.tsx +0 -49
- package/src/kibo/list.tsx +0 -8
- package/src/kibo/theme-switcher.tsx +0 -5
- package/src/kibo/video-player.tsx +0 -9
- package/src/logos/index.ts +0 -3
- package/src/logos/logo-svg.tsx +0 -5
- package/src/markdown/Markdown.tsx +0 -20
- package/src/markdown/MarkdownCodeBlock.tsx +0 -14
- package/src/markdown/MarkdownInlineCode.tsx +0 -6
- package/src/markdown/MarkdownLink.tsx +0 -4
- package/src/markdown/codeFence.ts +0 -3
- package/src/markdown/codeHighlight.ts +0 -16
- package/src/markdown/incrementalBlocks.ts +0 -49
- package/src/markdown/markdownClipboard.ts +0 -12
- package/src/markdown/mermaid.ts +0 -22
- package/src/markdown/rehypeGithubAlerts.ts +0 -3
- package/src/markdown/useSmoothText.ts +0 -5
- package/src/marketing/FloatingBar.tsx +0 -3
- package/src/marketing/PricingModal.tsx +0 -45
- package/src/marketing/ProductHero.tsx +0 -23
- package/src/marketing/ProductHeroOrbit.tsx +0 -5
- package/src/marketing/SiteFooter.tsx +0 -23
- package/src/marketing/SiteHeader.tsx +0 -14
- package/src/marketing/VProPricingModal.tsx +0 -5
- package/src/marketing/createLandingKit.tsx +0 -12
- package/src/marketing/landing.tsx +0 -12
- package/src/marketing/marketing-classes.ts +0 -7
- package/src/motion/dock-motion.ts +0 -25
- package/src/motion/list-enter.tsx +0 -4
- package/src/motion/panel-transition.tsx +0 -5
- package/src/ui/_field-classes.ts +0 -2
- package/src/ui/_menu-classes.ts +7 -4
- package/src/ui/_menu-parts.tsx +0 -5
- package/src/ui/_picker-classes.ts +0 -6
- package/src/ui/accordion.alt.tsx +0 -8
- package/src/ui/accordion.tsx +0 -4
- package/src/ui/badge.tsx +0 -1
- package/src/ui/border-beam.tsx +0 -11
- package/src/ui/breadcrumb.tsx +0 -13
- package/src/ui/bulk-action-bar.tsx +0 -24
- package/src/ui/button.tsx +0 -27
- package/src/ui/calendar.tsx +0 -18
- package/src/ui/card.tsx +0 -3
- package/src/ui/carousel.tsx +0 -4
- package/src/ui/checkbox.tsx +0 -1
- package/src/ui/clear-input.alt.tsx +0 -8
- package/src/ui/clear-input.tsx +0 -16
- package/src/ui/clearInputDissolve.ts +0 -4
- package/src/ui/command.tsx +0 -22
- package/src/ui/confetti-burst.tsx +0 -4
- package/src/ui/confirm-dialog-parts.tsx +0 -45
- package/src/ui/confirm-dialog.tsx +0 -26
- package/src/ui/context-menu.tsx +4 -11
- package/src/ui/count-pop.tsx +0 -2
- package/src/ui/crossfade-icon.tsx +0 -3
- package/src/ui/date-picker.tsx +0 -40
- package/src/ui/dialog.tsx +0 -18
- package/src/ui/dropdown-menu.tsx +4 -12
- package/src/ui/empty-state.tsx +0 -15
- package/src/ui/error-boundary.tsx +0 -7
- package/src/ui/field.tsx +0 -18
- package/src/ui/hover-card.tsx +0 -6
- package/src/ui/image-lightbox.tsx +0 -7
- package/src/ui/input-group.alt.tsx +0 -16
- package/src/ui/input-group.tsx +0 -3
- package/src/ui/kbd.tsx +0 -3
- package/src/ui/label.tsx +0 -1
- package/src/ui/labeled-slider-row.tsx +0 -2
- package/src/ui/list-row.tsx +0 -46
- package/src/ui/loading-state.tsx +0 -23
- package/src/ui/marquee-on-hover.tsx +1 -6
- package/src/ui/media-preview.tsx +0 -5
- package/src/ui/modalTransition.ts +0 -25
- package/src/ui/overlay-a11y.ts +0 -1
- package/src/ui/page-title.tsx +0 -4
- package/src/ui/popover.tsx +0 -8
- package/src/ui/progress.tsx +0 -1
- package/src/ui/refresh-spin-icon.tsx +0 -11
- package/src/ui/relative-date-time.tsx +0 -3
- package/src/ui/rolling-number.tsx +0 -2
- package/src/ui/search-input.tsx +0 -9
- package/src/ui/select-field.tsx +0 -5
- package/src/ui/select.tsx +0 -8
- package/src/ui/send-queue-icon.tsx +0 -3
- package/src/ui/separator.tsx +0 -1
- package/src/ui/sheet.tsx +0 -42
- package/src/ui/slide-over-panel.tsx +0 -2
- package/src/ui/slider.tsx +21 -9
- package/src/ui/sonner-icons.tsx +0 -4
- package/src/ui/sonner.tsx +0 -78
- package/src/ui/spinner.tsx +0 -50
- package/src/ui/status-dot.tsx +0 -10
- package/src/ui/surface.tsx +0 -13
- package/src/ui/switch.tsx +72 -3
- package/src/ui/table.tsx +0 -3
- package/src/ui/tabs-transition.tsx +0 -12
- package/src/ui/tabs.tsx +0 -17
- package/src/ui/tabsSliding.ts +0 -5
- package/src/ui/time-picker.tsx +0 -17
- package/src/ui/toggle-search.tsx +0 -6
- package/src/ui/toolbar-search-input.tsx +0 -3
- package/src/ui/tooltip.tsx +0 -5
- package/src/ui/ui-config.tsx +0 -19
- package/src/utils/cat-color.ts +0 -20
- package/src/utils/cn.ts +0 -4
- package/src/utils/gesture.ts +0 -8
- package/src/utils/ref.ts +0 -1
- package/src/utils/runtimeVisibility.ts +0 -19
- package/src/utils/surface-radius.ts +0 -11
- package/src/utils/useDragSensors.ts +0 -2
- package/tokens/examples/compat-shadcn-rgb/vite.config.ts +0 -2
- package/tokens/examples/toaster/Fixture.tsx +0 -4
- package/tokens/examples/toaster/UpdateToastFixture.tsx +0 -4
- package/tokens/examples/toaster/vite.config.ts +0 -2
- package/tokens/examples/tokens-moved/Fixture.tsx +0 -4
- package/tokens/examples/tokens-moved/vite.config.ts +0 -2
- package/tokens/src/tailwind-preset.mjs +0 -3
|
@@ -22,53 +22,26 @@ import {
|
|
|
22
22
|
|
|
23
23
|
export interface JumpRailItem {
|
|
24
24
|
id: string;
|
|
25
|
-
/** First line of the preview card; also the button's accessible label. */
|
|
26
25
|
title: string;
|
|
27
|
-
/** Up to three lines under the title. */
|
|
28
26
|
preview?: string | null;
|
|
29
|
-
/** Heading level (1 is the longest tick). Deeper levels get shorter, indented ticks. */
|
|
30
27
|
level?: number;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
export interface JumpRailProps {
|
|
34
31
|
items: readonly JumpRailItem[];
|
|
35
|
-
/** The scroll container. Read when the rail observes and scrolls. */
|
|
36
32
|
scrollRef?: RefObject<HTMLElement | null>;
|
|
37
|
-
/** Alternative to `scrollRef`: returns the scroll container. */
|
|
38
33
|
getScrollElement?: () => HTMLElement | null;
|
|
39
|
-
/** Attribute that holds an item id on its target. Default `data-message-id`. */
|
|
40
34
|
targetAttribute?: string;
|
|
41
|
-
/** Replaces the `[targetAttribute="id"]` lookup inside the scroll container. */
|
|
42
35
|
resolveTarget?: (root: HTMLElement, id: string) => HTMLElement | null;
|
|
43
|
-
/**
|
|
44
|
-
* Called when the target is not in the DOM (for example a windowed
|
|
45
|
-
* transcript). The consumer renders it and scrolls to it.
|
|
46
|
-
*/
|
|
47
36
|
onReveal?: (id: string) => void;
|
|
48
|
-
/** Called just before `onReveal`, for example `stopScroll` from use-stick-to-bottom. */
|
|
49
37
|
onBeforeScroll?: () => void;
|
|
50
|
-
/**
|
|
51
|
-
* Called after the user picks an item by click or Enter/Space, once the
|
|
52
|
-
* scroll has started or `onReveal` has run. For example, to move focus to the
|
|
53
|
-
* target for keyboard users.
|
|
54
|
-
*/
|
|
55
38
|
onSelect?: (id: string) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Changing this re-observes the targets. Use it when rows render later or
|
|
58
|
-
* the window grows, for example the first rendered id.
|
|
59
|
-
*/
|
|
60
39
|
observeKey?: string | number | null;
|
|
61
|
-
/** The rail renders nothing below this many items. Default 2. */
|
|
62
40
|
minVisibleItems?: number;
|
|
63
|
-
/** Merged into the wrapper classes, which place the rail. */
|
|
64
41
|
className?: string;
|
|
65
|
-
/** Wrapper `aria-label`. Default "Jump to message". */
|
|
66
42
|
ariaLabel?: string;
|
|
67
|
-
/** Start of the button label, followed by the active title. Default "Jump to message". */
|
|
68
43
|
buttonLabel?: string;
|
|
69
|
-
/** Button label subject while no item is active. Default "User message". */
|
|
70
44
|
fallbackLabel?: string;
|
|
71
|
-
/** Wrapper `data-testid`. Default `jump-rail`. */
|
|
72
45
|
testId?: string;
|
|
73
46
|
}
|
|
74
47
|
|
|
@@ -116,8 +89,6 @@ export function JumpRail({
|
|
|
116
89
|
const [hoverIndex, setHoverIndex] = useState<number | null>(null);
|
|
117
90
|
const [inViewIds, setInViewIds] = useState<ReadonlySet<string>>(() => new Set());
|
|
118
91
|
|
|
119
|
-
// Latest props for the effect and handlers, so an inline getter or resolver
|
|
120
|
-
// does not rebuild the observer on every render.
|
|
121
92
|
const latest = useRef({ scrollRef, getScrollElement, resolveTarget, targetAttribute });
|
|
122
93
|
latest.current = { scrollRef, getScrollElement, resolveTarget, targetAttribute };
|
|
123
94
|
const readRoot = () =>
|
|
@@ -170,8 +141,6 @@ export function JumpRail({
|
|
|
170
141
|
onSelect?.(id);
|
|
171
142
|
return;
|
|
172
143
|
}
|
|
173
|
-
// Rendering earlier rows grows the content; a reader stuck to the bottom
|
|
174
|
-
// would be pulled back down instead of reaching the item.
|
|
175
144
|
onBeforeScroll?.();
|
|
176
145
|
onReveal?.(id);
|
|
177
146
|
onSelect?.(id);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UIMessage } from "ai";
|
|
2
2
|
import type { ComponentProps, HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
3
|
+
import { destructiveGhostClass } from "../ui/_menu-classes";
|
|
3
4
|
import { Button } from "../ui/button";
|
|
4
5
|
import { ButtonGroup, ButtonGroupText } from "../ui/button-group";
|
|
5
6
|
import {
|
|
@@ -31,7 +32,6 @@ export interface MessageConfig {
|
|
|
31
32
|
assistant?: string;
|
|
32
33
|
content?: string;
|
|
33
34
|
branchSelector?: string;
|
|
34
|
-
/** Replaces the branch arrows' `size={14}` with a class. */
|
|
35
35
|
branchIcon?: string;
|
|
36
36
|
};
|
|
37
37
|
}
|
|
@@ -42,28 +42,15 @@ export interface MessageConfig {
|
|
|
42
42
|
export type MessageMenuAction = {
|
|
43
43
|
key: string;
|
|
44
44
|
label: string;
|
|
45
|
-
/** Shows the action in the hover toolbar (an icon button). Without it: menu only. */
|
|
46
45
|
icon?: ReactNode;
|
|
47
46
|
destructive?: boolean;
|
|
48
47
|
disabled?: boolean;
|
|
49
48
|
onSelect: () => void;
|
|
50
|
-
/** Force the hover toolbar on (`true`) or off (`false`). Default: on when there is an `icon`. */
|
|
51
49
|
hover?: boolean;
|
|
52
50
|
};
|
|
53
51
|
export type MessageProps = HTMLAttributes<HTMLDivElement> & {
|
|
54
52
|
from: UIMessage["role"];
|
|
55
|
-
/**
|
|
56
|
-
* Right-click menu and hover toolbar actions, such as Reply. Without it (or
|
|
57
|
-
* empty) `Message` renders the same `div` as before. With it a right click
|
|
58
|
-
* opens the menu and a hover toolbar shows beside the bubble. The toolbar is
|
|
59
|
-
* absolutely positioned and takes no layout space.
|
|
60
|
-
*/
|
|
61
53
|
actions?: MessageMenuAction[];
|
|
62
|
-
/**
|
|
63
|
-
* The target of a quote click: a soft primary wash and ring. Set it back to
|
|
64
|
-
* `false` about 1.5 seconds later and it fades out (`duration-200`). Sets
|
|
65
|
-
* `data-highlighted`.
|
|
66
|
-
*/
|
|
67
54
|
highlighted?: boolean;
|
|
68
55
|
};
|
|
69
56
|
export const Message = ({
|
|
@@ -116,7 +103,6 @@ export const Message = ({
|
|
|
116
103
|
};
|
|
117
104
|
export type MessageContextMenuProps = {
|
|
118
105
|
actions: MessageMenuAction[];
|
|
119
|
-
/** One element, which becomes the right-click target (Radix `asChild`). */
|
|
120
106
|
children: ReactElement;
|
|
121
107
|
};
|
|
122
108
|
/**
|
|
@@ -137,7 +123,7 @@ export const MessageContextMenu = ({
|
|
|
137
123
|
key={action.key}
|
|
138
124
|
disabled={action.disabled}
|
|
139
125
|
startContent={action.icon}
|
|
140
|
-
|
|
126
|
+
variant={action.destructive ? "destructive" : "default"}
|
|
141
127
|
onSelect={action.onSelect}
|
|
142
128
|
>
|
|
143
129
|
{action.label}
|
|
@@ -152,7 +138,6 @@ export type MessageHoverActionsProps = Omit<
|
|
|
152
138
|
"children"
|
|
153
139
|
> & {
|
|
154
140
|
actions: MessageMenuAction[];
|
|
155
|
-
/** Role of the message: user toolbars sit left of the bubble, others right. Default `assistant`. */
|
|
156
141
|
from?: UIMessage["role"];
|
|
157
142
|
};
|
|
158
143
|
/**
|
|
@@ -194,10 +179,9 @@ export const MessageHoverActions = ({
|
|
|
194
179
|
label={action.label}
|
|
195
180
|
tooltip={action.label}
|
|
196
181
|
tooltipSide="bottom"
|
|
197
|
-
// Narrow: the toolbar sits on the bubble corner and a tooltip below it would cover the text.
|
|
198
182
|
tooltipClassName="max-sm:hidden"
|
|
199
183
|
disabled={action.disabled}
|
|
200
|
-
className={action.destructive ?
|
|
184
|
+
className={action.destructive ? destructiveGhostClass : undefined}
|
|
201
185
|
onClick={action.onSelect}
|
|
202
186
|
>
|
|
203
187
|
{action.icon}
|
|
@@ -207,11 +191,8 @@ export const MessageHoverActions = ({
|
|
|
207
191
|
);
|
|
208
192
|
};
|
|
209
193
|
export type MessageQuoteProps = Omit<ComponentProps<"div">, "onClick"> & {
|
|
210
|
-
/** Who wrote the quoted message. */
|
|
211
194
|
author: string;
|
|
212
|
-
/** The quoted text, cut to two lines. */
|
|
213
195
|
text: string;
|
|
214
|
-
/** Makes the quote a button, so the app can scroll to and highlight the original. */
|
|
215
196
|
onPress?: () => void;
|
|
216
197
|
};
|
|
217
198
|
/**
|
|
@@ -303,9 +284,7 @@ export const MessageActionsBar = ({
|
|
|
303
284
|
};
|
|
304
285
|
export type MessageActionProps = ComponentProps<typeof Button> & {
|
|
305
286
|
tooltip?: string;
|
|
306
|
-
/** Side of the tooltip. Default: the Radix default (`top`). */
|
|
307
287
|
tooltipSide?: "top" | "right" | "bottom" | "left";
|
|
308
|
-
/** Extra classes for the tooltip content. */
|
|
309
288
|
tooltipClassName?: string;
|
|
310
289
|
label?: string;
|
|
311
290
|
};
|
|
@@ -343,11 +322,6 @@ function EagerMessageAction({
|
|
|
343
322
|
}
|
|
344
323
|
return button;
|
|
345
324
|
}
|
|
346
|
-
/**
|
|
347
|
-
* The tooltip mounts on first hover or focus, not with the button. Each Radix
|
|
348
|
-
* tooltip is a dozen components plus a re-render once it has measured its
|
|
349
|
-
* anchor; a long chat has hundreds of these buttons.
|
|
350
|
-
*/
|
|
351
325
|
function LazyMessageAction({
|
|
352
326
|
tooltip,
|
|
353
327
|
tooltipSide,
|
|
@@ -374,8 +348,6 @@ function LazyMessageAction({
|
|
|
374
348
|
onFocus?.(event);
|
|
375
349
|
if (tooltip && armedBy === null) setArmedBy("focus");
|
|
376
350
|
}}
|
|
377
|
-
// Arming remounts the button inside the tooltip trigger; a keyboard
|
|
378
|
-
// user keeps focus on it (and so sees the tooltip).
|
|
379
351
|
autoFocus={armedBy === "focus"}
|
|
380
352
|
{...props}
|
|
381
353
|
>
|
|
@@ -386,7 +358,6 @@ function LazyMessageAction({
|
|
|
386
358
|
if (tooltip && armedBy !== null) {
|
|
387
359
|
return (
|
|
388
360
|
<TooltipProvider>
|
|
389
|
-
{/* The focus that armed it landed before the tooltip existed. */}
|
|
390
361
|
<Tooltip defaultOpen={armedBy === "focus"}>
|
|
391
362
|
<TooltipTrigger asChild>{button}</TooltipTrigger>
|
|
392
363
|
<TooltipContent side={tooltipSide} className={tooltipClassName}>
|
|
@@ -512,8 +483,6 @@ export const MessageBranchSelector = ({
|
|
|
512
483
|
);
|
|
513
484
|
};
|
|
514
485
|
export type MessageBranchPreviousProps = ComponentProps<typeof Button>;
|
|
515
|
-
// Prev and next sit in a `ButtonGroup` with `rounded-md` inner corners, so they
|
|
516
|
-
// default to `shape="rounded"`; a pill would pair a round outer end with them.
|
|
517
486
|
export const MessageBranchPrevious = ({
|
|
518
487
|
children,
|
|
519
488
|
...props
|
|
@@ -137,7 +137,6 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
137
137
|
accounts?: ReadonlyArray<ModelAccount>;
|
|
138
138
|
onSelect: (modelId: TModel, accountId: string | null) => void;
|
|
139
139
|
canSelectTeamWhilePersonal?: boolean;
|
|
140
|
-
/** Trait controls (or any extra chrome) pinned above the model list. */
|
|
141
140
|
header?: ReactNode;
|
|
142
141
|
}) {
|
|
143
142
|
const merge = useCn();
|
|
@@ -222,7 +221,6 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
222
221
|
searchInputRef.current?.focus({ preventScroll: true });
|
|
223
222
|
};
|
|
224
223
|
|
|
225
|
-
// Match t3code: focus survives popover open + any later focus steal.
|
|
226
224
|
useLayoutEffect(() => {
|
|
227
225
|
focusSearch();
|
|
228
226
|
const frame = window.requestAnimationFrame(() => {
|
|
@@ -237,7 +235,6 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
237
235
|
};
|
|
238
236
|
}, []);
|
|
239
237
|
|
|
240
|
-
// Measure the active rail button — hardcoded spacing drifts vs real layout.
|
|
241
238
|
useLayoutEffect(() => {
|
|
242
239
|
if (isSearching) {
|
|
243
240
|
setIndicatorTop(null);
|
|
@@ -255,8 +252,6 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
255
252
|
setIndicatorTop(null);
|
|
256
253
|
return;
|
|
257
254
|
}
|
|
258
|
-
// With a scrolling rail the active provider can open off-screen; `nearest`
|
|
259
|
-
// is a no-op when it is already visible.
|
|
260
255
|
selectedButton.scrollIntoView({ block: "nearest" });
|
|
261
256
|
const contentRect = content.getBoundingClientRect();
|
|
262
257
|
const buttonRect = selectedButton.getBoundingClientRect();
|
|
@@ -299,19 +294,12 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
299
294
|
) : null}
|
|
300
295
|
<div className="flex min-h-0 flex-1 overflow-hidden">
|
|
301
296
|
{!isSearching ? (
|
|
302
|
-
// The rail grows with every provider + personal account, so it has to
|
|
303
|
-
// scroll on its own once it outruns the panel — `overflow-hidden`
|
|
304
|
-
// simply clipped the tail off.
|
|
305
297
|
<div className="w-12 shrink-0 overflow-y-auto overscroll-contain border-r border-border bg-surface-secondary/30 scrollbar-none">
|
|
306
298
|
<div
|
|
307
299
|
ref={railContentRef}
|
|
308
300
|
className="relative flex flex-col gap-1 px-1 pb-1 pt-0.5"
|
|
309
301
|
>
|
|
310
302
|
{indicatorTop !== null ? (
|
|
311
|
-
// Pinned at `top: 0` and moved by `translateY`, the same way the
|
|
312
|
-
// tabs pill lands on its tab. Transitioning `top` relayouted the
|
|
313
|
-
// rail on every frame of a slide that happens while the pointer
|
|
314
|
-
// is still moving down the list.
|
|
315
303
|
<div
|
|
316
304
|
className="pointer-events-none absolute top-0 right-0 z-10 h-5 w-[3px] rounded-l-full bg-primary transition-transform duration-[var(--motion-base)]"
|
|
317
305
|
style={{ transform: `translateY(${indicatorTop}px)` }}
|
|
@@ -369,11 +357,6 @@ export function ModelPickerContent<TModel extends string>({
|
|
|
369
357
|
</div>
|
|
370
358
|
) : null}
|
|
371
359
|
|
|
372
|
-
{/*
|
|
373
|
-
Key only on the rail instance — NOT on isSearching. Remounting when the
|
|
374
|
-
first search character lands unmounts the input and drops focus (the
|
|
375
|
-
"click twice" bug). Row filtering already switches search vs rail views.
|
|
376
|
-
*/}
|
|
377
360
|
<Command
|
|
378
361
|
key={selectedInstanceKey}
|
|
379
362
|
className="flex min-w-0 flex-1 flex-col rounded-none border-0 bg-surface-secondary/40"
|
|
@@ -9,10 +9,6 @@ export interface ModelAccount {
|
|
|
9
9
|
id: string;
|
|
10
10
|
provider: string;
|
|
11
11
|
label: string;
|
|
12
|
-
/**
|
|
13
|
-
* Owned by whoever the run bills to, not a teammate's shared account. Only
|
|
14
|
-
* own accounts may be picked automatically; a teammate's share is explicit.
|
|
15
|
-
*/
|
|
16
12
|
isOwn: boolean;
|
|
17
13
|
}
|
|
18
14
|
|
|
@@ -36,7 +32,6 @@ export function formatModelDisplayLabel(
|
|
|
36
32
|
provider: string,
|
|
37
33
|
label: string,
|
|
38
34
|
): string {
|
|
39
|
-
// Codex models are already named "GPT …"; don't prefix with "Codex".
|
|
40
35
|
if (provider === "codex") {
|
|
41
36
|
return label;
|
|
42
37
|
}
|
|
@@ -37,10 +37,6 @@ export interface ModelPickerConfig {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
const TRIGGER_CLASS =
|
|
40
|
-
// Carries `data-slot="select-trigger"` and is styled to read as one, so it
|
|
41
|
-
// has to press like one: `motion-press active:scale-[0.98]`, like the select
|
|
42
|
-
// triggers it sits beside in a composer footer. `motion-press` supersedes
|
|
43
|
-
// `transition-colors`: the two at equal specificity replace each other.
|
|
44
40
|
"motion-press flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-muted-foreground hover:bg-surface-tertiary hover:text-foreground active:scale-[0.98] disabled:opacity-50";
|
|
45
41
|
|
|
46
42
|
/**
|
|
@@ -89,39 +85,13 @@ export interface ModelPickerProps<TModel extends string = string> {
|
|
|
89
85
|
options: ReadonlyArray<ModelOption<TModel>>;
|
|
90
86
|
disabled?: boolean;
|
|
91
87
|
className?: string;
|
|
92
|
-
/**
|
|
93
|
-
* The user's own provider accounts. When non-empty, each provider opens into
|
|
94
|
-
* Team + account groups, each listing that provider's models so picking a
|
|
95
|
-
* model also picks whose credential runs it.
|
|
96
|
-
*/
|
|
97
88
|
accounts?: ReadonlyArray<ModelAccount>;
|
|
98
|
-
/** Currently selected account id, or null for the team credential. */
|
|
99
89
|
accountId?: string | null;
|
|
100
|
-
/** Fired alongside a model change with the chosen account (null = team). */
|
|
101
90
|
onAccountChange?: (accountId: string | null) => void;
|
|
102
|
-
/**
|
|
103
|
-
* When set, called once per pick instead of separate model/account
|
|
104
|
-
* callbacks — use this to persist both fields in a single mutation.
|
|
105
|
-
*/
|
|
106
91
|
onSelectionChange?: (model: TModel, accountId: string | null) => void;
|
|
107
|
-
/**
|
|
108
|
-
* When a personal account is selected, Team for that provider is shown
|
|
109
|
-
* disabled. Set false when the viewer cannot switch the sticky account
|
|
110
|
-
* (e.g. non-owner on a task) so Team stays unselectable.
|
|
111
|
-
*/
|
|
112
92
|
canSelectTeamWhilePersonal?: boolean;
|
|
113
|
-
/**
|
|
114
|
-
* The selected model's traits. Required so no picker drops them by
|
|
115
|
-
* accident: pass `null` only where runs take no traits.
|
|
116
|
-
*/
|
|
117
93
|
traits: ModelPickerTraits | null;
|
|
118
|
-
/**
|
|
119
|
-
* Simple-view capability ladder (cheapest → strongest). When at least two of
|
|
120
|
-
* these ids are in `options`, the popover opens on a discrete slider;
|
|
121
|
-
* Advanced swaps to the full picker.
|
|
122
|
-
*/
|
|
123
94
|
simpleLadder?: ReadonlyArray<TModel>;
|
|
124
|
-
/** Parks the slider thumb when `value` is not itself a ladder tick. */
|
|
125
95
|
simpleLadderSnap?: TModel;
|
|
126
96
|
}
|
|
127
97
|
|
|
@@ -269,10 +239,6 @@ export function ModelPicker<TModel extends string>({
|
|
|
269
239
|
size={14}
|
|
270
240
|
/>
|
|
271
241
|
)}
|
|
272
|
-
{/* On a phone the composer's under-bar is only a few hundred pixels
|
|
273
|
-
wide, so the label gives up width to the control beside it rather
|
|
274
|
-
than pushing it out of the row. `min-w-0` is the load-bearing half
|
|
275
|
-
— a flex child defaults to `min-width: auto` and never shrinks. */}
|
|
276
242
|
<span className="whitespace-nowrap text-left max-sm:min-w-0 max-sm:truncate">
|
|
277
243
|
{triggerLabel}
|
|
278
244
|
{triggerSuffix ? (
|
|
@@ -296,8 +262,6 @@ export function ModelPicker<TModel extends string>({
|
|
|
296
262
|
}
|
|
297
263
|
onOpenAutoFocus={(event) => {
|
|
298
264
|
if (showLadder) return;
|
|
299
|
-
// Let ModelPickerContent own focus (search input); Radix would
|
|
300
|
-
// otherwise park it on the first focusable and fight our layout effect.
|
|
301
265
|
event.preventDefault();
|
|
302
266
|
}}
|
|
303
267
|
>
|
|
@@ -140,7 +140,6 @@ export type ModelSelectorLogoProps = Omit<
|
|
|
140
140
|
ComponentProps<"svg">,
|
|
141
141
|
"children"
|
|
142
142
|
> & {
|
|
143
|
-
/** Rendered width and height in px. Default 12, the old `<img>` size. */
|
|
144
143
|
size?: number;
|
|
145
144
|
provider:
|
|
146
145
|
| "moonshotai-cn"
|
|
@@ -203,10 +202,6 @@ export type ModelSelectorLogoProps = Omit<
|
|
|
203
202
|
| (string & {});
|
|
204
203
|
};
|
|
205
204
|
|
|
206
|
-
/**
|
|
207
|
-
* models.dev provider ids that have a `ProviderIcon` mark. `ProviderIcon`
|
|
208
|
-
* knows four marks: Claude, OpenAI (`codex`), OpenCode and Cursor.
|
|
209
|
-
*/
|
|
210
205
|
const LOGO_PROVIDER: Record<string, string> = {
|
|
211
206
|
anthropic: "claude",
|
|
212
207
|
"google-vertex-anthropic": "claude",
|
|
@@ -2,11 +2,6 @@ import { useEffect, useRef, useState } from "react";
|
|
|
2
2
|
import { IconMicrophone, IconPlayerStop } from "@tabler/icons-react";
|
|
3
3
|
import { PromptInputButton } from "./prompt-input";
|
|
4
4
|
|
|
5
|
-
// Web Speech API dictation for the prompt input: `useSpeechRecognition` streams
|
|
6
|
-
// the transcript (prefix + finals + interim) to a callback, and
|
|
7
|
-
// `PromptInputSpeech` is a microphone button that writes it into the form's
|
|
8
|
-
// `textarea[name="message"]`.
|
|
9
|
-
|
|
10
5
|
interface SpeechRecognitionResult {
|
|
11
6
|
readonly isFinal: boolean;
|
|
12
7
|
readonly length: number;
|
|
@@ -36,11 +31,6 @@ interface SpeechRecognitionInstance extends EventTarget {
|
|
|
36
31
|
|
|
37
32
|
type SpeechRecognitionConstructor = new () => SpeechRecognitionInstance;
|
|
38
33
|
|
|
39
|
-
// Read the constructors through a local type: a package must not augment the
|
|
40
|
-
// global Window. Apps often declare their own `Window.SpeechRecognition` with
|
|
41
|
-
// other event types, so `window` is cast to this shape rather than assigned
|
|
42
|
-
// (an assignment fails to typecheck in those apps; see
|
|
43
|
-
// consumer/window-speech-global.d.ts).
|
|
44
34
|
type SpeechRecognitionWindow = {
|
|
45
35
|
SpeechRecognition?: SpeechRecognitionConstructor;
|
|
46
36
|
webkitSpeechRecognition?: SpeechRecognitionConstructor;
|
|
@@ -120,7 +110,6 @@ export function useSpeechRecognition(onUpdate: (fullText: string) => void) {
|
|
|
120
110
|
}
|
|
121
111
|
};
|
|
122
112
|
|
|
123
|
-
// Stop listening on unmount.
|
|
124
113
|
useEffect(
|
|
125
114
|
() => () => {
|
|
126
115
|
recognitionRef.current?.stop();
|
|
@@ -69,7 +69,6 @@ import {
|
|
|
69
69
|
useRef,
|
|
70
70
|
useState,
|
|
71
71
|
} from "react";
|
|
72
|
-
/** `existing` with `file` in its place when the ids match (old blob URL revoked). */
|
|
73
72
|
const replaceFile = (
|
|
74
73
|
existing: FileUIPart & { id: string },
|
|
75
74
|
id: string,
|
|
@@ -130,7 +129,6 @@ export interface AttachmentsContext {
|
|
|
130
129
|
})[];
|
|
131
130
|
add: (files: File[] | FileList) => void;
|
|
132
131
|
remove: (id: string) => void;
|
|
133
|
-
/** Replace one attachment in place (same id and position). No re-validation. */
|
|
134
132
|
replace: (id: string, file: File) => void;
|
|
135
133
|
clear: () => void;
|
|
136
134
|
openFileDialog: () => void;
|
|
@@ -339,15 +337,8 @@ export type PromptInputProps = Omit<
|
|
|
339
337
|
syncHiddenInput?: boolean;
|
|
340
338
|
maxFiles?: number;
|
|
341
339
|
maxFileSize?: number;
|
|
342
|
-
/** Merged onto the inner `InputGroup`. */
|
|
343
340
|
containerClassName?: string;
|
|
344
|
-
/** Same as `containerClassName`. */
|
|
345
341
|
inputGroupClassName?: string;
|
|
346
|
-
/**
|
|
347
|
-
* Accepts a non-file drag of this MIME type: it counts as a drag over the
|
|
348
|
-
* form (the `groupDragOver` classes) and `onDrop` receives its string
|
|
349
|
-
* payload. Other types keep the browser's default drop.
|
|
350
|
-
*/
|
|
351
342
|
dataDrop?: { type: string; onDrop: (payload: string) => void };
|
|
352
343
|
onError?: (err: {
|
|
353
344
|
code: "max_files" | "max_file_size" | "accept";
|
|
@@ -380,8 +371,6 @@ export const PromptInput = ({
|
|
|
380
371
|
const usingProvider = !!controller;
|
|
381
372
|
const inputRef = useRef<HTMLInputElement | null>(null);
|
|
382
373
|
const formRef = useRef<HTMLFormElement | null>(null);
|
|
383
|
-
// Enter/leave pairs, not a boolean: `dragleave` also fires when the pointer
|
|
384
|
-
// moves onto a child of the form.
|
|
385
374
|
const dragEnterDepth = useRef(0);
|
|
386
375
|
const [isDragOver, setIsDragOver] = useState(false);
|
|
387
376
|
const [items, setItems] = useState<
|
|
@@ -413,7 +402,6 @@ export const PromptInput = ({
|
|
|
413
402
|
const prefix = pattern.slice(0, -1);
|
|
414
403
|
return f.type.startsWith(prefix);
|
|
415
404
|
}
|
|
416
|
-
// Extension patterns (`.html`): browsers often omit the MIME type.
|
|
417
405
|
if (pattern.startsWith(".")) {
|
|
418
406
|
return f.name.toLowerCase().endsWith(pattern.toLowerCase());
|
|
419
407
|
}
|
|
@@ -542,11 +530,9 @@ export const PromptInput = ({
|
|
|
542
530
|
inputRef.current.value = "";
|
|
543
531
|
}
|
|
544
532
|
}, [files, syncHiddenInput]);
|
|
545
|
-
// Drops land on the form, or anywhere in the document with `globalDrop`.
|
|
546
533
|
useEffect(() => {
|
|
547
534
|
const target: EventTarget | null = globalDrop ? document : formRef.current;
|
|
548
535
|
if (!target) return;
|
|
549
|
-
// Types are readable during the drag; the payload only on drop.
|
|
550
536
|
const carriesData = (event: DragEvent) =>
|
|
551
537
|
dataDrop !== undefined &&
|
|
552
538
|
event.dataTransfer?.types?.includes(dataDrop.type) === true;
|
|
@@ -654,14 +640,12 @@ export const PromptInput = ({
|
|
|
654
640
|
clear();
|
|
655
641
|
if (usingProvider) controller.textInput.clear();
|
|
656
642
|
} catch {
|
|
657
|
-
/* Don't clear on error */
|
|
658
643
|
}
|
|
659
644
|
} else {
|
|
660
645
|
clear();
|
|
661
646
|
if (usingProvider) controller.textInput.clear();
|
|
662
647
|
}
|
|
663
648
|
} catch {
|
|
664
|
-
/* Don't clear on error */
|
|
665
649
|
}
|
|
666
650
|
};
|
|
667
651
|
const inner = (
|
|
@@ -812,13 +796,9 @@ export const PromptInputHeader = ({
|
|
|
812
796
|
);
|
|
813
797
|
};
|
|
814
798
|
export type ReplyQuoteChipProps = Omit<ComponentProps<"div">, "children"> & {
|
|
815
|
-
/** Who wrote the message being replied to. */
|
|
816
799
|
author: string;
|
|
817
|
-
/** Its text, cut to two lines. */
|
|
818
800
|
text: string;
|
|
819
|
-
/** Called by the X button. Clear the reply in the app. */
|
|
820
801
|
onDismiss?: () => void;
|
|
821
|
-
/** Default "Dismiss reply quote". */
|
|
822
802
|
dismissLabel?: string;
|
|
823
803
|
};
|
|
824
804
|
/**
|
|
@@ -992,11 +972,6 @@ export const PromptInputActionMenuItem = ({
|
|
|
992
972
|
export type PromptInputSubmitProps = ComponentProps<typeof InputGroupButton> & {
|
|
993
973
|
status?: ChatStatus;
|
|
994
974
|
onStop?: () => void;
|
|
995
|
-
/**
|
|
996
|
-
* Set when a send would join a queue (the agent is still working). The send
|
|
997
|
-
* icon becomes `SendQueueIcon`: an up arrow that morphs into a stack of
|
|
998
|
-
* bars while `true`. Leave unset to keep `submitIcons.send`.
|
|
999
|
-
*/
|
|
1000
975
|
queued?: boolean;
|
|
1001
976
|
};
|
|
1002
977
|
export const PromptInputSubmit = ({
|
|
@@ -1051,7 +1026,6 @@ export const PromptInputSubmit = ({
|
|
|
1051
1026
|
>
|
|
1052
1027
|
{children ??
|
|
1053
1028
|
(config?.submitCrossfade ? (
|
|
1054
|
-
// Keyed by status, so send, spinner, stop and error cross-fade.
|
|
1055
1029
|
<CrossfadeIconSlot iconKey={iconKey}>{Icon}</CrossfadeIconSlot>
|
|
1056
1030
|
) : (
|
|
1057
1031
|
Icon
|
|
@@ -53,7 +53,6 @@ function ClaudeMark({
|
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/** OpenAI mark — path from svgl `openai.svg` / `openai_dark.svg` (current B&W brand). */
|
|
57
56
|
function OpenAIMark({
|
|
58
57
|
size = 14,
|
|
59
58
|
className,
|
|
@@ -107,7 +106,6 @@ function OpencodeMark({
|
|
|
107
106
|
);
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
/** Cursor glyph — path from svgl `cursor_light.svg` / `cursor_dark.svg`. */
|
|
111
109
|
function CursorMark({
|
|
112
110
|
size = 14,
|
|
113
111
|
className,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
flatPanelSubtleClass,
|
|
12
12
|
flatPanelSubtleHoverClass,
|
|
13
13
|
} from "../ui/surface-classes";
|
|
14
|
+
import { destructiveGhostClass } from "../ui/_menu-classes";
|
|
14
15
|
import { Button } from "../ui/button";
|
|
15
16
|
import { Badge } from "../ui/badge";
|
|
16
17
|
import {
|
|
@@ -31,20 +32,6 @@ import {
|
|
|
31
32
|
IconStack2,
|
|
32
33
|
} from "@tabler/icons-react";
|
|
33
34
|
|
|
34
|
-
// One Queue family, used in one of two ways:
|
|
35
|
-
// - The queued-messages widget: `Queue` with `count`, `QueueHeader`,
|
|
36
|
-
// `QueueList` and `QueueItem` with `text`. It animates with `motion.*`.
|
|
37
|
-
// - Composable parts (the AI Elements `Queue`): `Queue` without `count`, the
|
|
38
|
-
// `QueueSection*` parts, `QueueList`, `QueueItem` with children and the
|
|
39
|
-
// `QueueItem*` parts. Plain elements only, no `motion.*`, so it renders
|
|
40
|
-
// under a strict `LazyMotion`.
|
|
41
|
-
// `QueueList` inside a composable `Queue` is the plain list; anywhere else it
|
|
42
|
-
// is the widget's animated list.
|
|
43
|
-
//
|
|
44
|
-
// The widget keeps its own markup: its rows, actions and list have other
|
|
45
|
-
// elements and classes than the parts, so building it on them would change
|
|
46
|
-
// its DOM.
|
|
47
|
-
|
|
48
35
|
/** `UiConfig.Queue`: `classes.sectionTrigger` replaces the section header's classes. */
|
|
49
36
|
export interface QueueConfig {
|
|
50
37
|
classes?: {
|
|
@@ -52,7 +39,6 @@ export interface QueueConfig {
|
|
|
52
39
|
};
|
|
53
40
|
}
|
|
54
41
|
|
|
55
|
-
/** True inside a composable `Queue` (one without `count`). */
|
|
56
42
|
const QueuePartsContext = createContext(false);
|
|
57
43
|
|
|
58
44
|
/** The queued-messages widget: animates in while `count > 0`. */
|
|
@@ -157,7 +143,6 @@ export function QueueHeader({
|
|
|
157
143
|
}
|
|
158
144
|
|
|
159
145
|
export interface QueueListProps extends ComponentProps<"div"> {
|
|
160
|
-
/** Widget list only: animates the list in and out. Default `true`. */
|
|
161
146
|
open?: boolean;
|
|
162
147
|
}
|
|
163
148
|
|
|
@@ -354,7 +339,7 @@ function QueueWidgetItem({
|
|
|
354
339
|
size="sm"
|
|
355
340
|
variant="ghost"
|
|
356
341
|
onClick={onRemove}
|
|
357
|
-
className=
|
|
342
|
+
className={`h-6 w-6 p-0 ${destructiveGhostClass}`}
|
|
358
343
|
>
|
|
359
344
|
<IconTrash size={13} />
|
|
360
345
|
</Button>
|
|
@@ -422,7 +407,6 @@ export const QueueSectionLabel = ({
|
|
|
422
407
|
<span>
|
|
423
408
|
{count} {label}
|
|
424
409
|
</span>
|
|
425
|
-
{/* After the text, pointing right, turning 90° when the section is open. */}
|
|
426
410
|
<IconChevronRight className="-ml-0.5 size-3.5 opacity-70 transition-transform group-data-[state=open]:rotate-90" />
|
|
427
411
|
</span>
|
|
428
412
|
);
|
|
@@ -498,8 +482,6 @@ export const QueueItemActions = ({
|
|
|
498
482
|
return (
|
|
499
483
|
<div
|
|
500
484
|
className={merge(
|
|
501
|
-
// `reveal-on-hover`: hidden until row hover on pointer devices, always
|
|
502
|
-
// visible below `sm` where there is no hover.
|
|
503
485
|
"flex shrink-0 items-start gap-0.5 reveal-on-hover transition-opacity",
|
|
504
486
|
className,
|
|
505
487
|
)}
|
|
@@ -48,7 +48,6 @@ export function Reasoning({
|
|
|
48
48
|
...props
|
|
49
49
|
}: ReasoningProps) {
|
|
50
50
|
const resolvedDefaultOpen = defaultOpen ?? isStreaming;
|
|
51
|
-
// Track if defaultOpen was explicitly set to false (to prevent auto-open)
|
|
52
51
|
const isExplicitlyClosed = defaultOpen === false;
|
|
53
52
|
const [isOpen, setIsOpen] = useControllableState<boolean>({
|
|
54
53
|
defaultProp: resolvedDefaultOpen,
|
|
@@ -62,7 +61,6 @@ export function Reasoning({
|
|
|
62
61
|
const hasEverStreamedRef = useRef(isStreaming);
|
|
63
62
|
const [hasAutoClosed, setHasAutoClosed] = useState(false);
|
|
64
63
|
const startTimeRef = useRef<number | null>(null);
|
|
65
|
-
// Track when streaming starts and compute duration
|
|
66
64
|
useEffect(() => {
|
|
67
65
|
if (isStreaming) {
|
|
68
66
|
hasEverStreamedRef.current = true;
|
|
@@ -74,13 +72,11 @@ export function Reasoning({
|
|
|
74
72
|
startTimeRef.current = null;
|
|
75
73
|
}
|
|
76
74
|
}, [isStreaming, setDuration]);
|
|
77
|
-
// Auto-open when streaming starts (unless explicitly closed)
|
|
78
75
|
useEffect(() => {
|
|
79
76
|
if (isStreaming && !isOpen && !isExplicitlyClosed) {
|
|
80
77
|
setIsOpen(true);
|
|
81
78
|
}
|
|
82
79
|
}, [isStreaming, isOpen, setIsOpen, isExplicitlyClosed]);
|
|
83
|
-
// Auto-close when streaming ends (once only, and only if it ever streamed)
|
|
84
80
|
useEffect(() => {
|
|
85
81
|
if (
|
|
86
82
|
hasEverStreamedRef.current &&
|