@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,219 @@
|
|
|
1
|
+
import type { JSX, MouseEvent } from "react";
|
|
2
|
+
import { motion } from "motion/react";
|
|
3
|
+
|
|
4
|
+
export interface TaskListItemView {
|
|
5
|
+
readonly cron: string;
|
|
6
|
+
readonly enabled: boolean;
|
|
7
|
+
readonly executionModeLabel: string;
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly isOnce: boolean;
|
|
10
|
+
readonly isRunning: boolean;
|
|
11
|
+
readonly isSelected: boolean;
|
|
12
|
+
readonly lastRunLabel: string;
|
|
13
|
+
readonly lastRunStatus: "success" | "failed" | null;
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly prompt: string;
|
|
16
|
+
readonly scheduleLabel: string;
|
|
17
|
+
readonly statusLabel: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface TaskListViewLabels {
|
|
21
|
+
readonly delete: string;
|
|
22
|
+
readonly edit: string;
|
|
23
|
+
readonly enable: string;
|
|
24
|
+
readonly failed: string;
|
|
25
|
+
readonly once: string;
|
|
26
|
+
readonly pause: string;
|
|
27
|
+
readonly runNow: string;
|
|
28
|
+
readonly success: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TaskListViewProps {
|
|
32
|
+
readonly items: readonly TaskListItemView[];
|
|
33
|
+
readonly labels: TaskListViewLabels;
|
|
34
|
+
readonly onDeleteTask: (taskId: string) => void;
|
|
35
|
+
readonly onEditTask: (taskId: string) => void;
|
|
36
|
+
readonly onRunTask: (taskId: string) => void;
|
|
37
|
+
readonly onSelectTask: (id: string) => void;
|
|
38
|
+
readonly onToggleTask: (taskId: string) => void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function TaskListView({
|
|
42
|
+
items,
|
|
43
|
+
labels,
|
|
44
|
+
onDeleteTask,
|
|
45
|
+
onEditTask,
|
|
46
|
+
onRunTask,
|
|
47
|
+
onSelectTask,
|
|
48
|
+
onToggleTask,
|
|
49
|
+
}: TaskListViewProps): JSX.Element {
|
|
50
|
+
return (
|
|
51
|
+
<motion.div
|
|
52
|
+
className="grid grid-cols-3 gap-4"
|
|
53
|
+
initial="hidden"
|
|
54
|
+
animate="show"
|
|
55
|
+
variants={{
|
|
56
|
+
hidden: {},
|
|
57
|
+
show: { transition: { staggerChildren: 0.05 } },
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
{items.map((item) => (
|
|
61
|
+
<motion.div
|
|
62
|
+
key={item.id}
|
|
63
|
+
layout
|
|
64
|
+
variants={{
|
|
65
|
+
hidden: { opacity: 0, y: 14, scale: 0.96 },
|
|
66
|
+
show: { opacity: 1, y: 0, scale: 1 },
|
|
67
|
+
}}
|
|
68
|
+
transition={{ type: "spring", stiffness: 320, damping: 26 }}
|
|
69
|
+
whileHover={{ y: -2 }}
|
|
70
|
+
onClick={() => onSelectTask(item.id)}
|
|
71
|
+
className={`group relative flex cursor-pointer flex-col overflow-hidden rounded-2xl p-5 transition-colors duration-300 ${
|
|
72
|
+
item.isSelected ? "bg-primary/10 ring-1 ring-inset ring-primary/30" : "bg-card hover:bg-accent"
|
|
73
|
+
}`}
|
|
74
|
+
>
|
|
75
|
+
<div className="relative flex items-start gap-2.5">
|
|
76
|
+
<div className="mt-1 flex h-2 w-2 shrink-0">
|
|
77
|
+
<span className="relative inline-flex h-2 w-2">
|
|
78
|
+
{item.isRunning && (
|
|
79
|
+
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-60" />
|
|
80
|
+
)}
|
|
81
|
+
<span
|
|
82
|
+
className={`relative inline-flex h-2 w-2 rounded-full ${
|
|
83
|
+
item.isRunning ? "bg-emerald-500" : item.enabled ? "bg-primary" : "bg-muted-foreground/40"
|
|
84
|
+
}`}
|
|
85
|
+
/>
|
|
86
|
+
</span>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="min-w-0 flex-1">
|
|
89
|
+
<h3 className="truncate text-[14px] font-semibold tracking-tight text-foreground">{item.name}</h3>
|
|
90
|
+
<p className="mt-0.5 truncate text-[11px] text-muted-foreground/50">
|
|
91
|
+
{item.statusLabel}
|
|
92
|
+
{item.isOnce && ` · ${labels.once}`}
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div
|
|
97
|
+
className={`flex items-center gap-0.5 transition-opacity duration-200 ${
|
|
98
|
+
item.isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
99
|
+
}`}
|
|
100
|
+
>
|
|
101
|
+
<ActionButton
|
|
102
|
+
icon="icon-[mdi--play]"
|
|
103
|
+
title={labels.runNow}
|
|
104
|
+
onClick={(event) => {
|
|
105
|
+
event.stopPropagation();
|
|
106
|
+
onRunTask(item.id);
|
|
107
|
+
}}
|
|
108
|
+
/>
|
|
109
|
+
<ActionButton
|
|
110
|
+
icon={item.enabled ? "icon-[mdi--pause]" : "icon-[mdi--play-outline]"}
|
|
111
|
+
title={item.enabled ? labels.pause : labels.enable}
|
|
112
|
+
onClick={(event) => {
|
|
113
|
+
event.stopPropagation();
|
|
114
|
+
onToggleTask(item.id);
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
117
|
+
<ActionButton
|
|
118
|
+
icon="icon-[mdi--pencil-outline]"
|
|
119
|
+
title={labels.edit}
|
|
120
|
+
onClick={(event) => {
|
|
121
|
+
event.stopPropagation();
|
|
122
|
+
onEditTask(item.id);
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
<ActionButton
|
|
126
|
+
icon="icon-[mdi--delete-outline]"
|
|
127
|
+
title={labels.delete}
|
|
128
|
+
variant="danger"
|
|
129
|
+
onClick={(event) => {
|
|
130
|
+
event.stopPropagation();
|
|
131
|
+
onDeleteTask(item.id);
|
|
132
|
+
}}
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<div className="relative mt-4 flex items-center gap-2 rounded-xl border border-border/30 bg-background/40 px-3 py-2.5">
|
|
138
|
+
<div className="flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-primary/10 ring-1 ring-inset ring-primary/15">
|
|
139
|
+
<span className="icon-[mdi--clock-time-eight-outline] h-3.5 w-3.5 text-primary" />
|
|
140
|
+
</div>
|
|
141
|
+
<div className="min-w-0 flex-1">
|
|
142
|
+
<p className="truncate text-[12px] font-medium text-foreground">{item.scheduleLabel}</p>
|
|
143
|
+
<p className="mt-0.5 truncate font-mono text-[10px] text-muted-foreground/50">{item.cron}</p>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div className="relative mt-3 flex-1">
|
|
148
|
+
<p className="line-clamp-2 text-[12px] leading-relaxed text-muted-foreground/70">{item.prompt}</p>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div className="relative mt-4 flex flex-wrap items-center gap-1.5 border-t border-border/30 pt-3 text-[11px]">
|
|
152
|
+
<MetaPill icon="icon-[mdi--shield-outline]" text={item.executionModeLabel} />
|
|
153
|
+
<div className="ml-auto flex items-center gap-1.5">
|
|
154
|
+
{item.lastRunStatus && (
|
|
155
|
+
<span
|
|
156
|
+
className={`flex h-5 items-center gap-1 rounded-full px-2 text-[10px] font-medium ${
|
|
157
|
+
item.lastRunStatus === "success"
|
|
158
|
+
? "bg-emerald-500/10 text-emerald-400"
|
|
159
|
+
: "bg-destructive/10 text-destructive"
|
|
160
|
+
}`}
|
|
161
|
+
>
|
|
162
|
+
<span
|
|
163
|
+
className={`h-3 w-3 ${
|
|
164
|
+
item.lastRunStatus === "success" ? "icon-[mdi--check-circle]" : "icon-[mdi--alert-circle]"
|
|
165
|
+
}`}
|
|
166
|
+
/>
|
|
167
|
+
{item.lastRunStatus === "success" ? labels.success : labels.failed}
|
|
168
|
+
</span>
|
|
169
|
+
)}
|
|
170
|
+
<span className="flex items-center gap-1 text-muted-foreground/50">
|
|
171
|
+
<span className="icon-[mdi--history] h-3 w-3" />
|
|
172
|
+
{item.lastRunLabel}
|
|
173
|
+
</span>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</motion.div>
|
|
177
|
+
))}
|
|
178
|
+
</motion.div>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function MetaPill({ icon, text }: { readonly icon: string; readonly text: string }): JSX.Element {
|
|
183
|
+
return (
|
|
184
|
+
<span className="flex h-5 items-center gap-1 rounded-full bg-accent/40 px-2 text-[10px] text-muted-foreground/70">
|
|
185
|
+
<span className={`${icon} h-3 w-3 opacity-70`} />
|
|
186
|
+
<span className="max-w-[110px] truncate">{text}</span>
|
|
187
|
+
</span>
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function ActionButton({
|
|
192
|
+
icon,
|
|
193
|
+
title,
|
|
194
|
+
variant,
|
|
195
|
+
onClick,
|
|
196
|
+
}: {
|
|
197
|
+
readonly icon: string;
|
|
198
|
+
readonly title: string;
|
|
199
|
+
readonly variant?: "danger";
|
|
200
|
+
readonly onClick: (event: MouseEvent) => void;
|
|
201
|
+
}): JSX.Element {
|
|
202
|
+
return (
|
|
203
|
+
<motion.button
|
|
204
|
+
type="button"
|
|
205
|
+
title={title}
|
|
206
|
+
onClick={onClick}
|
|
207
|
+
whileHover={{ scale: 1.04 }}
|
|
208
|
+
whileTap={{ scale: 0.94 }}
|
|
209
|
+
transition={{ type: "spring", stiffness: 400, damping: 22 }}
|
|
210
|
+
className={`flex h-7 w-7 items-center justify-center rounded-lg transition-colors duration-150 ${
|
|
211
|
+
variant === "danger"
|
|
212
|
+
? "text-muted-foreground/60 hover:bg-destructive/10 hover:text-destructive"
|
|
213
|
+
: "text-muted-foreground/60 hover:bg-primary/10 hover:text-primary"
|
|
214
|
+
}`}
|
|
215
|
+
>
|
|
216
|
+
<span className={`${icon} text-[14px]`} />
|
|
217
|
+
</motion.button>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
AutomationPageViewLabels,
|
|
3
|
+
AutomationPageViewProps,
|
|
4
|
+
AutomationRecommendationItem,
|
|
5
|
+
} from "./AutomationPageView";
|
|
6
|
+
export { AutomationPageView } from "./AutomationPageView";
|
|
7
|
+
export type {
|
|
8
|
+
ExecutionHistoryRecordView,
|
|
9
|
+
ExecutionHistoryStatus,
|
|
10
|
+
ExecutionHistoryViewLabels,
|
|
11
|
+
ExecutionHistoryViewProps,
|
|
12
|
+
} from "./ExecutionHistoryView";
|
|
13
|
+
export { ExecutionHistoryView } from "./ExecutionHistoryView";
|
|
14
|
+
export type {
|
|
15
|
+
HistoryDrawerTaskView,
|
|
16
|
+
HistoryDrawerViewLabels,
|
|
17
|
+
HistoryDrawerViewProps,
|
|
18
|
+
} from "./HistoryDrawerView";
|
|
19
|
+
export { HistoryDrawerView } from "./HistoryDrawerView";
|
|
20
|
+
export type {
|
|
21
|
+
TaskFormDialogViewLabels,
|
|
22
|
+
TaskFormDialogViewProps,
|
|
23
|
+
} from "./TaskFormDialogView";
|
|
24
|
+
export { TaskFormDialogView } from "./TaskFormDialogView";
|
|
25
|
+
export type {
|
|
26
|
+
TaskListItemView,
|
|
27
|
+
TaskListViewLabels,
|
|
28
|
+
TaskListViewProps,
|
|
29
|
+
} from "./TaskListView";
|
|
30
|
+
export { TaskListView } from "./TaskListView";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { Button } from "@vetta-org/ui";
|
|
3
|
+
import { cn } from "@vetta-org/ui";
|
|
4
|
+
|
|
5
|
+
export interface AchievementNavigationAssets {
|
|
6
|
+
readonly activeBackground: string;
|
|
7
|
+
readonly disabledBackground: string;
|
|
8
|
+
readonly activeArrow: string;
|
|
9
|
+
readonly disabledArrow: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AchievementNavigationButtonViewProps {
|
|
13
|
+
readonly disabled: boolean;
|
|
14
|
+
readonly direction: "previous" | "next";
|
|
15
|
+
readonly label: string;
|
|
16
|
+
readonly onClick: () => void;
|
|
17
|
+
readonly assets: AchievementNavigationAssets;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function AchievementNavigationButtonView({
|
|
21
|
+
disabled,
|
|
22
|
+
direction,
|
|
23
|
+
label,
|
|
24
|
+
onClick,
|
|
25
|
+
assets,
|
|
26
|
+
}: AchievementNavigationButtonViewProps): JSX.Element {
|
|
27
|
+
const previous = direction === "previous";
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Button
|
|
31
|
+
variant="ghost"
|
|
32
|
+
disabled={disabled}
|
|
33
|
+
aria-label={label}
|
|
34
|
+
title={label}
|
|
35
|
+
className={cn(
|
|
36
|
+
"absolute top-1/2 z-30 h-[120px] w-[60px] rounded-none border-0 bg-transparent p-0 hover:bg-transparent disabled:opacity-100",
|
|
37
|
+
previous ? "left-16" : "right-16",
|
|
38
|
+
)}
|
|
39
|
+
style={{
|
|
40
|
+
transform: "translateY(-50%)",
|
|
41
|
+
pointerEvents: "auto",
|
|
42
|
+
cursor: disabled ? "default" : "pointer",
|
|
43
|
+
}}
|
|
44
|
+
onClick={onClick}
|
|
45
|
+
>
|
|
46
|
+
<img
|
|
47
|
+
aria-hidden="true"
|
|
48
|
+
alt=""
|
|
49
|
+
draggable={false}
|
|
50
|
+
src={assets.activeBackground}
|
|
51
|
+
className={cn(
|
|
52
|
+
"pointer-events-none absolute inset-0 h-full w-full object-contain transition-opacity duration-150",
|
|
53
|
+
disabled ? "opacity-0" : "opacity-100",
|
|
54
|
+
)}
|
|
55
|
+
/>
|
|
56
|
+
<img
|
|
57
|
+
aria-hidden="true"
|
|
58
|
+
alt=""
|
|
59
|
+
draggable={false}
|
|
60
|
+
src={assets.disabledBackground}
|
|
61
|
+
className={cn(
|
|
62
|
+
"pointer-events-none absolute inset-0 h-full w-full object-contain transition-opacity duration-150",
|
|
63
|
+
disabled ? "opacity-100" : "opacity-0",
|
|
64
|
+
)}
|
|
65
|
+
/>
|
|
66
|
+
<img
|
|
67
|
+
aria-hidden="true"
|
|
68
|
+
alt=""
|
|
69
|
+
draggable={false}
|
|
70
|
+
src={assets.activeArrow}
|
|
71
|
+
className={cn(
|
|
72
|
+
"pointer-events-none relative z-10 w-10 object-contain transition-opacity duration-150",
|
|
73
|
+
previous && "rotate-180",
|
|
74
|
+
disabled ? "opacity-0" : "opacity-100",
|
|
75
|
+
)}
|
|
76
|
+
/>
|
|
77
|
+
<img
|
|
78
|
+
aria-hidden="true"
|
|
79
|
+
alt=""
|
|
80
|
+
draggable={false}
|
|
81
|
+
src={assets.disabledArrow}
|
|
82
|
+
className={cn(
|
|
83
|
+
"pointer-events-none absolute left-1/2 top-1/2 z-10 w-10 -translate-x-1/2 -translate-y-1/2 object-contain transition-opacity duration-150",
|
|
84
|
+
previous && "rotate-180",
|
|
85
|
+
disabled ? "opacity-100" : "opacity-0",
|
|
86
|
+
)}
|
|
87
|
+
/>
|
|
88
|
+
</Button>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useCallback, useRef, useState, type JSX, type ReactNode } from "react";
|
|
2
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "@vetta-org/ui";
|
|
3
|
+
|
|
4
|
+
export interface AchievementPromotionDialogViewLabels {
|
|
5
|
+
readonly title: string;
|
|
6
|
+
readonly stageName: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AchievementPromotionDialogViewProps {
|
|
10
|
+
readonly onComplete: () => void;
|
|
11
|
+
readonly labels: AchievementPromotionDialogViewLabels;
|
|
12
|
+
/** 3D badge + confetti stay host-provided (or theme achievements slots). */
|
|
13
|
+
readonly renderBadge: (handlers: {
|
|
14
|
+
onCelebrate: () => void;
|
|
15
|
+
onComplete: () => void;
|
|
16
|
+
onHideText: () => void;
|
|
17
|
+
onRevealText: () => void;
|
|
18
|
+
}) => ReactNode;
|
|
19
|
+
readonly renderConfetti: (triggerToken: number) => ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function AchievementPromotionDialogView({
|
|
23
|
+
onComplete,
|
|
24
|
+
labels,
|
|
25
|
+
renderBadge,
|
|
26
|
+
renderConfetti,
|
|
27
|
+
}: AchievementPromotionDialogViewProps): JSX.Element {
|
|
28
|
+
const [confettiTriggerToken, setConfettiTriggerToken] = useState(0);
|
|
29
|
+
const [textVisible, setTextVisible] = useState(false);
|
|
30
|
+
const textRef = useRef<HTMLDivElement>(null);
|
|
31
|
+
|
|
32
|
+
const revealText = useCallback(() => {
|
|
33
|
+
textRef.current?.animate(
|
|
34
|
+
[
|
|
35
|
+
{ opacity: 0, transform: "translateY(16px)" },
|
|
36
|
+
{ opacity: 1, transform: "translateY(0)" },
|
|
37
|
+
],
|
|
38
|
+
{
|
|
39
|
+
duration: 500,
|
|
40
|
+
easing: "cubic-bezier(0.22, 1, 0.36, 1)",
|
|
41
|
+
},
|
|
42
|
+
);
|
|
43
|
+
setTextVisible(true);
|
|
44
|
+
}, []);
|
|
45
|
+
const hideText = useCallback(() => {
|
|
46
|
+
setTextVisible(false);
|
|
47
|
+
}, []);
|
|
48
|
+
const celebrate = useCallback(() => {
|
|
49
|
+
setConfettiTriggerToken((token) => token + 1);
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Dialog open onOpenChange={(open) => !open && onComplete()}>
|
|
54
|
+
<DialogContent
|
|
55
|
+
className="h-[min(680px,calc(100vh-2rem))] overflow-visible border-transparent bg-transparent p-0 sm:max-w-[760px]"
|
|
56
|
+
overlayClassName="bg-transparent supports-backdrop-filter:backdrop-blur-none"
|
|
57
|
+
showCloseButton={false}
|
|
58
|
+
onEscapeKeyDown={(event) => event.preventDefault()}
|
|
59
|
+
onPointerDownOutside={(event) => event.preventDefault()}
|
|
60
|
+
>
|
|
61
|
+
<div
|
|
62
|
+
ref={textRef}
|
|
63
|
+
className={`pointer-events-none absolute inset-x-0 bottom-12 z-20 text-center transition-opacity ease-out ${
|
|
64
|
+
textVisible ? "opacity-100" : "opacity-0"
|
|
65
|
+
}`}
|
|
66
|
+
style={{
|
|
67
|
+
WebkitTextStroke: "2px var(--background)",
|
|
68
|
+
paintOrder: "stroke fill",
|
|
69
|
+
transitionDuration: textVisible ? "500ms" : "950ms",
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<DialogTitle className="text-[20px] font-semibold text-primary">{labels.title}</DialogTitle>
|
|
73
|
+
<DialogDescription className="mt-2 text-[15px] text-foreground">
|
|
74
|
+
{labels.stageName}
|
|
75
|
+
</DialogDescription>
|
|
76
|
+
</div>
|
|
77
|
+
<div className="relative z-10 h-full w-full">
|
|
78
|
+
{renderBadge({
|
|
79
|
+
onCelebrate: celebrate,
|
|
80
|
+
onComplete,
|
|
81
|
+
onHideText: hideText,
|
|
82
|
+
onRevealText: revealText,
|
|
83
|
+
})}
|
|
84
|
+
</div>
|
|
85
|
+
<div className="pointer-events-none absolute inset-0 z-15">
|
|
86
|
+
{renderConfetti(confettiTriggerToken)}
|
|
87
|
+
</div>
|
|
88
|
+
</DialogContent>
|
|
89
|
+
</Dialog>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import { MotionSelect } from "./MotionSelect";
|
|
3
|
+
|
|
4
|
+
export interface AchievementSetOptionView {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AchievementSettingsViewProps {
|
|
10
|
+
readonly setSelectorLabel: string;
|
|
11
|
+
readonly selectedSetId: string;
|
|
12
|
+
readonly setOptions: readonly AchievementSetOptionView[];
|
|
13
|
+
readonly onSelectSetId: (id: string) => void;
|
|
14
|
+
readonly carousel: ReactNode;
|
|
15
|
+
readonly promotionDialog: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function AchievementSettingsView({
|
|
19
|
+
setSelectorLabel,
|
|
20
|
+
selectedSetId,
|
|
21
|
+
setOptions,
|
|
22
|
+
onSelectSetId,
|
|
23
|
+
carousel,
|
|
24
|
+
promotionDialog,
|
|
25
|
+
}: AchievementSettingsViewProps): JSX.Element {
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<div className="mx-auto w-full max-w-[920px] px-8 pb-28 pt-4">
|
|
29
|
+
<div className="mb-4 flex items-center justify-end gap-2">
|
|
30
|
+
<span className="text-[12px] text-muted-foreground">{setSelectorLabel}</span>
|
|
31
|
+
<MotionSelect
|
|
32
|
+
value={selectedSetId}
|
|
33
|
+
onValueChange={onSelectSetId}
|
|
34
|
+
options={setOptions.map((set) => ({ value: set.id, label: set.label }))}
|
|
35
|
+
triggerClassName="min-w-40"
|
|
36
|
+
aria-label={setSelectorLabel}
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
{carousel}
|
|
40
|
+
</div>
|
|
41
|
+
{promotionDialog}
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import { MotionSelect } from "./MotionSelect";
|
|
3
|
+
import { SettingRow, SettingSection, type SettingSectionMeta } from "./SettingChrome";
|
|
4
|
+
|
|
5
|
+
export type AppshotPermissionStatusView = "granted" | "denied" | "unknown";
|
|
6
|
+
|
|
7
|
+
export interface AppshotSelectOptionView {
|
|
8
|
+
readonly value: string;
|
|
9
|
+
readonly label: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AppshotSettingsViewLabels {
|
|
13
|
+
readonly title: string;
|
|
14
|
+
readonly sectionShortcut: string;
|
|
15
|
+
readonly shortcutTitle: string;
|
|
16
|
+
readonly shortcutDescription: string;
|
|
17
|
+
readonly sectionPermissions: string;
|
|
18
|
+
readonly permissionSectionDescription: string;
|
|
19
|
+
readonly permissions: {
|
|
20
|
+
readonly accessibilityTitle: string;
|
|
21
|
+
readonly accessibilityDescription: string;
|
|
22
|
+
readonly screenTitle: string;
|
|
23
|
+
readonly screenDescription: string;
|
|
24
|
+
};
|
|
25
|
+
readonly status: Record<AppshotPermissionStatusView, string>;
|
|
26
|
+
readonly permissionHint: string;
|
|
27
|
+
readonly setupPermissions: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface AppshotSettingsViewProps {
|
|
31
|
+
readonly labels: AppshotSettingsViewLabels;
|
|
32
|
+
readonly subtitle: ReactNode;
|
|
33
|
+
readonly gestureSection: SettingSectionMeta;
|
|
34
|
+
readonly permissionsSection: SettingSectionMeta;
|
|
35
|
+
readonly showKeyboardPreview: boolean;
|
|
36
|
+
readonly keyboardPreview: ReactNode;
|
|
37
|
+
readonly gestureValue: string;
|
|
38
|
+
readonly gestureOptions: readonly AppshotSelectOptionView[];
|
|
39
|
+
readonly onGestureChange: (value: string) => void;
|
|
40
|
+
readonly accessibilityStatus: AppshotPermissionStatusView;
|
|
41
|
+
readonly screenStatus: AppshotPermissionStatusView;
|
|
42
|
+
readonly onOpenOnboarding: () => void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const STATUS_DOT: Record<AppshotPermissionStatusView, string> = {
|
|
46
|
+
granted: "bg-emerald-500",
|
|
47
|
+
denied: "bg-amber-500",
|
|
48
|
+
unknown: "bg-muted-foreground/50",
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const STATUS_TEXT_CLASS: Record<AppshotPermissionStatusView, string> = {
|
|
52
|
+
granted: "text-emerald-500",
|
|
53
|
+
denied: "text-amber-500",
|
|
54
|
+
unknown: "text-muted-foreground",
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function StatusBadge({
|
|
58
|
+
labels,
|
|
59
|
+
status,
|
|
60
|
+
}: {
|
|
61
|
+
labels: AppshotSettingsViewLabels["status"];
|
|
62
|
+
status: AppshotPermissionStatusView;
|
|
63
|
+
}): JSX.Element {
|
|
64
|
+
return (
|
|
65
|
+
<span className={`inline-flex items-center gap-1.5 text-[12px] ${STATUS_TEXT_CLASS[status]}`}>
|
|
66
|
+
<span className={`h-1.5 w-1.5 rounded-full ${STATUS_DOT[status]}`} />
|
|
67
|
+
{labels[status]}
|
|
68
|
+
</span>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function AppshotSettingsView({
|
|
73
|
+
labels,
|
|
74
|
+
subtitle,
|
|
75
|
+
gestureSection,
|
|
76
|
+
permissionsSection,
|
|
77
|
+
showKeyboardPreview,
|
|
78
|
+
keyboardPreview,
|
|
79
|
+
gestureValue,
|
|
80
|
+
gestureOptions,
|
|
81
|
+
onGestureChange,
|
|
82
|
+
accessibilityStatus,
|
|
83
|
+
screenStatus,
|
|
84
|
+
onOpenOnboarding,
|
|
85
|
+
}: AppshotSettingsViewProps): JSX.Element {
|
|
86
|
+
return (
|
|
87
|
+
<div className="mx-auto w-full max-w-[680px] px-8 pt-2 pb-4">
|
|
88
|
+
<h1 className="mb-1.5 text-[20px] font-bold text-foreground">{labels.title}</h1>
|
|
89
|
+
<p className="mb-6 text-[13px] leading-relaxed text-muted-foreground">{subtitle}</p>
|
|
90
|
+
|
|
91
|
+
<SettingSection title={labels.sectionShortcut} section={gestureSection}>
|
|
92
|
+
<SettingRow title={labels.shortcutTitle} description={labels.shortcutDescription} border={false}>
|
|
93
|
+
<MotionSelect
|
|
94
|
+
value={gestureValue}
|
|
95
|
+
onValueChange={onGestureChange}
|
|
96
|
+
options={gestureOptions}
|
|
97
|
+
triggerClassName="min-w-[150px]"
|
|
98
|
+
/>
|
|
99
|
+
</SettingRow>
|
|
100
|
+
</SettingSection>
|
|
101
|
+
|
|
102
|
+
{showKeyboardPreview && <div className="mb-6 px-1.5">{keyboardPreview}</div>}
|
|
103
|
+
|
|
104
|
+
<SettingSection
|
|
105
|
+
title={labels.sectionPermissions}
|
|
106
|
+
section={permissionsSection}
|
|
107
|
+
description={labels.permissionSectionDescription}
|
|
108
|
+
>
|
|
109
|
+
<SettingRow
|
|
110
|
+
title={labels.permissions.accessibilityTitle}
|
|
111
|
+
description={labels.permissions.accessibilityDescription}
|
|
112
|
+
>
|
|
113
|
+
<StatusBadge status={accessibilityStatus} labels={labels.status} />
|
|
114
|
+
</SettingRow>
|
|
115
|
+
<SettingRow title={labels.permissions.screenTitle} description={labels.permissions.screenDescription}>
|
|
116
|
+
<StatusBadge status={screenStatus} labels={labels.status} />
|
|
117
|
+
</SettingRow>
|
|
118
|
+
<div className="flex items-center justify-between gap-4 px-5 py-4">
|
|
119
|
+
<p className="text-[12px] text-muted-foreground">{labels.permissionHint}</p>
|
|
120
|
+
<button
|
|
121
|
+
type="button"
|
|
122
|
+
onClick={onOpenOnboarding}
|
|
123
|
+
className="flex shrink-0 items-center gap-1.5 rounded-lg bg-primary px-3.5 py-1.5 text-[12px] font-medium text-primary-foreground transition-colors hover:bg-primary/90"
|
|
124
|
+
>
|
|
125
|
+
<span className="icon-[mdi--shield-key-outline] h-3.5 w-3.5" />
|
|
126
|
+
{labels.setupPermissions}
|
|
127
|
+
</button>
|
|
128
|
+
</div>
|
|
129
|
+
</SettingSection>
|
|
130
|
+
</div>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import { Button } from "@vetta-org/ui";
|
|
3
|
+
import { SettingSection, type SettingSectionMeta } from "./SettingChrome";
|
|
4
|
+
|
|
5
|
+
export interface ArchivedProjectRowView {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly name: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ArchivedProjectsSettingsViewLabels {
|
|
11
|
+
readonly title: string;
|
|
12
|
+
readonly empty: string;
|
|
13
|
+
readonly sectionTitle: string;
|
|
14
|
+
readonly unarchive: string;
|
|
15
|
+
readonly deleteProject: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ArchivedProjectsSettingsViewProps {
|
|
19
|
+
readonly labels: ArchivedProjectsSettingsViewLabels;
|
|
20
|
+
readonly projects: readonly ArchivedProjectRowView[];
|
|
21
|
+
readonly section: SettingSectionMeta;
|
|
22
|
+
readonly onUnarchive: (path: string) => void;
|
|
23
|
+
readonly onDelete: (path: string) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function ArchivedProjectsSettingsView({
|
|
27
|
+
labels,
|
|
28
|
+
projects,
|
|
29
|
+
section,
|
|
30
|
+
onUnarchive,
|
|
31
|
+
onDelete,
|
|
32
|
+
}: ArchivedProjectsSettingsViewProps): JSX.Element {
|
|
33
|
+
return (
|
|
34
|
+
<div className="mx-auto w-full max-w-[680px] px-8 pt-2 pb-4">
|
|
35
|
+
<h1 className="mb-6 text-[20px] font-bold text-foreground">{labels.title}</h1>
|
|
36
|
+
|
|
37
|
+
{projects.length === 0 ? (
|
|
38
|
+
<div className="flex flex-col items-center gap-2.5 py-16 text-center">
|
|
39
|
+
<span className="icon-[mdi--archive-off-outline] h-8 w-8 text-muted-foreground" />
|
|
40
|
+
<p className="text-[13px] text-muted-foreground">{labels.empty}</p>
|
|
41
|
+
</div>
|
|
42
|
+
) : (
|
|
43
|
+
<SettingSection title={labels.sectionTitle} section={section}>
|
|
44
|
+
{projects.map((entry) => (
|
|
45
|
+
<div
|
|
46
|
+
key={entry.path}
|
|
47
|
+
className="flex items-center gap-3 border-b border-border px-5 py-3.5 last:border-b-0"
|
|
48
|
+
>
|
|
49
|
+
<span className="icon-[mdi--folder-outline] h-4 w-4 shrink-0 text-muted-foreground" />
|
|
50
|
+
<div className="min-w-0 flex-1">
|
|
51
|
+
<div className="text-[13px] font-medium text-foreground">{entry.name}</div>
|
|
52
|
+
<div className="mt-0.5 truncate text-[11px] text-muted-foreground">{entry.path}</div>
|
|
53
|
+
</div>
|
|
54
|
+
<div className="flex items-center gap-1">
|
|
55
|
+
<Button
|
|
56
|
+
variant="ghost"
|
|
57
|
+
size="xs"
|
|
58
|
+
onClick={() => onUnarchive(entry.path)}
|
|
59
|
+
title={labels.unarchive}
|
|
60
|
+
>
|
|
61
|
+
<span className="icon-[mdi--archive-arrow-up-outline] h-3.5 w-3.5" />
|
|
62
|
+
{labels.unarchive}
|
|
63
|
+
</Button>
|
|
64
|
+
<Button
|
|
65
|
+
variant="ghost"
|
|
66
|
+
size="icon-xs"
|
|
67
|
+
onClick={() => onDelete(entry.path)}
|
|
68
|
+
title={labels.deleteProject}
|
|
69
|
+
className="text-muted-foreground hover:text-destructive"
|
|
70
|
+
>
|
|
71
|
+
<span className="icon-[mdi--delete-outline] h-3.5 w-3.5" />
|
|
72
|
+
</Button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
))}
|
|
76
|
+
</SettingSection>
|
|
77
|
+
)}
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
}
|