@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
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { useSyncExternalStore } from "react";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Whether Alt (Option on macOS) is held right now.
|
|
5
|
-
*
|
|
6
|
-
* Subscribes to the window so every confirmable control can restyle when the
|
|
7
|
-
* modifier goes down, and so Alt+click still works when the activating event
|
|
8
|
-
* is a Radix `onSelect` that does not carry `altKey`.
|
|
9
|
-
*
|
|
10
|
-
* Cleared on blur / visibility hide so a missed keyup after alt-tab cannot
|
|
11
|
-
* leave the app stuck in skip-confirm mode.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
3
|
/** The only two fields the store reads off a keyboard event. */
|
|
15
4
|
|
|
16
5
|
/** What the binding feeds the store. `clear` is any event that can swallow a keyup. */
|
|
@@ -38,8 +27,6 @@ export function createAltHeldStore(bind) {
|
|
|
38
27
|
if (event.key === "Alt" || event.altKey) setHeld(true);
|
|
39
28
|
},
|
|
40
29
|
keyUp: event => {
|
|
41
|
-
// A keyup for some other key still reports altKey while Alt is down, so
|
|
42
|
-
// only a released Alt — or a keyup without the modifier — clears.
|
|
43
30
|
if (event.key === "Alt" || !event.altKey) setHeld(false);
|
|
44
31
|
},
|
|
45
32
|
clear: () => setHeld(false)
|
|
@@ -53,8 +40,6 @@ export function createAltHeldStore(bind) {
|
|
|
53
40
|
if (listeners.size > 0) return;
|
|
54
41
|
unbind?.();
|
|
55
42
|
unbind = null;
|
|
56
|
-
// Nothing is listening for the keyup any more; start the next mount
|
|
57
|
-
// from a known-unheld state rather than a stale `true`.
|
|
58
43
|
altHeld = false;
|
|
59
44
|
};
|
|
60
45
|
},
|
|
@@ -69,8 +54,6 @@ function isInOpenMenu(target) {
|
|
|
69
54
|
export const bindToWindow = signals => {
|
|
70
55
|
if (typeof window === "undefined") return () => {};
|
|
71
56
|
const onKeyDown = event => {
|
|
72
|
-
// A bare Alt press can steal focus to the browser menu bar and dismiss an
|
|
73
|
-
// open Radix menu. Cancel it only when it lands inside one.
|
|
74
57
|
if (event.key === "Alt" && isInOpenMenu(event.target)) {
|
|
75
58
|
event.preventDefault();
|
|
76
59
|
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Type-only: the app passes its own `z`, so zod stays an optional peer and the
|
|
2
|
-
// thrown ZodError comes from the app's zod version (3.25+ or 4), as today.
|
|
3
|
-
|
|
4
1
|
export const VITE_ENV_NAMES = ["development", "staging", "production"];
|
|
5
2
|
|
|
6
3
|
/** `import.meta.env`, or any record of raw env values. */
|
|
@@ -44,8 +44,6 @@ export function userFacingErrorMessage(error, fallback) {
|
|
|
44
44
|
const frame = text.indexOf(" at ");
|
|
45
45
|
if (frame !== -1) text = text.slice(0, frame);
|
|
46
46
|
text = text.trim();
|
|
47
|
-
|
|
48
|
-
// Nothing survived the strip, or the whole thing was the client's envelope.
|
|
49
47
|
if (text.length === 0 || text.startsWith("[CONVEX")) return fallback;
|
|
50
48
|
return text;
|
|
51
49
|
}
|
|
@@ -31,13 +31,9 @@ export function applyThemeClass(theme) {
|
|
|
31
31
|
document.documentElement.classList.remove("light", "dark");
|
|
32
32
|
document.documentElement.classList.add(theme);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
/** The classes in a `value` entry. */
|
|
36
34
|
function classesOf(written) {
|
|
37
35
|
return written.split(" ").filter(name => name !== "");
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
/** `light` or `dark` for a theme whose `value` has more than one class, from those classes. */
|
|
41
37
|
function schemeOf(written) {
|
|
42
38
|
if (!written || !written.includes(" ")) return undefined;
|
|
43
39
|
return classesOf(written).find(name => COLOR_SCHEMES.includes(name));
|
|
@@ -50,9 +46,7 @@ function readTheme(storageKey, fallback) {
|
|
|
50
46
|
let stored;
|
|
51
47
|
try {
|
|
52
48
|
stored = localStorage.getItem(storageKey) || undefined;
|
|
53
|
-
} catch {
|
|
54
|
-
// Storage can be unavailable (privacy modes); fall back.
|
|
55
|
-
}
|
|
49
|
+
} catch {}
|
|
56
50
|
return stored || fallback;
|
|
57
51
|
}
|
|
58
52
|
function disableTransitions(nonce) {
|
|
@@ -61,7 +55,6 @@ function disableTransitions(nonce) {
|
|
|
61
55
|
style.appendChild(document.createTextNode(DISABLE_TRANSITIONS_CSS));
|
|
62
56
|
document.head.appendChild(style);
|
|
63
57
|
return () => {
|
|
64
|
-
// Force a style recalculation before the transitions come back.
|
|
65
58
|
window.getComputedStyle(document.body);
|
|
66
59
|
setTimeout(() => {
|
|
67
60
|
document.head.removeChild(style);
|
|
@@ -85,7 +78,6 @@ function applyTheme(theme, options) {
|
|
|
85
78
|
}
|
|
86
79
|
if (options.enableColorScheme) {
|
|
87
80
|
const fallback = COLOR_SCHEMES.includes(options.defaultTheme) ? options.defaultTheme : null;
|
|
88
|
-
// `null` clears the property in browsers; assigned as-is, as next-themes does.
|
|
89
81
|
const scheme = COLOR_SCHEMES.includes(resolved) ? resolved : schemeOf(written) ?? fallback;
|
|
90
82
|
Reflect.set(root.style, "colorScheme", scheme);
|
|
91
83
|
}
|
|
@@ -109,8 +101,6 @@ export function createThemeProvider(options = {}) {
|
|
|
109
101
|
missingProviderMessage
|
|
110
102
|
} = options;
|
|
111
103
|
const Context = /*#__PURE__*/createContext(undefined);
|
|
112
|
-
|
|
113
|
-
/** next-themes hands out a new `setTheme` exactly when `theme` changes; apps list it in effect deps. */
|
|
114
104
|
function useSetTheme(theme, storageKey, setThemeState) {
|
|
115
105
|
const $ = _c(12);
|
|
116
106
|
let t0;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
const MS_PER_MINUTE = 60_000;
|
|
2
2
|
const MS_PER_DAY = 86_400_000;
|
|
3
|
-
|
|
4
|
-
/** Rounds toward zero; `-0` becomes `0`. */
|
|
5
3
|
function truncate(n) {
|
|
6
4
|
return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
/** Local UTC offset in minutes, rounded to 15 minutes. */
|
|
10
6
|
function utcOffset(ms) {
|
|
11
7
|
return -Math.round(new Date(ms).getTimezoneOffset() / 15) * 15;
|
|
12
8
|
}
|
|
13
|
-
|
|
14
|
-
/** Adds calendar months in local time and clamps the day to the target month. */
|
|
15
9
|
function addMonths(ms, months) {
|
|
16
10
|
const date = new Date(ms);
|
|
17
11
|
const day = date.getDate();
|
|
@@ -21,8 +15,6 @@ function addMonths(ms, months) {
|
|
|
21
15
|
date.setDate(Math.min(day, daysInMonth));
|
|
22
16
|
return date.getTime();
|
|
23
17
|
}
|
|
24
|
-
|
|
25
|
-
/** Fractional calendar months from `a` to `b`, negated (the moment.js formula). */
|
|
26
18
|
function monthDiff(a, b) {
|
|
27
19
|
if (new Date(a).getDate() < new Date(b).getDate()) return -monthDiff(b, a);
|
|
28
20
|
const from = new Date(a);
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
// Stale-deploy / chunk-load recovery. After a new deploy, cached `index.html`
|
|
2
|
-
// (or a lazy route that preloaded against the old build) can point at asset
|
|
3
|
-
// hashes that no longer exist. The browser then throws a chunk-load error and
|
|
4
|
-
// the app wedges. This reloads the page once — with a cooldown so a build that
|
|
5
|
-
// is still broken cannot reload in a loop — pulling fresh HTML with the new
|
|
6
|
-
// asset references.
|
|
7
|
-
//
|
|
8
|
-
// This module holds only framework-agnostic logic. App-specific work, such as
|
|
9
|
-
// closing a Convex socket before the reload, is injected through `onBeforeReload`
|
|
10
|
-
// so nothing here imports Convex, a router or React.
|
|
11
|
-
|
|
12
|
-
/** Default cooldown: a second reload inside this window is refused. */
|
|
13
1
|
const DEFAULT_COOLDOWN_MS = 10_000;
|
|
14
|
-
/** `sessionStorage` key holding the timestamp of the last reload attempt. */
|
|
15
2
|
const DEFAULT_STORAGE_KEY = "deployment-reload-ts";
|
|
16
|
-
/** Query param used to bypass cached HTML on recovery. Stripped on boot. */
|
|
17
3
|
const DEFAULT_RELOAD_PARAM = "_vb_reload";
|
|
18
|
-
/** Vite serves hashed modules from here; a failed load under it means a new build. */
|
|
19
4
|
const DEFAULT_ASSETS_PATH = "/assets/";
|
|
20
5
|
export const STALE_DEPLOY_RELOAD_KEY = DEFAULT_STORAGE_KEY;
|
|
21
6
|
export const STALE_DEPLOY_RELOAD_PARAM = DEFAULT_RELOAD_PARAM;
|
|
@@ -24,9 +9,7 @@ export const STALE_DEPLOY_RELOAD_PARAM = DEFAULT_RELOAD_PARAM;
|
|
|
24
9
|
export function isChunkLoadError(error) {
|
|
25
10
|
if (!(error instanceof Error)) return false;
|
|
26
11
|
const msg = error.message;
|
|
27
|
-
return error.name === "ChunkLoadError" ||
|
|
28
|
-
// Covers Vite's "Failed to fetch dynamically imported module".
|
|
29
|
-
msg.includes("dynamically imported module") || msg.includes("Importing a module script failed") || msg.includes("Failed to load module script") || msg.includes("disallowed MIME type") || msg.includes("Loading chunk") || msg.includes("Loading CSS chunk");
|
|
12
|
+
return error.name === "ChunkLoadError" || msg.includes("dynamically imported module") || msg.includes("Importing a module script failed") || msg.includes("Failed to load module script") || msg.includes("disallowed MIME type") || msg.includes("Loading chunk") || msg.includes("Loading CSS chunk");
|
|
30
13
|
}
|
|
31
14
|
/**
|
|
32
15
|
* Returns true at most once per cooldown window, so a still-broken deploy cannot
|
|
@@ -45,7 +28,6 @@ export function claimStaleDeployReload(config = {}) {
|
|
|
45
28
|
sessionStorage.setItem(storageKey, String(Date.now()));
|
|
46
29
|
return true;
|
|
47
30
|
} catch {
|
|
48
|
-
// sessionStorage unavailable (e.g. private browsing); allow the reload.
|
|
49
31
|
return true;
|
|
50
32
|
}
|
|
51
33
|
}
|
|
@@ -60,9 +42,7 @@ export function stripStaleDeployReloadParam(config = {}) {
|
|
|
60
42
|
if (!url.searchParams.has(reloadParam)) return;
|
|
61
43
|
url.searchParams.delete(reloadParam);
|
|
62
44
|
history.replaceState(history.state, "", `${url.pathname}${url.search}${url.hash}`);
|
|
63
|
-
} catch {
|
|
64
|
-
// No location/history (non-browser); nothing to strip.
|
|
65
|
-
}
|
|
45
|
+
} catch {}
|
|
66
46
|
}
|
|
67
47
|
|
|
68
48
|
/**
|
|
@@ -78,13 +58,6 @@ export function reloadForStaleDeploy(config = {}) {
|
|
|
78
58
|
url.searchParams.set(reloadParam, String(Date.now()));
|
|
79
59
|
location.replace(url.href);
|
|
80
60
|
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* True when a resource-load `error` targets a hashed module/modulepreload under
|
|
84
|
-
* the assets path. These errors (wrong MIME / 404 on `<script type="module">`)
|
|
85
|
-
* carry no `Error` object and do not bubble, so the listener below runs in the
|
|
86
|
-
* capture phase and inspects the event target instead.
|
|
87
|
-
*/
|
|
88
61
|
function isFailedHashedModule(target, assetsPath) {
|
|
89
62
|
if (!(target instanceof HTMLScriptElement) && !(target instanceof HTMLLinkElement)) {
|
|
90
63
|
return false;
|
|
@@ -118,11 +91,6 @@ export function installStaleDeployReload(options = {}) {
|
|
|
118
91
|
const doReload = reload ?? (() => reloadForStaleDeploy({
|
|
119
92
|
reloadParam
|
|
120
93
|
}));
|
|
121
|
-
|
|
122
|
-
// Claim before preventDefault. Vite's preload helper resolves the failed
|
|
123
|
-
// `import()` to `undefined` when `vite:preloadError` is canceled; a lazy
|
|
124
|
-
// component then crashes reading `.default`. Preventing only after the claim
|
|
125
|
-
// wins keeps a refused claim from swallowing the rejection.
|
|
126
94
|
const handle = event => {
|
|
127
95
|
if (!claimStaleDeployReload({
|
|
128
96
|
cooldownMs,
|
|
@@ -131,9 +99,7 @@ export function installStaleDeployReload(options = {}) {
|
|
|
131
99
|
event.preventDefault();
|
|
132
100
|
try {
|
|
133
101
|
onBeforeReload?.();
|
|
134
|
-
} catch {
|
|
135
|
-
// Teardown (e.g. a socket already closing) may throw; reload regardless.
|
|
136
|
-
}
|
|
102
|
+
} catch {}
|
|
137
103
|
doReload();
|
|
138
104
|
};
|
|
139
105
|
const onPreloadError = event => handle(event);
|
|
@@ -146,7 +112,6 @@ export function installStaleDeployReload(options = {}) {
|
|
|
146
112
|
if (isChunkLoadError(event.reason)) handle(event);
|
|
147
113
|
};
|
|
148
114
|
window.addEventListener("vite:preloadError", onPreloadError);
|
|
149
|
-
// Resource-load errors do not bubble, so listen in the capture phase.
|
|
150
115
|
window.addEventListener("error", onError, true);
|
|
151
116
|
window.addEventListener("unhandledrejection", onRejection);
|
|
152
117
|
return () => {
|
|
@@ -15,7 +15,6 @@ const AppShellContext = /*#__PURE__*/createContext({
|
|
|
15
15
|
panelHidden: false,
|
|
16
16
|
scroll: "contained"
|
|
17
17
|
});
|
|
18
|
-
/** Frame `<div>`: sets the `--app-shell-*` variables and owns the resize state. `style` merges over the variables. */
|
|
19
18
|
function Root(t0) {
|
|
20
19
|
const $ = _c(44);
|
|
21
20
|
let className;
|
|
@@ -200,7 +199,6 @@ function Root(t0) {
|
|
|
200
199
|
}
|
|
201
200
|
return t20;
|
|
202
201
|
}
|
|
203
|
-
/** Visually hidden link to `<main>`, shown on focus. */
|
|
204
202
|
function SkipLink(t0) {
|
|
205
203
|
const $ = _c(12);
|
|
206
204
|
let className;
|
|
@@ -256,7 +254,6 @@ function SkipLink(t0) {
|
|
|
256
254
|
}
|
|
257
255
|
return t4;
|
|
258
256
|
}
|
|
259
|
-
/** `<main>`, offset by the sidebar (or rail while the Root `panelHidden`). `id` defaults to the Root `mainId`. */
|
|
260
257
|
function Main(t0) {
|
|
261
258
|
const $ = _c(14);
|
|
262
259
|
let className;
|
|
@@ -315,11 +312,6 @@ function Main(t0) {
|
|
|
315
312
|
}
|
|
316
313
|
return t3;
|
|
317
314
|
}
|
|
318
|
-
/**
|
|
319
|
-
* Content card inside `<main>`. A plain column, with no card, while the Root
|
|
320
|
-
* `scroll` is `"document"` or its `variant` is `"rail"`. Pads for the mobile
|
|
321
|
-
* header below `md`.
|
|
322
|
-
*/
|
|
323
315
|
function Content(t0) {
|
|
324
316
|
const $ = _c(9);
|
|
325
317
|
let className;
|
|
@@ -364,12 +356,6 @@ function Content(t0) {
|
|
|
364
356
|
}
|
|
365
357
|
return t3;
|
|
366
358
|
}
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
* Legacy (still supported): full-height app frame with a skip link, a sidebar
|
|
370
|
-
* slot and the main content card. Composed from `AppShell.Root`, `.SkipLink`,
|
|
371
|
-
* `.Main` and `.Content`.
|
|
372
|
-
*/
|
|
373
359
|
function LegacyAppShell(t0) {
|
|
374
360
|
const $ = _c(26);
|
|
375
361
|
const {
|
|
@@ -11,7 +11,6 @@ const slotTransition = {
|
|
|
11
11
|
duration: motionDuration.fast,
|
|
12
12
|
ease: motionEase
|
|
13
13
|
};
|
|
14
|
-
/** A header slot that fades and lifts in. Needs an ancestor `LazyMotion`. */
|
|
15
14
|
function Slot(t0) {
|
|
16
15
|
const $ = _c(11);
|
|
17
16
|
const {
|
|
@@ -82,8 +81,6 @@ function Slot(t0) {
|
|
|
82
81
|
}
|
|
83
82
|
return t5;
|
|
84
83
|
}
|
|
85
|
-
|
|
86
|
-
/** The `h1` counterpart of `Slot`. */
|
|
87
84
|
function TitleSlot(t0) {
|
|
88
85
|
const $ = _c(8);
|
|
89
86
|
const {
|
|
@@ -5,16 +5,11 @@ import { HoverCard, HoverCardTrigger } from "../../src/ui/hover-card.js";
|
|
|
5
5
|
import { floatingSurfaceAnimateClass, floatingSurfaceClass } from "../../src/ui/_menu-classes.js";
|
|
6
6
|
import { cn } from "../../src/utils/cn.js";
|
|
7
7
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
/**
|
|
9
|
-
* Surface classes. Only `overlay` carries the shared floating surface, so the
|
|
10
|
-
* others need no `!` overrides, and `className` merges over all of them.
|
|
11
|
-
*/
|
|
12
8
|
const surfaceClasses = {
|
|
13
9
|
overlay: floatingSurfaceClass,
|
|
14
10
|
surface: "rounded-surface bg-overlay text-overlay-foreground smooth-shadow-ring-lg",
|
|
15
11
|
glass: "rounded-surface glass-panel-strong text-foreground smooth-shadow-ring-lg"
|
|
16
12
|
};
|
|
17
|
-
/** `:focus-visible` is true for keyboard focus only. Treat unsupported engines as keyboard. */
|
|
18
13
|
function isFocusVisible(el) {
|
|
19
14
|
try {
|
|
20
15
|
return el.matches(":focus-visible");
|
|
@@ -22,7 +17,6 @@ function isFocusVisible(el) {
|
|
|
22
17
|
return true;
|
|
23
18
|
}
|
|
24
19
|
}
|
|
25
|
-
/** Mounts only while the card is open, so `loadContent` never runs while closed. */
|
|
26
20
|
function LoadedBody({
|
|
27
21
|
loadContent,
|
|
28
22
|
fallback
|
|
@@ -46,15 +40,12 @@ function LoadedBody({
|
|
|
46
40
|
return () => {
|
|
47
41
|
cancelled = true;
|
|
48
42
|
};
|
|
49
|
-
// Run once per open. A new `loadContent` identity must not refetch.
|
|
50
43
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
51
44
|
}, []);
|
|
52
45
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
53
46
|
children: state.status === "ready" ? state.node : fallback
|
|
54
47
|
});
|
|
55
48
|
}
|
|
56
|
-
|
|
57
|
-
/** Calls the render prop. Mounts only inside open content, never while closed. */
|
|
58
49
|
function RenderBody(t0) {
|
|
59
50
|
const $ = _c(5);
|
|
60
51
|
const {
|
|
@@ -10,12 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
10
10
|
export const SIDE_PANEL_RAIL_WIDTH_PX = 44;
|
|
11
11
|
/** Width of the rail with a label under each icon (`labelled`). */
|
|
12
12
|
export const SIDE_PANEL_RAIL_LABELLED_WIDTH_PX = 76;
|
|
13
|
-
|
|
14
|
-
/** Half the arrow's side (`size-4`), so its centre lands on the tab centre. */
|
|
15
13
|
const ARROW_HALF_PX = 8;
|
|
16
|
-
|
|
17
|
-
/* Relative to the frame, and scoped to its rail: content inside the card can
|
|
18
|
-
have tab lists of its own. */
|
|
19
14
|
const RAIL_TABLIST_SELECTOR = ':scope > [data-side-panel-rail] [role="tablist"]';
|
|
20
15
|
const ACTIVE_TAB_SELECTOR = `${RAIL_TABLIST_SELECTOR} [role="tab"][data-state="active"]`;
|
|
21
16
|
const CARD_SELECTOR = "[data-side-panel-card]";
|
|
@@ -36,15 +31,6 @@ export function popOutSidePanel(root, collapse) {
|
|
|
36
31
|
const card = root?.querySelector(CARD_SELECTOR) ?? null;
|
|
37
32
|
dockPopOut(card, card ? activeTabOf(card) : null, "right", collapse, card ? arrowOf(card) : null);
|
|
38
33
|
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Keeps the card's arrow level with the active rail tab, and plays the card's
|
|
42
|
-
* dock motion: pop in when the card appears, a content slide when the active
|
|
43
|
-
* tab changes. It writes the transform straight to the node (no React state), as
|
|
44
|
-
* the tab pill does: the first placement snaps, later moves slide. The arrow
|
|
45
|
-
* hides when the active tab is scrolled out of the card's height. Measure
|
|
46
|
-
* before animating: a scaled card reports a scaled rect.
|
|
47
|
-
*/
|
|
48
34
|
function useActiveTabArrow(frameRef, cardRef, arrowRef) {
|
|
49
35
|
const $ = _c(5);
|
|
50
36
|
let t0;
|
|
@@ -143,15 +129,6 @@ function useActiveTabArrow(frameRef, cardRef, arrowRef) {
|
|
|
143
129
|
}
|
|
144
130
|
useLayoutEffect(t0, t1);
|
|
145
131
|
}
|
|
146
|
-
/**
|
|
147
|
-
* A side panel with its tabs on a rail. From `md` up: the rail on the right
|
|
148
|
-
* edge, the content a rounded card beside it with an arrow that points at the
|
|
149
|
-
* active tab; `collapsed` hides the card and the rail stays. Below `md`: a
|
|
150
|
-
* column, the tab strip on top and the content edge to edge. The card pops
|
|
151
|
-
* out of the active tab when it opens; on a tab switch its content slides in
|
|
152
|
-
* from the side of the new tab; close it
|
|
153
|
-
* through `popOutSidePanel`.
|
|
154
|
-
*/
|
|
155
132
|
function Frame(t0) {
|
|
156
133
|
const $ = _c(18);
|
|
157
134
|
const {
|
|
@@ -239,7 +216,6 @@ function Frame(t0) {
|
|
|
239
216
|
}
|
|
240
217
|
return t9;
|
|
241
218
|
}
|
|
242
|
-
/** The rail column: holds a `SidePanelTabs.List`, and any `ButtonTrack` of tools after it. */
|
|
243
219
|
function Rail(t0) {
|
|
244
220
|
const $ = _c(10);
|
|
245
221
|
let className;
|
|
@@ -286,11 +262,6 @@ function Rail(t0) {
|
|
|
286
262
|
}
|
|
287
263
|
return t4;
|
|
288
264
|
}
|
|
289
|
-
/**
|
|
290
|
-
* The tabs of the rail on one trough with a sliding pill. Activation is
|
|
291
|
-
* manual: a tab selects on press, not on focus, so a press on the selected
|
|
292
|
-
* tab can mean something else (`onReselect`).
|
|
293
|
-
*/
|
|
294
265
|
function List(t0) {
|
|
295
266
|
const $ = _c(22);
|
|
296
267
|
let children;
|
|
@@ -394,18 +365,11 @@ const TAB_LAYOUT_CLASS = {
|
|
|
394
365
|
icon: "md:w-8 md:justify-center md:px-0",
|
|
395
366
|
stacked: "md:h-auto md:w-full md:flex-col md:justify-center md:gap-0.5 md:px-1 md:py-1.5"
|
|
396
367
|
};
|
|
397
|
-
|
|
398
|
-
/* Selection is Radix's `data-state` on the trigger, so the idle and active
|
|
399
|
-
icons swap in CSS. */
|
|
400
368
|
const ICON_SLOT_CLASS = "contents [&_svg]:size-4 [&_svg]:shrink-0";
|
|
401
|
-
/* Radix selects a tab on mouse down (or Enter / Space key down), so read the
|
|
402
|
-
state there: by `click` a newly picked tab is already active. */
|
|
403
369
|
function isReselectPress(event) {
|
|
404
370
|
const press = "button" in event ? event.button === 0 && !event.ctrlKey : !event.repeat && (event.key === "Enter" || event.key === " ");
|
|
405
371
|
return press && event.currentTarget.dataset.state === "active";
|
|
406
372
|
}
|
|
407
|
-
|
|
408
|
-
/** One tab of a `SidePanelTabs.List`. */
|
|
409
373
|
function Tab(t0) {
|
|
410
374
|
const $ = _c(37);
|
|
411
375
|
const {
|
|
@@ -21,7 +21,6 @@ function useSidebar(part) {
|
|
|
21
21
|
}
|
|
22
22
|
return sidebar;
|
|
23
23
|
}
|
|
24
|
-
/** Sidebar state for the other parts. Renders no DOM. Closes the drawer when the desktop breakpoint is reached. */
|
|
25
24
|
function Root(t0) {
|
|
26
25
|
const $ = _c(16);
|
|
27
26
|
const {
|
|
@@ -99,10 +98,6 @@ function closeOnEscape(sidebar, event) {
|
|
|
99
98
|
sidebar.onMobileOpenChange(false);
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Fixed header below `md`. Escape inside it closes the drawer. Three columns
|
|
104
|
-
* keep the title centred and stop it overlapping the actions: it truncates instead.
|
|
105
|
-
*/
|
|
106
101
|
function MobileHeader(t0) {
|
|
107
102
|
const $ = _c(13);
|
|
108
103
|
let className;
|
|
@@ -163,7 +158,6 @@ function MobileHeader(t0) {
|
|
|
163
158
|
const defaultMobileMenuIcon = () => /*#__PURE__*/_jsx(IconMenu2, {
|
|
164
159
|
size: 20
|
|
165
160
|
});
|
|
166
|
-
/** Opens the drawer. `shape="rounded"` (`rounded-lg`); change the radius with `className`. */
|
|
167
161
|
function MobileMenuButton(t0) {
|
|
168
162
|
const $ = _c(22);
|
|
169
163
|
let className;
|
|
@@ -254,7 +248,6 @@ function MobileMenuButton(t0) {
|
|
|
254
248
|
}
|
|
255
249
|
return t8;
|
|
256
250
|
}
|
|
257
|
-
/** Centred title in the mobile header. Without children, an empty `<span>` keeps the middle column. */
|
|
258
251
|
function MobileTitle(t0) {
|
|
259
252
|
const $ = _c(11);
|
|
260
253
|
let children;
|
|
@@ -311,7 +304,6 @@ function MobileTitle(t0) {
|
|
|
311
304
|
}
|
|
312
305
|
return t2;
|
|
313
306
|
}
|
|
314
|
-
/** Trailing actions in the mobile header. Without children, a menu-button-sized spacer keeps the title centred. */
|
|
315
307
|
function MobileActions(t0) {
|
|
316
308
|
const $ = _c(15);
|
|
317
309
|
let children;
|
|
@@ -381,7 +373,6 @@ function MobileActions(t0) {
|
|
|
381
373
|
}
|
|
382
374
|
return t2;
|
|
383
375
|
}
|
|
384
|
-
/** Drawer backdrop below `md`; a click closes the drawer. Fades in and out. */
|
|
385
376
|
function Backdrop(t0) {
|
|
386
377
|
const $ = _c(13);
|
|
387
378
|
let className;
|
|
@@ -458,11 +449,6 @@ function Backdrop(t0) {
|
|
|
458
449
|
}
|
|
459
450
|
return t3;
|
|
460
451
|
}
|
|
461
|
-
/**
|
|
462
|
-
* The `<aside>`: fixed on desktop, a swipe-to-close drawer below it. Width
|
|
463
|
-
* reads the `--app-shell-*` variables. `id` overrides the Root drawer id
|
|
464
|
-
* (keep them equal so `aria-controls` points here).
|
|
465
|
-
*/
|
|
466
452
|
function Aside(t0) {
|
|
467
453
|
const $ = _c(34);
|
|
468
454
|
let children;
|
|
@@ -623,11 +609,6 @@ function Aside(t0) {
|
|
|
623
609
|
}
|
|
624
610
|
return t16;
|
|
625
611
|
}
|
|
626
|
-
/**
|
|
627
|
-
* `SidebarResizeHandle` inside a resizable `AppShell`. Under a `Sidebar.Root`
|
|
628
|
-
* it shows only on desktop while the panel shows (not collapsed or hidden).
|
|
629
|
-
* Place it inside `Sidebar.Aside`.
|
|
630
|
-
*/
|
|
631
612
|
function ResizeHandle(props) {
|
|
632
613
|
const $ = _c(3);
|
|
633
614
|
const sidebar = useOptionalSidebar();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../src/ui/tooltip.js";
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
// radix tooltip for icon-only sidebar rail — skipped when labels are visible
|
|
5
4
|
export function SidebarIconTooltip(t0) {
|
|
6
5
|
const $ = _c(9);
|
|
7
6
|
const {
|
|
@@ -174,8 +174,6 @@ export function SidebarRail(t0) {
|
|
|
174
174
|
}
|
|
175
175
|
return t12;
|
|
176
176
|
}
|
|
177
|
-
|
|
178
|
-
/** A slot's trough hides while the slot renders nothing (the pill is then its only child). */
|
|
179
177
|
const railSlotGroupClass = "[&:not(:has(>:not([data-rail-pill])))]:hidden";
|
|
180
178
|
/** Rail column `<div>`. Width reads `--app-shell-rail-width`. */
|
|
181
179
|
export function Rail(t0) {
|
|
@@ -331,23 +329,13 @@ export function RailBody(t0) {
|
|
|
331
329
|
}
|
|
332
330
|
return t4;
|
|
333
331
|
}
|
|
334
|
-
|
|
335
|
-
/** True inside a `RailGroup`: its tiles take the segmented fills. */
|
|
336
332
|
const RailGroupContext = /*#__PURE__*/createContext(false);
|
|
337
333
|
|
|
338
334
|
/** Whether the caller sits in a `Sidebar.RailGroup`. Custom rail tiles pass it to `railTileStateClass`. */
|
|
339
335
|
export function useInRailGroup() {
|
|
340
336
|
return use(RailGroupContext);
|
|
341
337
|
}
|
|
342
|
-
/** Marks the active `RailItem`, so its group's pill can find it. */
|
|
343
338
|
const ACTIVE_TILE_SELECTOR = "[data-rail-tile][data-active]";
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Keeps the group's pill under its active tile. The first placement and any
|
|
347
|
-
* resize snap; a change of active tile slides, as `TabsList` does. With no
|
|
348
|
-
* active tile the pill hides, and the next one snaps in rather than sliding
|
|
349
|
-
* from where the pill was last.
|
|
350
|
-
*/
|
|
351
339
|
function useRailGroupPill(groupRef, pillRef) {
|
|
352
340
|
const $ = _c(4);
|
|
353
341
|
let t0;
|
|
@@ -23,7 +23,6 @@ function readStoredWidth(storageKey) {
|
|
|
23
23
|
try {
|
|
24
24
|
const raw = window.localStorage.getItem(storageKey);
|
|
25
25
|
if (raw === null || raw.trim() === "") return null;
|
|
26
|
-
// A JSON number parses the same with Number(); anything else is NaN.
|
|
27
26
|
const value = Number(raw);
|
|
28
27
|
return Number.isFinite(value) ? value : null;
|
|
29
28
|
} catch {
|
|
@@ -33,9 +32,7 @@ function readStoredWidth(storageKey) {
|
|
|
33
32
|
function writeStoredWidth(storageKey, width) {
|
|
34
33
|
try {
|
|
35
34
|
window.localStorage.setItem(storageKey, JSON.stringify(width));
|
|
36
|
-
} catch {
|
|
37
|
-
// Storage full or blocked: keep the in-memory width.
|
|
38
|
-
}
|
|
35
|
+
} catch {}
|
|
39
36
|
}
|
|
40
37
|
const subscribeNever = () => () => {};
|
|
41
38
|
const serverSnapshot = () => null;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../src/utils/cn.js";
|
|
2
2
|
|
|
3
|
-
// Class strings for the app shell, copied from existing app markup so an app
|
|
4
|
-
// that moves to these components renders the same classes. The bare muted and
|
|
5
|
-
// accent colour names match that markup and are allow-listed for check:tokens
|
|
6
|
-
// on the marked lines only.
|
|
7
|
-
|
|
8
3
|
/** App icon size in px for the home `RailTile`. Fixed across the apps. `RailTile` applies it when you pass `app`. */
|
|
9
4
|
export const SIDEBAR_RAIL_APP_ICON_SIZE = 24;
|
|
10
5
|
|
|
@@ -13,10 +8,6 @@ export const railTileClass = "relative flex size-11 md:size-10 items-center just
|
|
|
13
8
|
const railTileActiveClass = "border-transparent bg-surface-tertiary text-foreground";
|
|
14
9
|
const railTileIdleClass = "border-transparent text-muted opacity-75 hover:bg-surface-tertiary/50 hover:opacity-100 hover:text-foreground"; // check-tokens-allow: text-muted
|
|
15
10
|
|
|
16
|
-
// Inside a `RailGroup` the tiles read as segmented tabs: the trough is
|
|
17
|
-
// `--default` (the segmented bar) and the group's sliding `--segment` pill sits
|
|
18
|
-
// under the active tile, so the tile itself has no fill. Hover is the pill at
|
|
19
|
-
// half strength, as on `.t-tabs--pills`. `z-1` lifts tiles over the pill.
|
|
20
11
|
const railTileGroupActiveClass = "z-1 border-transparent bg-transparent text-segment-foreground";
|
|
21
12
|
const railTileGroupIdleClass = "z-1 border-transparent text-muted opacity-75 hover:bg-segment/50 hover:opacity-100 hover:text-foreground"; // check-tokens-allow: text-muted
|
|
22
13
|
|
|
@@ -63,7 +54,6 @@ export function sidebarNavLinkTextClass(isActive) {
|
|
|
63
54
|
export function sidebarNavRowClass(isIconOnly) {
|
|
64
55
|
return cn("group flex w-full items-center rounded-menu-item py-1.5 text-[0.8125rem] leading-[18px] tracking-[0.005em] transition-[scale,background-color,color] duration-150 ease-smooth active:scale-[0.99] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foreground/35", isIconOnly ? "justify-center px-0" : "gap-2 px-4");
|
|
65
56
|
}
|
|
66
|
-
// Row states an app can also set as data attributes on the row itself.
|
|
67
57
|
const sidebarNavItemDataStateClass = "data-[selected=true]:bg-sidebar-accent data-[selected=true]:text-foreground data-[dragging=true]:cursor-grabbing data-[dragging=true]:opacity-40 data-[drop-target=true]:bg-sidebar-accent data-[drop-target=true]:text-foreground data-[drop-target=true]:ring-2 data-[drop-target=true]:ring-inset data-[drop-target=true]:ring-focus";
|
|
68
58
|
|
|
69
59
|
/**
|
package/dist/shell/src/index.js
CHANGED
|
@@ -9,7 +9,6 @@ export { popInShellPanelNextFrame, popOutShellPanel, toggleShellPanel } from "./
|
|
|
9
9
|
export { ButtonTrack, buttonTrackClass } from "./ButtonTrack.js";
|
|
10
10
|
export { SidePanelTabs, popOutSidePanel, SIDE_PANEL_RAIL_WIDTH_PX, SIDE_PANEL_RAIL_LABELLED_WIDTH_PX } from "./SidePanelTabs.js";
|
|
11
11
|
export { AppSidebar } from "./AppSidebar.js";
|
|
12
|
-
// Composable sidebar parts (`Sidebar.Root`, `Sidebar.Rail`, ...) and their prop types.
|
|
13
12
|
export * from "./Sidebar.js";
|
|
14
13
|
export { SidebarRail, RailTile, RailDivider, RailCollapseTile, shellDockTileProps, useInRailGroup } from "./SidebarRail.js";
|
|
15
14
|
export { SidebarResizeHandle, useAppShellResize } from "./SidebarResize.js";
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Dock motion of the sidebar panel in an `AppShell variant="rail"`, on hide
|
|
3
|
-
* and show only: the panel shrinks into the rail's collapse tile and grows
|
|
4
|
-
* back out of it. `Sidebar.Panel` marks the panel and `RailCollapseTile` the
|
|
5
|
-
* tile (`shellDockTileProps` for a tile of your own). The main content slides
|
|
6
|
-
* its margin with the aside's width, so it does not jump.
|
|
7
|
-
*
|
|
8
|
-
* Off with `MotionProvider reducedMotion` and `PageMotionProvider disabled`
|
|
9
|
-
* (`dockMotionOff`), and outside the rail variant: the toggle runs at once.
|
|
10
|
-
*/
|
|
11
1
|
import { dockPopIn, dockPopOut, slideWith } from "../../src/motion/dock-motion.js";
|
|
12
2
|
function dockPanel() {
|
|
13
3
|
if (typeof document === "undefined") return null;
|
|
@@ -17,8 +7,6 @@ function dockTile() {
|
|
|
17
7
|
if (typeof document === "undefined") return null;
|
|
18
8
|
return document.querySelector("[data-shell-dock-tile]");
|
|
19
9
|
}
|
|
20
|
-
|
|
21
|
-
/** The page beside the shell aside: its left margin follows the aside. */
|
|
22
10
|
function slideMainWithAside() {
|
|
23
11
|
const tile = dockTile();
|
|
24
12
|
if (!tile) return;
|
|
@@ -5,10 +5,6 @@ import { useCn, useUiConfig } from "../ui/ui-config.js";
|
|
|
5
5
|
import { useEffect, useState, useSyncExternalStore } from "react";
|
|
6
6
|
import { quantizedSnapshot, subscribeQuantized } from "../utils/sharedClock.js";
|
|
7
7
|
|
|
8
|
-
/** Props the activity timeline passes to its Markdown renderer. */
|
|
9
|
-
// A type alias, not an interface: streamdown 2.7.1 gave its props a
|
|
10
|
-
// `data-*` index signature, and only an alias is assignable to that.
|
|
11
|
-
|
|
12
8
|
/**
|
|
13
9
|
* `UiConfig.ActivityTasks`: defaults for the agent activity timeline
|
|
14
10
|
* (`ActivityTasks`, `ActivityThinkingIcon`).
|
|
@@ -67,8 +63,6 @@ export function ActivityThinkingIcon(t0) {
|
|
|
67
63
|
}
|
|
68
64
|
return t4;
|
|
69
65
|
}
|
|
70
|
-
|
|
71
|
-
/** The `status` step glyph: the `circle` {@link Spinner}. */
|
|
72
66
|
function ActivityStatusSpinner() {
|
|
73
67
|
const $ = _c(1);
|
|
74
68
|
let t0;
|