@any-touch/shared
Advanced tools
Comparing version 2.0.2 to 2.0.3-alpha.0
@@ -6,2 +6,3 @@ export * from './is'; | ||
export * from './createPluginContext'; | ||
export declare function addEventListener(target: HTMLElement | Window): void; | ||
export declare function round2(n: number): number; |
@@ -1,2 +0,2 @@ | ||
import{__assign as t}from"tslib";var e=Object.prototype.toString;function n(t){return"[object Function]"===e.call(t)}var o,c="clientX",u="clientY",r=16,a="start",i="move",d="cancel",l="end",m="computed",s="left",v="right",f="up",h="down",p="touch",b="mouse",g="touchstart",j="touchmove",w="touchend",x="touchcancel",y="mouseup",F="mousemove",M="mousedown",N=((o={})[4]="start",o[5]="move",o[1]="end",o[3]="cancel",o);function O(t){return N[t]}function S(t,e,n){var o,c,u,r,a,i,d,l={1:(o={},o[0]=(c={},c.move=4,c),o[4]=(u={},u.move=5,u.end=1,u.cancel=3,u),o[5]=(r={},r.move=5,r.end=1,r.cancel=3,r),o),0:(a={},a[4]=(i={},i.move=2,i.end=1,i.cancel=3,i),a[5]=(d={},d.start=2,d.move=2,d.end=1,d.cancel=3,d),a)}[Number(t)][e];return void 0!==l&&l[n]||0}function X(t){[1,3,2].includes(t.state)&&(t.state=0)}function Y(t){return[4,5].includes(t)}function k(t){if(t.disabled)return t.state=0,!0}function q(e,n){return t(t(t({},e),n),{state:0,disabled:!1})}function z(t){return Math.round(100*t)/100}export{c as CLIENT_X,u as CLIENT_Y,r as COMPUTE_INTERVAL,h as DIRECTION_DOWN,s as DIRECTION_LEFT,v as DIRECTION_RIGHT,f as DIRECTION_UP,b as MOUSE,M as MOUSE_DOWN,F as MOUSE_MOVE,y as MOUSE_UP,p as TOUCH,x as TOUCH_CANCEL,w as TOUCH_END,j as TOUCH_MOVE,g as TOUCH_START,d as TYPE_CANCEL,m as TYPE_COMPUTED,l as TYPE_END,i as TYPE_MOVE,a as TYPE_START,q as createPluginContext,S as flow,O as getStatusName,k as isDisabled,n as isFunction,Y as isRecognized,X as resetState,z as round2}; | ||
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}; | ||
//# 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.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.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}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@any-touch/shared", | ||
"version": "2.0.2", | ||
"version": "2.0.3-alpha.0", | ||
"description": "any-touch内部的公共函数.", | ||
@@ -16,3 +16,3 @@ "main": "dist/index.js", | ||
"sideEffects": false, | ||
"gitHead": "7df4617ecb8b89c720ce9747cdd77554c4966a88" | ||
"gitHead": "e53ab5c44a400b04b0de853a9358303007f67e8e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
17232
271
3