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

@zag-js/auto-resize

Package Overview
Dependencies
Maintainers
1
Versions
740
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/auto-resize - npm Package Compare versions

Comparing version 0.0.0-dev-20230202113057 to 0.0.0-dev-20230222120620

27

dist/index.js

@@ -26,26 +26,7 @@ "use strict";

module.exports = __toCommonJS(src_exports);
// ../dom/src/query.ts
function isDocument(el) {
return el.nodeType === Node.DOCUMENT_NODE;
}
function isWindow(value) {
return value?.toString() === "[object Window]";
}
function getDocument(el) {
if (isWindow(el))
return el.document;
if (isDocument(el))
return el;
return el?.ownerDocument ?? document;
}
function getWindow(el) {
return el?.ownerDocument.defaultView ?? window;
}
// src/index.ts
var import_dom_query = require("@zag-js/dom-query");
function copyVisualStyles(fromEl, toEl) {
if (!fromEl)
return;
const win = getWindow(fromEl);
const win = (0, import_dom_query.getWindow)(fromEl);
const el = win.getComputedStyle(fromEl);

@@ -65,4 +46,4 @@ const cssText = "box-sizing:" + el.boxSizing + ";border-left:" + el.borderLeftWidth + " solid red;border-right:" + el.borderRightWidth + " solid red;font-family:" + el.fontFamily + ";font-feature-settings:" + el.fontFeatureSettings + ";font-kerning:" + el.fontKerning + ";font-size:" + el.fontSize + ";font-stretch:" + el.fontStretch + ";font-style:" + el.fontStyle + ";font-variant:" + el.fontVariant + ";font-variant-caps:" + el.fontVariantCaps + ";font-variant-ligatures:" + el.fontVariantLigatures + ";font-variant-numeric:" + el.fontVariantNumeric + ";font-weight:" + el.fontWeight + ";letter-spacing:" + el.letterSpacing + ";margin-left:" + el.marginLeft + ";margin-right:" + el.marginRight + ";padding-left:" + el.paddingLeft + ";padding-right:" + el.paddingRight + ";text-indent:" + el.textIndent + ";text-transform:" + el.textTransform;

return;
const doc = getDocument(input);
const win = getWindow(input);
const doc = (0, import_dom_query.getDocument)(input);
const win = (0, import_dom_query.getWindow)(input);
const ghost = createGhostElement(doc);

@@ -69,0 +50,0 @@ copyVisualStyles(input, ghost);

8

package.json
{
"name": "@zag-js/auto-resize",
"version": "0.0.0-dev-20230202113057",
"version": "0.0.0-dev-20230222120620",
"description": "Autoresize utilities for the web",

@@ -24,5 +24,7 @@ "keywords": [

},
"dependencies": {
"@zag-js/dom-query": "0.0.0-dev-20230222120620"
},
"devDependencies": {
"clean-package": "2.2.0",
"@zag-js/dom-utils": "0.0.0-dev-20230202113057"
"clean-package": "2.2.0"
},

@@ -29,0 +31,0 @@ "clean-package": "../../../clean-package.config.json",

Sorry, the diff of this file is not supported yet

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