@mythetech/hermes-react 0.0.0-stage → 1.5.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/LICENSE +21 -0
- package/README.md +26 -2
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/useInvoke.js +65 -0
- package/dist/cjs/useInvoke.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/useInvoke.js +62 -0
- package/dist/esm/useInvoke.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/useInvoke.d.ts +12 -0
- package/package.json +44 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mythetech
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mythetech/hermes-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A React hook for calling the .NET handlers of a [Hermes](https://github.com/Mythetech/Hermes) desktop app, built on [`@mythetech/hermes-bridge`](https://www.npmjs.com/package/@mythetech/hermes-bridge).
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @mythetech/hermes-react @mythetech/hermes-bridge
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { useInvoke } from '@mythetech/hermes-react';
|
|
11
|
+
|
|
12
|
+
export function Greeting() {
|
|
13
|
+
const { data, loading, error, invoke } = useInvoke<string>('greet', { immediate: false });
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<button disabled={loading} onClick={() => invoke('Ada').catch(() => {})}>
|
|
17
|
+
{error ? error.message : (data ?? 'Say hello')}
|
|
18
|
+
</button>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`useInvoke` calls the handler once with no arguments when the component mounts; pass `{ immediate: false }` for a handler that takes arguments, as here. `invoke(...args)` calls it with arguments, and `refetch()` repeats the last call. Both reject when the handler fails, and `error` holds the latest failure, including the call on mount.
|
|
24
|
+
|
|
25
|
+
## License
|
|
26
|
+
|
|
27
|
+
MIT
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInvoke = void 0;
|
|
4
|
+
var useInvoke_js_1 = require("./useInvoke.js");
|
|
5
|
+
Object.defineProperty(exports, "useInvoke", { enumerable: true, get: function () { return useInvoke_js_1.useInvoke; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAAlC,yGAAA,SAAS,OAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInvoke = useInvoke;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const hermes_bridge_1 = require("@mythetech/hermes-bridge");
|
|
6
|
+
function useInvoke(method, options = {}) {
|
|
7
|
+
const immediate = options.immediate ?? true;
|
|
8
|
+
const [data, setData] = (0, react_1.useState)(null);
|
|
9
|
+
const [loading, setLoading] = (0, react_1.useState)(immediate);
|
|
10
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
11
|
+
const mountedRef = (0, react_1.useRef)(true);
|
|
12
|
+
const lastArgsRef = (0, react_1.useRef)([]);
|
|
13
|
+
const invoke = (0, react_1.useCallback)(async (...args) => {
|
|
14
|
+
lastArgsRef.current = args;
|
|
15
|
+
setLoading(true);
|
|
16
|
+
setError(null);
|
|
17
|
+
try {
|
|
18
|
+
const result = await hermes_bridge_1.bridge.invoke(method, ...args);
|
|
19
|
+
if (mountedRef.current) {
|
|
20
|
+
setData(result);
|
|
21
|
+
setLoading(false);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
const wrapped = err instanceof Error ? err : new Error(String(err));
|
|
27
|
+
if (mountedRef.current) {
|
|
28
|
+
setError(wrapped);
|
|
29
|
+
setLoading(false);
|
|
30
|
+
}
|
|
31
|
+
throw wrapped;
|
|
32
|
+
}
|
|
33
|
+
}, [method]);
|
|
34
|
+
const refetch = (0, react_1.useCallback)(() => {
|
|
35
|
+
return invoke(...lastArgsRef.current);
|
|
36
|
+
}, [invoke]);
|
|
37
|
+
(0, react_1.useEffect)(() => {
|
|
38
|
+
mountedRef.current = true;
|
|
39
|
+
let cancelled = false;
|
|
40
|
+
if (!immediate) {
|
|
41
|
+
return () => {
|
|
42
|
+
mountedRef.current = false;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
hermes_bridge_1.bridge.invoke(method)
|
|
46
|
+
.then(result => {
|
|
47
|
+
if (!cancelled) {
|
|
48
|
+
setData(result);
|
|
49
|
+
setLoading(false);
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
.catch(err => {
|
|
53
|
+
if (!cancelled) {
|
|
54
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
55
|
+
setLoading(false);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
return () => {
|
|
59
|
+
cancelled = true;
|
|
60
|
+
mountedRef.current = false;
|
|
61
|
+
};
|
|
62
|
+
}, [method, immediate]);
|
|
63
|
+
return { data, loading, error, invoke, refetch };
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=useInvoke.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInvoke.js","sourceRoot":"","sources":["../../src/useInvoke.ts"],"names":[],"mappings":";;AAgBA,8BAgEC;AAhFD,iCAAiE;AACjE,4DAAkD;AAelD,SAAgB,SAAS,CAAoB,MAAc,EAAE,UAA4B,EAAE;IACzF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;IAC5C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,EAAiB,IAAI,CAAC,CAAC;IACvD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IAClD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAe,IAAI,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,IAAI,CAAC,CAAC;IAChC,MAAM,WAAW,GAAG,IAAA,cAAM,EAAY,EAAE,CA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AK,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC;QAED,sBAAM,CAAC,MAAM,CAAU,MAAM,CAAC;aAC3B,IAAI,CAAC,MAAM,CAAC,EAAE;YACb,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,CAAC,MAAM,CAAC,CAAC;gBAChB,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC9D,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAExB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
|
+
import { bridge } from '@mythetech/hermes-bridge';
|
|
3
|
+
export function useInvoke(method, options = {}) {
|
|
4
|
+
const immediate = options.immediate ?? true;
|
|
5
|
+
const [data, setData] = useState(null);
|
|
6
|
+
const [loading, setLoading] = useState(immediate);
|
|
7
|
+
const [error, setError] = useState(null);
|
|
8
|
+
const mountedRef = useRef(true);
|
|
9
|
+
const lastArgsRef = useRef([]);
|
|
10
|
+
const invoke = useCallback(async (...args) => {
|
|
11
|
+
lastArgsRef.current = args;
|
|
12
|
+
setLoading(true);
|
|
13
|
+
setError(null);
|
|
14
|
+
try {
|
|
15
|
+
const result = await bridge.invoke(method, ...args);
|
|
16
|
+
if (mountedRef.current) {
|
|
17
|
+
setData(result);
|
|
18
|
+
setLoading(false);
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
const wrapped = err instanceof Error ? err : new Error(String(err));
|
|
24
|
+
if (mountedRef.current) {
|
|
25
|
+
setError(wrapped);
|
|
26
|
+
setLoading(false);
|
|
27
|
+
}
|
|
28
|
+
throw wrapped;
|
|
29
|
+
}
|
|
30
|
+
}, [method]);
|
|
31
|
+
const refetch = useCallback(() => {
|
|
32
|
+
return invoke(...lastArgsRef.current);
|
|
33
|
+
}, [invoke]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
mountedRef.current = true;
|
|
36
|
+
let cancelled = false;
|
|
37
|
+
if (!immediate) {
|
|
38
|
+
return () => {
|
|
39
|
+
mountedRef.current = false;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
bridge.invoke(method)
|
|
43
|
+
.then(result => {
|
|
44
|
+
if (!cancelled) {
|
|
45
|
+
setData(result);
|
|
46
|
+
setLoading(false);
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
.catch(err => {
|
|
50
|
+
if (!cancelled) {
|
|
51
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
52
|
+
setLoading(false);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return () => {
|
|
56
|
+
cancelled = true;
|
|
57
|
+
mountedRef.current = false;
|
|
58
|
+
};
|
|
59
|
+
}, [method, immediate]);
|
|
60
|
+
return { data, loading, error, invoke, refetch };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=useIn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O,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;YACjB,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;QAC7B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;IAExB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UseInvokeResult<TResult> {
|
|
2
|
+
data: TResult | null;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
invoke: (...args: unknown[]) => Promise<TResult>;
|
|
6
|
+
refetch: () => Promise<TResult>;
|
|
7
|
+
}
|
|
8
|
+
export interface UseInvokeOptions {
|
|
9
|
+
/** Calls the method with no arguments on mount. Defaults to true; set false for methods that take arguments. */
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function useInvoke<TResult = unknown>(method: string, options?: UseInvokeOptions): UseInvokeResult<TResult>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mythetech/hermes-react",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "React hooks for Hermes desktop framework - useInvoke for C# interop",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/cjs/index.js",
|
|
7
|
+
"module": "./dist/esm/index.js",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js",
|
|
13
|
+
"types": "./dist/types/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@mythetech/hermes-bridge": "^1.5.0",
|
|
25
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/react": "^18.0.0",
|
|
29
|
+
"react": "^18.0.0",
|
|
30
|
+
"typescript": "^5.7.0"
|
|
31
|
+
},
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/Mythetech/Hermes.git",
|
|
36
|
+
"directory": "packages/hermes-react"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"hermes",
|
|
40
|
+
"desktop",
|
|
41
|
+
"react",
|
|
42
|
+
"hooks",
|
|
43
|
+
"interop",
|
|
44
|
+
"bridge"
|
|
45
|
+
]
|
|
46
|
+
}
|