@zag-js/dom-query
Advanced tools
Comparing version 0.0.0-dev-20230528134739 to 0.0.0-dev-20230528183832
type Target = HTMLElement | EventTarget | null | undefined; | ||
declare function contains(parent: Target, child: Target): boolean; | ||
declare const isSelfEvent: (event: Pick<UIEvent, "currentTarget" | "target">) => boolean; | ||
export { contains }; | ||
export { contains, isSelfEvent }; |
@@ -23,3 +23,4 @@ "use strict"; | ||
__export(contains_exports, { | ||
contains: () => contains | ||
contains: () => contains, | ||
isSelfEvent: () => isSelfEvent | ||
}); | ||
@@ -41,5 +42,7 @@ module.exports = __toCommonJS(contains_exports); | ||
} | ||
var isSelfEvent = (event) => contains(event.currentTarget, event.target); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
contains | ||
contains, | ||
isSelfEvent | ||
}); |
export { ariaAttr, dataAttr } from './attrs.js'; | ||
export { contains } from './contains.js'; | ||
export { contains, isSelfEvent } from './contains.js'; | ||
export { createScope } from './create-scope.js'; | ||
@@ -4,0 +4,0 @@ export { getDocument, getWindow } from './env.js'; |
@@ -49,2 +49,3 @@ "use strict"; | ||
isSafari: () => isSafari, | ||
isSelfEvent: () => isSelfEvent, | ||
isTouchDevice: () => isTouchDevice, | ||
@@ -82,2 +83,3 @@ itemById: () => itemById, | ||
} | ||
var isSelfEvent = (event) => contains(event.currentTarget, event.target); | ||
@@ -332,2 +334,3 @@ // src/create-scope.ts | ||
isSafari, | ||
isSelfEvent, | ||
isTouchDevice, | ||
@@ -334,0 +337,0 @@ itemById, |
{ | ||
"name": "@zag-js/dom-query", | ||
"version": "0.0.0-dev-20230528134739", | ||
"version": "0.0.0-dev-20230528183832", | ||
"description": "The dom helper library for zag.js machines", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,1 +10,4 @@ import { isHTMLElement } from "./is-html-element" | ||
} | ||
export const isSelfEvent = (event: Pick<UIEvent, "currentTarget" | "target">) => | ||
contains(event.currentTarget, event.target) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
66016
1957