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

@atomico/hooks

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atomico/hooks - npm Package Compare versions

Comparing version 3.36.0 to 3.36.1

6

package.json
{
"name": "@atomico/hooks",
"description": "Series of utilities in hooks format to extend the operation of Atomico",
"version": "3.36.0",
"version": "3.36.1",
"type": "module",

@@ -20,4 +20,3 @@ "workspaces": [

"atomico": "^1.45.0",
"@lit/reactive-element": "^1.0.2",
"@atomico/design-tokens": "latest"
"@lit/reactive-element": "^1.0.2"
},

@@ -72,3 +71,2 @@ "devDependencies": {

"@atomico/channel": "^0.0.0",
"@atomico/design-tokens": "latest",
"dollars.js": "^0.6.2",

@@ -75,0 +73,0 @@ "element-internals-polyfill": "^0.1.49",

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "@atomico/channel": "^0.0.0"

{
"type": "module",
"devDependencies": {

@@ -3,0 +4,0 @@ "@lit/reactive-element": "^1.0.2"

@@ -49,1 +49,51 @@ /**

}
/***
* @type {HTMLIFrameElement}
*/
let sandbox;
/**
*
* @param {import("atomico").Sheet} style
* @returns
*/
export function getSheet(style) {
if (style instanceof CSSStyleSheet) {
return style;
}
if (style.sheet) {
return style.sheet;
}
if (!sandbox) {
sandbox = document.createElement("iframe");
sandbox.style.display = "none";
document.body.appendChild(sandbox);
}
const { contentDocument } = sandbox;
contentDocument.head.appendChild(style);
const { sheet } = style;
const { cloneNode } = style;
/**
*
* @param {boolean} [deep]
* @returns {HTMLElement}
*/
style.cloneNode = (deep) => {
const copy = cloneNode.call(style);
const { cssRules } = sheet;
for (let i = 0; i < cssRules.length; i++) {
copy.textContent += cssRules[i].cssText;
}
return copy;
};
return sheet;
}
import { useHost, useLayoutEffect } from "atomico";
import { getSheet } from "@atomico/design-tokens";
import { getRules } from "./src/utils.js";
import { getRules, getSheet } from "./src/utils.js";

@@ -5,0 +4,0 @@ let ID = 0;

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "dollars.js": "^0.6.2"

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "@uppercod/form-tools": "^0.0.0"

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "element-internals-polyfill": "^0.1.49"

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "@uppercod/exp-route": "^1.3.0"

{
"type": "module",
"dependencies": {

@@ -3,0 +4,0 @@ "@uppercod/hash": "^1.1.1"

@@ -5,1 +5,7 @@ /**

export function getRules(Sheet: any, scopeSelector: any): any;
/**
*
* @param {import("atomico").Sheet} style
* @returns
*/
export function getSheet(style: import("atomico").Sheet): CSSStyleSheet | null;
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