@cplieger/web-terminal-engine 4.0.1 → 5.0.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/jsr.json +1 -1
- package/package.json +4 -4
- package/src/render.ts +1 -1
- package/src/scroll.ts +1 -1
- package/src/store.ts +2 -5
- package/src/types.ts +1 -2
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-engine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"typecheck": "tsc -p tsconfig.json",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"@cplieger/web-terminal-engine-v3": "npm:@cplieger/web-terminal-engine@2.8.0",
|
|
13
13
|
"@eslint/js": "10.0.1",
|
|
14
14
|
"@playwright/test": "1.62.1",
|
|
15
|
-
"@stryker-mutator/core": "
|
|
16
|
-
"@stryker-mutator/typescript-checker": "
|
|
17
|
-
"@stryker-mutator/vitest-runner": "
|
|
15
|
+
"@stryker-mutator/core": "10.0.0",
|
|
16
|
+
"@stryker-mutator/typescript-checker": "10.0.0",
|
|
17
|
+
"@stryker-mutator/vitest-runner": "10.0.0",
|
|
18
18
|
"@types/pngjs": "6.0.5",
|
|
19
19
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
20
20
|
"@vitest/coverage-v8": "4.1.10",
|
package/src/render.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// "scrollback": the live window is simply the last `height` absolute indices,
|
|
8
8
|
// and a line that scrolls into history just stops being updated. This is what
|
|
9
9
|
// removes the live/history reconciliation that caused the duplicate-rows and
|
|
10
|
-
// view-jumping bugs
|
|
10
|
+
// view-jumping bugs.
|
|
11
11
|
//
|
|
12
12
|
// Decode frames feed the store (handleScreen/handleScroll); a single
|
|
13
13
|
// requestAnimationFrame flush drains the store's change set and applies it:
|
package/src/scroll.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// suppress timer, and no programmatic-vs-user flag. That heuristic soup (a
|
|
8
8
|
// 100px tolerance, a 150ms debounce, a 60-second touch window) was the source
|
|
9
9
|
// of the view-jumping and scroll-interruption bugs (the legacy heuristic-soup
|
|
10
|
-
// failure mode
|
|
10
|
+
// failure mode).
|
|
11
11
|
//
|
|
12
12
|
// The renderer calls stickToBottom() once after each flush: if following, pin
|
|
13
13
|
// to the new bottom; if holding, do nothing. Holding the reading position when
|
package/src/store.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// Absolute-index line store: the client's authoritative model of the
|
|
2
2
|
// terminal. One buffer keyed by absolute line index, with the live screen
|
|
3
3
|
// window sliding along it. This is the data model that resolves the
|
|
4
|
-
// live/history split
|
|
5
|
-
// rationale"): there is no separate
|
|
4
|
+
// live/history split: there is no separate
|
|
6
5
|
// "live zone" and "scrollback" here, only lines addressed by absolute index,
|
|
7
6
|
// the last `height` of which happen to still be changing.
|
|
8
7
|
//
|
|
@@ -160,8 +159,7 @@ function isWireRunArray(value: unknown): value is WireRun[] {
|
|
|
160
159
|
* streaming session into one whole-layer invalidation PER LINE — on WebKit
|
|
161
160
|
* (which re-rasterizes the resident tiles each time) that is the single largest
|
|
162
161
|
* compositor cost this client can trigger, and on a memory-pressured iPhone it
|
|
163
|
-
* is churn the page cannot afford
|
|
164
|
-
* memory ceiling"). Batching keeps appends eviction-free between passes, so the
|
|
162
|
+
* is churn the page cannot afford. Batching keeps appends eviction-free between passes, so the
|
|
165
163
|
* layer shifts once per batch instead of once per line. The retained count is
|
|
166
164
|
* hard-bounded at `max(maxLines, live-window height)` after every apply — the
|
|
167
165
|
* window is never evicted (a cap at or below the screen height keeps the full
|
|
@@ -1482,7 +1480,6 @@ export class LineStore {
|
|
|
1482
1480
|
|
|
1483
1481
|
/**
|
|
1484
1482
|
* applyLine is the guarded core. It enforces the apply-line guard set
|
|
1485
|
-
* (see the #web-terminal-engine steering doc, "Design rationale"):
|
|
1486
1483
|
* valid index, not stale, idempotent, and
|
|
1487
1484
|
* cap-bounded. Returns nothing; effects are recorded in the dirty/evicted
|
|
1488
1485
|
* sets for the next drain.
|
package/src/types.ts
CHANGED
|
@@ -37,8 +37,7 @@ export interface ScreenMessage {
|
|
|
37
37
|
* Absolute line index of the top screen row (row 0). A changed row at
|
|
38
38
|
* window index `y` has absolute index `base + y`. The client stores
|
|
39
39
|
* every line by absolute index, so applying a row is idempotent and
|
|
40
|
-
* never duplicates
|
|
41
|
-
* "Design rationale").
|
|
40
|
+
* never duplicates.
|
|
42
41
|
*/
|
|
43
42
|
base: number;
|
|
44
43
|
/** Cursor position as [row, col], zero-indexed within the window. */
|