gpui-bridge 0.3.0 → 0.4.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/dist/app.d.ts CHANGED
@@ -39,6 +39,8 @@ export interface WindowOptions {
39
39
  frameless?: boolean;
40
40
  /** Minimizes (`true`) or restores (`false`) on the next commit. An action, not a remembered state. */
41
41
  minimized?: boolean;
42
+ /** Hides (`false`, no taskbar button or Alt+Tab) or shows and focuses (`true`) on the next commit, keeping the window's state. An action; Windows only. */
43
+ visible?: boolean;
42
44
  /** Window events to receive; `AppWindow.on` sets this for you. Replaces the previous list. */
43
45
  events?: WindowEventName[];
44
46
  }
@@ -47,6 +47,8 @@ export type ClientMessage = {
47
47
  frameless?: boolean;
48
48
  /** Minimizes (`true`) or restores (`false`) on commit; an action, not a remembered state. */
49
49
  minimized?: boolean;
50
+ /** Hides (`false`, no taskbar button) or shows and focuses (`true`) on commit; Windows only. */
51
+ visible?: boolean;
50
52
  /** Window events the client wants; replaces the previous list. */
51
53
  events?: WindowEventName[];
52
54
  } | {
@@ -136,7 +138,7 @@ export type HostMessage = {
136
138
  type: "event";
137
139
  id: NodeId;
138
140
  event: string;
139
- value?: string | number | null | string[] | TableSort | DiffSelection | CanvasPoint | SettingsChange | QuestionnaireAnswer | QuestionnaireAnswer[];
141
+ value?: string | number | null | string[] | TableSort | DiffSelection | CanvasPoint | DragPoint | NodeDrop | SettingsChange | QuestionnaireAnswer | QuestionnaireAnswer[];
140
142
  checked?: boolean;
141
143
  paths?: string[];
142
144
  } | {
@@ -245,6 +247,25 @@ export interface DivProps {
245
247
  contextMenu?: MenuItem[];
246
248
  /** Shown when the pointer rests on the div. */
247
249
  tooltip?: string;
250
+ /** With the `absolute` class: the user moves it inside its parent; `dragEnd` gives where it was left (PROTOCOL.md section 8). */
251
+ drag?: boolean;
252
+ /** Snaps a `drag` div to its parent's edges and its `drag` siblings within this many px (`true` = 8). */
253
+ magnetic?: boolean | number;
254
+ /** The user can carry the div to a `dropTarget`, which gets this string in `dropNode`. */
255
+ dragData?: string;
256
+ /** Takes divs with `dragData`; its `drag-over:` classes apply while one is carried over it. */
257
+ dropTarget?: boolean;
258
+ }
259
+ /** Where the user left a `drag` div: whole px inside its parent's border (`left-`/`top-`). */
260
+ export interface DragPoint {
261
+ x: number;
262
+ y: number;
263
+ }
264
+ /** A `dragData` div left on a `dropTarget`: its data and where its copy's corner was left, inside the zone. */
265
+ export interface NodeDrop {
266
+ data: string;
267
+ x: number;
268
+ y: number;
248
269
  }
249
270
  export interface TextProps {
250
271
  content?: string;
@@ -1278,6 +1299,12 @@ export interface NodeEvents {
1278
1299
  drop: {
1279
1300
  paths: string[];
1280
1301
  };
1302
+ dragEnd: {
1303
+ value: DragPoint;
1304
+ };
1305
+ dropNode: {
1306
+ value: NodeDrop;
1307
+ };
1281
1308
  };
1282
1309
  text: {};
1283
1310
  Button: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpui-bridge",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Node.js client for the gpui-bridge native UI host",
5
5
  "license": "MIT",
6
6
  "author": "gpui-bridge contributors",
@@ -29,9 +29,9 @@
29
29
  "node": ">=22.6"
30
30
  },
31
31
  "optionalDependencies": {
32
- "@indios/gpui-bridge-darwin-arm64": "0.3.0",
33
- "@indios/gpui-bridge-linux-x64": "0.3.0",
34
- "@indios/gpui-bridge-win32-x64": "0.3.0"
32
+ "@indios/gpui-bridge-darwin-arm64": "0.4.1",
33
+ "@indios/gpui-bridge-linux-x64": "0.4.1",
34
+ "@indios/gpui-bridge-win32-x64": "0.4.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^26.6.5",