@cplieger/web-terminal-ui 5.6.1 → 5.6.2
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/package.json +2 -2
- package/src/dom-isolation-setup.ts +0 -32
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-ui",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reference touch-first browser UI for @cplieger/web-terminal-engine: a composable kernel + feature modules (tabs, activity monitor, mobile toolbar, context menu, IME, predictive echo, viewport handling) and CSS. One createTerminal() call.",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -95,6 +95,6 @@
|
|
|
95
95
|
"LICENSE",
|
|
96
96
|
"README.md",
|
|
97
97
|
"!src/**/*.test.ts",
|
|
98
|
-
"!src
|
|
98
|
+
"!src/**/*-setup.ts"
|
|
99
99
|
]
|
|
100
100
|
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// Per-test cleanup of DOM state that outlives a test file.
|
|
2
|
-
//
|
|
3
|
-
// Loaded via vitest's `setupFiles` alongside fc-strict-setup, because
|
|
4
|
-
// `vitest.config.ts` deliberately sets `isolate: false`: test FILES share one
|
|
5
|
-
// happy-dom instance inside a worker thread, which is what makes the suite fast
|
|
6
|
-
// and also what lets one file's leftovers reach another's assertions.
|
|
7
|
-
//
|
|
8
|
-
// The document selection is the state that actually bites, for two compounding
|
|
9
|
-
// reasons. Several suites end with a live selection on purpose (the kernel's
|
|
10
|
-
// mouse-selection and type-to-focus suites assert that a gesture PRESERVED one,
|
|
11
|
-
// and contextMenu's dismissal suite clicks a real Select All). And happy-dom does
|
|
12
|
-
// not apply the selection fixup a real browser does, so a range whose nodes were
|
|
13
|
-
// removed by `document.body.replaceChildren()` keeps reporting its old text:
|
|
14
|
-
// measured rangeCount 1, isCollapsed false, and toString() unchanged after the
|
|
15
|
-
// nodes were detached.
|
|
16
|
-
//
|
|
17
|
-
// Left alone, that reached `context-menu.test.ts`'s "omits Copy with nothing
|
|
18
|
-
// selected" case, which found text to copy and failed. Order-dependently, so it
|
|
19
|
-
// passed every local run and every PR check, then failed once on main where the
|
|
20
|
-
// thread layout put the files in a different order. Clearing here rather than in
|
|
21
|
-
// each suite keeps the guarantee independent of which files a worker happens to
|
|
22
|
-
// pair up.
|
|
23
|
-
import { beforeEach } from "vitest";
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
// Node-environment files (the default; DOM files opt in per file) have no
|
|
27
|
-
// window, and nothing to clean.
|
|
28
|
-
if (typeof window === "undefined") {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
window.getSelection()?.removeAllRanges();
|
|
32
|
-
});
|