hedgequantx 1.2.137 → 1.2.138
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 +1 -1
- package/src/app.js +63 -29
- package/src/ui/box.js +10 -1
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -101,40 +101,74 @@ const banner = async () => {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// Draw logo
|
|
104
|
+
// Draw logo - compact for mobile, full for desktop
|
|
105
|
+
const termWidth = process.stdout.columns || 80;
|
|
106
|
+
const isMobile = termWidth < 60;
|
|
107
|
+
|
|
105
108
|
console.log(chalk.cyan('╔' + '═'.repeat(innerWidth) + '╗'));
|
|
106
109
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
110
|
+
if (isMobile) {
|
|
111
|
+
// Compact HQX logo for mobile - X in yellow
|
|
112
|
+
const logoHQ = [
|
|
113
|
+
'██╗ ██╗ ██████╗ ',
|
|
114
|
+
'██║ ██║██╔═══██╗',
|
|
115
|
+
'███████║██║ ██║',
|
|
116
|
+
'██╔══██║██║▄▄ ██║',
|
|
117
|
+
'██║ ██║╚██████╔╝',
|
|
118
|
+
'╚═╝ ╚═╝ ╚══▀▀═╝ '
|
|
119
|
+
];
|
|
120
|
+
const logoX = [
|
|
121
|
+
'██╗ ██╗',
|
|
122
|
+
'╚██╗██╔╝',
|
|
123
|
+
' ╚███╔╝ ',
|
|
124
|
+
' ██╔██╗ ',
|
|
125
|
+
'██╔╝ ██╗',
|
|
126
|
+
'╚═╝ ╚═╝'
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
logoHQ.forEach((line, i) => {
|
|
130
|
+
const fullLine = chalk.cyan(line) + chalk.yellow(logoX[i]);
|
|
131
|
+
const totalLen = line.length + logoX[i].length;
|
|
132
|
+
const padding = innerWidth - totalLen;
|
|
133
|
+
const leftPad = Math.floor(padding / 2);
|
|
134
|
+
const rightPad = padding - leftPad;
|
|
135
|
+
console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(rightPad) + chalk.cyan('║'));
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
// Full HEDGEQUANTX logo for desktop
|
|
139
|
+
const logo = [
|
|
140
|
+
'██╗ ██╗███████╗██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗',
|
|
141
|
+
'██║ ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔═══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝',
|
|
142
|
+
'███████║█████╗ ██║ ██║██║ ███╗█████╗ ██║ ██║██║ ██║███████║██╔██╗ ██║ ██║ ',
|
|
143
|
+
'██╔══██║██╔══╝ ██║ ██║██║ ██║██╔══╝ ██║▄▄ ██║██║ ██║██╔══██║██║╚██╗██║ ██║ ',
|
|
144
|
+
'██║ ██║███████╗██████╔╝╚██████╔╝███████╗╚██████╔╝╚██████╔╝██║ ██║██║ ╚████║ ██║ ',
|
|
145
|
+
'╚═╝ ╚═╝╚══════╝╚═════╝ ╚═════╝ ╚══════╝ ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ '
|
|
146
|
+
];
|
|
147
|
+
const logoX = [
|
|
148
|
+
'██╗ ██╗',
|
|
149
|
+
'╚██╗██╔╝',
|
|
150
|
+
' ╚███╔╝ ',
|
|
151
|
+
' ██╔██╗ ',
|
|
152
|
+
'██╔╝ ██╗',
|
|
153
|
+
'╚═╝ ╚═╝'
|
|
154
|
+
];
|
|
155
|
+
|
|
156
|
+
logo.forEach((line, i) => {
|
|
157
|
+
const mainPart = chalk.cyan(line);
|
|
158
|
+
const xPart = chalk.yellow(logoX[i]);
|
|
159
|
+
const fullLine = mainPart + xPart;
|
|
160
|
+
const totalLen = line.length + logoX[i].length;
|
|
161
|
+
const padding = innerWidth - totalLen;
|
|
162
|
+
const leftPad = Math.floor(padding / 2);
|
|
163
|
+
const rightPad = padding - leftPad;
|
|
164
|
+
console.log(chalk.cyan('║') + ' '.repeat(leftPad) + fullLine + ' '.repeat(rightPad) + chalk.cyan('║'));
|
|
165
|
+
});
|
|
166
|
+
}
|
|
134
167
|
|
|
135
168
|
// Tagline
|
|
136
169
|
console.log(chalk.cyan('╠' + '═'.repeat(innerWidth) + '╣'));
|
|
137
|
-
|
|
170
|
+
const tagline = isMobile ? `HQX v${version}` : `Prop Futures Algo Trading v${version}`;
|
|
171
|
+
console.log(chalk.cyan('║') + chalk.white(centerText(tagline, innerWidth)) + chalk.cyan('║'));
|
|
138
172
|
|
|
139
173
|
// Stats bar if connected
|
|
140
174
|
if (statsInfo) {
|
package/src/ui/box.js
CHANGED
|
@@ -10,14 +10,23 @@ let logoWidth = null;
|
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Get logo width for consistent box sizing
|
|
13
|
+
* Adapts to terminal width for mobile devices
|
|
13
14
|
*/
|
|
14
15
|
const getLogoWidth = () => {
|
|
16
|
+
const termWidth = process.stdout.columns || 80;
|
|
17
|
+
|
|
18
|
+
// Mobile: use terminal width
|
|
19
|
+
if (termWidth < 60) {
|
|
20
|
+
return Math.max(termWidth - 2, 40);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Desktop: use logo width
|
|
15
24
|
if (!logoWidth) {
|
|
16
25
|
const logoText = figlet.textSync('HEDGEQUANTX', { font: 'ANSI Shadow' });
|
|
17
26
|
const lines = logoText.split('\n').filter(line => line.trim().length > 0);
|
|
18
27
|
logoWidth = Math.max(...lines.map(line => line.length)) + 4;
|
|
19
28
|
}
|
|
20
|
-
return logoWidth;
|
|
29
|
+
return Math.min(logoWidth, termWidth - 2);
|
|
21
30
|
};
|
|
22
31
|
|
|
23
32
|
/**
|