Socket
Socket
Sign inDemoInstall

@zag-js/dom-utils

Package Overview
Dependencies
Maintainers
1
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.0-dev-20220626173054 to 0.0.0-dev-20220626175355

1

dist/event.d.ts

@@ -6,5 +6,4 @@ /// <reference types="react" />

export declare function getNativeEvent<E>(e: E): NativeEvent<E>;
export declare function queueBeforeEvent(el: Element, type: string, fn: VoidFunction): number;
export declare function isPortalEvent(event: Pick<Event, "currentTarget" | "target">): boolean;
export declare function isSelfTarget(event: Pick<Event, "target" | "currentTarget">): boolean;
export {};

23

dist/index.js

@@ -275,2 +275,13 @@ "use strict";

}
function queueBeforeEvent(el, type, fn) {
const cleanup = raf(() => {
el.removeEventListener(type, invoke, true);
fn();
});
const invoke = () => {
cleanup();
fn();
};
el.addEventListener(type, invoke, { once: true, capture: true });
}

@@ -462,14 +473,2 @@ // src/body-pointer-event.ts

}
function queueBeforeEvent(el, type, fn) {
const raf2 = requestAnimationFrame(() => {
el.removeEventListener(type, invoke, true);
fn();
});
const invoke = () => {
cancelAnimationFrame(raf2);
fn();
};
el.addEventListener(type, invoke, { once: true, capture: true });
return raf2;
}
function isPortalEvent(event) {

@@ -476,0 +475,0 @@ return !contains(event.currentTarget, event.target);

export declare function nextTick(fn: VoidFunction): () => void;
export declare function raf(fn: VoidFunction): () => void;
export declare function queueMicrotask(fn: VoidFunction): void;
export declare function queueBeforeEvent(el: Element, type: string, fn: VoidFunction): void;
{
"name": "@zag-js/dom-utils",
"version": "0.0.0-dev-20220626173054",
"version": "0.0.0-dev-20220626175355",
"description": "",

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

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