@cplieger/web-terminal-engine 6.2.0 → 6.4.0-dev.3
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/jsr.json +1 -1
- package/package.json +5 -5
- package/src/render.ts +5 -6
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-engine",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0-dev.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc -p tsconfig.json",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
23
23
|
"@types/pngjs": "6.0.5",
|
|
24
24
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
25
|
-
"@vitest/browser-playwright": "5.0.
|
|
26
|
-
"@vitest/coverage-v8": "5.0.
|
|
25
|
+
"@vitest/browser-playwright": "5.0.4",
|
|
26
|
+
"@vitest/coverage-v8": "5.0.4",
|
|
27
27
|
"esbuild": "0.28.2",
|
|
28
28
|
"eslint": "10.12.0",
|
|
29
29
|
"fast-check": "4.10.2",
|
|
30
|
-
"knip": "6.
|
|
30
|
+
"knip": "6.41.0",
|
|
31
31
|
"playwright": "1.64.0",
|
|
32
32
|
"pngjs": "7.0.0",
|
|
33
33
|
"prettier": "3.9.9",
|
|
34
34
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
35
35
|
"typescript-eslint": "8.71.1",
|
|
36
|
-
"vitest": "5.0.
|
|
36
|
+
"vitest": "5.0.4"
|
|
37
37
|
},
|
|
38
38
|
"overrides": {
|
|
39
39
|
"qs": "^6.15.2"
|
package/src/render.ts
CHANGED
|
@@ -1352,10 +1352,9 @@ export function createRenderer(opts: RendererOptions): Renderer {
|
|
|
1352
1352
|
if (el === null) {
|
|
1353
1353
|
return null;
|
|
1354
1354
|
}
|
|
1355
|
+
// Non-negative: rowAtViewportTop answers only with a CONTENT row, and
|
|
1356
|
+
// isContentRow requires a parsed index that resolves back to that element.
|
|
1355
1357
|
const abs = rowAbs(el);
|
|
1356
|
-
if (abs < 0) {
|
|
1357
|
-
return null;
|
|
1358
|
-
}
|
|
1359
1358
|
return {
|
|
1360
1359
|
abs,
|
|
1361
1360
|
screenTop: el.offsetTop - scroll.currentScrollTop(),
|
|
@@ -1468,10 +1467,10 @@ export function createRenderer(opts: RendererOptions): Renderer {
|
|
|
1468
1467
|
abs >= gap.hi
|
|
1469
1468
|
? Math.max(gap.lo, gap.hi - budget, floor) // approaching from BELOW the gap's top
|
|
1470
1469
|
: Math.max(gap.lo, floor); // approaching from above: start at the gap's low edge
|
|
1470
|
+
// At least 1, so no caller has to re-check it: every gap the store returns
|
|
1471
|
+
// satisfies `hi > lo` and `hi > pagingFloor`, and `budget` is at least 1,
|
|
1472
|
+
// which puts `fromAbs` strictly below `gap.hi` on both approaches.
|
|
1471
1473
|
const maxLines = Math.min(budget, gap.hi - fromAbs);
|
|
1472
|
-
if (maxLines < 1) {
|
|
1473
|
-
return;
|
|
1474
|
-
}
|
|
1475
1474
|
requestHistoryFn(fromAbs, maxLines);
|
|
1476
1475
|
}
|
|
1477
1476
|
|