New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@innovatrics/dot-face-auto-capture

Package Overview
Dependencies
Maintainers
10
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@innovatrics/dot-face-auto-capture - npm Package Compare versions

Comparing version 4.0.4 to 4.1.0

ui-common/src/types/events/magnifeye.d.ts

15

common/src/types/faceTypes.d.ts

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

import { BaseCameraProps, CameraSettings, ImageParameters, Resolution, CustomElement, DetectedFaceCorners } from '../../../ui-common/src/types';
import type { BaseCameraProps, CameraSettings, CustomElement, DetectedFace, Resolution } from '../../../ui-common/src/types';
export * from '../../../ui-common/src/types/common';

@@ -18,6 +18,2 @@ export * from '../../../ui-common/src/types/face';

};
export type DetectedFace = FaceImageParameters & DetectedFaceCorners & {
confidence: number;
faceSize: number;
};
export type FaceComponentData = {

@@ -31,9 +27,9 @@ cameraSettings: CameraSettings;

export type FaceThresholds = {
brightnessHighThreshold?: number;
brightnessLowThreshold?: number;
faceConfidence?: number;
maxFaceSizeRatio?: number;
minFaceSizeRatio?: number;
maxFaceSizeRatio?: number;
outOfBoundsThreshold?: number;
sharpnessThreshold?: number;
brightnessLowThreshold?: number;
brightnessHighThreshold?: number;
outOfBoundsThreshold?: number;
};

@@ -44,2 +40,1 @@ export type FaceCameraProps = BaseCameraProps & {

};
export type FaceImageParameters = ImageParameters;

@@ -1,15 +0,189 @@

const t = (e, a) => {
document.dispatchEvent(new CustomEvent(e, {
detail: a
}));
}, o = (e, a) => {
t(e, {
instruction: a
});
};
var c = /* @__PURE__ */ ((e) => (e.CONTINUE_DETECTION = "continue-detection", e.SWITCH_CAMERA = "switch-camera", e.TOGGLE_MIRROR = "toggle-mirror", e))(c || {}), E = /* @__PURE__ */ ((e) => (e.CONTROL = "face-auto-capture:control", e.CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed", e.INSTRUCTION_CHANGED = "face-auto-capture:instruction-changed", e.STATE_CHANGED = "face-auto-capture:state-changed", e.DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed", e.VIDEO_ELEMENT_SIZE = "face-auto-capture:video-element-size", e))(E || {});
(function(c, n) {
function x(r, a) {
return f(r - -870, a);
}
function t(r, a) {
return f(a - -156, r);
}
const e = c();
for (; []; )
try {
if (parseInt(t(82, 86)) / 1 * (-parseInt(t(36, 64)) / 2) + -parseInt(t(-17, 20)) / 3 * (parseInt(x(-692, -727)) / 4) + parseInt(x(-707, -679)) / 5 * (-parseInt(t(33, 46)) / 6) + -parseInt(t(71, 103)) / 7 * (-parseInt(t(39, 62)) / 8) + parseInt(t(24, 76)) / 9 * (-parseInt(t(70, 55)) / 10) + parseInt(x(-609, -555)) / 11 + parseInt(x(-621, -609)) / 12 * (parseInt(t(34, 43)) / 13) === n)
break;
e.push(e.shift());
} catch {
e.push(e.shift());
}
})(b, 159742 + 100308 + 97 * -1392);
const l = function() {
let c = !![];
return function(n, x) {
const t = c ? function() {
if (x) {
const e = x.apply(n, arguments);
return x = null, e;
}
} : function() {
};
return c = ![], t;
};
}();
(function() {
l(this, function() {
const c = new RegExp("function *\\( *\\)");
function n(r, a) {
return f(r - 697, a);
}
const x = new RegExp("\\+\\+ *(?:[" + e(1249, 1217) + n(949, 992) + "$]*)", "i"), t = p(e(1175, 1130));
function e(r, a) {
return f(a - 948, r);
}
!c[e(1151, 1146)](t + e(1205, 1195)) || !x[e(1173, 1146)](t + "input") ? t("0") : p();
})();
})();
const s = function() {
let c = !![];
return function(n, x) {
const t = c ? function() {
function e(r, a) {
return f(a - 246, r);
}
if (x) {
const r = x[e(491, 479)](n, arguments);
return x = null, r;
}
} : function() {
};
return c = ![], t;
};
}(), I = s(void 0, function() {
let c;
try {
c = Function(x(277, 271) + t(787, 738) + (t(791, 789) + x(261, 262) + 'rn this")( )') + ");")();
} catch {
c = window;
}
const n = c[t(752, 720)] = c[x(272, 224)] || {};
function x(r, a) {
return f(r - 97, a);
}
function t(r, a) {
return f(a - 545, r);
}
const e = ["log", x(302, 345), t(744, 781), t(668, 711), "exception", t(809, 759), x(297, 268)];
for (let r = 4813 + -7139 + 2 * 1163; r < e[x(342, 289)]; r++) {
const a = s[t(734, 739) + "r"][x(270, 309)][t(839, 813)](s), _ = e[r], E = n[_] || a;
a.__proto__ = s[t(780, 813)](s), a[t(803, 780)] = E[t(830, 780)].bind(E), n[_] = a;
}
});
I();
const O = (c, n) => {
const x = {};
x.detail = n;
function t(r, a) {
return f(r - 959, a);
}
function e(r, a) {
return f(a - 498, r);
}
document[e(786, 756) + e(684, 670)](new CustomEvent(c, x));
}, T = (c, n) => {
const x = {};
x["instruction"] = n, O(c, x);
}, d = {};
d[u(1028, 1071)] = "LOADING", d[o(1214, 1259)] = o(1214, 1187), d[o(1187, 1203)] = o(1187, 1186), d[u(1120, 1076)] = u(1111, 1076);
const N = d, i = {};
i["CANDIDATE_SELECTION"] = o(1190, 1230) + "selection", i[o(1148, 1135) + "LOSE"] = o(1157, 1146) + o(1151, 1114), i[o(1193, 1157) + "AR"] = u(1152, 1135) + "ar", i[u(1045, 1065) + "RING"] = o(1164, 1192) + o(1173, 1215);
function u(c, n) {
return f(n - 880, c);
}
i[o(1171, 1182) + o(1139, 1177)] = o(1185, 1207) + o(1163, 1188), i[u(1093, 1049) + u(1084, 1059)] = o(1114, 1148) + u(1120, 1067), i[o(1160, 1174) + "_TOO_LOW"] = u(1102, 1105) + o(1178, 1162);
function o(c, n) {
return f(c - 947, n);
}
i[u(1112, 1093) + u(1101, 1110)] = u(1085, 1105) + u(1007, 1048);
const A = i;
function b() {
const c = ["capture:co", "switch-cam", "-changed", "ERROR", "bind", "a-zA-Z_$][", "tected-fac", "110OortRP", 'ctor("retu', "mera-props", "error", "sharpness_", "_too_high", "SHARPNESS_", "VIDEO_ELEM", "counter", "ent", "prototype", "INSTRUCTIO", "console", "64197KtRKhF", "continue-d", "36cCOipO", "TOO_LOW", "return (fu", "CONTINUE_D", "init", "era", "struction-", "FACE_CENTE", "capture:in", "too_low", "etection", "t-size", 'rn this")(', "LOADING", "RESENT", "nction() ", "constructo", "capture:fa", "RUNNING", "ce-detecti", "test", "377gdswRW", "trace", "FACE_TOO_C", "60174kYYzby", "stateObjec", "lose", "warn", "TOGGLE_MIR", "GED", "toggle-mir", "e-changed", "face_too_c", "190zkeXLm", "changed", "BRIGHTNESS", "table", "string", "resent", "face_cente", "1992QwYypC", "action", "1902JvGTQi", "CAMERA_PRO", "debu", "gger", "FACE_NOT_P", "brightness", "ring", "SWITCH_CAM", "DETECTED_F", "TION", "_TOO_HIGH", "_too_low", "33021Npxxlz", "apply", "call", "toString", "info", "ERA", "face_not_p", "ate-change", "WAITING", "ntrol", "103neSgXd", "candidate_", "{}.constru", "length", "FACE_TOO_F", "chain", "capture:ca", "248940pufwdQ", "FACE_DETEC", "capture:vi", "0-9a-zA-Z_", "face-auto-", "ETECTION", "face_too_f", "e) {}", "setInterva", "dispatchEv", "21uwPTeD", "ROR", "1139237VpUuvf", "N_CHANGED", "STATE_CHAN"];
return b = function() {
return c;
}, b();
}
function f(c, n) {
const x = b();
return f = function(t, e) {
return t = t - (-7318 + 5625 + -8 * -232), x[t];
}, f(c, n);
}
var C = ((c) => {
function n(t, e) {
return u(e, t - -1370);
}
c[n(-309, -348) + n(-236, -217)] = n(-313, -298) + x(854, 835);
function x(t, e) {
return o(e - -300, t);
}
return c[n(-263, -279) + x(932, 884)] = x(935, 912) + x(803, 830), c[n(-284, -313) + x(910, 907)] = n(-282, -319) + "ror", c;
})(C || {}), h = ((c) => {
function n(t, e) {
return o(e - -694, t);
}
c[n(459, 474) + "PS_CHANGED"] = "face-auto-" + x(315, 316) + x(232, 271) + x(333, 335), c.CONTROL = "face-auto-" + x(331, 340) + n(518, 494), c[x(295, 277) + "ACE_CHANGED"] = n(538, 506) + "capture:de" + n(576, 523) + n(465, 462), c[n(454, 503) + x(296, 331)] = "face-auto-" + n(487, 448) + x(264, 254) + "on", c[x(241, 209) + n(532, 515)] = n(524, 506) + x(253, 263) + x(251, 304) + n(462, 465);
function x(t, e) {
return o(t - -880, e);
}
return c[x(330, 341) + x(274, 220)] = n(528, 506) + "capture:st" + n(534, 492) + "d", c[n(454, 423) + "ENT_SIZE"] = x(320, 374) + x(318, 289) + "deo-elemen" + x(256, 238), c;
})(h || {});
(function() {
const c = function() {
function t(a, _) {
return f(a - 727, _);
}
function e(a, _) {
return f(_ - -901, a);
}
let r;
try {
r = Function(e(-731, -721) + "nction() " + (t(971, 941) + t(891, 938) + e(-657, -711) + " )") + ");")();
} catch {
r = window;
}
return r;
}, n = c();
function x(t, e) {
return u(t, e - -1058);
}
n[x(81, 79) + "l"](p, -7939 + 4762 * 1 + -1 * -7177);
})();
function p(c) {
function n(x) {
if (typeof x === t(-40, -68))
return function(r) {
}[t(-94, -89) + "r"]("while (tru" + e(350, 357))[e(327, 363)](e(265, 250));
("" + x / x)[e(339, 288)] !== 1 * 4446 + -1 * -6267 + -13 * 824 || x % (1 * -4367 + -4348 + 8735) === -4517 + -8619 + -6568 * -2 ? function() {
return !![];
}[e(288, 290) + "r"]("debu" + e(317, 285))[e(328, 315)](e(313, 310)) : function() {
return ![];
}["constructor"](e(316, 329) + t(-53, -60))[t(-58, -50)](e(297, 327) + "t");
function t(r, a) {
return f(a - -283, r);
}
function e(r, a) {
return f(r - 94, a);
}
n(++x);
}
try {
if (c)
return n;
n(1 * 4656 + -7126 + 2470);
} catch {
}
}
export {
c as ControlEventInstruction,
E as FaceCustomEvent,
o as dispatchControlEvent
N as AppStateValues,
C as ControlEventInstruction,
h as FaceCustomEvent,
A as FaceInstructionCodeValues,
T as dispatchControlEvent
};

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

(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports):typeof define=="function"&&define.amd?define(["exports"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["@innovatrics/dot-events-auto-capture"]={}))})(this,function(t){"use strict";const n=(e,a)=>{document.dispatchEvent(new CustomEvent(e,{detail:a}))},i=(e,a)=>{n(e,{instruction:a})};var c=(e=>(e.CONTINUE_DETECTION="continue-detection",e.SWITCH_CAMERA="switch-camera",e.TOGGLE_MIRROR="toggle-mirror",e))(c||{}),o=(e=>(e.CONTROL="face-auto-capture:control",e.CAMERA_PROPS_CHANGED="face-auto-capture:camera-props-changed",e.INSTRUCTION_CHANGED="face-auto-capture:instruction-changed",e.STATE_CHANGED="face-auto-capture:state-changed",e.DETECTED_FACE_CHANGED="face-auto-capture:detected-face-changed",e.VIDEO_ELEMENT_SIZE="face-auto-capture:video-element-size",e))(o||{});t.ControlEventInstruction=c,t.FaceCustomEvent=o,t.dispatchControlEvent=i,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
(function(a,d){const u=a();function r(o,c){return _0x113a(o- -947,c)}function f(o,c){return _0x113a(c- -252,o)}for(;[];)try{if(-parseInt(r(-488,-547))/1*(parseInt(r(-492,-553))/2)+parseInt(f(226,206))/3+parseInt(r(-508,-467))/4*(-parseInt(r(-530,-562))/5)+-parseInt(r(-574,-595))/6+-parseInt(r(-556,-503))/7+parseInt(f(280,227))/8*(-parseInt(r(-516,-464))/9)+parseInt(r(-458,-469))/10===d)break;u.push(u.shift())}catch{u.push(u.shift())}})(_0x1b38,823982+752754+913*-1097),function(a,d){const u=function(){let b=!![];return function(s,e){const E=b?function(){function p(n,x){return _0x113a(x-644,n)}if(e){const n=e[p(1042,1077)](s,arguments);return e=null,n}}:function(){};return b=![],E}}();function r(b,s){return _0x113a(b-159,s)}(function(){u(this,function(){const b=new RegExp("function *"+e(530,581)),s=new RegExp(e(573,571)+"a-zA-Z_$][0-9a-zA-Z_"+e(528,556),"i");function e(n,x){return _0x113a(x-109,n)}function E(n,x){return _0x113a(x- -764,n)}const p=_0x999d6a(e(494,513));!b[e(514,514)](p+E(-357,-352))||!s[e(522,514)](p+E(-422,-371))?p("0"):_0x999d6a()})()})();const f=function(){let b=!![];return function(s,e){const E=b?function(){function p(n,x){return _0x113a(n-638,x)}if(e){const n=e[p(1071,1112)](s,arguments);return e=null,n}}:function(){};return b=![],E}}();function o(b,s){return _0x113a(s- -615,b)}f(this,function(){const b=function(){let x;function t(i,l){return _0x113a(i-29,l)}function _(i,l){return _0x113a(l-78,i)}try{x=Function("return (function() "+(_(435,497)+t(427,441)+t(507,545)+" )")+");")()}catch{x=window}return x},s=b(),e=s[n(689,733)]=s[p(961,1009)]||{},E=[p(941,988),n(677,682),p(1005,1044),n(686,729),n(678,671),n(698,744),"trace"];function p(x,t){return _0x113a(t-575,x)}function n(x,t){return _0x113a(t-299,x)}for(let x=9*-213+1591+326;x<E.length;x++){const t=f["constructor"][n(757,767)].bind(f),_=E[x],i=e[_]||t;t.__proto__=f[n(698,742)](f),t.toString=i[n(665,707)][p(1033,1018)](i),e[_]=t}})(),typeof exports===r(612,577)&&typeof module!==o(-179,-220)?d(exports):typeof define===o(-205,-144)&&define[o(-183,-124)]?define([r(649,599)],d):(a=typeof globalThis<"u"?globalThis:a||self,d(a[o(-264,-214)+o(-146,-158)+o(-200,-241)+o(-208,-190)]={}))}(this,function(a){"use strict";const d=(n,x)=>{function t(l,I){return _0x113a(l- -245,I)}function _(l,I){return _0x113a(l- -439,I)}const i={};i[_(38,59)]=x,document["dispatchEv"+_(-24,-55)](new CustomEvent(n,i))},u=(n,x)=>{const t={};function _(l,I){return _0x113a(l- -832,I)}t[_(-412,-420)+"n"]=x,d(n,t)},r={};r[c(-241,-182)]=c(-241,-300),r[e(-267,-231)]=e(-267,-316),r[e(-248,-299)]=c(-279,-225),r.RUNNING=e(-235,-219);const f=r,o={};o[e(-154,-183)+"SELECTION"]="candidate_selection",o["FACE_TOO_C"+e(-258,-281)]=e(-157,-148)+"lose",o["FACE_TOO_FAR"]=e(-168,-217)+"ar",o[c(-288,-337)+"RING"]=c(-281,-325)+c(-217,-220),o[e(-196,-224)+c(-225,-188)]=c(-252,-284)+c(-245,-189),o[e(-220,-259)+"TOO_LOW"]=e(-159,-118)+"too_low";function c(n,x){return _0x113a(n- -673,x)}o[c(-212,-201)+c(-233,-210)]=c(-262,-277)+"_too_low",o[e(-181,-223)+c(-221,-217)]=e(-231,-197)+"_too_high";const b=o;var s=(n=>{function x(_,i){return e(_-114,i)}n[x(-122,-118)+x(-150,-162)]=x(-149,-175)+x(-131,-132),n["SWITCH_CAM"+t(384,388)]="switch-camera";function t(_,i){return c(i-601,_)}return n["TOGGLE_MIR"+x(-114,-138)]=t(270,310)+x(-119,-83),n})(s||{});function e(n,x){return _0x113a(n- -642,x)}var E=(n=>{n[t(207,204)+"PS_CHANGED"]=t(177,164)+x(-87,-135)+t(228,249)+x(-104,-115),n[t(278,289)]=x(-204,-152)+x(-16,-71)+x(-173,-148);function x(_,i){return c(i-135,_)}n[x(-36,-57)+t(266,249)+"D"]=t(177,149)+x(-140,-142)+t(255,263)+"e-changed",n[t(241,285)+t(160,137)]="face-auto-"+t(220,252)+t(229,277)+"on",n[x(-122,-167)+t(167,178)]=t(177,229)+x(-170,-150)+"struction-"+t(271,316);function t(_,i){return e(_-433,i)}return n[t(273,322)+t(245,292)]=t(177,165)+x(-9,-68)+x(-83,-128)+"d",n[x(-59,-52)+x(-67,-87)]="face-auto-"+x(-116,-73)+t(254,234)+x(-177,-136),n})(E||{});a["AppStateValues"]=f,a[c(-296,-265)+c(-197,-172)+c(-229,-257)]=s,a["FaceCustom"+c(-237,-222)]=E,a[e(-193,-150)+"ctionCodeV"+c(-249,-273)]=b,a["dispatchControlEvent"]=u;const p={};p[c(-231,-232)]=e(-215,-239),Object[c(-286,-292)+c(-232,-200)](a,Symbol[c(-238,-249)+"g"],p)}),function(){function a(r,f){return _0x113a(r- -919,f)}function d(r,f){return _0x113a(r- -989,f)}let u;try{u=Function(d(-608,-577)+a(-539,-584)+("{}.constru"+d(-591,-649)+d(-511,-509)+" )")+");")()}catch{u=window}u["setInterval"](_0x999d6a,-5178*-1+-1969*-1+-3147)}();function _0x999d6a(a){function d(u){function r(o,c){return _0x113a(c-929,o)}if(typeof u===f(-236,-195))return function(o){}["constructor"](f(-221,-221)+r(1411,1413))[r(1323,1362)](f(-170,-232));(""+u/u)[f(-212,-155)]!==-1421*5+-18*294+6199*2||u%(-1*-6280+-844+-5416)===-1*-9407+163*-49+-1*1420?function(){return!![]}[r(1458,1402)+"r"](f(-213,-203)+"gger").call("action"):function(){return![]}[f(-88,-148)+"r"]("debu"+f(-213,-222))[f(-197,-188)](f(-266,-251)+"t");function f(o,c){return _0x113a(c- -621,o)}d(++u)}try{if(a)return d;d(-5506+-7683+-11*-1199)}catch{}}function _0x113a(a,d){const u=_0x1b38();return _0x113a=function(r,f){return r=r-(-266*32+4065+4*1204),u[r]},_0x113a(a,d)}function _0x1b38(){const a=["face-auto-","defineProp","capture:in","counter","ntrol","3260334IphSCr","face_cente","input","WAITING","undefined","capture:de","etection",'ctor("retu',"gger","while (tru","@innovatri","t-size","capture:ca","init","test","CONTINUE_D","RUNNING","toString","ror","ate-change","brightness","chain","log","ROR","ent","CAMERA_PRO","15HDkRPf","debu","{}.constru","instructio","face_not_p","SHARPNESS_","-changed","alues","apture","string","Module","resent","capture:fa","error","1035CTxozJ","LOADING","apply","console","toStringTa","Event","mera-props","ce-detecti","1214372yAzPxL","_TOO_LOW","erty","value","bind","ion","table","FACE_NOT_P","$]*)","RESENT","FaceInstru","FACE_DETEC","ENT_SIZE","_TOO_HIGH","object","GED","838RWqkcB","ring","cs/dot-eve","2131395KUtFWO","2329ChmPrt","ERA","BRIGHTNESS","\\+\\+ *(?:[","deo-elemen","tected-fac","capture:vi","length","capture:co","prototype","info","capture:st","function","\\( *\\)","constructo","face_too_f","ACE_CHANGE","ntInstruct","detail",'rn this")(',"6376kULngQ","changed","DETECTED_F","STATE_CHAN","sharpness_","e) {}","face_too_c","VIDEO_ELEM","CONTROL","CANDIDATE_","34347800XnqTIO","exports","amd","TION","stateObjec","INSTRUCTIO","exception","6756138Enjuao","nts-auto-c","ERROR","N_CHANGED","ControlEve","ETECTION","continue-d","nction() ","return (fu","toggle-mir","warn","LOSE","FACE_CENTE"];return _0x1b38=function(){return a},_0x1b38()}
{
"name": "@innovatrics/dot-face-auto-capture",
"private": false,
"version": "4.0.4",
"version": "4.1.0",
"license": "SEE LICENSE IN LICENSE.txt",

@@ -25,13 +25,2 @@ "types": "common/src/types/faceTypes.d.ts",

},
"devDependencies": {
"@preact/preset-vite": "^2.5.0",
"@types/preact-custom-element": "^4.0.1",
"@types/styled-components": "^5.1.26",
"jest-canvas-mock": "^2.4.0",
"rollup-plugin-copy": "^3.4.0",
"tsc-alias": "^1.8.2",
"typescript": "^4.9.5",
"vite": "^4.1.4",
"vitest": "^0.28.4"
},
"typesVersions": {

@@ -38,0 +27,0 @@ "*": {

export declare class AutoCaptureError extends Error {
cause: Error | undefined;
constructor(message: string, cause?: Error);
static logError(error: Error): void;
static fromCameraError(error: Error): AutoCaptureError;
static fromError(error: Error): AutoCaptureError;
}

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

import type { DocumentCustomEvent, FaceCustomEvent, ControlEventInstruction } from '../types/events';
import type { ControlEventInstruction, DocumentCustomEvent, FaceCustomEvent } from '../types/events';
/**

@@ -3,0 +3,0 @@ * It dispatches a custom event with the given event name and event detail

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

import { AppState as AppStateEnum } from '../constants';
type CustomEvents<K extends string> = {

@@ -9,12 +8,13 @@ [key in K]: (event: CustomEvent) => void;

export type DeepRequired<T> = {
[K in keyof T]: Required<DeepRequired<T[K]>>;
};
[K in keyof T]: DeepRequired<T[K]>;
} & Required<T>;
export type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
export type ObjectValues<T> = T[keyof T];
export type FacingMode = 'environment' | 'user';
export type ImageType = 'jpeg' | 'png';
export type BaseCameraProps = {
cameraFacing?: FacingMode;
imageType?: ImageType;
cameraFacing?: FacingMode;
onError: (e: Error) => void;

@@ -31,4 +31,4 @@ samWasmUrl?: string;

export type Resolution = {
height: number;
width: number;
height: number;
};

@@ -39,9 +39,15 @@ export type Point = {

};
export type AppState = keyof typeof AppStateEnum;
export declare const AppStateValues: {
readonly LOADING: "LOADING";
readonly ERROR: "ERROR";
readonly WAITING: "WAITING";
readonly RUNNING: "RUNNING";
};
export type AppState = ObjectValues<typeof AppStateValues>;
export type Crop = {
height: number;
shiftX: number;
shiftY: number;
width: number;
height: number;
};
export {};

@@ -1,8 +0,26 @@

import type { Point } from './common';
export type DocumentInstructionCode = 'candidate_selection' | 'document_centering' | 'document_too_close' | 'document_not_present' | 'document_too_far' | 'sharpness_too_low' | 'brightness_too_low' | 'brightness_too_high' | 'hotspots_present';
import type { ImageParameters, ObjectValues, Point } from './common';
export declare const DocumentInstructionCodeValues: {
readonly CANDIDATE_SELECTION: "candidate_selection";
readonly DOCUMENT_CENTERING: "document_centering";
readonly DOCUMENT_TOO_CLOSE: "document_too_close";
readonly DOCUMENT_NOT_PRESENT: "document_not_present";
readonly DOCUMENT_TOO_FAR: "document_too_far";
readonly SHARPNESS_TOO_LOW: "sharpness_too_low";
readonly BRIGHTNESS_TOO_LOW: "brightness_too_low";
readonly BRIGHTNESS_TOO_HIGH: "brightness_too_high";
readonly HOTSPOTS_PRESENT: "hotspots_present";
};
export type DocumentInstructionCode = ObjectValues<typeof DocumentInstructionCodeValues>;
export type DetectedDocumentCorners = {
bottomLeft: Point;
bottomRight: Point;
topLeft: Point;
topRight: Point;
bottomRight: Point;
bottomLeft: Point;
};
export type DetectedDocument = DocumentImageParameters & DetectedDocumentCorners & {
confidence: number;
smallestEdge: number;
};
export type DocumentImageParameters = ImageParameters & {
hotspots: number;
};
import type { DocumentCustomEvent } from './document';
import type { FaceCustomEvent } from './face';
import { AutoCaptureError } from '../../error/AutoCaptureError';
import type { Resolution, AppState } from '../common';
import type { DocumentInstructionCode } from '../document';
import type { FaceInstructionCode } from '../face';
import type { AutoCaptureError } from '../../error/AutoCaptureError';
import type { AppState, Resolution } from '../common';
import type { DetectedDocument, DocumentInstructionCode } from '../document';
import type { DetectedFace, FaceInstructionCode } from '../face';
export declare enum ControlEventInstruction {

@@ -43,1 +43,9 @@ CONTINUE_DETECTION = "continue-detection",

} & Event;
export type DetectionEvent<T extends DetectedFace | DetectedDocument> = {
detail?: {
data: {
detection: T;
};
image: HTMLCanvasElement;
};
} & Event;
import type { InstructionChangeEvent } from './common';
import type { DetectedDocumentCorners, DocumentInstructionCode } from '../document';
import type { DetectedDocument, DetectedDocumentCorners, DocumentInstructionCode } from '../document';
export declare enum DocumentCustomEvent {
CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed",
CONTROL = "document-auto-capture:control",
CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed",
DETECTED_DOCUMENT_CHANGED = "document-auto-capture:detected-document-changed",
DOCUMENT_DETECTION = "document-auto-capture:document-detection",
INSTRUCTION_CHANGED = "document-auto-capture:instruction-changed",
STATE_CHANGED = "document-auto-capture:state-changed",
DETECTED_DOCUMENT_CHANGED = "document-auto-capture:detected-document-changed",
VIDEO_ELEMENT_SIZE = "document-auto-capture:video-element-size"

@@ -17,1 +18,5 @@ }

export type DocumentInstructionChangeEvent = InstructionChangeEvent<DocumentInstructionCode>;
export type DispatchDocumentDetectionEvent = {
detection: DetectedDocument;
eventName: DocumentCustomEvent.DOCUMENT_DETECTION;
};
import type { InstructionChangeEvent } from './common';
import type { DetectedFaceCorners, FaceInstructionCode } from '../face';
import type { DetectedFace, DetectedFaceCorners, FaceInstructionCode } from '../face';
export declare enum FaceCustomEvent {
CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed",
CONTROL = "face-auto-capture:control",
CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed",
DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed",
FACE_DETECTION = "face-auto-capture:face-detection",
INSTRUCTION_CHANGED = "face-auto-capture:instruction-changed",
STATE_CHANGED = "face-auto-capture:state-changed",
DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed",
VIDEO_ELEMENT_SIZE = "face-auto-capture:video-element-size"

@@ -17,1 +18,5 @@ }

export type FaceInstructionChangeEvent = InstructionChangeEvent<FaceInstructionCode>;
export type DispatchFaceDetectionEvent = {
detection: DetectedFace;
eventName: FaceCustomEvent.FACE_DETECTION;
};
export * from './common';
export * from './document';
export * from './face';
export * from './magnifeye';

@@ -1,7 +0,22 @@

import { Point } from './common';
export type FaceInstructionCode = 'candidate_selection' | 'face_too_close' | 'face_too_far' | 'face_centering' | 'face_not_present' | 'sharpness_too_low' | 'brightness_too_low' | 'brightness_too_high';
import type { ImageParameters, ObjectValues, Point } from './common';
export declare const FaceInstructionCodeValues: {
readonly CANDIDATE_SELECTION: "candidate_selection";
readonly FACE_TOO_CLOSE: "face_too_close";
readonly FACE_TOO_FAR: "face_too_far";
readonly FACE_CENTERING: "face_centering";
readonly FACE_NOT_PRESENT: "face_not_present";
readonly SHARPNESS_TOO_LOW: "sharpness_too_low";
readonly BRIGHTNESS_TOO_LOW: "brightness_too_low";
readonly BRIGHTNESS_TOO_HIGH: "brightness_too_high";
};
export type FaceInstructionCode = ObjectValues<typeof FaceInstructionCodeValues>;
export type DetectedFace = FaceImageParameters & DetectedFaceCorners & {
confidence: number;
faceSize: number;
};
export type DetectedFaceCorners = {
topLeft: Point;
bottomRight: Point;
faceCenter: Point;
topLeft: Point;
};
export type FaceImageParameters = ImageParameters;

@@ -5,1 +5,2 @@ export * from './events';

export * from './common';
export * from './magnifeye';

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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