@vetta-org/theme-ui 0.1.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/package.json +195 -0
- package/src/action-approval/AppearanceActionPickerView.tsx +291 -0
- package/src/action-approval/AppearanceApprovalDrawerView.tsx +69 -0
- package/src/action-approval/AppearancePickerApprovalView.tsx +31 -0
- package/src/action-approval/ApprovalParts.tsx +376 -0
- package/src/action-approval/BatchTasksApprovalFrameView.tsx +138 -0
- package/src/action-approval/BatchTasksExecutionApprovalView.tsx +158 -0
- package/src/action-approval/BatchTasksTaskApprovalView.tsx +152 -0
- package/src/action-approval/GeneralSetExecutionModeApprovalView.tsx +76 -0
- package/src/action-approval/GenericActionApprovalView.tsx +127 -0
- package/src/action-approval/ManageActionApprovalFrameTypes.ts +27 -0
- package/src/action-approval/ManageActionApprovalFrameView.tsx +136 -0
- package/src/action-approval/NavigationOpenApprovalView.tsx +119 -0
- package/src/action-approval/SchedulerActionApprovalDialogView.tsx +191 -0
- package/src/action-approval/SchedulerEditApprovalDrawerView.tsx +113 -0
- package/src/action-approval/SchedulerUpdateApprovalView.tsx +14 -0
- package/src/action-approval/ThemeChangeApprovalView.tsx +30 -0
- package/src/action-approval/WebhookDeleteApprovalView.tsx +56 -0
- package/src/action-approval/WebhookTestApprovalView.tsx +51 -0
- package/src/action-approval/cn.ts +4 -0
- package/src/action-approval/index.ts +88 -0
- package/src/activity/ActivityPanel.tsx +269 -0
- package/src/activity/ActivityPanelFrame.tsx +36 -0
- package/src/activity/BackgroundTasksTabPanelView.tsx +382 -0
- package/src/activity/BatchProgressTabPanelView.tsx +22 -0
- package/src/activity/BrowserPanelView.tsx +169 -0
- package/src/activity/ChatTabPanelView.tsx +36 -0
- package/src/activity/CodePreview.tsx +57 -0
- package/src/activity/DebugTabPanelView.tsx +67 -0
- package/src/activity/FileTabContentView.tsx +46 -0
- package/src/activity/FloatingActivityTabView.tsx +107 -0
- package/src/activity/HtmlPreviewView.tsx +135 -0
- package/src/activity/JourneyPanelView.tsx +327 -0
- package/src/activity/KnowledgeHistoryPanelView.tsx +93 -0
- package/src/activity/MarkdownPreviewView.tsx +217 -0
- package/src/activity/PluginTabPickerView.tsx +182 -0
- package/src/activity/RequestHistorySubTabView.tsx +102 -0
- package/src/activity/ScheduleExecutionTabPanelView.tsx +162 -0
- package/src/activity/TodoTabPanelView.tsx +66 -0
- package/src/activity/ToolCallsSubTabView.tsx +184 -0
- package/src/activity/WorkflowTabPanelView.tsx +129 -0
- package/src/activity/index.ts +110 -0
- package/src/app/AppBackground.tsx +24 -0
- package/src/app/AppBootLoadingView.tsx +51 -0
- package/src/app/RouteContentLoadingView.tsx +20 -0
- package/src/app/index.ts +13 -0
- package/src/app-boot.ts +1 -0
- package/src/app-shell/DefaultPageHeader.tsx +46 -0
- package/src/app-shell/DefaultWindowControls.tsx +32 -0
- package/src/app-shell/PageHeaderActionGroup.tsx +15 -0
- package/src/app-shell/PageHeaderContent.tsx +70 -0
- package/src/app-shell/PageHeaderFrame.tsx +53 -0
- package/src/app-shell/PageHeaderSidebarTrigger.tsx +21 -0
- package/src/app-shell/PageHeaderTitle.tsx +25 -0
- package/src/app-shell/PageHeaderWindowActions.tsx +22 -0
- package/src/app-shell/WindowControlButton.tsx +35 -0
- package/src/app-shell/index.ts +49 -0
- package/src/appearance/BackgroundImageFrame.tsx +57 -0
- package/src/appearance/CenterSliceImageFrame.tsx +64 -0
- package/src/appearance/CornerImageFrame.tsx +63 -0
- package/src/appearance/HorizontalSliceImageFrame.tsx +97 -0
- package/src/appearance/NineSliceImageFrame.tsx +65 -0
- package/src/appearance/ThemeSurface.tsx +91 -0
- package/src/appearance/index.ts +12 -0
- package/src/batch-tasks/BatchProjectArtifactFieldView.tsx +36 -0
- package/src/batch-tasks/BatchProjectDialogView.tsx +61 -0
- package/src/batch-tasks/BatchProjectFoldersFieldView.tsx +108 -0
- package/src/batch-tasks/BatchProjectGroupView.tsx +77 -0
- package/src/batch-tasks/BatchProjectNameFieldView.tsx +29 -0
- package/src/batch-tasks/BatchProjectNotificationFieldView.tsx +42 -0
- package/src/batch-tasks/BatchProjectRuntimeFieldsView.tsx +67 -0
- package/src/batch-tasks/BatchTaskActionButtonsView.tsx +67 -0
- package/src/batch-tasks/BatchTaskCardView.tsx +142 -0
- package/src/batch-tasks/BatchTaskGridView.tsx +95 -0
- package/src/batch-tasks/BatchTaskListView.tsx +10 -0
- package/src/batch-tasks/BatchTaskProjectActionsView.tsx +73 -0
- package/src/batch-tasks/BatchTaskProjectBlockView.tsx +117 -0
- package/src/batch-tasks/BatchTaskProjectHeaderView.tsx +74 -0
- package/src/batch-tasks/BatchTasksPageView.tsx +126 -0
- package/src/batch-tasks/batchTaskUi.tsx +101 -0
- package/src/batch-tasks/index.ts +70 -0
- package/src/batch-tasks/types.ts +120 -0
- package/src/chat/ActionButtonBarView.tsx +45 -0
- package/src/chat/AgentAvatarView.tsx +59 -0
- package/src/chat/AppshotCardView.tsx +89 -0
- package/src/chat/AskUserQuestionView.tsx +177 -0
- package/src/chat/AssistantMessageView.tsx +147 -0
- package/src/chat/AtPanelView.tsx +220 -0
- package/src/chat/BackgroundTasksBadgeView.tsx +28 -0
- package/src/chat/BashTerminalCard.tsx +225 -0
- package/src/chat/ChatExportHostView.tsx +17 -0
- package/src/chat/ChatHeaderActionsView.tsx +75 -0
- package/src/chat/ContextRingView.tsx +100 -0
- package/src/chat/CopyIconButton.tsx +61 -0
- package/src/chat/DefaultGuidingWords.tsx +75 -0
- package/src/chat/DefaultSceneCarousel.tsx +113 -0
- package/src/chat/DefaultSkillBadgeRow.tsx +103 -0
- package/src/chat/DrawerCard.tsx +149 -0
- package/src/chat/EditDiffView.tsx +137 -0
- package/src/chat/ExecutionModeSelectorView.tsx +124 -0
- package/src/chat/ExportMessageListView.tsx +20 -0
- package/src/chat/GuideBadgeSwiperView.tsx +79 -0
- package/src/chat/InlineTokenChip.tsx +68 -0
- package/src/chat/InputActionBarView.tsx +112 -0
- package/src/chat/InputBarBackground.tsx +25 -0
- package/src/chat/InputBarCapsule.tsx +56 -0
- package/src/chat/InputBarContextMenuView.tsx +79 -0
- package/src/chat/InputBarPlaceholder.tsx +84 -0
- package/src/chat/InputBarToolbarButton.tsx +42 -0
- package/src/chat/KnowledgeToolViews.tsx +119 -0
- package/src/chat/LiveThinkingView.tsx +102 -0
- package/src/chat/MessageActions.tsx +109 -0
- package/src/chat/MessageBlockSegmentsView.tsx +203 -0
- package/src/chat/MessageBoundaryViews.tsx +93 -0
- package/src/chat/MessageCardsView.tsx +126 -0
- package/src/chat/MessageFeedContext.tsx +14 -0
- package/src/chat/MessageFeedLayoutView.tsx +97 -0
- package/src/chat/MessageFeedView.tsx +228 -0
- package/src/chat/MessageInputView.tsx +193 -0
- package/src/chat/MessageLayoutView.tsx +156 -0
- package/src/chat/MessageListFooterView.tsx +127 -0
- package/src/chat/MessageSelectionContextMenuView.tsx +66 -0
- package/src/chat/MessageTimelineView.tsx +261 -0
- package/src/chat/MessageView.tsx +82 -0
- package/src/chat/MessageVisualView.tsx +43 -0
- package/src/chat/ModelSelectorView.tsx +407 -0
- package/src/chat/NewSession.ts +107 -0
- package/src/chat/NewSessionBackground.tsx +54 -0
- package/src/chat/NewSessionPageLayoutView.tsx +96 -0
- package/src/chat/NewSessionPicker.tsx +270 -0
- package/src/chat/ProgressGroupView.tsx +323 -0
- package/src/chat/ProjectSelectorView.tsx +253 -0
- package/src/chat/QueueCardView.tsx +151 -0
- package/src/chat/ReadImageView.tsx +73 -0
- package/src/chat/SandboxGrantsBadgeView.tsx +101 -0
- package/src/chat/SandboxPermissionCard.tsx +64 -0
- package/src/chat/SceneCard.tsx +138 -0
- package/src/chat/SendButton.tsx +135 -0
- package/src/chat/SessionDropZoneView.tsx +85 -0
- package/src/chat/SessionViewerPageView.tsx +56 -0
- package/src/chat/SkillCard.tsx +56 -0
- package/src/chat/SkillPromptAreaView.tsx +129 -0
- package/src/chat/SuggestionBubblesView.tsx +58 -0
- package/src/chat/TextBlockView.tsx +770 -0
- package/src/chat/TextPreview.tsx +37 -0
- package/src/chat/ThinkingBlockView.tsx +183 -0
- package/src/chat/TodoCard.tsx +243 -0
- package/src/chat/TodoProgress.tsx +205 -0
- package/src/chat/TodoStatusBarView.tsx +140 -0
- package/src/chat/ToolCallBlockView.tsx +188 -0
- package/src/chat/UsageBarView.tsx +19 -0
- package/src/chat/UserMessageContextMenuView.tsx +87 -0
- package/src/chat/UserMessageView.tsx +241 -0
- package/src/chat/WorkflowFooterItemsView.tsx +170 -0
- package/src/chat/WriteContentView.tsx +12 -0
- package/src/chat/index.ts +524 -0
- package/src/chat/markdown-link.test.ts +238 -0
- package/src/chat/markdown-link.ts +279 -0
- package/src/chat/send-button.css +318 -0
- package/src/chat/useHorizontalDragScroll.ts +146 -0
- package/src/file-explorer/ConfirmDeleteDialogView.tsx +62 -0
- package/src/file-explorer/FileContextMenuView.tsx +209 -0
- package/src/file-explorer/FileTreeCreateRow.tsx +82 -0
- package/src/file-explorer/FileTreeNodeView.tsx +274 -0
- package/src/file-explorer/FileTreeView.tsx +301 -0
- package/src/file-explorer/FilesPanelView.tsx +91 -0
- package/src/file-explorer/drag-target.test.ts +34 -0
- package/src/file-explorer/drag-target.ts +26 -0
- package/src/file-explorer/fileIcons.ts +1 -0
- package/src/file-explorer/index.ts +28 -0
- package/src/file-explorer/nativeFileDrag.test.ts +30 -0
- package/src/file-explorer/nativeFileDrag.ts +14 -0
- package/src/file-explorer/types.ts +40 -0
- package/src/file-explorer/useFileTreeMarqueeSelection.ts +115 -0
- package/src/file-preview/FilePreviewDialogView.tsx +241 -0
- package/src/file-preview/FilePreviewView.tsx +162 -0
- package/src/file-preview/LightboxImageView.tsx +131 -0
- package/src/file-preview/PluginFilePreviewView.tsx +24 -0
- package/src/file-preview/PreviewBodyView.tsx +99 -0
- package/src/file-preview/PreviewErrorBoundary.tsx +51 -0
- package/src/file-preview/TextCodeEditorView.tsx +72 -0
- package/src/file-preview/TextFileEditorView.tsx +213 -0
- package/src/file-preview/index.ts +56 -0
- package/src/file-preview/keyboard-target.test.ts +49 -0
- package/src/file-preview/keyboard-target.ts +33 -0
- package/src/file-preview/syntax-tokens.css +77 -0
- package/src/file-preview/syntax-tokens.test.ts +31 -0
- package/src/file-preview/syntax-tokens.ts +155 -0
- package/src/file-preview/text-code-editor-theme.ts +321 -0
- package/src/file-preview/text-editor-language.test.ts +58 -0
- package/src/file-preview/text-editor-language.ts +182 -0
- package/src/file-preview/types.ts +29 -0
- package/src/flowing/FlowingPanelView.tsx +79 -0
- package/src/flowing/FlowingWorkflowView.tsx +54 -0
- package/src/flowing/UserNodeView.tsx +148 -0
- package/src/flowing/WorkflowBindDialogView.tsx +145 -0
- package/src/flowing/WorkflowProgressView.tsx +149 -0
- package/src/flowing/index.ts +27 -0
- package/src/flowing-chat/ChatBubbleView.tsx +219 -0
- package/src/flowing-chat/ChatComposerView.tsx +362 -0
- package/src/flowing-chat/ChatMembersBarView.tsx +86 -0
- package/src/flowing-chat/ChatPanelView.tsx +73 -0
- package/src/flowing-chat/index.ts +21 -0
- package/src/index.ts +22 -0
- package/src/knowledge/KnowledgeBaseSwitcherView.tsx +154 -0
- package/src/knowledge/KnowledgeBreadcrumbView.tsx +92 -0
- package/src/knowledge/KnowledgeContentsPanelView.tsx +77 -0
- package/src/knowledge/KnowledgeContextMenuView.tsx +70 -0
- package/src/knowledge/KnowledgeFilesSkeleton.tsx +22 -0
- package/src/knowledge/KnowledgeGridView.tsx +113 -0
- package/src/knowledge/KnowledgeHowItWorksDialogView.tsx +85 -0
- package/src/knowledge/KnowledgeImportDialogView.tsx +153 -0
- package/src/knowledge/KnowledgeListView.tsx +107 -0
- package/src/knowledge/KnowledgePendingFilesDialogView.tsx +76 -0
- package/src/knowledge/KnowledgeProcessingBadgeView.tsx +18 -0
- package/src/knowledge/KnowledgeRenameDialogView.tsx +66 -0
- package/src/knowledge/KnowledgeSourcePickerView.tsx +60 -0
- package/src/knowledge/KnowledgeViewShared.tsx +103 -0
- package/src/knowledge/cn.ts +4 -0
- package/src/knowledge/coloredFileIcons.ts +1 -0
- package/src/knowledge/index.ts +66 -0
- package/src/knowledge/types.ts +31 -0
- package/src/knowledge/useMarqueeSelection.ts +95 -0
- package/src/layout/AppFrame.tsx +34 -0
- package/src/layout/MainContentFrame.tsx +54 -0
- package/src/layout/ResizeHandle.tsx +91 -0
- package/src/layout/SidebarDock.tsx +33 -0
- package/src/layout/SidebarOverlay.tsx +36 -0
- package/src/layout/index.ts +10 -0
- package/src/overlays/CommandMenuRow.tsx +119 -0
- package/src/overlays/CommandMenuView.tsx +183 -0
- package/src/overlays/ConfirmDialogView.tsx +109 -0
- package/src/overlays/DetailDrawer.tsx +63 -0
- package/src/overlays/DetailDrawerEnter.tsx +37 -0
- package/src/overlays/KnowledgeDropOverlayView.tsx +43 -0
- package/src/overlays/RouteErrorPageView.tsx +72 -0
- package/src/overlays/ToasterView.tsx +76 -0
- package/src/overlays/UpdateCheckerView.tsx +206 -0
- package/src/overlays/UpdateRestartDialogView.tsx +107 -0
- package/src/overlays/command-menu-types.ts +47 -0
- package/src/overlays/command-menu.css +69 -0
- package/src/overlays/detail-drawer-guard.test.ts +16 -0
- package/src/overlays/detail-drawer-guard.ts +13 -0
- package/src/overlays/index.ts +44 -0
- package/src/plugin-ui/index.ts +26 -0
- package/src/project/BatchQueueStatusView.tsx +352 -0
- package/src/project/ConversationTagDotsView.tsx +130 -0
- package/src/project/ConversationTagEditorDialogView.tsx +273 -0
- package/src/project/DefaultConversationSectionView.tsx +74 -0
- package/src/project/DefaultSessionListView.tsx +128 -0
- package/src/project/DefaultSessionRowView.tsx +125 -0
- package/src/project/NewProjectDialogView.tsx +140 -0
- package/src/project/ProjectContextMenuView.tsx +187 -0
- package/src/project/ProjectDetailPageView.tsx +351 -0
- package/src/project/ProjectGroupView.tsx +37 -0
- package/src/project/ProjectRowView.tsx +111 -0
- package/src/project/ProjectSessionsLoadingView.tsx +14 -0
- package/src/project/ProjectSessionsView.tsx +96 -0
- package/src/project/ProjectsLoadingView.tsx +15 -0
- package/src/project/ProjectsPanelMenusView.tsx +23 -0
- package/src/project/ProjectsPanelView.tsx +56 -0
- package/src/project/QuickScrollOverlay.tsx +188 -0
- package/src/project/ScheduleStatusView.tsx +110 -0
- package/src/project/SessionContextMenuView.tsx +71 -0
- package/src/project/SessionRenameInputView.tsx +49 -0
- package/src/project/SessionRowView.tsx +119 -0
- package/src/project/SidebarProjectsSectionView.tsx +35 -0
- package/src/project/index.ts +87 -0
- package/src/project/types.ts +21 -0
- package/src/project/useActiveSessionAutoScroll.ts +171 -0
- package/src/registry.ts +62 -0
- package/src/scheduler/AutomationPageView.tsx +159 -0
- package/src/scheduler/ExecutionHistoryView.tsx +179 -0
- package/src/scheduler/HistoryDrawerView.tsx +149 -0
- package/src/scheduler/TaskFormDialogView.tsx +60 -0
- package/src/scheduler/TaskListView.tsx +219 -0
- package/src/scheduler/index.ts +30 -0
- package/src/settings/AchievementNavigationButtonView.tsx +90 -0
- package/src/settings/AchievementPromotionDialogView.tsx +91 -0
- package/src/settings/AchievementSettingsView.tsx +44 -0
- package/src/settings/AppshotSettingsView.tsx +132 -0
- package/src/settings/ArchivedProjectsSettingsView.tsx +80 -0
- package/src/settings/BuiltinMcpSecretsDialogView.tsx +278 -0
- package/src/settings/BuiltinMcpSectionView.tsx +164 -0
- package/src/settings/EnvironmentSettingsView.tsx +176 -0
- package/src/settings/GeneralSettingsView.tsx +174 -0
- package/src/settings/ImChannelCardView.tsx +152 -0
- package/src/settings/ImChannelGuideDialogView.tsx +126 -0
- package/src/settings/ImFeishuDialogView.tsx +156 -0
- package/src/settings/ImLegacyImportBannerView.tsx +44 -0
- package/src/settings/ImLogDrawerView.tsx +75 -0
- package/src/settings/ImStatusBadgeView.tsx +39 -0
- package/src/settings/McpDefaultIcon.tsx +27 -0
- package/src/settings/McpJsonEditorView.tsx +56 -0
- package/src/settings/ModelsProviderFormView.tsx +128 -0
- package/src/settings/ModelsProvidersSectionView.tsx +52 -0
- package/src/settings/MotionSelect.tsx +125 -0
- package/src/settings/PermissionsSettingsView.tsx +106 -0
- package/src/settings/PetBubbleStylePreviewView.tsx +44 -0
- package/src/settings/PetSettingsView.tsx +165 -0
- package/src/settings/PresetProviderModelsListView.tsx +58 -0
- package/src/settings/PresetProviderRowView.tsx +302 -0
- package/src/settings/PresetProvidersSectionView.tsx +70 -0
- package/src/settings/QrBindDialogView.tsx +165 -0
- package/src/settings/QuickPanelSettingsSectionView.tsx +66 -0
- package/src/settings/RemoteMcpSectionView.tsx +192 -0
- package/src/settings/SettingChrome.tsx +104 -0
- package/src/settings/SettingsAiAssistButtonView.tsx +150 -0
- package/src/settings/SettingsAiAssistDialogView.tsx +251 -0
- package/src/settings/SettingsFormFields.tsx +121 -0
- package/src/settings/SettingsPageShellView.tsx +84 -0
- package/src/settings/SettingsSidebarView.tsx +133 -0
- package/src/settings/ShortcutRecorderView.tsx +88 -0
- package/src/settings/ShortcutsSettingsView.tsx +66 -0
- package/src/settings/SubscriptionActionsView.tsx +63 -0
- package/src/settings/SubscriptionCardsView.tsx +212 -0
- package/src/settings/TeamDetailView.tsx +148 -0
- package/src/settings/TeamDialogsView.tsx +151 -0
- package/src/settings/TeamListView.tsx +57 -0
- package/src/settings/TeamSettingsView.tsx +51 -0
- package/src/settings/TokenActivityChartView.tsx +286 -0
- package/src/settings/UsageStatsView.tsx +101 -0
- package/src/settings/WebhookEndpointListView.tsx +123 -0
- package/src/settings/WechatBindDialogView.tsx +45 -0
- package/src/settings/achievements/AchievementCurtains.tsx +50 -0
- package/src/settings/achievements/AchievementPromotionBadge3D.tsx +350 -0
- package/src/settings/achievements/AchievementPromotionConfetti.tsx +71 -0
- package/src/settings/achievements/AchievementTitle.tsx +52 -0
- package/src/settings/achievements/index.ts +13 -0
- package/src/settings/index.ts +226 -0
- package/src/settings/shouldCloseEmptyApiKeyEditor.test.ts +135 -0
- package/src/settings/shouldCloseEmptyApiKeyEditor.ts +40 -0
- package/src/settings/token-activity.test.ts +195 -0
- package/src/settings/token-activity.ts +320 -0
- package/src/shared/AvatarStackView.tsx +45 -0
- package/src/shared/BotAvatar.tsx +395 -0
- package/src/shared/CodeBlockCopyButton.tsx +48 -0
- package/src/shared/CollapsePanel.tsx +125 -0
- package/src/shared/ContextMenuView.tsx +134 -0
- package/src/shared/MacKeyboardPreview.tsx +260 -0
- package/src/shared/MarkdownTable.tsx +216 -0
- package/src/shared/MultiplierTag.tsx +15 -0
- package/src/shared/ScrollFade.tsx +114 -0
- package/src/shared/SegmentedControl.tsx +82 -0
- package/src/shared/SyntaxHighlightedCode.tsx +0 -0
- package/src/shared/TabBar.tsx +696 -0
- package/src/shared/TimePicker.tsx +96 -0
- package/src/shared/connected-tab-outline.test.ts +22 -0
- package/src/shared/connected-tab-outline.ts +39 -0
- package/src/shared/fileIcons.test.ts +28 -0
- package/src/shared/fileIcons.ts +322 -0
- package/src/shared/index.ts +38 -0
- package/src/shared/markdown-table-clipboard.ts +31 -0
- package/src/shared/provider-icon/icons.ts +56 -0
- package/src/shared/provider-icon/index.tsx +42 -0
- package/src/shared/provider-icon/svg-url.d.ts +4 -0
- package/src/shared/tab-drag.test.ts +14 -0
- package/src/shared/tab-drag.ts +15 -0
- package/src/shared/useDelayedUnmount.ts +36 -0
- package/src/sidebar/AddProjectMenuItem.tsx +21 -0
- package/src/sidebar/AddProjectMenuPopoverView.tsx +52 -0
- package/src/sidebar/AddProjectMenuTriggerView.tsx +50 -0
- package/src/sidebar/ChatMessageListView.tsx +66 -0
- package/src/sidebar/DefaultSidebar.tsx +91 -0
- package/src/sidebar/FlowingMessageListView.tsx +111 -0
- package/src/sidebar/MessageCenterDialogView.tsx +81 -0
- package/src/sidebar/MessageCenterEmptyState.tsx +24 -0
- package/src/sidebar/MessageCenterTabs.tsx +86 -0
- package/src/sidebar/MessageCenterToolbarButton.tsx +25 -0
- package/src/sidebar/MessageCenterTriggerView.tsx +39 -0
- package/src/sidebar/NotificationMessageListView.tsx +136 -0
- package/src/sidebar/ProjectsPanelEmptyState.tsx +20 -0
- package/src/sidebar/RunningPulseDot.tsx +10 -0
- package/src/sidebar/SessionStatusIcon.tsx +43 -0
- package/src/sidebar/SettingsMenuAccountSection.tsx +32 -0
- package/src/sidebar/SettingsMenuActionButton.tsx +24 -0
- package/src/sidebar/SettingsMenuDivider.tsx +5 -0
- package/src/sidebar/SettingsMenuQuotaSection.tsx +45 -0
- package/src/sidebar/SettingsMenuSettingsItem.tsx +18 -0
- package/src/sidebar/SettingsMenuThemeSection.tsx +51 -0
- package/src/sidebar/SettingsMenuTriggerView.tsx +65 -0
- package/src/sidebar/ShowMoreSessionsButton.tsx +37 -0
- package/src/sidebar/SidebarFilterSelectView.tsx +95 -0
- package/src/sidebar/SidebarNavBadgeView.tsx +58 -0
- package/src/sidebar/SidebarNavIcon.tsx +33 -0
- package/src/sidebar/SidebarNavItemButton.tsx +59 -0
- package/src/sidebar/SidebarNavMorePanel.tsx +199 -0
- package/src/sidebar/SidebarNavigation.tsx +223 -0
- package/src/sidebar/SidebarPanel.tsx +48 -0
- package/src/sidebar/SidebarTopBar.tsx +103 -0
- package/src/sidebar/SidebarUpdateIcon.tsx +79 -0
- package/src/sidebar/index.ts +118 -0
- package/src/sidebar/nav-badge-text.test.ts +23 -0
- package/src/sidebar/nav-badge-text.ts +19 -0
- package/src/sidebar/useSidebarNavDrag.ts +139 -0
- package/src/skills/PluginCardView.tsx +150 -0
- package/src/skills/SceneCardView.tsx +194 -0
- package/src/skills/SkillCardView.tsx +186 -0
- package/src/skills/SkillDetailDialogView.tsx +138 -0
- package/src/skills/SkillTagGroupView.tsx +56 -0
- package/src/skills/SkillToggleSwitch.tsx +31 -0
- package/src/skills/index.ts +29 -0
- package/src/skills/skill-icon.test.ts +38 -0
- package/src/skills/skill-icon.tsx +126 -0
- package/src/styles.css +75 -0
- package/src/utils/platform.ts +2 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { Button, cn } from "@vetta-org/ui";
|
|
3
|
+
|
|
4
|
+
export interface BatchProjectFoldersFieldViewLabels {
|
|
5
|
+
readonly folderModePicker: string;
|
|
6
|
+
readonly folderModeText: string;
|
|
7
|
+
readonly selectFolder: string;
|
|
8
|
+
readonly folderTextHint: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BatchProjectFoldersFieldViewProps {
|
|
12
|
+
readonly emptyText: string;
|
|
13
|
+
readonly folderInputMode: "picker" | "textarea";
|
|
14
|
+
readonly folderText: string;
|
|
15
|
+
readonly folders: readonly string[];
|
|
16
|
+
readonly label: string;
|
|
17
|
+
readonly onFolderTextChange: (value: string) => void;
|
|
18
|
+
readonly onInputModeChange: (mode: "picker" | "textarea") => void;
|
|
19
|
+
readonly onRemoveFolder: (folder: string) => void;
|
|
20
|
+
readonly onSelectFolders: () => void;
|
|
21
|
+
readonly labels: BatchProjectFoldersFieldViewLabels;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function BatchProjectFoldersFieldView({
|
|
25
|
+
emptyText,
|
|
26
|
+
folderInputMode,
|
|
27
|
+
folderText,
|
|
28
|
+
folders,
|
|
29
|
+
label,
|
|
30
|
+
onFolderTextChange,
|
|
31
|
+
onInputModeChange,
|
|
32
|
+
onRemoveFolder,
|
|
33
|
+
onSelectFolders,
|
|
34
|
+
labels,
|
|
35
|
+
}: BatchProjectFoldersFieldViewProps): JSX.Element {
|
|
36
|
+
return (
|
|
37
|
+
<div>
|
|
38
|
+
<div className="mb-2 flex items-center justify-between gap-3">
|
|
39
|
+
<p className="text-sm font-medium text-foreground">{label}</p>
|
|
40
|
+
<div className="inline-flex rounded-lg border border-border p-0.5">
|
|
41
|
+
<button
|
|
42
|
+
type="button"
|
|
43
|
+
onClick={() => onInputModeChange("picker")}
|
|
44
|
+
className={cn(
|
|
45
|
+
"rounded-md px-2.5 py-1 text-xs transition-colors",
|
|
46
|
+
folderInputMode === "picker"
|
|
47
|
+
? "bg-accent text-foreground"
|
|
48
|
+
: "text-muted-foreground hover:text-foreground",
|
|
49
|
+
)}
|
|
50
|
+
>
|
|
51
|
+
{labels.folderModePicker}
|
|
52
|
+
</button>
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
onClick={() => onInputModeChange("textarea")}
|
|
56
|
+
className={cn(
|
|
57
|
+
"rounded-md px-2.5 py-1 text-xs transition-colors",
|
|
58
|
+
folderInputMode === "textarea"
|
|
59
|
+
? "bg-accent text-foreground"
|
|
60
|
+
: "text-muted-foreground hover:text-foreground",
|
|
61
|
+
)}
|
|
62
|
+
>
|
|
63
|
+
{labels.folderModeText}
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
{folderInputMode === "picker" ? (
|
|
68
|
+
<Button type="button" variant="outline" size="sm" onClick={onSelectFolders}>
|
|
69
|
+
{labels.selectFolder}
|
|
70
|
+
</Button>
|
|
71
|
+
) : (
|
|
72
|
+
<>
|
|
73
|
+
<textarea
|
|
74
|
+
value={folderText}
|
|
75
|
+
onChange={(event) => onFolderTextChange(event.target.value)}
|
|
76
|
+
className={cn(
|
|
77
|
+
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
78
|
+
"min-h-[96px] text-sm",
|
|
79
|
+
)}
|
|
80
|
+
placeholder={"/path/to/project-a\n/path/to/project-b"}
|
|
81
|
+
/>
|
|
82
|
+
<p className="mt-2 text-xs text-muted-foreground/60">{labels.folderTextHint}</p>
|
|
83
|
+
</>
|
|
84
|
+
)}
|
|
85
|
+
{folders.length > 0 ? (
|
|
86
|
+
<div className="mt-3 max-h-40 overflow-y-auto rounded-lg border border-border p-2">
|
|
87
|
+
{folders.map((folder) => (
|
|
88
|
+
<div
|
|
89
|
+
key={folder}
|
|
90
|
+
className="flex items-center justify-between rounded-md px-2 py-1.5 hover:bg-accent/50"
|
|
91
|
+
>
|
|
92
|
+
<span className="truncate text-sm text-foreground">{folder}</span>
|
|
93
|
+
<button
|
|
94
|
+
type="button"
|
|
95
|
+
onClick={() => onRemoveFolder(folder)}
|
|
96
|
+
className="ml-2 shrink-0 text-muted-foreground/50 hover:text-destructive"
|
|
97
|
+
>
|
|
98
|
+
<span className="icon-[solar--close-circle-linear] text-[14px]" />
|
|
99
|
+
</button>
|
|
100
|
+
</div>
|
|
101
|
+
))}
|
|
102
|
+
</div>
|
|
103
|
+
) : (
|
|
104
|
+
<p className="mt-3 text-xs text-muted-foreground/50">{emptyText}</p>
|
|
105
|
+
)}
|
|
106
|
+
</div>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { BatchProjectGroupLabels } from "./types";
|
|
3
|
+
|
|
4
|
+
export interface BatchProjectGroupTaskItem {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
timeLabel: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
onSelect: () => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface BatchProjectGroupViewProps {
|
|
13
|
+
isExpanded: boolean;
|
|
14
|
+
labels: BatchProjectGroupLabels;
|
|
15
|
+
onToggle: () => void;
|
|
16
|
+
projectName: string;
|
|
17
|
+
sessionCount: number;
|
|
18
|
+
tasks: readonly BatchProjectGroupTaskItem[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function BatchProjectBadge({ label }: { label: string }): JSX.Element {
|
|
22
|
+
return (
|
|
23
|
+
<span className="inline-flex items-center rounded-md bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary">
|
|
24
|
+
{label}
|
|
25
|
+
</span>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function BatchTaskRow({ task }: { task: BatchProjectGroupTaskItem }): JSX.Element {
|
|
30
|
+
return (
|
|
31
|
+
<button
|
|
32
|
+
type="button"
|
|
33
|
+
onClick={task.onSelect}
|
|
34
|
+
className={`flex w-full items-center gap-2 rounded-lg px-2.5 py-[6px] text-left transition-colors duration-100 ${
|
|
35
|
+
task.isActive ? "bg-accent dark:bg-accent/70" : "hover:bg-accent/50"
|
|
36
|
+
}`}
|
|
37
|
+
>
|
|
38
|
+
<span className="icon-[mdi--chat-outline] h-3 w-3 shrink-0 text-muted-foreground" />
|
|
39
|
+
<span className="min-w-0 flex-1 truncate text-[13px] text-foreground">{task.name || task.id}</span>
|
|
40
|
+
<span className="shrink-0 text-[11px] text-muted-foreground">{task.timeLabel}</span>
|
|
41
|
+
</button>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function BatchProjectGroupView({
|
|
46
|
+
isExpanded,
|
|
47
|
+
labels,
|
|
48
|
+
onToggle,
|
|
49
|
+
projectName,
|
|
50
|
+
sessionCount,
|
|
51
|
+
tasks,
|
|
52
|
+
}: BatchProjectGroupViewProps): JSX.Element {
|
|
53
|
+
return (
|
|
54
|
+
<div className="mb-1">
|
|
55
|
+
<button
|
|
56
|
+
type="button"
|
|
57
|
+
onClick={onToggle}
|
|
58
|
+
className="group flex w-full items-center gap-2 rounded-lg px-2.5 py-[6px] text-left hover:bg-accent/50"
|
|
59
|
+
>
|
|
60
|
+
<BatchProjectBadge label={labels.badge} />
|
|
61
|
+
|
|
62
|
+
<span className="icon-[mdi--folder-outline] h-4 w-4 shrink-0 text-foreground" />
|
|
63
|
+
<span className="min-w-0 flex-1 truncate text-[13px] font-medium text-foreground">{projectName}</span>
|
|
64
|
+
|
|
65
|
+
<span className="shrink-0 text-[11px] text-muted-foreground">{sessionCount}</span>
|
|
66
|
+
</button>
|
|
67
|
+
|
|
68
|
+
{isExpanded && (
|
|
69
|
+
<div className="mt-px space-y-px">
|
|
70
|
+
{tasks.map((task) => (
|
|
71
|
+
<BatchTaskRow key={task.id} task={task} />
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
|
|
3
|
+
export interface BatchProjectNameFieldViewProps {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly onChange: (value: string) => void;
|
|
6
|
+
readonly placeholder: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function BatchProjectNameFieldView({
|
|
10
|
+
name,
|
|
11
|
+
onChange,
|
|
12
|
+
placeholder,
|
|
13
|
+
}: BatchProjectNameFieldViewProps): JSX.Element {
|
|
14
|
+
return (
|
|
15
|
+
<div className="flex items-center gap-3">
|
|
16
|
+
<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-inset ring-primary/20">
|
|
17
|
+
<span className="icon-[solar--layers-linear] h-4 w-4 text-primary" />
|
|
18
|
+
</div>
|
|
19
|
+
<input
|
|
20
|
+
value={name}
|
|
21
|
+
onChange={(event) => onChange(event.target.value)}
|
|
22
|
+
className="h-8 w-full border-none bg-transparent text-[15px] font-semibold text-foreground outline-none placeholder:text-muted-foreground/40 focus:outline-none! focus-visible:outline-none!"
|
|
23
|
+
placeholder={placeholder}
|
|
24
|
+
// biome-ignore lint/a11y/noAutofocus: preserve form autofocus behavior
|
|
25
|
+
autoFocus
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
|
|
3
|
+
export interface BatchProjectNotificationFieldViewLabels {
|
|
4
|
+
readonly title: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface BatchProjectNotificationFieldViewProps {
|
|
9
|
+
readonly checked: boolean;
|
|
10
|
+
readonly onChange: (checked: boolean) => void;
|
|
11
|
+
readonly labels: BatchProjectNotificationFieldViewLabels;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function BatchProjectNotificationFieldView({
|
|
15
|
+
checked,
|
|
16
|
+
onChange,
|
|
17
|
+
labels,
|
|
18
|
+
}: BatchProjectNotificationFieldViewProps): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
<div className="flex items-start justify-between gap-4 rounded-md border border-border bg-muted/30 px-3 py-2.5">
|
|
21
|
+
<div className="min-w-0">
|
|
22
|
+
<div className="text-sm font-medium text-foreground">{labels.title}</div>
|
|
23
|
+
<div className="mt-0.5 text-xs text-muted-foreground/80">{labels.description}</div>
|
|
24
|
+
</div>
|
|
25
|
+
<button
|
|
26
|
+
type="button"
|
|
27
|
+
role="switch"
|
|
28
|
+
aria-checked={checked}
|
|
29
|
+
onClick={() => onChange(!checked)}
|
|
30
|
+
className={`peer relative inline-flex h-[18.4px] w-[32px] shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:border-ring ${
|
|
31
|
+
checked ? "bg-primary" : "bg-input"
|
|
32
|
+
}`}
|
|
33
|
+
>
|
|
34
|
+
<span
|
|
35
|
+
className={`pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform ${
|
|
36
|
+
checked ? "translate-x-[calc(100%-2px)]" : "translate-x-0"
|
|
37
|
+
}`}
|
|
38
|
+
/>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export interface BatchProjectRuntimeFieldsLabels {
|
|
4
|
+
model: string;
|
|
5
|
+
concurrency: string;
|
|
6
|
+
timeout: string;
|
|
7
|
+
timeoutHint: string;
|
|
8
|
+
sandbox: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BatchProjectRuntimeFieldsViewProps {
|
|
12
|
+
labels: BatchProjectRuntimeFieldsLabels;
|
|
13
|
+
/** Host ModelSelect node. */
|
|
14
|
+
modelSelect: ReactNode;
|
|
15
|
+
/** Host concurrency Select node. */
|
|
16
|
+
concurrencySelect: ReactNode;
|
|
17
|
+
/** Host timeout Input node. */
|
|
18
|
+
timeoutInput: ReactNode;
|
|
19
|
+
/** Host execution-mode Select node. */
|
|
20
|
+
executionModeSelect: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Layout-only runtime fields shell. Host injects Select/Input/ModelSelect to keep
|
|
25
|
+
* visual parity with desktop Radix primitives.
|
|
26
|
+
*/
|
|
27
|
+
export function BatchProjectRuntimeFieldsView({
|
|
28
|
+
labels,
|
|
29
|
+
modelSelect,
|
|
30
|
+
concurrencySelect,
|
|
31
|
+
timeoutInput,
|
|
32
|
+
executionModeSelect,
|
|
33
|
+
}: BatchProjectRuntimeFieldsViewProps): JSX.Element {
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<div>
|
|
37
|
+
<label className="mb-2 flex items-center justify-between text-sm font-medium text-foreground">
|
|
38
|
+
<span>{labels.model}</span>
|
|
39
|
+
</label>
|
|
40
|
+
{modelSelect}
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div className="flex items-end gap-6">
|
|
44
|
+
<div>
|
|
45
|
+
<label className="mb-2 flex items-center justify-between text-sm font-medium text-foreground">
|
|
46
|
+
<span>{labels.concurrency}</span>
|
|
47
|
+
</label>
|
|
48
|
+
{concurrencySelect}
|
|
49
|
+
</div>
|
|
50
|
+
<div>
|
|
51
|
+
<label className="mb-2 flex items-center justify-between text-sm font-medium text-foreground">
|
|
52
|
+
<span>{labels.timeout}</span>
|
|
53
|
+
</label>
|
|
54
|
+
{timeoutInput}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<p className="text-xs text-muted-foreground/60">{labels.timeoutHint}</p>
|
|
58
|
+
|
|
59
|
+
<div>
|
|
60
|
+
<label className="mb-2 flex items-center justify-between text-sm font-medium text-foreground">
|
|
61
|
+
<span>{labels.sandbox}</span>
|
|
62
|
+
</label>
|
|
63
|
+
{executionModeSelect}
|
|
64
|
+
</div>
|
|
65
|
+
</>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { JSX, MouseEvent } from "react";
|
|
2
|
+
import { Button } from "@vetta-org/ui";
|
|
3
|
+
|
|
4
|
+
export interface BatchTaskActionButtonViewProps {
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly icon: string;
|
|
7
|
+
readonly onClick: () => void;
|
|
8
|
+
readonly title: string;
|
|
9
|
+
readonly variant?: "danger";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function ActionButtonView({
|
|
13
|
+
disabled,
|
|
14
|
+
icon,
|
|
15
|
+
onClick,
|
|
16
|
+
title,
|
|
17
|
+
variant,
|
|
18
|
+
}: BatchTaskActionButtonViewProps): JSX.Element {
|
|
19
|
+
return (
|
|
20
|
+
<Button
|
|
21
|
+
type="button"
|
|
22
|
+
disabled={disabled}
|
|
23
|
+
onClick={onClick}
|
|
24
|
+
title={title}
|
|
25
|
+
variant="ghost"
|
|
26
|
+
size="icon-sm"
|
|
27
|
+
className={
|
|
28
|
+
variant === "danger"
|
|
29
|
+
? "text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive"
|
|
30
|
+
: "text-muted-foreground/60 hover:bg-primary/10 hover:text-primary"
|
|
31
|
+
}
|
|
32
|
+
>
|
|
33
|
+
<span className={`${icon} text-[14px]`} />
|
|
34
|
+
</Button>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface BatchTaskOverlayActionButtonViewProps {
|
|
39
|
+
readonly icon: string;
|
|
40
|
+
readonly onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
41
|
+
readonly title: string;
|
|
42
|
+
readonly variant?: "danger";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function OverlayActionButtonView({
|
|
46
|
+
icon,
|
|
47
|
+
onClick,
|
|
48
|
+
title,
|
|
49
|
+
variant,
|
|
50
|
+
}: BatchTaskOverlayActionButtonViewProps): JSX.Element {
|
|
51
|
+
return (
|
|
52
|
+
<Button
|
|
53
|
+
type="button"
|
|
54
|
+
onClick={onClick}
|
|
55
|
+
title={title}
|
|
56
|
+
variant="ghost"
|
|
57
|
+
size="icon-sm"
|
|
58
|
+
className={`rounded-full bg-card/90 ring-1 ring-inset ring-border/50 backdrop-blur-sm ${
|
|
59
|
+
variant === "danger"
|
|
60
|
+
? "text-muted-foreground hover:bg-destructive/15 hover:text-destructive hover:ring-destructive/40"
|
|
61
|
+
: "text-muted-foreground hover:bg-primary/15 hover:text-primary hover:ring-primary/40"
|
|
62
|
+
}`}
|
|
63
|
+
>
|
|
64
|
+
<span className={`${icon} text-[13px]`} />
|
|
65
|
+
</Button>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
2
|
+
import { memo, useState, type JSX } from "react";
|
|
3
|
+
import { OverlayActionButton, QUEUED_TONE, STATUS_TONE } from "./batchTaskUi";
|
|
4
|
+
import type { BatchTaskCardCallbacks, BatchTaskCardLabels, BatchTaskViewItem } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface BatchTaskCardViewProps {
|
|
7
|
+
callbacks: BatchTaskCardCallbacks;
|
|
8
|
+
labels: BatchTaskCardLabels;
|
|
9
|
+
task: BatchTaskViewItem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const BatchTaskCardView = memo(function BatchTaskCardView({
|
|
13
|
+
callbacks,
|
|
14
|
+
labels,
|
|
15
|
+
task,
|
|
16
|
+
}: BatchTaskCardViewProps): JSX.Element {
|
|
17
|
+
const tone = task.isQueued ? QUEUED_TONE : STATUS_TONE[task.status];
|
|
18
|
+
const [hovered, setHovered] = useState(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
onMouseEnter={() => setHovered(true)}
|
|
23
|
+
onMouseLeave={() => setHovered(false)}
|
|
24
|
+
className="relative flex flex-col gap-1 overflow-hidden rounded-lg bg-card px-2.5 py-2 transition-colors duration-300 ease-out hover:bg-accent"
|
|
25
|
+
>
|
|
26
|
+
<div className="flex items-center gap-1.5">
|
|
27
|
+
<div className="relative flex h-1.5 w-1.5 shrink-0">
|
|
28
|
+
{task.status === "running" && !task.isQueued && (
|
|
29
|
+
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60" />
|
|
30
|
+
)}
|
|
31
|
+
<span className={`relative inline-flex h-1.5 w-1.5 rounded-full ${tone.dot}`} />
|
|
32
|
+
</div>
|
|
33
|
+
<span className="min-w-0 flex-1 truncate text-[12px] font-medium text-foreground">{task.name}</span>
|
|
34
|
+
<span
|
|
35
|
+
className={`inline-flex h-4 shrink-0 items-center rounded-full px-1.5 text-[9px] font-medium leading-none ${tone.bg} ${tone.text}`}
|
|
36
|
+
>
|
|
37
|
+
{task.statusLabel}
|
|
38
|
+
</span>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div className="flex items-center text-[10px] text-muted-foreground/50">
|
|
42
|
+
{task.timeLabel !== null ? (
|
|
43
|
+
<span className="flex items-center gap-0.5">
|
|
44
|
+
<span className="icon-[solar--clock-circle-linear] h-2.5 w-2.5" />
|
|
45
|
+
{task.timeLabel}
|
|
46
|
+
</span>
|
|
47
|
+
) : (
|
|
48
|
+
<span className="text-muted-foreground/40">{labels.notRun}</span>
|
|
49
|
+
)}
|
|
50
|
+
{task.status === "failed" && task.error && (
|
|
51
|
+
<span className="ml-auto flex max-w-[60%] items-center gap-0.5 truncate text-destructive" title={task.error}>
|
|
52
|
+
<span className="icon-[solar--danger-circle-linear] h-2.5 w-2.5 shrink-0" />
|
|
53
|
+
<span className="truncate">{task.error}</span>
|
|
54
|
+
</span>
|
|
55
|
+
)}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<AnimatePresence>
|
|
59
|
+
{hovered && (
|
|
60
|
+
<motion.div
|
|
61
|
+
key="overlay"
|
|
62
|
+
initial={{ opacity: 0 }}
|
|
63
|
+
animate={{ opacity: 1 }}
|
|
64
|
+
exit={{ opacity: 0 }}
|
|
65
|
+
transition={{ duration: 0.25, ease: [0.22, 1, 0.36, 1] }}
|
|
66
|
+
className="absolute inset-0 flex items-center justify-center gap-1.5 bg-background/75 backdrop-blur-[3px]"
|
|
67
|
+
>
|
|
68
|
+
{task.sessionPath && (
|
|
69
|
+
<OverlayActionButton
|
|
70
|
+
icon="icon-[solar--square-top-down-linear]"
|
|
71
|
+
title={labels.goToSession}
|
|
72
|
+
onClick={(event) => {
|
|
73
|
+
event.stopPropagation();
|
|
74
|
+
callbacks.goToSession(task.id);
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
{task.isQueued ? (
|
|
79
|
+
<OverlayActionButton
|
|
80
|
+
icon="icon-[solar--close-circle-linear]"
|
|
81
|
+
title={labels.cancelWait}
|
|
82
|
+
variant="danger"
|
|
83
|
+
onClick={(event) => {
|
|
84
|
+
event.stopPropagation();
|
|
85
|
+
callbacks.stop(task.id);
|
|
86
|
+
}}
|
|
87
|
+
/>
|
|
88
|
+
) : task.status === "pending" ? (
|
|
89
|
+
<OverlayActionButton
|
|
90
|
+
icon="icon-[solar--play-linear]"
|
|
91
|
+
title={labels.run}
|
|
92
|
+
onClick={(event) => {
|
|
93
|
+
event.stopPropagation();
|
|
94
|
+
callbacks.run(task.id);
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
) : task.status === "paused" ? (
|
|
98
|
+
<OverlayActionButton
|
|
99
|
+
icon="icon-[solar--play-linear]"
|
|
100
|
+
title={labels.resume}
|
|
101
|
+
onClick={(event) => {
|
|
102
|
+
event.stopPropagation();
|
|
103
|
+
callbacks.resume(task.id);
|
|
104
|
+
}}
|
|
105
|
+
/>
|
|
106
|
+
) : task.status === "failed" ? (
|
|
107
|
+
<OverlayActionButton
|
|
108
|
+
icon="icon-[solar--restart-linear]"
|
|
109
|
+
title={labels.retry}
|
|
110
|
+
variant="danger"
|
|
111
|
+
onClick={(event) => {
|
|
112
|
+
event.stopPropagation();
|
|
113
|
+
callbacks.retry(task.id);
|
|
114
|
+
}}
|
|
115
|
+
/>
|
|
116
|
+
) : task.status === "completed" ? (
|
|
117
|
+
<OverlayActionButton
|
|
118
|
+
icon="icon-[solar--restart-linear]"
|
|
119
|
+
title={labels.rerun}
|
|
120
|
+
onClick={(event) => {
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
callbacks.retry(task.id);
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
) : null}
|
|
126
|
+
{task.status !== "running" && (
|
|
127
|
+
<OverlayActionButton
|
|
128
|
+
icon="icon-[solar--trash-bin-trash-linear]"
|
|
129
|
+
title={labels.delete}
|
|
130
|
+
variant="danger"
|
|
131
|
+
onClick={(event) => {
|
|
132
|
+
event.stopPropagation();
|
|
133
|
+
callbacks.delete(task.id);
|
|
134
|
+
}}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
</motion.div>
|
|
138
|
+
)}
|
|
139
|
+
</AnimatePresence>
|
|
140
|
+
</div>
|
|
141
|
+
);
|
|
142
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { BatchTaskCardView } from "./BatchTaskCardView";
|
|
3
|
+
import { TASK_COLLAPSE_THRESHOLD } from "./batchTaskUi";
|
|
4
|
+
import type { BatchTaskCardCallbacks, BatchTaskCardLabels, BatchTaskGridLabels, BatchTaskViewItem } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface BatchTaskGridViewProps {
|
|
7
|
+
callbacks: BatchTaskCardCallbacks;
|
|
8
|
+
cardLabels: BatchTaskCardLabels;
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
countsTotal: number;
|
|
11
|
+
filteredTotal: number;
|
|
12
|
+
hiddenCount: number;
|
|
13
|
+
labels: BatchTaskGridLabels;
|
|
14
|
+
normalizedQuery: string;
|
|
15
|
+
onClearSearch: () => void;
|
|
16
|
+
onSearchChange: (value: string) => void;
|
|
17
|
+
onToggleExpanded: () => void;
|
|
18
|
+
searchQuery: string;
|
|
19
|
+
visibleTasks: readonly BatchTaskViewItem[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function BatchTaskGridView({
|
|
23
|
+
callbacks,
|
|
24
|
+
cardLabels,
|
|
25
|
+
collapsed,
|
|
26
|
+
countsTotal,
|
|
27
|
+
filteredTotal,
|
|
28
|
+
hiddenCount,
|
|
29
|
+
labels,
|
|
30
|
+
normalizedQuery,
|
|
31
|
+
onClearSearch,
|
|
32
|
+
onSearchChange,
|
|
33
|
+
onToggleExpanded,
|
|
34
|
+
searchQuery,
|
|
35
|
+
visibleTasks,
|
|
36
|
+
}: BatchTaskGridViewProps): JSX.Element {
|
|
37
|
+
return (
|
|
38
|
+
<div>
|
|
39
|
+
{countsTotal > 0 && (
|
|
40
|
+
<div className="relative mb-3">
|
|
41
|
+
<span className="icon-[solar--magnifer-linear] pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground/50" />
|
|
42
|
+
<input
|
|
43
|
+
type="text"
|
|
44
|
+
value={searchQuery}
|
|
45
|
+
onChange={(event) => onSearchChange(event.target.value)}
|
|
46
|
+
placeholder={labels.searchPlaceholder}
|
|
47
|
+
className="h-8 w-full rounded-lg border border-border/40 bg-secondary pl-8 pr-8 text-[12px] text-foreground placeholder:text-muted-foreground/40 outline-none transition-colors focus:border-primary/40 focus:bg-secondary"
|
|
48
|
+
/>
|
|
49
|
+
{searchQuery && (
|
|
50
|
+
<button
|
|
51
|
+
type="button"
|
|
52
|
+
onClick={onClearSearch}
|
|
53
|
+
title={labels.clear}
|
|
54
|
+
className="absolute right-1.5 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground/50 transition-colors hover:bg-accent hover:text-foreground"
|
|
55
|
+
>
|
|
56
|
+
<span className="icon-[solar--close-circle-linear] h-3 w-3" />
|
|
57
|
+
</button>
|
|
58
|
+
)}
|
|
59
|
+
</div>
|
|
60
|
+
)}
|
|
61
|
+
{filteredTotal === 0 ? (
|
|
62
|
+
<div className="flex flex-col items-center gap-1.5 py-6 text-center">
|
|
63
|
+
<span className="icon-[solar--magnifer-linear] h-5 w-5 text-muted-foreground/50" />
|
|
64
|
+
<p className="text-[12px] text-muted-foreground/60">
|
|
65
|
+
{normalizedQuery ? labels.noMatch(searchQuery) : labels.noTasks}
|
|
66
|
+
</p>
|
|
67
|
+
</div>
|
|
68
|
+
) : (
|
|
69
|
+
<div className="grid grid-cols-3 gap-2">
|
|
70
|
+
{visibleTasks.map((task) => (
|
|
71
|
+
<BatchTaskCardView key={task.id} callbacks={callbacks} labels={cardLabels} task={task} />
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
)}
|
|
75
|
+
{!normalizedQuery && countsTotal > TASK_COLLAPSE_THRESHOLD && (
|
|
76
|
+
<div className="mt-3 flex justify-center">
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
onClick={onToggleExpanded}
|
|
80
|
+
className="flex items-center gap-1 rounded-full border border-border/50 bg-background/40 px-3 py-1 text-[11px] text-muted-foreground/80 transition-colors hover:border-primary/30 hover:text-foreground"
|
|
81
|
+
>
|
|
82
|
+
<span
|
|
83
|
+
className={
|
|
84
|
+
collapsed
|
|
85
|
+
? "icon-[solar--alt-arrow-down-linear] h-3.5 w-3.5"
|
|
86
|
+
: "icon-[solar--alt-arrow-up-linear] h-3.5 w-3.5"
|
|
87
|
+
}
|
|
88
|
+
/>
|
|
89
|
+
{collapsed ? labels.expandMore(hiddenCount) : labels.collapse}
|
|
90
|
+
</button>
|
|
91
|
+
</div>
|
|
92
|
+
)}
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export interface BatchTaskListViewProps {
|
|
4
|
+
/** Pre-built project block nodes from host (or theme composition). */
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function BatchTaskListView({ children }: BatchTaskListViewProps): JSX.Element {
|
|
9
|
+
return <div className="flex flex-col gap-6">{children}</div>;
|
|
10
|
+
}
|