Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/interact-outside

Package Overview
Dependencies
Maintainers
1
Versions
822
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/interact-outside - npm Package Compare versions

Comparing version 0.80.0 to 0.81.0

18

dist/index.js
'use strict';
var domEvent = require('@zag-js/dom-event');
var domQuery = require('@zag-js/dom-query');

@@ -138,3 +137,3 @@ var utils = require('@zag-js/utils');

}
domEvent.fireCustomEvent(node, POINTER_OUTSIDE_EVENT, {
fireCustomEvent(node, POINTER_OUTSIDE_EVENT, {
bubbles: false,

@@ -144,3 +143,3 @@ cancelable: true,

originalEvent: event,
contextmenu: domEvent.isContextMenuEvent(event),
contextmenu: domQuery.isContextMenuEvent(event),
focusable: isComposedPathFocusable(composedPath)

@@ -153,3 +152,3 @@ }

pointerdownCleanups.forEach((fn) => fn());
pointerdownCleanups.add(domEvent.addDomEvent(doc, "click", handler, { once: true }));
pointerdownCleanups.add(domQuery.addDomEvent(doc, "click", handler, { once: true }));
pointerdownCleanups.add(parentWin.addEventListener("click", handler, { once: true }));

@@ -163,3 +162,3 @@ pointerdownCleanups.add(frames.addEventListener("click", handler, { once: true }));

const timer = setTimeout(() => {
cleanups.add(domEvent.addDomEvent(doc, "pointerdown", onPointerDown, true));
cleanups.add(domQuery.addDomEvent(doc, "pointerdown", onPointerDown, true));
cleanups.add(parentWin.addEventListener("pointerdown", onPointerDown, true));

@@ -176,3 +175,3 @@ cleanups.add(frames.addEventListener("pointerdown", onPointerDown, true));

}
domEvent.fireCustomEvent(node, FOCUS_OUTSIDE_EVENT, {
fireCustomEvent(node, FOCUS_OUTSIDE_EVENT, {
bubbles: false,

@@ -188,3 +187,3 @@ cancelable: true,

}
cleanups.add(domEvent.addDomEvent(doc, "focusin", onFocusin, true));
cleanups.add(domQuery.addDomEvent(doc, "focusin", onFocusin, true));
cleanups.add(parentWin.addEventListener("focusin", onFocusin, true));

@@ -212,3 +211,8 @@ cleanups.add(frames.addEventListener("focusin", onFocusin, true));

}
function fireCustomEvent(el, type, init) {
const win = el.ownerDocument.defaultView || window;
const event = new win.CustomEvent(type, init);
return el.dispatchEvent(event);
}
exports.trackInteractOutside = trackInteractOutside;
{
"name": "@zag-js/interact-outside",
"version": "0.80.0",
"version": "0.81.0",
"description": "Track interactions or focus outside an element",

@@ -19,5 +19,4 @@ "keywords": [

"dependencies": {
"@zag-js/dom-query": "0.80.0",
"@zag-js/dom-event": "0.80.0",
"@zag-js/utils": "0.80.0"
"@zag-js/dom-query": "0.81.0",
"@zag-js/utils": "0.81.0"
},

@@ -24,0 +23,0 @@ "devDependencies": {

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