🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@zag-js/rect-utils

Package Overview
Dependencies
Maintainers
1
Versions
847
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version

to
0.78.0

4

dist/index.d.ts

@@ -93,2 +93,4 @@ interface Point {

declare function getPointAngle(rect: Rect, point: Point, reference?: Point): number;
declare const clampPoint: (position: Point, size: Size, boundaryRect: RectInit) => {

@@ -255,2 +257,2 @@ x: number;

export { AffineTransform, type AlignOptions, type Bounds, type CenterPoint, type DistanceValue, type ElementRectOptions, type HAlign, type Point, type Rect, type RectCenter, type RectCenters, type RectCorner, type RectCorners, type RectEdge, type RectEdges, type RectInit, type RectInset, type RectPoint, type RectPoints, type RectSide, type ScalingOptions, type Size, type SymmetricRectInset, type VAlign, type WindowRectOptions, addPoints, alignRect, clampPoint, clampSize, closest, closestSideToPoint, closestSideToRect, collisions, constrainRect, contains, containsPoint, containsRect, createPoint, createRect, debugPolygon, distance, distanceBtwEdges, distanceFromPoint, distanceFromRect, expand, fromRange, getElementPolygon, getElementRect, getRectCenters, getRectCorners, getRectEdges, getRectFromPoints, getRotationRect, getViewportRect, getWindowRect, inset, intersection, intersects, isPoint, isPointEqual, isPointInPolygon, isRect, isRectEqual, isSizeEqual, isSymmetric, resizeRect, rotate, shift, shrink, subtractPoints, toRad, union };
export { AffineTransform, type AlignOptions, type Bounds, type CenterPoint, type DistanceValue, type ElementRectOptions, type HAlign, type Point, type Rect, type RectCenter, type RectCenters, type RectCorner, type RectCorners, type RectEdge, type RectEdges, type RectInit, type RectInset, type RectPoint, type RectPoints, type RectSide, type ScalingOptions, type Size, type SymmetricRectInset, type VAlign, type WindowRectOptions, addPoints, alignRect, clampPoint, clampSize, closest, closestSideToPoint, closestSideToRect, collisions, constrainRect, contains, containsPoint, containsRect, createPoint, createRect, debugPolygon, distance, distanceBtwEdges, distanceFromPoint, distanceFromRect, expand, fromRange, getElementPolygon, getElementRect, getPointAngle, getRectCenters, getRectCorners, getRectEdges, getRectFromPoints, getRotationRect, getViewportRect, getWindowRect, inset, intersection, intersects, isPoint, isPointEqual, isPointInPolygon, isRect, isRectEqual, isSizeEqual, isSymmetric, resizeRect, rotate, shift, shrink, subtractPoints, toRad, union };

@@ -191,2 +191,10 @@ 'use strict';

// src/angle.ts
function getPointAngle(rect, point, reference = rect.center) {
const x = point.x - reference.x;
const y = point.y - reference.y;
const deg = Math.atan2(x, y) * (180 / Math.PI) + 180;
return 360 - deg;
}
// src/clamp.ts

@@ -740,2 +748,3 @@ var clamp = (value, min3, max2) => Math.min(Math.max(value, min3), max2);

exports.getElementRect = getElementRect;
exports.getPointAngle = getPointAngle;
exports.getRectCenters = getRectCenters;

@@ -742,0 +751,0 @@ exports.getRectCorners = getRectCorners;

{
"name": "@zag-js/rect-utils",
"version": "0.77.1",
"version": "0.78.0",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet