@oh-my-pi/pi-wire 18.10.1 → 18.10.3

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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.10.2] - 2026-10-12
6
+
7
+ ### Added
8
+
9
+ - Added `TspPickerMark.icon`: an icon a picker mark draws instead of its initials when the terminal has it (`provider:<id>` names a model provider's logo)
10
+
5
11
  ## [18.8.8] - 2026-10-10
6
12
 
7
13
  ### Added
@@ -79,9 +79,9 @@ uutils coreutils (https://github.com/uutils/coreutils), MIT
79
79
  --------------------------------------------------------------------------------
80
80
  Covers: base32, base64, basename, cat, cksum (shared checksum machinery),
81
81
  b2sum, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, comm, cp,
82
- cut, date, dirname, head, hostname, ln, ls, mkdir, mktemp, mv, nproc, paste,
83
- printenv, readlink, realpath, rm, seq, sort, stat, tac, tail, tee, touch, tr,
84
- truncate, uname, uniq, wc, whoami, yes.
82
+ cut, date, dirname, head, hostname, ln, ls, mkdir, mktemp, mv, nl, nproc,
83
+ paste, printenv, readlink, realpath, rm, seq, sort, stat, tac, tail, tee,
84
+ touch, tr, truncate, uname, uniq, wc, whoami, yes.
85
85
 
86
86
  Copyright (c) uutils developers
87
87
 
@@ -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" | "t" | "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", "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", "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";
@@ -114,7 +114,7 @@ export interface TspColProps {
114
114
  }
115
115
  export interface TspRowProps {
116
116
  gap?: TspSpace;
117
- align?: "start" | "center" | "baseline" | "end";
117
+ align?: "start" | "center" | "baseline" | "end" | "stretch";
118
118
  justify?: "start" | "between" | "end";
119
119
  wrap?: boolean;
120
120
  }
@@ -214,6 +214,23 @@ export interface TspImageProps {
214
214
  h?: TspExtent;
215
215
  };
216
216
  }
217
+ /**
218
+ * A file the terminal loads by path and shows in its media viewer (pictures, SVG, 3D models,
219
+ * PDF/video/audio, else a card). Programs check `cx.supports("media")` first.
220
+ */
221
+ export interface TspMediaProps {
222
+ /** The file: absolute, or relative to the pane's working directory. */
223
+ path: string;
224
+ /** Git revision to read instead of the disk file: a commit-ish (`HEAD`, a sha) or `:0` for the index. */
225
+ rev?: string;
226
+ /** `media` nodes of one surface sharing this name pan and zoom together (before/after compare). */
227
+ link?: string;
228
+ /** Size cap; the node otherwise fills its container. */
229
+ max?: {
230
+ w?: TspExtent;
231
+ h?: TspExtent;
232
+ };
233
+ }
217
234
  export interface TspKvProps {
218
235
  items: readonly {
219
236
  k: TspText;
@@ -385,10 +402,7 @@ export interface TspPickerItem {
385
402
  detail?: TspText;
386
403
  /** Leading visual: a named icon, a provider/avatar mark, or a status dot. */
387
404
  icon?: string;
388
- mark?: {
389
- text: string;
390
- seed?: string;
391
- };
405
+ mark?: TspPickerMark;
392
406
  dot?: TspTone;
393
407
  /** Label is a machine string (model id, path): mono, dim prefix and strong tail by the `/`. */
394
408
  mono?: boolean;
@@ -419,6 +433,16 @@ export interface TspPickerItem {
419
433
  role?: string;
420
434
  title?: string;
421
435
  }
436
+ /**
437
+ * A picker avatar: the `icon` when the terminal has it (`provider:<id>` names a
438
+ * model provider's logo by its id), else up to two initials of `text` on a
439
+ * gradient picked by `seed` (default `text`).
440
+ */
441
+ export interface TspPickerMark {
442
+ text: string;
443
+ seed?: string;
444
+ icon?: string;
445
+ }
422
446
  /** A right-aligned fact column in a picker. */
423
447
  export interface TspPickerColumn {
424
448
  id: string;
@@ -435,10 +459,7 @@ export interface TspPickerScope {
435
459
  id: string;
436
460
  label: TspText;
437
461
  icon?: string;
438
- mark?: {
439
- text: string;
440
- seed?: string;
441
- };
462
+ mark?: TspPickerMark;
442
463
  count?: number;
443
464
  /** Group heading this scope sits under (consecutive scopes with the same group share a head). */
444
465
  group?: string;
@@ -844,6 +865,7 @@ export interface TspPropsByKind {
844
865
  ansi: TspAnsiProps;
845
866
  math: TspMathProps;
846
867
  image: TspImageProps;
868
+ media: TspMediaProps;
847
869
  kv: TspKvProps;
848
870
  table: TspTableProps;
849
871
  tree: TspTreeProps;
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.10.1",
4
+ "version": "18.10.3",
5
5
  "description": "Shared wire protocol types for omp packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": {
package/src/tsp.ts CHANGED
@@ -49,6 +49,7 @@ export const TSP_KINDS = [
49
49
  "ansi",
50
50
  "math",
51
51
  "image",
52
+ "media",
52
53
  "kv",
53
54
  "table",
54
55
  "tree",
@@ -164,7 +165,7 @@ export interface TspColProps {
164
165
  }
165
166
  export interface TspRowProps {
166
167
  gap?: TspSpace;
167
- align?: "start" | "center" | "baseline" | "end";
168
+ align?: "start" | "center" | "baseline" | "end" | "stretch";
168
169
  justify?: "start" | "between" | "end";
169
170
  wrap?: boolean;
170
171
  }
@@ -258,6 +259,20 @@ export interface TspImageProps {
258
259
  h?: number;
259
260
  max?: { w?: TspExtent; h?: TspExtent };
260
261
  }
262
+ /**
263
+ * A file the terminal loads by path and shows in its media viewer (pictures, SVG, 3D models,
264
+ * PDF/video/audio, else a card). Programs check `cx.supports("media")` first.
265
+ */
266
+ export interface TspMediaProps {
267
+ /** The file: absolute, or relative to the pane's working directory. */
268
+ path: string;
269
+ /** Git revision to read instead of the disk file: a commit-ish (`HEAD`, a sha) or `:0` for the index. */
270
+ rev?: string;
271
+ /** `media` nodes of one surface sharing this name pan and zoom together (before/after compare). */
272
+ link?: string;
273
+ /** Size cap; the node otherwise fills its container. */
274
+ max?: { w?: TspExtent; h?: TspExtent };
275
+ }
261
276
  export interface TspKvProps {
262
277
  items: readonly { k: TspText; v: TspText }[];
263
278
  layout?: "grid" | "inline";
@@ -414,7 +429,7 @@ export interface TspPickerItem {
414
429
  detail?: TspText;
415
430
  /** Leading visual: a named icon, a provider/avatar mark, or a status dot. */
416
431
  icon?: string;
417
- mark?: { text: string; seed?: string };
432
+ mark?: TspPickerMark;
418
433
  dot?: TspTone;
419
434
  /** Label is a machine string (model id, path): mono, dim prefix and strong tail by the `/`. */
420
435
  mono?: boolean;
@@ -437,6 +452,17 @@ export interface TspPickerItem {
437
452
  title?: string;
438
453
  }
439
454
 
455
+ /**
456
+ * A picker avatar: the `icon` when the terminal has it (`provider:<id>` names a
457
+ * model provider's logo by its id), else up to two initials of `text` on a
458
+ * gradient picked by `seed` (default `text`).
459
+ */
460
+ export interface TspPickerMark {
461
+ text: string;
462
+ seed?: string;
463
+ icon?: string;
464
+ }
465
+
440
466
  /** A right-aligned fact column in a picker. */
441
467
  export interface TspPickerColumn {
442
468
  id: string;
@@ -454,7 +480,7 @@ export interface TspPickerScope {
454
480
  id: string;
455
481
  label: TspText;
456
482
  icon?: string;
457
- mark?: { text: string; seed?: string };
483
+ mark?: TspPickerMark;
458
484
  count?: number;
459
485
  /** Group heading this scope sits under (consecutive scopes with the same group share a head). */
460
486
  group?: string;
@@ -803,6 +829,7 @@ export interface TspPropsByKind {
803
829
  ansi: TspAnsiProps;
804
830
  math: TspMathProps;
805
831
  image: TspImageProps;
832
+ media: TspMediaProps;
806
833
  kv: TspKvProps;
807
834
  table: TspTableProps;
808
835
  tree: TspTreeProps;