New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@warp-ds/elements-core

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@warp-ds/elements-core - npm Package Compare versions

Comparing version 0.0.1-alpha.12 to 0.0.1

2

package.json
{
"name": "@warp-ds/elements-core",
"type": "module",
"version": "0.0.1-alpha.12",
"version": "0.0.1",
"description": "",

@@ -6,0 +6,0 @@ "main": "./src/element.js",

import { CSSResult, unsafeCSS } from "lit";
import {getBrand, getGlobalStyles, getGlobalStylesSync, isServer} from "./utils.js";
import {
getBrand,
getGlobalStyles,
getGlobalStylesSync,
isServer,
} from "./utils.js";
import "construct-style-sheets-polyfill";

@@ -36,3 +41,8 @@

// @ts-ignore
const isWebkit = /WebKit/.test(UA) && !/Chrome/.test(UA) && !/Edg/.test(UA) && !window.MSStream;
const isWebkit =
/WebKit/.test(UA) &&
!/Chrome/.test(UA) &&
!/Edg/.test(UA) &&
// @ts-expect-error
!window.MSStream;
if (isWebkit) {

@@ -42,5 +52,6 @@ // We do this because Safari does not always throw when this happens.

// Safari in certain cases stopping JS execution.
throw new Error("DoesNotSupportTopLevelAwait")
throw new Error("DoesNotSupportTopLevelAwait");
}
// block on fetching styles. This will throw in older browsers that don't support top level await
// Block on fetching styles. This will throw in older browsers that don't support top level await.
// They will fall back to a sync XMLHttpRequest.
const sheets = await getGlobalStyles(brand);

@@ -47,0 +58,0 @@ styles.replaceSync(sheets.css);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc