4runr-os 2.1.1 → 2.1.2
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/dist/tui_mk1/core/eventBus.d.ts +28 -0
- package/dist/tui_mk1/core/eventBus.d.ts.map +1 -0
- package/dist/tui_mk1/core/eventBus.js +52 -0
- package/dist/tui_mk1/core/eventBus.js.map +1 -0
- package/dist/tui_mk1/core/feedStore.d.ts +31 -0
- package/dist/tui_mk1/core/feedStore.d.ts.map +1 -0
- package/dist/tui_mk1/core/feedStore.js +51 -0
- package/dist/tui_mk1/core/feedStore.js.map +1 -0
- package/dist/tui_mk1/kernel.d.ts.map +1 -1
- package/dist/tui_mk1/kernel.js +2 -0
- package/dist/tui_mk1/kernel.js.map +1 -1
- package/dist/tui_mk1/layout/layoutEngine.d.ts +28 -0
- package/dist/tui_mk1/layout/layoutEngine.d.ts.map +1 -0
- package/dist/tui_mk1/layout/layoutEngine.js +258 -0
- package/dist/tui_mk1/layout/layoutEngine.js.map +1 -0
- package/dist/tui_mk1/mk1App.d.ts +18 -11
- package/dist/tui_mk1/mk1App.d.ts.map +1 -1
- package/dist/tui_mk1/mk1App.js +165 -133
- package/dist/tui_mk1/mk1App.js.map +1 -1
- package/dist/tui_mk1/ui/debugGutter.d.ts +7 -0
- package/dist/tui_mk1/ui/debugGutter.d.ts.map +1 -0
- package/dist/tui_mk1/ui/debugGutter.js +60 -0
- package/dist/tui_mk1/ui/debugGutter.js.map +1 -0
- package/dist/tui_mk1/ui/panels/createSection.d.ts +18 -0
- package/dist/tui_mk1/ui/panels/createSection.d.ts.map +1 -0
- package/dist/tui_mk1/ui/panels/createSection.js +42 -0
- package/dist/tui_mk1/ui/panels/createSection.js.map +1 -0
- package/dist/tui_mk1/ui/panels.d.ts +23 -0
- package/dist/tui_mk1/ui/panels.d.ts.map +1 -0
- package/dist/tui_mk1/ui/panels.js +108 -0
- package/dist/tui_mk1/ui/panels.js.map +1 -0
- package/dist/tui_mk1/ui/render/sectionRenderer.d.ts +21 -0
- package/dist/tui_mk1/ui/render/sectionRenderer.d.ts.map +1 -0
- package/dist/tui_mk1/ui/render/sectionRenderer.js +32 -0
- package/dist/tui_mk1/ui/render/sectionRenderer.js.map +1 -0
- package/dist/tui_mk1/ui/widgetManager.d.ts +58 -0
- package/dist/tui_mk1/ui/widgetManager.d.ts.map +1 -0
- package/dist/tui_mk1/ui/widgetManager.js +197 -0
- package/dist/tui_mk1/ui/widgetManager.js.map +1 -0
- package/dist/tui_mk1/viewport/safeViewport.d.ts +19 -0
- package/dist/tui_mk1/viewport/safeViewport.d.ts.map +1 -0
- package/dist/tui_mk1/viewport/safeViewport.js +39 -0
- package/dist/tui_mk1/viewport/safeViewport.js.map +1 -0
- package/package.json +2 -2
package/dist/tui_mk1/mk1App.js
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MK1 App -
|
|
2
|
+
* MK1 App - 4Runr Layout + Identity (Phase 2)
|
|
3
3
|
*
|
|
4
4
|
* Render:
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
7
|
-
* -
|
|
5
|
+
* - Layout engine computes panel positions
|
|
6
|
+
* - Widget manager creates/manages all panels
|
|
7
|
+
* - Operations feed (Truth Bus) displays events
|
|
8
|
+
* - Command input at bottom
|
|
8
9
|
*
|
|
9
10
|
* Commands:
|
|
10
11
|
* - dbg:size → prints to stderr log file, not UI
|
|
11
12
|
* - dbg:panic → forces rebuild (destroy + recreate screen)
|
|
12
|
-
* -
|
|
13
|
+
* - dbg:layout → shows layout debug info in operations feed
|
|
14
|
+
* - help → prints in operations feed
|
|
13
15
|
*/
|
|
14
|
-
import blessed from 'neo-blessed';
|
|
15
16
|
import { MK1Kernel } from './kernel.js';
|
|
16
|
-
import { getResizeStats } from './resizeController.js';
|
|
17
17
|
import { logger } from './logger.js';
|
|
18
|
+
import { computeLayout, validateLayout } from './layout/layoutEngine.js';
|
|
19
|
+
import { WidgetManager } from './ui/widgetManager.js';
|
|
20
|
+
import { eventBus } from './core/eventBus.js';
|
|
21
|
+
import { feedStore } from './core/feedStore.js';
|
|
22
|
+
import { getSafeViewport } from './viewport/safeViewport.js';
|
|
23
|
+
import { createDebugGutter } from './ui/debugGutter.js';
|
|
18
24
|
export class MK1App {
|
|
19
25
|
kernel;
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
widgetManager;
|
|
27
|
+
layout = null;
|
|
22
28
|
lastRebuildReason = 'initial';
|
|
23
29
|
inputHandlersAttached = false;
|
|
30
|
+
debugLayout = false;
|
|
31
|
+
safeViewport = null;
|
|
32
|
+
debugGutter = null;
|
|
24
33
|
constructor() {
|
|
25
34
|
this.kernel = new MK1Kernel();
|
|
35
|
+
this.widgetManager = new WidgetManager();
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* Start MK1 App
|
|
29
39
|
*/
|
|
30
40
|
async start() {
|
|
41
|
+
// Initialize feed store (subscribes to eventBus)
|
|
42
|
+
feedStore;
|
|
43
|
+
// Emit boot event
|
|
44
|
+
eventBus.emit('SYS', 'MK1 boot');
|
|
31
45
|
await this.kernel.start(() => {
|
|
32
46
|
this.render();
|
|
33
47
|
// Setup input handling after first render
|
|
@@ -44,100 +58,50 @@ export class MK1App {
|
|
|
44
58
|
logger.info('MK1 App started');
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
47
|
-
* Render
|
|
61
|
+
* Render full layout
|
|
48
62
|
*/
|
|
49
63
|
render() {
|
|
50
64
|
const screen = this.kernel.getScreen();
|
|
51
65
|
if (!screen) {
|
|
52
66
|
return;
|
|
53
67
|
}
|
|
54
|
-
//
|
|
55
|
-
|
|
68
|
+
// Get safe viewport (single source of truth)
|
|
69
|
+
this.safeViewport = getSafeViewport(screen.width, screen.height);
|
|
70
|
+
// Create/update debug gutter
|
|
71
|
+
if (this.debugGutter) {
|
|
56
72
|
try {
|
|
57
|
-
this.
|
|
73
|
+
this.debugGutter.destroy();
|
|
58
74
|
}
|
|
59
75
|
catch {
|
|
60
76
|
// Ignore
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
top: 0,
|
|
67
|
-
left: 0,
|
|
68
|
-
width: '100%',
|
|
69
|
-
height: '100%',
|
|
70
|
-
border: {
|
|
71
|
-
type: 'line',
|
|
72
|
-
},
|
|
73
|
-
style: {
|
|
74
|
-
border: {
|
|
75
|
-
fg: 'cyan',
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
content: '4Runr MK1',
|
|
79
|
-
tags: true,
|
|
80
|
-
}),
|
|
81
|
-
statusLine: blessed.box({
|
|
82
|
-
top: 0,
|
|
83
|
-
left: 0,
|
|
84
|
-
width: '100%',
|
|
85
|
-
height: 1,
|
|
86
|
-
content: '',
|
|
87
|
-
style: {
|
|
88
|
-
fg: 'yellow',
|
|
89
|
-
},
|
|
90
|
-
tags: true,
|
|
91
|
-
}),
|
|
92
|
-
commandInput: blessed.box({
|
|
93
|
-
bottom: 0,
|
|
94
|
-
left: 0,
|
|
95
|
-
width: '100%',
|
|
96
|
-
height: 1,
|
|
97
|
-
content: '4runr> ',
|
|
98
|
-
style: {
|
|
99
|
-
fg: 'green',
|
|
100
|
-
},
|
|
101
|
-
tags: true,
|
|
102
|
-
}),
|
|
103
|
-
};
|
|
104
|
-
// Append to screen
|
|
105
|
-
screen.append(this.widgets.rootBox);
|
|
106
|
-
screen.append(this.widgets.statusLine);
|
|
107
|
-
screen.append(this.widgets.commandInput);
|
|
108
|
-
// Update status line
|
|
109
|
-
this.updateStatusLine();
|
|
110
|
-
// Set command input content
|
|
111
|
-
const prompt = '4runr> ';
|
|
112
|
-
const displayText = prompt + this.commandValue;
|
|
113
|
-
this.widgets.commandInput.setContent(displayText);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Update status line
|
|
117
|
-
*/
|
|
118
|
-
updateStatusLine() {
|
|
119
|
-
if (!this.widgets) {
|
|
120
|
-
return;
|
|
79
|
+
this.debugGutter = createDebugGutter(screen, this.safeViewport);
|
|
80
|
+
if (this.debugGutter) {
|
|
81
|
+
screen.append(this.debugGutter);
|
|
121
82
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
//
|
|
129
|
-
this.
|
|
83
|
+
// Compute layout using safe viewport
|
|
84
|
+
this.layout = computeLayout(this.safeViewport.safeCols, this.safeViewport.safeRows);
|
|
85
|
+
this.layout = validateLayout(this.layout);
|
|
86
|
+
// Emit layout info
|
|
87
|
+
eventBus.emit('SYS', `Layout: ${this.layout.mode}`);
|
|
88
|
+
eventBus.emit('SYS', `cols=${this.layout.cols} rows=${this.layout.rows}`);
|
|
89
|
+
// Build widgets from layout
|
|
90
|
+
this.widgetManager.build(screen, this.layout);
|
|
91
|
+
// Render
|
|
92
|
+
screen.render();
|
|
130
93
|
}
|
|
131
94
|
/**
|
|
132
95
|
* Handle resize
|
|
133
96
|
*/
|
|
134
97
|
async handleResize(cols, rows) {
|
|
135
98
|
this.lastRebuildReason = `resize:${cols}x${rows}`;
|
|
136
|
-
// Preserve command input value
|
|
99
|
+
// Preserve command input value
|
|
100
|
+
const commandValue = this.widgetManager.getCommandValue();
|
|
137
101
|
// Rebuild (destroy + recreate)
|
|
138
102
|
this.render();
|
|
139
|
-
//
|
|
140
|
-
this.
|
|
103
|
+
// Restore command value
|
|
104
|
+
this.widgetManager.setCommandValue(commandValue);
|
|
141
105
|
// Re-render
|
|
142
106
|
const screen = this.kernel.getScreen();
|
|
143
107
|
if (screen) {
|
|
@@ -149,7 +113,7 @@ export class MK1App {
|
|
|
149
113
|
*/
|
|
150
114
|
setupInputHandling() {
|
|
151
115
|
const screen = this.kernel.getScreen();
|
|
152
|
-
if (!screen
|
|
116
|
+
if (!screen) {
|
|
153
117
|
return;
|
|
154
118
|
}
|
|
155
119
|
// Prevent duplicate handlers
|
|
@@ -161,31 +125,31 @@ export class MK1App {
|
|
|
161
125
|
screen.on('keypress', async (ch, key) => {
|
|
162
126
|
// Handle Enter key (submit)
|
|
163
127
|
if (key.name === 'enter' || key.name === 'return') {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
this.
|
|
168
|
-
|
|
128
|
+
const commandValue = this.widgetManager.getCommandValue();
|
|
129
|
+
if (commandValue.trim()) {
|
|
130
|
+
const command = commandValue.trim();
|
|
131
|
+
this.widgetManager.setCommandValue('');
|
|
132
|
+
this.render();
|
|
169
133
|
// Handle command
|
|
170
134
|
await this.handleCommand(command);
|
|
171
|
-
//
|
|
172
|
-
this.
|
|
173
|
-
|
|
135
|
+
// Update operations feed and re-render
|
|
136
|
+
this.widgetManager.updateOperationsFeed();
|
|
137
|
+
this.render();
|
|
174
138
|
}
|
|
175
139
|
return;
|
|
176
140
|
}
|
|
177
141
|
// Handle Backspace
|
|
178
142
|
if (key.name === 'backspace' || key.name === 'delete') {
|
|
179
|
-
|
|
180
|
-
this.
|
|
181
|
-
|
|
143
|
+
const current = this.widgetManager.getCommandValue();
|
|
144
|
+
this.widgetManager.setCommandValue(current.slice(0, -1));
|
|
145
|
+
this.render();
|
|
182
146
|
return;
|
|
183
147
|
}
|
|
184
148
|
// Handle printable characters (ASCII only)
|
|
185
149
|
if (ch && typeof ch === 'string' && /[\x20-\x7E]/.test(ch)) {
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
188
|
-
|
|
150
|
+
const current = this.widgetManager.getCommandValue();
|
|
151
|
+
this.widgetManager.setCommandValue(current + ch);
|
|
152
|
+
this.render();
|
|
189
153
|
}
|
|
190
154
|
});
|
|
191
155
|
// Handle Ctrl+C
|
|
@@ -194,18 +158,6 @@ export class MK1App {
|
|
|
194
158
|
process.exit(0);
|
|
195
159
|
});
|
|
196
160
|
}
|
|
197
|
-
/**
|
|
198
|
-
* Update command input display
|
|
199
|
-
*/
|
|
200
|
-
updateCommandDisplay() {
|
|
201
|
-
if (!this.widgets) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
const prompt = '4runr> ';
|
|
205
|
-
const displayText = prompt + this.commandValue;
|
|
206
|
-
// Update content property directly
|
|
207
|
-
this.widgets.commandInput.content = displayText;
|
|
208
|
-
}
|
|
209
161
|
/**
|
|
210
162
|
* Handle command
|
|
211
163
|
*/
|
|
@@ -231,44 +183,124 @@ export class MK1App {
|
|
|
231
183
|
this.lastRebuildReason = 'panic';
|
|
232
184
|
await this.kernel.panic();
|
|
233
185
|
}
|
|
234
|
-
else if (command === '
|
|
235
|
-
//
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (screen) {
|
|
240
|
-
screen.render();
|
|
241
|
-
// Reset status line after 3 seconds
|
|
242
|
-
setTimeout(() => {
|
|
243
|
-
this.updateStatusLine();
|
|
244
|
-
screen.render();
|
|
245
|
-
}, 3000);
|
|
246
|
-
}
|
|
186
|
+
else if (command === 'dbg:layout') {
|
|
187
|
+
// Toggle layout debug
|
|
188
|
+
this.debugLayout = !this.debugLayout;
|
|
189
|
+
if (this.debugLayout && this.layout) {
|
|
190
|
+
this.emitLayoutDebug();
|
|
247
191
|
}
|
|
192
|
+
eventBus.emit('SYS', `Layout debug: ${this.debugLayout ? 'ON' : 'OFF'}`);
|
|
193
|
+
}
|
|
194
|
+
else if (command === 'dbg:widgets') {
|
|
195
|
+
// Show all widgets and their dimensions
|
|
196
|
+
this.emitWidgetsDebug();
|
|
197
|
+
}
|
|
198
|
+
else if (command === 'help') {
|
|
199
|
+
// Show help in operations feed
|
|
200
|
+
eventBus.emit('HELP', 'Commands: dbg:size, dbg:panic, dbg:layout, dbg:widgets, help, exit');
|
|
248
201
|
}
|
|
249
202
|
else if (command === 'exit') {
|
|
250
203
|
this.stop();
|
|
251
204
|
process.exit(0);
|
|
252
205
|
}
|
|
253
206
|
else {
|
|
254
|
-
// Unknown command - show in
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
207
|
+
// Unknown command - show in operations feed
|
|
208
|
+
eventBus.emit('ERROR', `Unknown command: ${command} (type 'help')`);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Emit layout debug info
|
|
213
|
+
*/
|
|
214
|
+
emitLayoutDebug() {
|
|
215
|
+
if (!this.layout || !this.safeViewport) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const { screenCols, screenRows, safeCols, safeRows, rightMargin, bottomMargin } = this.safeViewport;
|
|
219
|
+
eventBus.emit('DEBUG', `Layout: ${this.layout.mode}`);
|
|
220
|
+
eventBus.emit('DEBUG', `screen: ${screenCols}x${screenRows}`);
|
|
221
|
+
eventBus.emit('DEBUG', `safe: ${safeCols}x${safeRows}`);
|
|
222
|
+
eventBus.emit('DEBUG', `margins: right=${rightMargin} bottom=${bottomMargin}`);
|
|
223
|
+
// Emit rect summary with right edge
|
|
224
|
+
for (const [name, rect] of Object.entries(this.layout.rects)) {
|
|
225
|
+
const rightEdge = rect.left + rect.width;
|
|
226
|
+
eventBus.emit('DEBUG', `${name}: ${rect.left},${rect.top} ${rect.width}x${rect.height} rightEdge=${rightEdge}`);
|
|
227
|
+
}
|
|
228
|
+
// Check for overflow
|
|
229
|
+
const hasOverflow = this.checkOverflow();
|
|
230
|
+
if (hasOverflow) {
|
|
231
|
+
eventBus.emit('WARN', 'Layout overflow detected!');
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
eventBus.emit('DEBUG', 'Layout: OK (no overflow)');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Emit widgets debug info
|
|
239
|
+
*/
|
|
240
|
+
emitWidgetsDebug() {
|
|
241
|
+
const screen = this.kernel.getScreen();
|
|
242
|
+
if (!screen) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
eventBus.emit('DEBUG', `Screen: ${screen.width}x${screen.height}`);
|
|
246
|
+
eventBus.emit('DEBUG', `Screen.children: ${screen.children.length}`);
|
|
247
|
+
// Log all screen children
|
|
248
|
+
screen.children.forEach((child, idx) => {
|
|
249
|
+
const left = child.left ?? '?';
|
|
250
|
+
const top = child.top ?? '?';
|
|
251
|
+
const width = child.width ?? '?';
|
|
252
|
+
const height = child.height ?? '?';
|
|
253
|
+
const type = child.type ?? 'unknown';
|
|
254
|
+
eventBus.emit('DEBUG', `Widget[${idx}]: ${type} @ ${left},${top} ${width}x${height}`);
|
|
255
|
+
});
|
|
256
|
+
// Log layout rects
|
|
257
|
+
if (this.layout) {
|
|
258
|
+
eventBus.emit('DEBUG', `Layout rects (${Object.keys(this.layout.rects).length}):`);
|
|
259
|
+
for (const [name, rect] of Object.entries(this.layout.rects)) {
|
|
260
|
+
eventBus.emit('DEBUG', ` ${name}: ${rect.left},${rect.top} ${rect.width}x${rect.height}`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Check for overflow
|
|
266
|
+
*/
|
|
267
|
+
checkOverflow() {
|
|
268
|
+
if (!this.layout || !this.safeViewport) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
const { safeCols, safeRows } = this.safeViewport;
|
|
272
|
+
for (const [name, rect] of Object.entries(this.layout.rects)) {
|
|
273
|
+
// Skip watermark
|
|
274
|
+
if (name === 'WATERMARK') {
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
// Check minimums
|
|
278
|
+
if (rect.width < 10 || rect.height < 3) {
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
// Check boundaries against safe viewport
|
|
282
|
+
const rightEdge = rect.left + rect.width;
|
|
283
|
+
const bottomEdge = rect.top + rect.height;
|
|
284
|
+
if (rightEdge > safeCols || bottomEdge > safeRows) {
|
|
285
|
+
return true;
|
|
265
286
|
}
|
|
266
287
|
}
|
|
288
|
+
return false;
|
|
267
289
|
}
|
|
268
290
|
/**
|
|
269
291
|
* Stop app
|
|
270
292
|
*/
|
|
271
293
|
stop() {
|
|
294
|
+
if (this.debugGutter) {
|
|
295
|
+
try {
|
|
296
|
+
this.debugGutter.destroy();
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
// Ignore
|
|
300
|
+
}
|
|
301
|
+
this.debugGutter = null;
|
|
302
|
+
}
|
|
303
|
+
this.widgetManager.destroyAll();
|
|
272
304
|
this.kernel.stop();
|
|
273
305
|
logger.info('MK1 App stopped');
|
|
274
306
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mk1App.js","sourceRoot":"","sources":["../../src/tui_mk1/mk1App.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"mk1App.js","sourceRoot":"","sources":["../../src/tui_mk1/mk1App.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAe,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAqB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,OAAO,MAAM;IACT,MAAM,CAAY;IAClB,aAAa,CAAgB;IAC7B,MAAM,GAAkB,IAAI,CAAC;IAC7B,iBAAiB,GAAW,SAAS,CAAC;IACtC,qBAAqB,GAAY,KAAK,CAAC;IACvC,WAAW,GAAY,KAAK,CAAC;IAC7B,YAAY,GAAwB,IAAI,CAAC;IACzC,WAAW,GAAQ,IAAI,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,CAAC,OAAO,EAAE,CAAC;YAC7B,CAAC;YAAC,MAAM,CAAC;gBACP,SAAS;YACX,CAAC;YACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IACjC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;IACzB,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Widgets } from 'neo-blessed';
|
|
2
|
+
import type { SafeViewport } from '../viewport/safeViewport.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create debug gutter stripe(s)
|
|
5
|
+
*/
|
|
6
|
+
export declare function createDebugGutter(screen: Widgets.Screen, viewport: SafeViewport): Widgets.Box | null;
|
|
7
|
+
//# sourceMappingURL=debugGutter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debugGutter.d.ts","sourceRoot":"","sources":["../../../src/tui_mk1/ui/debugGutter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,GAAG,GAAG,IAAI,CAuDpB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MK1 Debug Gutter
|
|
3
|
+
*
|
|
4
|
+
* Visual indicator to show safe viewport boundary
|
|
5
|
+
*/
|
|
6
|
+
import blessed from 'neo-blessed';
|
|
7
|
+
/**
|
|
8
|
+
* Create debug gutter stripe(s)
|
|
9
|
+
*/
|
|
10
|
+
export function createDebugGutter(screen, viewport) {
|
|
11
|
+
const debugGutter = process.env.TUI_DEBUG_GUTTER === '1';
|
|
12
|
+
if (!debugGutter) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const { safeCols, safeRows, screenCols } = viewport;
|
|
16
|
+
// Show gutter at safe edge
|
|
17
|
+
const gutter = blessed.box({
|
|
18
|
+
left: safeCols - 1,
|
|
19
|
+
top: 0,
|
|
20
|
+
width: 1,
|
|
21
|
+
height: safeRows,
|
|
22
|
+
content: '│'.repeat(safeRows),
|
|
23
|
+
style: {
|
|
24
|
+
fg: 'yellow',
|
|
25
|
+
bg: 'red',
|
|
26
|
+
},
|
|
27
|
+
tags: true,
|
|
28
|
+
scrollable: false,
|
|
29
|
+
alwaysScroll: false,
|
|
30
|
+
wrap: false,
|
|
31
|
+
mouse: false,
|
|
32
|
+
keys: false,
|
|
33
|
+
vi: false,
|
|
34
|
+
});
|
|
35
|
+
// If safe edge differs from screen edge, show both
|
|
36
|
+
if (safeCols < screenCols) {
|
|
37
|
+
// Also show at real screen edge
|
|
38
|
+
const realGutter = blessed.box({
|
|
39
|
+
left: screenCols - 1,
|
|
40
|
+
top: 0,
|
|
41
|
+
width: 1,
|
|
42
|
+
height: safeRows,
|
|
43
|
+
content: '│'.repeat(safeRows),
|
|
44
|
+
style: {
|
|
45
|
+
fg: 'red',
|
|
46
|
+
bg: 'yellow',
|
|
47
|
+
},
|
|
48
|
+
tags: true,
|
|
49
|
+
scrollable: false,
|
|
50
|
+
alwaysScroll: false,
|
|
51
|
+
wrap: false,
|
|
52
|
+
mouse: false,
|
|
53
|
+
keys: false,
|
|
54
|
+
vi: false,
|
|
55
|
+
});
|
|
56
|
+
screen.append(realGutter);
|
|
57
|
+
}
|
|
58
|
+
return gutter;
|
|
59
|
+
}
|
|
60
|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AM,CAAC,QAAQ,CAAC;YAC7B,KAAK,EAAE;gBACL,EAAE,EAAE,KAAK;gBACT,EAAE,EAAE,QAAQ;aACb;YACD,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,KAAK;YACX,EAAE,EAAE,KAAK;SACH,CAAgB,CAAC;QAEzB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Widgets } from 'neo-blessed';
|
|
2
|
+
import type { Rect } from '../../layout/layoutEngine.js';
|
|
3
|
+
export interface SectionOptions {
|
|
4
|
+
key: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
padX?: number;
|
|
7
|
+
padY?: number;
|
|
8
|
+
style?: {
|
|
9
|
+
fg?: string;
|
|
10
|
+
bg?: string;
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Create a borderless section
|
|
16
|
+
*/
|
|
17
|
+
export declare function createSection(screen: Widgets.Screen, rect: Rect, opts: SectionOptions): Widgets.Box;
|
|
18
|
+
//# sourceMappingURL=createSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSection.d.ts","sourceRoot":"","sources":["../../../../src/tui_mk1/ui/panels/createSection.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QACN,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,OAAO,CAAC,MAAM,EACtB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,GAAG,CAgCb"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MK1 Borderless Panel Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates borderless sections - no borders, no labels, just regions
|
|
5
|
+
*/
|
|
6
|
+
import blessed from 'neo-blessed';
|
|
7
|
+
/**
|
|
8
|
+
* Create a borderless section
|
|
9
|
+
*/
|
|
10
|
+
export function createSection(screen, rect, opts) {
|
|
11
|
+
const padX = opts.padX ?? 1;
|
|
12
|
+
const padY = opts.padY ?? 0;
|
|
13
|
+
const fg = opts.style?.fg ?? 'white';
|
|
14
|
+
const bg = opts.style?.bg;
|
|
15
|
+
const bold = opts.style?.bold ?? false;
|
|
16
|
+
return blessed.box({
|
|
17
|
+
left: rect.left,
|
|
18
|
+
top: rect.top,
|
|
19
|
+
width: rect.width,
|
|
20
|
+
height: rect.height,
|
|
21
|
+
border: {
|
|
22
|
+
type: 'line',
|
|
23
|
+
},
|
|
24
|
+
label: opts.title ? ` ${opts.title} ` : undefined,
|
|
25
|
+
content: '',
|
|
26
|
+
style: {
|
|
27
|
+
fg,
|
|
28
|
+
bg,
|
|
29
|
+
bold,
|
|
30
|
+
border: {
|
|
31
|
+
fg: 'cyan',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
tags: true,
|
|
35
|
+
scrollable: false,
|
|
36
|
+
wrap: true,
|
|
37
|
+
mouse: false,
|
|
38
|
+
keys: false,
|
|
39
|
+
vi: false,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=createSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSection.js","sourceRoot":"","sources":["../../../../src/tui_mk1/ui/panels/createSection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,OAAO,MAAM,aAAa,CAAC;AAgBlC;;GAEG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAsB,EACtB,IAAU,EACV,IAAoB;IAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IAC5B,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,OAAO,CAAC;IACrC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC;IAC1B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,IAAI,KAAK,CAAC;IAEvC,OAAO,OAAO,CAAC,GAAG,CAAC;QACjB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;SACb;QACD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS;QACjD,OAAO,EAAE,EAAE;QACX,KAAK,EAAE;YACL,EAAE;YACF,EAAE;YACF,IAAI;YACJ,MAAM,EAAE;gBACN,EAAE,EAAE,MAAM;aACX;SACF;QACD,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,KAAK;KACH,CAAgB,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Widgets } from 'neo-blessed';
|
|
2
|
+
import type { Rect } from '../layout/layoutEngine.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create panel with consistent 4Runr style
|
|
5
|
+
*/
|
|
6
|
+
export declare function createPanel(name: string, rect: Rect, content?: string): Widgets.Box;
|
|
7
|
+
/**
|
|
8
|
+
* Create operations panel - just section title, no borders
|
|
9
|
+
*/
|
|
10
|
+
export declare function createOperationsPanel(rect: Rect, content: string): Widgets.Box;
|
|
11
|
+
/**
|
|
12
|
+
* Create status panel
|
|
13
|
+
*/
|
|
14
|
+
export declare function createStatusPanel(rect: Rect, content: string): Widgets.Box;
|
|
15
|
+
/**
|
|
16
|
+
* Create command line panel
|
|
17
|
+
*/
|
|
18
|
+
export declare function createCommandLinePanel(rect: Rect, prompt: string): Widgets.Box;
|
|
19
|
+
/**
|
|
20
|
+
* Create watermark panel
|
|
21
|
+
*/
|
|
22
|
+
export declare function createWatermarkPanel(rect: Rect): Widgets.Box;
|
|
23
|
+
//# sourceMappingURL=panels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panels.d.ts","sourceRoot":"","sources":["../../../src/tui_mk1/ui/panels.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,GAAG,CAuBb;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CA2Bb;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAY1E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAY9E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,GAAG,CAY5D"}
|