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

@any-touch/recognizer

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@any-touch/recognizer - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

0

dist/index.d.ts

@@ -0,0 +0,0 @@ import { Input } from '@any-touch/shared';

@@ -0,0 +0,0 @@ import { __assign, __values } from 'tslib';

2

dist/index.js

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var tslib=require("tslib"),shared=require("@any-touch/shared");function resetStatus(e){-1!==[shared.STATUS_END,shared.STATUS_CANCELLED,shared.STATUS_RECOGNIZED,shared.STATUS_FAILED].indexOf(e.status)&&(e.status=shared.STATUS_POSSIBLE)}function flow(e,s,r){var t,a,T,i,o,S,d,h={1:(t={},t[shared.STATUS_POSSIBLE]=(a={},a[shared.INPUT_MOVE]=shared.STATUS_START,a),t[shared.STATUS_START]=(T={},T[shared.INPUT_MOVE]=shared.STATUS_MOVE,T[shared.INPUT_END]=shared.STATUS_END,T[shared.INPUT_CANCEL]=shared.STATUS_CANCELLED,T),t[shared.STATUS_MOVE]=(i={},i[shared.INPUT_MOVE]=shared.STATUS_MOVE,i[shared.INPUT_END]=shared.STATUS_END,i[shared.INPUT_CANCEL]=shared.STATUS_CANCELLED,i),t),0:(o={},o[shared.STATUS_START]=(S={},S[shared.INPUT_MOVE]=shared.STATUS_CANCELLED,S[shared.INPUT_END]=shared.STATUS_END,S[shared.INPUT_CANCEL]=shared.STATUS_CANCELLED,S),o[shared.STATUS_MOVE]=(d={},d[shared.INPUT_START]=shared.STATUS_FAILED,d[shared.INPUT_MOVE]=shared.STATUS_CANCELLED,d[shared.INPUT_END]=shared.STATUS_END,d[shared.INPUT_CANCEL]=shared.STATUS_CANCELLED,d),o)};return void 0!==h[Number(e)][s]&&h[Number(e)][s][r]||s}function recognizeForPressMoveLike(e,s,r){var t=e.test(s);resetStatus(e);var a=s.inputType;e.status=flow(t,e.status,a);var T=e.computed;e.isRecognized=[shared.STATUS_START,shared.STATUS_MOVE].includes(e.status);var i=e.name,o=e.status,S=e.isRecognized;return S&&r(i,T),(S||[shared.STATUS_END,shared.STATUS_CANCELLED].includes(e.status))&&r(i+o,T),t}var default_1=function(){function e(e){this.disabled=!1,this.status=shared.STATUS_POSSIBLE,this.isRecognized=!1,this.recognizerMap={},this.computedGroup={},this.computed={},this.computeFunctionMap={},this.options=e,this.name=this.options.name}return e.prototype.set=function(e){return void 0!==e&&(this.options=tslib.__assign(tslib.__assign({},this.options),e)),this},e.prototype.isValidPointLength=function(e){return 0===this.options.pointLength||this.options.pointLength===e},e.prototype.compute=function(e,s){var r,t,a=Object.create(null);try{for(var T=tslib.__values(e),i=T.next();!i.done;i=T.next()){var o=i.value,S=o._id,d=this.computedGroup,h=this.computeFunctionMap;for(var n in void 0===h[S]&&(h[S]=o()),d[S]=d[S]||h[S](s),d[S])a[n]=d[S][n]}}catch(e){r={error:e}}finally{try{i&&!i.done&&(t=T.return)&&t.call(T)}finally{if(r)throw r.error}}return a},e}();exports.default=default_1,exports.recognizeForPressMoveLike=recognizeForPressMoveLike,exports.resetStatusForPressMoveLike=resetStatus;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),T=require("@any-touch/shared");function e(t){-1!==[T.STATUS_END,T.STATUS_CANCELLED,T.STATUS_RECOGNIZED,T.STATUS_FAILED].indexOf(t.status)&&(t.status=T.STATUS_POSSIBLE)}var S=function(){function e(t){this.disabled=!1,this.status=T.STATUS_POSSIBLE,this.isRecognized=!1,this.recognizerMap={},this.computedGroup={},this.computed={},this.computeFunctionMap={},this.options=t,this.name=this.options.name}return e.prototype.set=function(T){return void 0!==T&&(this.options=t.__assign(t.__assign({},this.options),T)),this},e.prototype.isValidPointLength=function(t){return 0===this.options.pointLength||this.options.pointLength===t},e.prototype.compute=function(T,e){var S,i,s=Object.create(null);try{for(var o=t.__values(T),r=o.next();!r.done;r=o.next()){var n=r.value,_=n._id,u=this.computedGroup,A=this.computeFunctionMap;for(var E in void 0===A[_]&&(A[_]=n()),u[_]=u[_]||A[_](e),u[_])s[E]=u[_][E]}}catch(t){S={error:t}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(S)throw S.error}}return s},e}();exports.default=S,exports.recognizeForPressMoveLike=function(t,S,i){var s=t.test(S);e(t);var o=S.inputType;t.status=function(t,e,S){var i,s,o,r,n,_,u,A={1:(i={},i[T.STATUS_POSSIBLE]=(s={},s[T.INPUT_MOVE]=T.STATUS_START,s),i[T.STATUS_START]=(o={},o[T.INPUT_MOVE]=T.STATUS_MOVE,o[T.INPUT_END]=T.STATUS_END,o[T.INPUT_CANCEL]=T.STATUS_CANCELLED,o),i[T.STATUS_MOVE]=(r={},r[T.INPUT_MOVE]=T.STATUS_MOVE,r[T.INPUT_END]=T.STATUS_END,r[T.INPUT_CANCEL]=T.STATUS_CANCELLED,r),i),0:(n={},n[T.STATUS_START]=(_={},_[T.INPUT_MOVE]=T.STATUS_CANCELLED,_[T.INPUT_END]=T.STATUS_END,_[T.INPUT_CANCEL]=T.STATUS_CANCELLED,_),n[T.STATUS_MOVE]=(u={},u[T.INPUT_START]=T.STATUS_FAILED,u[T.INPUT_MOVE]=T.STATUS_CANCELLED,u[T.INPUT_END]=T.STATUS_END,u[T.INPUT_CANCEL]=T.STATUS_CANCELLED,u),n)};return void 0!==A[Number(t)][e]&&A[Number(t)][e][S]||e}(s,t.status,o);var r=t.computed;t.isRecognized=[T.STATUS_START,T.STATUS_MOVE].includes(t.status);var n=t.name,_=t.status,u=t.isRecognized;return u&&i(n,r),(u||[T.STATUS_END,T.STATUS_CANCELLED].includes(t.status))&&i(n+_,r),s},exports.resetStatusForPressMoveLike=e;

@@ -0,0 +0,0 @@ import { CommonEmitFunction, Input } from '@any-touch/shared';

import Recognizer from './index';
export default function (recognizer: Recognizer): void;
{
"name": "@any-touch/recognizer",
"version": "0.7.4",
"version": "0.7.5",
"description": "any-touch的识别器的基类.",

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

"dependencies": {
"@any-touch/shared": "^0.7.4"
"@any-touch/shared": "^0.7.5"
},

@@ -21,3 +21,3 @@ "files": [

"sideEffects": false,
"gitHead": "20cfae8bee6e95cca8dd56799f56dd48234556c4"
"gitHead": "d4d3471e164e745d18940a2fd3192362a3a86edf"
}

@@ -0,0 +0,0 @@ # @any-touch/recognizer (内部模块)

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