@webspatial/react-sdk 0.1.17 → 0.1.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.
- package/dist/default/index.js +17 -2
- package/dist/default/index.js.map +1 -1
- package/dist/jsx/jsx-dev-runtime.js +15 -1
- 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 +15 -1
- package/dist/jsx/jsx-runtime.js.map +1 -1
- package/dist/jsx/jsx-runtime.web.js +1 -1
- package/dist/web/index.js +17 -2
- package/dist/web/index.js.map +1 -1
- package/package.json +4 -4
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'] = "0.1.
|
|
5
|
+
window.__webspatialsdk__['react-sdk-version'] = "0.1.19"
|
|
6
6
|
window.__webspatialsdk__['XR_ENV'] = "avp"
|
|
7
7
|
})()
|
|
8
8
|
|
|
@@ -952,6 +952,7 @@ function syncDefaultSpatialStyle(openedWindow, debugName) {
|
|
|
952
952
|
openedWindow.document.body.style.minHeight = "auto";
|
|
953
953
|
openedWindow.document.body.style.maxWidth = "fit-content";
|
|
954
954
|
openedWindow.document.body.style.minWidth = "fit-content";
|
|
955
|
+
openedWindow.document.body.style.background = "transparent";
|
|
955
956
|
}
|
|
956
957
|
function useSyncSpatialProps(spatialWindowManager, props, domRect, anchor, cornerRadiusFromStyle, opacity, stylePosition, isSubPortal) {
|
|
957
958
|
let { allowScroll, scrollWithParent, style, spatialStyle = {} } = props;
|
|
@@ -3761,6 +3762,19 @@ function hijackGetComputedStyle() {
|
|
|
3761
3762
|
function hijackWindowOpen() {
|
|
3762
3763
|
XRApp.getInstance().init();
|
|
3763
3764
|
}
|
|
3765
|
+
function monitorHTMLAttributeChange() {
|
|
3766
|
+
const observer = new MutationObserver((mutations) => {
|
|
3767
|
+
mutations.forEach((mutation) => {
|
|
3768
|
+
if (mutation.type === "attributes" && mutation.attributeName) {
|
|
3769
|
+
checkCSSProperties();
|
|
3770
|
+
}
|
|
3771
|
+
});
|
|
3772
|
+
});
|
|
3773
|
+
observer.observe(document.documentElement, {
|
|
3774
|
+
attributes: true,
|
|
3775
|
+
attributeFilter: ["style", "class"]
|
|
3776
|
+
});
|
|
3777
|
+
}
|
|
3764
3778
|
function spatialPolyfill() {
|
|
3765
3779
|
if (!isWebSpatialEnv) {
|
|
3766
3780
|
return;
|
|
@@ -3771,10 +3785,11 @@ function spatialPolyfill() {
|
|
|
3771
3785
|
hijackGetComputedStyle();
|
|
3772
3786
|
hijackDocumentElementStyle();
|
|
3773
3787
|
monitorExternalStyleChange();
|
|
3788
|
+
monitorHTMLAttributeChange();
|
|
3774
3789
|
}
|
|
3775
3790
|
|
|
3776
3791
|
// src/index.ts
|
|
3777
|
-
var version = "0.1.
|
|
3792
|
+
var version = "0.1.19";
|
|
3778
3793
|
export {
|
|
3779
3794
|
CSSSpatialDiv,
|
|
3780
3795
|
CSSSpatialPrimitive,
|