remote-components 0.0.39 → 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.
@@ -1424,7 +1424,7 @@ function RemoteComponent({
1424
1424
  });
1425
1425
  childrenRef.current = [];
1426
1426
  }
1427
- if (isolate !== false && typeof document !== "undefined" && !shadowRoot) {
1427
+ if (isolate !== false && typeof document !== "undefined" && (!shadowRoot || !shadowRoot.isConnected)) {
1428
1428
  const self = globalThis;
1429
1429
  const shadowRootKey = `__remote_components_shadowroot_${keySuffix}`;
1430
1430
  let shadowRootElement = null;
@@ -1454,7 +1454,7 @@ function RemoteComponent({
1454
1454
  );
1455
1455
  if (resetStyles.length > 1) {
1456
1456
  resetStyles.forEach((style, index) => {
1457
- if (index > 0) {
1457
+ if (index > 0 && style.getAttribute("data-remote-components-reset") !== "react") {
1458
1458
  style.remove();
1459
1459
  }
1460
1460
  });
@@ -1813,7 +1813,7 @@ function RemoteComponent({
1813
1813
  route: data?.route || DEFAULT_ROUTE,
1814
1814
  runtime: prevIsRemoteComponentRef.current ? RUNTIME_SCRIPT : data?.runtime || RUNTIME_WEBPACK
1815
1815
  }) });
1816
- const resetStyle = reset ? /* @__PURE__ */ jsx2("style", { "data-remote-components-reset": "", children: `:host { all: initial; }` }) : null;
1816
+ const resetStyle = reset ? /* @__PURE__ */ jsx2("style", { "data-remote-components-reset": "react", children: `:host { all: initial; }` }) : null;
1817
1817
  const linksToRender = data?.links?.map((link) => /* @__PURE__ */ createElement2(
1818
1818
  "link",
1819
1819
  {