@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.
Files changed (250) hide show
  1. package/README.md +91 -68
  2. package/dist/calldata/index.d.ts +1 -1
  3. package/dist/calldata/index.d.ts.map +1 -1
  4. package/dist/calldata/index.js.map +1 -1
  5. package/dist/calldata/parameter-decoder.d.ts.map +1 -1
  6. package/dist/calldata/parameter-decoder.js +8 -1
  7. package/dist/calldata/parameter-decoder.js.map +1 -1
  8. package/dist/calldata/signature-lookup.d.ts +17 -2
  9. package/dist/calldata/signature-lookup.d.ts.map +1 -1
  10. package/dist/calldata/signature-lookup.js +20 -2
  11. package/dist/calldata/signature-lookup.js.map +1 -1
  12. package/dist/cli/cli.d.ts +21 -0
  13. package/dist/cli/cli.d.ts.map +1 -0
  14. package/dist/cli/{monitor.js → cli.js} +148 -74
  15. package/dist/cli/cli.js.map +1 -0
  16. package/dist/cli/lib/cli.d.ts +6 -1
  17. package/dist/cli/lib/cli.d.ts.map +1 -1
  18. package/dist/cli/lib/cli.js +58 -20
  19. package/dist/cli/lib/cli.js.map +1 -1
  20. package/dist/cli/lib/concurrency.d.ts +20 -0
  21. package/dist/cli/lib/concurrency.d.ts.map +1 -0
  22. package/dist/cli/lib/concurrency.js +32 -0
  23. package/dist/cli/lib/concurrency.js.map +1 -0
  24. package/dist/cli/tui/App.d.ts +13 -0
  25. package/dist/cli/tui/App.d.ts.map +1 -0
  26. package/dist/cli/tui/App.js +146 -0
  27. package/dist/cli/tui/App.js.map +1 -0
  28. package/dist/cli/tui/components/CollapsibleSection.d.ts +20 -0
  29. package/dist/cli/tui/components/CollapsibleSection.d.ts.map +1 -0
  30. package/dist/cli/tui/components/CollapsibleSection.js +29 -0
  31. package/dist/cli/tui/components/CollapsibleSection.js.map +1 -0
  32. package/dist/cli/tui/components/ConfirmDialog.d.ts +14 -0
  33. package/dist/cli/tui/components/ConfirmDialog.d.ts.map +1 -0
  34. package/dist/cli/tui/components/ConfirmDialog.js +29 -0
  35. package/dist/cli/tui/components/ConfirmDialog.js.map +1 -0
  36. package/dist/cli/tui/components/CopyableText.d.ts +23 -0
  37. package/dist/cli/tui/components/CopyableText.d.ts.map +1 -0
  38. package/dist/cli/tui/components/CopyableText.js +49 -0
  39. package/dist/cli/tui/components/CopyableText.js.map +1 -0
  40. package/dist/cli/tui/components/EmptyState.d.ts +11 -0
  41. package/dist/cli/tui/components/EmptyState.d.ts.map +1 -0
  42. package/dist/cli/tui/components/EmptyState.js +34 -0
  43. package/dist/cli/tui/components/EmptyState.js.map +1 -0
  44. package/dist/cli/tui/components/ErrorDisplay.d.ts +17 -0
  45. package/dist/cli/tui/components/ErrorDisplay.d.ts.map +1 -0
  46. package/dist/cli/tui/components/ErrorDisplay.js +66 -0
  47. package/dist/cli/tui/components/ErrorDisplay.js.map +1 -0
  48. package/dist/cli/tui/components/Header.d.ts +22 -0
  49. package/dist/cli/tui/components/Header.d.ts.map +1 -0
  50. package/dist/cli/tui/components/Header.js +73 -0
  51. package/dist/cli/tui/components/Header.js.map +1 -0
  52. package/dist/cli/tui/components/KeyHelp.d.ts +20 -0
  53. package/dist/cli/tui/components/KeyHelp.d.ts.map +1 -0
  54. package/dist/cli/tui/components/KeyHelp.js +136 -0
  55. package/dist/cli/tui/components/KeyHelp.js.map +1 -0
  56. package/dist/cli/tui/components/ProposalRow.d.ts +11 -0
  57. package/dist/cli/tui/components/ProposalRow.d.ts.map +1 -0
  58. package/dist/cli/tui/components/ProposalRow.js +106 -0
  59. package/dist/cli/tui/components/ProposalRow.js.map +1 -0
  60. package/dist/cli/tui/components/ScrollIndicator.d.ts +26 -0
  61. package/dist/cli/tui/components/ScrollIndicator.d.ts.map +1 -0
  62. package/dist/cli/tui/components/ScrollIndicator.js +59 -0
  63. package/dist/cli/tui/components/ScrollIndicator.js.map +1 -0
  64. package/dist/cli/tui/components/SearchBar.d.ts +12 -0
  65. package/dist/cli/tui/components/SearchBar.d.ts.map +1 -0
  66. package/dist/cli/tui/components/SearchBar.js +36 -0
  67. package/dist/cli/tui/components/SearchBar.js.map +1 -0
  68. package/dist/cli/tui/components/Skeleton.d.ts +22 -0
  69. package/dist/cli/tui/components/Skeleton.d.ts.map +1 -0
  70. package/dist/cli/tui/components/Skeleton.js +35 -0
  71. package/dist/cli/tui/components/Skeleton.js.map +1 -0
  72. package/dist/cli/tui/components/Spinner.d.ts +10 -0
  73. package/dist/cli/tui/components/Spinner.d.ts.map +1 -0
  74. package/dist/cli/tui/components/Spinner.js +24 -0
  75. package/dist/cli/tui/components/Spinner.js.map +1 -0
  76. package/dist/cli/tui/components/StageProgress.d.ts +12 -0
  77. package/dist/cli/tui/components/StageProgress.d.ts.map +1 -0
  78. package/dist/cli/tui/components/StageProgress.js +72 -0
  79. package/dist/cli/tui/components/StageProgress.js.map +1 -0
  80. package/dist/cli/tui/components/StageRow.d.ts +12 -0
  81. package/dist/cli/tui/components/StageRow.d.ts.map +1 -0
  82. package/dist/cli/tui/components/StageRow.js +106 -0
  83. package/dist/cli/tui/components/StageRow.js.map +1 -0
  84. package/dist/cli/tui/components/StatusBadge.d.ts +12 -0
  85. package/dist/cli/tui/components/StatusBadge.d.ts.map +1 -0
  86. package/dist/cli/tui/components/StatusBadge.js +27 -0
  87. package/dist/cli/tui/components/StatusBadge.js.map +1 -0
  88. package/dist/cli/tui/components/StatusBar.d.ts +12 -0
  89. package/dist/cli/tui/components/StatusBar.d.ts.map +1 -0
  90. package/dist/cli/tui/components/StatusBar.js +14 -0
  91. package/dist/cli/tui/components/StatusBar.js.map +1 -0
  92. package/dist/cli/tui/components/Timeline.d.ts +12 -0
  93. package/dist/cli/tui/components/Timeline.d.ts.map +1 -0
  94. package/dist/cli/tui/components/Timeline.js +91 -0
  95. package/dist/cli/tui/components/Timeline.js.map +1 -0
  96. package/dist/cli/tui/components/Toast.d.ts +13 -0
  97. package/dist/cli/tui/components/Toast.d.ts.map +1 -0
  98. package/dist/cli/tui/components/Toast.js +35 -0
  99. package/dist/cli/tui/components/Toast.js.map +1 -0
  100. package/dist/cli/tui/components/TrackingProgress.d.ts +24 -0
  101. package/dist/cli/tui/components/TrackingProgress.d.ts.map +1 -0
  102. package/dist/cli/tui/components/TrackingProgress.js +82 -0
  103. package/dist/cli/tui/components/TrackingProgress.js.map +1 -0
  104. package/dist/cli/tui/components/ViewLayout.d.ts +26 -0
  105. package/dist/cli/tui/components/ViewLayout.d.ts.map +1 -0
  106. package/dist/cli/tui/components/ViewLayout.js +57 -0
  107. package/dist/cli/tui/components/ViewLayout.js.map +1 -0
  108. package/dist/cli/tui/components/VotingStats.d.ts +11 -0
  109. package/dist/cli/tui/components/VotingStats.d.ts.map +1 -0
  110. package/dist/cli/tui/components/VotingStats.js +87 -0
  111. package/dist/cli/tui/components/VotingStats.js.map +1 -0
  112. package/dist/cli/tui/config.d.ts +42 -0
  113. package/dist/cli/tui/config.d.ts.map +1 -0
  114. package/dist/cli/tui/config.js +144 -0
  115. package/dist/cli/tui/config.js.map +1 -0
  116. package/dist/cli/tui/hooks/index.d.ts +12 -0
  117. package/dist/cli/tui/hooks/index.d.ts.map +1 -0
  118. package/dist/cli/tui/hooks/index.js +18 -0
  119. package/dist/cli/tui/hooks/index.js.map +1 -0
  120. package/dist/cli/tui/hooks/useCache.d.ts +12 -0
  121. package/dist/cli/tui/hooks/useCache.d.ts.map +1 -0
  122. package/dist/cli/tui/hooks/useCache.js +110 -0
  123. package/dist/cli/tui/hooks/useCache.js.map +1 -0
  124. package/dist/cli/tui/hooks/useCliProcess.d.ts +19 -0
  125. package/dist/cli/tui/hooks/useCliProcess.d.ts.map +1 -0
  126. package/dist/cli/tui/hooks/useCliProcess.js +135 -0
  127. package/dist/cli/tui/hooks/useCliProcess.js.map +1 -0
  128. package/dist/cli/tui/hooks/useNavigation.d.ts +40 -0
  129. package/dist/cli/tui/hooks/useNavigation.d.ts.map +1 -0
  130. package/dist/cli/tui/hooks/useNavigation.js +283 -0
  131. package/dist/cli/tui/hooks/useNavigation.js.map +1 -0
  132. package/dist/cli/tui/hooks/useProposals.d.ts +10 -0
  133. package/dist/cli/tui/hooks/useProposals.d.ts.map +1 -0
  134. package/dist/cli/tui/hooks/useProposals.js +215 -0
  135. package/dist/cli/tui/hooks/useProposals.js.map +1 -0
  136. package/dist/cli/tui/hooks/useStageCalldata.d.ts +17 -0
  137. package/dist/cli/tui/hooks/useStageCalldata.d.ts.map +1 -0
  138. package/dist/cli/tui/hooks/useStageCalldata.js +77 -0
  139. package/dist/cli/tui/hooks/useStageCalldata.js.map +1 -0
  140. package/dist/cli/tui/hooks/useTracker.d.ts +27 -0
  141. package/dist/cli/tui/hooks/useTracker.d.ts.map +1 -0
  142. package/dist/cli/tui/hooks/useTracker.js +205 -0
  143. package/dist/cli/tui/hooks/useTracker.js.map +1 -0
  144. package/dist/cli/tui/index.d.ts +15 -0
  145. package/dist/cli/tui/index.d.ts.map +1 -0
  146. package/dist/cli/tui/index.js +100 -0
  147. package/dist/cli/tui/index.js.map +1 -0
  148. package/dist/cli/tui/ink-wrapper.d.ts +43 -0
  149. package/dist/cli/tui/ink-wrapper.d.ts.map +1 -0
  150. package/dist/cli/tui/ink-wrapper.js +41 -0
  151. package/dist/cli/tui/ink-wrapper.js.map +1 -0
  152. package/dist/cli/tui/types.d.ts +37 -0
  153. package/dist/cli/tui/types.d.ts.map +1 -0
  154. package/dist/cli/tui/types.js +6 -0
  155. package/dist/cli/tui/types.js.map +1 -0
  156. package/dist/cli/tui/utils/clipboard.d.ts +7 -0
  157. package/dist/cli/tui/utils/clipboard.d.ts.map +1 -0
  158. package/dist/cli/tui/utils/clipboard.js +46 -0
  159. package/dist/cli/tui/utils/clipboard.js.map +1 -0
  160. package/dist/cli/tui/utils/index.d.ts +5 -0
  161. package/dist/cli/tui/utils/index.d.ts.map +1 -0
  162. package/dist/cli/tui/utils/index.js +13 -0
  163. package/dist/cli/tui/utils/index.js.map +1 -0
  164. package/dist/cli/tui/utils/terminal.d.ts +18 -0
  165. package/dist/cli/tui/utils/terminal.d.ts.map +1 -0
  166. package/dist/cli/tui/utils/terminal.js +26 -0
  167. package/dist/cli/tui/utils/terminal.js.map +1 -0
  168. package/dist/cli/tui/utils/text.d.ts +12 -0
  169. package/dist/cli/tui/utils/text.d.ts.map +1 -0
  170. package/dist/cli/tui/utils/text.js +30 -0
  171. package/dist/cli/tui/utils/text.js.map +1 -0
  172. package/dist/cli/tui/views/CalldataView.d.ts +12 -0
  173. package/dist/cli/tui/views/CalldataView.d.ts.map +1 -0
  174. package/dist/cli/tui/views/CalldataView.js +194 -0
  175. package/dist/cli/tui/views/CalldataView.js.map +1 -0
  176. package/dist/cli/tui/views/DescriptionView.d.ts +12 -0
  177. package/dist/cli/tui/views/DescriptionView.d.ts.map +1 -0
  178. package/dist/cli/tui/views/DescriptionView.js +182 -0
  179. package/dist/cli/tui/views/DescriptionView.js.map +1 -0
  180. package/dist/cli/tui/views/ElectionView.d.ts +12 -0
  181. package/dist/cli/tui/views/ElectionView.d.ts.map +1 -0
  182. package/dist/cli/tui/views/ElectionView.js +197 -0
  183. package/dist/cli/tui/views/ElectionView.js.map +1 -0
  184. package/dist/cli/tui/views/HelpView.d.ts +10 -0
  185. package/dist/cli/tui/views/HelpView.d.ts.map +1 -0
  186. package/dist/cli/tui/views/HelpView.js +159 -0
  187. package/dist/cli/tui/views/HelpView.js.map +1 -0
  188. package/dist/cli/tui/views/ProposalDetail.d.ts +14 -0
  189. package/dist/cli/tui/views/ProposalDetail.d.ts.map +1 -0
  190. package/dist/cli/tui/views/ProposalDetail.js +167 -0
  191. package/dist/cli/tui/views/ProposalDetail.js.map +1 -0
  192. package/dist/cli/tui/views/ProposalList.d.ts +17 -0
  193. package/dist/cli/tui/views/ProposalList.d.ts.map +1 -0
  194. package/dist/cli/tui/views/ProposalList.js +126 -0
  195. package/dist/cli/tui/views/ProposalList.js.map +1 -0
  196. package/dist/cli/tui/views/SettingsView.d.ts +12 -0
  197. package/dist/cli/tui/views/SettingsView.d.ts.map +1 -0
  198. package/dist/cli/tui/views/SettingsView.js +203 -0
  199. package/dist/cli/tui/views/SettingsView.js.map +1 -0
  200. package/dist/cli/tui/views/SimulationView.d.ts +12 -0
  201. package/dist/cli/tui/views/SimulationView.d.ts.map +1 -0
  202. package/dist/cli/tui/views/SimulationView.js +112 -0
  203. package/dist/cli/tui/views/SimulationView.js.map +1 -0
  204. package/dist/cli/tui/views/StageView.d.ts +12 -0
  205. package/dist/cli/tui/views/StageView.d.ts.map +1 -0
  206. package/dist/cli/tui/views/StageView.js +215 -0
  207. package/dist/cli/tui/views/StageView.js.map +1 -0
  208. package/dist/constants.d.ts +1 -0
  209. package/dist/constants.d.ts.map +1 -1
  210. package/dist/constants.js +1 -0
  211. package/dist/constants.js.map +1 -1
  212. package/dist/data/bundled-cache.json +6651 -2485
  213. package/dist/discovery/governor-discovery.d.ts.map +1 -1
  214. package/dist/discovery/governor-discovery.js +2 -1
  215. package/dist/discovery/governor-discovery.js.map +1 -1
  216. package/dist/index.d.ts +22 -3
  217. package/dist/index.d.ts.map +1 -1
  218. package/dist/index.js +28 -3
  219. package/dist/index.js.map +1 -1
  220. package/dist/stages/l2-to-l1-message.d.ts +5 -0
  221. package/dist/stages/l2-to-l1-message.d.ts.map +1 -1
  222. package/dist/stages/l2-to-l1-message.js +73 -7
  223. package/dist/stages/l2-to-l1-message.js.map +1 -1
  224. package/dist/stages/timelock.d.ts.map +1 -1
  225. package/dist/stages/timelock.js +10 -3
  226. package/dist/stages/timelock.js.map +1 -1
  227. package/dist/stages/utils.d.ts +5 -2
  228. package/dist/stages/utils.d.ts.map +1 -1
  229. package/dist/stages/utils.js +14 -6
  230. package/dist/stages/utils.js.map +1 -1
  231. package/dist/tracker/cache.d.ts +27 -0
  232. package/dist/tracker/cache.d.ts.map +1 -1
  233. package/dist/tracker/cache.js +50 -2
  234. package/dist/tracker/cache.js.map +1 -1
  235. package/dist/tracker/execute.d.ts.map +1 -1
  236. package/dist/tracker/execute.js +25 -1
  237. package/dist/tracker/execute.js.map +1 -1
  238. package/dist/types/stages.d.ts +15 -2
  239. package/dist/types/stages.d.ts.map +1 -1
  240. package/dist/types/stages.js.map +1 -1
  241. package/dist/types/tracking.d.ts +4 -0
  242. package/dist/types/tracking.d.ts.map +1 -1
  243. package/dist/utils/sanitize.d.ts +28 -0
  244. package/dist/utils/sanitize.d.ts.map +1 -0
  245. package/dist/utils/sanitize.js +52 -0
  246. package/dist/utils/sanitize.js.map +1 -0
  247. package/package.json +28 -16
  248. package/dist/cli/monitor.d.ts +0 -3
  249. package/dist/cli/monitor.d.ts.map +0 -1
  250. package/dist/cli/monitor.js.map +0 -1
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ /**
3
+ * TUI Module Entry Point
4
+ *
5
+ * Interactive terminal UI for browsing and tracking governance proposals.
6
+ * Requires: ink@3.x, react@17.x (CommonJS compatible versions)
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.runTui = runTui;
43
+ const fs = __importStar(require("fs"));
44
+ const ink_wrapper_js_1 = require("./ink-wrapper.js");
45
+ const config_js_1 = require("./config.js");
46
+ function checkTtySupport() {
47
+ if (!process.stdin.isTTY) {
48
+ console.error("Error: TUI requires an interactive terminal (TTY).");
49
+ console.error("");
50
+ console.error("The TUI cannot run in:");
51
+ console.error(" - Piped input (e.g., echo 'q' | gov-tracker ui)");
52
+ console.error(" - CI/CD environments without TTY allocation");
53
+ console.error(" - Non-interactive shells");
54
+ console.error("");
55
+ console.error("For non-interactive use, try: gov-tracker status");
56
+ process.exit(1);
57
+ }
58
+ }
59
+ async function runTui(options) {
60
+ checkTtySupport();
61
+ (0, ink_wrapper_js_1.checkTuiDependencies)();
62
+ // Set config storage path to same directory as cache
63
+ (0, config_js_1.setConfigBasePath)(options.cachePath);
64
+ // Set up file logging if logFile is specified
65
+ let logStream = null;
66
+ let originalStderrWrite = null;
67
+ if (options.logFile) {
68
+ logStream = fs.createWriteStream(options.logFile, { flags: "a" });
69
+ logStream.write(`\n--- TUI Session Started: ${new Date().toISOString()} ---\n`);
70
+ // Redirect stderr (where debug writes) to file
71
+ originalStderrWrite = process.stderr.write.bind(process.stderr);
72
+ process.stderr.write = ((chunk) => {
73
+ // Write to log file
74
+ logStream?.write(chunk);
75
+ // Don't write debug output to terminal (it would corrupt TUI)
76
+ // Only return true to indicate successful write
77
+ return true;
78
+ });
79
+ }
80
+ const { App } = await Promise.resolve().then(() => __importStar(require("./App.js")));
81
+ try {
82
+ const { waitUntilExit } = (0, ink_wrapper_js_1.render)(ink_wrapper_js_1.React.createElement(App, {
83
+ cachePath: options.cachePath,
84
+ providers: options.providers,
85
+ verbose: options.verbose,
86
+ }), { fullScreen: true });
87
+ await waitUntilExit();
88
+ }
89
+ finally {
90
+ // Restore stderr and close log file
91
+ if (originalStderrWrite) {
92
+ process.stderr.write = originalStderrWrite;
93
+ }
94
+ if (logStream) {
95
+ logStream.write(`--- TUI Session Ended: ${new Date().toISOString()} ---\n`);
96
+ logStream.end();
97
+ }
98
+ }
99
+ }
100
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/tui/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,wBAiDC;AA3ED,uCAAyB;AAEzB,qDAAuE;AACvE,2CAAgD;AAShD,SAAS,eAAe;IACtB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACpE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACnE,OAAO,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QAC/D,OAAO,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAC5C,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,MAAM,CAAC,OAAmB;IAC9C,eAAe,EAAE,CAAC;IAClB,IAAA,qCAAoB,GAAE,CAAC;IAEvB,qDAAqD;IACrD,IAAA,6BAAiB,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAErC,8CAA8C;IA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AC,0BAA0B,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YAC5E,SAAS,CAAC,GAAG,EAAE,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Ink wrapper to handle module resolution
3
+ *
4
+ * This module provides type-safe wrappers for ink components
5
+ * that work with the project's CommonJS module resolution.
6
+ */
7
+ declare let React: any;
8
+ export declare function checkTuiDependencies(): void;
9
+ export { React };
10
+ export declare const useState: typeof import("react").useState;
11
+ export declare const useCallback: typeof import("react").useCallback;
12
+ export declare const useMemo: typeof import("react").useMemo;
13
+ export declare const useEffect: typeof import("react").useEffect;
14
+ export declare const render: any;
15
+ export declare const Box: any;
16
+ export declare const Text: any;
17
+ export declare const useInput: (callback: (input: string, key: KeyInput) => void, options?: {
18
+ isActive?: boolean;
19
+ }) => void;
20
+ export declare const useApp: () => {
21
+ exit: (error?: Error) => void;
22
+ };
23
+ export declare const useStdout: () => {
24
+ stdout: NodeJS.WriteStream;
25
+ write: (data: string) => void;
26
+ };
27
+ export interface KeyInput {
28
+ upArrow: boolean;
29
+ downArrow: boolean;
30
+ leftArrow: boolean;
31
+ rightArrow: boolean;
32
+ pageUp: boolean;
33
+ pageDown: boolean;
34
+ return: boolean;
35
+ escape: boolean;
36
+ tab: boolean;
37
+ backspace: boolean;
38
+ delete: boolean;
39
+ ctrl: boolean;
40
+ meta: boolean;
41
+ shift: boolean;
42
+ }
43
+ //# sourceMappingURL=ink-wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ink-wrapper.d.ts","sourceRoot":"","sources":["../../../src/cli/tui/ink-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,QAAA,IAAI,KAAK,EAAE,GAAG,CAAC;AAWf,wBAAgB,oBAAoB,IAAI,IAAI,CAM3C;AAED,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,eAAO,MAAM,QAAQ,EAAsB,cA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O,CAAC;CAChB"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * Ink wrapper to handle module resolution
4
+ *
5
+ * This module provides type-safe wrappers for ink components
6
+ * that work with the project's CommonJS module resolution.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.useStdout = exports.useApp = exports.useInput = exports.Text = exports.Box = exports.render = exports.useEffect = exports.useMemo = exports.useCallback = exports.useState = exports.React = void 0;
10
+ exports.checkTuiDependencies = checkTuiDependencies;
11
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
+ let ink;
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ let React;
15
+ try {
16
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
17
+ ink = require("ink");
18
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
19
+ exports.React = React = require("react");
20
+ }
21
+ catch {
22
+ // Dependencies loaded lazily - will be checked at runtime
23
+ }
24
+ function checkTuiDependencies() {
25
+ if (!ink || !React) {
26
+ console.error("Error: TUI requires 'ink' and 'react' packages.");
27
+ console.error("Install them with: yarn add ink@^3.2.0 react@^17.0.2");
28
+ process.exit(1);
29
+ }
30
+ }
31
+ exports.useState = React?.useState;
32
+ exports.useCallback = React?.useCallback;
33
+ exports.useMemo = React?.useMemo;
34
+ exports.useEffect = React?.useEffect;
35
+ exports.render = ink?.render;
36
+ exports.Box = ink?.Box;
37
+ exports.Text = ink?.Text;
38
+ exports.useInput = ink?.useInput;
39
+ exports.useApp = ink?.useApp;
40
+ exports.useStdout = ink?.useStdout;
41
+ //# sourceMappingURL=ink-wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ink-wrapper.js","sourceRoot":"","sources":["../../../src/cli/tui/ink-wrapper.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAgBH,oDAMC;AApBD,8DAA8D;AAC9D,IAAI,GAAQ,CAAC;AACb,8DAA8D;AAC9D,IAAI,KAAU,CAAC;AAEf,IAAI,CAAC;IACH,iEAAiE;IACjE,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IACrB,iEAAiE;IACjE,gBAAA,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAAC,MAAM,CAAC;IACP,0DAA0D;AAC5D,CAAC;AAED,SAAgB,oBAAoB;IAClC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAGY,QAAA,QAAQ,GAAG,KAAK,EAAE,QAA2C,CAAC;AAC9D,QAAA,WAAW,GAAG,KAAK,EAAE,WAAiD,CAAC;AACvE,QAAA,OAAO,GAAG,KAAK,EAAE,OAAyC,CAAC;AAC3D,QAAA,SAAS,GAAG,KAAK,EAAE,SAA6C,CAAC;AACjE,QAAA,MAAM,GAAG,GAAG,EAAE,MAAM,CAAC;AACrB,QAAA,GAAG,GAAG,GAAG,EAAE,GAAG,CAAC;AACf,QAAA,IAAI,GAAG,GAAG,EAAE,IAAI,CAAC;AACjB,QAAA,QAAQ,GAAG,GAAG,EAAE,QAGpB,CAAC;AACG,QAAA,MAAM,GAAG,GAAG,EAAE,MAAiD,CAAC;AAChE,QAAA,SAAS,GAAG,GAAG,EAAE,SAG7B,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * TUI-specific types
3
+ */
4
+ import type { TrackingCheckpoint, TrackerStats, StageType } from "../../types/index.js";
5
+ export type ViewType = "list" | "detail" | "calldata" | "stage" | "simulation" | "description" | "election" | "help" | "settings";
6
+ export type FilterType = "all" | "active" | "complete" | "timelocks";
7
+ export type SortType = "newest" | "oldest" | "progress" | "status";
8
+ export interface ProposalListItem {
9
+ key: string;
10
+ title: string;
11
+ type: "governor" | "timelock" | "election";
12
+ proposalType?: string;
13
+ status: "active" | "complete" | "failed";
14
+ stageProgress: string;
15
+ currentStage: StageType | null;
16
+ hasExecutable: boolean;
17
+ createdAt: number | null;
18
+ checkpoint: TrackingCheckpoint;
19
+ }
20
+ export interface NavigationState {
21
+ view: ViewType;
22
+ previousView: ViewType | null;
23
+ filter: FilterType;
24
+ sort: SortType;
25
+ selectedIndex: number;
26
+ selectedProposal: ProposalListItem | null;
27
+ selectedStageIndex: number;
28
+ calldataActionIndex: number;
29
+ scrollOffset: number;
30
+ searchQuery: string;
31
+ isSearching: boolean;
32
+ }
33
+ export interface CacheData {
34
+ checkpoints: Map<string, TrackingCheckpoint>;
35
+ stats: TrackerStats;
36
+ }
37
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/tui/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAExF,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,QAAQ,GACR,UAAU,GACV,OAAO,GACP,YAAY,GACZ,aAAa,GACb,UAAU,GACV,MAAM,GACN,UAAU,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;AAErE,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,kBAAkB,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC7C,KAAK,EAAE,YAAY,CAAC;CACrB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * TUI-specific types
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/tui/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Clipboard utilities for TUI
3
+ * Uses native OS clipboard commands via safe execFile
4
+ */
5
+ export declare function copyToClipboard(text: string): boolean;
6
+ export declare function formatForCopy(value: string, type: "hash" | "address" | "id"): string;
7
+ //# sourceMappingURL=clipboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/utils/clipboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAuBrD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAUpF"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ /**
3
+ * Clipboard utilities for TUI
4
+ * Uses native OS clipboard commands via safe execFile
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.copyToClipboard = copyToClipboard;
8
+ exports.formatForCopy = formatForCopy;
9
+ const child_process_1 = require("child_process");
10
+ function copyToClipboard(text) {
11
+ try {
12
+ const platform = process.platform;
13
+ if (platform === "darwin") {
14
+ (0, child_process_1.execFileSync)("pbcopy", [], { input: text });
15
+ }
16
+ else if (platform === "linux") {
17
+ // Try xclip first, then xsel
18
+ try {
19
+ (0, child_process_1.execFileSync)("xclip", ["-selection", "clipboard"], { input: text });
20
+ }
21
+ catch {
22
+ (0, child_process_1.execFileSync)("xsel", ["--clipboard", "--input"], { input: text });
23
+ }
24
+ }
25
+ else if (platform === "win32") {
26
+ (0, child_process_1.execFileSync)("clip", [], { input: text });
27
+ }
28
+ else {
29
+ return false;
30
+ }
31
+ return true;
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ }
37
+ function formatForCopy(value, type) {
38
+ // Remove any display formatting
39
+ const cleaned = value.replace(/\s+/g, "").trim();
40
+ // Ensure proper prefix for addresses and hashes
41
+ if ((type === "hash" || type === "address") && !cleaned.startsWith("0x")) {
42
+ return `0x${cleaned}`;
43
+ }
44
+ return cleaned;
45
+ }
46
+ //# sourceMappingURL=clipboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../../src/cli/tui/utils/clipboard.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAIH,0CAuBC;AAED,sCAUC;AArCD,iDAA6C;AAE7C,SAAgB,eAAe,CAAC,IAAY;IAC1C,IAAI,CAAC;QACH,MAAM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0 +1,5 @@
1
+ export { wrapText, truncate } from "./text.js";
2
+ export { getTerminalSize, getVisibleRows } from "./terminal.js";
3
+ export type { TerminalSize } from "./terminal.js";
4
+ export { copyToClipboard, formatForCopy } from "./clipboard.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatForCopy = exports.copyToClipboard = exports.getVisibleRows = exports.getTerminalSize = exports.truncate = exports.wrapText = void 0;
4
+ var text_js_1 = require("./text.js");
5
+ Object.defineProperty(exports, "wrapText", { enumerable: true, get: function () { return text_js_1.wrapText; } });
6
+ Object.defineProperty(exports, "truncate", { enumerable: true, get: function () { return text_js_1.truncate; } });
7
+ var terminal_js_1 = require("./terminal.js");
8
+ Object.defineProperty(exports, "getTerminalSize", { enumerable: true, get: function () { return terminal_js_1.getTerminalSize; } });
9
+ Object.defineProperty(exports, "getVisibleRows", { enumerable: true, get: function () { return terminal_js_1.getVisibleRows; } });
10
+ var clipboard_js_1 = require("./clipboard.js");
11
+ Object.defineProperty(exports, "copyToClipboard", { enumerable: true, get: function () { return clipboard_js_1.copyToClipboard; } });
12
+ Object.defineProperty(exports, "formatForCopy", { enumerable: true, get: function () { return clipboard_js_1.formatForCopy; } });
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/tui/utils/index.ts"],"names":[],"mappings":";;;AAAA,qCAA+C;AAAtC,mGAAA,QAAQ,OAAA;AAAE,mGAAA,QAAQ,OAAA;AAC3B,6CAAgE;AAAvD,8GAAA,eAAe,OAAA;AAAE,6GAAA,cAAc,OAAA;AAExC,+CAAgE;AAAvD,+GAAA,eAAe,OAAA;AAAE,6GAAA,aAAa,OAAA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Terminal size utilities for TUI views
3
+ */
4
+ export interface TerminalSize {
5
+ width: number;
6
+ height: number;
7
+ }
8
+ /**
9
+ * Get current terminal dimensions
10
+ */
11
+ export declare function getTerminalSize(): TerminalSize;
12
+ /**
13
+ * Calculate visible rows for scrollable content
14
+ * @param reservedLines - Lines used by headers, footers, etc.
15
+ * @param minRows - Minimum rows to show
16
+ */
17
+ export declare function getVisibleRows(reservedLines: number, minRows?: number): number;
18
+ //# sourceMappingURL=terminal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/utils/terminal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAK9C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CAGzE"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Terminal size utilities for TUI views
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getTerminalSize = getTerminalSize;
7
+ exports.getVisibleRows = getVisibleRows;
8
+ /**
9
+ * Get current terminal dimensions
10
+ */
11
+ function getTerminalSize() {
12
+ return {
13
+ width: process.stdout.columns || 80,
14
+ height: process.stdout.rows || 24,
15
+ };
16
+ }
17
+ /**
18
+ * Calculate visible rows for scrollable content
19
+ * @param reservedLines - Lines used by headers, footers, etc.
20
+ * @param minRows - Minimum rows to show
21
+ */
22
+ function getVisibleRows(reservedLines, minRows = 5) {
23
+ const { height } = getTerminalSize();
24
+ return Math.max(minRows, height - reservedLines);
25
+ }
26
+ //# sourceMappingURL=terminal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal.js","sourceRoot":"","sources":["../../../../src/cli/tui/utils/terminal.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAUH,0CAKC;AAOD,wCAGC;AAlBD;;GAEG;AACH,SAAgB,eAAe;IAC7B,OAAO;QACL,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;QACnC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;KAClC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,aAAqB,EAAE,OAAO,GAAG,CAAC;IAC/D,MAAM,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,CAAC;IACrC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared text utilities for TUI views
3
+ */
4
+ /**
5
+ * Wrap text to fit within a given width, breaking at character boundaries
6
+ */
7
+ export declare function wrapText(text: string, width: number): string[];
8
+ /**
9
+ * Truncate text with ellipsis if it exceeds maxLen
10
+ */
11
+ export declare function truncate(str: string, maxLen: number): string;
12
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/utils/text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAO9D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAI5D"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /**
3
+ * Shared text utilities for TUI views
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.wrapText = wrapText;
7
+ exports.truncate = truncate;
8
+ /**
9
+ * Wrap text to fit within a given width, breaking at character boundaries
10
+ */
11
+ function wrapText(text, width) {
12
+ if (text.length <= width)
13
+ return [text];
14
+ const lines = [];
15
+ for (let i = 0; i < text.length; i += width) {
16
+ lines.push(text.slice(i, i + width));
17
+ }
18
+ return lines;
19
+ }
20
+ /**
21
+ * Truncate text with ellipsis if it exceeds maxLen
22
+ */
23
+ function truncate(str, maxLen) {
24
+ if (maxLen <= 1)
25
+ return str.length > 0 ? "…" : "";
26
+ if (str.length <= maxLen)
27
+ return str;
28
+ return str.slice(0, maxLen - 1) + "…";
29
+ }
30
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../src/cli/tui/utils/text.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,4BAOC;AAKD,4BAIC;AAnBD;;GAEG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,KAAa;IAClD,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,MAAc;IAClD,IAAI,MAAM,IAAI,CAAC;QAAE,OAAO,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAClD,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IACrC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AACxC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Decoded calldata view with foldable long values (no truncation)
3
+ */
4
+ import type { ProposalListItem } from "../types.js";
5
+ import type { UseNavigationResult } from "../hooks/index.js";
6
+ interface CalldataViewProps {
7
+ proposal: ProposalListItem;
8
+ navigation: UseNavigationResult;
9
+ }
10
+ export declare function CalldataView({ proposal, navigation, }: CalldataViewProps): React.ReactElement;
11
+ export {};
12
+ //# sourceMappingURL=CalldataView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalldataView.d.ts","sourceRoot":"","sources":["../../../../src/cli/tui/views/CalldataView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAW7D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,mBAAmB,CAAC;CACjC;AAwFD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,UAAU,GACX,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAkJxC"}