@use-gesture/core
Advanced tools
Comparing version 10.0.0-beta.16 to 10.0.0-beta.17
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-0774537c.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-f5615a56.cjs.dev.js'); | ||
require('../../dist/maths-125ca19a.cjs.dev.js'); | ||
@@ -8,0 +8,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-e957bb67.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-5708a6d1.cjs.prod.js'); | ||
require('../../dist/maths-a42ecce1.cjs.prod.js'); | ||
@@ -8,0 +8,0 @@ |
@@ -1,2 +0,2 @@ | ||
export { C as ConfigResolverMap, E as EngineMap, e as dragAction, h as hoverAction, m as moveAction, p as pinchAction, r as registerAction, s as scrollAction, w as wheelAction } from '../../dist/actions-6cc22183.esm.js'; | ||
export { C as ConfigResolverMap, E as EngineMap, e as dragAction, h as hoverAction, m as moveAction, p as pinchAction, r as registerAction, s as scrollAction, w as wheelAction } from '../../dist/actions-102ec585.esm.js'; | ||
import '../../dist/maths-b2a210f4.esm.js'; |
@@ -9,4 +9,5 @@ export declare const SUPPORT: { | ||
touch: boolean; | ||
touchscreen: boolean; | ||
pointer: boolean; | ||
pointerLock: boolean; | ||
}; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('./actions-0774537c.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-f5615a56.cjs.dev.js'); | ||
require('./maths-125ca19a.cjs.dev.js'); | ||
@@ -8,0 +8,0 @@ |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('./actions-e957bb67.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-5708a6d1.cjs.prod.js'); | ||
require('./maths-a42ecce1.cjs.prod.js'); | ||
@@ -8,0 +8,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, E as EngineMap, c as chain, d as toHandlerProp } from './actions-6cc22183.esm.js'; | ||
import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, E as EngineMap, c as chain, d as toHandlerProp } from './actions-102ec585.esm.js'; | ||
import './maths-b2a210f4.esm.js'; | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "@use-gesture/core", | ||
"version": "10.0.0-beta.16", | ||
"version": "10.0.0-beta.17", | ||
"description": "Core engine for receiving gestures", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -37,3 +37,3 @@ import { DragConfig, InternalDragOptions, Vector2 } from '../types' | ||
if (preventScrollAxis) this.preventScrollAxis = preventScrollAxis | ||
if (!SUPPORT.touch) return false | ||
if (!SUPPORT.touchscreen) return false | ||
if (typeof value === 'number') return value | ||
@@ -40,0 +40,0 @@ return value ? DEFAULT_PREVENT_SCROLL_DELAY : false |
@@ -18,4 +18,6 @@ import { PinchConfig, GenericOptions, InternalPinchOptions, State, Vector2 } from '../types' | ||
if (this.useTouch) return 'touch' | ||
if (SUPPORT.touch && SUPPORT.pointer) return 'pointer' | ||
if (SUPPORT.touch) return 'touch' | ||
if (SUPPORT.touchscreen) { | ||
if (SUPPORT.pointer) return 'pointer' | ||
if (SUPPORT.touch) return 'touch' | ||
} | ||
// device is undefined and that's ok, we're going to use wheel to zoom. | ||
@@ -22,0 +24,0 @@ }, |
@@ -7,2 +7,6 @@ const isBrowser = typeof window !== 'undefined' && window.document && window.document.createElement | ||
function isTouchScreen(): boolean { | ||
return supportsTouchEvents() || (isBrowser && navigator.maxTouchPoints > 1) | ||
} | ||
function supportsPointerEvents(): boolean { | ||
@@ -30,4 +34,5 @@ return isBrowser && 'onpointerdown' in window | ||
touch: supportsTouchEvents(), | ||
touchscreen: isTouchScreen(), | ||
pointer: supportsPointerEvents(), | ||
pointerLock: supportsPointerLock() | ||
} |
280620
8328