@zag-js/interact-outside
Advanced tools
Comparing version 0.0.0-dev-20220707125149 to 0.0.0-dev-20220708193601
@@ -42,2 +42,5 @@ "use strict"; | ||
var isMac = () => pt(/^Mac/) && !isTouchDevice; | ||
function isDocument(el) { | ||
return el.nodeType === Node.DOCUMENT_NODE; | ||
} | ||
function isWindow(value) { | ||
@@ -50,2 +53,4 @@ return (value == null ? void 0 : value.toString()) === "[object Window]"; | ||
return el.document; | ||
if (isDocument(el)) | ||
return el; | ||
return (_a = el == null ? void 0 : el.ownerDocument) != null ? _a : document; | ||
@@ -52,0 +57,0 @@ } |
{ | ||
"name": "@zag-js/interact-outside", | ||
"version": "0.0.0-dev-20220707125149", | ||
"version": "0.0.0-dev-20220708193601", | ||
"description": "Track interations or focus outside an element", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/dom-utils": "0.0.0-dev-20220707125149" | ||
"@zag-js/dom-utils": "0.0.0-dev-20220708193601" | ||
}, | ||
@@ -34,0 +34,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
13777
348
+ Added@zag-js/dom-utils@0.0.0-dev-20220708193601(transitive)
+ Added@zag-js/types@0.0.0-dev-20220708193601(transitive)
- Removed@zag-js/dom-utils@0.0.0-dev-20220707125149(transitive)
- Removed@zag-js/types@0.0.0-dev-20220707125149(transitive)