gpui-bridge-react 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/src/components.d.ts +21 -0
- package/dist/src/host-config.js +3 -1
- package/package.json +3 -3
package/dist/src/components.d.ts
CHANGED
|
@@ -22,6 +22,25 @@ export interface DivProps extends SharedProps {
|
|
|
22
22
|
tooltip?: string;
|
|
23
23
|
/** Files dropped on the div. */
|
|
24
24
|
onDrop?: (paths: string[]) => void;
|
|
25
|
+
/** With the `absolute` class: the user moves it inside its parent; `dragEnd` gives where it was left (PROTOCOL.md section 8). */
|
|
26
|
+
drag?: boolean;
|
|
27
|
+
/** Snaps a `drag` div to its parent's edges and its `drag` siblings within this many px (`true` = 8). */
|
|
28
|
+
magnetic?: boolean | number;
|
|
29
|
+
/** The user can carry the div to a `dropTarget`, which gets this string in `dropNode`. */
|
|
30
|
+
dragData?: string;
|
|
31
|
+
/** Takes divs with `dragData`; its `drag-over:` classes apply while one is carried over it. */
|
|
32
|
+
dropTarget?: boolean;
|
|
33
|
+
/** Where the user left a `drag` div. */
|
|
34
|
+
onDragEnd?: (point: {
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
}) => void;
|
|
38
|
+
/** A `dragData` div left on this `dropTarget`. */
|
|
39
|
+
onDropNode?: (drop: {
|
|
40
|
+
data: string;
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
}) => void;
|
|
25
44
|
/** Makes the div focusable; called with keys such as `escape` or `ctrl-enter`. */
|
|
26
45
|
onKeyDown?: (key: string) => void;
|
|
27
46
|
children?: ReactNode;
|
|
@@ -206,6 +225,8 @@ export interface WindowProps {
|
|
|
206
225
|
minHeight?: number;
|
|
207
226
|
/** Minimizes (`true`) or restores (`false`) on the next commit. */
|
|
208
227
|
minimized?: boolean;
|
|
228
|
+
/** Hides (`false`, no taskbar button) or shows and focuses (`true`); Windows only. */
|
|
229
|
+
visible?: boolean;
|
|
209
230
|
/** No system title bar; only read when the window opens. */
|
|
210
231
|
frameless?: boolean;
|
|
211
232
|
/** Classes of the window's root div (default `size-full`). */
|
package/dist/src/host-config.js
CHANGED
|
@@ -31,7 +31,7 @@ function updateTray(instance, prevProps, nextProps) {
|
|
|
31
31
|
}
|
|
32
32
|
/** `Window` and `Tray` are not nodes of their parent. */
|
|
33
33
|
const detached = (instance) => Boolean(instance.window || instance.tray);
|
|
34
|
-
const WINDOW_OPTIONS = ["title", "width", "height", "x", "y", "minWidth", "minHeight", "minimized", "frameless"];
|
|
34
|
+
const WINDOW_OPTIONS = ["title", "width", "height", "x", "y", "minWidth", "minHeight", "minimized", "visible", "frameless"];
|
|
35
35
|
/** React handler prop per window event (PROTOCOL.md section 3). */
|
|
36
36
|
const WINDOW_EVENT_PROPS = {
|
|
37
37
|
onFocus: "focus",
|
|
@@ -114,6 +114,8 @@ const EVENT_PROPS = {
|
|
|
114
114
|
onMenu: "menu",
|
|
115
115
|
onKeyDown: "keyDown",
|
|
116
116
|
onDrop: "drop",
|
|
117
|
+
onDragEnd: "dragEnd",
|
|
118
|
+
onDropNode: "dropNode",
|
|
117
119
|
onOk: "ok",
|
|
118
120
|
onCancel: "cancel",
|
|
119
121
|
onClose: "close",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gpui-bridge-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "React renderer for gpui-bridge native UIs",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "gpui-bridge contributors",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"node": ">=22.6"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"gpui-bridge": "^0.
|
|
32
|
+
"gpui-bridge": "^0.4.1",
|
|
33
33
|
"react": "^19.3.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"react-reconciler": "0.34.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"gpui-bridge": "0.
|
|
39
|
+
"gpui-bridge": "0.4.1",
|
|
40
40
|
"@types/node": "^26.6.5",
|
|
41
41
|
"@types/react": "19.3.0",
|
|
42
42
|
"@types/react-reconciler": "^0.34.0",
|