@zag-js/dom-utils
Advanced tools
Comparing version 0.0.0-dev-20220823145853 to 0.0.0-dev-20220826141934
@@ -37,4 +37,2 @@ import { JSX } from '@zag-js/types'; | ||
declare const isCtrlKey: (v: Pick<KeyboardEvent, "ctrlKey" | "metaKey">) => boolean; | ||
declare function whenMouse<E>(handler: JSX.PointerEventHandler<E>): JSX.PointerEventHandler<E>; | ||
declare function whenTouchOrPen<E>(handler: JSX.PointerEventHandler<E>): JSX.PointerEventHandler<E>; | ||
@@ -294,2 +292,2 @@ declare function fireCustomEvent(el: HTMLElement | null, type: string, init?: CustomEventInit): boolean | undefined; | ||
export { EventKeyMap, MAX_Z_INDEX, Measurable, TypeaheadOptions, TypeaheadState, addDomEvent, addPointerEvent, addPointerlockChangeListener, addPointerlockErrorListener, ariaAttr, contains, copyVisualStyles, dataAttr, defineDomHelpers, disableTextSelection, disposable, disposableNextTick, disposableRaf, extractClientInfo, extractInfo, findByText, findByTypeahead, fireBlurEvent, fireClickEvent, fireCustomEvent, fireKeyboardEvent, focusableSelector, getActiveDescendant, getActiveElement, getComputedStyle, getDocument, getDocumentElement, getElementOffset, getEventKey, getEventName, getEventPoint, getEventStep, getEventTarget, getEventWindow, getFirstFocusable, getFirstTabbable, getFocusables, getLastTabbable, getNativeEvent, getNodeName, getParent, getPlatform, getPointRelativeToNode, getRootNode, getScrollOffset, getScrollParent, getScrollParents, getTabbables, getWindow, indexOfId, isApple, isContextMenuEvent, isCtrlKey, isDisabled, isDocument, isDom, isElementEditable, isFirefox, isFocusable, isFrame, isHTMLElement, isIPhone, isIos, isKeyboardClick, isLeftClick, isMac, isModifiedEvent, isMouseEvent, isPrintableKey, isRightClick, isSafari, isScrollParent, isSelfEvent, isShadowRoot, isTabbable, isTouchDevice, isTouchEvent, isVirtualClick, isVirtualPointerEvent, isVisible, isWindow, isWithinShadowRoot, itemById, matchAttr, nextById, nextTick, observeAttributes, observeChildren, observeElementRect, prevById, query, queryAll, queueBeforeEvent, queueMicrotask, raf, requestPointerLock, restoreTextSelection, setVisuallyHidden, sortByTreeOrder, supportsMouseEvent, supportsPointerEvent, supportsTouchEvent, trackDocumentVisibility, trackPointerDown, trackPointerMove, trackVisualViewport, visuallyHiddenStyle, waitFor, waitForEvent, whenMouse, whenTouchOrPen }; | ||
export { EventKeyMap, MAX_Z_INDEX, Measurable, TypeaheadOptions, TypeaheadState, addDomEvent, addPointerEvent, addPointerlockChangeListener, addPointerlockErrorListener, ariaAttr, contains, copyVisualStyles, dataAttr, defineDomHelpers, disableTextSelection, disposable, disposableNextTick, disposableRaf, extractClientInfo, extractInfo, findByText, findByTypeahead, fireBlurEvent, fireClickEvent, fireCustomEvent, fireKeyboardEvent, focusableSelector, getActiveDescendant, getActiveElement, getComputedStyle, getDocument, getDocumentElement, getElementOffset, getEventKey, getEventName, getEventPoint, getEventStep, getEventTarget, getEventWindow, getFirstFocusable, getFirstTabbable, getFocusables, getLastTabbable, getNativeEvent, getNodeName, getParent, getPlatform, getPointRelativeToNode, getRootNode, getScrollOffset, getScrollParent, getScrollParents, getTabbables, getWindow, indexOfId, isApple, isContextMenuEvent, isCtrlKey, isDisabled, isDocument, isDom, isElementEditable, isFirefox, isFocusable, isFrame, isHTMLElement, isIPhone, isIos, isKeyboardClick, isLeftClick, isMac, isModifiedEvent, isMouseEvent, isPrintableKey, isRightClick, isSafari, isScrollParent, isSelfEvent, isShadowRoot, isTabbable, isTouchDevice, isTouchEvent, isVirtualClick, isVirtualPointerEvent, isVisible, isWindow, isWithinShadowRoot, itemById, matchAttr, nextById, nextTick, observeAttributes, observeChildren, observeElementRect, prevById, query, queryAll, queueBeforeEvent, queueMicrotask, raf, requestPointerLock, restoreTextSelection, setVisuallyHidden, sortByTreeOrder, supportsMouseEvent, supportsPointerEvent, supportsTouchEvent, trackDocumentVisibility, trackPointerDown, trackPointerMove, trackVisualViewport, visuallyHiddenStyle, waitFor, waitForEvent }; |
@@ -132,5 +132,3 @@ "use strict"; | ||
waitFor: () => waitFor, | ||
waitForEvent: () => waitForEvent, | ||
whenMouse: () => whenMouse, | ||
whenTouchOrPen: () => whenTouchOrPen | ||
waitForEvent: () => waitForEvent | ||
}); | ||
@@ -367,8 +365,2 @@ module.exports = __toCommonJS(src_exports); | ||
var isCtrlKey = (v) => isMac() ? v.metaKey && !v.ctrlKey : v.ctrlKey && !v.metaKey; | ||
function whenMouse(handler) { | ||
return (event) => event.pointerType === "mouse" ? handler(event) : void 0; | ||
} | ||
function whenTouchOrPen(handler) { | ||
return (event) => event.pointerType !== "mouse" ? handler(event) : void 0; | ||
} | ||
@@ -1169,5 +1161,3 @@ // src/fire-event.ts | ||
waitFor, | ||
waitForEvent, | ||
whenMouse, | ||
whenTouchOrPen | ||
waitForEvent | ||
}); |
{ | ||
"name": "@zag-js/dom-utils", | ||
"version": "0.0.0-dev-20220823145853", | ||
"version": "0.0.0-dev-20220826141934", | ||
"description": "", | ||
@@ -28,6 +28,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/types": "0.0.0-dev-20220823145853" | ||
"@zag-js/types": "0.0.0-dev-20220826141934" | ||
}, | ||
"devDependencies": { | ||
"@zag-js/utils": "0.0.0-dev-20220823145853" | ||
"@zag-js/utils": "0.0.0-dev-20220826141934" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82767
2396
+ Added@zag-js/types@0.0.0-dev-20220826141934(transitive)
- Removed@zag-js/types@0.0.0-dev-20220823145853(transitive)