@oh-my-pi/pi-wire 18.13.3 → 18.14.1
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/CHANGELOG.md +7 -0
- package/dist/types/tsp.d.ts +23 -3
- package/package.json +1 -2
- package/src/tsp.ts +23 -2
- package/THIRD-PARTY-NOTICES.txt +0 -22901
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.14.0] - 2026-10-29
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added the TSP `json` kind for displaying raw JSON values as interactive, expandable trees in the terminal.
|
|
10
|
+
- Added `TspEditorProps.typeahead` support so programs that cannot yet read input can preserve typed text, display it at the caret, and submit it when input becomes available.
|
|
11
|
+
|
|
5
12
|
## [18.13.3] - 2026-10-28
|
|
6
13
|
|
|
7
14
|
### Changed
|
package/dist/types/tsp.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const TSP_DEFAULT_CREDITS = 2;
|
|
|
28
28
|
/** One-letter message verb. */
|
|
29
29
|
export type TspVerb = "q" | "o" | "f" | "b" | "x" | "r" | "e";
|
|
30
30
|
/** Every component kind in the v1 vocabulary. */
|
|
31
|
-
export declare const TSP_KINDS: readonly ["col", "row", "card", "section", "rule", "spacer", "text", "md", "code", "diff", "ansi", "math", "image", "media", "kv", "table", "tree", "badge", "kbd", "icon", "spinner", "shimmer", "elapsed", "progress", "rate", "list", "item", "tabs", "editor", "input", "status", "seg", "overlay", "toast", "rows", "picker", "prefs", "tool", "checklist", "agent", "chart", "meter", "effort"];
|
|
31
|
+
export declare const TSP_KINDS: readonly ["col", "row", "card", "section", "rule", "spacer", "text", "md", "code", "diff", "ansi", "math", "image", "media", "kv", "table", "tree", "json", "badge", "kbd", "icon", "spinner", "shimmer", "elapsed", "progress", "rate", "list", "item", "tabs", "editor", "input", "status", "seg", "overlay", "toast", "rows", "picker", "prefs", "tool", "checklist", "agent", "chart", "meter", "effort"];
|
|
32
32
|
export type TspKind = (typeof TSP_KINDS)[number];
|
|
33
33
|
/** Semantic colour of a node's chrome. */
|
|
34
34
|
export type TspTone = "neutral" | "accent" | "info" | "success" | "warning" | "error" | "pending" | "muted" | "user";
|
|
@@ -104,8 +104,10 @@ export interface TspCommonProps {
|
|
|
104
104
|
* right after another tooltip or card), anchored below it (above without
|
|
105
105
|
* room) and clamped to the window. It stays open while the pointer is over
|
|
106
106
|
* the node or the card, closes on leave (short grace), press, key or scroll,
|
|
107
|
-
* and replaces the node's `title` tooltip while open.
|
|
108
|
-
*
|
|
107
|
+
* and replaces the node's `title` tooltip while open. A lone `md` card is a
|
|
108
|
+
* wide read-only preview the pointer passes through (open only over the
|
|
109
|
+
* node). On an `agent` it opens over the row, not the children. Terminals
|
|
110
|
+
* that don't know it ignore it and keep showing `title`.
|
|
109
111
|
*/
|
|
110
112
|
hovercard?: TspPropNode;
|
|
111
113
|
}
|
|
@@ -277,6 +279,20 @@ export interface TspTreeNode {
|
|
|
277
279
|
export interface TspTreeProps {
|
|
278
280
|
nodes: readonly TspTreeNode[];
|
|
279
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* A raw JSON value the terminal draws as an interactive tree: small containers
|
|
284
|
+
* whole on one row, larger ones folded to a preview that expands on click.
|
|
285
|
+
* Folding is local to the terminal and sends no events.
|
|
286
|
+
*/
|
|
287
|
+
export interface TspJsonProps {
|
|
288
|
+
/** Any JSON value; absent reads as null. */
|
|
289
|
+
value: unknown;
|
|
290
|
+
/**
|
|
291
|
+
* Levels of containers expanded below the top-level entries (default 0:
|
|
292
|
+
* the root's entries listed, every container among them folded).
|
|
293
|
+
*/
|
|
294
|
+
open?: number;
|
|
295
|
+
}
|
|
280
296
|
export interface TspBadgeProps {
|
|
281
297
|
text: string;
|
|
282
298
|
}
|
|
@@ -367,6 +383,9 @@ export interface TspEditorProps {
|
|
|
367
383
|
* Independent of text editability or keyboard focus; absent or false is not ready. */
|
|
368
384
|
sendable?: boolean;
|
|
369
385
|
maxLines?: number;
|
|
386
|
+
/** The program cannot read input yet: while the field has the focus, the terminal keeps
|
|
387
|
+
* what is typed into it, draws it at the caret, and sends it once this clears. */
|
|
388
|
+
typeahead?: boolean;
|
|
370
389
|
}
|
|
371
390
|
export type TspInputProps = Omit<TspEditorProps, "maxLines">;
|
|
372
391
|
export interface TspStatusProps {
|
|
@@ -899,6 +918,7 @@ export interface TspPropsByKind {
|
|
|
899
918
|
kv: TspKvProps;
|
|
900
919
|
table: TspTableProps;
|
|
901
920
|
tree: TspTreeProps;
|
|
921
|
+
json: TspJsonProps;
|
|
902
922
|
badge: TspBadgeProps;
|
|
903
923
|
kbd: TspKbdProps;
|
|
904
924
|
icon: TspIconProps;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-wire",
|
|
4
|
-
"version": "18.
|
|
4
|
+
"version": "18.14.1",
|
|
5
5
|
"description": "Shared wire protocol types for omp packages",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": {
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"README.md",
|
|
44
44
|
"CHANGELOG.md",
|
|
45
45
|
"LICENSE",
|
|
46
|
-
"THIRD-PARTY-NOTICES.txt",
|
|
47
46
|
"dist/types"
|
|
48
47
|
],
|
|
49
48
|
"exports": {
|
package/src/tsp.ts
CHANGED
|
@@ -53,6 +53,7 @@ export const TSP_KINDS = [
|
|
|
53
53
|
"kv",
|
|
54
54
|
"table",
|
|
55
55
|
"tree",
|
|
56
|
+
"json",
|
|
56
57
|
"badge",
|
|
57
58
|
"kbd",
|
|
58
59
|
"icon",
|
|
@@ -154,8 +155,10 @@ export interface TspCommonProps {
|
|
|
154
155
|
* right after another tooltip or card), anchored below it (above without
|
|
155
156
|
* room) and clamped to the window. It stays open while the pointer is over
|
|
156
157
|
* the node or the card, closes on leave (short grace), press, key or scroll,
|
|
157
|
-
* and replaces the node's `title` tooltip while open.
|
|
158
|
-
*
|
|
158
|
+
* and replaces the node's `title` tooltip while open. A lone `md` card is a
|
|
159
|
+
* wide read-only preview the pointer passes through (open only over the
|
|
160
|
+
* node). On an `agent` it opens over the row, not the children. Terminals
|
|
161
|
+
* that don't know it ignore it and keep showing `title`.
|
|
159
162
|
*/
|
|
160
163
|
hovercard?: TspPropNode;
|
|
161
164
|
}
|
|
@@ -313,6 +316,20 @@ export interface TspTreeNode {
|
|
|
313
316
|
export interface TspTreeProps {
|
|
314
317
|
nodes: readonly TspTreeNode[];
|
|
315
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* A raw JSON value the terminal draws as an interactive tree: small containers
|
|
321
|
+
* whole on one row, larger ones folded to a preview that expands on click.
|
|
322
|
+
* Folding is local to the terminal and sends no events.
|
|
323
|
+
*/
|
|
324
|
+
export interface TspJsonProps {
|
|
325
|
+
/** Any JSON value; absent reads as null. */
|
|
326
|
+
value: unknown;
|
|
327
|
+
/**
|
|
328
|
+
* Levels of containers expanded below the top-level entries (default 0:
|
|
329
|
+
* the root's entries listed, every container among them folded).
|
|
330
|
+
*/
|
|
331
|
+
open?: number;
|
|
332
|
+
}
|
|
316
333
|
export interface TspBadgeProps {
|
|
317
334
|
text: string;
|
|
318
335
|
}
|
|
@@ -394,6 +411,9 @@ export interface TspEditorProps {
|
|
|
394
411
|
* Independent of text editability or keyboard focus; absent or false is not ready. */
|
|
395
412
|
sendable?: boolean;
|
|
396
413
|
maxLines?: number;
|
|
414
|
+
/** The program cannot read input yet: while the field has the focus, the terminal keeps
|
|
415
|
+
* what is typed into it, draws it at the caret, and sends it once this clears. */
|
|
416
|
+
typeahead?: boolean;
|
|
397
417
|
}
|
|
398
418
|
export type TspInputProps = Omit<TspEditorProps, "maxLines">;
|
|
399
419
|
export interface TspStatusProps {
|
|
@@ -863,6 +883,7 @@ export interface TspPropsByKind {
|
|
|
863
883
|
kv: TspKvProps;
|
|
864
884
|
table: TspTableProps;
|
|
865
885
|
tree: TspTreeProps;
|
|
886
|
+
json: TspJsonProps;
|
|
866
887
|
badge: TspBadgeProps;
|
|
867
888
|
kbd: TspKbdProps;
|
|
868
889
|
icon: TspIconProps;
|