@webspatial/react-sdk 0.1.6 → 0.1.8

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.
@@ -865,7 +865,8 @@ function renderJSXPortalInstance(inProps, inheritedPortalStyle, className) {
865
865
  marginTop: "0px",
866
866
  marginBottom: "0px",
867
867
  borderRadius: "0px",
868
- overflow: ""
868
+ overflow: "",
869
+ display: "block"
869
870
  };
870
871
  const style = {
871
872
  ...inStyle,
@@ -1222,9 +1223,10 @@ function PortalInstance(inProps) {
1222
1223
  className
1223
1224
  );
1224
1225
  const needRenderPlaceHolder = isSubPortal && inheritedPortalStyle.position !== "absolute" && inheritedPortalStyle.position !== "fixed";
1226
+ const El = props.El;
1225
1227
  return /* @__PURE__ */ jsxs(SpatialWindowManagerContext.Provider, { value: spatialWindowManager, children: [
1226
1228
  needRenderPlaceHolder && /* @__PURE__ */ jsx2(
1227
- "span",
1229
+ El,
1228
1230
  {
1229
1231
  className,
1230
1232
  "data-subportal-spatialid": spatialId,
@@ -1656,6 +1658,15 @@ function useSpatialStyle() {
1656
1658
  observer.disconnect();
1657
1659
  };
1658
1660
  }, []);
1661
+ useEffect6(() => {
1662
+ const headObserver = new MutationObserver((mutations) => {
1663
+ checkSpatialStyleUpdate();
1664
+ });
1665
+ headObserver.observe(document.head, { childList: true, subtree: true });
1666
+ return () => {
1667
+ headObserver.disconnect();
1668
+ };
1669
+ }, []);
1659
1670
  useEffect6(() => {
1660
1671
  if (!ref.current) {
1661
1672
  return;