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
817
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.0.0-dev-20220704151659 to 0.0.0-dev-20220704163406

38

dist/index.js

@@ -28,2 +28,16 @@ "use strict";

// ../dom/dist/index.mjs
var runIfFn = (v, ...a) => {
const res = typeof v === "function" ? v(...a) : v;
return res != null ? res : void 0;
};
var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
var isDom = () => typeof window !== "undefined";
function getPlatform() {
var _a;
const agent = navigator.userAgentData;
return (_a = agent == null ? void 0 : agent.platform) != null ? _a : navigator.platform;
}
var pt = (v) => isDom() && v.test(getPlatform());
var isTouchDevice = () => isDom() && !!navigator.maxTouchPoints;
var isMac = () => pt(/^Mac/) && !isTouchDevice;
function isWindow(value) {

@@ -59,2 +73,6 @@ return (value == null ? void 0 : value.toString()) === "[object Window]";

}
var isContextMenuEvent = (e) => {
return e.button === 2 || isCtrlKey(e) && e.button === 0;
};
var isCtrlKey = (v) => isMac() ? v.metaKey && !v.ctrlKey : v.ctrlKey && !v.metaKey;
function fireCustomEvent(el, type, init) {

@@ -72,7 +90,2 @@ if (!el)

}
var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
var runIfFn = (v, ...a) => {
const res = typeof v === "function" ? v(...a) : v;
return res != null ? res : void 0;
};
var isRef = (v) => hasProp(v, "current");

@@ -87,17 +100,2 @@ function addDomEvent(target, eventName, handler, options) {

// ../core/dist/index.mjs
var isDom = () => typeof window !== "undefined";
function getPlatform() {
var _a;
const agent = navigator.userAgentData;
return (_a = agent == null ? void 0 : agent.platform) != null ? _a : navigator.platform;
}
var pt = (v) => isDom() && v.test(getPlatform());
var isTouchDevice = () => isDom() && !!navigator.maxTouchPoints;
var isMac = () => pt(/^Mac/) && !isTouchDevice;
var isContextMenuEvent = (e) => {
return e.button === 2 || isCtrlKey(e) && e.button === 0;
};
var isCtrlKey = (v) => isMac() ? v.metaKey && !v.ctrlKey : v.ctrlKey && !v.metaKey;
// src/index.ts

@@ -104,0 +102,0 @@ var POINTER_OUTSIDE_EVENT = "pointerdown.outside";

{
"name": "@zag-js/interact-outside",
"version": "0.0.0-dev-20220704151659",
"version": "0.0.0-dev-20220704163406",
"description": "Track interations or focus outside an element",

@@ -31,3 +31,3 @@ "keywords": [

"dependencies": {
"@zag-js/dom-utils": "0.0.0-dev-20220704151659"
"@zag-js/dom-utils": "0.0.0-dev-20220704163406"
},

@@ -34,0 +34,0 @@ "publishConfig": {

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