@cplieger/web-terminal-ui 5.6.1 → 6.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cplieger/web-terminal-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
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
|
}
|
|
@@ -137,7 +137,8 @@ export function createAttention(env: AttentionEnv): AttentionSurfaces {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/** iconVariantHref rewrites an icon URL to its variant, by the convention the
|
|
140
|
-
* asset generator writes (scripts/gen-attention-icons.py
|
|
140
|
+
* asset generator writes (the fleet's .kiro/scripts/gen-attention-icons.py, which
|
|
141
|
+
* serves every consuming app rather than living in this repo): the `favicon` token
|
|
141
142
|
* of the filename gains `-<variant>`, so `/favicon.svg` becomes
|
|
142
143
|
* `/favicon-input.svg` and `/favicon-32x32.png` becomes
|
|
143
144
|
* `/favicon-input-32x32.png`. The extension is preserved, so each link keeps
|
|
@@ -146,7 +146,7 @@ export interface TabsOptions {
|
|
|
146
146
|
* be served alongside it with `-input`, `-done` and `-alert` inserted after
|
|
147
147
|
* that token (`/favicon.svg` needs `/favicon-input.svg`; `/favicon-32x32.png`
|
|
148
148
|
* needs `/favicon-input-32x32.png`). Generate them with
|
|
149
|
-
*
|
|
149
|
+
* `.kiro/scripts/gen-attention-icons.py`, which writes exactly those names, and
|
|
150
150
|
* assert their presence in the APP's own tests — the library cannot check a
|
|
151
151
|
* file it does not ship, and a missing variant is a blank tab icon.
|
|
152
152
|
*
|
|
@@ -243,7 +243,7 @@ export function worseCue(a: CueStatus | "", b: CueStatus | ""): CueStatus | "" {
|
|
|
243
243
|
|
|
244
244
|
/** The icon variant a cue paints, which is NOT one per status: `crashed` and
|
|
245
245
|
* `failed` both render --status-failed, so they share one asset. An app ships
|
|
246
|
-
* one icon per name returned here (see scripts/gen-attention-icons.py). */
|
|
246
|
+
* one icon per name returned here (see .kiro/scripts/gen-attention-icons.py). */
|
|
247
247
|
export function cueIconName(status: CueStatus): "input" | "done" | "alert" {
|
|
248
248
|
if (status === "input" || status === "done") {
|
|
249
249
|
return status;
|
package/src/presets/tabbed.ts
CHANGED
|
@@ -35,7 +35,7 @@ export interface TabbedPresetOptions {
|
|
|
35
35
|
/** Swap the page's icon links to a status variant while a background session
|
|
36
36
|
* wants the user. Off by default, and enabling it is a promise that the
|
|
37
37
|
* variant assets are served — see TabsOptions.attentionIcons for the naming
|
|
38
|
-
* contract and scripts/gen-attention-icons.py, which writes them. */
|
|
38
|
+
* contract and .kiro/scripts/gen-attention-icons.py, which writes them. */
|
|
39
39
|
attentionIcons?: boolean;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -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
|
-
});
|