@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,96 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback, type JSX } from "react";
|
|
2
|
+
|
|
3
|
+
function cn(...parts: Array<string | false | null | undefined>): string {
|
|
4
|
+
return parts.filter(Boolean).join(" ");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface TimePickerProps {
|
|
8
|
+
/** Selected hour (0-23) */
|
|
9
|
+
hour: number;
|
|
10
|
+
/** Selected minute (0-59) */
|
|
11
|
+
minute: number;
|
|
12
|
+
/** Called when hour changes */
|
|
13
|
+
onHourChange: (hour: number) => void;
|
|
14
|
+
/** Called when minute changes */
|
|
15
|
+
onMinuteChange: (minute: number) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Hour and minute picker with separate input fields.
|
|
21
|
+
* Supports keyboard navigation and direct number input.
|
|
22
|
+
*/
|
|
23
|
+
export function TimePicker({ hour, minute, onHourChange, onMinuteChange, className }: TimePickerProps): JSX.Element {
|
|
24
|
+
const [hourStr, setHourStr] = useState(() => String(hour));
|
|
25
|
+
const [minuteStr, setMinuteStr] = useState(() => String(minute).padStart(2, "0"));
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setHourStr(String(hour));
|
|
29
|
+
}, [hour]);
|
|
30
|
+
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setMinuteStr(String(minute).padStart(2, "0"));
|
|
33
|
+
}, [minute]);
|
|
34
|
+
|
|
35
|
+
const clamp = (v: number, min: number, max: number) => Math.max(min, Math.min(max, v));
|
|
36
|
+
|
|
37
|
+
const handleHourChange = useCallback((raw: string) => {
|
|
38
|
+
setHourStr(raw);
|
|
39
|
+
const n = parseInt(raw, 10);
|
|
40
|
+
if (!isNaN(n)) {
|
|
41
|
+
onHourChange(clamp(n, 0, 23));
|
|
42
|
+
}
|
|
43
|
+
}, [onHourChange]);
|
|
44
|
+
|
|
45
|
+
const handleMinuteChange = useCallback((raw: string) => {
|
|
46
|
+
setMinuteStr(raw);
|
|
47
|
+
const n = parseInt(raw, 10);
|
|
48
|
+
if (!isNaN(n)) {
|
|
49
|
+
onMinuteChange(clamp(n, 0, 59));
|
|
50
|
+
}
|
|
51
|
+
}, [onMinuteChange]);
|
|
52
|
+
|
|
53
|
+
const handleHourBlur = useCallback(() => {
|
|
54
|
+
setHourStr(String(hour));
|
|
55
|
+
}, [hour]);
|
|
56
|
+
|
|
57
|
+
const handleMinuteBlur = useCallback(() => {
|
|
58
|
+
setMinuteStr(String(minute).padStart(2, "0"));
|
|
59
|
+
}, [minute]);
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<div className={cn("flex items-center gap-1", className)}>
|
|
63
|
+
{/* Hour */}
|
|
64
|
+
<input
|
|
65
|
+
type="number"
|
|
66
|
+
value={hourStr}
|
|
67
|
+
min={0}
|
|
68
|
+
max={23}
|
|
69
|
+
onChange={(e) => handleHourChange(e.target.value)}
|
|
70
|
+
onBlur={handleHourBlur}
|
|
71
|
+
className={cn(
|
|
72
|
+
"h-8 w-12 rounded-md border border-border bg-muted px-2 py-1 text-center text-sm text-foreground",
|
|
73
|
+
"focus:border-primary focus:outline-none",
|
|
74
|
+
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
75
|
+
)}
|
|
76
|
+
aria-label="小时"
|
|
77
|
+
/>
|
|
78
|
+
<span className="text-muted-foreground text-sm font-medium">:</span>
|
|
79
|
+
{/* Minute */}
|
|
80
|
+
<input
|
|
81
|
+
type="number"
|
|
82
|
+
value={minuteStr}
|
|
83
|
+
min={0}
|
|
84
|
+
max={59}
|
|
85
|
+
onChange={(e) => handleMinuteChange(e.target.value)}
|
|
86
|
+
onBlur={handleMinuteBlur}
|
|
87
|
+
className={cn(
|
|
88
|
+
"h-8 w-12 rounded-md border border-border bg-muted px-2 py-1 text-center text-sm text-foreground",
|
|
89
|
+
"focus:border-primary focus:outline-none",
|
|
90
|
+
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
91
|
+
)}
|
|
92
|
+
aria-label="分钟"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { createConnectedTabOutlineGeometry } from "./connected-tab-outline";
|
|
3
|
+
|
|
4
|
+
describe("createConnectedTabOutlineGeometry", () => {
|
|
5
|
+
it("creates one continuous outline around the tab and both join curves", () => {
|
|
6
|
+
expect(createConnectedTabOutlineGeometry(72)).toEqual({
|
|
7
|
+
fillPath:
|
|
8
|
+
"M 0 32 A 8 8 0 0 0 8 24 V 8 A 8 8 0 0 1 16 0 H 72 A 8 8 0 0 1 80 8 V 24 A 8 8 0 0 0 88 32 V 34 H 0 Z",
|
|
9
|
+
height: 34,
|
|
10
|
+
offsetX: 8,
|
|
11
|
+
outlinePath: "M 0 32 A 8 8 0 0 0 8 24 V 8 A 8 8 0 0 1 16 0 H 72 A 8 8 0 0 1 80 8 V 24 A 8 8 0 0 0 88 32",
|
|
12
|
+
width: 88,
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("keeps radii valid when the measured tab is narrower than both top corners", () => {
|
|
17
|
+
const geometry = createConnectedTabOutlineGeometry(10);
|
|
18
|
+
|
|
19
|
+
expect(geometry.width).toBe(32);
|
|
20
|
+
expect(geometry.outlinePath).toContain("H 16 A 8 8 0 0 1 24 8");
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const TAB_HEIGHT = 32;
|
|
2
|
+
const TAB_RADIUS = 8;
|
|
3
|
+
const JOIN_RADIUS = 8;
|
|
4
|
+
const FRAME_OVERLAP = 2;
|
|
5
|
+
|
|
6
|
+
export interface ConnectedTabOutlineGeometry {
|
|
7
|
+
fillPath: string;
|
|
8
|
+
height: number;
|
|
9
|
+
offsetX: number;
|
|
10
|
+
outlinePath: string;
|
|
11
|
+
width: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function createConnectedTabOutlineGeometry(tabWidth: number): ConnectedTabOutlineGeometry {
|
|
15
|
+
const normalizedTabWidth = Math.max(tabWidth, TAB_RADIUS * 2);
|
|
16
|
+
const tabLeft = JOIN_RADIUS;
|
|
17
|
+
const tabRight = tabLeft + normalizedTabWidth;
|
|
18
|
+
const outerRight = tabRight + JOIN_RADIUS;
|
|
19
|
+
const shoulderY = TAB_HEIGHT - JOIN_RADIUS;
|
|
20
|
+
const outlinePath = [
|
|
21
|
+
`M 0 ${TAB_HEIGHT}`,
|
|
22
|
+
`A ${JOIN_RADIUS} ${JOIN_RADIUS} 0 0 0 ${tabLeft} ${shoulderY}`,
|
|
23
|
+
`V ${TAB_RADIUS}`,
|
|
24
|
+
`A ${TAB_RADIUS} ${TAB_RADIUS} 0 0 1 ${tabLeft + TAB_RADIUS} 0`,
|
|
25
|
+
`H ${tabRight - TAB_RADIUS}`,
|
|
26
|
+
`A ${TAB_RADIUS} ${TAB_RADIUS} 0 0 1 ${tabRight} ${TAB_RADIUS}`,
|
|
27
|
+
`V ${shoulderY}`,
|
|
28
|
+
`A ${JOIN_RADIUS} ${JOIN_RADIUS} 0 0 0 ${outerRight} ${TAB_HEIGHT}`,
|
|
29
|
+
].join(" ");
|
|
30
|
+
const height = TAB_HEIGHT + FRAME_OVERLAP;
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
fillPath: `${outlinePath} V ${height} H 0 Z`,
|
|
34
|
+
height,
|
|
35
|
+
offsetX: JOIN_RADIUS,
|
|
36
|
+
outlinePath,
|
|
37
|
+
width: outerRight,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { getFileIcon } from "./fileIcons";
|
|
3
|
+
|
|
4
|
+
describe("getFileIcon", () => {
|
|
5
|
+
it.each([
|
|
6
|
+
["package.json", "icon-[vscode-icons--file-type-node]"],
|
|
7
|
+
["BUN.LOCK", "icon-[vscode-icons--file-type-bun]"],
|
|
8
|
+
["vite.config.ts", "icon-[vscode-icons--file-type-vite]"],
|
|
9
|
+
["Button.test.tsx", "icon-[vscode-icons--file-type-testts]"],
|
|
10
|
+
["global.d.ts", "icon-[vscode-icons--file-type-typescriptdef]"],
|
|
11
|
+
["Component.tsx", "icon-[vscode-icons--file-type-reactts]"],
|
|
12
|
+
["archive.tar.gz", "icon-[vscode-icons--file-type-zip]"],
|
|
13
|
+
[".env.local", "icon-[vscode-icons--file-type-dotenv]"],
|
|
14
|
+
["unknown.extension", "icon-[vscode-icons--default-file]"],
|
|
15
|
+
])("resolves %s by filename and suffix precedence", (name, expected) => {
|
|
16
|
+
expect(getFileIcon(name, false)).toBe(expected);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("uses semantic closed and opened folder icons", () => {
|
|
20
|
+
expect(getFileIcon("components", true, false)).toBe("icon-[vscode-icons--folder-type-component]");
|
|
21
|
+
expect(getFileIcon("Components", true, true)).toBe("icon-[vscode-icons--folder-type-component-opened]");
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("falls back to the default folder pair", () => {
|
|
25
|
+
expect(getFileIcon("misc", true, false)).toBe("icon-[vscode-icons--default-folder]");
|
|
26
|
+
expect(getFileIcon("misc", true, true)).toBe("icon-[vscode-icons--default-folder-opened]");
|
|
27
|
+
});
|
|
28
|
+
});
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
interface FolderIconPair {
|
|
2
|
+
closed: string;
|
|
3
|
+
opened: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const FILE_NAME_ICONS: Record<string, string> = {
|
|
7
|
+
"package.json": "icon-[vscode-icons--file-type-node]",
|
|
8
|
+
"package-lock.json": "icon-[vscode-icons--file-type-npm]",
|
|
9
|
+
"npm-shrinkwrap.json": "icon-[vscode-icons--file-type-npm]",
|
|
10
|
+
"yarn.lock": "icon-[vscode-icons--file-type-yarn]",
|
|
11
|
+
"pnpm-lock.yaml": "icon-[vscode-icons--file-type-pnpm]",
|
|
12
|
+
"bun.lock": "icon-[vscode-icons--file-type-bun]",
|
|
13
|
+
"bun.lockb": "icon-[vscode-icons--file-type-bun]",
|
|
14
|
+
"deno.json": "icon-[vscode-icons--file-type-deno]",
|
|
15
|
+
"deno.jsonc": "icon-[vscode-icons--file-type-deno]",
|
|
16
|
+
"tsconfig.json": "icon-[vscode-icons--file-type-typescript]",
|
|
17
|
+
"jsconfig.json": "icon-[vscode-icons--file-type-jsconfig]",
|
|
18
|
+
"vite.config.ts": "icon-[vscode-icons--file-type-vite]",
|
|
19
|
+
"vite.config.js": "icon-[vscode-icons--file-type-vite]",
|
|
20
|
+
"vitest.config.ts": "icon-[vscode-icons--file-type-vitest]",
|
|
21
|
+
"vitest.config.js": "icon-[vscode-icons--file-type-vitest]",
|
|
22
|
+
"tailwind.config.ts": "icon-[vscode-icons--file-type-tailwind]",
|
|
23
|
+
"tailwind.config.js": "icon-[vscode-icons--file-type-tailwind]",
|
|
24
|
+
"eslint.config.ts": "icon-[vscode-icons--file-type-eslint]",
|
|
25
|
+
"eslint.config.js": "icon-[vscode-icons--file-type-eslint]",
|
|
26
|
+
".eslintrc": "icon-[vscode-icons--file-type-eslint]",
|
|
27
|
+
".eslintrc.json": "icon-[vscode-icons--file-type-eslint]",
|
|
28
|
+
".prettierrc": "icon-[vscode-icons--file-type-prettier]",
|
|
29
|
+
".prettierrc.json": "icon-[vscode-icons--file-type-prettier]",
|
|
30
|
+
"prettier.config.js": "icon-[vscode-icons--file-type-prettier]",
|
|
31
|
+
"biome.json": "icon-[vscode-icons--file-type-biome]",
|
|
32
|
+
"biome.jsonc": "icon-[vscode-icons--file-type-biome]",
|
|
33
|
+
dockerfile: "icon-[vscode-icons--file-type-docker]",
|
|
34
|
+
"docker-compose.yml": "icon-[vscode-icons--file-type-docker]",
|
|
35
|
+
"docker-compose.yaml": "icon-[vscode-icons--file-type-docker]",
|
|
36
|
+
"compose.yml": "icon-[vscode-icons--file-type-docker]",
|
|
37
|
+
"compose.yaml": "icon-[vscode-icons--file-type-docker]",
|
|
38
|
+
makefile: "icon-[vscode-icons--file-type-config]",
|
|
39
|
+
"cmakelists.txt": "icon-[vscode-icons--file-type-cmake]",
|
|
40
|
+
"cargo.toml": "icon-[vscode-icons--file-type-cargo]",
|
|
41
|
+
"cargo.lock": "icon-[vscode-icons--file-type-cargo]",
|
|
42
|
+
"go.mod": "icon-[vscode-icons--file-type-go]",
|
|
43
|
+
"go.sum": "icon-[vscode-icons--file-type-go]",
|
|
44
|
+
"go.work": "icon-[vscode-icons--file-type-go-work]",
|
|
45
|
+
"pyproject.toml": "icon-[vscode-icons--file-type-python]",
|
|
46
|
+
"requirements.txt": "icon-[vscode-icons--file-type-python]",
|
|
47
|
+
"poetry.lock": "icon-[vscode-icons--file-type-poetry]",
|
|
48
|
+
gemfile: "icon-[vscode-icons--file-type-ruby]",
|
|
49
|
+
"composer.json": "icon-[vscode-icons--file-type-php]",
|
|
50
|
+
"pom.xml": "icon-[vscode-icons--file-type-java]",
|
|
51
|
+
"build.gradle": "icon-[vscode-icons--file-type-gradle]",
|
|
52
|
+
"build.gradle.kts": "icon-[vscode-icons--file-type-gradle]",
|
|
53
|
+
".gitignore": "icon-[vscode-icons--file-type-git]",
|
|
54
|
+
".gitattributes": "icon-[vscode-icons--file-type-git]",
|
|
55
|
+
".gitmodules": "icon-[vscode-icons--file-type-git]",
|
|
56
|
+
"agents.md": "icon-[vscode-icons--file-type-agents]",
|
|
57
|
+
license: "icon-[vscode-icons--file-type-license]",
|
|
58
|
+
"license.md": "icon-[vscode-icons--file-type-license]",
|
|
59
|
+
"license.txt": "icon-[vscode-icons--file-type-license]",
|
|
60
|
+
readme: "icon-[vscode-icons--file-type-markdown]",
|
|
61
|
+
"readme.md": "icon-[vscode-icons--file-type-markdown]",
|
|
62
|
+
changelog: "icon-[vscode-icons--file-type-markdown]",
|
|
63
|
+
"changelog.md": "icon-[vscode-icons--file-type-markdown]",
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const COMPOUND_SUFFIX_ICONS: ReadonlyArray<readonly [string, string]> = [
|
|
67
|
+
[".stories.tsx", "icon-[vscode-icons--file-type-storybook]"],
|
|
68
|
+
[".stories.jsx", "icon-[vscode-icons--file-type-storybook]"],
|
|
69
|
+
[".stories.ts", "icon-[vscode-icons--file-type-storybook]"],
|
|
70
|
+
[".stories.js", "icon-[vscode-icons--file-type-storybook]"],
|
|
71
|
+
[".test.tsx", "icon-[vscode-icons--file-type-testts]"],
|
|
72
|
+
[".spec.tsx", "icon-[vscode-icons--file-type-testts]"],
|
|
73
|
+
[".test.ts", "icon-[vscode-icons--file-type-testts]"],
|
|
74
|
+
[".spec.ts", "icon-[vscode-icons--file-type-testts]"],
|
|
75
|
+
[".test.jsx", "icon-[vscode-icons--file-type-testjs]"],
|
|
76
|
+
[".spec.jsx", "icon-[vscode-icons--file-type-testjs]"],
|
|
77
|
+
[".test.js", "icon-[vscode-icons--file-type-testjs]"],
|
|
78
|
+
[".spec.js", "icon-[vscode-icons--file-type-testjs]"],
|
|
79
|
+
[".d.ts", "icon-[vscode-icons--file-type-typescriptdef]"],
|
|
80
|
+
[".config.ts", "icon-[vscode-icons--file-type-config]"],
|
|
81
|
+
[".config.js", "icon-[vscode-icons--file-type-config]"],
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
const EXTENSION_ICONS: Record<string, string> = {
|
|
85
|
+
ts: "icon-[vscode-icons--file-type-typescript]",
|
|
86
|
+
mts: "icon-[vscode-icons--file-type-typescript]",
|
|
87
|
+
cts: "icon-[vscode-icons--file-type-typescript]",
|
|
88
|
+
tsx: "icon-[vscode-icons--file-type-reactts]",
|
|
89
|
+
js: "icon-[vscode-icons--file-type-js-official]",
|
|
90
|
+
mjs: "icon-[vscode-icons--file-type-js-official]",
|
|
91
|
+
cjs: "icon-[vscode-icons--file-type-js-official]",
|
|
92
|
+
jsx: "icon-[vscode-icons--file-type-reactjs]",
|
|
93
|
+
vue: "icon-[vscode-icons--file-type-vue]",
|
|
94
|
+
svelte: "icon-[vscode-icons--file-type-svelte]",
|
|
95
|
+
astro: "icon-[vscode-icons--file-type-astro]",
|
|
96
|
+
html: "icon-[vscode-icons--file-type-html]",
|
|
97
|
+
htm: "icon-[vscode-icons--file-type-html]",
|
|
98
|
+
css: "icon-[vscode-icons--file-type-css]",
|
|
99
|
+
scss: "icon-[vscode-icons--file-type-scss2]",
|
|
100
|
+
sass: "icon-[vscode-icons--file-type-sass]",
|
|
101
|
+
less: "icon-[vscode-icons--file-type-less]",
|
|
102
|
+
styl: "icon-[vscode-icons--file-type-stylus]",
|
|
103
|
+
json: "icon-[vscode-icons--file-type-json]",
|
|
104
|
+
jsonc: "icon-[vscode-icons--file-type-json]",
|
|
105
|
+
json5: "icon-[vscode-icons--file-type-json5]",
|
|
106
|
+
yaml: "icon-[vscode-icons--file-type-yaml]",
|
|
107
|
+
yml: "icon-[vscode-icons--file-type-yaml]",
|
|
108
|
+
toml: "icon-[vscode-icons--file-type-toml]",
|
|
109
|
+
xml: "icon-[vscode-icons--file-type-xml]",
|
|
110
|
+
ini: "icon-[vscode-icons--file-type-ini]",
|
|
111
|
+
env: "icon-[vscode-icons--file-type-dotenv]",
|
|
112
|
+
py: "icon-[vscode-icons--file-type-python]",
|
|
113
|
+
pyw: "icon-[vscode-icons--file-type-python]",
|
|
114
|
+
go: "icon-[vscode-icons--file-type-go]",
|
|
115
|
+
rs: "icon-[vscode-icons--file-type-rust]",
|
|
116
|
+
java: "icon-[vscode-icons--file-type-java]",
|
|
117
|
+
kt: "icon-[vscode-icons--file-type-kotlin]",
|
|
118
|
+
kts: "icon-[vscode-icons--file-type-kotlin]",
|
|
119
|
+
swift: "icon-[vscode-icons--file-type-swift]",
|
|
120
|
+
rb: "icon-[vscode-icons--file-type-ruby]",
|
|
121
|
+
php: "icon-[vscode-icons--file-type-php]",
|
|
122
|
+
c: "icon-[vscode-icons--file-type-c]",
|
|
123
|
+
h: "icon-[vscode-icons--file-type-cppheader]",
|
|
124
|
+
cc: "icon-[vscode-icons--file-type-cpp]",
|
|
125
|
+
cpp: "icon-[vscode-icons--file-type-cpp]",
|
|
126
|
+
cxx: "icon-[vscode-icons--file-type-cpp]",
|
|
127
|
+
hpp: "icon-[vscode-icons--file-type-cppheader]",
|
|
128
|
+
cs: "icon-[vscode-icons--file-type-csharp]",
|
|
129
|
+
fs: "icon-[vscode-icons--file-type-fsharp]",
|
|
130
|
+
fsx: "icon-[vscode-icons--file-type-fsharp]",
|
|
131
|
+
dart: "icon-[vscode-icons--file-type-dartlang]",
|
|
132
|
+
lua: "icon-[vscode-icons--file-type-lua]",
|
|
133
|
+
r: "icon-[vscode-icons--file-type-r]",
|
|
134
|
+
scala: "icon-[vscode-icons--file-type-scala]",
|
|
135
|
+
ex: "icon-[vscode-icons--file-type-elixir]",
|
|
136
|
+
exs: "icon-[vscode-icons--file-type-elixir]",
|
|
137
|
+
erl: "icon-[vscode-icons--file-type-erlang]",
|
|
138
|
+
clj: "icon-[vscode-icons--file-type-clojure]",
|
|
139
|
+
cljs: "icon-[vscode-icons--file-type-clojurescript]",
|
|
140
|
+
hs: "icon-[vscode-icons--file-type-haskell]",
|
|
141
|
+
sol: "icon-[vscode-icons--file-type-solidity]",
|
|
142
|
+
zig: "icon-[vscode-icons--file-type-zig]",
|
|
143
|
+
proto: "icon-[vscode-icons--file-type-protobuf]",
|
|
144
|
+
graphql: "icon-[vscode-icons--file-type-graphql]",
|
|
145
|
+
gql: "icon-[vscode-icons--file-type-graphql]",
|
|
146
|
+
sql: "icon-[vscode-icons--file-type-sql]",
|
|
147
|
+
sqlite: "icon-[vscode-icons--file-type-sqlite]",
|
|
148
|
+
db: "icon-[vscode-icons--file-type-sqlite]",
|
|
149
|
+
md: "icon-[vscode-icons--file-type-markdown]",
|
|
150
|
+
mdx: "icon-[vscode-icons--file-type-markdown]",
|
|
151
|
+
txt: "icon-[vscode-icons--file-type-text]",
|
|
152
|
+
log: "icon-[vscode-icons--file-type-log]",
|
|
153
|
+
pdf: "icon-[vscode-icons--file-type-pdf2]",
|
|
154
|
+
doc: "icon-[vscode-icons--file-type-word]",
|
|
155
|
+
docx: "icon-[vscode-icons--file-type-word]",
|
|
156
|
+
xls: "icon-[vscode-icons--file-type-excel]",
|
|
157
|
+
xlsx: "icon-[vscode-icons--file-type-excel]",
|
|
158
|
+
csv: "icon-[vscode-icons--file-type-excel]",
|
|
159
|
+
ppt: "icon-[vscode-icons--file-type-powerpoint]",
|
|
160
|
+
pptx: "icon-[vscode-icons--file-type-powerpoint]",
|
|
161
|
+
png: "icon-[vscode-icons--file-type-image]",
|
|
162
|
+
jpg: "icon-[vscode-icons--file-type-image]",
|
|
163
|
+
jpeg: "icon-[vscode-icons--file-type-image]",
|
|
164
|
+
gif: "icon-[vscode-icons--file-type-image]",
|
|
165
|
+
webp: "icon-[vscode-icons--file-type-image]",
|
|
166
|
+
avif: "icon-[vscode-icons--file-type-avif]",
|
|
167
|
+
ico: "icon-[vscode-icons--file-type-image]",
|
|
168
|
+
svg: "icon-[vscode-icons--file-type-svg]",
|
|
169
|
+
mp3: "icon-[vscode-icons--file-type-audio]",
|
|
170
|
+
wav: "icon-[vscode-icons--file-type-audio]",
|
|
171
|
+
m4a: "icon-[vscode-icons--file-type-audio]",
|
|
172
|
+
flac: "icon-[vscode-icons--file-type-audio]",
|
|
173
|
+
mp4: "icon-[vscode-icons--file-type-video]",
|
|
174
|
+
mov: "icon-[vscode-icons--file-type-video]",
|
|
175
|
+
webm: "icon-[vscode-icons--file-type-video]",
|
|
176
|
+
zip: "icon-[vscode-icons--file-type-zip]",
|
|
177
|
+
"7z": "icon-[vscode-icons--file-type-zip]",
|
|
178
|
+
gz: "icon-[vscode-icons--file-type-zip]",
|
|
179
|
+
tgz: "icon-[vscode-icons--file-type-zip]",
|
|
180
|
+
tar: "icon-[vscode-icons--file-type-zip]",
|
|
181
|
+
rar: "icon-[vscode-icons--file-type-zip]",
|
|
182
|
+
wasm: "icon-[vscode-icons--file-type-wasm]",
|
|
183
|
+
bin: "icon-[vscode-icons--file-type-binary]",
|
|
184
|
+
sh: "icon-[vscode-icons--file-type-shell]",
|
|
185
|
+
bash: "icon-[vscode-icons--file-type-shell]",
|
|
186
|
+
zsh: "icon-[vscode-icons--file-type-shell]",
|
|
187
|
+
ps1: "icon-[vscode-icons--file-type-powershell]",
|
|
188
|
+
bat: "icon-[vscode-icons--file-type-bat]",
|
|
189
|
+
cmd: "icon-[vscode-icons--file-type-bat]",
|
|
190
|
+
lock: "icon-[vscode-icons--file-type-config]",
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const FOLDER_ICONS: Record<string, FolderIconPair> = {
|
|
194
|
+
src: { closed: "icon-[vscode-icons--folder-type-src]", opened: "icon-[vscode-icons--folder-type-src-opened]" },
|
|
195
|
+
source: { closed: "icon-[vscode-icons--folder-type-src]", opened: "icon-[vscode-icons--folder-type-src-opened]" },
|
|
196
|
+
components: {
|
|
197
|
+
closed: "icon-[vscode-icons--folder-type-component]",
|
|
198
|
+
opened: "icon-[vscode-icons--folder-type-component-opened]",
|
|
199
|
+
},
|
|
200
|
+
hooks: { closed: "icon-[vscode-icons--folder-type-hook]", opened: "icon-[vscode-icons--folder-type-hook-opened]" },
|
|
201
|
+
test: { closed: "icon-[vscode-icons--folder-type-test]", opened: "icon-[vscode-icons--folder-type-test-opened]" },
|
|
202
|
+
tests: { closed: "icon-[vscode-icons--folder-type-test]", opened: "icon-[vscode-icons--folder-type-test-opened]" },
|
|
203
|
+
__tests__: {
|
|
204
|
+
closed: "icon-[vscode-icons--folder-type-test]",
|
|
205
|
+
opened: "icon-[vscode-icons--folder-type-test-opened]",
|
|
206
|
+
},
|
|
207
|
+
assets: {
|
|
208
|
+
closed: "icon-[vscode-icons--folder-type-asset]",
|
|
209
|
+
opened: "icon-[vscode-icons--folder-type-asset-opened]",
|
|
210
|
+
},
|
|
211
|
+
images: {
|
|
212
|
+
closed: "icon-[vscode-icons--folder-type-images]",
|
|
213
|
+
opened: "icon-[vscode-icons--folder-type-images-opened]",
|
|
214
|
+
},
|
|
215
|
+
icons: {
|
|
216
|
+
closed: "icon-[vscode-icons--folder-type-images]",
|
|
217
|
+
opened: "icon-[vscode-icons--folder-type-images-opened]",
|
|
218
|
+
},
|
|
219
|
+
docs: { closed: "icon-[vscode-icons--folder-type-docs]", opened: "icon-[vscode-icons--folder-type-docs-opened]" },
|
|
220
|
+
documentation: {
|
|
221
|
+
closed: "icon-[vscode-icons--folder-type-docs]",
|
|
222
|
+
opened: "icon-[vscode-icons--folder-type-docs-opened]",
|
|
223
|
+
},
|
|
224
|
+
node_modules: {
|
|
225
|
+
closed: "icon-[vscode-icons--folder-type-node]",
|
|
226
|
+
opened: "icon-[vscode-icons--folder-type-node-opened]",
|
|
227
|
+
},
|
|
228
|
+
packages: {
|
|
229
|
+
closed: "icon-[vscode-icons--folder-type-package]",
|
|
230
|
+
opened: "icon-[vscode-icons--folder-type-package-opened]",
|
|
231
|
+
},
|
|
232
|
+
lib: {
|
|
233
|
+
closed: "icon-[vscode-icons--folder-type-library]",
|
|
234
|
+
opened: "icon-[vscode-icons--folder-type-library-opened]",
|
|
235
|
+
},
|
|
236
|
+
config: {
|
|
237
|
+
closed: "icon-[vscode-icons--folder-type-config]",
|
|
238
|
+
opened: "icon-[vscode-icons--folder-type-config-opened]",
|
|
239
|
+
},
|
|
240
|
+
api: { closed: "icon-[vscode-icons--folder-type-api]", opened: "icon-[vscode-icons--folder-type-api-opened]" },
|
|
241
|
+
server: {
|
|
242
|
+
closed: "icon-[vscode-icons--folder-type-server]",
|
|
243
|
+
opened: "icon-[vscode-icons--folder-type-server-opened]",
|
|
244
|
+
},
|
|
245
|
+
backend: {
|
|
246
|
+
closed: "icon-[vscode-icons--folder-type-server]",
|
|
247
|
+
opened: "icon-[vscode-icons--folder-type-server-opened]",
|
|
248
|
+
},
|
|
249
|
+
client: {
|
|
250
|
+
closed: "icon-[vscode-icons--folder-type-client]",
|
|
251
|
+
opened: "icon-[vscode-icons--folder-type-client-opened]",
|
|
252
|
+
},
|
|
253
|
+
frontend: {
|
|
254
|
+
closed: "icon-[vscode-icons--folder-type-client]",
|
|
255
|
+
opened: "icon-[vscode-icons--folder-type-client-opened]",
|
|
256
|
+
},
|
|
257
|
+
db: { closed: "icon-[vscode-icons--folder-type-db]", opened: "icon-[vscode-icons--folder-type-db-opened]" },
|
|
258
|
+
database: { closed: "icon-[vscode-icons--folder-type-db]", opened: "icon-[vscode-icons--folder-type-db-opened]" },
|
|
259
|
+
scripts: {
|
|
260
|
+
closed: "icon-[vscode-icons--folder-type-script]",
|
|
261
|
+
opened: "icon-[vscode-icons--folder-type-script-opened]",
|
|
262
|
+
},
|
|
263
|
+
styles: {
|
|
264
|
+
closed: "icon-[vscode-icons--folder-type-style]",
|
|
265
|
+
opened: "icon-[vscode-icons--folder-type-style-opened]",
|
|
266
|
+
},
|
|
267
|
+
templates: {
|
|
268
|
+
closed: "icon-[vscode-icons--folder-type-template]",
|
|
269
|
+
opened: "icon-[vscode-icons--folder-type-template-opened]",
|
|
270
|
+
},
|
|
271
|
+
public: {
|
|
272
|
+
closed: "icon-[vscode-icons--folder-type-public]",
|
|
273
|
+
opened: "icon-[vscode-icons--folder-type-public-opened]",
|
|
274
|
+
},
|
|
275
|
+
dist: { closed: "icon-[vscode-icons--folder-type-dist]", opened: "icon-[vscode-icons--folder-type-dist-opened]" },
|
|
276
|
+
build: { closed: "icon-[vscode-icons--folder-type-dist]", opened: "icon-[vscode-icons--folder-type-dist-opened]" },
|
|
277
|
+
coverage: {
|
|
278
|
+
closed: "icon-[vscode-icons--folder-type-coverage]",
|
|
279
|
+
opened: "icon-[vscode-icons--folder-type-coverage-opened]",
|
|
280
|
+
},
|
|
281
|
+
".github": {
|
|
282
|
+
closed: "icon-[vscode-icons--folder-type-github]",
|
|
283
|
+
opened: "icon-[vscode-icons--folder-type-github-opened]",
|
|
284
|
+
},
|
|
285
|
+
".git": { closed: "icon-[vscode-icons--folder-type-git]", opened: "icon-[vscode-icons--folder-type-git-opened]" },
|
|
286
|
+
".vscode": {
|
|
287
|
+
closed: "icon-[vscode-icons--folder-type-vscode]",
|
|
288
|
+
opened: "icon-[vscode-icons--folder-type-vscode-opened]",
|
|
289
|
+
},
|
|
290
|
+
docker: {
|
|
291
|
+
closed: "icon-[vscode-icons--folder-type-docker]",
|
|
292
|
+
opened: "icon-[vscode-icons--folder-type-docker-opened]",
|
|
293
|
+
},
|
|
294
|
+
audio: { closed: "icon-[vscode-icons--folder-type-audio]", opened: "icon-[vscode-icons--folder-type-audio-opened]" },
|
|
295
|
+
video: { closed: "icon-[vscode-icons--folder-type-video]", opened: "icon-[vscode-icons--folder-type-video-opened]" },
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
function resolveFileIcon(name: string): string {
|
|
299
|
+
const normalizedName = name.toLowerCase();
|
|
300
|
+
if (normalizedName === ".env" || normalizedName.startsWith(".env.")) {
|
|
301
|
+
return "icon-[vscode-icons--file-type-dotenv]";
|
|
302
|
+
}
|
|
303
|
+
if (normalizedName.startsWith("dockerfile.")) return "icon-[vscode-icons--file-type-docker]";
|
|
304
|
+
const filenameIcon = FILE_NAME_ICONS[normalizedName];
|
|
305
|
+
if (filenameIcon) return filenameIcon;
|
|
306
|
+
for (const [suffix, icon] of COMPOUND_SUFFIX_ICONS) {
|
|
307
|
+
if (normalizedName.endsWith(suffix)) return icon;
|
|
308
|
+
}
|
|
309
|
+
const dotIndex = normalizedName.lastIndexOf(".");
|
|
310
|
+
if (dotIndex >= 0) {
|
|
311
|
+
const extensionIcon = EXTENSION_ICONS[normalizedName.slice(dotIndex + 1)];
|
|
312
|
+
if (extensionIcon) return extensionIcon;
|
|
313
|
+
}
|
|
314
|
+
return "icon-[vscode-icons--default-file]";
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export function getFileIcon(name: string, isDirectory: boolean, isExpanded = false): string {
|
|
318
|
+
if (!isDirectory) return resolveFileIcon(name);
|
|
319
|
+
const folderIcon = FOLDER_ICONS[name.toLowerCase()];
|
|
320
|
+
if (folderIcon) return isExpanded ? folderIcon.opened : folderIcon.closed;
|
|
321
|
+
return isExpanded ? "icon-[vscode-icons--default-folder-opened]" : "icon-[vscode-icons--default-folder]";
|
|
322
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export type { AvatarStackViewProps } from "./AvatarStackView";
|
|
2
|
+
export { AvatarStackView } from "./AvatarStackView";
|
|
3
|
+
export { BotAvatar } from "./BotAvatar";
|
|
4
|
+
export type {
|
|
5
|
+
CodeBlockCopyButtonLabels,
|
|
6
|
+
CodeBlockCopyButtonViewProps,
|
|
7
|
+
} from "./CodeBlockCopyButton";
|
|
8
|
+
export { CodeBlockCopyButtonView } from "./CodeBlockCopyButton";
|
|
9
|
+
export type { CollapsePanelProps } from "./CollapsePanel";
|
|
10
|
+
export { CollapsePanel } from "./CollapsePanel";
|
|
11
|
+
export type { ContextMenuNode, ContextMenuViewProps } from "./ContextMenuView";
|
|
12
|
+
export { ContextMenuView } from "./ContextMenuView";
|
|
13
|
+
export type { MacKeyboardPreviewProps, MacKeyId } from "./MacKeyboardPreview";
|
|
14
|
+
export { MacKeyboardPreview } from "./MacKeyboardPreview";
|
|
15
|
+
export type { MarkdownTableProps } from "./MarkdownTable";
|
|
16
|
+
export {
|
|
17
|
+
MarkdownTable,
|
|
18
|
+
MarkdownTableBody,
|
|
19
|
+
MarkdownTableCell,
|
|
20
|
+
MarkdownTableHead,
|
|
21
|
+
MarkdownTableHeaderCell,
|
|
22
|
+
MarkdownTableRow,
|
|
23
|
+
} from "./MarkdownTable";
|
|
24
|
+
export type { MultiplierTagProps } from "./MultiplierTag";
|
|
25
|
+
export { fmtMultiplier, MultiplierTag } from "./MultiplierTag";
|
|
26
|
+
export { readTableCells, toCsv, toMarkdown } from "./markdown-table-clipboard";
|
|
27
|
+
export { getProviderIcon, PROVIDER_ICONS, ProviderIcon } from "./provider-icon";
|
|
28
|
+
export type { ScrollFadeProps } from "./ScrollFade";
|
|
29
|
+
export { ScrollFade } from "./ScrollFade";
|
|
30
|
+
export type { SegmentedControlItem, SegmentedControlProps } from "./SegmentedControl";
|
|
31
|
+
export { SegmentedControl } from "./SegmentedControl";
|
|
32
|
+
export type { SyntaxHighlightedCodeProps } from "./SyntaxHighlightedCode";
|
|
33
|
+
export { SyntaxHighlightedCode } from "./SyntaxHighlightedCode";
|
|
34
|
+
export type { TabBarDragEvent, TabBarItem, TabBarProps } from "./TabBar";
|
|
35
|
+
export { TabBar } from "./TabBar";
|
|
36
|
+
export type { TimePickerProps } from "./TimePicker";
|
|
37
|
+
export { TimePicker } from "./TimePicker";
|
|
38
|
+
export { useDelayedUnmount } from "./useDelayedUnmount";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格「复制」的纯逻辑。取数源是渲染后的 DOM —— 渲染结果就是用户看到的真相,
|
|
3
|
+
* 不需要把原始 markdown 一路串到表格组件里。
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** 把 `<table>` 读成二维字符串矩阵,首行即表头。 */
|
|
7
|
+
export function readTableCells(table: HTMLTableElement): string[][] {
|
|
8
|
+
return Array.from(table.rows).map((row) =>
|
|
9
|
+
Array.from(row.cells).map((cell) => (cell.textContent ?? "").trim().replace(/\s+/g, " ")),
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** 还原成 GFM 表格。列数按最宽的一行对齐,短行补空单元格。 */
|
|
14
|
+
export function toMarkdown(rows: string[][]): string {
|
|
15
|
+
if (rows.length === 0) return "";
|
|
16
|
+
const columnCount = Math.max(...rows.map((row) => row.length));
|
|
17
|
+
const pad = (row: string[]): string[] =>
|
|
18
|
+
Array.from({ length: columnCount }, (_, index) => (row[index] ?? "").replace(/\|/g, "\\|"));
|
|
19
|
+
const [header, ...body] = rows;
|
|
20
|
+
return [
|
|
21
|
+
`| ${pad(header).join(" | ")} |`,
|
|
22
|
+
`| ${Array.from({ length: columnCount }, () => "---").join(" | ")} |`,
|
|
23
|
+
...body.map((row) => `| ${pad(row).join(" | ")} |`),
|
|
24
|
+
].join("\n");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** RFC 4180 引号规则,直接可粘进 Excel / Numbers。 */
|
|
28
|
+
export function toCsv(rows: string[][]): string {
|
|
29
|
+
const quote = (value: string): string => (/[",\n]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value);
|
|
30
|
+
return rows.map((row) => row.map(quote).join(",")).join("\n");
|
|
31
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import claudeIcon from "@lobehub/icons-static-svg/icons/claude-color.svg?url";
|
|
2
|
+
import deepseekIcon from "@lobehub/icons-static-svg/icons/deepseek-color.svg?url";
|
|
3
|
+
import geminiIcon from "@lobehub/icons-static-svg/icons/gemini-color.svg?url";
|
|
4
|
+
import grokIcon from "@lobehub/icons-static-svg/icons/grok.svg?url";
|
|
5
|
+
import kimiIcon from "@lobehub/icons-static-svg/icons/kimi-color.svg?url";
|
|
6
|
+
import minimaxIcon from "@lobehub/icons-static-svg/icons/minimax-color.svg?url";
|
|
7
|
+
import nvidiaIcon from "@lobehub/icons-static-svg/icons/nvidia-color.svg?url";
|
|
8
|
+
import ollamaIcon from "@lobehub/icons-static-svg/icons/ollama.svg?url";
|
|
9
|
+
import openaiIcon from "@lobehub/icons-static-svg/icons/openai.svg?url";
|
|
10
|
+
import opencodeIcon from "@lobehub/icons-static-svg/icons/opencode.svg?url";
|
|
11
|
+
import qwenIcon from "@lobehub/icons-static-svg/icons/qwen-color.svg?url";
|
|
12
|
+
import xiaomiMimoIcon from "@lobehub/icons-static-svg/icons/xiaomimimo.svg?url";
|
|
13
|
+
import zaiIcon from "@lobehub/icons-static-svg/icons/zai.svg?url";
|
|
14
|
+
import zhipuIcon from "@lobehub/icons-static-svg/icons/zhipu-color.svg?url";
|
|
15
|
+
|
|
16
|
+
type ProviderIconAppearance = "color" | "monochrome";
|
|
17
|
+
|
|
18
|
+
interface ProviderIconAsset {
|
|
19
|
+
readonly src: string;
|
|
20
|
+
readonly appearance: ProviderIconAppearance;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const PROVIDER_ICON_ASSETS = {
|
|
24
|
+
claude: { src: claudeIcon, appearance: "color" },
|
|
25
|
+
openai: { src: openaiIcon, appearance: "monochrome" },
|
|
26
|
+
gemini: { src: geminiIcon, appearance: "color" },
|
|
27
|
+
deepseek: { src: deepseekIcon, appearance: "color" },
|
|
28
|
+
grok: { src: grokIcon, appearance: "monochrome" },
|
|
29
|
+
qwen: { src: qwenIcon, appearance: "color" },
|
|
30
|
+
kimi: { src: kimiIcon, appearance: "color" },
|
|
31
|
+
minimax: { src: minimaxIcon, appearance: "color" },
|
|
32
|
+
nvidia: { src: nvidiaIcon, appearance: "color" },
|
|
33
|
+
ollama: { src: ollamaIcon, appearance: "monochrome" },
|
|
34
|
+
xiaomi: { src: xiaomiMimoIcon, appearance: "monochrome" },
|
|
35
|
+
zai: { src: zaiIcon, appearance: "monochrome" },
|
|
36
|
+
zhipu: { src: zhipuIcon, appearance: "color" },
|
|
37
|
+
opencode: { src: opencodeIcon, appearance: "monochrome" },
|
|
38
|
+
} as const satisfies Record<string, ProviderIconAsset>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 供应商 symbol 到打包后资源 URL 的公共映射。
|
|
42
|
+
* SVG 源文件来自依赖包,由构建工具收集,不存放在仓库中。
|
|
43
|
+
*/
|
|
44
|
+
export const PROVIDER_ICONS: Record<string, string> = Object.fromEntries(
|
|
45
|
+
Object.entries(PROVIDER_ICON_ASSETS).map(([symbol, asset]) => [symbol, asset.src]),
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export function getProviderIcon(symbol: string | undefined | null): string | undefined {
|
|
49
|
+
if (!symbol || !Object.hasOwn(PROVIDER_ICONS, symbol)) return undefined;
|
|
50
|
+
return PROVIDER_ICONS[symbol];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function isMonochromeProviderIcon(symbol: string | undefined | null): boolean {
|
|
54
|
+
if (!symbol || !Object.hasOwn(PROVIDER_ICON_ASSETS, symbol)) return false;
|
|
55
|
+
return PROVIDER_ICON_ASSETS[symbol as keyof typeof PROVIDER_ICON_ASSETS].appearance === "monochrome";
|
|
56
|
+
}
|