remote-components 0.0.40 → 0.0.41

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.
@@ -1453,7 +1453,7 @@ function RemoteComponent({
1453
1453
  });
1454
1454
  childrenRef.current = [];
1455
1455
  }
1456
- if (isolate !== false && typeof document !== "undefined" && !shadowRoot) {
1456
+ if (isolate !== false && typeof document !== "undefined" && (!shadowRoot || !shadowRoot.isConnected)) {
1457
1457
  const self = globalThis;
1458
1458
  const shadowRootKey = `__remote_components_shadowroot_${keySuffix}`;
1459
1459
  let shadowRootElement = null;
@@ -1483,7 +1483,7 @@ function RemoteComponent({
1483
1483
  );
1484
1484
  if (resetStyles.length > 1) {
1485
1485
  resetStyles.forEach((style, index) => {
1486
- if (index > 0) {
1486
+ if (index > 0 && style.getAttribute("data-remote-components-reset") !== "react") {
1487
1487
  style.remove();
1488
1488
  }
1489
1489
  });
@@ -1841,7 +1841,7 @@ function RemoteComponent({
1841
1841
  route: data?.route || DEFAULT_ROUTE,
1842
1842
  runtime: prevIsRemoteComponentRef.current ? RUNTIME_SCRIPT : data?.runtime || RUNTIME_WEBPACK
1843
1843
  }) });
1844
- const resetStyle = reset ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { "data-remote-components-reset": "", children: `:host { all: initial; }` }) : null;
1844
+ const resetStyle = reset ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { "data-remote-components-reset": "react", children: `:host { all: initial; }` }) : null;
1845
1845
  const linksToRender = data?.links?.map((link) => /* @__PURE__ */ (0, import_react2.createElement)(
1846
1846
  "link",
1847
1847
  {