@ahmed_hani/dot-face-auto-capture 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +117 -0
- package/README.md +80 -0
- package/common/src/types/face.d.ts +61 -0
- package/dot-assets/face/dot-Bv3H1Zi5.js +7434 -0
- package/dot-assets/face/wasm/sam.wasm +0 -0
- package/dot-assets/face/wasm/sam_simd.wasm +0 -0
- package/dot-assets/wasm/dot_embedded_bg.wasm +0 -0
- package/events.mjs +50 -0
- package/events.umd.js +1 -0
- package/face/src/events.d.ts +5 -0
- package/index.mjs +18886 -0
- package/index.umd.js +89 -0
- package/package.json +75 -0
- package/ui-common/src/error/auto-capture-error.d.ts +7 -0
- package/ui-common/src/error/index.d.ts +1 -0
- package/ui-common/src/events/control.d.ts +9 -0
- package/ui-common/src/events/custom.d.ts +1 -0
- package/ui-common/src/types/common.d.ts +88 -0
- package/ui-common/src/types/document.d.ts +30 -0
- package/ui-common/src/types/events/common.d.ts +74 -0
- package/ui-common/src/types/events/document.d.ts +23 -0
- package/ui-common/src/types/events/eye-gaze.d.ts +4 -0
- package/ui-common/src/types/events/face.d.ts +21 -0
- package/ui-common/src/types/events/index.d.ts +8 -0
- package/ui-common/src/types/events/liveness.d.ts +13 -0
- package/ui-common/src/types/events/magnifeye.d.ts +5 -0
- package/ui-common/src/types/events/palm.d.ts +16 -0
- package/ui-common/src/types/events/smile.d.ts +8 -0
- package/ui-common/src/types/eye-gaze.d.ts +39 -0
- package/ui-common/src/types/face.d.ts +52 -0
- package/ui-common/src/types/index.d.ts +8 -0
- package/ui-common/src/types/magnifeye.d.ts +32 -0
- package/ui-common/src/types/palm.d.ts +44 -0
- package/ui-common/src/types/smile.d.ts +36 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/events.mjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const T = {};
|
|
2
|
+
T.CONTINUE_DETECTION = "continue-detection", T.SWITCH_CAMERA = "switch-camera", T.TOGGLE_MIRROR = "toggle-mirror";
|
|
3
|
+
const H = T, _ = {};
|
|
4
|
+
_.FIRST_FRAME = "first-frame", _.FIRST_VALID_FRAME = "first-valid-frame";
|
|
5
|
+
const l = _, O = {};
|
|
6
|
+
O.REQUEST_CAPTURE = "dot-custom-event:request-capture";
|
|
7
|
+
const R = O;
|
|
8
|
+
var A = ((t) => (t.CAMERA_PROPS_CHANGED = "document-auto-capture:camera-props-changed", t.CONTROL = "document-auto-capture:control", t.DETECTED_DOCUMENT_CHANGED = "document-auto-capture:detected-document-changed", t.DOCUMENT_DETECTION = "document-auto-capture:document-detection", t.INSTRUCTION_CHANGED = "document-auto-capture:instruction-changed", t.INSTRUCTION_ESCALATED = "document-auto-capture:instruction-escalated", t.STATE_CHANGED = "document-auto-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "document-auto-capture:video-element-size", t))(A || {}), S = ((t) => (t.CAMERA_PROPS_CHANGED = "face-auto-capture:camera-props-changed", t.CONTROL = "face-auto-capture:control", t.DETECTED_FACE_CHANGED = "face-auto-capture:detected-face-changed", t.FACE_DETECTION = "face-auto-capture:face-detection", t.INSTRUCTION_CHANGED = "face-auto-capture:instruction-changed", t.STATE_CHANGED = "face-auto-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "face-auto-capture:video-element-size", t))(S || {}), p = ((t) => (t.ANIMATION_END = "magnifeye-auto-capture:animation-end", t.CONTROL = "magnifeye-auto-capture:control", t.STATUS_CHANGED = "magnifeye-auto-capture:status-changed", t))(p || {}), I = ((t) => (t.CONTROL = "smile-auto-capture:control", t.INSTRUCTION_ESCALATED = "smile:instruction-escalated", t.STATUS_CHANGED = "smile-auto-capture:status-changed", t))(I || {}), d = ((t) => (t.CAMERA_PROPS_CHANGED = "palm-capture:camera-props-changed", t.CONTROL = "palm-capture:control", t.DETECTED_PALM_CHANGED = "palm-capture:detected-palm-changed", t.INSTRUCTION_CHANGED = "palm-capture:instruction-changed", t.STATE_CHANGED = "palm-capture:state-changed", t.VIDEO_ELEMENT_SIZE = "palm-capture:video-element-size", t))(d || {}), m = ((t) => (t.CONTROL = "eye-gaze-auto-capture:control", t.STATUS_CHANGED = "eye-gaze-auto-capture:status-changed", t))(m || {});
|
|
9
|
+
const N = (t, n) => {
|
|
10
|
+
const a = {};
|
|
11
|
+
a.detail = n, document.dispatchEvent(new CustomEvent(t, a));
|
|
12
|
+
}, G = (t, n) => {
|
|
13
|
+
const a = {};
|
|
14
|
+
a.instruction = n, N(t, a);
|
|
15
|
+
};
|
|
16
|
+
function g(t) {
|
|
17
|
+
const n = {};
|
|
18
|
+
n.instruction = t;
|
|
19
|
+
const a = n;
|
|
20
|
+
N(R.REQUEST_CAPTURE, a);
|
|
21
|
+
}
|
|
22
|
+
const s = {};
|
|
23
|
+
s.FRONT = "user", s.REAR = "environment";
|
|
24
|
+
const P = s, u = {};
|
|
25
|
+
u.AUTO_CAPTURE = "AUTO_CAPTURE", u.WAIT_FOR_REQUEST = "WAIT_FOR_REQUEST";
|
|
26
|
+
const L = u, c = {};
|
|
27
|
+
c.LOADING = "LOADING", c.ERROR = "ERROR", c.WAITING = "WAITING", c.RUNNING = "RUNNING";
|
|
28
|
+
const D = c, C = { ...D };
|
|
29
|
+
C.DONE = "DONE";
|
|
30
|
+
const U = C, i = {};
|
|
31
|
+
i.EYE_NOT_PRESENT = "eye_not_present";
|
|
32
|
+
const r = i, e = {};
|
|
33
|
+
e.CANDIDATE_SELECTION = "candidate_selection", e.FACE_TOO_CLOSE = "face_too_close", e.FACE_TOO_FAR = "face_too_far", e.FACE_CENTERING = "face_centering", e.FACE_NOT_PRESENT = "face_not_present", e.SHARPNESS_TOO_LOW = "sharpness_too_low", e.BRIGHTNESS_TOO_LOW = "brightness_too_low", e.BRIGHTNESS_TOO_HIGH = "brightness_too_high", e.DEVICE_PITCHED = "device_pitched", e.LEFT_EYE_NOT_PRESENT = "left_" + r.EYE_NOT_PRESENT, e.RIGHT_EYE_NOT_PRESENT = "right_" + r.EYE_NOT_PRESENT, e.MOUTH_NOT_PRESENT = "mouth_not_present", e.MOUTH_SCORE_TOO_HIGH = "mouth_score_too_high", e.MOUTH_SCORE_TOO_LOW = "mouth_score_too_low";
|
|
34
|
+
const o = e, E = {};
|
|
35
|
+
E.isPresent = o.FACE_NOT_PRESENT, E.isNotPitched = o.DEVICE_PITCHED, E.isNotSmall = o.FACE_TOO_FAR, E.isNotLarge = o.FACE_TOO_CLOSE, E.isNotOutOfBounds = o.FACE_CENTERING, E.isNotDim = o.BRIGHTNESS_TOO_LOW, E.isNotBright = o.BRIGHTNESS_TOO_HIGH, E.isSharp = o.SHARPNESS_TOO_LOW, E.isLeftEyePresent = o.LEFT_EYE_NOT_PRESENT, E.isRightEyePresent = o.RIGHT_EYE_NOT_PRESENT, E.isMouthPresent = o.MOUTH_NOT_PRESENT, E.isMouthScoreNotTooHigh = o.MOUTH_SCORE_TOO_HIGH, E.isMouthScoreNotTooLow = o.MOUTH_SCORE_TOO_LOW;
|
|
36
|
+
const f = E;
|
|
37
|
+
export {
|
|
38
|
+
D as AppStateValues,
|
|
39
|
+
L as CaptureMode,
|
|
40
|
+
R as ComponentCustomEvent,
|
|
41
|
+
H as ControlEventInstruction,
|
|
42
|
+
f as FaceCheckToInstructionCodeMap,
|
|
43
|
+
S as FaceCustomEvent,
|
|
44
|
+
o as FaceInstructionCodeValues,
|
|
45
|
+
P as FacingMode,
|
|
46
|
+
U as LivenessStateValues,
|
|
47
|
+
l as RequestCaptureInstruction,
|
|
48
|
+
g as dispatchCaptureEvent,
|
|
49
|
+
G as dispatchControlEvent
|
|
50
|
+
};
|
package/events.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,a){typeof exports=="object"&&typeof module<"u"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(e=typeof globalThis<"u"?globalThis:e||self,a(e["@innovatrics/dot-events-auto-capture"]={}))})(this,function(e){"use strict";const a={};a.CONTINUE_DETECTION="continue-detection",a.SWITCH_CAMERA="switch-camera",a.TOGGLE_MIRROR="toggle-mirror";const p=a,s={};s.FIRST_FRAME="first-frame",s.FIRST_VALID_FRAME="first-valid-frame";const I=s,i={};i.REQUEST_CAPTURE="dot-custom-event:request-capture";const O=i;var m=(t=>(t.CAMERA_PROPS_CHANGED="document-auto-capture:camera-props-changed",t.CONTROL="document-auto-capture:control",t.DETECTED_DOCUMENT_CHANGED="document-auto-capture:detected-document-changed",t.DOCUMENT_DETECTION="document-auto-capture:document-detection",t.INSTRUCTION_CHANGED="document-auto-capture:instruction-changed",t.INSTRUCTION_ESCALATED="document-auto-capture:instruction-escalated",t.STATE_CHANGED="document-auto-capture:state-changed",t.VIDEO_ELEMENT_SIZE="document-auto-capture:video-element-size",t))(m||{}),C=(t=>(t.CAMERA_PROPS_CHANGED="face-auto-capture:camera-props-changed",t.CONTROL="face-auto-capture:control",t.DETECTED_FACE_CHANGED="face-auto-capture:detected-face-changed",t.FACE_DETECTION="face-auto-capture:face-detection",t.INSTRUCTION_CHANGED="face-auto-capture:instruction-changed",t.STATE_CHANGED="face-auto-capture:state-changed",t.VIDEO_ELEMENT_SIZE="face-auto-capture:video-element-size",t))(C||{}),l=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.CONTROL="magnifeye-auto-capture:control",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(l||{}),h=(t=>(t.CONTROL="smile-auto-capture:control",t.INSTRUCTION_ESCALATED="smile:instruction-escalated",t.STATUS_CHANGED="smile-auto-capture:status-changed",t))(h||{}),D=(t=>(t.CAMERA_PROPS_CHANGED="palm-capture:camera-props-changed",t.CONTROL="palm-capture:control",t.DETECTED_PALM_CHANGED="palm-capture:detected-palm-changed",t.INSTRUCTION_CHANGED="palm-capture:instruction-changed",t.STATE_CHANGED="palm-capture:state-changed",t.VIDEO_ELEMENT_SIZE="palm-capture:video-element-size",t))(D||{}),H=(t=>(t.CONTROL="eye-gaze-auto-capture:control",t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(H||{});const N=(t,u)=>{const c={};c.detail=u,document.dispatchEvent(new CustomEvent(t,c))},f=(t,u)=>{const c={};c.instruction=u,N(t,c)};function g(t){const u={};u.instruction=t;const c=u;N(O.REQUEST_CAPTURE,c)}const _={};_.FRONT="user",_.REAR="environment";const v=_,r={};r.AUTO_CAPTURE="AUTO_CAPTURE",r.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const G=r,T={};T.LOADING="LOADING",T.ERROR="ERROR",T.WAITING="WAITING",T.RUNNING="RUNNING";const R=T,d={...R};d.DONE="DONE";const P=d,S={};S.EYE_NOT_PRESENT="eye_not_present";const A=S,o={};o.CANDIDATE_SELECTION="candidate_selection",o.FACE_TOO_CLOSE="face_too_close",o.FACE_TOO_FAR="face_too_far",o.FACE_CENTERING="face_centering",o.FACE_NOT_PRESENT="face_not_present",o.SHARPNESS_TOO_LOW="sharpness_too_low",o.BRIGHTNESS_TOO_LOW="brightness_too_low",o.BRIGHTNESS_TOO_HIGH="brightness_too_high",o.DEVICE_PITCHED="device_pitched",o.LEFT_EYE_NOT_PRESENT="left_"+A.EYE_NOT_PRESENT,o.RIGHT_EYE_NOT_PRESENT="right_"+A.EYE_NOT_PRESENT,o.MOUTH_NOT_PRESENT="mouth_not_present",o.MOUTH_SCORE_TOO_HIGH="mouth_score_too_high",o.MOUTH_SCORE_TOO_LOW="mouth_score_too_low";const n=o,E={};E.isPresent=n.FACE_NOT_PRESENT,E.isNotPitched=n.DEVICE_PITCHED,E.isNotSmall=n.FACE_TOO_FAR,E.isNotLarge=n.FACE_TOO_CLOSE,E.isNotOutOfBounds=n.FACE_CENTERING,E.isNotDim=n.BRIGHTNESS_TOO_LOW,E.isNotBright=n.BRIGHTNESS_TOO_HIGH,E.isSharp=n.SHARPNESS_TOO_LOW,E.isLeftEyePresent=n.LEFT_EYE_NOT_PRESENT,E.isRightEyePresent=n.RIGHT_EYE_NOT_PRESENT,E.isMouthPresent=n.MOUTH_NOT_PRESENT,E.isMouthScoreNotTooHigh=n.MOUTH_SCORE_TOO_HIGH,E.isMouthScoreNotTooLow=n.MOUTH_SCORE_TOO_LOW;const L=E;e.AppStateValues=R,e.CaptureMode=G,e.ComponentCustomEvent=O,e.ControlEventInstruction=p,e.FaceCheckToInstructionCodeMap=L,e.FaceCustomEvent=C,e.FaceInstructionCodeValues=n,e.FacingMode=v,e.LivenessStateValues=P,e.RequestCaptureInstruction=I,e.dispatchCaptureEvent=g,e.dispatchControlEvent=f,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|