Socket
Socket
Sign inDemoInstall

@use-gesture/core

Package Overview
Dependencies
0
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.2.7 to 10.2.8

dist/actions-015d8084.cjs.dev.js

2

actions/dist/use-gesture-core-actions.cjs.dev.js

@@ -5,3 +5,3 @@ 'use strict';

var actions_dist_useGestureCoreActions = require('../../dist/actions-124920ed.cjs.dev.js');
var actions_dist_useGestureCoreActions = require('../../dist/actions-015d8084.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-4eaf1e3d.cjs.prod.js');
var actions_dist_useGestureCoreActions = require('../../dist/actions-be2ed163.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, f as pinchAction, r as registerAction, s as scrollAction, w as wheelAction } from '../../dist/actions-60708698.esm.js';
export { C as ConfigResolverMap, E as EngineMap, e as dragAction, h as hoverAction, m as moveAction, f as pinchAction, r as registerAction, s as scrollAction, w as wheelAction } from '../../dist/actions-48b2e5b4.esm.js';
import '../../dist/maths-b2a210f4.esm.js';
# @use-gesture/core
## 10.2.8
### Patch Changes
- 2c0fde118: fix: delta is now derived from the `offset` value _after_ it is clamped by bounds.
## 10.2.7

@@ -4,0 +10,0 @@

@@ -5,3 +5,3 @@ 'use strict';

var actions_dist_useGestureCoreActions = require('./actions-124920ed.cjs.dev.js');
var actions_dist_useGestureCoreActions = require('./actions-015d8084.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-4eaf1e3d.cjs.prod.js');
var actions_dist_useGestureCoreActions = require('./actions-be2ed163.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, p as parseProp, d as toHandlerProp } from './actions-60708698.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, p as parseProp, d as toHandlerProp } from './actions-48b2e5b4.esm.js';
import './maths-b2a210f4.esm.js';

@@ -3,0 +3,0 @@

{
"name": "@use-gesture/core",
"version": "10.2.7",
"version": "10.2.8",
"description": "Core engine for receiving gestures",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -289,4 +289,7 @@ import { Controller } from '../Controller'

if (this.intent) this.intent(movement)
const previousOffset = state.offset
if ((state._active && !state._blocked) || state.active) {
const gestureIsActive = (state._active && !state._blocked) || state.active
if (gestureIsActive) {
state.first = state._active && !state.active

@@ -303,19 +306,3 @@ state.last = !state._active && state.active

state.movement = movement
const previousOffset = state.offset
this.computeOffset()
if (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY) {
state.delta = V.sub(state.offset, previousOffset)
const absoluteDelta = state.delta.map(Math.abs) as Vector2
V.addTo(state.distance, absoluteDelta)
state.direction = state.delta.map(Math.sign) as Vector2
state._direction = state._delta.map(Math.sign) as Vector2
if (!state.first && dt > 0) {
// calculates kinematics unless the gesture starts or ends
state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt]
}
}
}

@@ -345,3 +332,19 @@ }

state.offset = computeRubberband(state._bounds, state.offset, rubberband)
state.delta = V.sub(state.offset, previousOffset)
this.computeMovement()
if (gestureIsActive && (!state.last || dt > BEFORE_LAST_KINEMATICS_DELAY)) {
state.delta = V.sub(state.offset, previousOffset)
const absoluteDelta = state.delta.map(Math.abs) as Vector2
V.addTo(state.distance, absoluteDelta)
state.direction = state.delta.map(Math.sign) as Vector2
state._direction = state._delta.map(Math.sign) as Vector2
if (!state.first && dt > 0) {
// calculates kinematics unless the gesture starts or ends
state.velocity = [absoluteDelta[0] / dt, absoluteDelta[1] / dt]
}
}
}

@@ -348,0 +351,0 @@ /**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc