hedgequantx 2.5.16 → 2.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hedgequantx",
3
- "version": "2.5.16",
3
+ "version": "2.5.18",
4
4
  "description": "HedgeQuantX - Prop Futures Trading CLI",
5
5
  "main": "src/app.js",
6
6
  "bin": {
@@ -79,7 +79,7 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
79
79
 
80
80
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));
81
81
 
82
- // Menu in 3 columns - centered
82
+ // Menu in 3 columns - fixed width columns for perfect alignment
83
83
  const colWidth = Math.floor(W / 3);
84
84
 
85
85
  const menuRow3 = (col1, col2, col3) => {
@@ -87,22 +87,24 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
87
87
  const c2Plain = col2.replace(/\x1b\[[0-9;]*m/g, '');
88
88
  const c3Plain = col3.replace(/\x1b\[[0-9;]*m/g, '');
89
89
 
90
- // Center each column within its space
91
- const c1LeftPad = Math.floor((colWidth - c1Plain.length) / 2);
92
- const c1RightPad = colWidth - c1Plain.length - c1LeftPad;
90
+ // Center each item within its fixed-width column
91
+ const pad1Left = Math.floor((colWidth - c1Plain.length) / 2);
92
+ const pad1Right = colWidth - c1Plain.length - pad1Left;
93
93
 
94
- const c2LeftPad = Math.floor((colWidth - c2Plain.length) / 2);
95
- const c2RightPad = colWidth - c2Plain.length - c2LeftPad;
94
+ const pad2Left = Math.floor((colWidth - c2Plain.length) / 2);
95
+ const pad2Right = colWidth - c2Plain.length - pad2Left;
96
96
 
97
- const c3Width = W - colWidth * 2;
98
- const c3LeftPad = Math.floor((c3Width - c3Plain.length) / 2);
99
- const c3RightPad = c3Width - c3Plain.length - c3LeftPad;
97
+ // Third column gets remaining width
98
+ const col3Width = W - (colWidth * 2);
99
+ const pad3Left = Math.floor((col3Width - c3Plain.length) / 2);
100
+ const pad3Right = col3Width - c3Plain.length - pad3Left;
100
101
 
101
- console.log(chalk.cyan('║') +
102
- ' '.repeat(Math.max(0, c1LeftPad)) + col1 + ' '.repeat(Math.max(0, c1RightPad)) +
103
- ' '.repeat(Math.max(0, c2LeftPad)) + col2 + ' '.repeat(Math.max(0, c2RightPad)) +
104
- ' '.repeat(Math.max(0, c3LeftPad)) + col3 + ' '.repeat(Math.max(0, c3RightPad)) +
105
- chalk.cyan('║'));
102
+ const line =
103
+ ' '.repeat(pad1Left) + col1 + ' '.repeat(pad1Right) +
104
+ ' '.repeat(pad2Left) + col2 + ' '.repeat(pad2Right) +
105
+ ' '.repeat(pad3Left) + col3 + ' '.repeat(pad3Right);
106
+
107
+ console.log(chalk.cyan('║') + line + chalk.cyan('║'));
106
108
  };
107
109
 
108
110
  const centerLine = (content) => {
@@ -112,8 +114,14 @@ const balStr = statsInfo.balance !== null ? `$${statsInfo.balance.toLocaleString
112
114
  console.log(chalk.cyan('║') + ' '.repeat(leftPad) + content + ' '.repeat(padding - leftPad) + chalk.cyan('║'));
113
115
  };
114
116
 
115
- menuRow3(chalk.cyan('[1] VIEW ACCOUNTS'), chalk.cyan('[2] VIEW STATS'), chalk.cyan('[+] ADD ACCOUNT'));
116
- menuRow3(chalk.magenta('[A] ALGO TRADING'), chalk.magenta('[I] AI AGENT'), chalk.yellow('[U] UPDATE HQX'));
117
+ // Fixed-width menu items for perfect alignment
118
+ const menuItem = (key, label, color) => {
119
+ const text = `[${key}] ${label.padEnd(14)}`;
120
+ return color(text);
121
+ };
122
+
123
+ menuRow3(menuItem('1', 'VIEW ACCOUNTS', chalk.cyan), menuItem('2', 'VIEW STATS', chalk.cyan), menuItem('+', 'ADD ACCOUNT', chalk.cyan));
124
+ menuRow3(menuItem('A', 'ALGO TRADING', chalk.magenta), menuItem('I', 'AI AGENT', chalk.magenta), menuItem('U', 'UPDATE HQX', chalk.yellow));
117
125
 
118
126
  // Separator and disconnect button centered
119
127
  console.log(chalk.cyan('╠' + '═'.repeat(W) + '╣'));