@jrichman/ink 6.5.1-beta.7 → 6.6.0
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/build/colorize.d.ts +0 -1
- package/build/colorize.js +3 -16
- package/build/colorize.js.map +1 -1
- package/build/debug-log.js +2 -3
- package/build/debug-log.js.map +1 -1
- package/build/ink.js +0 -3
- package/build/ink.js.map +1 -1
- package/build/measure-text.js +0 -2
- package/build/measure-text.js.map +1 -1
- package/build/render-node-to-output.js +0 -2
- package/build/render-node-to-output.js.map +1 -1
- package/build/render-scrollbar.js +22 -14
- package/build/render-scrollbar.js.map +1 -1
- package/build/text-wrap.js +0 -2
- package/build/text-wrap.js.map +1 -1
- package/package.json +1 -1
- package/build/render-worker.d.ts +0 -25
- package/build/render-worker.js +0 -370
- package/build/render-worker.js.map +0 -1
- package/build/styled-lines.d.ts +0 -29
- package/build/styled-lines.js +0 -110
- package/build/styled-lines.js.map +0 -1
- package/build/terminal-writer.d.ts +0 -69
- package/build/terminal-writer.js +0 -546
- package/build/terminal-writer.js.map +0 -1
- package/build/web/ansi-to-css.d.ts +0 -16
- package/build/web/ansi-to-css.js +0 -147
- package/build/web/ansi-to-css.js.map +0 -1
- package/build/web/client.d.ts +0 -51
- package/build/web/client.js +0 -315
- package/build/web/client.js.map +0 -1
- package/build/web/server.d.ts +0 -1
- package/build/web/server.js +0 -179
- package/build/web/server.js.map +0 -1
- package/build/worker/dump-replay.d.ts +0 -1
- package/build/worker/dump-replay.js +0 -15
- package/build/worker/dump-replay.js.map +0 -1
- package/build/worker/replay.d.ts +0 -55
- package/build/worker/replay.js +0 -133
- package/build/worker/replay.js.map +0 -1
- package/build/wrap-text.d.ts +0 -6
- package/build/wrap-text.js +0 -120
- package/build/wrap-text.js.map +0 -1
package/build/render-worker.js
DELETED
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import process from 'node:process';
|
|
2
|
-
import { Buffer } from 'node:buffer';
|
|
3
|
-
import ansiEscapes from 'ansi-escapes';
|
|
4
|
-
import { Deserializer } from './serialization.js';
|
|
5
|
-
import { debugLog } from './debug-log.js';
|
|
6
|
-
import { TerminalWriter, rainbowColors, } from './terminal-writer.js';
|
|
7
|
-
import { calculateScrollbarThumb } from './measure-element.js';
|
|
8
|
-
const clearOnDirtyRender = false;
|
|
9
|
-
export class TerminalBufferWorker {
|
|
10
|
-
columns;
|
|
11
|
-
rows;
|
|
12
|
-
// Local state of regions
|
|
13
|
-
regions = new Map();
|
|
14
|
-
root;
|
|
15
|
-
// Tracking for scroll optimization
|
|
16
|
-
lastRootScrollTop = 0;
|
|
17
|
-
backbufferDirty = false;
|
|
18
|
-
backbufferDirtyCurrentFrame = false;
|
|
19
|
-
fullRenderTimeout;
|
|
20
|
-
frameIndex = 0;
|
|
21
|
-
debugRainbowEnabled = false;
|
|
22
|
-
// Ground truth on what lines should be rendered (composed frame)
|
|
23
|
-
lines = [];
|
|
24
|
-
terminalWriter;
|
|
25
|
-
constructor(columns, rows, options) {
|
|
26
|
-
this.columns = columns;
|
|
27
|
-
this.rows = rows;
|
|
28
|
-
const stdout = options?.stdout ?? process.stdout;
|
|
29
|
-
this.terminalWriter = new TerminalWriter(columns, rows, stdout);
|
|
30
|
-
stdout.write(ansiEscapes.cursorHide);
|
|
31
|
-
if (options?.debugRainbowEnabled) {
|
|
32
|
-
this.debugRainbowEnabled = true;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
update(tree, updates) {
|
|
36
|
-
this.root = tree;
|
|
37
|
-
for (const update of updates) {
|
|
38
|
-
let region = this.regions.get(update.id);
|
|
39
|
-
if (!region) {
|
|
40
|
-
// Initialize new region
|
|
41
|
-
region = {
|
|
42
|
-
id: update.id,
|
|
43
|
-
x: 0, y: 0, width: 0, height: 0,
|
|
44
|
-
lines: [],
|
|
45
|
-
isScrollable: false,
|
|
46
|
-
stickyHeaders: [],
|
|
47
|
-
children: []
|
|
48
|
-
};
|
|
49
|
-
this.regions.set(update.id, region);
|
|
50
|
-
}
|
|
51
|
-
// Apply properties
|
|
52
|
-
if (update.x !== undefined)
|
|
53
|
-
region.x = update.x;
|
|
54
|
-
if (update.y !== undefined)
|
|
55
|
-
region.y = update.y;
|
|
56
|
-
if (update.width !== undefined)
|
|
57
|
-
region.width = update.width;
|
|
58
|
-
if (update.height !== undefined)
|
|
59
|
-
region.height = update.height;
|
|
60
|
-
if (update.scrollTop !== undefined)
|
|
61
|
-
region.scrollTop = update.scrollTop;
|
|
62
|
-
if (update.scrollLeft !== undefined)
|
|
63
|
-
region.scrollLeft = update.scrollLeft;
|
|
64
|
-
if (update.scrollHeight !== undefined)
|
|
65
|
-
region.scrollHeight = update.scrollHeight;
|
|
66
|
-
if (update.scrollWidth !== undefined)
|
|
67
|
-
region.scrollWidth = update.scrollWidth;
|
|
68
|
-
if (update.isScrollable !== undefined)
|
|
69
|
-
region.isScrollable = update.isScrollable;
|
|
70
|
-
if (update.stickyHeaders !== undefined)
|
|
71
|
-
region.stickyHeaders = update.stickyHeaders;
|
|
72
|
-
// Apply line updates
|
|
73
|
-
if (update.lines) {
|
|
74
|
-
while (region.lines.length < update.lines.totalLength) {
|
|
75
|
-
region.lines.push([]);
|
|
76
|
-
}
|
|
77
|
-
if (region.lines.length > update.lines.totalLength) {
|
|
78
|
-
region.lines.length = update.lines.totalLength;
|
|
79
|
-
}
|
|
80
|
-
for (const chunk of update.lines.updates) {
|
|
81
|
-
const deserializer = new Deserializer(Buffer.from(chunk.data));
|
|
82
|
-
const chunkLines = deserializer.deserialize();
|
|
83
|
-
for (let i = 0; i < chunkLines.length; i++) {
|
|
84
|
-
region.lines[chunk.start + i] = chunkLines[i];
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
this.backbufferDirtyCurrentFrame = true;
|
|
90
|
-
}
|
|
91
|
-
resize(columns, rows) {
|
|
92
|
-
if (this.columns === columns && this.rows === rows) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
this.columns = columns;
|
|
96
|
-
this.rows = rows;
|
|
97
|
-
debugLog(`XXXXX [RENDER-WORKER] Resize to ${columns}x${rows}\n`);
|
|
98
|
-
this.terminalWriter.resize(columns, rows);
|
|
99
|
-
this.backbufferDirtyCurrentFrame = true;
|
|
100
|
-
void this.render();
|
|
101
|
-
}
|
|
102
|
-
fullRender() {
|
|
103
|
-
debugLog(`XXXXX [RENDER-WORKER] Full render triggered\n`);
|
|
104
|
-
if (this.fullRenderTimeout) {
|
|
105
|
-
clearTimeout(this.fullRenderTimeout);
|
|
106
|
-
}
|
|
107
|
-
if (!this.backbufferDirty) {
|
|
108
|
-
void this.render();
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.backbufferDirty = false;
|
|
112
|
-
this.backbufferDirtyCurrentFrame = false;
|
|
113
|
-
this.terminalWriter.clear();
|
|
114
|
-
this.terminalWriter.writeLines(this.lines);
|
|
115
|
-
this.terminalWriter.validateLinesConsistent(this.lines);
|
|
116
|
-
}
|
|
117
|
-
async render() {
|
|
118
|
-
debugLog(`XXXXX [RENDER-WORKER] Render\n`);
|
|
119
|
-
if (!this.backbufferDirtyCurrentFrame || !this.root) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
// 1. Detect Scroll (Optimization)
|
|
123
|
-
const rootRegion = this.regions.get(this.root.id);
|
|
124
|
-
if (rootRegion && rootRegion.isScrollable) {
|
|
125
|
-
const scrollTop = rootRegion.scrollTop ?? 0;
|
|
126
|
-
const diff = scrollTop - this.lastRootScrollTop;
|
|
127
|
-
if (diff !== 0) {
|
|
128
|
-
const linesToScroll = Math.abs(diff);
|
|
129
|
-
const direction = diff > 0 ? 'up' : 'down';
|
|
130
|
-
const visibleHeight = Math.min(rootRegion.height, this.rows);
|
|
131
|
-
const linesForScroll = [];
|
|
132
|
-
if (direction === 'up') {
|
|
133
|
-
const startRowIndex = scrollTop + visibleHeight - linesToScroll;
|
|
134
|
-
for (let i = 0; i < linesToScroll; i++) {
|
|
135
|
-
const lineIdx = startRowIndex + i;
|
|
136
|
-
const chars = rootRegion.lines[lineIdx] ?? [];
|
|
137
|
-
linesForScroll.push(this.terminalWriter.clampLine(chars, this.columns));
|
|
138
|
-
}
|
|
139
|
-
this.terminalWriter.scrollLines({
|
|
140
|
-
start: 0,
|
|
141
|
-
end: visibleHeight,
|
|
142
|
-
linesToScroll,
|
|
143
|
-
lines: linesForScroll,
|
|
144
|
-
direction,
|
|
145
|
-
scrollToBackbuffer: true
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
for (let i = 0; i < linesToScroll; i++) {
|
|
150
|
-
const lineIdx = scrollTop + i;
|
|
151
|
-
const chars = rootRegion.lines[lineIdx] ?? [];
|
|
152
|
-
linesForScroll.push(this.terminalWriter.clampLine(chars, this.columns));
|
|
153
|
-
}
|
|
154
|
-
this.terminalWriter.scrollLines({
|
|
155
|
-
start: 0,
|
|
156
|
-
end: visibleHeight,
|
|
157
|
-
linesToScroll,
|
|
158
|
-
lines: linesForScroll,
|
|
159
|
-
direction,
|
|
160
|
-
scrollToBackbuffer: false
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
this.lastRootScrollTop = scrollTop;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
else if (rootRegion) {
|
|
167
|
-
this.lastRootScrollTop = rootRegion.scrollTop ?? 0;
|
|
168
|
-
}
|
|
169
|
-
// 2. Compose Frame
|
|
170
|
-
this.lines = [];
|
|
171
|
-
for (let i = 0; i < this.rows; i++) {
|
|
172
|
-
this.lines.push({
|
|
173
|
-
styledChars: [],
|
|
174
|
-
text: '',
|
|
175
|
-
length: 0,
|
|
176
|
-
tainted: false
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
this.composeNode(this.root, null);
|
|
180
|
-
if (this.debugRainbowEnabled) {
|
|
181
|
-
this.frameIndex++;
|
|
182
|
-
}
|
|
183
|
-
const debugRainbowColor = this.debugRainbowEnabled
|
|
184
|
-
? rainbowColors[this.frameIndex % rainbowColors.length]
|
|
185
|
-
: undefined;
|
|
186
|
-
this.terminalWriter.debugRainbowColor = debugRainbowColor;
|
|
187
|
-
if (this.backbufferDirtyCurrentFrame && clearOnDirtyRender) {
|
|
188
|
-
this.terminalWriter.clear();
|
|
189
|
-
}
|
|
190
|
-
if (this.terminalWriter.isFirstRender) {
|
|
191
|
-
this.terminalWriter.writeLines(this.lines);
|
|
192
|
-
this.terminalWriter.flush();
|
|
193
|
-
this.backbufferDirtyCurrentFrame = false;
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
// 3. Sync
|
|
197
|
-
for (let row = 0; row < this.rows; row++) {
|
|
198
|
-
this.terminalWriter.syncLine(this.lines[row], row);
|
|
199
|
-
}
|
|
200
|
-
await this.terminalWriter.slowFlush();
|
|
201
|
-
if (this.backbufferDirtyCurrentFrame) {
|
|
202
|
-
this.backbufferDirty = true;
|
|
203
|
-
if (this.fullRenderTimeout) {
|
|
204
|
-
clearTimeout(this.fullRenderTimeout);
|
|
205
|
-
}
|
|
206
|
-
this.fullRenderTimeout = setTimeout(() => {
|
|
207
|
-
this.fullRender();
|
|
208
|
-
}, 1000);
|
|
209
|
-
}
|
|
210
|
-
this.backbufferDirtyCurrentFrame = false;
|
|
211
|
-
}
|
|
212
|
-
composeNode(node, clip) {
|
|
213
|
-
const region = this.regions.get(node.id);
|
|
214
|
-
if (!region)
|
|
215
|
-
return;
|
|
216
|
-
const absX = region.x;
|
|
217
|
-
const absY = region.y;
|
|
218
|
-
let myClip = {
|
|
219
|
-
x: absX,
|
|
220
|
-
y: absY,
|
|
221
|
-
w: region.width,
|
|
222
|
-
h: region.height
|
|
223
|
-
};
|
|
224
|
-
if (clip) {
|
|
225
|
-
const x1 = Math.max(myClip.x, clip.x);
|
|
226
|
-
const y1 = Math.max(myClip.y, clip.y);
|
|
227
|
-
const x2 = Math.min(myClip.x + myClip.w, clip.x + clip.w);
|
|
228
|
-
const y2 = Math.min(myClip.y + myClip.h, clip.y + clip.h);
|
|
229
|
-
if (x2 <= x1 || y2 <= y1) {
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
myClip = { x: x1, y: y1, w: x2 - x1, h: y2 - y1 };
|
|
233
|
-
}
|
|
234
|
-
const scrollTop = region.scrollTop ?? 0;
|
|
235
|
-
const scrollLeft = region.scrollLeft ?? 0;
|
|
236
|
-
for (let sy = myClip.y; sy < myClip.y + myClip.h; sy++) {
|
|
237
|
-
if (sy < 0 || sy >= this.rows)
|
|
238
|
-
continue;
|
|
239
|
-
const dy = sy - absY;
|
|
240
|
-
const contentY = scrollTop + dy;
|
|
241
|
-
const line = region.lines[contentY];
|
|
242
|
-
if (!line)
|
|
243
|
-
continue;
|
|
244
|
-
const targetLine = this.lines[sy];
|
|
245
|
-
if (!targetLine)
|
|
246
|
-
continue;
|
|
247
|
-
const startSx = myClip.x;
|
|
248
|
-
const endSx = myClip.x + myClip.w;
|
|
249
|
-
while (targetLine.styledChars.length < this.columns) {
|
|
250
|
-
targetLine.styledChars.push({ type: 'char', value: ' ', fullWidth: false, styles: [] });
|
|
251
|
-
}
|
|
252
|
-
for (let sx = startSx; sx < endSx; sx++) {
|
|
253
|
-
if (sx < 0 || sx >= this.columns)
|
|
254
|
-
continue;
|
|
255
|
-
const dx = sx - absX;
|
|
256
|
-
const contentX = scrollLeft + dx;
|
|
257
|
-
const char = line[contentX];
|
|
258
|
-
if (char) {
|
|
259
|
-
targetLine.styledChars[sx] = char;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
for (const child of node.children) {
|
|
264
|
-
this.composeNode(child, myClip);
|
|
265
|
-
}
|
|
266
|
-
for (const header of region.stickyHeaders) {
|
|
267
|
-
const headerY = header.y;
|
|
268
|
-
const headerH = header.lines.length;
|
|
269
|
-
for (let i = 0; i < headerH; i++) {
|
|
270
|
-
const sy = headerY + i;
|
|
271
|
-
if (sy < myClip.y || sy >= myClip.y + myClip.h)
|
|
272
|
-
continue;
|
|
273
|
-
if (sy < 0 || sy >= this.rows)
|
|
274
|
-
continue;
|
|
275
|
-
const line = header.lines[i];
|
|
276
|
-
if (!line)
|
|
277
|
-
continue;
|
|
278
|
-
const targetLine = this.lines[sy];
|
|
279
|
-
if (!targetLine)
|
|
280
|
-
continue;
|
|
281
|
-
const headerX = header.x;
|
|
282
|
-
const headerW = line.length;
|
|
283
|
-
const hx1 = Math.max(headerX, myClip.x);
|
|
284
|
-
const hx2 = Math.min(headerX + headerW, myClip.x + myClip.w);
|
|
285
|
-
for (let sx = hx1; sx < hx2; sx++) {
|
|
286
|
-
if (sx < 0 || sx >= this.columns)
|
|
287
|
-
continue;
|
|
288
|
-
const cx = sx - headerX;
|
|
289
|
-
const char = line[cx];
|
|
290
|
-
if (char) {
|
|
291
|
-
targetLine.styledChars[sx] = char;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if (region.isScrollable) {
|
|
297
|
-
const scrollHeight = region.scrollHeight ?? 0;
|
|
298
|
-
if (scrollHeight > region.height) {
|
|
299
|
-
const { startIndex, endIndex } = calculateScrollbarThumb({
|
|
300
|
-
scrollbarDimension: region.height,
|
|
301
|
-
clientDimension: region.height,
|
|
302
|
-
scrollDimension: scrollHeight,
|
|
303
|
-
scrollPosition: scrollTop,
|
|
304
|
-
axis: 'vertical',
|
|
305
|
-
});
|
|
306
|
-
const barX = absX + region.width - 1;
|
|
307
|
-
const char = '█';
|
|
308
|
-
for (let i = startIndex; i < endIndex; i++) {
|
|
309
|
-
const sy = absY + i;
|
|
310
|
-
if (sy >= myClip.y && sy < myClip.y + myClip.h && sy >= 0 && sy < this.rows && barX >= 0 && barX < this.columns) {
|
|
311
|
-
const targetLine = this.lines[sy];
|
|
312
|
-
if (targetLine) {
|
|
313
|
-
while (targetLine.styledChars.length <= barX) {
|
|
314
|
-
targetLine.styledChars.push({ type: 'char', value: ' ', fullWidth: false, styles: [] });
|
|
315
|
-
}
|
|
316
|
-
targetLine.styledChars[barX] = {
|
|
317
|
-
type: 'char', value: char, fullWidth: false, styles: []
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
let buffer;
|
|
327
|
-
const main = () => {
|
|
328
|
-
process.on('message', (message) => {
|
|
329
|
-
switch (message.type) {
|
|
330
|
-
case 'init': {
|
|
331
|
-
const columns = (process.stdout.columns || message.columns);
|
|
332
|
-
const rows = (process.stdout.rows || message.rows);
|
|
333
|
-
buffer = new TerminalBufferWorker(columns, rows, {
|
|
334
|
-
debugRainbowEnabled: message.debugRainbowEnabled,
|
|
335
|
-
});
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
case 'edits': {
|
|
339
|
-
if (buffer) {
|
|
340
|
-
buffer.update(message.tree, message.updates);
|
|
341
|
-
}
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
case 'fullRender': {
|
|
345
|
-
if (buffer) {
|
|
346
|
-
buffer.fullRender();
|
|
347
|
-
}
|
|
348
|
-
break;
|
|
349
|
-
}
|
|
350
|
-
case 'render': {
|
|
351
|
-
if (buffer) {
|
|
352
|
-
void buffer.render();
|
|
353
|
-
}
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
default: {
|
|
357
|
-
break;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
process.stdout.on('resize', () => {
|
|
362
|
-
if (buffer && process.stdout.columns && process.stdout.rows) {
|
|
363
|
-
buffer.resize(process.stdout.columns, process.stdout.rows);
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
if (process.env['INK_WORKER'] === 'true') {
|
|
368
|
-
main();
|
|
369
|
-
}
|
|
370
|
-
//# sourceMappingURL=render-worker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3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AO,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,MAAM,EAAE,CAAC;IAC1C,IAAI,EAAE,CAAC;AACR,CAAC"}
|
package/build/styled-lines.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { AnsiCode, StyledChar } from '@alcalzone/ansi-tokenize';
|
|
2
|
-
/**
|
|
3
|
-
* A highly optimized representation of styled characters for terminal rendering.
|
|
4
|
-
* Replaces arrays of `StyledChar` objects with parallel arrays to eliminate
|
|
5
|
-
* massive GC overhead during large layout and scroll updates.
|
|
6
|
-
*/
|
|
7
|
-
export declare class StyledLines {
|
|
8
|
-
values: string[];
|
|
9
|
-
fullWidths: boolean[];
|
|
10
|
-
styles: AnsiCode[][];
|
|
11
|
-
get length(): number;
|
|
12
|
-
set length(value: number);
|
|
13
|
-
push(value: string, fullWidth: boolean, styles: AnsiCode[]): void;
|
|
14
|
-
pushChar(char: StyledChar): void;
|
|
15
|
-
pushLine(other: StyledLines): void;
|
|
16
|
-
slice(start?: number, end?: number): StyledLines;
|
|
17
|
-
splice(start: number, deleteCount: number, ...items: StyledChar[]): StyledLines;
|
|
18
|
-
[Symbol.iterator](): Generator<{
|
|
19
|
-
type: "char";
|
|
20
|
-
value: string;
|
|
21
|
-
fullWidth: boolean;
|
|
22
|
-
styles: AnsiCode[];
|
|
23
|
-
}, void, unknown>;
|
|
24
|
-
entries(): IterableIterator<[number, StyledChar]>;
|
|
25
|
-
map<U>(callbackfn: (value: StyledChar, index: number, array: StyledChar[]) => U, thisArg?: any): U[];
|
|
26
|
-
indexOf(searchElement: StyledChar, fromIndex?: number): number;
|
|
27
|
-
at(index: number): StyledChar | undefined;
|
|
28
|
-
clone(): StyledLines;
|
|
29
|
-
}
|
package/build/styled-lines.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A highly optimized representation of styled characters for terminal rendering.
|
|
3
|
-
* Replaces arrays of `StyledChar` objects with parallel arrays to eliminate
|
|
4
|
-
* massive GC overhead during large layout and scroll updates.
|
|
5
|
-
*/
|
|
6
|
-
export class StyledLines {
|
|
7
|
-
values = [];
|
|
8
|
-
fullWidths = [];
|
|
9
|
-
styles = [];
|
|
10
|
-
get length() {
|
|
11
|
-
return this.values.length;
|
|
12
|
-
}
|
|
13
|
-
set length(value) {
|
|
14
|
-
this.values.length = value;
|
|
15
|
-
this.fullWidths.length = value;
|
|
16
|
-
this.styles.length = value;
|
|
17
|
-
}
|
|
18
|
-
push(value, fullWidth, styles) {
|
|
19
|
-
this.values.push(value);
|
|
20
|
-
this.fullWidths.push(fullWidth);
|
|
21
|
-
this.styles.push(styles);
|
|
22
|
-
}
|
|
23
|
-
pushChar(char) {
|
|
24
|
-
this.values.push(char.value);
|
|
25
|
-
this.fullWidths.push(char.fullWidth || false);
|
|
26
|
-
this.styles.push(char.styles || []);
|
|
27
|
-
}
|
|
28
|
-
pushLine(other) {
|
|
29
|
-
for (let i = 0; i < other.length; i++) {
|
|
30
|
-
this.values.push(other.values[i]);
|
|
31
|
-
this.fullWidths.push(other.fullWidths[i]);
|
|
32
|
-
this.styles.push(other.styles[i]);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
slice(start, end) {
|
|
36
|
-
const result = new StyledLines();
|
|
37
|
-
result.values = this.values.slice(start, end);
|
|
38
|
-
result.fullWidths = this.fullWidths.slice(start, end);
|
|
39
|
-
result.styles = this.styles.slice(start, end);
|
|
40
|
-
return result;
|
|
41
|
-
}
|
|
42
|
-
splice(start, deleteCount, ...items) {
|
|
43
|
-
const result = new StyledLines();
|
|
44
|
-
result.values = this.values.splice(start, deleteCount, ...items.map(i => i.value));
|
|
45
|
-
result.fullWidths = this.fullWidths.splice(start, deleteCount, ...items.map(i => i.fullWidth || false));
|
|
46
|
-
result.styles = this.styles.splice(start, deleteCount, ...items.map(i => i.styles || []));
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
*[Symbol.iterator]() {
|
|
50
|
-
for (let i = 0; i < this.length; i++) {
|
|
51
|
-
yield {
|
|
52
|
-
type: 'char',
|
|
53
|
-
value: this.values[i],
|
|
54
|
-
fullWidth: this.fullWidths[i],
|
|
55
|
-
styles: this.styles[i],
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
entries() {
|
|
60
|
-
let i = 0;
|
|
61
|
-
return {
|
|
62
|
-
[Symbol.iterator]() {
|
|
63
|
-
return this;
|
|
64
|
-
},
|
|
65
|
-
next: () => {
|
|
66
|
-
if (i >= this.length)
|
|
67
|
-
return { done: true, value: undefined };
|
|
68
|
-
const val = [i, this.at(i)];
|
|
69
|
-
i++;
|
|
70
|
-
return { done: false, value: val };
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
map(callbackfn, thisArg) {
|
|
75
|
-
const result = [];
|
|
76
|
-
for (let i = 0; i < this.length; i++) {
|
|
77
|
-
result.push(callbackfn.call(thisArg, this.at(i), i, this));
|
|
78
|
-
}
|
|
79
|
-
return result;
|
|
80
|
-
}
|
|
81
|
-
indexOf(searchElement, fromIndex = 0) {
|
|
82
|
-
for (let i = fromIndex; i < this.length; i++) {
|
|
83
|
-
if (this.values[i] === searchElement.value &&
|
|
84
|
-
this.fullWidths[i] === searchElement.fullWidth)
|
|
85
|
-
return i;
|
|
86
|
-
}
|
|
87
|
-
return -1;
|
|
88
|
-
}
|
|
89
|
-
at(index) {
|
|
90
|
-
if (index < 0) {
|
|
91
|
-
index = this.length + index;
|
|
92
|
-
}
|
|
93
|
-
if (index < 0 || index >= this.length)
|
|
94
|
-
return undefined;
|
|
95
|
-
return {
|
|
96
|
-
type: 'char',
|
|
97
|
-
value: this.values[index],
|
|
98
|
-
fullWidth: this.fullWidths[index],
|
|
99
|
-
styles: this.styles[index],
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
clone() {
|
|
103
|
-
const result = new StyledLines();
|
|
104
|
-
result.values = [...this.values];
|
|
105
|
-
result.fullWidths = [...this.fullWidths];
|
|
106
|
-
result.styles = [...this.styles];
|
|
107
|
-
return result;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=styled-lines.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styled-lines.js","sourceRoot":"","sources":["../src/styled-lines.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAChB,MAAM,GAAa,EAAE,CAAC;IACtB,UAAU,GAAc,EAAE,CAAC;IAC3B,MAAM,GAAiB,EAAE,CAAC;IAEjC,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC3B,CAAC;IAED,IAAI,MAAM,CAAC,KAAa;QACvB,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,KAAK,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;IAC5B,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,SAAkB,EAAE,MAAkB;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC;IAED,QAAQ,CAAC,IAAgB;QACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,QAAQ,CAAC,KAAkB;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CA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C,UAAU,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC;IACf,CAAC;CACD"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { type StyledChar } from '@alcalzone/ansi-tokenize';
|
|
2
|
-
export declare const rainbowColors: string[];
|
|
3
|
-
export type RenderLine = {
|
|
4
|
-
styledChars: StyledChar[];
|
|
5
|
-
text: string;
|
|
6
|
-
length: number;
|
|
7
|
-
tainted: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function linesEqual(lineA: StyledChar[] | undefined, lineB: StyledChar[] | undefined): boolean;
|
|
10
|
-
export declare class TerminalWriter {
|
|
11
|
-
private columns;
|
|
12
|
-
private rows;
|
|
13
|
-
private readonly stdout;
|
|
14
|
-
isTainted: boolean;
|
|
15
|
-
debugRainbowColor?: string;
|
|
16
|
-
private screen;
|
|
17
|
-
private backbuffer;
|
|
18
|
-
private cursorX;
|
|
19
|
-
private cursorY;
|
|
20
|
-
private scrollRegionTop;
|
|
21
|
-
private scrollRegionBottom;
|
|
22
|
-
private firstRender;
|
|
23
|
-
private readonly enableSynchronizedOutput;
|
|
24
|
-
private cancelSlowFlush;
|
|
25
|
-
private outputBuffer;
|
|
26
|
-
private currentChunkBuffer;
|
|
27
|
-
constructor(columns: number, rows: number, stdout: NodeJS.WriteStream);
|
|
28
|
-
unkownCursorLocation(): void;
|
|
29
|
-
getBackbufferLength(): number;
|
|
30
|
-
getBackbufferEntry(index: number): RenderLine | undefined;
|
|
31
|
-
getScreenLine(y: number): RenderLine | undefined;
|
|
32
|
-
get isFirstRender(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Append lines to the backbuffer leaving the on screen content unchanged.
|
|
35
|
-
*/
|
|
36
|
-
appendLinesBackbuffer(lines: RenderLine[]): void;
|
|
37
|
-
updateBackbuffer(start: number, deleteCount: number, newLines: RenderLine[]): void;
|
|
38
|
-
writeLines(lines: RenderLine[]): void;
|
|
39
|
-
moveCursor(x: number, y: number): void;
|
|
40
|
-
clampLine(line: StyledChar[], width: number): RenderLine;
|
|
41
|
-
syncLine(line: RenderLine, y: number): void;
|
|
42
|
-
/**
|
|
43
|
-
* Trigger a scroll up of content into the backbuffer.
|
|
44
|
-
*/
|
|
45
|
-
private applyScrollUpBackbuffer;
|
|
46
|
-
private applyScrollUp;
|
|
47
|
-
private applyScrollDown;
|
|
48
|
-
private performScroll;
|
|
49
|
-
scrollLines(options: {
|
|
50
|
-
start: number;
|
|
51
|
-
end: number;
|
|
52
|
-
linesToScroll: number;
|
|
53
|
-
lines: RenderLine[];
|
|
54
|
-
direction: 'up' | 'down';
|
|
55
|
-
scrollToBackbuffer: boolean;
|
|
56
|
-
}): void;
|
|
57
|
-
resize(columns: number, rows: number): void;
|
|
58
|
-
clear(): void;
|
|
59
|
-
startSynchronizedOutput(): void;
|
|
60
|
-
endSynchronizedOutput(): void;
|
|
61
|
-
flush(): void;
|
|
62
|
-
slowFlush(): Promise<void>;
|
|
63
|
-
validateLinesConsistent(lines: RenderLine[]): void;
|
|
64
|
-
private synchronizedWrite;
|
|
65
|
-
private resetScrollRegion;
|
|
66
|
-
private setScrollRegion;
|
|
67
|
-
private writeHelper;
|
|
68
|
-
private finishChunk;
|
|
69
|
-
}
|