@agent-native/core 0.76.3 → 0.76.4
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/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/client/AgentPanel.tsx +3 -3
- package/corpus/core/src/client/AgentTaskCard.tsx +2 -1
- package/corpus/core/src/client/AppearancePicker.tsx +1 -1
- package/corpus/core/src/client/AssistantChat.tsx +3 -3
- package/corpus/core/src/client/CommandMenu.tsx +4 -4
- package/corpus/core/src/client/ErrorBoundary.tsx +1 -1
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +11 -11
- package/corpus/core/src/client/NewWorkspaceAppFlow.tsx +5 -5
- package/corpus/core/src/client/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/core/src/client/components/ui/sheet.tsx +1 -1
- package/corpus/core/src/client/composer/ComposerPlusMenu.tsx +6 -6
- package/corpus/core/src/client/composer/MentionPopover.tsx +4 -4
- package/corpus/core/src/client/composer/PastedTextChip.tsx +3 -3
- package/corpus/core/src/client/composer/PromptComposer.tsx +3 -3
- package/corpus/core/src/client/composer/TiptapComposer.tsx +16 -16
- package/corpus/core/src/client/guided-questions.tsx +6 -8
- package/corpus/core/src/client/i18n.tsx +2 -2
- package/corpus/core/src/client/integrations/IntegrationCard.tsx +2 -2
- package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +4 -4
- package/corpus/core/src/client/notifications/NotificationsBell.tsx +3 -3
- package/corpus/core/src/client/onboarding/OnboardingBanner.tsx +3 -3
- package/corpus/core/src/client/onboarding/OnboardingPanel.tsx +17 -10
- package/corpus/core/src/client/org/OrgSwitcher.tsx +13 -11
- package/corpus/core/src/client/org/TeamPage.tsx +2 -2
- package/corpus/core/src/client/settings/AgentsSection.tsx +3 -3
- package/corpus/core/src/client/settings/AutomationsSection.tsx +3 -3
- package/corpus/core/src/client/settings/SecretsSection.tsx +2 -2
- package/corpus/core/src/client/settings/SettingsPanel.tsx +5 -7
- package/corpus/core/src/client/settings/SettingsSection.tsx +1 -1
- package/corpus/core/src/client/settings/UsageSection.tsx +3 -3
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +3 -3
- package/corpus/core/src/client/sharing/ShareButton.tsx +7 -7
- package/corpus/core/src/client/sharing/ShareDialog.tsx +3 -3
- package/corpus/core/src/styles/agent-conversation.css +10 -10
- package/corpus/core/src/styles/blocks.css +2 -2
- package/corpus/core/src/styles/rich-markdown-editor.css +2 -2
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/calendar.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/command.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/date-picker.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/analytics/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/analytics/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/analytics/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/analytics/app/components/ui/select.tsx +3 -3
- package/corpus/templates/analytics/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/analytics/app/components/ui/table.tsx +2 -2
- package/corpus/templates/analytics/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/assets/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +12 -12
- package/corpus/templates/assets/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/assets/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/assets/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/assets/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/assets/app/components/ui/select.tsx +3 -3
- package/corpus/templates/assets/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/assets/app/components/ui/table.tsx +2 -2
- package/corpus/templates/assets/app/routes/library.tsx +3 -3
- package/corpus/templates/assets/app/routes/settings.tsx +1 -1
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +5 -5
- package/corpus/templates/brain/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/brain/app/components/ui/select.tsx +3 -3
- package/corpus/templates/brain/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/brain/app/components/ui/table.tsx +2 -2
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +6 -6
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +11 -9
- package/corpus/templates/calendar/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/calendar/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/calendar/app/components/ui/command.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/calendar/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/calendar/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/calendar/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/select.tsx +3 -3
- package/corpus/templates/calendar/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/calendar/app/components/ui/sonner.tsx +1 -1
- package/corpus/templates/calendar/app/components/ui/table.tsx +2 -2
- package/corpus/templates/calendar/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/calendar/app/pages/Settings.tsx +5 -5
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/chat/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/chat/app/components/ui/command.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/chat/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/chat/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/chat/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/chat/app/components/ui/select.tsx +3 -3
- package/corpus/templates/chat/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/chat/app/components/ui/table.tsx +2 -2
- package/corpus/templates/chat/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/clips/app/components/capture-install-options.tsx +3 -3
- package/corpus/templates/clips/app/components/editable-recording-title.tsx +1 -1
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +3 -3
- package/corpus/templates/clips/app/components/library/folder-tree.tsx +5 -5
- package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
- package/corpus/templates/clips/app/components/library/organization-switcher.tsx +4 -4
- package/corpus/templates/clips/app/components/library/recording-card.tsx +11 -11
- package/corpus/templates/clips/app/components/library/search-bar.tsx +4 -4
- package/corpus/templates/clips/app/components/library/space-card.tsx +1 -1
- package/corpus/templates/clips/app/components/library/tag-input.tsx +1 -1
- package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
- package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +4 -4
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +1 -1
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/clips/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/clips/app/components/ui/command.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/clips/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/clips/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/clips/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/clips/app/components/ui/select.tsx +3 -3
- package/corpus/templates/clips/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/clips/app/components/ui/table.tsx +2 -2
- package/corpus/templates/clips/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +1 -1
- package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +2 -2
- package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +6 -6
- package/corpus/templates/clips/app/components/workspace/top-videos-table.tsx +2 -2
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +4 -4
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +7 -7
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +1 -1
- package/corpus/templates/clips/app/routes/download.tsx +2 -2
- package/corpus/templates/clips/app/routes/invite.$token.tsx +2 -2
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +3 -3
- package/corpus/templates/clips/app/routes/record.tsx +5 -5
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +7 -7
- package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
- package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +17 -17
- package/corpus/templates/content/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +10 -9
- package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +10 -6
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +3 -3
- package/corpus/templates/content/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/content/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/content/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/content/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/content/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/content/app/components/ui/table.tsx +2 -2
- package/corpus/templates/content/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/design/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/design/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/design/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/design/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/design/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/design/app/components/ui/command.tsx +2 -2
- package/corpus/templates/design/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/design/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/design/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/design/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/design/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/design/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/design/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/design/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/design/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/design/app/components/ui/select.tsx +3 -3
- package/corpus/templates/design/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/design/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/design/app/components/ui/table.tsx +2 -2
- package/corpus/templates/design/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/design/app/pages/DesignSystems.tsx +6 -8
- package/corpus/templates/design/app/pages/Index.tsx +8 -8
- package/corpus/templates/design/app/pages/NotFound.tsx +1 -1
- package/corpus/templates/design/app/pages/Templates.tsx +2 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/calendar.tsx +9 -6
- package/corpus/templates/forms/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/forms/app/components/ui/command.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/forms/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/forms/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/forms/app/components/ui/select.tsx +3 -3
- package/corpus/templates/forms/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/forms/app/components/ui/table.tsx +2 -2
- package/corpus/templates/forms/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +18 -18
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +9 -9
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +4 -4
- package/corpus/templates/macros/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/command.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/macros/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/macros/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/macros/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/macros/app/components/ui/select.tsx +3 -3
- package/corpus/templates/macros/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/table.tsx +2 -2
- package/corpus/templates/macros/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/macros/app/routes/_index.tsx +2 -2
- package/corpus/templates/macros/app/routes/analytics.tsx +1 -1
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +6 -6
- package/corpus/templates/mail/app/components/email/AttachmentStrip.tsx +2 -2
- package/corpus/templates/mail/app/components/email/EmailListItem.tsx +5 -5
- package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +5 -5
- package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +3 -3
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +10 -10
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/mail/app/components/layout/SearchBar.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/calendar.tsx +4 -4
- package/corpus/templates/mail/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/mail/app/components/ui/command.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/mail/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/mail/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/mail/app/components/ui/select.tsx +3 -3
- package/corpus/templates/mail/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/mail/app/components/ui/sonner.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/table.tsx +2 -2
- package/corpus/templates/mail/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +10 -10
- package/corpus/templates/plan/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/plan/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/plan/app/components/ui/command.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/plan/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/plan/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/plan/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/plan/app/components/ui/select.tsx +3 -3
- package/corpus/templates/plan/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/plan/app/components/ui/table.tsx +2 -2
- package/corpus/templates/plan/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/slides/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/slides/app/components/ui/command.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/slides/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/slides/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/slides/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/slides/app/components/ui/select.tsx +3 -3
- package/corpus/templates/slides/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/slides/app/components/ui/table.tsx +2 -2
- package/corpus/templates/slides/app/components/ui/toast.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/alert-dialog.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/alert.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/breadcrumb.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/calendar.tsx +5 -5
- package/corpus/templates/videos/app/components/ui/carousel.tsx +6 -6
- package/corpus/templates/videos/app/components/ui/command.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/context-menu.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/dialog.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/drawer.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/dropdown-menu.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/input-otp.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/menubar.tsx +9 -9
- package/corpus/templates/videos/app/components/ui/navigation-menu.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/pagination.tsx +4 -4
- package/corpus/templates/videos/app/components/ui/scroll-area.tsx +1 -1
- package/corpus/templates/videos/app/components/ui/select.tsx +3 -3
- package/corpus/templates/videos/app/components/ui/sheet.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/sidebar.tsx +6 -6
- package/corpus/templates/videos/app/components/ui/table.tsx +2 -2
- package/corpus/templates/videos/app/components/ui/toast.tsx +3 -3
- package/dist/client/AgentPanel.js +3 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AgentTaskCard.d.ts.map +1 -1
- package/dist/client/AgentTaskCard.js +1 -1
- package/dist/client/AgentTaskCard.js.map +1 -1
- package/dist/client/AppearancePicker.js +1 -1
- package/dist/client/AppearancePicker.js.map +1 -1
- package/dist/client/AssistantChat.js +3 -3
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/CommandMenu.js +4 -4
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/ErrorBoundary.js +1 -1
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +9 -9
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +5 -5
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/components/ui/dropdown-menu.js +6 -6
- package/dist/client/components/ui/dropdown-menu.js.map +1 -1
- package/dist/client/components/ui/sheet.js +1 -1
- package/dist/client/components/ui/sheet.js.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +5 -5
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/MentionPopover.js +4 -4
- package/dist/client/composer/MentionPopover.js.map +1 -1
- package/dist/client/composer/PastedTextChip.js +2 -2
- package/dist/client/composer/PastedTextChip.js.map +1 -1
- package/dist/client/composer/PromptComposer.js +3 -3
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +12 -12
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +5 -5
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/i18n.js +2 -2
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/integrations/IntegrationCard.js +1 -1
- package/dist/client/integrations/IntegrationCard.js.map +1 -1
- package/dist/client/integrations/IntegrationsPanel.js +4 -4
- package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
- package/dist/client/notifications/NotificationsBell.js +3 -3
- package/dist/client/notifications/NotificationsBell.js.map +1 -1
- package/dist/client/onboarding/OnboardingBanner.js +3 -3
- package/dist/client/onboarding/OnboardingBanner.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +15 -10
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +7 -7
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.js +2 -2
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/settings/AgentsSection.js +3 -3
- package/dist/client/settings/AgentsSection.js.map +1 -1
- package/dist/client/settings/AutomationsSection.js +2 -2
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/client/settings/SecretsSection.js +2 -2
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +4 -4
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/SettingsSection.js +1 -1
- package/dist/client/settings/SettingsSection.js.map +1 -1
- package/dist/client/settings/UsageSection.js +2 -2
- package/dist/client/settings/UsageSection.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +3 -3
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/sharing/ShareButton.js +6 -6
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/sharing/ShareDialog.js +3 -3
- package/dist/client/sharing/ShareDialog.js.map +1 -1
- package/dist/styles/agent-conversation.css +10 -10
- package/dist/styles/blocks.css +2 -2
- package/dist/styles/rich-markdown-editor.css +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgSwitcher.js","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eA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CAAC,CAAC,CACF,aAAa,CACd,GACM,IACL,IACD,CACR,IACwB,GACH,IACJ,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport {\n IconApps,\n IconArrowUpRight,\n IconBrain,\n IconBrandJira,\n IconBrush,\n IconBuilding,\n IconCalendar,\n IconCalendarTime,\n IconChartBar,\n IconCheck,\n IconChevronRight,\n IconClipboardList,\n IconCode,\n IconContract,\n IconFileText,\n IconLoader2,\n IconLogout,\n IconMail,\n IconMessageCircle,\n IconMicrophone,\n IconNote,\n IconPhone,\n IconPhoto,\n IconPlus,\n IconPresentation,\n IconScreenShare,\n IconSelector,\n IconSettings,\n IconStack2,\n IconUser,\n IconUserPlus,\n IconUsers,\n IconVideo,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport {\n useOrg,\n useSwitchOrg,\n useCreateOrg,\n useInviteMember,\n useAcceptInvitation,\n useJoinByDomain,\n} from \"./hooks.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n ORG_SWITCHER_MAX_APP_LINKS,\n useOrgSwitcherAppLinks,\n visibleOrgAppLinks,\n type OrgSwitcherAppLink,\n} from \"./workspace-app-links.js\";\n\nexport interface OrgSwitcherProps {\n className?: string;\n /** Hide entirely when the user only belongs to one org. Default: false. */\n hideWhenSingle?: boolean;\n /** Keep the switcher's button height reserved while org state is loading. */\n reserveSpace?: boolean;\n /**\n * Path to navigate to when the user clicks \"Organization settings\".\n * Defaults to `/team`, the standard organization-management route. Templates\n * with an established org surface can pass their own path; pass `null` to\n * only open the in-sidebar settings panel.\n */\n settingsPath?: string | null;\n}\n\nfunction personalLabelFromEmail(email: string | null | undefined): string {\n if (!email) return \"Personal\";\n const local = email.split(\"@\")[0] ?? email;\n const cleaned = local.replace(/[._-]+/g, \" \").trim();\n if (!cleaned) return \"Personal\";\n return cleaned\n .split(\" \")\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n}\n\ntype Mode = \"list\" | \"create\" | \"invite\";\n\nconst POPOVER_CONTENT_CLASS =\n \"z-50 min-w-[14rem] rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst ITEM_CLASS =\n \"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-foreground hover:bg-accent focus-visible:bg-accent focus:outline-none disabled:opacity-50 disabled:pointer-events-none\";\n\nconst SECTION_LABEL_CLASS =\n \"px-2.5 pt-1 pb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground\";\n\nconst APP_SUBMENU_CONTENT_CLASS =\n \"z-50 w-72 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst DEFAULT_ORGANIZATION_SETTINGS_PATH = \"/team\";\n\nconst APP_ICON_MAP: Record<string, typeof IconApps> = {\n Mail: IconMail,\n CalendarDays: IconCalendar,\n FileText: IconFileText,\n BarChart2: IconChartBar,\n GalleryHorizontal: IconPresentation,\n Video: IconVideo,\n BrandJira: IconBrandJira,\n ClipboardList: IconClipboardList,\n Users: IconUsers,\n Code: IconCode,\n Contract: IconContract,\n MessageCircle: IconMessageCircle,\n ScreenShare: IconScreenShare,\n Brush: IconBrush,\n Brain: IconBrain,\n Phone: IconPhone,\n Note: IconNote,\n Microphone: IconMicrophone,\n CalendarTime: IconCalendarTime,\n Globe: IconWorld,\n Photo: IconPhoto,\n};\n\nfunction appMenuIcon(app: OrgSwitcherAppLink): typeof IconApps {\n if (app.icon) return APP_ICON_MAP[app.icon] ?? IconStack2;\n return app.isDispatch ? IconMessageCircle : IconStack2;\n}\n\nfunction organizationSettingsPath(path: string): string {\n return `${path.replace(/#.*$/, \"\")}#workspace-settings`;\n}\n\nfunction AppMenuLink({\n app,\n onNavigate,\n}: {\n app: OrgSwitcherAppLink;\n onNavigate: () => void;\n}) {\n const Icon = appMenuIcon(app);\n return (\n <a\n href={app.href}\n onClick={onNavigate}\n className={`flex items-center gap-2 rounded-sm px-2.5 py-2 text-xs outline-none hover:bg-accent focus:bg-accent ${\n app.isDispatch ? \"border border-primary/20 bg-primary/5\" : \"\"\n }`}\n >\n <span\n className={`flex h-7 w-7 shrink-0 items-center justify-center rounded-md ${\n app.isDispatch\n ? \"bg-primary text-primary-foreground\"\n : \"bg-muted text-muted-foreground\"\n }`}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium text-foreground\">\n {app.name}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {app.isDispatch\n ? \"Main hub\"\n : app.status === \"pending\"\n ? \"Building\"\n : \"Open app\"}\n </span>\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n );\n}\n\nfunction AppsSubmenu({\n apps,\n isWorkspace,\n isLoading,\n dispatchHref,\n dispatchAllAppsHref,\n onNavigate,\n}: {\n apps: OrgSwitcherAppLink[];\n isWorkspace: boolean;\n isLoading: boolean;\n dispatchHref: string;\n dispatchAllAppsHref: string;\n onNavigate: () => void;\n}) {\n const { links, overflowCount } = visibleOrgAppLinks(apps);\n const visibleDispatchApp = links.find((app) => app.isDispatch);\n const dispatchApp =\n visibleDispatchApp ??\n ({\n id: \"dispatch\",\n name: \"Dispatch\",\n href: dispatchHref,\n isDispatch: true,\n status: \"ready\",\n } satisfies OrgSwitcherAppLink);\n const visibleNonDispatch = links\n .filter((app) => !app.isDispatch)\n .slice(0, visibleDispatchApp ? undefined : ORG_SWITCHER_MAX_APP_LINKS - 1);\n const shownCount = (dispatchApp ? 1 : 0) + visibleNonDispatch.length;\n const remainingCount = Math.max(overflowCount, apps.length - shownCount);\n\n return (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger asChild>\n <button type=\"button\" className={`${ITEM_CLASS} cursor-pointer`}>\n <IconApps className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Apps</span>\n <span className=\"text-[11px] text-muted-foreground\">\n {isLoading ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n apps.length\n )}\n </span>\n <IconChevronRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"right\"\n align=\"start\"\n sideOffset={8}\n collisionPadding={12}\n className={APP_SUBMENU_CONTENT_CLASS}\n >\n <div className=\"px-2.5 py-1.5\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">\n {isWorkspace ? \"Workspace apps\" : \"Default apps\"}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {isWorkspace\n ? \"Dispatch is the workspace hub.\"\n : \"Dispatch is the home base.\"}\n </div>\n </div>\n\n <AppMenuLink app={dispatchApp} onNavigate={onNavigate} />\n\n {visibleNonDispatch.length > 0 && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n {visibleNonDispatch.map((app) => (\n <AppMenuLink key={app.id} app={app} onNavigate={onNavigate} />\n ))}\n\n {remainingCount > 0 && (\n <>\n <div className=\"my-1 h-px bg-border\" />\n <a\n href={dispatchAllAppsHref}\n onClick={onNavigate}\n className=\"flex items-center gap-2 rounded-sm px-2.5 py-1.5 text-xs text-foreground outline-none hover:bg-accent focus:bg-accent\"\n >\n <IconMessageCircle className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1\">\n {`View ${remainingCount} more in Dispatch`}\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n </>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n\n/**\n * Compact org switcher button. Shows the active org (or \"Personal\" when the\n * user has none); opens a popover with the user's other orgs, pending\n * invitations, inline forms to create a new org / invite a teammate, and a\n * sign-out item. Renders nothing in dev / no-auth mode.\n */\nexport function OrgSwitcher({\n className,\n hideWhenSingle,\n reserveSpace,\n settingsPath = DEFAULT_ORGANIZATION_SETTINGS_PATH,\n}: OrgSwitcherProps) {\n const { data: org, isLoading } = useOrg();\n const switchOrg = useSwitchOrg();\n const createOrg = useCreateOrg();\n const inviteMember = useInviteMember();\n const acceptInvitation = useAcceptInvitation();\n const joinByDomain = useJoinByDomain();\n const navigate = useNavigate();\n const [open, setOpen] = useState(false);\n const [mode, setMode] = useState<Mode>(\"list\");\n const [newName, setNewName] = useState(\"\");\n const [inviteEmail, setInviteEmail] = useState(\"\");\n const [signingOut, setSigningOut] = useState(false);\n const [joiningOrgId, setJoiningOrgId] = useState<string | null>(null);\n const appLinks = useOrgSwitcherAppLinks(open);\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) {\n setMode(\"list\");\n setNewName(\"\");\n setInviteEmail(\"\");\n }\n };\n\n const handleSignOut = async () => {\n if (signingOut) return;\n setSigningOut(true);\n try {\n await fetch(agentNativePath(\"/_agent-native/auth/logout\"), {\n method: \"POST\",\n credentials: \"include\",\n });\n } catch {\n /* fall through to reload — server may already have cleared the cookie */\n }\n window.location.reload();\n };\n\n if (!org) {\n return reserveSpace && isLoading ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const orgs = org.orgs ?? [];\n const pendingInvitations = org.pendingInvitations ?? [];\n const domainMatches = org.domainMatches ?? [];\n const orgCount = orgs.length;\n const hasAny =\n orgCount > 0 || pendingInvitations.length > 0 || domainMatches.length > 0;\n if (!hasAny && !org.email) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n if (\n hideWhenSingle &&\n orgCount < 2 &&\n pendingInvitations.length === 0 &&\n domainMatches.length === 0\n ) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const canInvite =\n !!org.orgId && (org.role === \"owner\" || org.role === \"admin\");\n\n const personalLabel = personalLabelFromEmail(org.email);\n const inOrg = !!org.orgId;\n const buttonLabel = org.orgName ?? \"Personal\";\n const ButtonIcon = inOrg ? IconBuilding : IconUser;\n const organizationSettingsHref = settingsPath\n ? organizationSettingsPath(settingsPath)\n : null;\n\n return (\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <PopoverPrimitive.Trigger asChild>\n <button\n type=\"button\"\n className={`flex w-full items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent/50 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer ${className ?? \"\"}`}\n >\n <ButtonIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">{buttonLabel}</span>\n <IconSelector className=\"h-3 w-3 shrink-0 opacity-50\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"top\"\n align=\"start\"\n sideOffset={6}\n collisionPadding={12}\n className={POPOVER_CONTENT_CLASS}\n onOpenAutoFocus={(e) => {\n // Don't auto-focus the first item — feels heavy on a switcher.\n if (mode === \"list\") e.preventDefault();\n }}\n >\n {mode === \"list\" && (\n <>\n {!inOrg && (\n <div\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-muted-foreground\"\n aria-disabled=\"true\"\n >\n <IconUser className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-left\">\n Personal ({personalLabel})\n </span>\n </div>\n )}\n {orgs.length > 0 && (\n <div className={SECTION_LABEL_CLASS}>Organizations</div>\n )}\n {orgs.map((o) => (\n <button\n key={o.orgId}\n type=\"button\"\n onClick={async () => {\n if (o.orgId === org.orgId) {\n setOpen(false);\n return;\n }\n try {\n await switchOrg.mutateAsync(o.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via switchOrg.error */\n }\n }}\n disabled={switchOrg.isPending}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-left\">{o.orgName}</span>\n {o.orgId === org.orgId && (\n <IconCheck className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n </button>\n ))}\n\n {pendingInvitations.length > 0 && (\n <>\n {orgs.length > 0 && <div className=\"my-1 h-px bg-border\" />}\n <div className={SECTION_LABEL_CLASS}>Invitations</div>\n {pendingInvitations.map((inv) => (\n <div\n key={inv.id}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {inv.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n try {\n await acceptInvitation.mutateAsync(inv.id);\n setOpen(false);\n } catch {\n /* error surfaced via acceptInvitation.error */\n }\n }}\n disabled={acceptInvitation.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {acceptInvitation.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n ))}\n </>\n )}\n\n {domainMatches.length > 0 && (\n <>\n {(orgs.length > 0 || pendingInvitations.length > 0) && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n <div className={SECTION_LABEL_CLASS}>Join your team</div>\n {domainMatches.map((match) => {\n const isJoining =\n joinByDomain.isPending && joiningOrgId === match.orgId;\n return (\n <div\n key={match.orgId}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {match.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n setJoiningOrgId(match.orgId);\n try {\n await joinByDomain.mutateAsync(match.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via joinByDomain.error */\n } finally {\n setJoiningOrgId(null);\n }\n }}\n disabled={joinByDomain.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {isJoining ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n );\n })}\n </>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <AppsSubmenu\n apps={appLinks.apps}\n isWorkspace={appLinks.isWorkspace}\n isLoading={appLinks.isLoading}\n dispatchHref={appLinks.dispatchHref}\n dispatchAllAppsHref={appLinks.dispatchAllAppsHref}\n onNavigate={() => setOpen(false)}\n />\n {inOrg && (\n <button\n type=\"button\"\n onClick={() => {\n setOpen(false);\n window.dispatchEvent(new CustomEvent(\"agent-panel:open\"));\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"workspace-settings\" },\n }),\n );\n if (organizationSettingsHref) {\n navigate(organizationSettingsHref);\n }\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconSettings className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">\n Organization settings\n </span>\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => {\n // Clear any leftover input from a prior session — otherwise\n // the create form re-opens prefilled with the just-created\n // org's name and looks like a create dialog for the new org.\n setNewName(\"\");\n setMode(\"create\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Create organization</span>\n </button>\n {canInvite && (\n <button\n type=\"button\"\n onClick={() => {\n setInviteEmail(\"\");\n setMode(\"invite\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconUserPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-left\">Invite member</span>\n </button>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <button\n type=\"button\"\n onClick={handleSignOut}\n disabled={signingOut}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n {signingOut ? (\n <IconLoader2 className=\"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground\" />\n ) : (\n <IconLogout className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n <span className=\"flex-1 text-left\">\n Sign out\n {org.email ? (\n <span className=\"ml-1 text-muted-foreground\">\n ({org.email})\n </span>\n ) : null}\n </span>\n </button>\n\n {(switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) && (\n <div className=\"px-2.5 pt-1 text-[11px] text-destructive\">\n {\n (\n (switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) as Error\n ).message\n }\n </div>\n )}\n </>\n )}\n\n {mode === \"create\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const name = newName.trim();\n if (!name) return;\n try {\n await createOrg.mutateAsync(name);\n handleOpenChange(false);\n } catch {\n /* error surfaced via createOrg.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n New organization\n </div>\n <input\n autoFocus\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n placeholder=\"Organization name\"\n disabled={createOrg.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {createOrg.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(createOrg.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={createOrg.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={createOrg.isPending || !newName.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {createOrg.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Create\"\n )}\n </button>\n </div>\n </form>\n )}\n\n {mode === \"invite\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const email = inviteEmail.trim();\n if (!email) return;\n try {\n await inviteMember.mutateAsync(email);\n setInviteEmail(\"\");\n setMode(\"list\");\n } catch {\n /* error surfaced via inviteMember.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n Invite to {org.orgName}\n </div>\n <input\n autoFocus\n type=\"email\"\n value={inviteEmail}\n onChange={(e) => setInviteEmail(e.target.value)}\n placeholder=\"teammate@company.com\"\n disabled={inviteMember.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {inviteMember.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(inviteMember.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={inviteMember.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={inviteMember.isPending || !inviteEmail.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {inviteMember.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Send invite\"\n )}\n </button>\n </div>\n </form>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"OrgSwitcher.js","sourceRoot":"","sources":["../../../src/client/org/OrgSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,G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AC,CACF,aAAa,CACd,GACM,IACL,IACD,CACR,IACwB,GACH,IACJ,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { useState } from \"react\";\nimport { useNavigate } from \"react-router\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport {\n IconApps,\n IconArrowUpRight,\n IconBrain,\n IconBrandJira,\n IconBrush,\n IconBuilding,\n IconCalendar,\n IconCalendarTime,\n IconChartBar,\n IconCheck,\n IconChevronRight,\n IconClipboardList,\n IconCode,\n IconContract,\n IconFileText,\n IconLoader2,\n IconLogout,\n IconMail,\n IconMessageCircle,\n IconMicrophone,\n IconNote,\n IconPhone,\n IconPhoto,\n IconPlus,\n IconPresentation,\n IconScreenShare,\n IconSelector,\n IconSettings,\n IconStack2,\n IconUser,\n IconUserPlus,\n IconUsers,\n IconVideo,\n IconWorld,\n} from \"@tabler/icons-react\";\nimport {\n useOrg,\n useSwitchOrg,\n useCreateOrg,\n useInviteMember,\n useAcceptInvitation,\n useJoinByDomain,\n} from \"./hooks.js\";\nimport { agentNativePath } from \"../api-path.js\";\nimport {\n ORG_SWITCHER_MAX_APP_LINKS,\n useOrgSwitcherAppLinks,\n visibleOrgAppLinks,\n type OrgSwitcherAppLink,\n} from \"./workspace-app-links.js\";\n\nexport interface OrgSwitcherProps {\n className?: string;\n /** Hide entirely when the user only belongs to one org. Default: false. */\n hideWhenSingle?: boolean;\n /** Keep the switcher's button height reserved while org state is loading. */\n reserveSpace?: boolean;\n /**\n * Path to navigate to when the user clicks \"Organization settings\".\n * Defaults to `/team`, the standard organization-management route. Templates\n * with an established org surface can pass their own path; pass `null` to\n * only open the in-sidebar settings panel.\n */\n settingsPath?: string | null;\n}\n\nfunction personalLabelFromEmail(email: string | null | undefined): string {\n if (!email) return \"Personal\";\n const local = email.split(\"@\")[0] ?? email;\n const cleaned = local.replace(/[._-]+/g, \" \").trim();\n if (!cleaned) return \"Personal\";\n return cleaned\n .split(\" \")\n .filter(Boolean)\n .map((w) => w.charAt(0).toUpperCase() + w.slice(1))\n .join(\" \");\n}\n\ntype Mode = \"list\" | \"create\" | \"invite\";\n\nconst POPOVER_CONTENT_CLASS =\n \"z-50 min-w-[14rem] rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst ITEM_CLASS =\n \"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-foreground hover:bg-accent focus-visible:bg-accent focus:outline-none disabled:opacity-50 disabled:pointer-events-none\";\n\nconst SECTION_LABEL_CLASS =\n \"px-2.5 pt-1 pb-0.5 text-[10px] uppercase tracking-wide text-muted-foreground\";\n\nconst APP_SUBMENU_CONTENT_CLASS =\n \"z-50 w-72 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\";\n\nconst DEFAULT_ORGANIZATION_SETTINGS_PATH = \"/team\";\n\nconst APP_ICON_MAP: Record<string, typeof IconApps> = {\n Mail: IconMail,\n CalendarDays: IconCalendar,\n FileText: IconFileText,\n BarChart2: IconChartBar,\n GalleryHorizontal: IconPresentation,\n Video: IconVideo,\n BrandJira: IconBrandJira,\n ClipboardList: IconClipboardList,\n Users: IconUsers,\n Code: IconCode,\n Contract: IconContract,\n MessageCircle: IconMessageCircle,\n ScreenShare: IconScreenShare,\n Brush: IconBrush,\n Brain: IconBrain,\n Phone: IconPhone,\n Note: IconNote,\n Microphone: IconMicrophone,\n CalendarTime: IconCalendarTime,\n Globe: IconWorld,\n Photo: IconPhoto,\n};\n\nfunction appMenuIcon(app: OrgSwitcherAppLink): typeof IconApps {\n if (app.icon) return APP_ICON_MAP[app.icon] ?? IconStack2;\n return app.isDispatch ? IconMessageCircle : IconStack2;\n}\n\nfunction organizationSettingsPath(path: string): string {\n return `${path.replace(/#.*$/, \"\")}#workspace-settings`;\n}\n\nfunction AppMenuLink({\n app,\n onNavigate,\n}: {\n app: OrgSwitcherAppLink;\n onNavigate: () => void;\n}) {\n const Icon = appMenuIcon(app);\n return (\n <a\n href={app.href}\n onClick={onNavigate}\n className={`flex items-center gap-2 rounded-sm px-2.5 py-2 text-xs outline-none hover:bg-accent focus:bg-accent ${\n app.isDispatch ? \"border border-primary/20 bg-primary/5\" : \"\"\n }`}\n >\n <span\n className={`flex h-7 w-7 shrink-0 items-center justify-center rounded-md ${\n app.isDispatch\n ? \"bg-primary text-primary-foreground\"\n : \"bg-muted text-muted-foreground\"\n }`}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block truncate font-medium text-foreground\">\n {app.name}\n </span>\n <span className=\"block truncate text-[11px] text-muted-foreground\">\n {app.isDispatch\n ? \"Main hub\"\n : app.status === \"pending\"\n ? \"Building\"\n : \"Open app\"}\n </span>\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n );\n}\n\nfunction AppsSubmenu({\n apps,\n isWorkspace,\n isLoading,\n dispatchHref,\n dispatchAllAppsHref,\n onNavigate,\n}: {\n apps: OrgSwitcherAppLink[];\n isWorkspace: boolean;\n isLoading: boolean;\n dispatchHref: string;\n dispatchAllAppsHref: string;\n onNavigate: () => void;\n}) {\n const { links, overflowCount } = visibleOrgAppLinks(apps);\n const visibleDispatchApp = links.find((app) => app.isDispatch);\n const dispatchApp =\n visibleDispatchApp ??\n ({\n id: \"dispatch\",\n name: \"Dispatch\",\n href: dispatchHref,\n isDispatch: true,\n status: \"ready\",\n } satisfies OrgSwitcherAppLink);\n const visibleNonDispatch = links\n .filter((app) => !app.isDispatch)\n .slice(0, visibleDispatchApp ? undefined : ORG_SWITCHER_MAX_APP_LINKS - 1);\n const shownCount = (dispatchApp ? 1 : 0) + visibleNonDispatch.length;\n const remainingCount = Math.max(overflowCount, apps.length - shownCount);\n\n return (\n <PopoverPrimitive.Root>\n <PopoverPrimitive.Trigger asChild>\n <button type=\"button\" className={`${ITEM_CLASS} cursor-pointer`}>\n <IconApps className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-start\">Apps</span>\n <span className=\"text-[11px] text-muted-foreground\">\n {isLoading ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n apps.length\n )}\n </span>\n <IconChevronRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground rtl:-scale-x-100\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"right\"\n align=\"start\"\n sideOffset={8}\n collisionPadding={12}\n className={APP_SUBMENU_CONTENT_CLASS}\n >\n <div className=\"px-2.5 py-1.5\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">\n {isWorkspace ? \"Workspace apps\" : \"Default apps\"}\n </div>\n <div className=\"mt-0.5 text-[11px] text-muted-foreground\">\n {isWorkspace\n ? \"Dispatch is the workspace hub.\"\n : \"Dispatch is the home base.\"}\n </div>\n </div>\n\n <AppMenuLink app={dispatchApp} onNavigate={onNavigate} />\n\n {visibleNonDispatch.length > 0 && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n {visibleNonDispatch.map((app) => (\n <AppMenuLink key={app.id} app={app} onNavigate={onNavigate} />\n ))}\n\n {remainingCount > 0 && (\n <>\n <div className=\"my-1 h-px bg-border\" />\n <a\n href={dispatchAllAppsHref}\n onClick={onNavigate}\n className=\"flex items-center gap-2 rounded-sm px-2.5 py-1.5 text-xs text-foreground outline-none hover:bg-accent focus:bg-accent\"\n >\n <IconMessageCircle className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1\">\n {`View ${remainingCount} more in Dispatch`}\n </span>\n <IconArrowUpRight className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n </a>\n </>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n\n/**\n * Compact org switcher button. Shows the active org (or \"Personal\" when the\n * user has none); opens a popover with the user's other orgs, pending\n * invitations, inline forms to create a new org / invite a teammate, and a\n * sign-out item. Renders nothing in dev / no-auth mode.\n */\nexport function OrgSwitcher({\n className,\n hideWhenSingle,\n reserveSpace,\n settingsPath = DEFAULT_ORGANIZATION_SETTINGS_PATH,\n}: OrgSwitcherProps) {\n const { data: org, isLoading } = useOrg();\n const switchOrg = useSwitchOrg();\n const createOrg = useCreateOrg();\n const inviteMember = useInviteMember();\n const acceptInvitation = useAcceptInvitation();\n const joinByDomain = useJoinByDomain();\n const navigate = useNavigate();\n const [open, setOpen] = useState(false);\n const [mode, setMode] = useState<Mode>(\"list\");\n const [newName, setNewName] = useState(\"\");\n const [inviteEmail, setInviteEmail] = useState(\"\");\n const [signingOut, setSigningOut] = useState(false);\n const [joiningOrgId, setJoiningOrgId] = useState<string | null>(null);\n const appLinks = useOrgSwitcherAppLinks(open);\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) {\n setMode(\"list\");\n setNewName(\"\");\n setInviteEmail(\"\");\n }\n };\n\n const handleSignOut = async () => {\n if (signingOut) return;\n setSigningOut(true);\n try {\n await fetch(agentNativePath(\"/_agent-native/auth/logout\"), {\n method: \"POST\",\n credentials: \"include\",\n });\n } catch {\n /* fall through to reload — server may already have cleared the cookie */\n }\n window.location.reload();\n };\n\n if (!org) {\n return reserveSpace && isLoading ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const orgs = org.orgs ?? [];\n const pendingInvitations = org.pendingInvitations ?? [];\n const domainMatches = org.domainMatches ?? [];\n const orgCount = orgs.length;\n const hasAny =\n orgCount > 0 || pendingInvitations.length > 0 || domainMatches.length > 0;\n if (!hasAny && !org.email) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n if (\n hideWhenSingle &&\n orgCount < 2 &&\n pendingInvitations.length === 0 &&\n domainMatches.length === 0\n ) {\n return reserveSpace ? (\n <div aria-hidden=\"true\" className={`h-8 ${className ?? \"\"}`} />\n ) : null;\n }\n\n const canInvite =\n !!org.orgId && (org.role === \"owner\" || org.role === \"admin\");\n\n const personalLabel = personalLabelFromEmail(org.email);\n const inOrg = !!org.orgId;\n const buttonLabel = org.orgName ?? \"Personal\";\n const ButtonIcon = inOrg ? IconBuilding : IconUser;\n const organizationSettingsHref = settingsPath\n ? organizationSettingsPath(settingsPath)\n : null;\n\n return (\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <PopoverPrimitive.Trigger asChild>\n <button\n type=\"button\"\n className={`flex w-full items-center gap-2 rounded-md border border-border/50 px-2.5 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent/50 hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring cursor-pointer ${className ?? \"\"}`}\n >\n <ButtonIcon className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-start\">{buttonLabel}</span>\n <IconSelector className=\"h-3 w-3 shrink-0 opacity-50\" />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n side=\"top\"\n align=\"start\"\n sideOffset={6}\n collisionPadding={12}\n className={POPOVER_CONTENT_CLASS}\n onOpenAutoFocus={(e) => {\n // Don't auto-focus the first item — feels heavy on a switcher.\n if (mode === \"list\") e.preventDefault();\n }}\n >\n {mode === \"list\" && (\n <>\n {!inOrg && (\n <div\n className=\"flex w-full items-center gap-2 px-2.5 py-1.5 text-xs text-muted-foreground\"\n aria-disabled=\"true\"\n >\n <IconUser className=\"h-3.5 w-3.5 shrink-0\" />\n <span className=\"truncate flex-1 text-start\">\n Personal ({personalLabel})\n </span>\n </div>\n )}\n {orgs.length > 0 && (\n <div className={SECTION_LABEL_CLASS}>Organizations</div>\n )}\n {orgs.map((o) => (\n <button\n key={o.orgId}\n type=\"button\"\n onClick={async () => {\n if (o.orgId === org.orgId) {\n setOpen(false);\n return;\n }\n try {\n await switchOrg.mutateAsync(o.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via switchOrg.error */\n }\n }}\n disabled={switchOrg.isPending}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-start\">\n {o.orgName}\n </span>\n {o.orgId === org.orgId && (\n <IconCheck className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n )}\n </button>\n ))}\n\n {pendingInvitations.length > 0 && (\n <>\n {orgs.length > 0 && <div className=\"my-1 h-px bg-border\" />}\n <div className={SECTION_LABEL_CLASS}>Invitations</div>\n {pendingInvitations.map((inv) => (\n <div\n key={inv.id}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {inv.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n try {\n await acceptInvitation.mutateAsync(inv.id);\n setOpen(false);\n } catch {\n /* error surfaced via acceptInvitation.error */\n }\n }}\n disabled={acceptInvitation.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {acceptInvitation.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n ))}\n </>\n )}\n\n {domainMatches.length > 0 && (\n <>\n {(orgs.length > 0 || pendingInvitations.length > 0) && (\n <div className=\"my-1 h-px bg-border\" />\n )}\n <div className={SECTION_LABEL_CLASS}>Join your team</div>\n {domainMatches.map((match) => {\n const isJoining =\n joinByDomain.isPending && joiningOrgId === match.orgId;\n return (\n <div\n key={match.orgId}\n className=\"flex items-center gap-2 px-2.5 py-1.5 text-xs\"\n >\n <IconBuilding className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"truncate flex-1 text-foreground\">\n {match.orgName}\n </span>\n <button\n type=\"button\"\n onClick={async () => {\n setJoiningOrgId(match.orgId);\n try {\n await joinByDomain.mutateAsync(match.orgId);\n setOpen(false);\n } catch {\n /* error surfaced via joinByDomain.error */\n } finally {\n setJoiningOrgId(null);\n }\n }}\n disabled={joinByDomain.isPending}\n className=\"rounded px-1.5 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/10 disabled:opacity-50 cursor-pointer\"\n >\n {isJoining ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Join\"\n )}\n </button>\n </div>\n );\n })}\n </>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <AppsSubmenu\n apps={appLinks.apps}\n isWorkspace={appLinks.isWorkspace}\n isLoading={appLinks.isLoading}\n dispatchHref={appLinks.dispatchHref}\n dispatchAllAppsHref={appLinks.dispatchAllAppsHref}\n onNavigate={() => setOpen(false)}\n />\n {inOrg && (\n <button\n type=\"button\"\n onClick={() => {\n setOpen(false);\n window.dispatchEvent(new CustomEvent(\"agent-panel:open\"));\n window.dispatchEvent(\n new CustomEvent(\"agent-panel:open-settings\", {\n detail: { section: \"workspace-settings\" },\n }),\n );\n if (organizationSettingsHref) {\n navigate(organizationSettingsHref);\n }\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconSettings className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-start\">\n Organization settings\n </span>\n </button>\n )}\n <button\n type=\"button\"\n onClick={() => {\n // Clear any leftover input from a prior session — otherwise\n // the create form re-opens prefilled with the just-created\n // org's name and looks like a create dialog for the new org.\n setNewName(\"\");\n setMode(\"create\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-start\">Create organization</span>\n </button>\n {canInvite && (\n <button\n type=\"button\"\n onClick={() => {\n setInviteEmail(\"\");\n setMode(\"invite\");\n }}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n <IconUserPlus className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground\" />\n <span className=\"flex-1 text-start\">Invite member</span>\n </button>\n )}\n\n <div className=\"my-1 h-px bg-border\" />\n <button\n type=\"button\"\n onClick={handleSignOut}\n disabled={signingOut}\n className={`${ITEM_CLASS} cursor-pointer`}\n >\n {signingOut ? (\n <IconLoader2 className=\"h-3.5 w-3.5 shrink-0 animate-spin text-muted-foreground\" />\n ) : (\n <IconLogout className=\"h-3.5 w-3.5 shrink-0 text-muted-foreground rtl:-scale-x-100\" />\n )}\n <span className=\"flex-1 text-start\">\n Sign out\n {org.email ? (\n <span className=\"ms-1 text-muted-foreground\">\n ({org.email})\n </span>\n ) : null}\n </span>\n </button>\n\n {(switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) && (\n <div className=\"px-2.5 pt-1 text-[11px] text-destructive\">\n {\n (\n (switchOrg.error ||\n acceptInvitation.error ||\n joinByDomain.error) as Error\n ).message\n }\n </div>\n )}\n </>\n )}\n\n {mode === \"create\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const name = newName.trim();\n if (!name) return;\n try {\n await createOrg.mutateAsync(name);\n handleOpenChange(false);\n } catch {\n /* error surfaced via createOrg.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n New organization\n </div>\n <input\n autoFocus\n value={newName}\n onChange={(e) => setNewName(e.target.value)}\n placeholder=\"Organization name\"\n disabled={createOrg.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {createOrg.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(createOrg.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={createOrg.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={createOrg.isPending || !newName.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {createOrg.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Create\"\n )}\n </button>\n </div>\n </form>\n )}\n\n {mode === \"invite\" && (\n <form\n onSubmit={async (e) => {\n e.preventDefault();\n const email = inviteEmail.trim();\n if (!email) return;\n try {\n await inviteMember.mutateAsync(email);\n setInviteEmail(\"\");\n setMode(\"list\");\n } catch {\n /* error surfaced via inviteMember.error */\n }\n }}\n className=\"px-2 py-1.5\"\n >\n <div className=\"px-0.5 pb-1 text-[10px] uppercase tracking-wide text-muted-foreground\">\n Invite to {org.orgName}\n </div>\n <input\n autoFocus\n type=\"email\"\n value={inviteEmail}\n onChange={(e) => setInviteEmail(e.target.value)}\n placeholder=\"teammate@company.com\"\n disabled={inviteMember.isPending}\n className=\"w-full rounded-md border border-input bg-background px-2 py-1.5 text-xs outline-none focus:ring-2 focus:ring-ring disabled:opacity-50\"\n />\n {inviteMember.error && (\n <div className=\"pt-1 text-[11px] text-destructive\">\n {(inviteMember.error as Error).message}\n </div>\n )}\n <div className=\"flex items-center gap-1.5 pt-1.5\">\n <button\n type=\"button\"\n onClick={() => setMode(\"list\")}\n disabled={inviteMember.isPending}\n className=\"flex-1 rounded-md px-2 py-1 text-xs text-muted-foreground hover:bg-accent disabled:opacity-50 cursor-pointer\"\n >\n Cancel\n </button>\n <button\n type=\"submit\"\n disabled={inviteMember.isPending || !inviteEmail.trim()}\n className=\"flex flex-1 items-center justify-center rounded-md bg-primary px-2 py-1 text-xs font-medium text-primary-foreground hover:opacity-90 disabled:opacity-50 cursor-pointer\"\n >\n {inviteMember.isPending ? (\n <IconLoader2 className=\"h-3 w-3 animate-spin\" />\n ) : (\n \"Send invite\"\n )}\n </button>\n </div>\n </form>\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n );\n}\n"]}
|
|
@@ -233,7 +233,7 @@ function BulkInviteForm({ currentUserRole, onClose, }) {
|
|
|
233
233
|
setPasteOpen(false);
|
|
234
234
|
}, className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground", children: "Cancel" })] })] })), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("button", { type: "button", disabled: validDrafts.length === 0 || bulkInvite.isPending, onClick: submit, className: "rounded-md bg-foreground px-3 py-1.5 text-xs font-medium text-background hover:opacity-90 disabled:opacity-50", children: bulkInvite.isPending ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsxs("span", { className: "inline-flex items-center gap-1", children: [_jsx(IconCheck, { className: "h-3.5 w-3.5" }), "Send ", validDrafts.length || "", " ", validDrafts.length === 1 ? "invite" : "invites"] })) }), _jsx("button", { type: "button", onClick: onClose, className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-muted-foreground hover:text-foreground", children: "Close" })] }), _jsxs("p", { className: "text-[11px] text-muted-foreground", children: ["Each invitee signs in with this exact email to accept.", canSetAdmin
|
|
235
235
|
? " Admins can manage members and workspace settings."
|
|
236
|
-
: " Only the organization owner can grant admin access."] }), resultBanner && (_jsxs("div", { className: "space-y-1 rounded-md border border-border bg-accent/30 p-2.5", children: [resultBanner.succeeded > 0 && (_jsxs("p", { className: "text-[11px] text-green-600", children: [_jsx(IconCheck, { className: "inline h-3 w-3 -mt-0.5" }), " Sent", " ", resultBanner.succeeded, " ", resultBanner.succeeded === 1 ? "invite" : "invites", "."] })), resultBanner.failed.length > 0 && (_jsx("ul", { className: "space-y-0.5 text-[11px] text-red-500", children: resultBanner.failed.map((f) => (_jsxs("li", { children: [_jsx(IconAlertTriangle, { className: "inline h-3 w-3 -mt-0.5
|
|
236
|
+
: " Only the organization owner can grant admin access."] }), resultBanner && (_jsxs("div", { className: "space-y-1 rounded-md border border-border bg-accent/30 p-2.5", children: [resultBanner.succeeded > 0 && (_jsxs("p", { className: "text-[11px] text-green-600", children: [_jsx(IconCheck, { className: "inline h-3 w-3 -mt-0.5" }), " Sent", " ", resultBanner.succeeded, " ", resultBanner.succeeded === 1 ? "invite" : "invites", "."] })), resultBanner.failed.length > 0 && (_jsx("ul", { className: "space-y-0.5 text-[11px] text-red-500", children: resultBanner.failed.map((f) => (_jsxs("li", { children: [_jsx(IconAlertTriangle, { className: "inline h-3 w-3 -mt-0.5 me-1" }), f.email, ": ", f.error] }, f.email))) }))] })), _jsx(ErrorText, { error: bulkInvite.error })] }));
|
|
237
237
|
}
|
|
238
238
|
function DomainSettingsSection({ domain, ownerEmail, }) {
|
|
239
239
|
const setOrgDomain = useSetOrgDomain();
|
|
@@ -316,7 +316,7 @@ function A2ASecretSection({ secret }) {
|
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
const masked = secret ? "****" + secret.slice(-8) : "Not set";
|
|
319
|
-
return (_jsxs("div", { className: "border-t border-border pt-3 space-y-2", children: [_jsx("div", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: "Cross-app authentication" }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "This secret authenticates cross-app delegation (e.g. Dispatch to Analytics). All apps in your organization need the same secret." }), _jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [_jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-sm font-mono", children: [_jsx(IconKey, { className: "h-3.5 w-3.5 text-muted-foreground" }), revealed && secret ? secret : masked] }), secret && (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setRevealed(!revealed), className: "text-muted-foreground hover:text-foreground", children: revealed ? (_jsx(IconEyeOff, { className: "h-3.5 w-3.5" })) : (_jsx(IconEye, { className: "h-3.5 w-3.5" })) }) }), _jsx(TooltipContent, { children: revealed ? "Hide secret" : "Reveal secret" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: copyToClipboard, className: "text-muted-foreground hover:text-foreground", children: copied ? (_jsx(IconCheck, { className: "h-3.5 w-3.5 text-green-500" })) : (_jsx(IconCopy, { className: "h-3.5 w-3.5" })) }) }), _jsx(TooltipContent, { children: "Copy secret" })] })] })), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "button", onClick: regenerate, disabled: setA2ASecret.isPending || syncA2ASecret.isPending, className: "inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium hover:bg-accent/50 disabled:opacity-50", children: [setA2ASecret.isPending ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(IconRefresh, { className: "h-3.5 w-3.5" })), "Regenerate"] }) }), _jsx(TooltipContent, { children: "Regenerate secret and sync to connected apps" })] }), secret && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "button", onClick: () => syncToApps(), disabled: setA2ASecret.isPending || syncA2ASecret.isPending, className: "inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium hover:bg-accent/50 disabled:opacity-50", children: [syncA2ASecret.isPending ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(IconCloudUpload, { className: "h-3.5 w-3.5" })), "Sync to apps"] }) }), _jsx(TooltipContent, { children: "Push this secret to every connected app" })] }))] }), syncA2ASecret.isPending && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Syncing to connected apps\u2026" })), syncResult && !syncA2ASecret.isPending && (_jsxs("div", { className: "space-y-1", children: [_jsxs("p", { className: "text-[11px] text-muted-foreground", children: ["Synced to ", syncResult.succeeded, "/", syncResult.total, " app", syncResult.total === 1 ? "" : "s", syncResult.failed > 0 ? ` (${syncResult.failed} failed)` : "", "."] }), syncResult.failed > 0 && (_jsx("ul", { className: "text-[11px] text-red-500 list-disc
|
|
319
|
+
return (_jsxs("div", { className: "border-t border-border pt-3 space-y-2", children: [_jsx("div", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: "Cross-app authentication" }), _jsx("p", { className: "text-[11px] text-muted-foreground", children: "This secret authenticates cross-app delegation (e.g. Dispatch to Analytics). All apps in your organization need the same secret." }), _jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [_jsxs("span", { className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-sm font-mono", children: [_jsx(IconKey, { className: "h-3.5 w-3.5 text-muted-foreground" }), revealed && secret ? secret : masked] }), secret && (_jsxs(_Fragment, { children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => setRevealed(!revealed), className: "text-muted-foreground hover:text-foreground", children: revealed ? (_jsx(IconEyeOff, { className: "h-3.5 w-3.5" })) : (_jsx(IconEye, { className: "h-3.5 w-3.5" })) }) }), _jsx(TooltipContent, { children: revealed ? "Hide secret" : "Reveal secret" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: copyToClipboard, className: "text-muted-foreground hover:text-foreground", children: copied ? (_jsx(IconCheck, { className: "h-3.5 w-3.5 text-green-500" })) : (_jsx(IconCopy, { className: "h-3.5 w-3.5" })) }) }), _jsx(TooltipContent, { children: "Copy secret" })] })] })), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "button", onClick: regenerate, disabled: setA2ASecret.isPending || syncA2ASecret.isPending, className: "inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium hover:bg-accent/50 disabled:opacity-50", children: [setA2ASecret.isPending ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(IconRefresh, { className: "h-3.5 w-3.5" })), "Regenerate"] }) }), _jsx(TooltipContent, { children: "Regenerate secret and sync to connected apps" })] }), secret && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "button", onClick: () => syncToApps(), disabled: setA2ASecret.isPending || syncA2ASecret.isPending, className: "inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium hover:bg-accent/50 disabled:opacity-50", children: [syncA2ASecret.isPending ? (_jsx(IconLoader2, { className: "h-3.5 w-3.5 animate-spin" })) : (_jsx(IconCloudUpload, { className: "h-3.5 w-3.5" })), "Sync to apps"] }) }), _jsx(TooltipContent, { children: "Push this secret to every connected app" })] }))] }), syncA2ASecret.isPending && (_jsx("p", { className: "text-[11px] text-muted-foreground", children: "Syncing to connected apps\u2026" })), syncResult && !syncA2ASecret.isPending && (_jsxs("div", { className: "space-y-1", children: [_jsxs("p", { className: "text-[11px] text-muted-foreground", children: ["Synced to ", syncResult.succeeded, "/", syncResult.total, " app", syncResult.total === 1 ? "" : "s", syncResult.failed > 0 ? ` (${syncResult.failed} failed)` : "", "."] }), syncResult.failed > 0 && (_jsx("ul", { className: "text-[11px] text-red-500 list-disc ps-5 space-y-0.5", children: syncResult.results
|
|
320
320
|
.filter((r) => !r.ok)
|
|
321
321
|
.map((r) => (_jsxs("li", { children: [r.name, ": ", r.error || `HTTP ${r.status ?? "?"}`] }, r.id))) }))] })), !pasteMode ? (_jsxs("button", { type: "button", onClick: () => setPasteMode(true), className: "flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium hover:bg-accent/50", children: [_jsx(IconKey, { className: "h-3.5 w-3.5" }), "Paste secret from another app"] })) : (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("input", { type: "text", value: pasteValue, onChange: (e) => setPasteValue(e.target.value), onKeyDown: (e) => {
|
|
322
322
|
if (e.key === "Enter")
|