Socket
Socket
Sign inDemoInstall

@zag-js/popper

Package Overview
Dependencies
Maintainers
1
Versions
883
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/popper - npm Package Compare versions

Comparing version 0.0.0-dev-20240611102459 to 0.0.0-dev-20240611130830

30

dist/index.js

@@ -54,4 +54,3 @@ "use strict";

function getDOMRect(anchorRect) {
if (!anchorRect)
return createDOMRect();
if (!anchorRect) return createDOMRect();
const { x, y, width, height } = anchorRect;

@@ -118,9 +117,7 @@ return createDOMRect(x, y, width, height);

var shiftArrowMiddleware = (arrowEl) => {
if (!arrowEl)
return;
if (!arrowEl) return;
return {
name: "shiftArrow",
fn({ placement, middlewareData }) {
if (!middlewareData.arrow)
return {};
if (!middlewareData.arrow) return {};
const { x, y } = middlewareData.arrow;

@@ -172,4 +169,3 @@ const dir = placement.split("-")[0];

function getArrowMiddleware(arrowElement, opts) {
if (!arrowElement)
return;
if (!arrowElement) return;
return (0, import_dom.arrow)({

@@ -181,4 +177,3 @@ element: arrowElement,

function getOffsetMiddleware(arrowElement, opts) {
if ((0, import_utils.isNull)(opts.offset ?? opts.gutter))
return;
if ((0, import_utils.isNull)(opts.offset ?? opts.gutter)) return;
return (0, import_dom.offset)(({ placement }) => {

@@ -199,4 +194,3 @@ const arrowOffset = (arrowElement?.clientHeight || 0) / 2;

function getFlipMiddleware(opts) {
if (!opts.flip)
return;
if (!opts.flip) return;
return (0, import_dom.flip)({

@@ -209,4 +203,3 @@ boundary: getBoundaryMiddleware(opts),

function getShiftMiddleware(opts) {
if (!opts.slide && !opts.overlap)
return;
if (!opts.slide && !opts.overlap) return;
return (0, import_dom.shift)({

@@ -235,4 +228,3 @@ boundary: getBoundaryMiddleware(opts),

function getAutoUpdateOptions(opts) {
if (!opts)
return {};
if (!opts) return {};
if (opts === true) {

@@ -245,4 +237,3 @@ return { ancestorResize: true, ancestorScroll: true, elementResize: true, layoutShift: true };

const reference = getAnchorElement(referenceOrVirtual, opts.getAnchorRect);
if (!floating || !reference)
return;
if (!floating || !reference) return;
const options = Object.assign({}, defaultOptions, opts);

@@ -262,4 +253,3 @@ const arrowEl = floating.querySelector("[data-part=arrow]");

const updatePosition = async () => {
if (!reference || !floating)
return;
if (!reference || !floating) return;
const pos = await (0, import_dom.computePosition)(reference, floating, {

@@ -266,0 +256,0 @@ placement,

{
"name": "@zag-js/popper",
"version": "0.0.0-dev-20240611102459",
"version": "0.0.0-dev-20240611130830",
"description": "Dynamic positioning logic for ui machines",

@@ -27,4 +27,4 @@ "keywords": [

"@floating-ui/dom": "1.6.5",
"@zag-js/dom-query": "0.0.0-dev-20240611102459",
"@zag-js/utils": "0.0.0-dev-20240611102459"
"@zag-js/dom-query": "0.0.0-dev-20240611130830",
"@zag-js/utils": "0.0.0-dev-20240611130830"
},

@@ -31,0 +31,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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