@supersoniks/concorde 3.0.8 → 3.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "3.0.8",
3
+ "version": "3.0.10",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "",
@@ -274,11 +274,14 @@ const Fetcher = <
274
274
  (entries) => this.onIntersection(entries),
275
275
  options
276
276
  );
277
- let elt = (
278
- this.shadowRoot ? this.shadowRoot.children[0] : this.children[0]
279
- ) as HTMLElement;
277
+ const root = this.shadowRoot ? this.shadowRoot : this;
278
+ let elt = [...root.children].filter(
279
+ (e) => e.nodeName.toLowerCase() != "style"
280
+ )[0] as HTMLElement;
280
281
  if (elt?.nodeName.toLocaleLowerCase() == "slot")
281
- elt = elt.children[0] as HTMLElement;
282
+ elt = [...elt.children].filter(
283
+ (e) => e.nodeName.toLowerCase() != "style"
284
+ )[0] as HTMLElement;
282
285
  if (!elt || elt.nodeName.toLocaleLowerCase() == "template") {
283
286
  elt = document.createElement("span");
284
287
  const style = elt.style;
@@ -31,6 +31,10 @@ if (typeof __BUILD_DATE__ === "undefined") {
31
31
  (window as any).__BUILD_DATE__ = "No build date";
32
32
  }
33
33
 
34
+ if (typeof __SONIC_PREFIX__ === "undefined") {
35
+ (window as any).__SONIC_PREFIX__ = "sonic";
36
+ }
37
+
34
38
  const localStorageDataKey =
35
39
  __SONIC_PREFIX__ == "sonic"
36
40
  ? "publisher-proxies-data"