@shenora/react 0.3.0 → 0.4.0
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/bridge.d.ts +4 -1
- package/dist/bridge.js +4 -1
- package/dist/windowCommands.d.ts +7 -3
- package/dist/windowCommands.js +7 -3
- package/package.json +1 -1
package/dist/bridge.d.ts
CHANGED
|
@@ -111,7 +111,10 @@ export declare class ShenoraBridge {
|
|
|
111
111
|
* otherwise is. Nothing is queued and no timer is set, so there is nothing to leak and no deadline.
|
|
112
112
|
*
|
|
113
113
|
* No transport (a plain browser tab) is a silent no-op, matching the fire-and-forget contract —
|
|
114
|
-
* unlike `invoke`, there is no caller waiting to be told.
|
|
114
|
+
* unlike `invoke`, there is no caller waiting to be told. **A DISPOSED bridge is the same silent
|
|
115
|
+
* no-op**, and that one can surprise: `invoke` on a disposed bridge rejects with `NO_TRANSPORT`
|
|
116
|
+
* while `post` just returns the id, so a stale reference kept across a `configureBridge` swap looks
|
|
117
|
+
* like it is still sending. `isAvailable` is the check.
|
|
115
118
|
*/
|
|
116
119
|
post<TPayload = unknown>(module: string, type: string, options?: PostOptions<TPayload>): string;
|
|
117
120
|
/**
|
package/dist/bridge.js
CHANGED
|
@@ -139,7 +139,10 @@ export class ShenoraBridge {
|
|
|
139
139
|
* otherwise is. Nothing is queued and no timer is set, so there is nothing to leak and no deadline.
|
|
140
140
|
*
|
|
141
141
|
* No transport (a plain browser tab) is a silent no-op, matching the fire-and-forget contract —
|
|
142
|
-
* unlike `invoke`, there is no caller waiting to be told.
|
|
142
|
+
* unlike `invoke`, there is no caller waiting to be told. **A DISPOSED bridge is the same silent
|
|
143
|
+
* no-op**, and that one can surprise: `invoke` on a disposed bridge rejects with `NO_TRANSPORT`
|
|
144
|
+
* while `post` just returns the id, so a stale reference kept across a `configureBridge` swap looks
|
|
145
|
+
* like it is still sending. `isAvailable` is the check.
|
|
143
146
|
*/
|
|
144
147
|
post(module, type, options = {}) {
|
|
145
148
|
const request = {
|
package/dist/windowCommands.d.ts
CHANGED
|
@@ -72,9 +72,13 @@ export declare class WindowCommands extends BaseModuleService<WindowRequests> {
|
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* The max/restore-glyph resync pattern from the source app: the authoritative maximize state,
|
|
75
|
-
* re-queried
|
|
76
|
-
*
|
|
77
|
-
*
|
|
75
|
+
* re-queried when a resize SETTLES (a maximize/restore always resizes the window, and the DOM has no
|
|
76
|
+
* other signal for the manual work-area maximize). Failures (plain browser, no host) leave it false.
|
|
77
|
+
*
|
|
78
|
+
* Read once immediately, then on the TRAILING edge of a 100 ms debounce — not once per `resize`
|
|
79
|
+
* event, which a window drag fires ~180 times in three seconds. Coalescing is the correct semantics
|
|
80
|
+
* here, not just the cheap one: maximize/restore is a single step, so only the end state matters. Do
|
|
81
|
+
* not build on intermediate values during a drag; there are none.
|
|
78
82
|
*/
|
|
79
83
|
export declare function useWindowMaximized(commands?: WindowCommands): boolean;
|
|
80
84
|
export {};
|
package/dist/windowCommands.js
CHANGED
|
@@ -60,9 +60,13 @@ export class WindowCommands extends BaseModuleService {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* The max/restore-glyph resync pattern from the source app: the authoritative maximize state,
|
|
63
|
-
* re-queried
|
|
64
|
-
*
|
|
65
|
-
*
|
|
63
|
+
* re-queried when a resize SETTLES (a maximize/restore always resizes the window, and the DOM has no
|
|
64
|
+
* other signal for the manual work-area maximize). Failures (plain browser, no host) leave it false.
|
|
65
|
+
*
|
|
66
|
+
* Read once immediately, then on the TRAILING edge of a 100 ms debounce — not once per `resize`
|
|
67
|
+
* event, which a window drag fires ~180 times in three seconds. Coalescing is the correct semantics
|
|
68
|
+
* here, not just the cheap one: maximize/restore is a single step, so only the end state matters. Do
|
|
69
|
+
* not build on intermediate values during a drag; there are none.
|
|
66
70
|
*/
|
|
67
71
|
export function useWindowMaximized(commands) {
|
|
68
72
|
const [maximized, setMaximized] = useState(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shenora/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "React client for Shenora desktop hosts: correlated invoke/send/subscribe over the WebView2 bridge, typed module services, hooks, and a browser fallback for pure-UI development.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jiarong Gu",
|