@webspatial/react-sdk 1.0.1 → 1.0.2
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/default/index.d.ts +1 -1
- package/dist/default/index.js +9 -4
- package/dist/default/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js +2 -2
- package/dist/jsx/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.web.js +1 -1
- package/dist/jsx/jsx-runtime.js +2 -2
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.web.js +1 -1
- package/dist/web/index.d.ts +1 -1
- package/dist/web/index.js +9 -4
- package/dist/web/index.js.map +1 -1
- package/package.json +2 -2
package/dist/default/index.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare const defaultSceneConfig: WindowContainerOptions;
|
|
|
175
175
|
declare class XRApp {
|
|
176
176
|
private static instance;
|
|
177
177
|
static getInstance(): XRApp;
|
|
178
|
-
handleATag(event: MouseEvent):
|
|
178
|
+
handleATag(event: MouseEvent): true | undefined;
|
|
179
179
|
init(): void;
|
|
180
180
|
deinit(): void;
|
|
181
181
|
private configMap;
|
package/dist/default/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(function(){
|
|
3
3
|
if(typeof window === 'undefined') return;
|
|
4
4
|
if(!window.__webspatialsdk__) window.__webspatialsdk__ = {}
|
|
5
|
-
window.__webspatialsdk__['react-sdk-version'] = "1.0.
|
|
5
|
+
window.__webspatialsdk__['react-sdk-version'] = "1.0.2"
|
|
6
6
|
window.__webspatialsdk__['XR_ENV'] = "avp"
|
|
7
7
|
})()
|
|
8
8
|
|
|
@@ -760,6 +760,7 @@ var XRApp = class _XRApp {
|
|
|
760
760
|
if (target && target !== "_self") {
|
|
761
761
|
event.preventDefault();
|
|
762
762
|
window.open(url, target);
|
|
763
|
+
return true;
|
|
763
764
|
}
|
|
764
765
|
}
|
|
765
766
|
}
|
|
@@ -884,7 +885,11 @@ function handleOpenWindowDocumentClick(openedWindow) {
|
|
|
884
885
|
let found = false;
|
|
885
886
|
while (!found) {
|
|
886
887
|
if (element && element.tagName == "A") {
|
|
887
|
-
|
|
888
|
+
found = true;
|
|
889
|
+
const isOpenWindow = XRApp.getInstance().handleATag(e);
|
|
890
|
+
if (!isOpenWindow) {
|
|
891
|
+
openedWindow.opener.location.href = element.href;
|
|
892
|
+
}
|
|
888
893
|
return false;
|
|
889
894
|
}
|
|
890
895
|
if (element && element.parentElement) {
|
|
@@ -3605,7 +3610,7 @@ async function injectSceneHook() {
|
|
|
3605
3610
|
let cfg = defaultSceneConfig;
|
|
3606
3611
|
if (typeof window.xrCurrentSceneDefaults === "function") {
|
|
3607
3612
|
try {
|
|
3608
|
-
cfg = await window.xrCurrentSceneDefaults?.();
|
|
3613
|
+
cfg = await window.xrCurrentSceneDefaults?.(defaultSceneConfig);
|
|
3609
3614
|
} catch (error) {
|
|
3610
3615
|
console.error(error);
|
|
3611
3616
|
}
|
|
@@ -3790,7 +3795,7 @@ function spatialPolyfill() {
|
|
|
3790
3795
|
}
|
|
3791
3796
|
|
|
3792
3797
|
// src/index.ts
|
|
3793
|
-
var version = "1.0.
|
|
3798
|
+
var version = "1.0.2";
|
|
3794
3799
|
export {
|
|
3795
3800
|
CSSSpatialDiv,
|
|
3796
3801
|
CSSSpatialPrimitive,
|