pi-extension-utils 0.3.2 → 0.3.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.
@@ -1,3 +1,4 @@
1
+ import type { ExtensionContext } from "@earendil-works/pi-coding-agent";
1
2
  export declare const PROTOCOL_VERSION = 1;
2
3
  export declare const EVENT_PREFIX = "pi-extension-utils";
3
4
  export declare const HELLO_EVENT = "pi-extension-utils:hello";
@@ -15,12 +16,7 @@ export declare const EVENTS: {
15
16
  readonly fullscreenRelease: "pi-extension-utils:fullscreen-release";
16
17
  };
17
18
  export type WidgetPlacement = "aboveEditor" | "belowEditor";
18
- export interface WidgetComponent {
19
- render(width: number): string[];
20
- invalidate(): void;
21
- dispose?(): void;
22
- }
23
- export type WidgetFactory = (tui: unknown, theme: unknown) => WidgetComponent;
19
+ export type WidgetFactory = NonNullable<Parameters<ExtensionContext["ui"]["setWidget"]>[1]>;
24
20
  export interface ProtocolPayload {
25
21
  protocolVersion: number;
26
22
  clientId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-extension-utils",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Shared Pi extension utilities for coordinated widgets, fullscreen leases, and logging.",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",