@use-gesture/core
Advanced tools
Comparing version 10.0.0-beta.23 to 10.0.0-beta.24
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-59bdceda.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-f582b91b.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-bfd876c0.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-8d913748.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-0efe52f5.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-508fa692.esm.js'; | ||
import '../../dist/maths-b2a210f4.esm.js'; |
@@ -5,2 +5,3 @@ import { Vector2, State, GenericOptions } from '../types'; | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -7,0 +8,0 @@ rubberband(value?: number | boolean | Vector2): Vector2; |
@@ -6,2 +6,3 @@ import { InternalCoordinatesOptions, CoordinatesConfig, DragBounds, State, Vector2 } from '../types'; | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -8,0 +9,0 @@ rubberband(value?: number | boolean | Vector2): Vector2; |
@@ -33,2 +33,3 @@ import { DragConfig, InternalDragOptions, Vector2 } from '../types'; | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -35,0 +36,0 @@ rubberband(value?: number | boolean | Vector2): Vector2; |
@@ -6,2 +6,3 @@ export declare const hoverConfigResolver: { | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -8,0 +9,0 @@ rubberband(value?: number | boolean | import("../types").Vector2): import("../types").Vector2; |
@@ -6,2 +6,3 @@ export declare const moveConfigResolver: { | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -8,0 +9,0 @@ rubberband(value?: number | boolean | import("../types").Vector2): import("../types").Vector2; |
@@ -14,2 +14,3 @@ import { PinchConfig, GenericOptions, InternalPinchOptions, State, Vector2 } from '../types'; | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -16,0 +17,0 @@ rubberband(value?: number | boolean | Vector2): Vector2; |
@@ -5,2 +5,3 @@ export declare const scrollConfigResolver: { | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -7,0 +8,0 @@ rubberband(value?: number | boolean | import("../types").Vector2): import("../types").Vector2; |
@@ -5,2 +5,3 @@ export declare const wheelConfigResolver: { | ||
enabled(value?: boolean): boolean; | ||
preventDefault(value?: boolean): boolean; | ||
triggerAllEvents(value?: boolean): boolean; | ||
@@ -7,0 +8,0 @@ rubberband(value?: number | boolean | import("../types").Vector2): import("../types").Vector2; |
@@ -46,2 +46,6 @@ /// <reference types="react" /> | ||
/** | ||
* The handler will preventDefault all events when `true`. | ||
*/ | ||
preventDefault?: boolean; | ||
/** | ||
* Forces the handler to fire even for non intentional displacement (ignores | ||
@@ -48,0 +52,0 @@ * the threshold). In that case, the intentional attribute from state will |
@@ -15,2 +15,3 @@ import { GestureKey, CoordinatesKey } from './config'; | ||
threshold: Vector2; | ||
preventDefault: boolean; | ||
triggerAllEvents: boolean; | ||
@@ -17,0 +18,0 @@ rubberband: Vector2; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('./actions-59bdceda.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-f582b91b.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-bfd876c0.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-8d913748.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-0efe52f5.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-508fa692.esm.js'; | ||
import './maths-b2a210f4.esm.js'; | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "@use-gesture/core", | ||
"version": "10.0.0-beta.23", | ||
"version": "10.0.0-beta.24", | ||
"description": "Core engine for receiving gestures", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -10,2 +10,5 @@ import { Vector2, State, GenericOptions } from '../types' | ||
}, | ||
preventDefault(value = false) { | ||
return value | ||
}, | ||
triggerAllEvents(value = false) { | ||
@@ -12,0 +15,0 @@ return value |
@@ -193,2 +193,4 @@ import { Controller } from '../Controller' | ||
state.event = event | ||
// if config.preventDefault is true, then preventDefault | ||
if (config.preventDefault && event.cancelable) state.event.preventDefault() | ||
state.type = event.type | ||
@@ -195,0 +197,0 @@ shared.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size |
@@ -48,2 +48,6 @@ import { State } from './state' | ||
/** | ||
* The handler will preventDefault all events when `true`. | ||
*/ | ||
preventDefault?: boolean | ||
/** | ||
* Forces the handler to fire even for non intentional displacement (ignores | ||
@@ -50,0 +54,0 @@ * the threshold). In that case, the intentional attribute from state will |
@@ -17,2 +17,3 @@ import { GestureKey, CoordinatesKey } from './config' | ||
threshold: Vector2 | ||
preventDefault: boolean | ||
triggerAllEvents: boolean | ||
@@ -19,0 +20,0 @@ rubberband: Vector2 |
285886
8445