@webspatial/react-sdk 0.0.14 → 0.0.15

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.
@@ -661,7 +661,9 @@ function getInheritedStyleProps(computedStyle) {
661
661
  // background also need to be synced
662
662
  "background",
663
663
  // position also need to be synced
664
- "position"
664
+ "position",
665
+ "width",
666
+ "height"
665
667
  ];
666
668
  var props = {};
667
669
  for (var cssName of propNames) {
@@ -849,7 +851,7 @@ function initScene(name, callback) {
849
851
 
850
852
  // src/spatial-react-components/SpatialReactComponent/PortalInstance.tsx
851
853
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
852
- function renderJSXPortalInstance(inProps, elWidth, elHeight, inheritedPortalStyle, className) {
854
+ function renderJSXPortalInstance(inProps, inheritedPortalStyle, className) {
853
855
  const { El, style: inStyle = {}, className: _, ...props } = inProps;
854
856
  const extraStyle = {
855
857
  visibility: "visible",
@@ -864,15 +866,10 @@ function renderJSXPortalInstance(inProps, elWidth, elHeight, inheritedPortalStyl
864
866
  borderRadius: "0px",
865
867
  overflow: ""
866
868
  };
867
- const elWHStyle = {
868
- width: `${elWidth}px`,
869
- height: `${elHeight}px`
870
- };
871
869
  const style = {
872
870
  ...inStyle,
873
871
  ...inheritedPortalStyle,
874
- ...extraStyle,
875
- ...elWHStyle
872
+ ...extraStyle
876
873
  };
877
874
  return /* @__PURE__ */ jsx2(El, { style, className, ...props });
878
875
  }
@@ -949,6 +946,7 @@ function syncDefaultSpatialStyle(openedWindow, debugName) {
949
946
  styleElement.type = "text/css";
950
947
  styleElement.innerHTML = " .xr-spatial-default { --xr-back: 0.001; --xr-background-material: none } ";
951
948
  openedWindow.document.head.appendChild(styleElement);
949
+ openedWindow.document.body.style.display = "inline-block";
952
950
  }
953
951
  function useSyncSpatialProps(spatialWindowManager, props, domRect, anchor, cornerRadiusFromStyle, opacity, stylePosition) {
954
952
  let { allowScroll, scrollWithParent, style, spatialStyle = {} } = props;
@@ -1211,8 +1209,6 @@ function PortalInstance(inProps) {
1211
1209
  );
1212
1210
  const JSXPortalInstance = renderJSXPortalInstance(
1213
1211
  props,
1214
- domRect.width,
1215
- domRect.height,
1216
1212
  inheritedPortalStyle,
1217
1213
  className
1218
1214
  );