@astrale-os/shell-react 0.4.0-beta.18 → 0.4.0-beta.19
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.
|
@@ -71,14 +71,14 @@ export function useExternalOpen() {
|
|
|
71
71
|
const send = useSendIntent();
|
|
72
72
|
return useMemo(() => {
|
|
73
73
|
const open = ((request) => {
|
|
74
|
-
if (capabilities.navigation.external
|
|
74
|
+
if (!capabilities.navigation.external?.origins.length)
|
|
75
75
|
return unsupported('browser.openExternal');
|
|
76
76
|
portable(request);
|
|
77
77
|
return send('browser.openExternal', request);
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(open, 'supported', {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
value: capabilities.navigation.external
|
|
81
|
+
value: Boolean(capabilities.navigation.external?.origins.length),
|
|
82
82
|
});
|
|
83
83
|
return open;
|
|
84
84
|
}, [capabilities, send]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/shell-react",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.19",
|
|
4
4
|
"description": "Astrale shell-react — the React face of the shell (provider, hooks, view components)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"zod": "4.4.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
34
|
+
"@astrale-os/sdk": "0.5.0-beta.143",
|
|
35
35
|
"@testing-library/dom": "^10.4.0",
|
|
36
36
|
"@testing-library/react": "^16.3.0",
|
|
37
37
|
"@types/node": "^26.2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"vitest": "4.1.10"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@astrale-os/sdk": ">=0.5.0-beta.
|
|
49
|
+
"@astrale-os/sdk": ">=0.5.0-beta.143 <1.0.0",
|
|
50
50
|
"react": ">=18",
|
|
51
51
|
"react-dom": ">=18"
|
|
52
52
|
},
|
package/src/host/actions.hook.ts
CHANGED
|
@@ -110,13 +110,14 @@ export function useExternalOpen(): ExternalOpenApi {
|
|
|
110
110
|
const send = useSendIntent()
|
|
111
111
|
return useMemo(() => {
|
|
112
112
|
const open = ((request: ExternalOpenRequest) => {
|
|
113
|
-
if (capabilities.navigation.external
|
|
113
|
+
if (!capabilities.navigation.external?.origins.length)
|
|
114
|
+
return unsupported('browser.openExternal')
|
|
114
115
|
portable(request)
|
|
115
116
|
return send('browser.openExternal', request)
|
|
116
117
|
}) as ExternalOpenApi
|
|
117
118
|
Object.defineProperty(open, 'supported', {
|
|
118
119
|
enumerable: true,
|
|
119
|
-
value: capabilities.navigation.external
|
|
120
|
+
value: Boolean(capabilities.navigation.external?.origins.length),
|
|
120
121
|
})
|
|
121
122
|
return open
|
|
122
123
|
}, [capabilities, send])
|