Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@any-touch/pan

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/pan - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3-2.0.3-alpha.1.0

2

dist/index.es.js

@@ -1,2 +0,2 @@

import{createPluginContext as t,resetState as e,isDisabled as i,isRecognized as n,TYPE_CANCEL as a,TYPE_END as o,flow as r,getStatusName as s}from"@any-touch/shared";import{ComputeVAndDir as h,ComputeDistance as c,ComputeDeltaXY as p}from"@any-touch/compute";var d={name:"pan",threshold:10,pointLength:1};function m(m,u){var f=t(d,u);return m.compute([h,c,p],(function(t){if(e(f),!i(f)){var h,c,p,d,u,l=(h=t.pointLength,c=t.distance,p=t.direction,d=t.phase,u=f.state,(n(u)||f.threshold<=c)&&f.pointLength===h&&void 0!==p||n(u)&&[a,o].includes(d));if(f.state=r(l,f.state,t.phase),l){var v=f.name;m.emit2(v,t,f),m.emit2(v+s(f.state),t,f),![o,a].includes(t.phase)&&t.direction&&m.emit2(v+t.direction,t,f)}}})),f}export{m as default};
import{createPluginContext as t,resetState as e,isDisabled as n,isRecognized as o,TYPE_CANCEL as i,TYPE_END as s,flow as c,getStatusName as r}from"@any-touch/shared";import{ComputeVAndDir as a,ComputeDistance as h,ComputeDeltaXY as p}from"@any-touch/compute";const u={name:"pan",threshold:10,pointLength:1};function d(d,m){const f=t(u,m);return d.compute([a,h,p],(t=>{if(e(f),n(f))return;const a=function(){const{pointLength:e,distance:n,direction:c,phase:r}=t,{state:a}=f;return(o(a)||f.threshold<=n)&&f.pointLength===e&&void 0!==c||o(a)&&[i,s].includes(r)}();if(f.state=c(a,f.state,t.phase),a){const{name:e}=f;d.emit2(e,t,f),d.emit2(e+r(f.state),t,f),![s,i].includes(t.phase)&&t.direction&&d.emit2(e+t.direction,t,f)}})),f}export{d as default};
//# sourceMappingURL=index.es.js.map
{
"name": "@any-touch/pan",
"version": "2.0.2",
"version": "2.0.3-2.0.3-alpha.1.0",
"description": "any-touch的识别器, 用来识别拖拽手势.",

@@ -14,4 +14,4 @@ "main": "./dist/index",

"dependencies": {
"@any-touch/compute": "^2.0.2",
"@any-touch/shared": "^2.0.2"
"@any-touch/compute": "^2.0.3-2.0.3-alpha.1.0",
"@any-touch/shared": "^2.0.3-2.0.3-alpha.1.0"
},

@@ -22,3 +22,3 @@ "publishConfig": {

"sideEffects": false,
"gitHead": "7df4617ecb8b89c720ce9747cdd77554c4966a88"
"gitHead": "5fe455a5e75ea4301ae73b35afba7f3929b1f07c"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc