@cplieger/web-terminal-engine 6.2.0 → 6.4.0-dev.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/jsr.json +1 -1
- package/package.json +6 -6
- package/src/render.ts +5 -6
- package/src/status-stream.ts +9 -0
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.4",
|
|
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
|
-
"prettier": "3.9.
|
|
33
|
+
"prettier": "3.9.10",
|
|
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
|
|
package/src/status-stream.ts
CHANGED
|
@@ -93,6 +93,15 @@ export interface SessionInfo {
|
|
|
93
93
|
/** how many sources produced `activity`: >= 1 whenever `activity` is non-empty,
|
|
94
94
|
* 0 when it is empty or the host does not count them. */
|
|
95
95
|
readonly activityCount?: number;
|
|
96
|
+
/** numbers the occurrence of `status`: it rises by one each time the status
|
|
97
|
+
* changes or a fresh notification re-latches it, and never falls for one id.
|
|
98
|
+
* Absent (or 0) means nothing numbered yet, including from an older server. */
|
|
99
|
+
readonly statusSeq?: number;
|
|
100
|
+
/** the highest `statusSeq` any reader acknowledged through
|
|
101
|
+
* `PUT /api/sessions/{id}/seen`. Never falls for one id and never exceeds
|
|
102
|
+
* `statusSeq`; a status that calls for attention is unread while
|
|
103
|
+
* `statusSeq > seenSeq`. */
|
|
104
|
+
readonly seenSeq?: number;
|
|
96
105
|
}
|
|
97
106
|
|
|
98
107
|
/** SessionStatus is one session's current status as carried on the status
|