Socket
Socket
Sign inDemoInstall

@any-touch/shared

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/shared - npm Package Compare versions

Comparing version 2.0.3-alpha.0 to 2.0.3

1

dist/index.d.ts

@@ -6,3 +6,2 @@ export * from './is';

export * from './createPluginContext';
export declare function addEventListener(target: HTMLElement | Window): void;
export declare function round2(n: number): number;

2

dist/index.es.js

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

const t=Object.prototype.toString;function n(n){return"[object Function]"===t.call(n)}const e="clientX",c="clientY",o=16,u="start",s="move",r="cancel",i="end",a="computed",d="left",l="right",m="up",f="down",v="touch",b="mouse",h="touchstart",p="touchmove",g="touchend",j="touchcancel",O="mouseup",w="mousemove",x="mousedown",y={4:"start",5:"move",1:"end",3:"cancel"};function F(t){return y[t]}function M(t,n,e){const c={1:{0:{move:4},4:{move:5,end:1,cancel:3},5:{move:5,end:1,cancel:3}},0:{4:{move:2,end:1,cancel:3},5:{start:2,move:2,end:1,cancel:3}}}[Number(t)][n];return void 0!==c&&c[e]||0}function N(t){[1,3,2].includes(t.state)&&(t.state=0)}function S(t){return[4,5].includes(t)}function X(t){if(t.disabled)return t.state=0,!0}function Y(t,n){return Object.assign(Object.assign(Object.assign({},t),n),{state:0,disabled:!1})}function k(t){}function q(t){return Math.round(100*t)/100}export{e as CLIENT_X,c as CLIENT_Y,o as COMPUTE_INTERVAL,f as DIRECTION_DOWN,d as DIRECTION_LEFT,l as DIRECTION_RIGHT,m as DIRECTION_UP,b as MOUSE,x as MOUSE_DOWN,w as MOUSE_MOVE,O as MOUSE_UP,v as TOUCH,j as TOUCH_CANCEL,g as TOUCH_END,p as TOUCH_MOVE,h as TOUCH_START,r as TYPE_CANCEL,a as TYPE_COMPUTED,i as TYPE_END,s as TYPE_MOVE,u as TYPE_START,k as addEventListener,Y as createPluginContext,M as flow,F as getStatusName,X as isDisabled,n as isFunction,S as isRecognized,N as resetState,q as round2};
const t=Object.prototype.toString;function e(e){return"[object Function]"===t.call(e)}const n="clientX",c="clientY",o=16,u="start",s="move",r="cancel",a="end",i="computed",d="left",l="right",m="up",f="down",v="touch",b="mouse",h="touchstart",p="touchmove",g="touchend",j="touchcancel",O="mouseup",w="mousemove",x="mousedown",y={4:"start",5:"move",1:"end",3:"cancel"};function F(t){return y[t]}function M(t,e,n){const c={1:{0:{move:4},4:{move:5,end:1,cancel:3},5:{move:5,end:1,cancel:3}},0:{4:{move:2,end:1,cancel:3},5:{start:2,move:2,end:1,cancel:3}}}[Number(t)][e];return void 0!==c&&c[n]||0}function N(t){[1,3,2].includes(t.state)&&(t.state=0)}function S(t){return[4,5].includes(t)}function X(t){if(t.disabled)return t.state=0,!0}function Y(t,e){return Object.assign(Object.assign(Object.assign({},t),e),{state:0,disabled:!1})}function k(t){return Math.round(100*t)/100}export{n as CLIENT_X,c as CLIENT_Y,o as COMPUTE_INTERVAL,f as DIRECTION_DOWN,d as DIRECTION_LEFT,l as DIRECTION_RIGHT,m as DIRECTION_UP,b as MOUSE,x as MOUSE_DOWN,w as MOUSE_MOVE,O as MOUSE_UP,v as TOUCH,j as TOUCH_CANCEL,g as TOUCH_END,p as TOUCH_MOVE,h as TOUCH_START,r as TYPE_CANCEL,i as TYPE_COMPUTED,a as TYPE_END,s as TYPE_MOVE,u as TYPE_START,Y as createPluginContext,M as flow,F as getStatusName,X as isDisabled,e as isFunction,S as isRecognized,N as resetState,k as round2};
//# sourceMappingURL=index.es.js.map

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=Object.prototype.toString;var o,r=((o={})[4]="start",o[5]="move",o[1]="end",o[3]="cancel",o);exports.CLIENT_X="clientX",exports.CLIENT_Y="clientY",exports.COMPUTE_INTERVAL=16,exports.DIRECTION_DOWN="down",exports.DIRECTION_LEFT="left",exports.DIRECTION_RIGHT="right",exports.DIRECTION_UP="up",exports.MOUSE="mouse",exports.MOUSE_DOWN="mousedown",exports.MOUSE_MOVE="mousemove",exports.MOUSE_UP="mouseup",exports.TOUCH="touch",exports.TOUCH_CANCEL="touchcancel",exports.TOUCH_END="touchend",exports.TOUCH_MOVE="touchmove",exports.TOUCH_START="touchstart",exports.TYPE_CANCEL="cancel",exports.TYPE_COMPUTED="computed",exports.TYPE_END="end",exports.TYPE_MOVE="move",exports.TYPE_START="start",exports.addEventListener=function(e){},exports.createPluginContext=function(t,o){return e.__assign(e.__assign(e.__assign({},t),o),{state:0,disabled:!1})},exports.flow=function(e,t,o){var r,s,n,c,u,p,i,a={1:(r={},r[0]=(s={},s.move=4,s),r[4]=(n={},n.move=5,n.end=1,n.cancel=3,n),r[5]=(c={},c.move=5,c.end=1,c.cancel=3,c),r),0:(u={},u[4]=(p={},p.move=2,p.end=1,p.cancel=3,p),u[5]=(i={},i.start=2,i.move=2,i.end=1,i.cancel=3,i),u)}[Number(e)][t];return void 0!==a&&a[o]||0},exports.getStatusName=function(e){return r[e]},exports.isDisabled=function(e){if(e.disabled)return e.state=0,!0},exports.isFunction=function(e){return"[object Function]"===t.call(e)},exports.isRecognized=function(e){return[4,5].includes(e)},exports.resetState=function(e){[1,3,2].includes(e.state)&&(e.state=0)},exports.round2=function(e){return Math.round(100*e)/100};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=Object.prototype.toString;var o,r=((o={})[4]="start",o[5]="move",o[1]="end",o[3]="cancel",o);exports.CLIENT_X="clientX",exports.CLIENT_Y="clientY",exports.COMPUTE_INTERVAL=16,exports.DIRECTION_DOWN="down",exports.DIRECTION_LEFT="left",exports.DIRECTION_RIGHT="right",exports.DIRECTION_UP="up",exports.MOUSE="mouse",exports.MOUSE_DOWN="mousedown",exports.MOUSE_MOVE="mousemove",exports.MOUSE_UP="mouseup",exports.TOUCH="touch",exports.TOUCH_CANCEL="touchcancel",exports.TOUCH_END="touchend",exports.TOUCH_MOVE="touchmove",exports.TOUCH_START="touchstart",exports.TYPE_CANCEL="cancel",exports.TYPE_COMPUTED="computed",exports.TYPE_END="end",exports.TYPE_MOVE="move",exports.TYPE_START="start",exports.createPluginContext=function(t,o){return e.__assign(e.__assign(e.__assign({},t),o),{state:0,disabled:!1})},exports.flow=function(e,t,o){var r,s,n,c,u,p,i,a={1:(r={},r[0]=(s={},s.move=4,s),r[4]=(n={},n.move=5,n.end=1,n.cancel=3,n),r[5]=(c={},c.move=5,c.end=1,c.cancel=3,c),r),0:(u={},u[4]=(p={},p.move=2,p.end=1,p.cancel=3,p),u[5]=(i={},i.start=2,i.move=2,i.end=1,i.cancel=3,i),u)}[Number(e)][t];return void 0!==a&&a[o]||0},exports.getStatusName=function(e){return r[e]},exports.isDisabled=function(e){if(e.disabled)return e.state=0,!0},exports.isFunction=function(e){return"[object Function]"===t.call(e)},exports.isRecognized=function(e){return[4,5].includes(e)},exports.resetState=function(e){[1,3,2].includes(e.state)&&(e.state=0)},exports.round2=function(e){return Math.round(100*e)/100};
//# sourceMappingURL=index.js.map

@@ -8,3 +8,3 @@ import { RECOGNIZER_STATE } from './index';

*/
export declare function getStatusName(code: RECOGNIZER_STATE): import("../dist").phase;
export declare function getStatusName(code: RECOGNIZER_STATE): "end" | "start" | "cancel" | "move";
/**

@@ -11,0 +11,0 @@ * 😊如果当前识别成功,

{
"name": "@any-touch/shared",
"version": "2.0.3-alpha.0",
"version": "2.0.3",
"description": "any-touch内部的公共函数.",

@@ -16,3 +16,3 @@ "main": "dist/index.js",

"sideEffects": false,
"gitHead": "e53ab5c44a400b04b0de853a9358303007f67e8e"
"gitHead": "8883ce697d63c7347481eef21544b65699cdd923"
}

Sorry, the diff of this file is not supported yet

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