@gzeoneth/gov-tracker 0.2.1-1 → 0.2.1-alpha.cli-preview.375ef6c
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/README.md +91 -68
- package/dist/calldata/index.d.ts +1 -1
- package/dist/calldata/index.d.ts.map +1 -1
- package/dist/calldata/index.js.map +1 -1
- package/dist/calldata/parameter-decoder.d.ts.map +1 -1
- package/dist/calldata/parameter-decoder.js +8 -1
- package/dist/calldata/parameter-decoder.js.map +1 -1
- package/dist/calldata/signature-lookup.d.ts +17 -2
- package/dist/calldata/signature-lookup.d.ts.map +1 -1
- package/dist/calldata/signature-lookup.js +20 -2
- package/dist/calldata/signature-lookup.js.map +1 -1
- package/dist/cli/cli.d.ts +21 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/{monitor.js → cli.js} +148 -74
- package/dist/cli/cli.js.map +1 -0
- package/dist/cli/lib/cli.d.ts +6 -1
- package/dist/cli/lib/cli.d.ts.map +1 -1
- package/dist/cli/lib/cli.js +58 -20
- package/dist/cli/lib/cli.js.map +1 -1
- package/dist/cli/lib/concurrency.d.ts +20 -0
- package/dist/cli/lib/concurrency.d.ts.map +1 -0
- package/dist/cli/lib/concurrency.js +32 -0
- package/dist/cli/lib/concurrency.js.map +1 -0
- package/dist/cli/tui/App.d.ts +13 -0
- package/dist/cli/tui/App.d.ts.map +1 -0
- package/dist/cli/tui/App.js +146 -0
- package/dist/cli/tui/App.js.map +1 -0
- package/dist/cli/tui/components/CollapsibleSection.d.ts +20 -0
- package/dist/cli/tui/components/CollapsibleSection.d.ts.map +1 -0
- package/dist/cli/tui/components/CollapsibleSection.js +29 -0
- package/dist/cli/tui/components/CollapsibleSection.js.map +1 -0
- package/dist/cli/tui/components/ConfirmDialog.d.ts +14 -0
- package/dist/cli/tui/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/cli/tui/components/ConfirmDialog.js +29 -0
- package/dist/cli/tui/components/ConfirmDialog.js.map +1 -0
- package/dist/cli/tui/components/CopyableText.d.ts +23 -0
- package/dist/cli/tui/components/CopyableText.d.ts.map +1 -0
- package/dist/cli/tui/components/CopyableText.js +49 -0
- package/dist/cli/tui/components/CopyableText.js.map +1 -0
- package/dist/cli/tui/components/EmptyState.d.ts +11 -0
- package/dist/cli/tui/components/EmptyState.d.ts.map +1 -0
- package/dist/cli/tui/components/EmptyState.js +34 -0
- package/dist/cli/tui/components/EmptyState.js.map +1 -0
- package/dist/cli/tui/components/ErrorDisplay.d.ts +17 -0
- package/dist/cli/tui/components/ErrorDisplay.d.ts.map +1 -0
- package/dist/cli/tui/components/ErrorDisplay.js +66 -0
- package/dist/cli/tui/components/ErrorDisplay.js.map +1 -0
- package/dist/cli/tui/components/Header.d.ts +22 -0
- package/dist/cli/tui/components/Header.d.ts.map +1 -0
- package/dist/cli/tui/components/Header.js +73 -0
- package/dist/cli/tui/components/Header.js.map +1 -0
- package/dist/cli/tui/components/KeyHelp.d.ts +20 -0
- package/dist/cli/tui/components/KeyHelp.d.ts.map +1 -0
- package/dist/cli/tui/components/KeyHelp.js +136 -0
- package/dist/cli/tui/components/KeyHelp.js.map +1 -0
- package/dist/cli/tui/components/ProposalRow.d.ts +11 -0
- package/dist/cli/tui/components/ProposalRow.d.ts.map +1 -0
- package/dist/cli/tui/components/ProposalRow.js +106 -0
- package/dist/cli/tui/components/ProposalRow.js.map +1 -0
- package/dist/cli/tui/components/ScrollIndicator.d.ts +26 -0
- package/dist/cli/tui/components/ScrollIndicator.d.ts.map +1 -0
- package/dist/cli/tui/components/ScrollIndicator.js +59 -0
- package/dist/cli/tui/components/ScrollIndicator.js.map +1 -0
- package/dist/cli/tui/components/SearchBar.d.ts +12 -0
- package/dist/cli/tui/components/SearchBar.d.ts.map +1 -0
- package/dist/cli/tui/components/SearchBar.js +36 -0
- package/dist/cli/tui/components/SearchBar.js.map +1 -0
- package/dist/cli/tui/components/Skeleton.d.ts +22 -0
- package/dist/cli/tui/components/Skeleton.d.ts.map +1 -0
- package/dist/cli/tui/components/Skeleton.js +35 -0
- package/dist/cli/tui/components/Skeleton.js.map +1 -0
- package/dist/cli/tui/components/Spinner.d.ts +10 -0
- package/dist/cli/tui/components/Spinner.d.ts.map +1 -0
- package/dist/cli/tui/components/Spinner.js +24 -0
- package/dist/cli/tui/components/Spinner.js.map +1 -0
- package/dist/cli/tui/components/StageProgress.d.ts +12 -0
- package/dist/cli/tui/components/StageProgress.d.ts.map +1 -0
- package/dist/cli/tui/components/StageProgress.js +72 -0
- package/dist/cli/tui/components/StageProgress.js.map +1 -0
- package/dist/cli/tui/components/StageRow.d.ts +12 -0
- package/dist/cli/tui/components/StageRow.d.ts.map +1 -0
- package/dist/cli/tui/components/StageRow.js +106 -0
- package/dist/cli/tui/components/StageRow.js.map +1 -0
- package/dist/cli/tui/components/StatusBadge.d.ts +12 -0
- package/dist/cli/tui/components/StatusBadge.d.ts.map +1 -0
- package/dist/cli/tui/components/StatusBadge.js +27 -0
- package/dist/cli/tui/components/StatusBadge.js.map +1 -0
- package/dist/cli/tui/components/StatusBar.d.ts +12 -0
- package/dist/cli/tui/components/StatusBar.d.ts.map +1 -0
- package/dist/cli/tui/components/StatusBar.js +14 -0
- package/dist/cli/tui/components/StatusBar.js.map +1 -0
- package/dist/cli/tui/components/Timeline.d.ts +12 -0
- package/dist/cli/tui/components/Timeline.d.ts.map +1 -0
- package/dist/cli/tui/components/Timeline.js +91 -0
- package/dist/cli/tui/components/Timeline.js.map +1 -0
- package/dist/cli/tui/components/Toast.d.ts +13 -0
- package/dist/cli/tui/components/Toast.d.ts.map +1 -0
- package/dist/cli/tui/components/Toast.js +35 -0
- package/dist/cli/tui/components/Toast.js.map +1 -0
- package/dist/cli/tui/components/TrackingProgress.d.ts +24 -0
- package/dist/cli/tui/components/TrackingProgress.d.ts.map +1 -0
- package/dist/cli/tui/components/TrackingProgress.js +82 -0
- package/dist/cli/tui/components/TrackingProgress.js.map +1 -0
- package/dist/cli/tui/components/ViewLayout.d.ts +26 -0
- package/dist/cli/tui/components/ViewLayout.d.ts.map +1 -0
- package/dist/cli/tui/components/ViewLayout.js +57 -0
- package/dist/cli/tui/components/ViewLayout.js.map +1 -0
- package/dist/cli/tui/components/VotingStats.d.ts +11 -0
- package/dist/cli/tui/components/VotingStats.d.ts.map +1 -0
- package/dist/cli/tui/components/VotingStats.js +87 -0
- package/dist/cli/tui/components/VotingStats.js.map +1 -0
- package/dist/cli/tui/config.d.ts +42 -0
- package/dist/cli/tui/config.d.ts.map +1 -0
- package/dist/cli/tui/config.js +144 -0
- package/dist/cli/tui/config.js.map +1 -0
- package/dist/cli/tui/hooks/index.d.ts +12 -0
- package/dist/cli/tui/hooks/index.d.ts.map +1 -0
- package/dist/cli/tui/hooks/index.js +18 -0
- package/dist/cli/tui/hooks/index.js.map +1 -0
- package/dist/cli/tui/hooks/useCache.d.ts +12 -0
- package/dist/cli/tui/hooks/useCache.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useCache.js +110 -0
- package/dist/cli/tui/hooks/useCache.js.map +1 -0
- package/dist/cli/tui/hooks/useCliProcess.d.ts +19 -0
- package/dist/cli/tui/hooks/useCliProcess.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useCliProcess.js +135 -0
- package/dist/cli/tui/hooks/useCliProcess.js.map +1 -0
- package/dist/cli/tui/hooks/useNavigation.d.ts +40 -0
- package/dist/cli/tui/hooks/useNavigation.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useNavigation.js +283 -0
- package/dist/cli/tui/hooks/useNavigation.js.map +1 -0
- package/dist/cli/tui/hooks/useProposals.d.ts +10 -0
- package/dist/cli/tui/hooks/useProposals.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useProposals.js +215 -0
- package/dist/cli/tui/hooks/useProposals.js.map +1 -0
- package/dist/cli/tui/hooks/useStageCalldata.d.ts +17 -0
- package/dist/cli/tui/hooks/useStageCalldata.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useStageCalldata.js +77 -0
- package/dist/cli/tui/hooks/useStageCalldata.js.map +1 -0
- package/dist/cli/tui/hooks/useTracker.d.ts +27 -0
- package/dist/cli/tui/hooks/useTracker.d.ts.map +1 -0
- package/dist/cli/tui/hooks/useTracker.js +205 -0
- package/dist/cli/tui/hooks/useTracker.js.map +1 -0
- package/dist/cli/tui/index.d.ts +15 -0
- package/dist/cli/tui/index.d.ts.map +1 -0
- package/dist/cli/tui/index.js +100 -0
- package/dist/cli/tui/index.js.map +1 -0
- package/dist/cli/tui/ink-wrapper.d.ts +43 -0
- package/dist/cli/tui/ink-wrapper.d.ts.map +1 -0
- package/dist/cli/tui/ink-wrapper.js +41 -0
- package/dist/cli/tui/ink-wrapper.js.map +1 -0
- package/dist/cli/tui/types.d.ts +37 -0
- package/dist/cli/tui/types.d.ts.map +1 -0
- package/dist/cli/tui/types.js +6 -0
- package/dist/cli/tui/types.js.map +1 -0
- package/dist/cli/tui/utils/clipboard.d.ts +7 -0
- package/dist/cli/tui/utils/clipboard.d.ts.map +1 -0
- package/dist/cli/tui/utils/clipboard.js +46 -0
- package/dist/cli/tui/utils/clipboard.js.map +1 -0
- package/dist/cli/tui/utils/index.d.ts +5 -0
- package/dist/cli/tui/utils/index.d.ts.map +1 -0
- package/dist/cli/tui/utils/index.js +13 -0
- package/dist/cli/tui/utils/index.js.map +1 -0
- package/dist/cli/tui/utils/terminal.d.ts +18 -0
- package/dist/cli/tui/utils/terminal.d.ts.map +1 -0
- package/dist/cli/tui/utils/terminal.js +26 -0
- package/dist/cli/tui/utils/terminal.js.map +1 -0
- package/dist/cli/tui/utils/text.d.ts +12 -0
- package/dist/cli/tui/utils/text.d.ts.map +1 -0
- package/dist/cli/tui/utils/text.js +30 -0
- package/dist/cli/tui/utils/text.js.map +1 -0
- package/dist/cli/tui/views/CalldataView.d.ts +12 -0
- package/dist/cli/tui/views/CalldataView.d.ts.map +1 -0
- package/dist/cli/tui/views/CalldataView.js +194 -0
- package/dist/cli/tui/views/CalldataView.js.map +1 -0
- package/dist/cli/tui/views/DescriptionView.d.ts +12 -0
- package/dist/cli/tui/views/DescriptionView.d.ts.map +1 -0
- package/dist/cli/tui/views/DescriptionView.js +182 -0
- package/dist/cli/tui/views/DescriptionView.js.map +1 -0
- package/dist/cli/tui/views/ElectionView.d.ts +12 -0
- package/dist/cli/tui/views/ElectionView.d.ts.map +1 -0
- package/dist/cli/tui/views/ElectionView.js +197 -0
- package/dist/cli/tui/views/ElectionView.js.map +1 -0
- package/dist/cli/tui/views/HelpView.d.ts +10 -0
- package/dist/cli/tui/views/HelpView.d.ts.map +1 -0
- package/dist/cli/tui/views/HelpView.js +159 -0
- package/dist/cli/tui/views/HelpView.js.map +1 -0
- package/dist/cli/tui/views/ProposalDetail.d.ts +14 -0
- package/dist/cli/tui/views/ProposalDetail.d.ts.map +1 -0
- package/dist/cli/tui/views/ProposalDetail.js +167 -0
- package/dist/cli/tui/views/ProposalDetail.js.map +1 -0
- package/dist/cli/tui/views/ProposalList.d.ts +17 -0
- package/dist/cli/tui/views/ProposalList.d.ts.map +1 -0
- package/dist/cli/tui/views/ProposalList.js +126 -0
- package/dist/cli/tui/views/ProposalList.js.map +1 -0
- package/dist/cli/tui/views/SettingsView.d.ts +12 -0
- package/dist/cli/tui/views/SettingsView.d.ts.map +1 -0
- package/dist/cli/tui/views/SettingsView.js +203 -0
- package/dist/cli/tui/views/SettingsView.js.map +1 -0
- package/dist/cli/tui/views/SimulationView.d.ts +12 -0
- package/dist/cli/tui/views/SimulationView.d.ts.map +1 -0
- package/dist/cli/tui/views/SimulationView.js +112 -0
- package/dist/cli/tui/views/SimulationView.js.map +1 -0
- package/dist/cli/tui/views/StageView.d.ts +12 -0
- package/dist/cli/tui/views/StageView.d.ts.map +1 -0
- package/dist/cli/tui/views/StageView.js +215 -0
- package/dist/cli/tui/views/StageView.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/data/bundled-cache.json +6651 -2485
- package/dist/discovery/governor-discovery.d.ts.map +1 -1
- package/dist/discovery/governor-discovery.js +2 -1
- package/dist/discovery/governor-discovery.js.map +1 -1
- package/dist/index.d.ts +22 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/stages/l2-to-l1-message.d.ts +5 -0
- package/dist/stages/l2-to-l1-message.d.ts.map +1 -1
- package/dist/stages/l2-to-l1-message.js +73 -7
- package/dist/stages/l2-to-l1-message.js.map +1 -1
- package/dist/stages/timelock.d.ts.map +1 -1
- package/dist/stages/timelock.js +10 -3
- package/dist/stages/timelock.js.map +1 -1
- package/dist/stages/utils.d.ts +5 -2
- package/dist/stages/utils.d.ts.map +1 -1
- package/dist/stages/utils.js +14 -6
- package/dist/stages/utils.js.map +1 -1
- package/dist/tracker/cache.d.ts +27 -0
- package/dist/tracker/cache.d.ts.map +1 -1
- package/dist/tracker/cache.js +50 -2
- package/dist/tracker/cache.js.map +1 -1
- package/dist/tracker/execute.d.ts.map +1 -1
- package/dist/tracker/execute.js +25 -1
- package/dist/tracker/execute.js.map +1 -1
- package/dist/types/stages.d.ts +15 -2
- package/dist/types/stages.d.ts.map +1 -1
- package/dist/types/stages.js.map +1 -1
- package/dist/types/tracking.d.ts +4 -0
- package/dist/types/tracking.d.ts.map +1 -1
- package/dist/utils/sanitize.d.ts +28 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +52 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/package.json +28 -16
- package/dist/cli/monitor.d.ts +0 -3
- package/dist/cli/monitor.d.ts.map +0 -1
- package/dist/cli/monitor.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error display component with retry option
|
|
3
|
+
*/
|
|
4
|
+
interface ErrorDisplayProps {
|
|
5
|
+
error: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
onRetry?: () => void;
|
|
8
|
+
retryKey?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ErrorDisplay({ error, title, onRetry, retryKey, }: ErrorDisplayProps): React.ReactElement;
|
|
11
|
+
interface ErrorBannerProps {
|
|
12
|
+
error: string;
|
|
13
|
+
compact?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function ErrorBanner({ error, compact }: ErrorBannerProps): React.ReactElement;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ErrorDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/ErrorDisplay.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAkCD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAc,GACf,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAmBxC;AAED,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CAkB5F"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Error display component with retry option
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ErrorDisplay = ErrorDisplay;
|
|
7
|
+
exports.ErrorBanner = ErrorBanner;
|
|
8
|
+
const ink_wrapper_js_1 = require("../ink-wrapper.js");
|
|
9
|
+
function categorizeError(error) {
|
|
10
|
+
const lowerError = error.toLowerCase();
|
|
11
|
+
// Network errors: connection issues, DNS failures, timeouts
|
|
12
|
+
if (lowerError.includes("network") ||
|
|
13
|
+
lowerError.includes("timeout") ||
|
|
14
|
+
lowerError.includes("etimedout") ||
|
|
15
|
+
lowerError.includes("econnrefused") ||
|
|
16
|
+
lowerError.includes("econnreset") ||
|
|
17
|
+
lowerError.includes("enotfound") ||
|
|
18
|
+
lowerError.includes("ehostunreach") ||
|
|
19
|
+
lowerError.includes("enetunreach")) {
|
|
20
|
+
return { type: "Network", color: "yellow" };
|
|
21
|
+
}
|
|
22
|
+
if (lowerError.includes("rpc") || lowerError.includes("provider")) {
|
|
23
|
+
return { type: "RPC", color: "yellow" };
|
|
24
|
+
}
|
|
25
|
+
if (lowerError.includes("permission") || lowerError.includes("unauthorized") || lowerError.includes("forbidden")) {
|
|
26
|
+
return { type: "Permission", color: "red" };
|
|
27
|
+
}
|
|
28
|
+
if (lowerError.includes("not found") || lowerError.includes("404")) {
|
|
29
|
+
return { type: "Not Found", color: "gray" };
|
|
30
|
+
}
|
|
31
|
+
if (lowerError.includes("rate limit") || lowerError.includes("throttl")) {
|
|
32
|
+
return { type: "Rate Limit", color: "yellow" };
|
|
33
|
+
}
|
|
34
|
+
return { type: "Error", color: "red" };
|
|
35
|
+
}
|
|
36
|
+
function ErrorDisplay({ error, title, onRetry, retryKey = "r", }) {
|
|
37
|
+
const { type, color } = categorizeError(error);
|
|
38
|
+
const displayTitle = title ?? type;
|
|
39
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { flexDirection: "column", borderStyle: "round", borderColor: color, paddingX: 1, paddingY: 0 },
|
|
40
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
41
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: color, bold: true },
|
|
42
|
+
displayTitle,
|
|
43
|
+
": "),
|
|
44
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "white" }, error)),
|
|
45
|
+
onRetry && (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { marginTop: 1 },
|
|
46
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "Press "),
|
|
47
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "cyan" }, retryKey),
|
|
48
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, " to retry")))));
|
|
49
|
+
}
|
|
50
|
+
function ErrorBanner({ error, compact = false }) {
|
|
51
|
+
const { type, color } = categorizeError(error);
|
|
52
|
+
if (compact) {
|
|
53
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
54
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: color },
|
|
55
|
+
"[",
|
|
56
|
+
type,
|
|
57
|
+
"] "),
|
|
58
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, error.length > 50 ? error.slice(0, 50) + "..." : error)));
|
|
59
|
+
}
|
|
60
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
61
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: color, bold: true },
|
|
62
|
+
type,
|
|
63
|
+
": "),
|
|
64
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, null, error)));
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=ErrorDisplay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDisplay.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/ErrorDisplay.tsx"],"names":[],"mappings":";AAAA;;GAEG;;AA2CH,oCAwBC;AAOD,kCAkBC;AA1FD,sDAAqD;AASrD,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IAEvC,4DAA4D;I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E,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAQ,CAC9E,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,qCAAC,oBAAG;QACF,qCAAC,qBAAI,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI;YAAE,IAAI;iBAAU;QACxC,qCAAC,qBAAI,QAAE,KAAK,CAAQ,CAChB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header component showing title and stats
|
|
3
|
+
*/
|
|
4
|
+
import type { TrackerStats } from "../../../types/index.js";
|
|
5
|
+
import type { ViewType, FilterType, SortType } from "../types.js";
|
|
6
|
+
interface HeaderProps {
|
|
7
|
+
view: ViewType;
|
|
8
|
+
filter: FilterType;
|
|
9
|
+
sort?: SortType;
|
|
10
|
+
stats: TrackerStats | null;
|
|
11
|
+
hasProviders: boolean;
|
|
12
|
+
isTracking: boolean;
|
|
13
|
+
title?: string;
|
|
14
|
+
position?: {
|
|
15
|
+
current: number;
|
|
16
|
+
total: number;
|
|
17
|
+
};
|
|
18
|
+
breadcrumb?: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function Header({ view, filter, sort, stats, hasProviders, isTracking, title, position, breadcrumb, }: HeaderProps): React.ReactElement;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/Header.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAElE,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AASD,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,UAAU,EACV,KAAK,EACL,QAAQ,EACR,UAAU,GACX,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CAqFlC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Header component showing title and stats
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Header = Header;
|
|
7
|
+
const ink_wrapper_js_1 = require("../ink-wrapper.js");
|
|
8
|
+
const SORT_LABELS = {
|
|
9
|
+
newest: "↓New",
|
|
10
|
+
oldest: "↑Old",
|
|
11
|
+
progress: "↓Prog",
|
|
12
|
+
status: "Status",
|
|
13
|
+
};
|
|
14
|
+
function Header({ view, filter, sort, stats, hasProviders, isTracking, title, position, breadcrumb, }) {
|
|
15
|
+
const getViewTitle = () => {
|
|
16
|
+
switch (view) {
|
|
17
|
+
case "list":
|
|
18
|
+
return "Gov-Tracker TUI [PREVIEW]";
|
|
19
|
+
case "detail":
|
|
20
|
+
return title ?? "Proposal Detail";
|
|
21
|
+
case "calldata":
|
|
22
|
+
return "Decoded Calldata";
|
|
23
|
+
case "stage":
|
|
24
|
+
return "Stage Details";
|
|
25
|
+
case "simulation":
|
|
26
|
+
return title ?? "Simulation Data";
|
|
27
|
+
case "description":
|
|
28
|
+
return title ?? "Proposal Description";
|
|
29
|
+
default:
|
|
30
|
+
return "Gov-Tracker";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const getRightSide = () => {
|
|
34
|
+
if (view === "list" && stats) {
|
|
35
|
+
const totalActive = stats.proposals.active + stats.timelocks.active + (stats.elections.total - stats.elections.complete);
|
|
36
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" },
|
|
37
|
+
stats.total,
|
|
38
|
+
" items | ",
|
|
39
|
+
totalActive,
|
|
40
|
+
" active",
|
|
41
|
+
hasProviders && ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "green" }, " [RPC]"),
|
|
42
|
+
isTracking && ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" }, " [Tracking...]")));
|
|
43
|
+
}
|
|
44
|
+
if (view === "detail" && hasProviders) {
|
|
45
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, isTracking ? (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" }, "Tracking...")) : (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "green" }, "[r] to re-track"))));
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
const renderBreadcrumb = () => {
|
|
50
|
+
if (!breadcrumb || breadcrumb.length === 0)
|
|
51
|
+
return null;
|
|
52
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null, breadcrumb.map((item, i) => (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { key: i },
|
|
53
|
+
i > 0 && ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, " \u203A "),
|
|
54
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: i === breadcrumb.length - 1 ? "cyan" : "gray" }, item))))));
|
|
55
|
+
};
|
|
56
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1 },
|
|
57
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { flexGrow: 1 },
|
|
58
|
+
breadcrumb && breadcrumb.length > 0 ? (renderBreadcrumb()) : (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { bold: true, color: "cyan" }, getViewTitle())),
|
|
59
|
+
view === "list" && (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" },
|
|
60
|
+
" ",
|
|
61
|
+
"[",
|
|
62
|
+
filter.toUpperCase(),
|
|
63
|
+
"] [",
|
|
64
|
+
sort ? SORT_LABELS[sort] : "↓New",
|
|
65
|
+
"]")),
|
|
66
|
+
position && position.total > 0 && (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" },
|
|
67
|
+
" ",
|
|
68
|
+
position.current,
|
|
69
|
+
"/",
|
|
70
|
+
position.total))),
|
|
71
|
+
getRightSide()));
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/Header.tsx"],"names":[],"mappings":";AAAA;;GAEG;;AAyBH,wBA+FC;AAtHD,sDAAqD;AAgBrD,MAAM,WAAW,GAA6B;IAC5C,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,SAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,UAAU,EACV,KAAK,EACL,QAAQ,EACR,UAAU,GACE;IACZ,MAAM,YAAY,GAAG,GAAW,EAAE;QAChC,QAAQ,IAAI,EAAE,CAAC;YACb,KAA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,CAAC,KAAK,CAAQ,CACjE,CACG;QACL,YAAY,EAAE,CACX,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard shortcuts help footer
|
|
3
|
+
*/
|
|
4
|
+
import type { ViewType, FilterType, SortType } from "../types.js";
|
|
5
|
+
interface ContextInfo {
|
|
6
|
+
filter?: FilterType;
|
|
7
|
+
sort?: SortType;
|
|
8
|
+
isSearching?: boolean;
|
|
9
|
+
hasSearch?: boolean;
|
|
10
|
+
calldataActionCount?: number;
|
|
11
|
+
currentActionIndex?: number;
|
|
12
|
+
}
|
|
13
|
+
interface KeyHelpProps {
|
|
14
|
+
view: ViewType;
|
|
15
|
+
hasProviders: boolean;
|
|
16
|
+
context?: ContextInfo;
|
|
17
|
+
}
|
|
18
|
+
export declare function KeyHelp({ view, hasProviders, context }: KeyHelpProps): React.ReactElement;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=KeyHelp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyHelp.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/KeyHelp.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAElE,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,UAAU,YAAY;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAsJD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,YAAY,GAAG,KAAK,CAAC,YAAY,CAezF"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Keyboard shortcuts help footer
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.KeyHelp = KeyHelp;
|
|
7
|
+
const ink_wrapper_js_1 = require("../ink-wrapper.js");
|
|
8
|
+
const LIST_KEYS = [
|
|
9
|
+
{ key: "j/k", action: "Navigate" },
|
|
10
|
+
{ key: "g/G", action: "Top/Bottom" },
|
|
11
|
+
{ key: "/", action: "Search" },
|
|
12
|
+
{ key: "Enter", action: "View" },
|
|
13
|
+
{ key: "Tab", action: "Filter" },
|
|
14
|
+
{ key: "o", action: "Sort" },
|
|
15
|
+
{ key: "R", action: "Reload" },
|
|
16
|
+
{ key: "e", action: "Elections" },
|
|
17
|
+
{ key: "d", action: "Discover" },
|
|
18
|
+
{ key: "S", action: "Settings" },
|
|
19
|
+
{ key: "?", action: "Help" },
|
|
20
|
+
{ key: "q", action: "Quit" },
|
|
21
|
+
];
|
|
22
|
+
const DETAIL_KEYS_BASE = [
|
|
23
|
+
{ key: "j/k", action: "Stage" },
|
|
24
|
+
{ key: "1-7", action: "Jump" },
|
|
25
|
+
{ key: "Enter", action: "Details" },
|
|
26
|
+
{ key: "y/Y", action: "Copy ID/TX" },
|
|
27
|
+
{ key: "d", action: "Description" },
|
|
28
|
+
{ key: "c", action: "Calldata" },
|
|
29
|
+
{ key: "s", action: "Simulate" },
|
|
30
|
+
{ key: "?", action: "Help" },
|
|
31
|
+
];
|
|
32
|
+
const DETAIL_RETRACK = { key: "r", action: "Re-track" };
|
|
33
|
+
const DETAIL_BACK = { key: "b", action: "Back" };
|
|
34
|
+
const CALLDATA_KEYS = [
|
|
35
|
+
{ key: "←→", action: "Actions" },
|
|
36
|
+
{ key: "↑↓/PgUp/Dn", action: "Scroll" },
|
|
37
|
+
{ key: "g/G", action: "Top/Bottom" },
|
|
38
|
+
{ key: "e/c", action: "Expand/Collapse" },
|
|
39
|
+
{ key: "b", action: "Back" },
|
|
40
|
+
];
|
|
41
|
+
const STAGE_KEYS = [
|
|
42
|
+
{ key: "↑↓/PgUp/Dn", action: "Scroll" },
|
|
43
|
+
{ key: "b", action: "Back" },
|
|
44
|
+
];
|
|
45
|
+
const SIMULATION_KEYS = [
|
|
46
|
+
{ key: "↑↓", action: "Navigate" },
|
|
47
|
+
{ key: "b", action: "Back" },
|
|
48
|
+
];
|
|
49
|
+
const DESCRIPTION_KEYS = [
|
|
50
|
+
{ key: "↑↓/PgUp/Dn", action: "Scroll" },
|
|
51
|
+
{ key: "b", action: "Back" },
|
|
52
|
+
];
|
|
53
|
+
const ELECTION_KEYS = [
|
|
54
|
+
{ key: "↑↓", action: "Navigate" },
|
|
55
|
+
{ key: "b", action: "Back" },
|
|
56
|
+
];
|
|
57
|
+
function getKeysForView(view, hasProviders) {
|
|
58
|
+
switch (view) {
|
|
59
|
+
case "list":
|
|
60
|
+
// Always show all keys - discover/election use default public RPCs if none configured
|
|
61
|
+
return LIST_KEYS;
|
|
62
|
+
case "detail":
|
|
63
|
+
return hasProviders
|
|
64
|
+
? [...DETAIL_KEYS_BASE, DETAIL_RETRACK, DETAIL_BACK]
|
|
65
|
+
: [...DETAIL_KEYS_BASE, DETAIL_BACK];
|
|
66
|
+
case "calldata":
|
|
67
|
+
return CALLDATA_KEYS;
|
|
68
|
+
case "stage":
|
|
69
|
+
return STAGE_KEYS;
|
|
70
|
+
case "simulation":
|
|
71
|
+
return SIMULATION_KEYS;
|
|
72
|
+
case "description":
|
|
73
|
+
return DESCRIPTION_KEYS;
|
|
74
|
+
case "election":
|
|
75
|
+
return ELECTION_KEYS;
|
|
76
|
+
default:
|
|
77
|
+
return [];
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
const SORT_DISPLAY = {
|
|
81
|
+
newest: "Newest",
|
|
82
|
+
oldest: "Oldest",
|
|
83
|
+
progress: "Progress",
|
|
84
|
+
status: "Status",
|
|
85
|
+
};
|
|
86
|
+
function ContextIndicators({ view, context }) {
|
|
87
|
+
if (view !== "list" || !context)
|
|
88
|
+
return null;
|
|
89
|
+
const indicators = [];
|
|
90
|
+
if (context.isSearching) {
|
|
91
|
+
indicators.push(ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { key: "search", color: "yellow" }, "[SEARCHING] "));
|
|
92
|
+
}
|
|
93
|
+
else if (context.hasSearch) {
|
|
94
|
+
indicators.push(ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { key: "search-active", marginRight: 1 },
|
|
95
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "green" }, "\u26B2 "),
|
|
96
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "Esc:Clear")));
|
|
97
|
+
}
|
|
98
|
+
if (context.filter && context.filter !== "all") {
|
|
99
|
+
indicators.push(ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { key: "filter", marginRight: 1 },
|
|
100
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "magenta" }, context.filter.toUpperCase())));
|
|
101
|
+
}
|
|
102
|
+
if (context.sort && context.sort !== "newest") {
|
|
103
|
+
indicators.push(ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { key: "sort", marginRight: 1 },
|
|
104
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "blue" },
|
|
105
|
+
"\u2195",
|
|
106
|
+
SORT_DISPLAY[context.sort])));
|
|
107
|
+
}
|
|
108
|
+
if (indicators.length === 0)
|
|
109
|
+
return null;
|
|
110
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { marginRight: 2 },
|
|
111
|
+
indicators,
|
|
112
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "\u2502")));
|
|
113
|
+
}
|
|
114
|
+
function CalldataIndicator({ context }) {
|
|
115
|
+
if (!context?.calldataActionCount || context.calldataActionCount <= 1)
|
|
116
|
+
return null;
|
|
117
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { marginRight: 2 },
|
|
118
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" },
|
|
119
|
+
"Action ",
|
|
120
|
+
(context.currentActionIndex ?? 0) + 1,
|
|
121
|
+
"/",
|
|
122
|
+
context.calldataActionCount),
|
|
123
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, " \u2502")));
|
|
124
|
+
}
|
|
125
|
+
function KeyHelp({ view, hasProviders, context }) {
|
|
126
|
+
const keys = getKeysForView(view, hasProviders);
|
|
127
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { borderStyle: "single", borderColor: "gray", paddingX: 1 },
|
|
128
|
+
ink_wrapper_js_1.React.createElement(ContextIndicators, { view: view, context: context }),
|
|
129
|
+
view === "calldata" && ink_wrapper_js_1.React.createElement(CalldataIndicator, { context: context }),
|
|
130
|
+
keys.map((binding) => (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { key: binding.key, marginRight: 2 },
|
|
131
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "cyan" }, binding.key),
|
|
132
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" },
|
|
133
|
+
": ",
|
|
134
|
+
binding.action))))));
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=KeyHelp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KeyHelp.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/KeyHelp.tsx"],"names":[],"mappings":";AAAA;;GAEG;;AAwKH,0BAeC;AArLD,sDAAqD;AAuBrD,MAAM,S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C,MAAM,cAAU,CACxB,CACP,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAgB;IACnE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAEhD,OAAO,CACL,qCAAC,oBAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC;QACtD,qCAAC,iBAAiB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAI;QAClD,IAAI,KAAK,UAAU,IAAI,qCAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,GAAI;QAC9D,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACrB,qCAAC,oBAAG,IAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,CAAC;YACnC,qCAAC,qBAAI,IAAC,KAAK,EAAC,MAAM,IAAE,OAAO,CAAC,GAAG,CAAQ;YACvC,qCAAC,qBAAI,IAAC,KAAK,EAAC,MAAM;;gBAAI,OAAO,CAAC,MAAM,CAAQ,CACxC,CACP,CAAC,CACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single proposal row in the list view
|
|
3
|
+
*/
|
|
4
|
+
import type { ProposalListItem } from "../types.js";
|
|
5
|
+
interface ProposalRowProps {
|
|
6
|
+
item: ProposalListItem;
|
|
7
|
+
isSelected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function ProposalRow({ item, isSelected }: ProposalRowProps): React.ReactElement;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ProposalRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposalRow.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/ProposalRow.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,UAAU,gBAAgB;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;CACrB;AAuDD,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC,YAAY,CA2CtF"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Single proposal row in the list view
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProposalRow = ProposalRow;
|
|
7
|
+
const ink_wrapper_js_1 = require("../ink-wrapper.js");
|
|
8
|
+
const StatusBadge_js_1 = require("./StatusBadge.js");
|
|
9
|
+
const index_js_1 = require("../utils/index.js");
|
|
10
|
+
function getTypeLabel(item) {
|
|
11
|
+
if (item.type === "election")
|
|
12
|
+
return "EL";
|
|
13
|
+
if (item.type === "timelock")
|
|
14
|
+
return "TL";
|
|
15
|
+
if (item.proposalType === "CONSTITUTIONAL")
|
|
16
|
+
return "CO";
|
|
17
|
+
if (item.proposalType === "NON_CONSTITUTIONAL")
|
|
18
|
+
return "TR";
|
|
19
|
+
return "PR";
|
|
20
|
+
}
|
|
21
|
+
function getTypeColor(item) {
|
|
22
|
+
if (item.type === "election")
|
|
23
|
+
return "magenta";
|
|
24
|
+
if (item.type === "timelock")
|
|
25
|
+
return "blue";
|
|
26
|
+
if (item.proposalType === "CONSTITUTIONAL")
|
|
27
|
+
return "cyan";
|
|
28
|
+
return "green";
|
|
29
|
+
}
|
|
30
|
+
function formatAge(timestamp) {
|
|
31
|
+
if (timestamp === null)
|
|
32
|
+
return "--";
|
|
33
|
+
const now = Date.now();
|
|
34
|
+
const diffMs = now - timestamp;
|
|
35
|
+
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
|
|
36
|
+
if (diffDays < 0)
|
|
37
|
+
return "future";
|
|
38
|
+
if (diffDays === 0)
|
|
39
|
+
return "today";
|
|
40
|
+
if (diffDays === 1)
|
|
41
|
+
return "1d ago";
|
|
42
|
+
if (diffDays < 30)
|
|
43
|
+
return `${diffDays}d ago`;
|
|
44
|
+
if (diffDays < 365) {
|
|
45
|
+
const months = Math.floor(diffDays / 30);
|
|
46
|
+
return `${months}mo ago`;
|
|
47
|
+
}
|
|
48
|
+
const years = Math.floor(diffDays / 365);
|
|
49
|
+
return `${years}y ago`;
|
|
50
|
+
}
|
|
51
|
+
function parseProgress(stageProgress) {
|
|
52
|
+
const match = stageProgress.match(/(\d+)\/(\d+)/);
|
|
53
|
+
if (!match)
|
|
54
|
+
return null;
|
|
55
|
+
const current = parseInt(match[1], 10);
|
|
56
|
+
const total = parseInt(match[2], 10);
|
|
57
|
+
if (total <= 0 || current < 0)
|
|
58
|
+
return null;
|
|
59
|
+
return { current, total };
|
|
60
|
+
}
|
|
61
|
+
function renderProgressBar(progress) {
|
|
62
|
+
const filled = Math.max(0, Math.min(progress.current, progress.total));
|
|
63
|
+
const empty = Math.max(0, progress.total - filled);
|
|
64
|
+
return "█".repeat(filled) + "░".repeat(empty);
|
|
65
|
+
}
|
|
66
|
+
const FIXED_COLS_WIDTH = 1 + 4 + 1 + 1 + 8 + 1 + 1 + 1 + 7 + 2;
|
|
67
|
+
const SAFETY_MARGIN = 4;
|
|
68
|
+
const MIN_COMPACT_WIDTH = 50;
|
|
69
|
+
function ProposalRow({ item, isSelected }) {
|
|
70
|
+
const typeLabel = getTypeLabel(item);
|
|
71
|
+
const typeColor = getTypeColor(item);
|
|
72
|
+
const age = formatAge(item.createdAt);
|
|
73
|
+
const progress = parseProgress(item.stageProgress);
|
|
74
|
+
const progressBar = progress ? renderProgressBar(progress) : null;
|
|
75
|
+
const { width } = (0, index_js_1.getTerminalSize)();
|
|
76
|
+
const isNarrow = width < MIN_COMPACT_WIDTH;
|
|
77
|
+
// In narrow mode, hide age and progress columns to prevent overflow
|
|
78
|
+
const effectiveFixedWidth = isNarrow ? 1 + 4 + 1 + 1 + 1 + 2 : FIXED_COLS_WIDTH;
|
|
79
|
+
const maxTitleWidth = Math.max(10, width - effectiveFixedWidth - SAFETY_MARGIN);
|
|
80
|
+
const title = (0, index_js_1.truncate)(item.title, maxTitleWidth);
|
|
81
|
+
const titlePadded = title.padEnd(maxTitleWidth);
|
|
82
|
+
const progressDisplay = progressBar ?? item.stageProgress;
|
|
83
|
+
const progressColor = progressBar
|
|
84
|
+
? item.status === "complete"
|
|
85
|
+
? "green"
|
|
86
|
+
: "yellow"
|
|
87
|
+
: "gray";
|
|
88
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
89
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: isSelected ? "cyan" : undefined, bold: isSelected }, isSelected ? ">" : " "),
|
|
90
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: typeColor },
|
|
91
|
+
"[",
|
|
92
|
+
typeLabel,
|
|
93
|
+
"]"),
|
|
94
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, null, " "),
|
|
95
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: isSelected ? "cyan" : undefined }, titlePadded),
|
|
96
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, null, " "),
|
|
97
|
+
!isNarrow && (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.React.Fragment, null,
|
|
98
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, age.padStart(8)),
|
|
99
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, null, " "))),
|
|
100
|
+
ink_wrapper_js_1.React.createElement(StatusBadge_js_1.StatusBadge, { status: item.status, compact: true }),
|
|
101
|
+
!isNarrow && ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: progressColor },
|
|
102
|
+
" ",
|
|
103
|
+
progressDisplay.padEnd(7)),
|
|
104
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "green" }, item.hasExecutable ? " ▶" : " ")));
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=ProposalRow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProposalRow.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/ProposalRow.tsx"],"names":[],"mappings":";AAAA;;GAEG;;AAiEH,kCA2CC;AA1GD,sDAAqD;AAErD,qDAA+C;AAC/C,gDAA8D;AAO9D,SAAS,YAAY,CAAC,IAAsB;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,YAAY,KAAK,gBAAgB;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,IAAI,CAAC,YAAY,KAAK,oBAAoB;QAAE,OAAO,IAAI,CAAC;IAC5D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAAC,IAAsB;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IAC/C,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC;IAC5C,IAAI,IAAI,CAAC,YAAY,KAAK,gBAAgB;QAAE,OAAO,MAAM,CAAC;IAC1D,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,SAAS,CAAC,SAAwB;IACzC,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEpC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,MAAM,GAAG,GAAG,GAAG,SAAS,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAA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AE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAQ,CACzD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll indicator component for views with scrollable content
|
|
3
|
+
*/
|
|
4
|
+
interface ScrollIndicatorProps {
|
|
5
|
+
scrollOffset: number;
|
|
6
|
+
visibleRows: number;
|
|
7
|
+
totalItems: number;
|
|
8
|
+
unit?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ScrollIndicatorTop({ scrollOffset, unit, }: Pick<ScrollIndicatorProps, "scrollOffset" | "unit">): React.ReactElement | null;
|
|
11
|
+
export declare function ScrollIndicatorBottom({ scrollOffset, visibleRows, totalItems, unit, }: ScrollIndicatorProps): React.ReactElement | null;
|
|
12
|
+
interface ScrollBarProps {
|
|
13
|
+
scrollOffset: number;
|
|
14
|
+
visibleRows: number;
|
|
15
|
+
totalItems: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare function ScrollBar({ scrollOffset, visibleRows, totalItems, height, }: ScrollBarProps): React.ReactElement | null;
|
|
19
|
+
interface ScrollPositionProps {
|
|
20
|
+
scrollOffset: number;
|
|
21
|
+
visibleRows: number;
|
|
22
|
+
totalItems: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function ScrollPosition({ scrollOffset, visibleRows, totalItems, }: ScrollPositionProps): React.ReactElement | null;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=ScrollIndicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollIndicator.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/ScrollIndicator.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,UAAU,oBAAoB;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,IAAc,GACf,EAAE,IAAI,CAAC,oBAAoB,EAAE,cAAc,GAAG,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAUjF;AAED,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,WAAW,EACX,UAAU,EACV,IAAc,GACf,EAAE,oBAAoB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAWlD;AAED,UAAU,cAAc;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAU,GACX,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAmB5C;AAED,UAAU,mBAAmB;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,WAAW,EACX,UAAU,GACX,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAkBjD"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Scroll indicator component for views with scrollable content
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScrollIndicatorTop = ScrollIndicatorTop;
|
|
7
|
+
exports.ScrollIndicatorBottom = ScrollIndicatorBottom;
|
|
8
|
+
exports.ScrollBar = ScrollBar;
|
|
9
|
+
exports.ScrollPosition = ScrollPosition;
|
|
10
|
+
const ink_wrapper_js_1 = require("../ink-wrapper.js");
|
|
11
|
+
function ScrollIndicatorTop({ scrollOffset, unit = "items", }) {
|
|
12
|
+
if (scrollOffset <= 0)
|
|
13
|
+
return null;
|
|
14
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
15
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "\u2191 "),
|
|
16
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" }, scrollOffset),
|
|
17
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" },
|
|
18
|
+
" ",
|
|
19
|
+
unit,
|
|
20
|
+
" above")));
|
|
21
|
+
}
|
|
22
|
+
function ScrollIndicatorBottom({ scrollOffset, visibleRows, totalItems, unit = "items", }) {
|
|
23
|
+
const remaining = totalItems - scrollOffset - visibleRows;
|
|
24
|
+
if (remaining <= 0)
|
|
25
|
+
return null;
|
|
26
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
27
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "\u2193 "),
|
|
28
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "yellow" }, remaining),
|
|
29
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" },
|
|
30
|
+
" ",
|
|
31
|
+
unit,
|
|
32
|
+
" below")));
|
|
33
|
+
}
|
|
34
|
+
function ScrollBar({ scrollOffset, visibleRows, totalItems, height = 5, }) {
|
|
35
|
+
if (totalItems <= visibleRows)
|
|
36
|
+
return null;
|
|
37
|
+
const scrollRatio = scrollOffset / Math.max(1, totalItems - visibleRows);
|
|
38
|
+
const thumbPosition = Math.min(height - 1, Math.round(scrollRatio * (height - 1)));
|
|
39
|
+
const chars = Array.from({ length: height }, (_, i) => i === thumbPosition ? "█" : "░");
|
|
40
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, { flexDirection: "column" }, chars.map((char, i) => (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { key: i, color: i === thumbPosition ? "cyan" : "gray" }, char)))));
|
|
41
|
+
}
|
|
42
|
+
function ScrollPosition({ scrollOffset, visibleRows, totalItems, }) {
|
|
43
|
+
if (totalItems <= visibleRows)
|
|
44
|
+
return null;
|
|
45
|
+
const current = Math.min(scrollOffset + visibleRows, totalItems);
|
|
46
|
+
const percentage = Math.round((current / totalItems) * 100);
|
|
47
|
+
return (ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Box, null,
|
|
48
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "["),
|
|
49
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "cyan" }, scrollOffset + 1),
|
|
50
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "-"),
|
|
51
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "cyan" }, current),
|
|
52
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "/"),
|
|
53
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, null, totalItems),
|
|
54
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: "gray" }, "] "),
|
|
55
|
+
ink_wrapper_js_1.React.createElement(ink_wrapper_js_1.Text, { color: percentage === 100 ? "green" : "yellow" },
|
|
56
|
+
percentage,
|
|
57
|
+
"%")));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ScrollIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollIndicator.js","sourceRoot":"","sources":["../../../../src/cli/tui/components/ScrollIndicator.tsx"],"names":[],"mappings":";AAAA;;GAEG;;AAWH,gDAaC;AAED,sDAgBC;AASD,8BAwBC;AAQD,wCAsBC;AAvGD,sDAAqD;AASrD,SAAgB,kBAAkB,CAAC,EACjC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EAAE,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;YAAG,UAAU;gBAAS,CACtE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search bar component with visual feedback
|
|
3
|
+
*/
|
|
4
|
+
interface SearchBarProps {
|
|
5
|
+
query: string;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
resultCount?: number;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function SearchBar({ query, isActive, resultCount, placeholder, }: SearchBarProps): React.ReactElement | null;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=SearchBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/components/SearchBar.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,WAAW,EACX,WAAiC,GAClC,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA2B5C"}
|