@zag-js/interact-outside 0.0.0-dev-20220706194607 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -76,7 +76,8 @@ var isCtrlKey = (v) => isMac() ? v.metaKey && !v.ctrlKey : v.ctrlKey && !v.metaK
76
76
  function fireCustomEvent(el, type, init) {
77
77
  if (!el)
78
78
  return;
79
- const event = new CustomEvent(type, init);
79
+ const win = getWindow(el);
80
+ const event = new win.CustomEvent(type, init);
80
81
  return el.dispatchEvent(event);
81
82
  }
82
83
  var focusableSelector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";
package/dist/index.mjs CHANGED
@@ -50,7 +50,8 @@ var isCtrlKey = (v) => isMac() ? v.metaKey && !v.ctrlKey : v.ctrlKey && !v.metaK
50
50
  function fireCustomEvent(el, type, init) {
51
51
  if (!el)
52
52
  return;
53
- const event = new CustomEvent(type, init);
53
+ const win = getWindow(el);
54
+ const event = new win.CustomEvent(type, init);
54
55
  return el.dispatchEvent(event);
55
56
  }
56
57
  var focusableSelector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/interact-outside",
3
- "version": "0.0.0-dev-20220706194607",
3
+ "version": "0.1.1",
4
4
  "description": "Track interations or focus outside an element",
5
5
  "keywords": [
6
6
  "js",
@@ -28,7 +28,7 @@
28
28
  "test:watch": "yarn test --watchAll"
29
29
  },
30
30
  "dependencies": {
31
- "@zag-js/dom-utils": "0.0.0-dev-20220706194607"
31
+ "@zag-js/dom-utils": "0.1.6"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"