claudeup 1.7.0 → 3.3.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/bin/claudeup.js +20 -2
- package/package.json +10 -19
- package/src/data/cli-tools.js +123 -0
- package/src/data/cli-tools.ts +140 -0
- package/{dist → src}/data/marketplaces.js +23 -24
- package/src/data/marketplaces.ts +95 -0
- package/src/data/mcp-servers.js +509 -0
- package/src/data/mcp-servers.ts +526 -0
- package/src/data/statuslines.js +159 -0
- package/src/data/statuslines.ts +188 -0
- package/src/index.js +4 -0
- package/src/index.ts +5 -0
- package/{dist → src}/main.js +46 -47
- package/src/main.tsx +145 -0
- package/src/opentui.d.ts +191 -0
- package/src/prerunner/index.js +87 -0
- package/src/prerunner/index.ts +124 -0
- package/{dist → src}/services/claude-runner.js +9 -10
- package/src/services/claude-runner.ts +31 -0
- package/{dist → src}/services/claude-settings.js +72 -33
- package/src/services/claude-settings.ts +934 -0
- package/src/services/local-marketplace.js +339 -0
- package/src/services/local-marketplace.ts +489 -0
- package/{dist → src}/services/mcp-registry.js +13 -14
- package/src/services/mcp-registry.ts +105 -0
- package/{dist → src}/services/plugin-manager.js +61 -13
- package/src/services/plugin-manager.ts +693 -0
- package/{dist → src}/services/plugin-mcp-config.js +19 -18
- package/src/services/plugin-mcp-config.ts +242 -0
- package/{dist → src}/services/update-cache.js +7 -8
- package/src/services/update-cache.ts +78 -0
- package/{dist → src}/services/version-check.js +15 -14
- package/src/services/version-check.ts +122 -0
- package/src/types/index.js +1 -0
- package/src/types/index.ts +141 -0
- package/src/ui/App.js +213 -0
- package/src/ui/App.tsx +359 -0
- package/src/ui/components/CategoryHeader.js +9 -0
- package/src/ui/components/CategoryHeader.tsx +41 -0
- package/{dist → src}/ui/components/ScrollableList.js +19 -6
- package/src/ui/components/ScrollableList.tsx +98 -0
- package/src/ui/components/SearchInput.js +19 -0
- package/src/ui/components/SearchInput.tsx +56 -0
- package/src/ui/components/StyledText.js +39 -0
- package/src/ui/components/StyledText.tsx +70 -0
- package/src/ui/components/TabBar.js +38 -0
- package/src/ui/components/TabBar.tsx +88 -0
- package/src/ui/components/layout/Panel.js +6 -0
- package/src/ui/components/layout/Panel.tsx +62 -0
- package/src/ui/components/layout/ProgressBar.js +14 -0
- package/src/ui/components/layout/ProgressBar.tsx +47 -0
- package/src/ui/components/layout/ScopeTabs.js +6 -0
- package/src/ui/components/layout/ScopeTabs.tsx +53 -0
- package/src/ui/components/layout/ScreenLayout.js +21 -0
- package/src/ui/components/layout/ScreenLayout.tsx +147 -0
- package/src/ui/components/layout/index.js +4 -0
- package/src/ui/components/layout/index.ts +4 -0
- package/src/ui/components/modals/ConfirmModal.js +14 -0
- package/src/ui/components/modals/ConfirmModal.tsx +59 -0
- package/src/ui/components/modals/InputModal.js +16 -0
- package/src/ui/components/modals/InputModal.tsx +68 -0
- package/src/ui/components/modals/LoadingModal.js +14 -0
- package/src/ui/components/modals/LoadingModal.tsx +40 -0
- package/src/ui/components/modals/MessageModal.js +16 -0
- package/src/ui/components/modals/MessageModal.tsx +64 -0
- package/src/ui/components/modals/ModalContainer.js +56 -0
- package/src/ui/components/modals/ModalContainer.tsx +104 -0
- package/src/ui/components/modals/SelectModal.js +26 -0
- package/src/ui/components/modals/SelectModal.tsx +82 -0
- package/src/ui/components/modals/index.js +6 -0
- package/src/ui/components/modals/index.ts +6 -0
- package/src/ui/hooks/index.js +3 -0
- package/src/ui/hooks/index.ts +3 -0
- package/{dist → src}/ui/hooks/useAsyncData.js +21 -22
- package/src/ui/hooks/useAsyncData.ts +127 -0
- package/src/ui/hooks/useKeyboard.js +13 -0
- package/src/ui/hooks/useKeyboard.ts +26 -0
- package/src/ui/hooks/useKeyboardHandler.js +39 -0
- package/src/ui/hooks/useKeyboardHandler.ts +63 -0
- package/{dist → src}/ui/screens/CliToolsScreen.js +60 -54
- package/src/ui/screens/CliToolsScreen.tsx +468 -0
- package/src/ui/screens/EnvVarsScreen.js +154 -0
- package/src/ui/screens/EnvVarsScreen.tsx +269 -0
- package/{dist → src}/ui/screens/McpRegistryScreen.js +56 -55
- package/src/ui/screens/McpRegistryScreen.tsx +331 -0
- package/{dist → src}/ui/screens/McpScreen.js +46 -47
- package/src/ui/screens/McpScreen.tsx +392 -0
- package/src/ui/screens/ModelSelectorScreen.js +292 -0
- package/src/ui/screens/ModelSelectorScreen.tsx +441 -0
- package/{dist → src}/ui/screens/PluginsScreen.js +305 -293
- package/src/ui/screens/PluginsScreen.tsx +1231 -0
- package/src/ui/screens/StatusLineScreen.js +200 -0
- package/src/ui/screens/StatusLineScreen.tsx +411 -0
- package/src/ui/screens/index.js +7 -0
- package/src/ui/screens/index.ts +7 -0
- package/src/ui/state/AnimationContext.js +34 -0
- package/src/ui/state/AnimationContext.tsx +76 -0
- package/{dist → src}/ui/state/AppContext.js +31 -32
- package/src/ui/state/AppContext.tsx +235 -0
- package/{dist → src}/ui/state/DimensionsContext.js +16 -17
- package/src/ui/state/DimensionsContext.tsx +144 -0
- package/{dist → src}/ui/state/reducer.js +89 -90
- package/src/ui/state/reducer.ts +467 -0
- package/src/ui/state/types.js +1 -0
- package/src/ui/state/types.ts +273 -0
- package/{dist → src}/utils/command-utils.js +3 -4
- package/src/utils/command-utils.ts +20 -0
- package/{dist → src}/utils/fuzzy-search.js +2 -3
- package/src/utils/fuzzy-search.ts +138 -0
- package/{dist → src}/utils/string-utils.js +6 -6
- package/src/utils/string-utils.ts +88 -0
- package/dist/data/cli-tools.d.ts +0 -13
- package/dist/data/cli-tools.d.ts.map +0 -1
- package/dist/data/cli-tools.js +0 -124
- package/dist/data/cli-tools.js.map +0 -1
- package/dist/data/marketplaces.d.ts +0 -6
- package/dist/data/marketplaces.d.ts.map +0 -1
- package/dist/data/marketplaces.js.map +0 -1
- package/dist/data/mcp-servers.d.ts +0 -8
- package/dist/data/mcp-servers.d.ts.map +0 -1
- package/dist/data/mcp-servers.js +0 -503
- package/dist/data/mcp-servers.js.map +0 -1
- package/dist/data/statuslines.d.ts +0 -10
- package/dist/data/statuslines.d.ts.map +0 -1
- package/dist/data/statuslines.js +0 -160
- package/dist/data/statuslines.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -90
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts +0 -3
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/prerunner/index.d.ts +0 -7
- package/dist/prerunner/index.d.ts.map +0 -1
- package/dist/prerunner/index.js +0 -64
- package/dist/prerunner/index.js.map +0 -1
- package/dist/services/claude-runner.d.ts +0 -7
- package/dist/services/claude-runner.d.ts.map +0 -1
- package/dist/services/claude-runner.js.map +0 -1
- package/dist/services/claude-settings.d.ts +0 -73
- package/dist/services/claude-settings.d.ts.map +0 -1
- package/dist/services/claude-settings.js.map +0 -1
- package/dist/services/local-marketplace.d.ts +0 -111
- package/dist/services/local-marketplace.d.ts.map +0 -1
- package/dist/services/local-marketplace.js +0 -599
- package/dist/services/local-marketplace.js.map +0 -1
- package/dist/services/mcp-registry.d.ts +0 -10
- package/dist/services/mcp-registry.d.ts.map +0 -1
- package/dist/services/mcp-registry.js.map +0 -1
- package/dist/services/plugin-manager.d.ts +0 -65
- package/dist/services/plugin-manager.d.ts.map +0 -1
- package/dist/services/plugin-manager.js.map +0 -1
- package/dist/services/plugin-mcp-config.d.ts +0 -52
- package/dist/services/plugin-mcp-config.d.ts.map +0 -1
- package/dist/services/plugin-mcp-config.js.map +0 -1
- package/dist/services/update-cache.d.ts +0 -16
- package/dist/services/update-cache.d.ts.map +0 -1
- package/dist/services/update-cache.js.map +0 -1
- package/dist/services/version-check.d.ts +0 -20
- package/dist/services/version-check.d.ts.map +0 -1
- package/dist/services/version-check.js.map +0 -1
- package/dist/types/index.d.ts +0 -105
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/ui/InkApp.d.ts +0 -5
- package/dist/ui/InkApp.d.ts.map +0 -1
- package/dist/ui/InkApp.js +0 -188
- package/dist/ui/InkApp.js.map +0 -1
- package/dist/ui/components/CategoryHeader.d.ts +0 -16
- package/dist/ui/components/CategoryHeader.d.ts.map +0 -1
- package/dist/ui/components/CategoryHeader.js +0 -11
- package/dist/ui/components/CategoryHeader.js.map +0 -1
- package/dist/ui/components/ScrollableList.d.ts +0 -16
- package/dist/ui/components/ScrollableList.d.ts.map +0 -1
- package/dist/ui/components/ScrollableList.js.map +0 -1
- package/dist/ui/components/SearchInput.d.ts +0 -18
- package/dist/ui/components/SearchInput.d.ts.map +0 -1
- package/dist/ui/components/SearchInput.js +0 -30
- package/dist/ui/components/SearchInput.js.map +0 -1
- package/dist/ui/components/TabBar.d.ts +0 -8
- package/dist/ui/components/TabBar.d.ts.map +0 -1
- package/dist/ui/components/TabBar.js +0 -18
- package/dist/ui/components/TabBar.js.map +0 -1
- package/dist/ui/components/layout/Footer.d.ts +0 -14
- package/dist/ui/components/layout/Footer.d.ts.map +0 -1
- package/dist/ui/components/layout/Footer.js +0 -23
- package/dist/ui/components/layout/Footer.js.map +0 -1
- package/dist/ui/components/layout/Header.d.ts +0 -4
- package/dist/ui/components/layout/Header.d.ts.map +0 -1
- package/dist/ui/components/layout/Header.js +0 -25
- package/dist/ui/components/layout/Header.js.map +0 -1
- package/dist/ui/components/layout/Panel.d.ts +0 -22
- package/dist/ui/components/layout/Panel.d.ts.map +0 -1
- package/dist/ui/components/layout/Panel.js +0 -8
- package/dist/ui/components/layout/Panel.js.map +0 -1
- package/dist/ui/components/layout/ProgressBar.d.ts +0 -12
- package/dist/ui/components/layout/ProgressBar.d.ts.map +0 -1
- package/dist/ui/components/layout/ProgressBar.js +0 -16
- package/dist/ui/components/layout/ProgressBar.js.map +0 -1
- package/dist/ui/components/layout/ScopeTabs.d.ts +0 -12
- package/dist/ui/components/layout/ScopeTabs.d.ts.map +0 -1
- package/dist/ui/components/layout/ScopeTabs.js +0 -8
- package/dist/ui/components/layout/ScopeTabs.js.map +0 -1
- package/dist/ui/components/layout/ScreenLayout.d.ts +0 -30
- package/dist/ui/components/layout/ScreenLayout.d.ts.map +0 -1
- package/dist/ui/components/layout/ScreenLayout.js +0 -23
- package/dist/ui/components/layout/ScreenLayout.js.map +0 -1
- package/dist/ui/components/layout/index.d.ts +0 -7
- package/dist/ui/components/layout/index.d.ts.map +0 -1
- package/dist/ui/components/layout/index.js +0 -7
- package/dist/ui/components/layout/index.js.map +0 -1
- package/dist/ui/components/modals/ConfirmModal.d.ts +0 -14
- package/dist/ui/components/modals/ConfirmModal.d.ts.map +0 -1
- package/dist/ui/components/modals/ConfirmModal.js +0 -15
- package/dist/ui/components/modals/ConfirmModal.js.map +0 -1
- package/dist/ui/components/modals/InputModal.d.ts +0 -16
- package/dist/ui/components/modals/InputModal.d.ts.map +0 -1
- package/dist/ui/components/modals/InputModal.js +0 -23
- package/dist/ui/components/modals/InputModal.js.map +0 -1
- package/dist/ui/components/modals/LoadingModal.d.ts +0 -8
- package/dist/ui/components/modals/LoadingModal.d.ts.map +0 -1
- package/dist/ui/components/modals/LoadingModal.js +0 -8
- package/dist/ui/components/modals/LoadingModal.js.map +0 -1
- package/dist/ui/components/modals/MessageModal.d.ts +0 -14
- package/dist/ui/components/modals/MessageModal.d.ts.map +0 -1
- package/dist/ui/components/modals/MessageModal.js +0 -17
- package/dist/ui/components/modals/MessageModal.js.map +0 -1
- package/dist/ui/components/modals/ModalContainer.d.ts +0 -7
- package/dist/ui/components/modals/ModalContainer.d.ts.map +0 -1
- package/dist/ui/components/modals/ModalContainer.js +0 -38
- package/dist/ui/components/modals/ModalContainer.js.map +0 -1
- package/dist/ui/components/modals/SelectModal.d.ts +0 -17
- package/dist/ui/components/modals/SelectModal.d.ts.map +0 -1
- package/dist/ui/components/modals/SelectModal.js +0 -33
- package/dist/ui/components/modals/SelectModal.js.map +0 -1
- package/dist/ui/components/modals/index.d.ts +0 -7
- package/dist/ui/components/modals/index.d.ts.map +0 -1
- package/dist/ui/components/modals/index.js +0 -7
- package/dist/ui/components/modals/index.js.map +0 -1
- package/dist/ui/hooks/index.d.ts +0 -3
- package/dist/ui/hooks/index.d.ts.map +0 -1
- package/dist/ui/hooks/index.js +0 -3
- package/dist/ui/hooks/index.js.map +0 -1
- package/dist/ui/hooks/useAsyncData.d.ts +0 -40
- package/dist/ui/hooks/useAsyncData.d.ts.map +0 -1
- package/dist/ui/hooks/useAsyncData.js.map +0 -1
- package/dist/ui/hooks/useKeyboardNavigation.d.ts +0 -27
- package/dist/ui/hooks/useKeyboardNavigation.d.ts.map +0 -1
- package/dist/ui/hooks/useKeyboardNavigation.js +0 -82
- package/dist/ui/hooks/useKeyboardNavigation.js.map +0 -1
- package/dist/ui/screens/CliToolsScreen.d.ts +0 -4
- package/dist/ui/screens/CliToolsScreen.d.ts.map +0 -1
- package/dist/ui/screens/CliToolsScreen.js.map +0 -1
- package/dist/ui/screens/EnvVarsScreen.d.ts +0 -4
- package/dist/ui/screens/EnvVarsScreen.d.ts.map +0 -1
- package/dist/ui/screens/EnvVarsScreen.js +0 -145
- package/dist/ui/screens/EnvVarsScreen.js.map +0 -1
- package/dist/ui/screens/McpRegistryScreen.d.ts +0 -4
- package/dist/ui/screens/McpRegistryScreen.d.ts.map +0 -1
- package/dist/ui/screens/McpRegistryScreen.js.map +0 -1
- package/dist/ui/screens/McpScreen.d.ts +0 -4
- package/dist/ui/screens/McpScreen.d.ts.map +0 -1
- package/dist/ui/screens/McpScreen.js.map +0 -1
- package/dist/ui/screens/ModelSelectorScreen.d.ts +0 -4
- package/dist/ui/screens/ModelSelectorScreen.d.ts.map +0 -1
- package/dist/ui/screens/ModelSelectorScreen.js +0 -143
- package/dist/ui/screens/ModelSelectorScreen.js.map +0 -1
- package/dist/ui/screens/PluginsScreen.d.ts +0 -4
- package/dist/ui/screens/PluginsScreen.d.ts.map +0 -1
- package/dist/ui/screens/PluginsScreen.js.map +0 -1
- package/dist/ui/screens/StatusLineScreen.d.ts +0 -4
- package/dist/ui/screens/StatusLineScreen.d.ts.map +0 -1
- package/dist/ui/screens/StatusLineScreen.js +0 -197
- package/dist/ui/screens/StatusLineScreen.js.map +0 -1
- package/dist/ui/screens/index.d.ts +0 -8
- package/dist/ui/screens/index.d.ts.map +0 -1
- package/dist/ui/screens/index.js +0 -8
- package/dist/ui/screens/index.js.map +0 -1
- package/dist/ui/state/AppContext.d.ts +0 -40
- package/dist/ui/state/AppContext.d.ts.map +0 -1
- package/dist/ui/state/AppContext.js.map +0 -1
- package/dist/ui/state/DimensionsContext.d.ts +0 -27
- package/dist/ui/state/DimensionsContext.d.ts.map +0 -1
- package/dist/ui/state/DimensionsContext.js.map +0 -1
- package/dist/ui/state/reducer.d.ts +0 -4
- package/dist/ui/state/reducer.d.ts.map +0 -1
- package/dist/ui/state/reducer.js.map +0 -1
- package/dist/ui/state/types.d.ts +0 -266
- package/dist/ui/state/types.d.ts.map +0 -1
- package/dist/ui/state/types.js +0 -2
- package/dist/ui/state/types.js.map +0 -1
- package/dist/utils/command-utils.d.ts +0 -8
- package/dist/utils/command-utils.d.ts.map +0 -1
- package/dist/utils/command-utils.js.map +0 -1
- package/dist/utils/fuzzy-search.d.ts +0 -33
- package/dist/utils/fuzzy-search.d.ts.map +0 -1
- package/dist/utils/fuzzy-search.js.map +0 -1
- package/dist/utils/string-utils.d.ts +0 -24
- package/dist/utils/string-utils.d.ts.map +0 -1
- package/dist/utils/string-utils.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import type { StatusLineConfig } from "../types/index.js";
|
|
2
|
+
|
|
3
|
+
export interface StatusLineCategory {
|
|
4
|
+
name: string;
|
|
5
|
+
color: string;
|
|
6
|
+
presets: StatusLineConfig[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const statusLineCategories: StatusLineCategory[] = [
|
|
10
|
+
{
|
|
11
|
+
name: "🎨 Color Themes",
|
|
12
|
+
color: "magenta",
|
|
13
|
+
presets: [
|
|
14
|
+
{
|
|
15
|
+
name: "🌸 Catppuccin",
|
|
16
|
+
description: "Soothing pastel (most popular 2024)",
|
|
17
|
+
template:
|
|
18
|
+
"* {model} | {git_branch} | {input_tokens}v {output_tokens}^ | ${cost} | {cwd}",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "🧛 Dracula",
|
|
22
|
+
description: "Classic dark with purple vibes",
|
|
23
|
+
template:
|
|
24
|
+
"{model} > {git_branch} > {input_tokens}v {output_tokens}^ > ${cost} > {cwd}",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "❄️ Nord",
|
|
28
|
+
description: "Arctic, bluish & clean",
|
|
29
|
+
template:
|
|
30
|
+
"~ {model} | {git_branch} | {input_tokens}< {output_tokens}> | ${cost} | {cwd}",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "🍂 Gruvbox",
|
|
34
|
+
description: "Warm retro terminal feel",
|
|
35
|
+
template:
|
|
36
|
+
">> {model} :: {git_branch} :: {input_tokens}v {output_tokens}^ :: ${cost} :: {cwd}",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "🌃 Tokyo Night",
|
|
40
|
+
description: "Neon city vibes",
|
|
41
|
+
template:
|
|
42
|
+
"> {model} | {git_branch} | {input_tokens}v {output_tokens}^ | ${cost} | {cwd}",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "🌹 Rose Pine",
|
|
46
|
+
description: "Soft, romantic & elegant",
|
|
47
|
+
template:
|
|
48
|
+
"@ {model} : {git_branch} : {input_tokens}v {output_tokens}^ : ${cost} : {cwd}",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "🚀 Shell Prompts",
|
|
54
|
+
color: "cyan",
|
|
55
|
+
presets: [
|
|
56
|
+
{
|
|
57
|
+
name: "⭐ Starship",
|
|
58
|
+
description: "Blazing fast, minimal & smart",
|
|
59
|
+
template:
|
|
60
|
+
"-> {model} | {git_branch} | {input_tokens}v {output_tokens}^ | ${cost} | {cwd}",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "⚡ Powerline",
|
|
64
|
+
description: "Classic powerline segments",
|
|
65
|
+
template:
|
|
66
|
+
"{model} > {git_branch} > {input_tokens}v {output_tokens}^ > ${cost} > {cwd}",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "💻 Developer",
|
|
72
|
+
color: "green",
|
|
73
|
+
presets: [
|
|
74
|
+
{
|
|
75
|
+
name: "🖥️ Hacker",
|
|
76
|
+
description: "Matrix-inspired with all metrics",
|
|
77
|
+
template:
|
|
78
|
+
"[{model}] [{git_branch}] [v{input_tokens} ^{output_tokens}] [${cost}] [{cwd}]",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "🔧 DevOps",
|
|
82
|
+
description: "Infrastructure-focused",
|
|
83
|
+
template:
|
|
84
|
+
"# {model} | {git_branch} | {input_tokens}/{output_tokens} | ${cost} | {cwd}",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "📊 Metrics",
|
|
88
|
+
description: "Data-focused with stats",
|
|
89
|
+
template:
|
|
90
|
+
"* {model} | {session_duration} | v{input_tokens} ^{output_tokens} | ${cost}",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "🌿 Git First",
|
|
94
|
+
description: "Branch name prominent",
|
|
95
|
+
template: "[{git_branch}] {model} | ${cost} | {cwd}",
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "✨ Minimal",
|
|
101
|
+
color: "white",
|
|
102
|
+
presets: [
|
|
103
|
+
{
|
|
104
|
+
name: "🧘 Zen",
|
|
105
|
+
description: "Minimalist & distraction-free",
|
|
106
|
+
template: "{model_short} - ${cost}",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "💎 Clean",
|
|
110
|
+
description: "Simple & elegant",
|
|
111
|
+
template: "{model} -- ${cost} -- {cwd}",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "➡️ Arrow",
|
|
115
|
+
description: "Compact with direction",
|
|
116
|
+
template: "> {model} > ${cost} > {git_branch}",
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "🎮 Fun",
|
|
122
|
+
color: "yellow",
|
|
123
|
+
presets: [
|
|
124
|
+
{
|
|
125
|
+
name: "👾 Retro",
|
|
126
|
+
description: "8-bit gaming aesthetic",
|
|
127
|
+
template:
|
|
128
|
+
"[ {model} ] * {git_branch} * v{input_tokens} ^{output_tokens} * ${cost}",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "📦 Brackets",
|
|
132
|
+
description: "Everything in brackets",
|
|
133
|
+
template:
|
|
134
|
+
"[{model}] [{git_branch}] [in:{input_tokens}] [out:{output_tokens}] [${cost}] [{cwd}]",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "🔀 Pipes",
|
|
138
|
+
description: "Unix pipe style",
|
|
139
|
+
template:
|
|
140
|
+
"{model} | {git_branch} | in:{input_tokens} out:{output_tokens} | ${cost} | {cwd}",
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: "📱 Compact",
|
|
146
|
+
color: "blue",
|
|
147
|
+
presets: [
|
|
148
|
+
{
|
|
149
|
+
name: "🔬 Micro",
|
|
150
|
+
description: "Ultra-compact essentials",
|
|
151
|
+
template: "{model_short} ${cost}",
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "〉Chevron",
|
|
155
|
+
description: "Chevron separators",
|
|
156
|
+
template: "{model_short} > ${cost} > {git_branch}",
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "⏱️ Time",
|
|
162
|
+
color: "red",
|
|
163
|
+
presets: [
|
|
164
|
+
{
|
|
165
|
+
name: "⏰ Timer",
|
|
166
|
+
description: "Session time focused",
|
|
167
|
+
template:
|
|
168
|
+
"[{session_duration}] {model} | v{input_tokens} ^{output_tokens} | ${cost}",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "📅 Session",
|
|
172
|
+
description: "Full session overview",
|
|
173
|
+
template:
|
|
174
|
+
"{model} | {session_duration} | {input_tokens}/{output_tokens} | ${cost} | {cwd}",
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
];
|
|
179
|
+
|
|
180
|
+
// Flatten for backward compatibility
|
|
181
|
+
export const statusLinePresets: StatusLineConfig[] =
|
|
182
|
+
statusLineCategories.flatMap((cat) => cat.presets);
|
|
183
|
+
|
|
184
|
+
export function getStatusLineByName(
|
|
185
|
+
name: string,
|
|
186
|
+
): StatusLineConfig | undefined {
|
|
187
|
+
return statusLinePresets.find((s) => s.name === name);
|
|
188
|
+
}
|
package/src/index.js
ADDED
package/src/index.ts
ADDED
package/{dist → src}/main.js
RENAMED
|
@@ -1,61 +1,66 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const SHOW_CURSOR = '\x1b[?25h';
|
|
13
|
-
const CLEAR_SCREEN = '\x1b[2J\x1b[H';
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
3
|
+
import { createCliRenderer } from "@opentui/core";
|
|
4
|
+
import { createRoot } from "@opentui/react";
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
|
+
import { App } from "./ui/App.js";
|
|
7
|
+
import { prerunClaude } from "./prerunner/index.js";
|
|
8
|
+
import { checkForUpdates } from "./services/version-check.js";
|
|
9
|
+
export const VERSION = "3.0.0";
|
|
10
|
+
// Note: OpenTUI renderer handles alternate screen buffer automatically
|
|
11
|
+
// No need for manual ANSI escape codes
|
|
14
12
|
async function main() {
|
|
15
13
|
const args = process.argv.slice(2);
|
|
16
14
|
// Handle "claudeup claude [args]" - prerunner mode
|
|
17
|
-
if (args[0] ===
|
|
15
|
+
if (args[0] === "claude") {
|
|
18
16
|
const claudeArgs = args.slice(1);
|
|
19
|
-
|
|
17
|
+
// Parse prerunner-specific flags
|
|
18
|
+
const forceUpdate = claudeArgs.includes("--force") || claudeArgs.includes("-f");
|
|
19
|
+
// Remove prerunner flags before passing to claude
|
|
20
|
+
const filteredArgs = claudeArgs.filter((arg) => arg !== "--force" && arg !== "-f");
|
|
21
|
+
const exitCode = await prerunClaude(filteredArgs, { force: forceUpdate });
|
|
20
22
|
process.exit(exitCode);
|
|
21
23
|
return;
|
|
22
24
|
}
|
|
23
25
|
// Handle "claudeup update" - self-update command
|
|
24
|
-
if (args[0] ===
|
|
26
|
+
if (args[0] === "update") {
|
|
25
27
|
// Detect how claudeup was installed by checking the executable path
|
|
26
|
-
const { execSync } = await import(
|
|
28
|
+
const { execSync } = await import("node:child_process");
|
|
27
29
|
let usesBun = false;
|
|
28
30
|
try {
|
|
29
|
-
const claudeupPath = execSync(
|
|
30
|
-
|
|
31
|
+
const claudeupPath = execSync("which claudeup", {
|
|
32
|
+
encoding: "utf-8",
|
|
33
|
+
}).trim();
|
|
34
|
+
usesBun =
|
|
35
|
+
claudeupPath.includes(".bun") || claudeupPath.includes("bun/bin");
|
|
31
36
|
}
|
|
32
37
|
catch {
|
|
33
38
|
// If which fails, default to npm
|
|
34
39
|
}
|
|
35
|
-
const pkgManager = usesBun ?
|
|
40
|
+
const pkgManager = usesBun ? "bun" : "npm";
|
|
36
41
|
console.log(`Updating claudeup using ${pkgManager}...`);
|
|
37
42
|
const installArgs = usesBun
|
|
38
|
-
? [
|
|
39
|
-
: [
|
|
43
|
+
? ["install", "-g", "claudeup@latest"]
|
|
44
|
+
: ["install", "-g", "claudeup@latest"];
|
|
40
45
|
const proc = spawn(pkgManager, installArgs, {
|
|
41
|
-
stdio:
|
|
46
|
+
stdio: "inherit",
|
|
42
47
|
shell: false, // Avoid shell for security (fixes DEP0190 warning)
|
|
43
48
|
});
|
|
44
|
-
proc.on(
|
|
49
|
+
proc.on("exit", (code) => process.exit(code || 0));
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
47
52
|
// Handle --version flag - show version and check for updates
|
|
48
|
-
if (args.includes(
|
|
53
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
49
54
|
console.log(`claudeup v${VERSION}`);
|
|
50
55
|
const result = await checkForUpdates();
|
|
51
56
|
if (result.updateAvailable) {
|
|
52
57
|
console.log(`\nUpdate available: v${result.latestVersion}`);
|
|
53
|
-
console.log(
|
|
58
|
+
console.log("Run: claudeup update");
|
|
54
59
|
}
|
|
55
60
|
process.exit(0);
|
|
56
61
|
}
|
|
57
62
|
// Handle --help flag
|
|
58
|
-
if (args.includes(
|
|
63
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
59
64
|
console.log(`claudeup v${VERSION}
|
|
60
65
|
|
|
61
66
|
TUI tool for managing Claude Code plugins, MCPs, and configuration.
|
|
@@ -71,6 +76,7 @@ Options:
|
|
|
71
76
|
|
|
72
77
|
Commands:
|
|
73
78
|
claude [args...] Check for plugin updates (1h cache), then run claude
|
|
79
|
+
-f, --force Force update check (bypass 1h cache)
|
|
74
80
|
update Update claudeup itself to latest version
|
|
75
81
|
|
|
76
82
|
Navigation:
|
|
@@ -90,35 +96,28 @@ Keys:
|
|
|
90
96
|
`);
|
|
91
97
|
process.exit(0);
|
|
92
98
|
}
|
|
93
|
-
//
|
|
94
|
-
|
|
99
|
+
// Create OpenTUI renderer (handles alternate screen buffer automatically)
|
|
100
|
+
const renderer = await createCliRenderer();
|
|
101
|
+
const root = createRoot(renderer);
|
|
95
102
|
// Cleanup function to restore terminal
|
|
96
103
|
const cleanup = () => {
|
|
97
|
-
|
|
104
|
+
root.unmount();
|
|
105
|
+
renderer.destroy(); // CRITICAL: Never use process.exit() directly
|
|
98
106
|
};
|
|
99
|
-
// Render the Ink app
|
|
100
|
-
const { waitUntilExit, clear, unmount } = render(_jsx(App, {}), {
|
|
101
|
-
exitOnCtrlC: false, // We'll handle it ourselves
|
|
102
|
-
});
|
|
103
107
|
// Handle cleanup on exit signals
|
|
104
108
|
const handleExit = () => {
|
|
105
|
-
clear();
|
|
106
|
-
unmount();
|
|
107
109
|
cleanup();
|
|
110
|
+
// Exit after cleanup completes
|
|
108
111
|
process.exit(0);
|
|
109
112
|
};
|
|
110
|
-
process.on(
|
|
111
|
-
process.on(
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
finally {
|
|
117
|
-
cleanup();
|
|
118
|
-
}
|
|
113
|
+
process.on("SIGINT", handleExit);
|
|
114
|
+
process.on("SIGTERM", handleExit);
|
|
115
|
+
// Render the OpenTUI app with exit handler
|
|
116
|
+
root.render(_jsx(App, { onExit: handleExit }));
|
|
117
|
+
// Wait indefinitely (app runs until user exits)
|
|
118
|
+
await new Promise(() => { });
|
|
119
119
|
}
|
|
120
120
|
main().catch((error) => {
|
|
121
|
-
console.error(
|
|
121
|
+
console.error("Error starting claudeup:", error);
|
|
122
122
|
process.exit(1);
|
|
123
123
|
});
|
|
124
|
-
//# sourceMappingURL=main.js.map
|
package/src/main.tsx
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
import { createCliRenderer } from "@opentui/core";
|
|
4
|
+
import { createRoot } from "@opentui/react";
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
|
+
import { App } from "./ui/App.js";
|
|
7
|
+
import { prerunClaude } from "./prerunner/index.js";
|
|
8
|
+
import { checkForUpdates } from "./services/version-check.js";
|
|
9
|
+
|
|
10
|
+
export const VERSION = "3.0.0";
|
|
11
|
+
|
|
12
|
+
// Note: OpenTUI renderer handles alternate screen buffer automatically
|
|
13
|
+
// No need for manual ANSI escape codes
|
|
14
|
+
|
|
15
|
+
async function main(): Promise<void> {
|
|
16
|
+
const args = process.argv.slice(2);
|
|
17
|
+
|
|
18
|
+
// Handle "claudeup claude [args]" - prerunner mode
|
|
19
|
+
if (args[0] === "claude") {
|
|
20
|
+
const claudeArgs = args.slice(1);
|
|
21
|
+
|
|
22
|
+
// Parse prerunner-specific flags
|
|
23
|
+
const forceUpdate =
|
|
24
|
+
claudeArgs.includes("--force") || claudeArgs.includes("-f");
|
|
25
|
+
|
|
26
|
+
// Remove prerunner flags before passing to claude
|
|
27
|
+
const filteredArgs = claudeArgs.filter(
|
|
28
|
+
(arg) => arg !== "--force" && arg !== "-f",
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const exitCode = await prerunClaude(filteredArgs, { force: forceUpdate });
|
|
32
|
+
process.exit(exitCode);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Handle "claudeup update" - self-update command
|
|
37
|
+
if (args[0] === "update") {
|
|
38
|
+
// Detect how claudeup was installed by checking the executable path
|
|
39
|
+
const { execSync } = await import("node:child_process");
|
|
40
|
+
let usesBun = false;
|
|
41
|
+
try {
|
|
42
|
+
const claudeupPath = execSync("which claudeup", {
|
|
43
|
+
encoding: "utf-8",
|
|
44
|
+
}).trim();
|
|
45
|
+
usesBun =
|
|
46
|
+
claudeupPath.includes(".bun") || claudeupPath.includes("bun/bin");
|
|
47
|
+
} catch {
|
|
48
|
+
// If which fails, default to npm
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const pkgManager = usesBun ? "bun" : "npm";
|
|
52
|
+
console.log(`Updating claudeup using ${pkgManager}...`);
|
|
53
|
+
|
|
54
|
+
const installArgs = usesBun
|
|
55
|
+
? ["install", "-g", "claudeup@latest"]
|
|
56
|
+
: ["install", "-g", "claudeup@latest"];
|
|
57
|
+
|
|
58
|
+
const proc = spawn(pkgManager, installArgs, {
|
|
59
|
+
stdio: "inherit",
|
|
60
|
+
shell: false, // Avoid shell for security (fixes DEP0190 warning)
|
|
61
|
+
});
|
|
62
|
+
proc.on("exit", (code) => process.exit(code || 0));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Handle --version flag - show version and check for updates
|
|
67
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
68
|
+
console.log(`claudeup v${VERSION}`);
|
|
69
|
+
const result = await checkForUpdates();
|
|
70
|
+
if (result.updateAvailable) {
|
|
71
|
+
console.log(`\nUpdate available: v${result.latestVersion}`);
|
|
72
|
+
console.log("Run: claudeup update");
|
|
73
|
+
}
|
|
74
|
+
process.exit(0);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Handle --help flag
|
|
78
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
79
|
+
console.log(`claudeup v${VERSION}
|
|
80
|
+
|
|
81
|
+
TUI tool for managing Claude Code plugins, MCPs, and configuration.
|
|
82
|
+
|
|
83
|
+
Usage: claudeup [options]
|
|
84
|
+
claudeup claude [args...] Run claude with auto-update prerunner
|
|
85
|
+
claudeup update Update claudeup to latest version
|
|
86
|
+
|
|
87
|
+
Options:
|
|
88
|
+
-v, --version Show version and check for updates
|
|
89
|
+
-h, --help Show this help message
|
|
90
|
+
--no-refresh Skip auto-refresh of marketplaces on startup
|
|
91
|
+
|
|
92
|
+
Commands:
|
|
93
|
+
claude [args...] Check for plugin updates (1h cache), then run claude
|
|
94
|
+
-f, --force Force update check (bypass 1h cache)
|
|
95
|
+
update Update claudeup itself to latest version
|
|
96
|
+
|
|
97
|
+
Navigation:
|
|
98
|
+
[1] Plugins Manage plugin marketplaces and installed plugins
|
|
99
|
+
[2] MCP Setup and manage MCP servers
|
|
100
|
+
[3] Status Configure status line display
|
|
101
|
+
[4] Env Environment variables for MCP servers
|
|
102
|
+
[5] Tools Install and update AI coding CLI tools
|
|
103
|
+
|
|
104
|
+
Keys:
|
|
105
|
+
↑/↓ or j/k Navigate
|
|
106
|
+
Enter Select / Toggle
|
|
107
|
+
g Toggle global/project scope (in Plugins)
|
|
108
|
+
r Refresh current screen
|
|
109
|
+
? Show help
|
|
110
|
+
q / Escape Back / Quit
|
|
111
|
+
`);
|
|
112
|
+
process.exit(0);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Create OpenTUI renderer (handles alternate screen buffer automatically)
|
|
116
|
+
const renderer = await createCliRenderer();
|
|
117
|
+
const root = createRoot(renderer);
|
|
118
|
+
|
|
119
|
+
// Cleanup function to restore terminal
|
|
120
|
+
const cleanup = () => {
|
|
121
|
+
root.unmount();
|
|
122
|
+
renderer.destroy(); // CRITICAL: Never use process.exit() directly
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Handle cleanup on exit signals
|
|
126
|
+
const handleExit = () => {
|
|
127
|
+
cleanup();
|
|
128
|
+
// Exit after cleanup completes
|
|
129
|
+
process.exit(0);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
process.on("SIGINT", handleExit);
|
|
133
|
+
process.on("SIGTERM", handleExit);
|
|
134
|
+
|
|
135
|
+
// Render the OpenTUI app with exit handler
|
|
136
|
+
root.render(<App onExit={handleExit} />);
|
|
137
|
+
|
|
138
|
+
// Wait indefinitely (app runs until user exits)
|
|
139
|
+
await new Promise(() => {});
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
main().catch((error) => {
|
|
143
|
+
console.error("Error starting claudeup:", error);
|
|
144
|
+
process.exit(1);
|
|
145
|
+
});
|
package/src/opentui.d.ts
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for OpenTUI React
|
|
3
|
+
*
|
|
4
|
+
* These declarations extend OpenTUI's types to be compatible with React 19's
|
|
5
|
+
* more permissive return types. React 19 allows components to return ReactNode
|
|
6
|
+
* (which includes undefined), while OpenTUI's intrinsic elements expect
|
|
7
|
+
* ReactElement | null.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { ReactNode } from "react";
|
|
11
|
+
|
|
12
|
+
declare global {
|
|
13
|
+
namespace JSX {
|
|
14
|
+
interface IntrinsicElements {
|
|
15
|
+
box: BoxProps & { children?: ReactNode };
|
|
16
|
+
text: TextProps & { children?: ReactNode };
|
|
17
|
+
input: InputProps;
|
|
18
|
+
select: SelectProps;
|
|
19
|
+
"tab-select": TabSelectProps;
|
|
20
|
+
scrollbox: ScrollboxProps & { children?: ReactNode };
|
|
21
|
+
"ascii-font": AsciiFontProps;
|
|
22
|
+
code: CodeProps;
|
|
23
|
+
"line-number": LineNumberProps;
|
|
24
|
+
diff: DiffProps;
|
|
25
|
+
br: Record<string, never>;
|
|
26
|
+
strong: { children?: ReactNode };
|
|
27
|
+
em: { children?: ReactNode };
|
|
28
|
+
u: { children?: ReactNode };
|
|
29
|
+
dim: { children?: ReactNode };
|
|
30
|
+
a: { href?: string; children?: ReactNode };
|
|
31
|
+
span: { fg?: string; bg?: string; children?: ReactNode };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface BaseBoxProps {
|
|
37
|
+
// Borders
|
|
38
|
+
border?: boolean;
|
|
39
|
+
borderStyle?: "single" | "double" | "rounded" | "bold";
|
|
40
|
+
borderColor?: string;
|
|
41
|
+
title?: string;
|
|
42
|
+
titleAlignment?: "left" | "center" | "right";
|
|
43
|
+
|
|
44
|
+
// Colors
|
|
45
|
+
backgroundColor?: string;
|
|
46
|
+
|
|
47
|
+
// Layout (Flexbox)
|
|
48
|
+
flexDirection?: "row" | "column";
|
|
49
|
+
justifyContent?:
|
|
50
|
+
| "flex-start"
|
|
51
|
+
| "flex-end"
|
|
52
|
+
| "center"
|
|
53
|
+
| "space-between"
|
|
54
|
+
| "space-around";
|
|
55
|
+
alignItems?: "flex-start" | "flex-end" | "center" | "stretch";
|
|
56
|
+
flexWrap?: "wrap" | "nowrap";
|
|
57
|
+
gap?: number;
|
|
58
|
+
|
|
59
|
+
// Spacing
|
|
60
|
+
padding?: number;
|
|
61
|
+
paddingTop?: number;
|
|
62
|
+
paddingBottom?: number;
|
|
63
|
+
paddingLeft?: number;
|
|
64
|
+
paddingRight?: number;
|
|
65
|
+
margin?: number;
|
|
66
|
+
marginTop?: number;
|
|
67
|
+
marginBottom?: number;
|
|
68
|
+
marginLeft?: number;
|
|
69
|
+
marginRight?: number;
|
|
70
|
+
|
|
71
|
+
// Dimensions
|
|
72
|
+
width?: number | `${number}%` | "auto";
|
|
73
|
+
height?: number | `${number}%` | "auto";
|
|
74
|
+
minWidth?: number;
|
|
75
|
+
minHeight?: number;
|
|
76
|
+
maxWidth?: number;
|
|
77
|
+
maxHeight?: number;
|
|
78
|
+
flexGrow?: number;
|
|
79
|
+
flexShrink?: number;
|
|
80
|
+
flexBasis?: number | `${number}%` | "auto";
|
|
81
|
+
|
|
82
|
+
// Overflow
|
|
83
|
+
overflow?: "hidden" | "visible";
|
|
84
|
+
|
|
85
|
+
// Events
|
|
86
|
+
onMouseDown?: (e: MouseEvent) => void;
|
|
87
|
+
onMouseUp?: (e: MouseEvent) => void;
|
|
88
|
+
onMouseMove?: (e: MouseEvent) => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface BoxProps extends BaseBoxProps {
|
|
92
|
+
children?: ReactNode;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface TextProps {
|
|
96
|
+
content?: string;
|
|
97
|
+
fg?: string;
|
|
98
|
+
bg?: string;
|
|
99
|
+
selectable?: boolean;
|
|
100
|
+
children?: ReactNode;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
interface InputProps {
|
|
104
|
+
value: string;
|
|
105
|
+
onChange: (value: string) => void;
|
|
106
|
+
placeholder?: string;
|
|
107
|
+
focused?: boolean;
|
|
108
|
+
width?: number;
|
|
109
|
+
backgroundColor?: string;
|
|
110
|
+
textColor?: string;
|
|
111
|
+
cursorColor?: string;
|
|
112
|
+
focusedBackgroundColor?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface SelectOption {
|
|
116
|
+
name: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
value?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface SelectProps {
|
|
122
|
+
options: SelectOption[];
|
|
123
|
+
onChange?: (index: number, option: SelectOption) => void;
|
|
124
|
+
onSelect?: (index: number, option: SelectOption) => void;
|
|
125
|
+
selectedIndex?: number;
|
|
126
|
+
focused?: boolean;
|
|
127
|
+
showScrollIndicator?: boolean;
|
|
128
|
+
height?: number;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface TabSelectProps {
|
|
132
|
+
options: { name: string; description?: string }[];
|
|
133
|
+
onChange?: (index: number, option: { name: string }) => void;
|
|
134
|
+
tabWidth?: number;
|
|
135
|
+
focused?: boolean;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
interface ScrollboxProps {
|
|
139
|
+
focused?: boolean;
|
|
140
|
+
style?: {
|
|
141
|
+
rootOptions?: Record<string, unknown>;
|
|
142
|
+
wrapperOptions?: Record<string, unknown>;
|
|
143
|
+
viewportOptions?: Record<string, unknown>;
|
|
144
|
+
contentOptions?: Record<string, unknown>;
|
|
145
|
+
scrollbarOptions?: {
|
|
146
|
+
showArrows?: boolean;
|
|
147
|
+
trackOptions?: {
|
|
148
|
+
foregroundColor?: string;
|
|
149
|
+
backgroundColor?: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
children?: ReactNode;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
interface AsciiFontProps {
|
|
157
|
+
text: string;
|
|
158
|
+
font?: "tiny" | "block" | "slick" | "shade";
|
|
159
|
+
color?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
interface CodeProps {
|
|
163
|
+
code: string;
|
|
164
|
+
language?: string;
|
|
165
|
+
showLineNumbers?: boolean;
|
|
166
|
+
highlightLines?: number[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
interface LineNumberProps {
|
|
170
|
+
code: string;
|
|
171
|
+
language?: string;
|
|
172
|
+
startLine?: number;
|
|
173
|
+
highlightedLines?: number[];
|
|
174
|
+
diagnostics?: { line: number; severity: string; message: string }[];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
interface DiffProps {
|
|
178
|
+
oldCode: string;
|
|
179
|
+
newCode: string;
|
|
180
|
+
language?: string;
|
|
181
|
+
mode?: "unified" | "split";
|
|
182
|
+
showLineNumbers?: boolean;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
interface MouseEvent {
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
button: number;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export {};
|