@oh-my-pi/pi-wire 18.4.8 → 18.4.9

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,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.4.9] - 2026-10-01
6
+
7
+ ### Added
8
+
9
+ - Added terminal scrolling support through the TSP scroll operation, allowing keyboard scrolling of the terminal scroller when supported.
10
+ - Added a terminal focus event for requesting keyboard focus on editors and inputs, or returning focus to the preferences sheet.
11
+
5
12
  ## [18.4.6] - 2026-10-01
6
13
 
7
14
  ### Added
@@ -878,7 +878,13 @@ export declare const TSP_REGION_IDS: {
878
878
  readonly dock: "dock";
879
879
  readonly layer: "layer";
880
880
  };
881
- export type TspOp = readonly [op: "add", id: string, parent: string, before: string | null, node: TspNode] | readonly [op: "set", id: string, props: Readonly<Record<string, unknown>>] | readonly [op: "text", id: string, mode: "append" | "replace", text: string] | readonly [op: "splice", id: string, at: number, del: number, text: string] | readonly [op: "move", id: string, parent: string, before: string | null] | readonly [op: "del", id: string] | readonly [op: "settle", id: string] | readonly [op: "focus", id: string | null] | readonly [op: "reveal", id: string, where: "start" | "end" | "nearest"] | readonly [op: "suspend"] | readonly [op: "resume"];
881
+ export type TspOp = readonly [op: "add", id: string, parent: string, before: string | null, node: TspNode] | readonly [op: "set", id: string, props: Readonly<Record<string, unknown>>] | readonly [op: "text", id: string, mode: "append" | "replace", text: string] | readonly [op: "splice", id: string, at: number, del: number, text: string] | readonly [op: "move", id: string, parent: string, before: string | null] | readonly [op: "del", id: string] | readonly [op: "settle", id: string] | readonly [op: "focus", id: string | null] | readonly [op: "reveal", id: string, where: "start" | "end" | "nearest"] | readonly [op: "scroll", id: string, by: TspScrollBy] | readonly [op: "suspend"] | readonly [op: "resume"];
882
+ /**
883
+ * How far a `scroll` op moves the scroller holding a node: a line, a
884
+ * viewport less a line, or to an end (`end` makes a following `ansi` block
885
+ * follow again). Sent only when `hello.features` lists `scroll`.
886
+ */
887
+ export type TspScrollBy = "line-up" | "line-down" | "page-up" | "page-down" | "start" | "end";
882
888
  /** Verb `f`: an atomic batch of ops for one surface. */
883
889
  export interface TspFrame {
884
890
  /** Surface id. */
@@ -1019,6 +1025,16 @@ export type TspEvent = {
1019
1025
  text: string;
1020
1026
  cursor: number;
1021
1027
  len: number;
1028
+ }
1029
+ /**
1030
+ * The user clicked into node `id` (an `editor`/`input` without the focus, or
1031
+ * a `prefs` sheet while the focus is outside it): the program moves its
1032
+ * keyboard focus there, or ignores it (a modal overlay keeps the keys).
1033
+ */
1034
+ | {
1035
+ ev: "focus";
1036
+ sf: string;
1037
+ id: string;
1022
1038
  } | {
1023
1039
  ev: "error";
1024
1040
  sf?: string;
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.8",
4
+ "version": "18.4.9",
5
5
  "description": "Shared wire protocol types for omp packages",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": {
package/src/tsp.ts CHANGED
@@ -847,9 +847,17 @@ export type TspOp =
847
847
  | readonly [op: "settle", id: string]
848
848
  | readonly [op: "focus", id: string | null]
849
849
  | readonly [op: "reveal", id: string, where: "start" | "end" | "nearest"]
850
+ | readonly [op: "scroll", id: string, by: TspScrollBy]
850
851
  | readonly [op: "suspend"]
851
852
  | readonly [op: "resume"];
852
853
 
854
+ /**
855
+ * How far a `scroll` op moves the scroller holding a node: a line, a
856
+ * viewport less a line, or to an end (`end` makes a following `ansi` block
857
+ * follow again). Sent only when `hello.features` lists `scroll`.
858
+ */
859
+ export type TspScrollBy = "line-up" | "line-down" | "page-up" | "page-down" | "start" | "end";
860
+
853
861
  /** Verb `f`: an atomic batch of ops for one surface. */
854
862
  export interface TspFrame {
855
863
  /** Surface id. */
@@ -938,5 +946,11 @@ export type TspEvent =
938
946
  * text length the terminal saw, a mismatch makes the edit stale).
939
947
  */
940
948
  | { ev: "edit"; sf: string; id: string; from: number; to: number; text: string; cursor: number; len: number }
949
+ /**
950
+ * The user clicked into node `id` (an `editor`/`input` without the focus, or
951
+ * a `prefs` sheet while the focus is outside it): the program moves its
952
+ * keyboard focus there, or ignores it (a modal overlay keeps the keys).
953
+ */
954
+ | { ev: "focus"; sf: string; id: string }
941
955
  | { ev: "error"; sf?: string; s?: number; op?: number; msg: string }
942
956
  | { ev: "gone"; sf?: string; ids: readonly string[] };