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.0.0-beta.12 to 10.0.0-beta.13

dist/actions-05b1aab4.cjs.prod.js

2

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

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

var actions_dist_useGestureCoreActions = require('../../dist/actions-8416850b.cjs.dev.js');
var actions_dist_useGestureCoreActions = require('../../dist/actions-094db287.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-cb2bdb38.cjs.prod.js');
var actions_dist_useGestureCoreActions = require('../../dist/actions-05b1aab4.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-d0a83687.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-1e66897e.esm.js';
import '../../dist/maths-b2a210f4.esm.js';
import { Engine } from './Engine';
import { CoordinatesKey, Vector2 } from '../types';
export declare abstract class CoordinatesEngine<Key extends CoordinatesKey> extends Engine<Key> {
aliasKey: string;
reset(): void;

@@ -5,0 +6,0 @@ init(): void;

@@ -39,2 +39,6 @@ import { Controller } from '../Controller';

*/
/**
* State prop that aliases state values (`xy` or `da`).
*/
abstract readonly aliasKey: string;
args: any[];

@@ -41,0 +45,0 @@ constructor(ctrl: Controller, args: any[], key: Key);

import { Engine } from './Engine';
import { Vector2, WebKitGestureEvent } from '../types';
export declare class PinchEngine extends Engine<'pinch'> {
readonly ingKey: "pinching";
ingKey: "pinching";
aliasKey: string;
init(): void;

@@ -6,0 +7,0 @@ reset(): void;

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

var actions_dist_useGestureCoreActions = require('./actions-8416850b.cjs.dev.js');
var actions_dist_useGestureCoreActions = require('./actions-094db287.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-cb2bdb38.cjs.prod.js');
var actions_dist_useGestureCoreActions = require('./actions-05b1aab4.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, c as toReactHandlerProp, E as EngineMap, d as chain } from './actions-d0a83687.esm.js';
import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, c as toReactHandlerProp, E as EngineMap, d as chain } from './actions-1e66897e.esm.js';
import './maths-b2a210f4.esm.js';

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

{
"name": "@use-gesture/core",
"version": "10.0.0-beta.12",
"version": "10.0.0-beta.13",
"description": "Core engine for receiving gestures",

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

@@ -24,2 +24,4 @@ import { Engine } from './Engine'

export abstract class CoordinatesEngine<Key extends CoordinatesKey> extends Engine<Key> {
aliasKey = 'xy'
reset() {

@@ -41,4 +43,2 @@ super.reset()

this.state.movement = V.sub(this.state.offset, this.state.lastOffset)
// let's take profit from this function to set `values` alias to `xy`
this.state.xy = this.state.values
}

@@ -45,0 +45,0 @@

@@ -45,2 +45,8 @@ import { Controller } from '../Controller'

*/
/**
* State prop that aliases state values (`xy` or `da`).
*/
abstract readonly aliasKey: string
args: any[]

@@ -282,3 +288,3 @@

// @ts-ignore
const memo = this.handler({ ...shared, ...state })
const memo = this.handler({ ...shared, ...state, [this.aliasKey]: state.values })

@@ -285,0 +291,0 @@ // Sets memo to the returned value of the handler (unless it's undefined)

@@ -19,4 +19,6 @@ import { CoordinatesEngine } from './CoordinatesEngine'

if (this.config.mouseOnly && event.pointerType !== 'mouse') return
const state = this.state
if (!state._active) return
state._active = false

@@ -23,0 +25,0 @@ const values = pointerValues(event)

@@ -10,3 +10,4 @@ import { Engine } from './Engine'

export class PinchEngine extends Engine<'pinch'> {
readonly ingKey = 'pinching' as const
ingKey = 'pinching' as const
aliasKey = 'da'

@@ -37,4 +38,2 @@ init() {

this.state.movement = [offset[0] / lastOffset[0] - 1, offset[1] - lastOffset[1]]
// let's take profit from this function to set `values` alias to `xy`
this.state.da = this.state.values
}

@@ -41,0 +40,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