@warp-ds/elements-core
Advanced tools
Comparing version 0.0.1-alpha.7 to 0.0.1-alpha.8
{ | ||
"name": "@warp-ds/elements-core", | ||
"type": "module", | ||
"version": "0.0.1-alpha.7", | ||
"version": "0.0.1-alpha.8", | ||
"description": "", | ||
@@ -24,2 +24,3 @@ "main": "./src/element.js", | ||
"@podium/element": "1.0.8", | ||
"construct-style-sheets-polyfill": "3.1.0", | ||
"lit": "2.7.6" | ||
@@ -26,0 +27,0 @@ }, |
import { CSSResult, unsafeCSS } from "lit"; | ||
import { getBrand, getGlobalStyles, isServer } from "./utils.js"; | ||
import "construct-style-sheets-polyfill"; | ||
@@ -4,0 +5,0 @@ /** |
@@ -46,14 +46,2 @@ export const isServer = () => { | ||
// only load polyfill if needed, and only client side. | ||
const supportsAdoptingStyleSheets = | ||
"adoptedStyleSheets" in Document.prototype && | ||
"replace" in CSSStyleSheet.prototype; | ||
if (!supportsAdoptingStyleSheets) { | ||
await import( | ||
// @ts-ignore | ||
"https://assets.finn.no/npm/construct-style-sheets-polyfill/3.1.0/polyfill.js" | ||
); | ||
} | ||
const requests = await Promise.all( | ||
@@ -60,0 +48,0 @@ urls.map((url) => { |
4542
3
119
+ Addedconstruct-style-sheets-polyfill@3.1.0(transitive)