@use-gesture/core
Advanced tools
Comparing version 10.0.0-beta.25 to 10.0.0-beta.26
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-f582b91b.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-f6d65f25.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-8d913748.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('../../dist/actions-3ac64543.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-508fa692.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-da348a37.esm.js'; | ||
import '../../dist/maths-b2a210f4.esm.js'; |
@@ -0,0 +0,0 @@ import { GestureKey, EngineClass, Action } from './types'; |
@@ -0,0 +0,0 @@ import { Vector2, State, GenericOptions } from '../types'; |
@@ -0,0 +0,0 @@ import { InternalCoordinatesOptions, CoordinatesConfig, DragBounds, State, Vector2 } from '../types'; |
@@ -0,0 +0,0 @@ import { DragConfig, InternalDragOptions, Vector2 } from '../types'; |
@@ -0,0 +0,0 @@ export declare const hoverConfigResolver: { |
@@ -0,0 +0,0 @@ export declare const moveConfigResolver: { |
@@ -0,0 +0,0 @@ import { PinchConfig, GenericOptions, InternalPinchOptions, State, Vector2 } from '../types'; |
@@ -0,0 +0,0 @@ import { GestureKey, InternalConfig, UserGestureConfig } from '../types'; |
@@ -0,0 +0,0 @@ export declare const scrollConfigResolver: { |
@@ -0,0 +0,0 @@ import { Target, Vector2 } from '../types'; |
@@ -0,0 +0,0 @@ export declare const SUPPORT: { |
@@ -0,0 +0,0 @@ export declare const wheelConfigResolver: { |
@@ -0,0 +0,0 @@ import { EventStore } from './EventStore'; |
@@ -0,0 +0,0 @@ import { Engine } from './Engine'; |
@@ -0,0 +0,0 @@ import { CoordinatesEngine } from './CoordinatesEngine'; |
@@ -0,0 +0,0 @@ import { Controller } from '../Controller'; |
@@ -0,0 +0,0 @@ import { CoordinatesEngine } from './CoordinatesEngine'; |
@@ -0,0 +0,0 @@ import { CoordinatesEngine } from './CoordinatesEngine'; |
@@ -0,0 +0,0 @@ import { Engine } from './Engine'; |
@@ -0,0 +0,0 @@ import { CoordinatesEngine } from './CoordinatesEngine'; |
@@ -0,0 +0,0 @@ import { CoordinatesEngine } from './CoordinatesEngine'; |
@@ -0,0 +0,0 @@ import type { Controller } from './Controller'; |
export { Controller } from './Controller'; | ||
export { parseMergedHandlers } from './parser'; |
@@ -0,0 +0,0 @@ import { GestureHandlers, UserGestureConfig } from './types'; |
@@ -0,0 +0,0 @@ export declare class TimeoutStore { |
export * from './types/index'; |
@@ -0,0 +0,0 @@ import type { ResolverMap } from '../config/resolver'; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ export * from './config'; |
@@ -0,0 +0,0 @@ import { GestureKey, CoordinatesKey } from './config'; |
@@ -0,0 +0,0 @@ import { GestureKey } from './config'; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
export { rubberbandIfOutOfBounds } from './utils/maths'; |
@@ -0,0 +0,0 @@ import { Vector2 } from '../types'; |
@@ -0,0 +0,0 @@ export declare function call<T>(v: T | ((...args: any[]) => T), ...args: any[]): T; |
@@ -0,0 +0,0 @@ import { Vector2 } from '../types'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var actions_dist_useGestureCoreActions = require('./actions-f582b91b.cjs.dev.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-f6d65f25.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-8d913748.cjs.prod.js'); | ||
var actions_dist_useGestureCoreActions = require('./actions-3ac64543.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-508fa692.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-da348a37.esm.js'; | ||
import './maths-b2a210f4.esm.js'; | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "@use-gesture/core", | ||
"version": "10.0.0-beta.25", | ||
"version": "10.0.0-beta.26", | ||
"description": "Core engine for receiving gestures", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -171,2 +171,3 @@ import { CoordinatesEngine } from './CoordinatesEngine' | ||
if (this.config.pointerCapture && (event.target as HTMLElement).hasPointerCapture(event.pointerId)) { | ||
// this shouldn't be necessary as it should be automatic when releasing the pointer | ||
;(event.target as HTMLElement).releasePointerCapture(event.pointerId) | ||
@@ -173,0 +174,0 @@ } |
@@ -7,2 +7,17 @@ import { Controller } from '../Controller' | ||
/** | ||
* The lib doesn't compute the kinematics on the last event of the gesture | ||
* (i.e. for a drag gesture, the `pointerup` coordinates will generally match the | ||
* last `pointermove` coordinates which would result in all drags ending with a | ||
* `[0,0]` velocity). However, when the timestamp difference between the last | ||
* event (ie pointerup) and the before last event (ie pointermove) is greater | ||
* than BEFORE_LAST_KINEMATICS_DELAY, the kinematics are computed (which would | ||
* mean that if you release your drag after stopping for more than | ||
* BEFORE_LAST_KINEMATICS_DELAY, the velocity will be indeed 0). | ||
* | ||
* See https://github.com/pmndrs/use-gesture/issues/332 for more details. | ||
*/ | ||
const BEFORE_LAST_KINEMATICS_DELAY = 32 | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
@@ -255,3 +270,3 @@ export interface Engine<Key extends GestureKey> { | ||
if (!state.last) { | ||
if (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY) { | ||
state.delta = V.sub(movement, previousMovement) | ||
@@ -258,0 +273,0 @@ const absoluteDelta = state.delta.map(Math.abs) as Vector2 |
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
8465
285920