@vvedantb/ui 0.67.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/src/markdown/mermaid.ts
CHANGED
|
@@ -6,33 +6,19 @@ import {
|
|
|
6
6
|
subscribeDocumentAppearance,
|
|
7
7
|
} from "../hooks/use-document-appearance";
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* Mermaid for markdown, loaded on first use. `@streamdown/mermaid` imports
|
|
11
|
-
* mermaid statically, so a plain plugin import put mermaid in every chunk
|
|
12
|
-
* that renders markdown. Here the plugin is a dynamic import that runs only
|
|
13
|
-
* when a finished mermaid fence mounts.
|
|
14
|
-
*
|
|
15
|
-
* One render serves two readers: `MarkdownMermaid` waits for it to decide
|
|
16
|
-
* diagram or plain code block (a diagram that will not parse stays code), and
|
|
17
|
-
* Streamdown's diagram view gets the same cached SVG through `mermaidPlugin`.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
9
|
type MermaidTheme = Extract<MermaidConfig["theme"], "default" | "dark">;
|
|
21
|
-
/** `id` is the element id mermaid baked into `svg` (its styles and markers use it). */
|
|
22
10
|
type RenderResult = { svg: string; id: string };
|
|
23
11
|
type Entry = {
|
|
24
12
|
promise: Promise<RenderResult>;
|
|
25
13
|
status: "pending" | "done" | "error";
|
|
26
14
|
};
|
|
27
15
|
|
|
28
|
-
/** Enough for every diagram on screen plus scroll-back; oldest dropped. */
|
|
29
16
|
const CACHE_LIMIT = 50;
|
|
30
17
|
|
|
31
18
|
const cache = new Map<string, Entry>();
|
|
32
19
|
const listeners = new Map<string, Set<() => void>>();
|
|
33
20
|
|
|
34
21
|
let pluginPromise: Promise<DiagramPlugin> | null = null;
|
|
35
|
-
/** `initialize` is global to mermaid, so set-theme-then-render runs one at a time. */
|
|
36
22
|
let queue: Promise<unknown> = Promise.resolve();
|
|
37
23
|
let renderCount = 0;
|
|
38
24
|
|
|
@@ -40,7 +26,6 @@ function loadPlugin(): Promise<DiagramPlugin> {
|
|
|
40
26
|
pluginPromise ??= import("@streamdown/mermaid").then(
|
|
41
27
|
(module) => module.mermaid,
|
|
42
28
|
(error) => {
|
|
43
|
-
// A failed chunk load may succeed later; do not cache the failure.
|
|
44
29
|
pluginPromise = null;
|
|
45
30
|
throw error;
|
|
46
31
|
},
|
|
@@ -52,7 +37,6 @@ function renderNow(theme: MermaidTheme, code: string): Promise<RenderResult> {
|
|
|
52
37
|
const job = queue.then(async () => {
|
|
53
38
|
const plugin = await loadPlugin();
|
|
54
39
|
renderCount += 1;
|
|
55
|
-
// The `-svg` suffix keeps one id from being a prefix of another.
|
|
56
40
|
const id = `markdown-mermaid-${renderCount}-svg`;
|
|
57
41
|
const { svg } = await plugin.getMermaid({ theme }).render(id, code);
|
|
58
42
|
return { svg, id };
|
|
@@ -68,7 +52,6 @@ function cacheKey(theme: MermaidTheme, code: string): string {
|
|
|
68
52
|
function store(key: string, entry: Entry): void {
|
|
69
53
|
cache.delete(key);
|
|
70
54
|
cache.set(key, entry);
|
|
71
|
-
// Drop the oldest entries nobody is watching; mounted diagrams stay.
|
|
72
55
|
for (const candidate of cache.keys()) {
|
|
73
56
|
if (cache.size <= CACHE_LIMIT) return;
|
|
74
57
|
if (!listeners.has(candidate)) cache.delete(candidate);
|
|
@@ -84,7 +67,6 @@ function request(theme: MermaidTheme, code: string): Entry {
|
|
|
84
67
|
const entry: Entry = { promise, status: "pending" };
|
|
85
68
|
store(key, entry);
|
|
86
69
|
const settle = (status: Entry["status"]) => {
|
|
87
|
-
// An entry evicted (or replaced) while pending stays gone.
|
|
88
70
|
if (cache.get(key)?.promise !== promise) return;
|
|
89
71
|
store(key, { promise, status });
|
|
90
72
|
for (const notify of listeners.get(key) ?? []) notify();
|
|
@@ -106,7 +88,6 @@ function subscribe(key: string, notify: () => void): () => void {
|
|
|
106
88
|
};
|
|
107
89
|
}
|
|
108
90
|
|
|
109
|
-
/** Mermaid's theme for the page's current appearance (neutral is dark-family). */
|
|
110
91
|
function readTheme(): MermaidTheme {
|
|
111
92
|
return readDocumentAppearance() === "dark" ? "dark" : "default";
|
|
112
93
|
}
|
|
@@ -121,9 +102,6 @@ export const mermaidPlugin: DiagramPlugin = {
|
|
|
121
102
|
language: "mermaid",
|
|
122
103
|
getMermaid: () => ({
|
|
123
104
|
initialize: () => {},
|
|
124
|
-
// The cached SVG is shared, so give each copy the caller's unique id:
|
|
125
|
-
// two copies with one id (inline + fullscreen, or a repeated diagram)
|
|
126
|
-
// would share `#id` styles and `url(#id_marker)` references.
|
|
127
105
|
render: (id, code) =>
|
|
128
106
|
request(readTheme(), code).promise.then((result) => ({
|
|
129
107
|
svg: result.svg.replaceAll(result.id, id),
|
|
@@ -39,7 +39,6 @@ function isBlank(node: HastNode): boolean {
|
|
|
39
39
|
return node.type === "text" && (node.value ?? "").trim() === "";
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/** Tags `blockquote` as an alert and strips its marker, if it has one. */
|
|
43
42
|
function convert(blockquote: HastNode): void {
|
|
44
43
|
const paragraph = blockquote.children?.find((child) => !isBlank(child));
|
|
45
44
|
if (!paragraph || !isElement(paragraph, "p") || !paragraph.children) return;
|
|
@@ -52,8 +51,6 @@ function convert(blockquote: HastNode): void {
|
|
|
52
51
|
const endsLine = match[2] !== "";
|
|
53
52
|
const rest = (first.value ?? "").slice(match[0].length);
|
|
54
53
|
if (!endsLine) {
|
|
55
|
-
// Marker ran to the end of the text node: the line ends only if a hard
|
|
56
|
-
// break (remark-breaks) or nothing follows it.
|
|
57
54
|
if (second !== undefined && !isElement(second, "br")) return;
|
|
58
55
|
paragraph.children.splice(1, second === undefined ? 0 : 1);
|
|
59
56
|
const next = paragraph.children[1];
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Share of the unshown text revealed on each frame. A burst of 400 characters
|
|
5
|
-
* plays out over about half a second; a trickle shows as it arrives.
|
|
6
|
-
*/
|
|
7
3
|
const REVEAL_PER_FRAME = 0.08;
|
|
8
4
|
|
|
9
5
|
/**
|
|
@@ -18,7 +14,6 @@ export function useSmoothText(target: string, live: boolean): string {
|
|
|
18
14
|
|
|
19
15
|
useEffect(() => {
|
|
20
16
|
if (!live) return;
|
|
21
|
-
// A rewrite can shorten the text; never point past its end.
|
|
22
17
|
lengthRef.current = Math.min(lengthRef.current, target.length);
|
|
23
18
|
let frame = 0;
|
|
24
19
|
function tick() {
|
|
@@ -3,11 +3,8 @@ import { floatingSurfaceClass } from "../ui/_menu-classes";
|
|
|
3
3
|
import { cn } from "../utils/cn";
|
|
4
4
|
|
|
5
5
|
export type FloatingBarProps = {
|
|
6
|
-
/** The bar's content, laid out in one row. */
|
|
7
6
|
children: ReactNode;
|
|
8
|
-
/** Classes for the fixed `<header>` wrapper, for example an entrance animation. */
|
|
9
7
|
className?: string;
|
|
10
|
-
/** Classes for the pill itself, for example another `max-w-*`. */
|
|
11
8
|
barClassName?: string;
|
|
12
9
|
};
|
|
13
10
|
|
|
@@ -13,121 +13,77 @@ import { pricingModalClasses, pricingMultiClasses, type PricingModalTone } from
|
|
|
13
13
|
export type PricingModalPeriod = "month" | "year";
|
|
14
14
|
|
|
15
15
|
export type PricingModalLegacyProps = {
|
|
16
|
-
/** Absent in the single-plan layout. Set `plans` for the multi-plan layout. */
|
|
17
16
|
plans?: undefined;
|
|
18
17
|
open: boolean;
|
|
19
|
-
/** Called when the dialog asks to close and by the `closeButton`. */
|
|
20
18
|
onClose: () => void;
|
|
21
|
-
/** Accessible dialog title, for example "Pro". Not visible. */
|
|
22
19
|
title: string;
|
|
23
|
-
/** Accessible description. Not visible. When set, the title is an `sr-only` `DialogTitle` followed by this. */
|
|
24
20
|
description?: string;
|
|
25
|
-
/** Logo before the wordmark: `dark` shows in dark mode, `light` in light mode. 28px. */
|
|
26
21
|
logo: { dark: string; light: string };
|
|
27
|
-
/** Text after the logo, before the PRO badge. */
|
|
28
22
|
wordmark: string;
|
|
29
|
-
/** For example "$9". */
|
|
30
23
|
price: string;
|
|
31
|
-
/** Adds a monthly/yearly toggle. Without it the modal is monthly only and `price` is the only price. */
|
|
32
24
|
yearly?: {
|
|
33
|
-
/** Yearly price per month, for example "$8.33". */
|
|
34
25
|
pricePerMonth: string;
|
|
35
|
-
/** Yearly total shown in the note, for example "$100". */
|
|
36
26
|
total?: string;
|
|
37
|
-
/** Badge on the yearly option. Default "Save 2 months". */
|
|
38
27
|
saveLabel?: string;
|
|
39
28
|
};
|
|
40
|
-
/** Selected period, when the parent controls it. Needs `yearly`. */
|
|
41
29
|
billingPeriod?: PricingModalPeriod;
|
|
42
|
-
/** Called with the period the user picks. */
|
|
43
30
|
onBillingPeriodChange?: (period: PricingModalPeriod) => void;
|
|
44
|
-
/** Initial period when `billingPeriod` is not set. Default `"month"`. */
|
|
45
31
|
defaultBillingPeriod?: PricingModalPeriod;
|
|
46
32
|
tagline: ReactNode;
|
|
47
|
-
/** Extra font class on the tagline, placed after `max-w-[28ch]`. */
|
|
48
33
|
taglineFontClassName?: string;
|
|
49
|
-
/** Plan features under "What you get". */
|
|
50
34
|
features: readonly string[];
|
|
51
|
-
/** Label of the full-width checkout button. Default "Get Pro". */
|
|
52
35
|
ctaLabel?: string;
|
|
53
|
-
/** Wraps the checkout button, for example in the billing provider's checkout and signed-in gates. `period` is the selected period, for `planPeriod`; it is always `"month"` without `yearly`. */
|
|
54
36
|
renderCheckout: (button: ReactElement, period: PricingModalPeriod) => ReactNode;
|
|
55
|
-
/** Second, compact close button in the top-right corner. Default `false`. */
|
|
56
37
|
closeButton?: boolean;
|
|
57
|
-
/** Secondary text colour class. Default `"muted"`. */
|
|
58
38
|
tone?: PricingModalTone;
|
|
59
39
|
};
|
|
60
40
|
|
|
61
41
|
export type PricingPlanBenefit = {
|
|
62
42
|
label: ReactNode;
|
|
63
|
-
/** `"check"` (default) or an app mark. */
|
|
64
43
|
icon?: "check" | AppName;
|
|
65
|
-
/** Dimmed row. */
|
|
66
44
|
muted?: boolean;
|
|
67
45
|
};
|
|
68
46
|
|
|
69
47
|
export type PricingPlan = {
|
|
70
48
|
id: string;
|
|
71
49
|
name: string;
|
|
72
|
-
/** Display strings per month, for example `{ month: "$10", year: "$8" }`. The yearly price is still per month. */
|
|
73
50
|
price: { month: string; year: string };
|
|
74
|
-
/** Default "Get started". */
|
|
75
51
|
ctaLabel?: string;
|
|
76
|
-
/** Line above the highlight, for example "Everything in Free, and:". */
|
|
77
52
|
intro?: ReactNode;
|
|
78
|
-
/** Large title with small text under it. */
|
|
79
53
|
highlight?: { title: string; description: string };
|
|
80
54
|
benefits?: readonly PricingPlanBenefit[];
|
|
81
|
-
/**
|
|
82
|
-
* Grouped per app, shown after `benefits`. The `currentApp` group comes first, the rest keep the array order.
|
|
83
|
-
* The `featured` / `highlighted` plan defaults to `V_PRO_APP_BENEFITS` when this is omitted, so apps usually pass only `currentApp`. Other plans show none unless set.
|
|
84
|
-
*/
|
|
85
55
|
appBenefits?: readonly PricingPlanAppBenefit[];
|
|
86
|
-
/** The plan the user is on: the button reads "Current plan" and is disabled. */
|
|
87
56
|
current?: boolean;
|
|
88
|
-
/** Subtle ring on the card. `highlighted` is an alias. */
|
|
89
57
|
featured?: boolean;
|
|
90
58
|
highlighted?: boolean;
|
|
91
|
-
/** Text after the price. Default "/month". */
|
|
92
59
|
periodSuffix?: string;
|
|
93
60
|
};
|
|
94
61
|
|
|
95
62
|
export type PricingModalMultiProps = {
|
|
96
63
|
open: boolean;
|
|
97
64
|
onClose: () => void;
|
|
98
|
-
/** Accessible dialog title. Not visible. */
|
|
99
65
|
title: string;
|
|
100
|
-
/** Accessible description. Not visible. */
|
|
101
66
|
description?: string;
|
|
102
|
-
/** Cards, left to right. Sized for 1 to 4. */
|
|
103
67
|
plans: readonly PricingPlan[];
|
|
104
|
-
/** App marks at the top left. Family apps only: each links to its `FAMILY_APPS` site. */
|
|
105
68
|
apps?: readonly FamilyAppName[];
|
|
106
|
-
/** App the dialog is shown in. Its `appBenefits` group comes first. */
|
|
107
69
|
currentApp?: ProductAppName;
|
|
108
|
-
/** Centred headline, for example "One plan. Every V app." */
|
|
109
70
|
headline?: ReactNode;
|
|
110
|
-
/** Small print under the cards. */
|
|
111
71
|
finePrint?: ReactNode;
|
|
112
72
|
billingPeriod?: PricingModalPeriod;
|
|
113
73
|
onBillingPeriodChange?: (period: PricingModalPeriod) => void;
|
|
114
|
-
/** Default `"month"`. */
|
|
115
74
|
defaultBillingPeriod?: PricingModalPeriod;
|
|
116
|
-
/** Wraps each plan's button, for example in the billing provider's checkout. Not called for the `current` plan. */
|
|
117
75
|
renderCheckout: (button: ReactElement, plan: PricingPlan, period: PricingModalPeriod) => ReactNode;
|
|
118
76
|
tone?: PricingModalTone;
|
|
119
77
|
};
|
|
120
78
|
|
|
121
79
|
export type PricingModalProps = PricingModalLegacyProps | PricingModalMultiProps;
|
|
122
80
|
|
|
123
|
-
/** Upgrade dialog. With `plans`: wide multi-plan layout. Without: the single-plan layout. */
|
|
124
81
|
function AppIcon({ app, ...props }: AppIconProps & { app: AppName }) {
|
|
125
82
|
const Icon = APP_ICONS[app];
|
|
126
83
|
return <Icon {...props} />;
|
|
127
84
|
}
|
|
128
85
|
|
|
129
86
|
function sortAppBenefits(groups: readonly PricingPlanAppBenefit[], currentApp?: AppName) {
|
|
130
|
-
// Stable sort: the current app moves to the front, the rest keep their order.
|
|
131
87
|
return [...groups].sort((a, b) => Number(b.app === currentApp) - Number(a.app === currentApp));
|
|
132
88
|
}
|
|
133
89
|
|
|
@@ -302,7 +258,6 @@ function PricingModalMulti({
|
|
|
302
258
|
<DialogContent
|
|
303
259
|
ref={contentRef}
|
|
304
260
|
hideCloseButton
|
|
305
|
-
// Focus the dialog, not the first segment button, so no ring shows on open.
|
|
306
261
|
onOpenAutoFocus={(event) => {
|
|
307
262
|
event.preventDefault();
|
|
308
263
|
contentRef.current?.focus();
|
|
@@ -8,28 +8,18 @@ import { PROJECT_V_HOME_URL } from "./projectV";
|
|
|
8
8
|
|
|
9
9
|
export type ProductHeroAction = {
|
|
10
10
|
label: string;
|
|
11
|
-
/** Renders an `a`. Without it the action renders a `button`. */
|
|
12
11
|
href?: string;
|
|
13
|
-
/** Passed to the `a`. Only used with `href`. */
|
|
14
12
|
rel?: string;
|
|
15
|
-
/** Passed to the `a`. Only used with `href`. */
|
|
16
13
|
target?: string;
|
|
17
14
|
onClick?: MouseEventHandler;
|
|
18
|
-
/** Default: `"default"` for the primary action and `"outline"` for the secondary action. */
|
|
19
15
|
variant?: ComponentProps<typeof Button>["variant"];
|
|
20
16
|
};
|
|
21
17
|
|
|
22
18
|
export type ProductHeroProps = {
|
|
23
|
-
/** The only `h1` of the hero. Instrument Sans, weight 600, `leading-tight`, `tracking-tight` (`pageTitleClass`), at a display scale. */
|
|
24
19
|
title: ReactNode;
|
|
25
|
-
/** Short product description under the title. */
|
|
26
20
|
tagline: ReactNode;
|
|
27
21
|
primaryCta: ProductHeroAction;
|
|
28
22
|
secondaryCta?: ProductHeroAction;
|
|
29
|
-
/**
|
|
30
|
-
* Renders exactly one "Sign in" control. Omit it for none. The hero never renders two,
|
|
31
|
-
* so leave the page nav without its own Sign in. Set `href` or `onClick`.
|
|
32
|
-
*/
|
|
33
23
|
signIn?: { href?: string; onClick?: MouseEventHandler };
|
|
34
24
|
/**
|
|
35
25
|
* An animated concept visual in the style of https://projectv.uk: a glowing ring, orbit
|
|
@@ -41,25 +31,12 @@ export type ProductHeroProps = {
|
|
|
41
31
|
* If the visual animates, it must respect `prefers-reduced-motion` itself.
|
|
42
32
|
*/
|
|
43
33
|
visual: ReactNode;
|
|
44
|
-
/** Gives the visual region `role="img"` and this accessible name. Without it the region is decorative (`aria-hidden`). */
|
|
45
34
|
visualLabel?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Live user count for social proof under the actions: "Free to use · 1,284+ people already here",
|
|
48
|
-
* with a pulsing green dot (static under `prefers-reduced-motion: reduce`).
|
|
49
|
-
*
|
|
50
|
-
* The package does no fetching. The app calls a Convex action that wraps the Clerk backend SDK
|
|
51
|
-
* `clerk.users.getCount()` (needs `CLERK_SECRET_KEY`), once on mount or cached server-side.
|
|
52
|
-
* Pass `undefined` while loading and the positive number once it resolves. The row stays hidden
|
|
53
|
-
* for `undefined`, `null` and any value of 0 or less, so a loading `0` never shows "0+ people".
|
|
54
|
-
*/
|
|
55
35
|
userCount?: number | null;
|
|
56
|
-
/** Default `true`. Renders "a product of Project V", always linked to `PROJECT_V_HOME_URL`. The link target cannot be changed; `false` hides the whole line. */
|
|
57
36
|
showProductOf?: boolean;
|
|
58
37
|
className?: string;
|
|
59
38
|
};
|
|
60
39
|
|
|
61
|
-
// Same family, weight, leading and tracking as `PageTitle`; only the size changes with the viewport.
|
|
62
|
-
// Joined as plain strings: `cn` would drop `leading-tight` because a `text-*` size class conflicts with it.
|
|
63
40
|
const titleClass = `text-balance text-4xl sm:text-5xl lg:text-6xl ${pageTitleClass.replace(/\btext-xl\s*/, "")}`;
|
|
64
41
|
|
|
65
42
|
function UserCountProof({ count }: { count: number }) {
|
|
@@ -2,12 +2,7 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
import { cn } from "../utils/cn";
|
|
3
3
|
|
|
4
4
|
export type ProductHeroOrbitProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Any CSS colour. It tints the rings and the dots, so each product gets its own
|
|
7
|
-
* hue from one drawing. Default: the foreground colour.
|
|
8
|
-
*/
|
|
9
5
|
accent?: string;
|
|
10
|
-
/** Optional mark in the core, for example the product logo. It is centred and keeps the foreground colour. */
|
|
11
6
|
children?: ReactNode;
|
|
12
7
|
className?: string;
|
|
13
8
|
};
|
|
@@ -9,19 +9,14 @@ import { siteFooterClasses, type SiteFooterVariant } from "./marketing-classes";
|
|
|
9
9
|
export type SiteFooterLink = {
|
|
10
10
|
href: string;
|
|
11
11
|
label: string;
|
|
12
|
-
/** Opens in a new tab (`target="_blank" rel="noopener noreferrer"`). */
|
|
13
12
|
external?: boolean;
|
|
14
|
-
/** 20px round image before the label. */
|
|
15
13
|
image?: { src: string; alt: string };
|
|
16
|
-
/** 14px app glyph before the label, in `currentColor` and `aria-hidden`. Wins over `image`. */
|
|
17
14
|
app?: AppName;
|
|
18
15
|
};
|
|
19
16
|
|
|
20
17
|
export type SiteFooterSocial = {
|
|
21
18
|
href: string;
|
|
22
|
-
/** Rendered with the variant's `w-4 h-4` muted class, for example a Tabler brand icon. */
|
|
23
19
|
icon: ComponentType<{ className?: string }>;
|
|
24
|
-
/** `aria-label` on the link. */
|
|
25
20
|
label?: string;
|
|
26
21
|
};
|
|
27
22
|
|
|
@@ -45,17 +40,9 @@ export type SiteFooterColumn = { heading: string; links: readonly SiteFooterLink
|
|
|
45
40
|
|
|
46
41
|
type SiteFooterCommonProps = {
|
|
47
42
|
tagline: ReactNode;
|
|
48
|
-
/** Link columns to the right of the brand block. */
|
|
49
43
|
columns: readonly SiteFooterColumn[];
|
|
50
|
-
/** Default: the current year. */
|
|
51
44
|
year?: number;
|
|
52
|
-
/**
|
|
53
|
-
* `"muted"` (default) and `"muted-foreground"` pick the secondary text
|
|
54
|
-
* colour class. `"touch"` uses `text-muted-foreground`, `max-sm:hit-target`
|
|
55
|
-
* links and a safe-area bottom padding.
|
|
56
|
-
*/
|
|
57
45
|
variant?: SiteFooterVariant;
|
|
58
|
-
/** Under the socials, for example a Sign-in button. Not rendered on the legacy path. */
|
|
59
46
|
actions?: ReactNode;
|
|
60
47
|
};
|
|
61
48
|
|
|
@@ -63,32 +50,22 @@ type SiteFooterCommonProps = {
|
|
|
63
50
|
export type SiteFooterAppProps = SiteFooterCommonProps & {
|
|
64
51
|
/** Product app id. Sets the wordmark (size 18), the copyright name and the product-of line. */
|
|
65
52
|
app: ProductAppName;
|
|
66
|
-
/** Replaces the `AppWordmark`. */
|
|
67
53
|
brand?: ReactNode;
|
|
68
|
-
/** Default `PROJECT_V_SOCIALS`. `[]` hides them. */
|
|
69
54
|
socials?: readonly SiteFooterSocial[];
|
|
70
|
-
/** Default `PROJECT_V_LEGAL_LINKS`. */
|
|
71
55
|
legalLinks?: readonly { href: string; label: string }[];
|
|
72
56
|
/** Overrides the copyright name (default: `app`). */
|
|
73
57
|
name?: string;
|
|
74
|
-
/** Appends the standard Apps column unless `columns` has an "Apps" heading (default `true`). */
|
|
75
58
|
includeAppsColumn?: boolean;
|
|
76
|
-
/** Shows "{app} is a product of Project V." (default `true`). */
|
|
77
59
|
showProductOf?: boolean;
|
|
78
60
|
};
|
|
79
61
|
|
|
80
62
|
/** Legacy footer: you pass every part. Prefer `SiteFooterAppProps`. */
|
|
81
63
|
export type SiteFooterLegacyProps = SiteFooterCommonProps & {
|
|
82
64
|
app?: undefined;
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated Set `app` instead: the footer renders `AppWordmark`. Without `app` the brand sits in the Michroma wrapper.
|
|
85
|
-
*/
|
|
86
65
|
brand: ReactNode;
|
|
87
|
-
/** @deprecated Set `app` for the Project V defaults (`PROJECT_V_SOCIALS`). Icon buttons under the tagline; always open in a new tab. */
|
|
88
66
|
socials: readonly SiteFooterSocial[];
|
|
89
67
|
/** @deprecated Set `app`: the copyright name is then the app id. Name in "Copyright © {year} {name}". */
|
|
90
68
|
name: string;
|
|
91
|
-
/** @deprecated Set `app` for `PROJECT_V_LEGAL_LINKS`. Bottom-right links; always open in a new tab. */
|
|
92
69
|
legalLinks: readonly { href: string; label: string }[];
|
|
93
70
|
includeAppsColumn?: undefined;
|
|
94
71
|
showProductOf?: undefined;
|
|
@@ -23,37 +23,23 @@ export type SiteHeaderLink = { label: string; href: string };
|
|
|
23
23
|
|
|
24
24
|
type SiteHeaderIdentity =
|
|
25
25
|
| {
|
|
26
|
-
/** Product app id for `AppWordmark`. */
|
|
27
26
|
app: ProductAppName;
|
|
28
27
|
brand?: undefined;
|
|
29
28
|
githubLabel?: undefined;
|
|
30
29
|
}
|
|
31
30
|
| {
|
|
32
31
|
app?: undefined;
|
|
33
|
-
/** The site's own wordmark, for a site that is not a product app. It replaces `AppWordmark`. */
|
|
34
32
|
brand: ReactNode;
|
|
35
|
-
/** `aria-label` of the GitHub button, for example "Bee on GitHub". Default "GitHub". */
|
|
36
33
|
githubLabel?: string;
|
|
37
34
|
};
|
|
38
35
|
|
|
39
36
|
export type SiteHeaderProps = SiteHeaderIdentity & {
|
|
40
|
-
/** Home link `href`. Default `#home`. */
|
|
41
37
|
homeHref?: string;
|
|
42
|
-
/** `aria-label` of the home wordmark link. */
|
|
43
38
|
homeLabel: string;
|
|
44
|
-
/** Up to 4 section links, shown from `md`. More than 4 logs a development warning. */
|
|
45
39
|
links: readonly SiteHeaderLink[];
|
|
46
|
-
/**
|
|
47
|
-
* Exactly one call to action, for example the app's Clerk "Sign in" or "Open <App>" button, or "Get the app".
|
|
48
|
-
* Pass a `Button` with the default variant, `size="sm"` and `className="rounded-full"`. It shows in the bar from `md`
|
|
49
|
-
* and below `md` it sits full width in the menu.
|
|
50
|
-
*/
|
|
51
40
|
cta: ReactNode;
|
|
52
|
-
/** Optional GitHub URL. An icon button from `sm`, and the last item in the mobile menu. */
|
|
53
41
|
githubUrl?: string;
|
|
54
|
-
/** Optional small control before the CTA, shown at every width, for example a theme toggle. */
|
|
55
42
|
actions?: ReactNode;
|
|
56
|
-
/** Classes for the fixed `<header>` wrapper. */
|
|
57
43
|
className?: string;
|
|
58
44
|
};
|
|
59
45
|
|
|
@@ -9,15 +9,10 @@ import {
|
|
|
9
9
|
} from "./PricingModal";
|
|
10
10
|
|
|
11
11
|
export type VProPricingModalProps = Omit<PricingModalMultiProps, "renderCheckout"> & {
|
|
12
|
-
/** Clerk Billing plan id passed to `CheckoutButton`. */
|
|
13
12
|
planId: string;
|
|
14
|
-
/** Id of the plan card that gets checkout. Default `"pro"`. */
|
|
15
13
|
proPlanId?: string;
|
|
16
|
-
/** Set `false` to return the bare button, for example when Clerk is not configured. Default `true`. */
|
|
17
14
|
checkoutEnabled?: boolean;
|
|
18
|
-
/** Wrap checkout in Clerk `<Show when="signed-in">`. Default `true`. */
|
|
19
15
|
signedInOnly?: boolean;
|
|
20
|
-
/** Replaces the default `CheckoutButton` wiring, for apps with their own auth flow. */
|
|
21
16
|
renderCheckout?: (button: ReactElement, plan: PricingPlan, period: PricingModalPeriod) => ReactNode;
|
|
22
17
|
};
|
|
23
18
|
|
|
@@ -10,38 +10,29 @@ import { landingClasses, landingShellClass } from "./marketing-classes";
|
|
|
10
10
|
export type LandingMotion = Pick<typeof motionNamespace, "div" | "header">;
|
|
11
11
|
|
|
12
12
|
export type LandingKitOptions = {
|
|
13
|
-
/** Pass `motion` from `motion/react`. The package does not import Motion itself. */
|
|
14
13
|
motion: LandingMotion;
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
export type LandingRevealProps = {
|
|
18
17
|
children: ReactNode;
|
|
19
18
|
className?: string;
|
|
20
|
-
/** Seconds before the first child starts. Default `0`. */
|
|
21
19
|
delay?: number;
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
export type LandingRevealItemProps = { children: ReactNode; className?: string };
|
|
25
23
|
|
|
26
24
|
export type LandingNavProps = {
|
|
27
|
-
/** Wordmark inside the `#top` home link. */
|
|
28
25
|
brand: ReactNode;
|
|
29
|
-
/** `aria-label` of the home link. */
|
|
30
26
|
homeLabel: string;
|
|
31
|
-
/** Section links, shown from `md`. */
|
|
32
27
|
links: readonly LandingLink[];
|
|
33
|
-
/** Icon button from `sm`. `label` is its `aria-label`. */
|
|
34
28
|
github: { href: string; label: string; icon: ReactNode };
|
|
35
|
-
/** After the GitHub button, for example Sign in and Get started. */
|
|
36
29
|
actions?: ReactNode;
|
|
37
|
-
/** Last in the bar, usually `LandingNavMenu`. */
|
|
38
30
|
menu?: ReactNode;
|
|
39
31
|
};
|
|
40
32
|
|
|
41
33
|
export type LandingCtaProps = {
|
|
42
34
|
title: ReactNode;
|
|
43
35
|
description: ReactNode;
|
|
44
|
-
/** Under the text, for example a large Get started button. */
|
|
45
36
|
action?: ReactNode;
|
|
46
37
|
};
|
|
47
38
|
|
|
@@ -57,7 +48,6 @@ export type LandingKit = {
|
|
|
57
48
|
* module scope: `export const { LandingReveal, ... } = createLandingKit({ motion })`.
|
|
58
49
|
*/
|
|
59
50
|
export function createLandingKit({ motion }: LandingKitOptions): LandingKit {
|
|
60
|
-
/** Staggers its `LandingRevealItem` children in once, when 20% is in view. */
|
|
61
51
|
function LandingReveal({ children, className, delay = 0 }: LandingRevealProps) {
|
|
62
52
|
return (
|
|
63
53
|
<motion.div
|
|
@@ -85,7 +75,6 @@ export function createLandingKit({ motion }: LandingKitOptions): LandingKit {
|
|
|
85
75
|
);
|
|
86
76
|
}
|
|
87
77
|
|
|
88
|
-
/** @deprecated Use `SiteHeader`. Sticky blurred header that rises in on mount. */
|
|
89
78
|
function LandingNav({ brand, homeLabel, links, github, actions, menu }: LandingNavProps) {
|
|
90
79
|
return (
|
|
91
80
|
<motion.header
|
|
@@ -125,7 +114,6 @@ export function createLandingKit({ motion }: LandingKitOptions): LandingKit {
|
|
|
125
114
|
);
|
|
126
115
|
}
|
|
127
116
|
|
|
128
|
-
/** Closing call to action on the atmosphere background. */
|
|
129
117
|
function LandingCta({ title, description, action }: LandingCtaProps) {
|
|
130
118
|
return (
|
|
131
119
|
<div className="landing-atmosphere landing-grain relative overflow-hidden border-t border-separator">
|
|
@@ -77,7 +77,6 @@ export function LandingLattice({ children, className }: LandingLatticeProps) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export type LandingFeature = {
|
|
80
|
-
/** Rendered with `size={18} stroke={1.5}`, for example a Tabler icon. */
|
|
81
80
|
icon: ComponentType<{ size?: number; stroke?: number }>;
|
|
82
81
|
title: string;
|
|
83
82
|
description: string;
|
|
@@ -104,7 +103,6 @@ export function LandingFeatureCard({ icon: Icon, title, description }: LandingFe
|
|
|
104
103
|
|
|
105
104
|
export type LandingNavMenuProps = {
|
|
106
105
|
links: readonly LandingLink[];
|
|
107
|
-
/** Last item, after a separator: opens in a new tab and reads "GitHub". */
|
|
108
106
|
github: { href: string; icon: ReactNode };
|
|
109
107
|
};
|
|
110
108
|
|
|
@@ -143,29 +141,22 @@ export function LandingNavMenu({ links, github }: LandingNavMenuProps) {
|
|
|
143
141
|
|
|
144
142
|
type LandingFooterCommonProps = {
|
|
145
143
|
tagline: ReactNode;
|
|
146
|
-
/** Section links. On the `app` path they become a "Navigation" column unless `columns` is set. */
|
|
147
144
|
links: readonly LandingLink[];
|
|
148
|
-
/** App actions, for example Sign in. Style with `landingFooterLinkClass` or `landingFooterButtonClass`. */
|
|
149
145
|
actions?: ReactNode;
|
|
150
146
|
};
|
|
151
147
|
|
|
152
148
|
/** Project V footer: a thin wrapper over `SiteFooter` with every default (wordmark, socials, legal links, Apps column, product-of line). */
|
|
153
149
|
export type LandingFooterAppProps = LandingFooterCommonProps &
|
|
154
150
|
Pick<SiteFooterAppProps, "app" | "year" | "variant" | "socials" | "legalLinks" | "includeAppsColumn" | "showProductOf"> & {
|
|
155
|
-
/** Replaces the Navigation column built from `links`. */
|
|
156
151
|
columns?: SiteFooterAppProps["columns"];
|
|
157
|
-
/** @deprecated Ignored on the `app` path: the footer renders `AppWordmark`. */
|
|
158
152
|
brand?: ReactNode;
|
|
159
|
-
/** @deprecated Ignored on the `app` path: `PROJECT_V_SOCIALS` includes GitHub. */
|
|
160
153
|
github?: LandingFooterLegacyProps["github"];
|
|
161
154
|
};
|
|
162
155
|
|
|
163
156
|
/** Old compact footer. Deprecated: set `app` instead. */
|
|
164
157
|
export type LandingFooterLegacyProps = LandingFooterCommonProps & {
|
|
165
158
|
app?: undefined;
|
|
166
|
-
/** @deprecated Set `app`. Wordmark above the tagline. */
|
|
167
159
|
brand: ReactNode;
|
|
168
|
-
/** @deprecated Set `app`: `PROJECT_V_SOCIALS` includes GitHub. `label` is the link's `aria-label`. */
|
|
169
160
|
github: { href: string; label: string; icon: ReactNode };
|
|
170
161
|
};
|
|
171
162
|
|
|
@@ -213,12 +204,9 @@ export function LandingFooter(props: LandingFooterProps) {
|
|
|
213
204
|
}
|
|
214
205
|
|
|
215
206
|
export type LandingPageLayoutProps = {
|
|
216
|
-
/** Sticky header, usually `LandingNav`. */
|
|
217
207
|
nav: ReactNode;
|
|
218
|
-
/** Inside the hero's atmosphere block, before `hero` (for example an ambient graphic). */
|
|
219
208
|
heroBackdrop?: ReactNode;
|
|
220
209
|
hero: ReactNode;
|
|
221
|
-
/** Sections after the hero, inside `<main>`. */
|
|
222
210
|
children?: ReactNode;
|
|
223
211
|
footer: ReactNode;
|
|
224
212
|
};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
// Class strings for the landing kit, `SiteFooter` and `PricingModal`, copied
|
|
2
|
-
// from the apps' markup. Some read the bare muted text colour the apps already
|
|
3
|
-
// ship (apps map `--color-muted` to the secondary text colour), so each such
|
|
4
|
-
// line carries the token check's allow marker. Every string is a literal so
|
|
5
|
-
// Tailwind's source scan sees it.
|
|
6
|
-
|
|
7
1
|
/** Centred landing column: `max-w-6xl` with responsive side padding. */
|
|
8
2
|
export const landingShellClass = "relative mx-auto w-full max-w-6xl px-5 sm:px-8 lg:px-10";
|
|
9
3
|
|
|
@@ -92,7 +86,6 @@ export type SiteFooterVariant = keyof typeof siteFooterClasses;
|
|
|
92
86
|
export const pricingModalClasses = {
|
|
93
87
|
muted: {
|
|
94
88
|
period: "pb-1 text-sm text-muted", // check-tokens-allow: text-muted
|
|
95
|
-
/** After `mt-4 max-w-[28ch]` and the optional font class. */
|
|
96
89
|
tagline: "text-lg italic leading-snug text-muted", // check-tokens-allow: text-muted
|
|
97
90
|
note: "mt-3 text-center text-xs text-muted", // check-tokens-allow: text-muted
|
|
98
91
|
featuresHeading:
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dock motion for a panel that docks into a rail tile: it grows out of the
|
|
3
|
-
* tile when shown, shrinks back into it when hidden, and its content slides
|
|
4
|
-
* in when the tile it belongs to changes. The Web Animations API drives it: the motions
|
|
5
|
-
* are one-shot and imperative, and a hide has to finish before the caller
|
|
6
|
-
* removes the panel.
|
|
7
|
-
*
|
|
8
|
-
* Off switch: `MotionProvider reducedMotion` (`prefersReducedMotion()`) and
|
|
9
|
-
* `PageMotionProvider disabled` (`html[data-page-motion="off"]`). With either
|
|
10
|
-
* on, nothing here animates: a show is instant and a hide runs at once.
|
|
11
|
-
*/
|
|
12
1
|
import { prefersReducedMotion } from "./reduced-motion";
|
|
13
2
|
|
|
14
3
|
/** Which edge of the panel touches the rail. */
|
|
15
4
|
export type DockEdge = "left" | "right";
|
|
16
5
|
|
|
17
|
-
/** How small the panel gets: close to the tile's size, not a dot. */
|
|
18
6
|
const DOCKED_SCALE = 0.12;
|
|
19
7
|
const POP_IN_MS = 380;
|
|
20
8
|
const POP_OUT_MS = 260;
|
|
21
9
|
const SWITCH_MS = 240;
|
|
22
|
-
/* The tab-switch slide: the rail page switch and tab content use 24-32px. */
|
|
23
10
|
const SWITCH_SLIDE_PX = 24;
|
|
24
|
-
/* Out-quint: fast start, long settle. The panel lands rather than stops. */
|
|
25
11
|
const SETTLE_EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
26
|
-
/* In-cubic: accelerates into the tile, as a minimise does. */
|
|
27
12
|
const DOCK_EASE = "cubic-bezier(0.5, 0, 0.75, 0)";
|
|
28
13
|
const POP_OUT_ID = "dock-pop-out";
|
|
29
|
-
/* How long the docked frame holds after a hide: past the sidebar's 280 ms
|
|
30
|
-
width slide, so the panel never shows at full size while it leaves. */
|
|
31
14
|
const HOLD_MS = 400;
|
|
32
15
|
|
|
33
16
|
/**
|
|
@@ -50,15 +33,9 @@ export function dockMotionOff(): boolean {
|
|
|
50
33
|
return document.documentElement.dataset.pageMotion === "off" || prefersReducedMotion();
|
|
51
34
|
}
|
|
52
35
|
|
|
53
|
-
/**
|
|
54
|
-
* Points the panel's transform origin at the tile's centre, on the rail
|
|
55
|
-
* edge. False when either is not on screen, so the caller skips the motion.
|
|
56
|
-
* Measure before animating: a scaled panel reports a scaled rect.
|
|
57
|
-
*/
|
|
58
36
|
function aimAt(panel: HTMLElement, tile: HTMLElement | null, edge: DockEdge) {
|
|
59
37
|
if (!tile || dockMotionOff() || typeof panel.animate !== "function") return false;
|
|
60
38
|
const p = panel.getBoundingClientRect();
|
|
61
|
-
// Height, not width: a sidebar aside slides its width open from 0.
|
|
62
39
|
if (p.height === 0) return false;
|
|
63
40
|
const t = tile.getBoundingClientRect();
|
|
64
41
|
const x = edge === "left" ? "0%" : "100%";
|
|
@@ -66,7 +43,6 @@ function aimAt(panel: HTMLElement, tile: HTMLElement | null, edge: DockEdge) {
|
|
|
66
43
|
return true;
|
|
67
44
|
}
|
|
68
45
|
|
|
69
|
-
/** Drops a finished pop-out's held frame (see `dockPopOut`). */
|
|
70
46
|
function releaseDocked(el: HTMLElement | null | undefined) {
|
|
71
47
|
if (!el || typeof el.getAnimations !== "function") return;
|
|
72
48
|
for (const a of el.getAnimations()) if (a.id === POP_OUT_ID) a.cancel();
|
|
@@ -77,7 +53,6 @@ function releaseDocked(el: HTMLElement | null | undefined) {
|
|
|
77
53
|
* once the panel has nearly landed.
|
|
78
54
|
*/
|
|
79
55
|
export function dockPopIn(panel: HTMLElement, tile: HTMLElement | null, edge: DockEdge, after?: HTMLElement | null) {
|
|
80
|
-
// Always, even when the motion is skipped, or the panel stays invisible.
|
|
81
56
|
releaseDocked(panel);
|
|
82
57
|
releaseDocked(after);
|
|
83
58
|
if (!aimAt(panel, tile, edge)) return;
|