@webspatial/react-sdk 0.1.17 → 0.1.18
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 +16 -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 +16 -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.18"
|
|
6
6
|
window.__webspatialsdk__['XR_ENV'] = "avp"
|
|
7
7
|
})()
|
|
8
8
|
|
|
@@ -3761,6 +3761,19 @@ function hijackGetComputedStyle() {
|
|
|
3761
3761
|
function hijackWindowOpen() {
|
|
3762
3762
|
XRApp.getInstance().init();
|
|
3763
3763
|
}
|
|
3764
|
+
function monitorHTMLAttributeChange() {
|
|
3765
|
+
const observer = new MutationObserver((mutations) => {
|
|
3766
|
+
mutations.forEach((mutation) => {
|
|
3767
|
+
if (mutation.type === "attributes" && mutation.attributeName) {
|
|
3768
|
+
checkCSSProperties();
|
|
3769
|
+
}
|
|
3770
|
+
});
|
|
3771
|
+
});
|
|
3772
|
+
observer.observe(document.documentElement, {
|
|
3773
|
+
attributes: true,
|
|
3774
|
+
attributeFilter: ["style", "class"]
|
|
3775
|
+
});
|
|
3776
|
+
}
|
|
3764
3777
|
function spatialPolyfill() {
|
|
3765
3778
|
if (!isWebSpatialEnv) {
|
|
3766
3779
|
return;
|
|
@@ -3771,10 +3784,11 @@ function spatialPolyfill() {
|
|
|
3771
3784
|
hijackGetComputedStyle();
|
|
3772
3785
|
hijackDocumentElementStyle();
|
|
3773
3786
|
monitorExternalStyleChange();
|
|
3787
|
+
monitorHTMLAttributeChange();
|
|
3774
3788
|
}
|
|
3775
3789
|
|
|
3776
3790
|
// src/index.ts
|
|
3777
|
-
var version = "0.1.
|
|
3791
|
+
var version = "0.1.18";
|
|
3778
3792
|
export {
|
|
3779
3793
|
CSSSpatialDiv,
|
|
3780
3794
|
CSSSpatialPrimitive,
|