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

@zag-js/element-rect

Package Overview
Dependencies
Maintainers
1
Versions
720
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/element-rect - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

7

dist/index.d.ts

@@ -8,3 +8,3 @@ type Rect = {

type TrackScope = "size" | "position" | "rect";
type ElementRectOptions = {
export type ElementRectOptions = {
onChange: (rect: Rect) => void;

@@ -14,4 +14,3 @@ scope?: TrackScope;

};
declare function trackElementRect(el: HTMLElement, options: ElementRectOptions): () => void;
export { ElementRectOptions, trackElementRect };
export declare function trackElementRect(el: HTMLElement, options: ElementRectOptions): () => void;
export {};

@@ -1,29 +0,8 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
'use strict';
// src/index.ts
var src_exports = {};
__export(src_exports, {
trackElementRect: () => trackElementRect
});
module.exports = __toCommonJS(src_exports);
var rafId;
var observedElements = /* @__PURE__ */ new Map();
var getRectFn = (el) => el.getBoundingClientRect();
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
let rafId;
const observedElements = /* @__PURE__ */ new Map();
const getRectFn = (el) => el.getBoundingClientRect();
function trackElementRect(el, options) {

@@ -79,5 +58,5 @@ const { scope = "rect", getRect = getRectFn, onChange } = options;

}
var isEqualSize = (a, b) => a.width === b.width && a.height === b.height;
var isEqualPosition = (a, b) => a.top === b.top && a.left === b.left;
var isEqualRect = (a, b) => isEqualSize(a, b) && isEqualPosition(a, b);
const isEqualSize = (a, b) => a.width === b.width && a.height === b.height;
const isEqualPosition = (a, b) => a.top === b.top && a.left === b.left;
const isEqualRect = (a, b) => isEqualSize(a, b) && isEqualPosition(a, b);
function getEqualityFn(scope) {

@@ -90,5 +69,3 @@ if (scope === "size")

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
trackElementRect
});
exports.trackElementRect = trackElementRect;
{
"name": "@zag-js/element-rect",
"version": "0.10.2",
"version": "0.10.3",
"description": "observe element's rect over time",

@@ -41,11 +41,6 @@ "keywords": [

"scripts": {
"build-fast": "tsup src",
"start": "pnpm build --watch",
"build": "tsup src --dts",
"test": "jest --config ../../../jest.config.js --rootDir . --passWithNoTests",
"build": "vite build -c ../../../vite.config.ts",
"lint": "eslint src --ext .ts,.tsx",
"test-ci": "pnpm test --ci --runInBand",
"test-watch": "pnpm test --watch -u",
"typecheck": "tsc --noEmit"
}
}

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