@vvedantb/ui 0.67.0 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 +0 -7
- 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 +0 -15
- package/dist/src/ai-elements/shimmer.js +0 -14
- package/dist/src/ai-elements/speech-input.js +0 -7
- package/dist/src/artifacts/artifact-frame.js +0 -2
- 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 +0 -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/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/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 +1 -1
- 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 +0 -40
- 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/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 +0 -32
- 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 +0 -19
- 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 +0 -7
- 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 +0 -5
- 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 +0 -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 +0 -10
- 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 +0 -11
- 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
|
@@ -32,7 +32,6 @@ export function useComposerSlashMenu({
|
|
|
32
32
|
items: ComposerSlashItem[];
|
|
33
33
|
textareaRef: RefObject<HTMLElement | null>;
|
|
34
34
|
onSelect: (item: ComposerSlashItem) => void;
|
|
35
|
-
/** When false the menu never opens. */
|
|
36
35
|
enabled?: boolean;
|
|
37
36
|
}) {
|
|
38
37
|
const listboxId = useId();
|
|
@@ -31,7 +31,6 @@ export function useInputAreaPrediction({
|
|
|
31
31
|
shouldSkipPrediction(value);
|
|
32
32
|
const settled = result?.forValue === value || dismissedFor === value;
|
|
33
33
|
|
|
34
|
-
// Debounced request: it has to react to the draft changing.
|
|
35
34
|
useEffect(() => {
|
|
36
35
|
if (idle || settled || getPrediction === undefined) return;
|
|
37
36
|
return scheduleCompletion(
|
|
@@ -33,20 +33,14 @@ export function joinComposerPrediction(draft: string, prediction: string): strin
|
|
|
33
33
|
|
|
34
34
|
/** What `getPrediction` last returned, and the draft it was requested for. */
|
|
35
35
|
export type ComposerPredictionState = {
|
|
36
|
-
/** Draft the stored `text` answers, or `null` when there is none. */
|
|
37
36
|
forValue: string | null;
|
|
38
|
-
/** Raw text from `getPrediction` (no joining space). */
|
|
39
37
|
text: string;
|
|
40
|
-
/** Draft for which the user pressed Esc. Suppresses requests until the draft changes. */
|
|
41
38
|
dismissedFor: string | null;
|
|
42
39
|
};
|
|
43
40
|
|
|
44
41
|
export type ComposerPredictionAction =
|
|
45
|
-
/** A request finished. `current` is the draft at the time it finished. */
|
|
46
42
|
| { type: "result"; forValue: string; text: string; current: string }
|
|
47
|
-
/** Esc: hide the prediction for this draft. */
|
|
48
43
|
| { type: "dismiss"; value: string }
|
|
49
|
-
/** Tab accepted the prediction, or the caller reset it. */
|
|
50
44
|
| { type: "clear" };
|
|
51
45
|
|
|
52
46
|
export const initialComposerPredictionState: ComposerPredictionState = {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
|
|
12
12
|
export type UseComposerPredictionOptions = {
|
|
13
13
|
value: string;
|
|
14
|
-
/** Off when there is no `getPrediction`, the composer is busy, or the caret is not at the end. */
|
|
15
14
|
enabled: boolean;
|
|
16
15
|
getPrediction?: (draft: string, opts: { signal: AbortSignal }) => Promise<string>;
|
|
17
16
|
debounceMs?: number;
|
|
@@ -19,7 +18,6 @@ export type UseComposerPredictionOptions = {
|
|
|
19
18
|
};
|
|
20
19
|
|
|
21
20
|
export type ComposerPrediction = {
|
|
22
|
-
/** Ghost text to render after the draft, including any joining space. `""` when none. */
|
|
23
21
|
ghost: string;
|
|
24
22
|
dismiss: () => void;
|
|
25
23
|
clear: () => void;
|
|
@@ -7,15 +7,8 @@ import { Surface } from "../ui/surface";
|
|
|
7
7
|
import { GenerativeUiRenderer } from "./renderer";
|
|
8
8
|
|
|
9
9
|
export interface GenerativeUiPanelProps {
|
|
10
|
-
/** The stored json-render spec, still serialised. */
|
|
11
10
|
spec: string;
|
|
12
|
-
/**
|
|
13
|
-
* Sends a button's text back to the agent. Undefined when the app cannot
|
|
14
|
-
* send now (an archived chat, a sleeping sandbox): the buttons are then
|
|
15
|
-
* disabled, not silently inert.
|
|
16
|
-
*/
|
|
17
11
|
onReply?: (message: string) => void;
|
|
18
|
-
/** Opens a button's link. Only http(s) URLs reach it. Default: a new browser tab. */
|
|
19
12
|
onOpenUrl?: (url: string) => void;
|
|
20
13
|
"data-testid"?: string;
|
|
21
14
|
}
|
|
@@ -46,8 +39,6 @@ export function GenerativeUiPanel({
|
|
|
46
39
|
}
|
|
47
40
|
if (actionName === "open_url") {
|
|
48
41
|
const url = params?.url;
|
|
49
|
-
// The composer already rejects other schemes, but a stored spec is data,
|
|
50
|
-
// and `window.open("javascript:…")` would run it: check again here.
|
|
51
42
|
if (typeof url === "string" && isHttpUrl(url)) onOpenUrl(url);
|
|
52
43
|
}
|
|
53
44
|
};
|
|
@@ -55,8 +46,6 @@ export function GenerativeUiPanel({
|
|
|
55
46
|
return (
|
|
56
47
|
<m.div initial={{ opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} transition={tokenTransition.fast}>
|
|
57
48
|
<Surface density="tight" className="min-w-0 max-w-full" data-testid={testId}>
|
|
58
|
-
{/* `display: contents` keeps the fieldset out of the layout, while its
|
|
59
|
-
disabled state still reaches every button inside the spec. */}
|
|
60
49
|
<fieldset className="contents" disabled={onReply === undefined}>
|
|
61
50
|
<GenerativeUiRenderer spec={parsed} onAction={handleAction} />
|
|
62
51
|
</fieldset>
|
|
@@ -9,8 +9,6 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from ".
|
|
|
9
9
|
import { cn } from "../utils/cn";
|
|
10
10
|
import { BADGE_VARIANT, TONE_SURFACE, TONE_TEXT } from "./toneStyles";
|
|
11
11
|
|
|
12
|
-
/** The leaves of a composed panel: everything that shows the agent's content. */
|
|
13
|
-
|
|
14
12
|
const TEXT_VARIANT = {
|
|
15
13
|
body: "text-sm text-foreground",
|
|
16
14
|
lead: "text-sm font-medium text-foreground",
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
// Generative UI on the web: agent-composed panels from the shared catalog
|
|
2
|
-
// (`@vvedantb/server/generative-ui`). Needs `@json-render/core` and
|
|
3
|
-
// `@json-render/react`; a separate subpath, so the root export does not.
|
|
4
1
|
export { GenerativeUiPanel, type GenerativeUiPanelProps } from "./GenerativeUiPanel";
|
|
5
2
|
export { GenerativeUiRenderer, generativeUiCatalog } from "./renderer";
|
|
@@ -4,11 +4,6 @@ import { Separator } from "../ui/separator";
|
|
|
4
4
|
import { Surface } from "../ui/surface";
|
|
5
5
|
import { cn } from "../utils/cn";
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* The containers a composed panel is built from. Tailwind needs literal class
|
|
9
|
-
* names, so every prop value maps through a lookup, never string interpolation.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
7
|
const GAP = { sm: "gap-2", md: "gap-3", lg: "gap-4" };
|
|
13
8
|
const ALIGN = { start: "items-start", center: "items-center", stretch: "items-stretch" };
|
|
14
9
|
|
|
@@ -3,7 +3,6 @@ import { useEffect, useRef, useState } from "react";
|
|
|
3
3
|
import { useDisablePageMotion } from "../../app/src/page-motion/PageMotionProvider";
|
|
4
4
|
import { motionEase, tokenTransition } from "../motion/presets";
|
|
5
5
|
|
|
6
|
-
/** Suffixes we will count; compound durations like "1h 12m" stay static. */
|
|
7
6
|
const COUNTABLE_SUFFIX = /^(?:%|h|k|m|s|ms)?$/i;
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
|
|
3
|
-
/** Anything worth passing through a debounced callback. */
|
|
4
3
|
type CallbackArgs = ReadonlyArray<string | number | boolean | null | object>;
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -31,10 +30,6 @@ export function useIdleCallback<Args extends CallbackArgs>(
|
|
|
31
30
|
ms: number,
|
|
32
31
|
fn: (...args: Args) => void,
|
|
33
32
|
): (...args: Args) => void {
|
|
34
|
-
// No refs and no direct writes to state: the React Compiler skips a file
|
|
35
|
-
// that does either during render. The holder keeps the latest `fn` in a
|
|
36
|
-
// closure; the caller stores it on each call (always an event handler
|
|
37
|
-
// holding the current render's closure), and the timer reads it on fire.
|
|
38
33
|
const [idle] = useState(() => {
|
|
39
34
|
let current = fn;
|
|
40
35
|
return {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useLayoutEffect, useState, type RefCallback } from "react";
|
|
2
2
|
|
|
3
|
-
/** Re-apply after a virtualised list measures; first paint often resets scrollTop. */
|
|
4
3
|
function applyScrollTop(el: HTMLElement, scrollTop: number): void {
|
|
5
4
|
el.scrollTop = scrollTop;
|
|
6
5
|
requestAnimationFrame(() => {
|
|
@@ -13,7 +12,6 @@ function applyScrollTop(el: HTMLElement, scrollTop: number): void {
|
|
|
13
12
|
|
|
14
13
|
function readScrollTop(key: string): number {
|
|
15
14
|
try {
|
|
16
|
-
// Stored as JSON; a JSON number is also a plain numeric string.
|
|
17
15
|
const value = Number(sessionStorage.getItem(key) ?? 0);
|
|
18
16
|
return Number.isFinite(value) ? value : 0;
|
|
19
17
|
} catch {
|
|
@@ -21,12 +19,10 @@ function readScrollTop(key: string): number {
|
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
/** JSON, so a value written by an older `useSessionStorage` reads back. */
|
|
25
22
|
function writeScrollTop(key: string, scrollTop: number): void {
|
|
26
23
|
try {
|
|
27
24
|
sessionStorage.setItem(key, JSON.stringify(Math.round(scrollTop)));
|
|
28
25
|
} catch {
|
|
29
|
-
// Ignore quota / private-mode failures.
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
@@ -25,8 +25,6 @@ export function useSingleFlight<TArgs, TRet>(
|
|
|
25
25
|
const next: Pending<TArgs> = pending.current;
|
|
26
26
|
pending.current = NO_PENDING;
|
|
27
27
|
if (next.has) {
|
|
28
|
-
// Recurse with the latest coalesced args — return value discarded
|
|
29
|
-
// intentionally since the original caller already received undefined.
|
|
30
28
|
void invoke(next.args);
|
|
31
29
|
}
|
|
32
30
|
};
|
|
@@ -39,9 +37,6 @@ export function useSingleFlight<TArgs, TRet>(
|
|
|
39
37
|
inFlight.current = true;
|
|
40
38
|
pending.current = NO_PENDING;
|
|
41
39
|
|
|
42
|
-
// Avoid `finally` here: TypeScript narrows discriminated unions to `never`
|
|
43
|
-
// inside `finally` blocks when the try body is async, making `next.args`
|
|
44
|
-
// inaccessible. Use explicit try/catch instead.
|
|
45
40
|
let result: TRet | undefined;
|
|
46
41
|
try {
|
|
47
42
|
result = await fn(args);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface AnimatedBellIconProps {
|
|
4
|
-
/** Width and height in px. Default `32`. */
|
|
5
4
|
size?: number;
|
|
6
5
|
className?: string;
|
|
7
|
-
/** Draw the mute slash. Default `true` (the empty-notifications state). */
|
|
8
6
|
muted?: boolean;
|
|
9
7
|
}
|
|
10
8
|
|
|
@@ -30,21 +28,18 @@ export function AnimatedBellIcon({ size = 32, className, muted = true }: Animate
|
|
|
30
28
|
transition={{ duration: 1.5, ease: "easeInOut", repeat: Infinity, repeatDelay: 3 }}
|
|
31
29
|
style={{ transformOrigin: "top center" }}
|
|
32
30
|
>
|
|
33
|
-
{/* Body */}
|
|
34
31
|
<m.path
|
|
35
32
|
d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"
|
|
36
33
|
initial={{ pathLength: 0 }}
|
|
37
34
|
animate={{ pathLength: 1 }}
|
|
38
35
|
transition={{ duration: 0.6, ease: "easeOut" }}
|
|
39
36
|
/>
|
|
40
|
-
{/* Bottom curve */}
|
|
41
37
|
<m.path
|
|
42
38
|
d="M13.73 21a2 2 0 0 1-3.46 0"
|
|
43
39
|
initial={{ pathLength: 0 }}
|
|
44
40
|
animate={{ pathLength: 1 }}
|
|
45
41
|
transition={{ duration: 0.3, delay: 0.4 }}
|
|
46
42
|
/>
|
|
47
|
-
{/* Mute slash */}
|
|
48
43
|
{muted ? (
|
|
49
44
|
<m.path
|
|
50
45
|
d="M2 2l20 20"
|
|
@@ -54,7 +49,6 @@ export function AnimatedBellIcon({ size = 32, className, muted = true }: Animate
|
|
|
54
49
|
transition={{ duration: 0.3, delay: 0.6 }}
|
|
55
50
|
/>
|
|
56
51
|
) : null}
|
|
57
|
-
{/* Clapper */}
|
|
58
52
|
<m.circle
|
|
59
53
|
cx="12"
|
|
60
54
|
cy="17"
|
|
@@ -3,14 +3,10 @@ import { useEffect, useRef } from "react";
|
|
|
3
3
|
import { cn } from "../../utils/cn";
|
|
4
4
|
|
|
5
5
|
export interface AnimatedCounterProps {
|
|
6
|
-
/** Target value to count up to. */
|
|
7
6
|
value: number;
|
|
8
|
-
/** Rough animation length in seconds (scales the spring stiffness). Default `1`. */
|
|
9
7
|
duration?: number;
|
|
10
8
|
className?: string;
|
|
11
|
-
/** Formats the displayed number. Default: rounded, `toLocaleString()`. */
|
|
12
9
|
formatValue?: (value: number) => string;
|
|
13
|
-
/** Wait until the counter scrolls into view. Default `true`. */
|
|
14
10
|
animateOnView?: boolean;
|
|
15
11
|
}
|
|
16
12
|
|
|
@@ -30,7 +26,6 @@ export function AnimatedCounter({
|
|
|
30
26
|
}: AnimatedCounterProps) {
|
|
31
27
|
const ref = useRef<HTMLSpanElement>(null);
|
|
32
28
|
const isInView = useInView(ref, { once: true, margin: "-50px" });
|
|
33
|
-
// Start at `value` when not waiting for view, so remounts do not flash zeros.
|
|
34
29
|
const springValue = useSpring(animateOnView ? 0 : value, { stiffness: 100 / duration, damping: 30, restDelta: 0.01 });
|
|
35
30
|
const displayValue = useTransform(springValue, (v) => formatValue(v));
|
|
36
31
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface AnimatedKeyIconProps {
|
|
4
|
-
/** Width and height in px. Default `48`. */
|
|
5
4
|
size?: number;
|
|
6
5
|
className?: string;
|
|
7
6
|
}
|
|
@@ -9,7 +8,6 @@ export interface AnimatedKeyIconProps {
|
|
|
9
8
|
function Sparkle({ x, y, delay, size = 3 }: { x: number; y: number; delay: number; size?: number }) {
|
|
10
9
|
return (
|
|
11
10
|
<g transform={`translate(${x}, ${y})`}>
|
|
12
|
-
{/* Four-pointed star */}
|
|
13
11
|
<m.path
|
|
14
12
|
d={`M0 -${size} L0 ${size} M-${size} 0 L${size} 0`}
|
|
15
13
|
stroke="currentColor"
|
|
@@ -46,7 +44,6 @@ export function AnimatedKeyIcon({ size = 48, className }: AnimatedKeyIconProps)
|
|
|
46
44
|
<Sparkle x={36} y={38} delay={0.8} size={2.5} />
|
|
47
45
|
<Sparkle x={10} y={36} delay={1.2} size={2} />
|
|
48
46
|
|
|
49
|
-
{/* Bolt with a gentle pulse */}
|
|
50
47
|
<m.g
|
|
51
48
|
initial={{ scale: 1 }}
|
|
52
49
|
animate={{ scale: [1, 1.02, 1] }}
|
|
@@ -62,7 +59,6 @@ export function AnimatedKeyIcon({ size = 48, className }: AnimatedKeyIconProps)
|
|
|
62
59
|
/>
|
|
63
60
|
</m.g>
|
|
64
61
|
|
|
65
|
-
{/* Glow pulse behind */}
|
|
66
62
|
<m.circle
|
|
67
63
|
cx="24"
|
|
68
64
|
cy="24"
|
|
@@ -4,11 +4,8 @@ export type NotificationIconType = "success" | "warning" | "error" | "info";
|
|
|
4
4
|
|
|
5
5
|
export interface AnimatedNotificationIconProps {
|
|
6
6
|
type: NotificationIconType;
|
|
7
|
-
/** Width and height in px. Default `20`. */
|
|
8
7
|
size?: number;
|
|
9
|
-
/** Stroke colour. Default: the type's token (`--color-success`, `--color-warning`, `--color-danger`, `--color-primary` for `info`). */
|
|
10
8
|
color?: string;
|
|
11
|
-
/** Class on the wrapping `span`. */
|
|
12
9
|
className?: string;
|
|
13
10
|
}
|
|
14
11
|
|
|
@@ -27,7 +24,6 @@ interface PartProps {
|
|
|
27
24
|
function SuccessIcon({ size, color }: PartProps) {
|
|
28
25
|
return (
|
|
29
26
|
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
30
|
-
{/* Circle */}
|
|
31
27
|
<m.circle
|
|
32
28
|
cx="12"
|
|
33
29
|
cy="12"
|
|
@@ -39,7 +35,6 @@ function SuccessIcon({ size, color }: PartProps) {
|
|
|
39
35
|
animate={{ pathLength: 1, opacity: 1 }}
|
|
40
36
|
transition={{ duration: 0.4, ease: "easeOut" }}
|
|
41
37
|
/>
|
|
42
|
-
{/* Checkmark draws itself */}
|
|
43
38
|
<m.path
|
|
44
39
|
d="M8 12l2.5 2.5L16 9"
|
|
45
40
|
stroke={color}
|
|
@@ -67,7 +62,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
67
62
|
animate={{ rotate: [0, -5, 5, -3, 3, 0] }}
|
|
68
63
|
transition={{ duration: 0.5, delay: 0.2 }}
|
|
69
64
|
>
|
|
70
|
-
{/* Triangle */}
|
|
71
65
|
<m.path
|
|
72
66
|
d="M12 2L2 20h20L12 2z"
|
|
73
67
|
stroke={color}
|
|
@@ -79,7 +73,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
79
73
|
animate={{ pathLength: 1, opacity: 1 }}
|
|
80
74
|
transition={{ duration: 0.4, ease: "easeOut" }}
|
|
81
75
|
/>
|
|
82
|
-
{/* Exclamation line */}
|
|
83
76
|
<m.path
|
|
84
77
|
d="M12 9v4"
|
|
85
78
|
stroke={color}
|
|
@@ -89,7 +82,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
89
82
|
animate={{ pathLength: 1 }}
|
|
90
83
|
transition={{ duration: 0.2, delay: 0.3 }}
|
|
91
84
|
/>
|
|
92
|
-
{/* Exclamation dot */}
|
|
93
85
|
<m.circle
|
|
94
86
|
cx="12"
|
|
95
87
|
cy="17"
|
|
@@ -106,7 +98,6 @@ function WarningIcon({ size, color }: PartProps) {
|
|
|
106
98
|
function ErrorIcon({ size, color }: PartProps) {
|
|
107
99
|
return (
|
|
108
100
|
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
109
|
-
{/* Circle */}
|
|
110
101
|
<m.circle
|
|
111
102
|
cx="12"
|
|
112
103
|
cy="12"
|
|
@@ -118,7 +109,6 @@ function ErrorIcon({ size, color }: PartProps) {
|
|
|
118
109
|
animate={{ scale: 1, opacity: 1 }}
|
|
119
110
|
transition={{ duration: 0.3, ease: "easeOut" }}
|
|
120
111
|
/>
|
|
121
|
-
{/* X, first stroke */}
|
|
122
112
|
<m.path
|
|
123
113
|
d="M15 9l-6 6"
|
|
124
114
|
stroke={color}
|
|
@@ -128,7 +118,6 @@ function ErrorIcon({ size, color }: PartProps) {
|
|
|
128
118
|
animate={{ pathLength: 1 }}
|
|
129
119
|
transition={{ duration: 0.2, delay: 0.2 }}
|
|
130
120
|
/>
|
|
131
|
-
{/* X, second stroke */}
|
|
132
121
|
<m.path
|
|
133
122
|
d="M9 9l6 6"
|
|
134
123
|
stroke={color}
|
|
@@ -154,9 +143,7 @@ function InfoIcon({ size, color }: PartProps) {
|
|
|
154
143
|
animate={{ y: 0, opacity: 1 }}
|
|
155
144
|
transition={{ duration: 0.3, ease: "easeOut" }}
|
|
156
145
|
>
|
|
157
|
-
{/* Circle */}
|
|
158
146
|
<circle cx="12" cy="12" r="10" stroke={color} strokeWidth="1.5" fill="none" />
|
|
159
|
-
{/* Dot */}
|
|
160
147
|
<m.circle
|
|
161
148
|
cx="12"
|
|
162
149
|
cy="8"
|
|
@@ -166,7 +153,6 @@ function InfoIcon({ size, color }: PartProps) {
|
|
|
166
153
|
animate={{ scale: 1 }}
|
|
167
154
|
transition={{ duration: 0.2, delay: 0.2, type: "spring" }}
|
|
168
155
|
/>
|
|
169
|
-
{/* Line */}
|
|
170
156
|
<m.path
|
|
171
157
|
d="M12 12v4"
|
|
172
158
|
stroke={color}
|
|
@@ -2,15 +2,10 @@ import { m, useSpring, useTransform } from "motion/react";
|
|
|
2
2
|
import { useEffect, useId } from "react";
|
|
3
3
|
|
|
4
4
|
export interface AnimatedProgressProps {
|
|
5
|
-
/** Progress from 0 to 100 (clamped). */
|
|
6
5
|
value: number;
|
|
7
|
-
/** Bar height in px. Default `4`. */
|
|
8
6
|
height?: number;
|
|
9
|
-
/** Class on the wrapping `div`. */
|
|
10
7
|
className?: string;
|
|
11
|
-
/** Run the moving gradient and shimmer. Default `true`. */
|
|
12
8
|
showGradient?: boolean;
|
|
13
|
-
/** Accessible name for the `progressbar`. */
|
|
14
9
|
label?: string;
|
|
15
10
|
}
|
|
16
11
|
|
|
@@ -43,7 +38,6 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
43
38
|
>
|
|
44
39
|
<svg width="100%" height={height} className="block" aria-hidden="true">
|
|
45
40
|
<defs>
|
|
46
|
-
{/* Moving gradient */}
|
|
47
41
|
<linearGradient id={gradientId} x1="0%" y1="0%" x2="100%" y2="0%">
|
|
48
42
|
<stop offset="0%" stopColor="var(--color-primary)" />
|
|
49
43
|
<stop offset="50%" stopColor="color-mix(in oklch, var(--color-primary) 80%, transparent)" />
|
|
@@ -51,7 +45,6 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
51
45
|
{showGradient ? <animate attributeName="x1" values="-100%;100%" dur="2s" repeatCount="indefinite" /> : null}
|
|
52
46
|
{showGradient ? <animate attributeName="x2" values="0%;200%" dur="2s" repeatCount="indefinite" /> : null}
|
|
53
47
|
</linearGradient>
|
|
54
|
-
{/* Shimmer overlay */}
|
|
55
48
|
<linearGradient id={shimmerId} x1="0%" y1="0%" x2="100%" y2="0%">
|
|
56
49
|
<stop offset="0%" stopColor="transparent" />
|
|
57
50
|
<stop offset="50%" stopColor="rgba(255,255,255,0.3)" />
|
|
@@ -60,11 +53,8 @@ export function AnimatedProgress({ value, height = 4, className, showGradient =
|
|
|
60
53
|
<animate attributeName="x2" values="0%;200%" dur="1.5s" repeatCount="indefinite" />
|
|
61
54
|
</linearGradient>
|
|
62
55
|
</defs>
|
|
63
|
-
{/* Track */}
|
|
64
56
|
<rect x="0" y="0" width="100%" height={height} rx={height / 2} fill="var(--color-surface-secondary)" />
|
|
65
|
-
{/* Fill */}
|
|
66
57
|
<m.rect x="0" y="0" height={height} rx={height / 2} fill={`url(#${gradientId})`} style={{ width }} />
|
|
67
|
-
{/* Shimmer */}
|
|
68
58
|
{showGradient && clamped > 0 ? (
|
|
69
59
|
<m.rect x="0" y="0" height={height} rx={height / 2} fill={`url(#${shimmerId})`} style={{ width }} />
|
|
70
60
|
) : null}
|
|
@@ -5,7 +5,6 @@ export type StatusDotPhase = "idle" | "listening" | "thinking" | "speaking" | "e
|
|
|
5
5
|
|
|
6
6
|
export interface AnimatedStatusDotProps {
|
|
7
7
|
phase: StatusDotPhase;
|
|
8
|
-
/** Dot diameter in px. The svg is `size * 3` square to leave room for the ripples. Default `10`. */
|
|
9
8
|
size?: number;
|
|
10
9
|
className?: string;
|
|
11
10
|
}
|
|
@@ -50,7 +49,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
50
49
|
</filter>
|
|
51
50
|
</defs>
|
|
52
51
|
|
|
53
|
-
{/* Ripples while listening */}
|
|
54
52
|
{isListening
|
|
55
53
|
? RIPPLE_DELAYS.map((delay) => (
|
|
56
54
|
<m.circle
|
|
@@ -68,7 +66,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
68
66
|
))
|
|
69
67
|
: null}
|
|
70
68
|
|
|
71
|
-
{/* Glow ring while active */}
|
|
72
69
|
{isActive ? (
|
|
73
70
|
<m.circle
|
|
74
71
|
cx="15"
|
|
@@ -82,7 +79,6 @@ export function AnimatedStatusDot({ phase, size = 10, className }: AnimatedStatu
|
|
|
82
79
|
/>
|
|
83
80
|
) : null}
|
|
84
81
|
|
|
85
|
-
{/* Dot */}
|
|
86
82
|
<m.circle
|
|
87
83
|
cx="15"
|
|
88
84
|
cy="15"
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// Motion-driven animated SVG icons. Entry: `@vvedantb/ui/icons/animated` (not re-exported from
|
|
2
|
-
// the root or `/client`, so apps that do not use them do not load them). They need the optional
|
|
3
|
-
// `motion` peer and animate through `m.*`, so wrap the app in `MotionProvider` (or its own
|
|
4
|
-
// `LazyMotion`); without it they render their resting frame. No stylesheet is needed.
|
|
5
1
|
export { AnimatedBellIcon } from "./animated-bell-icon";
|
|
6
2
|
export type { AnimatedBellIconProps } from "./animated-bell-icon";
|
|
7
3
|
export { AnimatedCounter } from "./animated-counter";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { m } from "motion/react";
|
|
2
2
|
|
|
3
3
|
export interface MorphingMenuIconProps {
|
|
4
|
-
/** `true` draws the X (close), `false` the three bars (menu). */
|
|
5
4
|
isOpen: boolean;
|
|
6
|
-
/** Width and height in px. Default `20`. */
|
|
7
5
|
size?: number;
|
|
8
6
|
className?: string;
|
|
9
7
|
}
|
|
@@ -32,7 +30,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
32
30
|
aria-hidden="true"
|
|
33
31
|
data-state={isOpen ? "open" : "closed"}
|
|
34
32
|
>
|
|
35
|
-
{/* Top bar: becomes the "\" of the X */}
|
|
36
33
|
<m.line
|
|
37
34
|
x1="4"
|
|
38
35
|
y1="6"
|
|
@@ -43,7 +40,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
43
40
|
animate={{ x1: isOpen ? 5 : 4, y1: isOpen ? 5 : 6, x2: isOpen ? 19 : 20, y2: isOpen ? 19 : 6 }}
|
|
44
41
|
transition={MORPH}
|
|
45
42
|
/>
|
|
46
|
-
{/* Middle bar: fades out */}
|
|
47
43
|
<m.line
|
|
48
44
|
x1="4"
|
|
49
45
|
y1="12"
|
|
@@ -55,7 +51,6 @@ export function MorphingMenuIcon({ isOpen, size = 20, className }: MorphingMenuI
|
|
|
55
51
|
transition={{ duration: 0.15, ease: "easeInOut" }}
|
|
56
52
|
style={{ transformOrigin: "center" }}
|
|
57
53
|
/>
|
|
58
|
-
{/* Bottom bar: becomes the "/" of the X */}
|
|
59
54
|
<m.line
|
|
60
55
|
x1="4"
|
|
61
56
|
y1="18"
|
|
@@ -2,9 +2,7 @@ import { m } from "motion/react";
|
|
|
2
2
|
import { cn } from "../../utils/cn";
|
|
3
3
|
|
|
4
4
|
export interface MorphingMicIconProps {
|
|
5
|
-
/** `true` shows the stop square, `false` the microphone. */
|
|
6
5
|
isListening: boolean;
|
|
7
|
-
/** Width and height in px. Default `32`. */
|
|
8
6
|
size?: number;
|
|
9
7
|
strokeWidth?: number;
|
|
10
8
|
className?: string;
|
|
@@ -2,13 +2,9 @@ import { m } from "motion/react";
|
|
|
2
2
|
import { cn } from "../../utils/cn";
|
|
3
3
|
|
|
4
4
|
export interface PulsingRingsProps {
|
|
5
|
-
/** Size of the element the rings surround (for example the record button), in px. The svg is `size * 1.6`. */
|
|
6
5
|
size: number;
|
|
7
|
-
/** Number of rings. Default `3`. */
|
|
8
6
|
ringCount?: number;
|
|
9
|
-
/** Ring colour. Default `var(--color-danger)`. */
|
|
10
7
|
color?: string;
|
|
11
|
-
/** Render the rings. Default `true`; `false` renders nothing. */
|
|
12
8
|
active?: boolean;
|
|
13
9
|
className?: string;
|
|
14
10
|
}
|
|
@@ -6,7 +6,6 @@ export function AutomationIcon({ strokeWidth = 1.75, cutoutColor, ...props }: Cu
|
|
|
6
6
|
return (
|
|
7
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.12" loop={1800}>
|
|
8
8
|
<circle cx="12" cy="12" r="9" strokeDasharray="2.5 3.5" className="vv-icon-automation-orbit" />
|
|
9
|
-
{/* Filling the dashed orbit itself reads as a cog; a disc inside it keeps the orbit's silhouette. */}
|
|
10
9
|
{active ? <circle cx="12" cy="12" r="6.5" fill="currentColor" stroke="none" /> : null}
|
|
11
10
|
<g className="vv-icon-automation-sparks">
|
|
12
11
|
<line x1="3.7" y1="3.7" x2="2.2" y2="2.2" />
|
package/src/icons/board-icon.tsx
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Three-column board; cards drop in and a card travels across on hover. */
|
|
4
|
-
export function BoardIcon({ strokeWidth = 1.75, ...props }:
|
|
3
|
+
/** Three-column board; cards drop in and a card travels across on hover. Solid while `active`. */
|
|
4
|
+
export function BoardIcon({ strokeWidth = 1.75, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
6
|
+
const solid = active ? "currentColor" : undefined;
|
|
7
|
+
const card = cutoutStyle(active, "fill", cutoutColor);
|
|
5
8
|
return (
|
|
6
9
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.12" loop={1800}>
|
|
7
|
-
<rect x="3" y="3.5" width="5.5" height="17" rx="1.4" />
|
|
8
|
-
<rect x="9.25" y="3.5" width="5.5" height="11" rx="1.4" />
|
|
9
|
-
<rect x="15.5" y="3.5" width="5.5" height="14" rx="1.4" />
|
|
10
|
-
<rect x="4.4" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-1" />
|
|
11
|
-
<rect x="10.65" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-2" />
|
|
12
|
-
<rect x="16.9" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-3" />
|
|
13
|
-
<rect x="4.4" y="9" width="2.7" height="1.5" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-traveler" />
|
|
10
|
+
<rect x="3" y="3.5" width="5.5" height="17" rx="1.4" fill={solid} />
|
|
11
|
+
<rect x="9.25" y="3.5" width="5.5" height="11" rx="1.4" fill={solid} />
|
|
12
|
+
<rect x="15.5" y="3.5" width="5.5" height="14" rx="1.4" fill={solid} />
|
|
13
|
+
<rect x="4.4" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-1" style={card} />
|
|
14
|
+
<rect x="10.65" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-2" style={card} />
|
|
15
|
+
<rect x="16.9" y="5" width="2.7" height="2.2" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-card vv-icon-board-card-3" style={card} />
|
|
16
|
+
<rect x="4.4" y="9" width="2.7" height="1.5" rx="0.4" fill="currentColor" stroke="none" className="vv-icon-board-traveler" style={card} />
|
|
14
17
|
</NavIconBase>
|
|
15
18
|
);
|
|
16
19
|
}
|
package/src/icons/bolt-icon.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Lightning bolt that flashes on hover. */
|
|
4
|
-
export function BoltIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Lightning bolt that flashes on hover. Solid while `active`. */
|
|
4
|
+
export function BoltIcon({ strokeWidth = 1.7, cutoutColor: _cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
5
6
|
return (
|
|
6
7
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={900}>
|
|
7
|
-
<path className="vv-icon-bolt" d="M13 3L4 14h7l-1 7l9 -11h-7l1 -7z" />
|
|
8
|
+
<path className="vv-icon-bolt" d="M13 3L4 14h7l-1 7l9 -11h-7l1 -7z" fill={active ? "currentColor" : undefined} />
|
|
8
9
|
</NavIconBase>
|
|
9
10
|
);
|
|
10
11
|
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { NavIconBase, type
|
|
1
|
+
import { NavIconBase, cutoutStyle, type CutoutIconProps } from "./nav-icon-base";
|
|
2
2
|
|
|
3
|
-
/** Building whose windows blink in turn on hover. */
|
|
4
|
-
export function BuildingIcon({ strokeWidth = 1.7, ...props }:
|
|
3
|
+
/** Building whose windows blink in turn on hover. Solid while `active`. */
|
|
4
|
+
export function BuildingIcon({ strokeWidth = 1.7, cutoutColor, ...props }: CutoutIconProps) {
|
|
5
|
+
const { active } = props;
|
|
6
|
+
const fill = cutoutStyle(active, "fill", cutoutColor);
|
|
5
7
|
return (
|
|
6
8
|
<NavIconBase {...props} strokeWidth={strokeWidth} hoverScale="1.15" loop={1600}>
|
|
7
|
-
<path d="M4 20V6.5a1.5 1.5 0 0 1 1.5 -1.5h13a1.5 1.5 0 0 1 1.5 1.5V20" />
|
|
9
|
+
<path d="M4 20V6.5a1.5 1.5 0 0 1 1.5 -1.5h13a1.5 1.5 0 0 1 1.5 1.5V20" fill={active ? "currentColor" : undefined} />
|
|
8
10
|
<path d="M3 20h18" />
|
|
9
|
-
<path d="M10 20v-4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4" />
|
|
10
|
-
<rect className="vv-icon-building-window vv-icon-building-window-1" x="7" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" />
|
|
11
|
-
<rect className="vv-icon-building-window vv-icon-building-window-2" x="14" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" />
|
|
12
|
-
<rect className="vv-icon-building-window vv-icon-building-window-3" x="7" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" />
|
|
13
|
-
<rect className="vv-icon-building-window vv-icon-building-window-4" x="14" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" />
|
|
11
|
+
<path d="M10 20v-4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4" style={cutoutStyle(active, "stroke", cutoutColor)} />
|
|
12
|
+
<rect className="vv-icon-building-window vv-icon-building-window-1" x="7" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
13
|
+
<rect className="vv-icon-building-window vv-icon-building-window-2" x="14" y="8" width="3" height="3" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
14
|
+
<rect className="vv-icon-building-window vv-icon-building-window-3" x="7" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
15
|
+
<rect className="vv-icon-building-window vv-icon-building-window-4" x="14" y="12" width="3" height="2.5" rx="0.5" fill="currentColor" stroke="none" style={fill} />
|
|
14
16
|
</NavIconBase>
|
|
15
17
|
);
|
|
16
18
|
}
|
package/src/icons/draft-icon.tsx
CHANGED
|
@@ -8,7 +8,6 @@ export function DraftIcon({ strokeWidth = 1.75, ...props }: IconProps) {
|
|
|
8
8
|
<path d="M14 3v4.5a1 1 0 0 0 1 1h4.5" className="vv-icon-document-corner" />
|
|
9
9
|
<line x1="9" y1="12" x2="16" y2="12" className="vv-icon-document-line vv-icon-document-line-1" />
|
|
10
10
|
<line x1="9" y1="15" x2="13" y2="15" className="vv-icon-document-line vv-icon-document-line-2" strokeDasharray="1.5 1.5" />
|
|
11
|
-
{/* Pencil nib (not animated) */}
|
|
12
11
|
<g className="vv-icon-draft-pencil">
|
|
13
12
|
<path d="M16.5 16.5l1.5-1.5 1.2 1.2-1.5 1.5z" fill="currentColor" stroke="none" />
|
|
14
13
|
<path d="M16.5 16.5l-0.8 2.3 2.3-0.8z" fill="currentColor" stroke="none" />
|