@jrichman/ink 6.4.2 → 6.4.4
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/components/App.d.ts +1 -0
- package/build/components/App.js +1 -0
- package/build/components/App.js.map +1 -1
- package/build/components/AppContext.d.ts +4 -0
- package/build/components/AppContext.js +1 -0
- package/build/components/AppContext.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/ink.d.ts +4 -0
- package/build/ink.js +40 -7
- package/build/ink.js.map +1 -1
- package/build/log-update.d.ts +5 -2
- package/build/log-update.js +301 -36
- package/build/log-update.js.map +1 -1
- package/build/measure-element.d.ts +42 -0
- package/build/measure-element.js +122 -0
- package/build/measure-element.js.map +1 -1
- package/build/output.d.ts +1 -0
- package/build/output.js +1 -0
- package/build/output.js.map +1 -1
- package/build/render-node-to-output.js +18 -74
- package/build/render-node-to-output.js.map +1 -1
- package/build/render.d.ts +15 -0
- package/build/render.js +1 -0
- package/build/render.js.map +1 -1
- package/build/renderer.d.ts +2 -0
- package/build/renderer.js +4 -1
- package/build/renderer.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +8 -0
package/build/log-update.js
CHANGED
|
@@ -1,75 +1,128 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import ansiEscapes from 'ansi-escapes';
|
|
3
3
|
import cliCursor from 'cli-cursor';
|
|
4
|
+
import colorize from './colorize.js';
|
|
5
|
+
// Debugging option to simulate flicker if for terminals that do not support enableSynchronizedOutput.
|
|
6
|
+
const enableSynchronizedOutput = true;
|
|
4
7
|
const enterSynchronizedOutput = '\u001B[?2026h';
|
|
5
8
|
const exitSynchronizedOutput = '\u001B[?2026l';
|
|
6
|
-
const
|
|
9
|
+
const enterAlternateBuffer = (stream, alreadyActive) => {
|
|
10
|
+
if (!alreadyActive) {
|
|
11
|
+
stream.write(ansiEscapes.enterAlternativeScreen);
|
|
12
|
+
}
|
|
13
|
+
stream.write('\u001B[?7l');
|
|
14
|
+
};
|
|
15
|
+
const exitAlternateBuffer = (stream, lastFrame) => {
|
|
16
|
+
stream.write('\u001B[?7h');
|
|
17
|
+
stream.write(ansiEscapes.exitAlternativeScreen);
|
|
18
|
+
// The last frame was rendered to the alternate buffer.
|
|
19
|
+
// We need to render it again to the main buffer. If apps do not
|
|
20
|
+
// want this behavior, they can make sure the last frame is empty
|
|
21
|
+
// before unmounting.
|
|
22
|
+
stream.write(lastFrame);
|
|
23
|
+
};
|
|
24
|
+
const clearAlternateBuffer = (stream) => {
|
|
25
|
+
const eraseOperation = process.env['TERM_PROGRAM'] === 'iTerm.app'
|
|
26
|
+
? ansiEscapes.clearTerminal
|
|
27
|
+
: ansiEscapes.eraseScreen;
|
|
28
|
+
stream.write(eraseOperation);
|
|
29
|
+
};
|
|
30
|
+
const ensureCursorHidden = (showCursor, hasHiddenCursor, stream) => {
|
|
31
|
+
if (!showCursor && !hasHiddenCursor) {
|
|
32
|
+
cliCursor.hide(stream);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return hasHiddenCursor;
|
|
36
|
+
};
|
|
37
|
+
const ensureCursorShown = (showCursor, stream) => {
|
|
38
|
+
if (!showCursor) {
|
|
39
|
+
cliCursor.show(stream);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const moveCursorDown = (buffer, skippedLines) => {
|
|
43
|
+
if (skippedLines > 0) {
|
|
44
|
+
if (skippedLines === 1) {
|
|
45
|
+
buffer.push(ansiEscapes.cursorNextLine);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
buffer.push(ansiEscapes.cursorDown(skippedLines));
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return 0;
|
|
52
|
+
};
|
|
53
|
+
const createStandard = (stream, { showCursor = false, alternateBuffer = false, alternateBufferAlreadyActive = false, getRows = () => 0, getColumns = () => 0, } = {}) => {
|
|
7
54
|
let previousLineCount = 0;
|
|
8
55
|
let previousOutput = '';
|
|
9
56
|
// Keep track of the actual previous output rendered to the alternate buffer
|
|
10
57
|
// which may be truncated to the terminal height.
|
|
11
58
|
let previousOutputAlternateBuffer = '';
|
|
59
|
+
let previousRows = 0;
|
|
60
|
+
let previousColumns = 0;
|
|
12
61
|
let hasHiddenCursor = false;
|
|
13
|
-
if (alternateBuffer
|
|
14
|
-
stream
|
|
62
|
+
if (alternateBuffer) {
|
|
63
|
+
enterAlternateBuffer(stream, alternateBufferAlreadyActive);
|
|
15
64
|
}
|
|
16
|
-
const render = (str) => {
|
|
17
|
-
|
|
18
|
-
cliCursor.hide();
|
|
19
|
-
hasHiddenCursor = true;
|
|
20
|
-
}
|
|
65
|
+
const render = (str, _styledOutput, debugRainbowColor) => {
|
|
66
|
+
hasHiddenCursor = ensureCursorHidden(showCursor, hasHiddenCursor, stream);
|
|
21
67
|
const output = str + '\n';
|
|
22
68
|
if (alternateBuffer) {
|
|
23
69
|
let alternateBufferOutput = output;
|
|
24
70
|
const rows = getRows() ?? 0;
|
|
71
|
+
const columns = getColumns() ?? 0;
|
|
25
72
|
if (rows > 0) {
|
|
26
73
|
const lines = str.split('\n');
|
|
27
74
|
const lineCount = lines.length;
|
|
28
|
-
// Only write the
|
|
75
|
+
// Only write the first `rows` lines as the alternate buffer
|
|
29
76
|
// will not scroll so all we accomplish by writing more
|
|
30
77
|
// content is risking flicker and confusing the terminal about
|
|
31
78
|
// the cursor position.
|
|
32
79
|
if (lineCount > rows) {
|
|
33
|
-
alternateBufferOutput = lines.slice(
|
|
34
|
-
}
|
|
35
|
-
// Only write the last `rows` lines as the alternate buffer
|
|
36
|
-
// will not scroll so all we accomplish by writing more
|
|
37
|
-
// content is risking flicker and confusing the terminal about
|
|
38
|
-
// the cursor position.
|
|
39
|
-
if (lineCount > rows) {
|
|
40
|
-
alternateBufferOutput = str.split('\n').slice(-rows).join('\n');
|
|
80
|
+
alternateBufferOutput = lines.slice(0, rows).join('\n');
|
|
41
81
|
}
|
|
42
82
|
}
|
|
43
83
|
// In alternate buffer mode we need to re-render based on whether content
|
|
44
84
|
// visible within the clipped alternate output buffer has changed even
|
|
45
85
|
// if the entire output string has not changed.
|
|
46
|
-
if (alternateBufferOutput !== previousOutputAlternateBuffer
|
|
86
|
+
if (alternateBufferOutput !== previousOutputAlternateBuffer ||
|
|
87
|
+
rows !== previousRows ||
|
|
88
|
+
columns !== previousColumns) {
|
|
47
89
|
// Unfortunately, eraseScreen does not work correctly in iTerm2 so we
|
|
48
90
|
// have to use clearTerminal instead.
|
|
49
91
|
const eraseOperation = process.env['TERM_PROGRAM'] === 'iTerm.app'
|
|
50
92
|
? ansiEscapes.clearTerminal
|
|
51
93
|
: ansiEscapes.eraseScreen;
|
|
52
|
-
|
|
94
|
+
let outputToWrite = alternateBufferOutput;
|
|
95
|
+
outputToWrite = debugRainbowColor
|
|
96
|
+
? colorize(outputToWrite, debugRainbowColor, 'background')
|
|
97
|
+
: outputToWrite;
|
|
98
|
+
stream.write((enableSynchronizedOutput ? enterSynchronizedOutput : '') +
|
|
53
99
|
ansiEscapes.cursorTo(0, 0) +
|
|
54
100
|
eraseOperation +
|
|
55
|
-
|
|
56
|
-
exitSynchronizedOutput);
|
|
101
|
+
outputToWrite +
|
|
102
|
+
(enableSynchronizedOutput ? exitSynchronizedOutput : ''));
|
|
57
103
|
previousOutputAlternateBuffer = alternateBufferOutput;
|
|
104
|
+
previousRows = rows;
|
|
105
|
+
previousColumns = columns;
|
|
58
106
|
}
|
|
59
107
|
previousOutput = output;
|
|
60
108
|
return;
|
|
61
109
|
}
|
|
110
|
+
if (output === previousOutput) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
62
113
|
previousOutput = output;
|
|
63
|
-
|
|
114
|
+
let outputToWrite = output;
|
|
115
|
+
outputToWrite = debugRainbowColor
|
|
116
|
+
? colorize(outputToWrite, debugRainbowColor, 'background')
|
|
117
|
+
: outputToWrite;
|
|
118
|
+
stream.write(ansiEscapes.eraseLines(previousLineCount) + outputToWrite);
|
|
64
119
|
previousLineCount = output.split('\n').length;
|
|
65
120
|
};
|
|
66
121
|
render.clear = () => {
|
|
67
122
|
if (alternateBuffer) {
|
|
68
|
-
|
|
69
|
-
? ansiEscapes.clearTerminal
|
|
70
|
-
: ansiEscapes.eraseScreen;
|
|
71
|
-
stream.write(eraseOperation);
|
|
123
|
+
clearAlternateBuffer(stream);
|
|
72
124
|
previousOutput = '';
|
|
125
|
+
previousOutputAlternateBuffer = '';
|
|
73
126
|
return;
|
|
74
127
|
}
|
|
75
128
|
stream.write(ansiEscapes.eraseLines(previousLineCount));
|
|
@@ -80,17 +133,10 @@ const create = (stream, { showCursor = false, alternateBuffer = false, alternate
|
|
|
80
133
|
const lastFrame = previousOutput;
|
|
81
134
|
previousOutput = '';
|
|
82
135
|
previousLineCount = 0;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
hasHiddenCursor = false;
|
|
86
|
-
}
|
|
136
|
+
ensureCursorShown(showCursor, stream);
|
|
137
|
+
hasHiddenCursor = false;
|
|
87
138
|
if (alternateBuffer) {
|
|
88
|
-
stream
|
|
89
|
-
// The last frame was rendered to the alternate buffer.
|
|
90
|
-
// We need to render it again to the main buffer. If apps do not
|
|
91
|
-
// want this behavior, they can make sure the last frame is empty
|
|
92
|
-
// before unmounting.
|
|
93
|
-
stream.write(lastFrame);
|
|
139
|
+
exitAlternateBuffer(stream, lastFrame);
|
|
94
140
|
}
|
|
95
141
|
};
|
|
96
142
|
render.sync = (str) => {
|
|
@@ -104,6 +150,225 @@ const create = (stream, { showCursor = false, alternateBuffer = false, alternate
|
|
|
104
150
|
};
|
|
105
151
|
return render;
|
|
106
152
|
};
|
|
153
|
+
const createIncremental = (stream, { showCursor = false, alternateBuffer = false, alternateBufferAlreadyActive = false, getRows = () => 0, getColumns = () => 0, } = {}) => {
|
|
154
|
+
let previousLines = [];
|
|
155
|
+
let previousOutput = '';
|
|
156
|
+
let previousOutputAlternateBuffer = '';
|
|
157
|
+
let previousRows = 0;
|
|
158
|
+
let previousColumns = 0;
|
|
159
|
+
let hasHiddenCursor = false;
|
|
160
|
+
let alternateBufferStyledOutput = [];
|
|
161
|
+
if (alternateBuffer) {
|
|
162
|
+
enterAlternateBuffer(stream, alternateBufferAlreadyActive);
|
|
163
|
+
}
|
|
164
|
+
const render = (str, styledOutput, debugRainbowColor) => {
|
|
165
|
+
hasHiddenCursor = ensureCursorHidden(showCursor, hasHiddenCursor, stream);
|
|
166
|
+
const output = str + '\n';
|
|
167
|
+
if (alternateBuffer) {
|
|
168
|
+
let alternateBufferOutput = output;
|
|
169
|
+
const rows = getRows() ?? 0;
|
|
170
|
+
const columns = getColumns() ?? 0;
|
|
171
|
+
if (rows > 0) {
|
|
172
|
+
const lines = str.split('\n');
|
|
173
|
+
const lineCount = lines.length;
|
|
174
|
+
// Only write the first `rows` lines as the alternate buffer
|
|
175
|
+
// will not scroll so all we accomplish by writing more
|
|
176
|
+
// content is risking flicker and confusion about the terminal about
|
|
177
|
+
// the cursor position.
|
|
178
|
+
if (lineCount > rows) {
|
|
179
|
+
alternateBufferOutput = lines.slice(0, rows).join('\n');
|
|
180
|
+
alternateBufferStyledOutput = styledOutput.slice(0, rows);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
alternateBufferOutput = lines.join('\n');
|
|
184
|
+
alternateBufferStyledOutput = styledOutput;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// In alternate buffer mode we need to re-render based on whether content
|
|
188
|
+
// visible within the clipped alternate output buffer has changed even
|
|
189
|
+
// if the entire output string has not changed.
|
|
190
|
+
if (alternateBufferOutput !== previousOutputAlternateBuffer ||
|
|
191
|
+
rows !== previousRows ||
|
|
192
|
+
columns !== previousColumns) {
|
|
193
|
+
const nextLines = alternateBufferOutput.split('\n');
|
|
194
|
+
if (rows === previousRows && columns === previousColumns) {
|
|
195
|
+
const buffer = [];
|
|
196
|
+
if (enableSynchronizedOutput) {
|
|
197
|
+
buffer.push(enterSynchronizedOutput);
|
|
198
|
+
}
|
|
199
|
+
buffer.push(ansiEscapes.cursorTo(0, 0));
|
|
200
|
+
let skippedLines = 0;
|
|
201
|
+
for (let i = 0; i < nextLines.length; i++) {
|
|
202
|
+
if (nextLines[i] === previousLines[i]) {
|
|
203
|
+
skippedLines++;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
skippedLines = moveCursorDown(buffer, skippedLines);
|
|
207
|
+
let lineToWrite = nextLines[i] ?? '';
|
|
208
|
+
let lineLength = 0;
|
|
209
|
+
const styledOutput = alternateBufferStyledOutput[i];
|
|
210
|
+
if (styledOutput !== undefined) {
|
|
211
|
+
for (let j = styledOutput.length - 1; j >= 0; j--) {
|
|
212
|
+
const char = styledOutput[j];
|
|
213
|
+
if (char === undefined)
|
|
214
|
+
continue;
|
|
215
|
+
if (char.value !== ' ' && char.value !== '') {
|
|
216
|
+
lineLength = j + (char.fullWidth ? 2 : 1);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
lineToWrite = debugRainbowColor
|
|
222
|
+
? colorize(lineToWrite, debugRainbowColor, 'background')
|
|
223
|
+
: lineToWrite;
|
|
224
|
+
buffer.push(lineToWrite);
|
|
225
|
+
if (columns > lineLength) {
|
|
226
|
+
// Clear the rest of the line without introducing flicker.
|
|
227
|
+
// We could optimize this further by only writing spaces up to the last line length
|
|
228
|
+
// but this is safer.
|
|
229
|
+
// The one failure mode for this is that if we add too many spaces and there was a
|
|
230
|
+
// non space character at the very end of the line
|
|
231
|
+
buffer.push(' '.repeat(columns - lineLength));
|
|
232
|
+
}
|
|
233
|
+
if (i < nextLines.length - 1) {
|
|
234
|
+
buffer.push('\n');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
skippedLines = moveCursorDown(buffer, skippedLines);
|
|
238
|
+
if (previousLines.length > nextLines.length) {
|
|
239
|
+
const linesToClear = previousLines.length - nextLines.length;
|
|
240
|
+
for (let i = 0; i < linesToClear; i++) {
|
|
241
|
+
buffer.push(ansiEscapes.eraseLine + ansiEscapes.cursorNextLine);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (enableSynchronizedOutput) {
|
|
245
|
+
buffer.push(exitSynchronizedOutput);
|
|
246
|
+
}
|
|
247
|
+
stream.write(buffer.join(''));
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
// Unfortunately, eraseScreen does not work correctly in iTerm2 so we
|
|
251
|
+
// have to use clearTerminal instead.
|
|
252
|
+
const eraseOperation = process.env['TERM_PROGRAM'] === 'iTerm.app'
|
|
253
|
+
? ansiEscapes.clearTerminal
|
|
254
|
+
: ansiEscapes.eraseScreen;
|
|
255
|
+
let outputToWrite = alternateBufferOutput;
|
|
256
|
+
outputToWrite = debugRainbowColor
|
|
257
|
+
? colorize(outputToWrite, debugRainbowColor, 'background')
|
|
258
|
+
: outputToWrite;
|
|
259
|
+
stream.write(enterSynchronizedOutput +
|
|
260
|
+
ansiEscapes.cursorTo(0, 0) +
|
|
261
|
+
eraseOperation +
|
|
262
|
+
outputToWrite +
|
|
263
|
+
exitSynchronizedOutput);
|
|
264
|
+
previousRows = rows;
|
|
265
|
+
previousColumns = columns;
|
|
266
|
+
}
|
|
267
|
+
previousOutputAlternateBuffer = alternateBufferOutput;
|
|
268
|
+
previousLines = nextLines;
|
|
269
|
+
}
|
|
270
|
+
previousOutput = output;
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (output === previousOutput) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const previousCount = previousLines.length;
|
|
277
|
+
const nextLines = output.split('\n');
|
|
278
|
+
const nextCount = nextLines.length;
|
|
279
|
+
const visibleCount = nextCount - 1;
|
|
280
|
+
if (output === '\n' || previousOutput.length === 0) {
|
|
281
|
+
let outputToWrite = output;
|
|
282
|
+
outputToWrite = debugRainbowColor
|
|
283
|
+
? colorize(outputToWrite, debugRainbowColor, 'background')
|
|
284
|
+
: outputToWrite;
|
|
285
|
+
stream.write(ansiEscapes.eraseLines(previousCount) + outputToWrite);
|
|
286
|
+
previousOutput = output;
|
|
287
|
+
previousLines = nextLines;
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
// We aggregate all chunks for incremental rendering into a buffer, and then write them to stdout at the end.
|
|
291
|
+
const buffer = [];
|
|
292
|
+
// Clear extra lines if the current content's line count is lower than the previous.
|
|
293
|
+
if (nextCount < previousCount) {
|
|
294
|
+
buffer.push(
|
|
295
|
+
// Erases the trailing lines and the final newline slot.
|
|
296
|
+
ansiEscapes.eraseLines(previousCount - nextCount + 1),
|
|
297
|
+
// Positions cursor to the top of the rendered output.
|
|
298
|
+
ansiEscapes.cursorUp(visibleCount));
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
buffer.push(ansiEscapes.cursorUp(previousCount - 1));
|
|
302
|
+
}
|
|
303
|
+
let skippedLines = 0;
|
|
304
|
+
for (let i = 0; i < visibleCount; i++) {
|
|
305
|
+
// We do not write lines if the contents are the same. This prevents flickering during renders.
|
|
306
|
+
if (nextLines[i] === previousLines[i]) {
|
|
307
|
+
skippedLines++;
|
|
308
|
+
continue;
|
|
309
|
+
}
|
|
310
|
+
skippedLines = moveCursorDown(buffer, skippedLines);
|
|
311
|
+
let lineToWrite = nextLines[i] ?? '';
|
|
312
|
+
lineToWrite = debugRainbowColor
|
|
313
|
+
? colorize(lineToWrite, debugRainbowColor, 'background')
|
|
314
|
+
: lineToWrite;
|
|
315
|
+
buffer.push(ansiEscapes.eraseLine + lineToWrite + '\n');
|
|
316
|
+
}
|
|
317
|
+
skippedLines = moveCursorDown(buffer, skippedLines);
|
|
318
|
+
stream.write(buffer.join(''));
|
|
319
|
+
previousOutput = output;
|
|
320
|
+
previousLines = nextLines;
|
|
321
|
+
};
|
|
322
|
+
render.clear = () => {
|
|
323
|
+
if (alternateBuffer) {
|
|
324
|
+
clearAlternateBuffer(stream);
|
|
325
|
+
previousOutput = '';
|
|
326
|
+
previousOutputAlternateBuffer = '';
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
stream.write(ansiEscapes.eraseLines(previousLines.length));
|
|
330
|
+
previousOutput = '';
|
|
331
|
+
previousLines = [];
|
|
332
|
+
};
|
|
333
|
+
render.done = () => {
|
|
334
|
+
const lastFrame = previousOutput;
|
|
335
|
+
previousOutput = '';
|
|
336
|
+
previousLines = [];
|
|
337
|
+
ensureCursorShown(showCursor, stream);
|
|
338
|
+
hasHiddenCursor = false;
|
|
339
|
+
if (alternateBuffer) {
|
|
340
|
+
exitAlternateBuffer(stream, lastFrame);
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
render.sync = (str) => {
|
|
344
|
+
if (alternateBuffer) {
|
|
345
|
+
previousOutput = str;
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
const output = str + '\n';
|
|
349
|
+
previousOutput = output;
|
|
350
|
+
previousLines = output.split('\n');
|
|
351
|
+
};
|
|
352
|
+
return render;
|
|
353
|
+
};
|
|
354
|
+
const create = (stream, { showCursor = false, alternateBuffer = false, alternateBufferAlreadyActive = false, incremental = false, getRows, getColumns, } = {}) => {
|
|
355
|
+
if (incremental) {
|
|
356
|
+
return createIncremental(stream, {
|
|
357
|
+
showCursor,
|
|
358
|
+
alternateBuffer,
|
|
359
|
+
alternateBufferAlreadyActive,
|
|
360
|
+
getRows,
|
|
361
|
+
getColumns,
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
return createStandard(stream, {
|
|
365
|
+
showCursor,
|
|
366
|
+
alternateBuffer,
|
|
367
|
+
alternateBufferAlreadyActive,
|
|
368
|
+
getRows,
|
|
369
|
+
getColumns,
|
|
370
|
+
});
|
|
371
|
+
};
|
|
107
372
|
const logUpdate = { create };
|
|
108
373
|
export default logUpdate;
|
|
109
374
|
//# sourceMappingURL=log-update.js.map
|
package/build/log-update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-update.js","sourceRoot":"","sources":["../src/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AAe,EAAE,CAAC;YACrB,cAAc,GAAG,GAAG,CAAC;YACrB,OAAO;QACR,CAAC;QAED,MAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;QAC1B,cAAc,GAAG,MAAM,CAAC;QACxB,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC;IAEF,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CACd,MAAgB,EAChB,EACC,UAAU,GAAG,KAAK,EAClB,eAAe,GAAG,KAAK,EACvB,4BAA4B,GAAG,KAAK,EACpC,WAAW,GAAG,KAAK,EACnB,OAAO,EACP,UAAU,MAQP,EAAE,EACM,EAAE;IACd,IAAI,WAAW,EAAE,CAAC;QACjB,OAAO,iBAAiB,CAAC,MAAM,EAAE;YAChC,UAAU;YACV,eAAe;YACf,4BAA4B;YAC5B,OAAO;YACP,UAAU;SACV,CAAC,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CAAC,MAAM,EAAE;QAC7B,UAAU;QACV,eAAe;QACf,4BAA4B;QAC5B,OAAO;QACP,UAAU;KACV,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,EAAC,MAAM,EAAC,CAAC;AAC3B,eAAe,SAAS,CAAC"}
|
|
@@ -27,4 +27,46 @@ export declare const getBoundingBox: (node: DOMElement) => {
|
|
|
27
27
|
width: number;
|
|
28
28
|
height: number;
|
|
29
29
|
};
|
|
30
|
+
export type ScrollbarBoundingBox = {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
thumb: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
start: number;
|
|
41
|
+
end: number;
|
|
42
|
+
startHalf: number;
|
|
43
|
+
endHalf: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare function calculateScrollbarThumb(options: {
|
|
47
|
+
scrollbarDimension: number;
|
|
48
|
+
clientDimension: number;
|
|
49
|
+
scrollDimension: number;
|
|
50
|
+
scrollPosition: number;
|
|
51
|
+
axis: 'vertical' | 'horizontal';
|
|
52
|
+
}): {
|
|
53
|
+
startIndex: number;
|
|
54
|
+
endIndex: number;
|
|
55
|
+
thumbStartHalf: number;
|
|
56
|
+
thumbEndHalf: number;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Get the bounding box of the vertical scrollbar.
|
|
60
|
+
*/
|
|
61
|
+
export declare const getVerticalScrollbarBoundingBox: (node: DOMElement, offset?: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
}) => ScrollbarBoundingBox | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Get the bounding box of the horizontal scrollbar.
|
|
67
|
+
*/
|
|
68
|
+
export declare const getHorizontalScrollbarBoundingBox: (node: DOMElement, offset?: {
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
}) => ScrollbarBoundingBox | undefined;
|
|
30
72
|
export default measureElement;
|
package/build/measure-element.js
CHANGED
|
@@ -64,5 +64,127 @@ export const getBoundingBox = (node) => {
|
|
|
64
64
|
}
|
|
65
65
|
return { x, y, width, height };
|
|
66
66
|
};
|
|
67
|
+
export function calculateScrollbarThumb(options) {
|
|
68
|
+
const { scrollbarDimension, clientDimension, scrollDimension, scrollPosition, axis, } = options;
|
|
69
|
+
const scrollbarDimensionHalves = scrollbarDimension * 2;
|
|
70
|
+
const thumbDimensionHalves = Math.max(axis === 'vertical' ? 2 : 1, Math.round((clientDimension / scrollDimension) * scrollbarDimensionHalves));
|
|
71
|
+
const maxScrollPosition = scrollDimension - clientDimension;
|
|
72
|
+
const maxThumbPosition = scrollbarDimensionHalves - thumbDimensionHalves;
|
|
73
|
+
const thumbPosition = maxScrollPosition > 0
|
|
74
|
+
? Math.round((scrollPosition / maxScrollPosition) * maxThumbPosition)
|
|
75
|
+
: 0;
|
|
76
|
+
const thumbStartHalf = thumbPosition;
|
|
77
|
+
const thumbEndHalf = thumbPosition + thumbDimensionHalves;
|
|
78
|
+
const startIndex = Math.floor(thumbStartHalf / 2);
|
|
79
|
+
const endIndex = Math.min(scrollbarDimension, Math.ceil(thumbEndHalf / 2));
|
|
80
|
+
return { startIndex, endIndex, thumbStartHalf, thumbEndHalf };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get the bounding box of the vertical scrollbar.
|
|
84
|
+
*/
|
|
85
|
+
export const getVerticalScrollbarBoundingBox = (node, offset) => {
|
|
86
|
+
const { yogaNode } = node;
|
|
87
|
+
if (!yogaNode) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
const overflow = node.style.overflow ?? 'visible';
|
|
91
|
+
const overflowY = node.style.overflowY ?? overflow;
|
|
92
|
+
if (overflowY !== 'scroll') {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
const clientHeight = node.internal_scrollState?.clientHeight ?? 0;
|
|
96
|
+
const scrollHeight = node.internal_scrollState?.scrollHeight ?? 0;
|
|
97
|
+
if (scrollHeight <= clientHeight) {
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
const { x, y } = offset ?? getBoundingBox(node);
|
|
101
|
+
const scrollbarHeight = yogaNode.getComputedHeight() -
|
|
102
|
+
yogaNode.getComputedBorder(Yoga.EDGE_TOP) -
|
|
103
|
+
yogaNode.getComputedBorder(Yoga.EDGE_BOTTOM);
|
|
104
|
+
const { startIndex, endIndex, thumbStartHalf, thumbEndHalf } = calculateScrollbarThumb({
|
|
105
|
+
scrollbarDimension: scrollbarHeight,
|
|
106
|
+
clientDimension: clientHeight,
|
|
107
|
+
scrollDimension: scrollHeight,
|
|
108
|
+
scrollPosition: node.internal_scrollState?.scrollTop ?? 0,
|
|
109
|
+
axis: 'vertical',
|
|
110
|
+
});
|
|
111
|
+
const scrollbarX = x +
|
|
112
|
+
yogaNode.getComputedWidth() -
|
|
113
|
+
1 -
|
|
114
|
+
yogaNode.getComputedBorder(Yoga.EDGE_RIGHT);
|
|
115
|
+
const scrollbarY = y + yogaNode.getComputedBorder(Yoga.EDGE_TOP);
|
|
116
|
+
return {
|
|
117
|
+
x: scrollbarX,
|
|
118
|
+
y: scrollbarY,
|
|
119
|
+
width: 1,
|
|
120
|
+
height: scrollbarHeight,
|
|
121
|
+
thumb: {
|
|
122
|
+
x: scrollbarX,
|
|
123
|
+
y: scrollbarY + startIndex,
|
|
124
|
+
width: 1,
|
|
125
|
+
height: endIndex - startIndex,
|
|
126
|
+
start: startIndex,
|
|
127
|
+
end: endIndex,
|
|
128
|
+
startHalf: thumbStartHalf,
|
|
129
|
+
endHalf: thumbEndHalf,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Get the bounding box of the horizontal scrollbar.
|
|
135
|
+
*/
|
|
136
|
+
export const getHorizontalScrollbarBoundingBox = (node, offset) => {
|
|
137
|
+
const { yogaNode } = node;
|
|
138
|
+
if (!yogaNode) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const overflow = node.style.overflow ?? 'visible';
|
|
142
|
+
const overflowX = node.style.overflowX ?? overflow;
|
|
143
|
+
if (overflowX !== 'scroll') {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
const clientWidth = node.internal_scrollState?.clientWidth ?? 0;
|
|
147
|
+
const scrollWidth = node.internal_scrollState?.scrollWidth ?? 0;
|
|
148
|
+
if (scrollWidth <= clientWidth) {
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
const { x, y } = offset ?? getBoundingBox(node);
|
|
152
|
+
const overflowY = node.style.overflowY ?? overflow;
|
|
153
|
+
const clientHeight = node.internal_scrollState?.clientHeight ?? 0;
|
|
154
|
+
const scrollHeight = node.internal_scrollState?.scrollHeight ?? 0;
|
|
155
|
+
const isVerticalScrollbarVisible = overflowY === 'scroll' && scrollHeight > clientHeight;
|
|
156
|
+
const scrollbarWidth = yogaNode.getComputedWidth() -
|
|
157
|
+
yogaNode.getComputedBorder(Yoga.EDGE_LEFT) -
|
|
158
|
+
yogaNode.getComputedBorder(Yoga.EDGE_RIGHT) -
|
|
159
|
+
(isVerticalScrollbarVisible ? 1 : 0);
|
|
160
|
+
const { startIndex, endIndex, thumbStartHalf, thumbEndHalf } = calculateScrollbarThumb({
|
|
161
|
+
scrollbarDimension: scrollbarWidth,
|
|
162
|
+
clientDimension: clientWidth,
|
|
163
|
+
scrollDimension: scrollWidth,
|
|
164
|
+
scrollPosition: node.internal_scrollState?.scrollLeft ?? 0,
|
|
165
|
+
axis: 'horizontal',
|
|
166
|
+
});
|
|
167
|
+
const scrollbarX = x + yogaNode.getComputedBorder(Yoga.EDGE_LEFT);
|
|
168
|
+
const scrollbarY = y +
|
|
169
|
+
yogaNode.getComputedHeight() -
|
|
170
|
+
1 -
|
|
171
|
+
yogaNode.getComputedBorder(Yoga.EDGE_BOTTOM);
|
|
172
|
+
return {
|
|
173
|
+
x: scrollbarX,
|
|
174
|
+
y: scrollbarY,
|
|
175
|
+
width: scrollbarWidth,
|
|
176
|
+
height: 1,
|
|
177
|
+
thumb: {
|
|
178
|
+
x: scrollbarX + startIndex,
|
|
179
|
+
y: scrollbarY,
|
|
180
|
+
width: endIndex - startIndex,
|
|
181
|
+
height: 1,
|
|
182
|
+
start: startIndex,
|
|
183
|
+
end: endIndex,
|
|
184
|
+
startHalf: thumbStartHalf,
|
|
185
|
+
endHalf: thumbEndHalf,
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
};
|
|
67
189
|
export default measureElement;
|
|
68
190
|
//# sourceMappingURL=measure-element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measure-element.js","sourceRoot":"","sources":["../src/measure-element.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,aAAa,CAAC;AAE/B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