@ahmed_hani/dot-document-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/document.d.ts +43 -0
- package/document/src/events.d.ts +5 -0
- package/dot-assets/document/dot-D3RXoL6u.js +7432 -0
- package/dot-assets/document/wasm/sam.wasm +0 -0
- package/dot-assets/document/wasm/sam_simd.wasm +0 -0
- package/dot-assets/wasm/dot_embedded_bg.wasm +0 -0
- package/events.mjs +48 -0
- package/events.umd.js +1 -0
- package/index.mjs +18797 -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,48 @@
|
|
|
1
|
+
const u = {};
|
|
2
|
+
u.CONTINUE_DETECTION = "continue-detection", u.SWITCH_CAMERA = "switch-camera", u.TOGGLE_MIRROR = "toggle-mirror";
|
|
3
|
+
const D = u, s = {};
|
|
4
|
+
s.FIRST_FRAME = "first-frame", s.FIRST_VALID_FRAME = "first-valid-frame";
|
|
5
|
+
const l = s, N = {};
|
|
6
|
+
N.REQUEST_CAPTURE = "dot-custom-event:request-capture";
|
|
7
|
+
const _ = N;
|
|
8
|
+
var i = ((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))(i || {}), A = ((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))(A || {}), R = ((t) => (t.ANIMATION_END = "magnifeye-auto-capture:animation-end", t.CONTROL = "magnifeye-auto-capture:control", t.STATUS_CHANGED = "magnifeye-auto-capture:status-changed", t))(R || {}), p = ((t) => (t.CONTROL = "smile-auto-capture:control", t.INSTRUCTION_ESCALATED = "smile:instruction-escalated", t.STATUS_CHANGED = "smile-auto-capture:status-changed", t))(p || {}), m = ((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))(m || {}), S = ((t) => (t.CONTROL = "eye-gaze-auto-capture:control", t.STATUS_CHANGED = "eye-gaze-auto-capture:status-changed", t))(S || {});
|
|
9
|
+
const O = (t, c) => {
|
|
10
|
+
const n = {};
|
|
11
|
+
n.detail = c, document.dispatchEvent(new CustomEvent(t, n));
|
|
12
|
+
}, G = (t, c) => {
|
|
13
|
+
const n = {};
|
|
14
|
+
n.instruction = c, O(t, n);
|
|
15
|
+
};
|
|
16
|
+
function g(t) {
|
|
17
|
+
const c = {};
|
|
18
|
+
c.instruction = t;
|
|
19
|
+
const n = c;
|
|
20
|
+
O(_.REQUEST_CAPTURE, n);
|
|
21
|
+
}
|
|
22
|
+
const T = {};
|
|
23
|
+
T.FRONT = "user", T.REAR = "environment";
|
|
24
|
+
const h = T, r = {};
|
|
25
|
+
r.AUTO_CAPTURE = "AUTO_CAPTURE", r.WAIT_FOR_REQUEST = "WAIT_FOR_REQUEST";
|
|
26
|
+
const H = r, E = {};
|
|
27
|
+
E.LOADING = "LOADING", E.ERROR = "ERROR", E.WAITING = "WAITING", E.RUNNING = "RUNNING";
|
|
28
|
+
const d = E, C = { ...d };
|
|
29
|
+
C.DONE = "DONE";
|
|
30
|
+
const U = C, e = {};
|
|
31
|
+
e.CANDIDATE_SELECTION = "candidate_selection", e.DOCUMENT_CENTERING = "document_centering", e.DOCUMENT_NOT_PRESENT = "document_not_present", e.DOCUMENT_TOO_FAR = "document_too_far", e.SHARPNESS_TOO_LOW = "sharpness_too_low", e.BRIGHTNESS_TOO_LOW = "brightness_too_low", e.BRIGHTNESS_TOO_HIGH = "brightness_too_high", e.HOTSPOTS_PRESENT = "hotspots_present";
|
|
32
|
+
const a = e, o = {};
|
|
33
|
+
o.isPresent = a.DOCUMENT_NOT_PRESENT, o.isNotSmall = a.DOCUMENT_TOO_FAR, o.isNotOutOfBounds = a.DOCUMENT_CENTERING, o.isSharp = a.SHARPNESS_TOO_LOW, o.isNotDim = a.BRIGHTNESS_TOO_LOW, o.isNotBright = a.BRIGHTNESS_TOO_HIGH, o.noHotspots = a.HOTSPOTS_PRESENT;
|
|
34
|
+
const f = o;
|
|
35
|
+
export {
|
|
36
|
+
d as AppStateValues,
|
|
37
|
+
H as CaptureMode,
|
|
38
|
+
_ as ComponentCustomEvent,
|
|
39
|
+
D as ControlEventInstruction,
|
|
40
|
+
f as DocumentCheckToInstructionCodeMap,
|
|
41
|
+
i as DocumentCustomEvent,
|
|
42
|
+
a as DocumentInstructionCodeValues,
|
|
43
|
+
h as FacingMode,
|
|
44
|
+
U as LivenessStateValues,
|
|
45
|
+
l as RequestCaptureInstruction,
|
|
46
|
+
g as dispatchCaptureEvent,
|
|
47
|
+
G as dispatchControlEvent
|
|
48
|
+
};
|
package/events.umd.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e["@innovatrics/dot-events-auto-capture"]={}))})(this,function(e){"use strict";const o={};o.CONTINUE_DETECTION="continue-detection",o.SWITCH_CAMERA="switch-camera",o.TOGGLE_MIRROR="toggle-mirror";const p=o,T={};T.FIRST_FRAME="first-frame",T.FIRST_VALID_FRAME="first-valid-frame";const A=T,C={};C.REQUEST_CAPTURE="dot-custom-event:request-capture";const N=C;var O=(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))(O||{}),R=(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))(R||{}),S=(t=>(t.ANIMATION_END="magnifeye-auto-capture:animation-end",t.CONTROL="magnifeye-auto-capture:control",t.STATUS_CHANGED="magnifeye-auto-capture:status-changed",t))(S||{}),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||{}),l=(t=>(t.CONTROL="eye-gaze-auto-capture:control",t.STATUS_CHANGED="eye-gaze-auto-capture:status-changed",t))(l||{});const d=(t,E)=>{const u={};u.detail=E,document.dispatchEvent(new CustomEvent(t,u))},f=(t,E)=>{const u={};u.instruction=E,d(t,u)};function h(t){const E={};E.instruction=t;const u=E;d(N.REQUEST_CAPTURE,u)}const r={};r.FRONT="user",r.REAR="environment";const v=r,i={};i.AUTO_CAPTURE="AUTO_CAPTURE",i.WAIT_FOR_REQUEST="WAIT_FOR_REQUEST";const g=i,s={};s.LOADING="LOADING",s.ERROR="ERROR",s.WAITING="WAITING",s.RUNNING="RUNNING";const _=s,m={..._};m.DONE="DONE";const G=m,n={};n.CANDIDATE_SELECTION="candidate_selection",n.DOCUMENT_CENTERING="document_centering",n.DOCUMENT_NOT_PRESENT="document_not_present",n.DOCUMENT_TOO_FAR="document_too_far",n.SHARPNESS_TOO_LOW="sharpness_too_low",n.BRIGHTNESS_TOO_LOW="brightness_too_low",n.BRIGHTNESS_TOO_HIGH="brightness_too_high",n.HOTSPOTS_PRESENT="hotspots_present";const a=n,c={};c.isPresent=a.DOCUMENT_NOT_PRESENT,c.isNotSmall=a.DOCUMENT_TOO_FAR,c.isNotOutOfBounds=a.DOCUMENT_CENTERING,c.isSharp=a.SHARPNESS_TOO_LOW,c.isNotDim=a.BRIGHTNESS_TOO_LOW,c.isNotBright=a.BRIGHTNESS_TOO_HIGH,c.noHotspots=a.HOTSPOTS_PRESENT;const H=c;e.AppStateValues=_,e.CaptureMode=g,e.ComponentCustomEvent=N,e.ControlEventInstruction=p,e.DocumentCheckToInstructionCodeMap=H,e.DocumentCustomEvent=O,e.DocumentInstructionCodeValues=a,e.FacingMode=v,e.LivenessStateValues=G,e.RequestCaptureInstruction=A,e.dispatchCaptureEvent=h,e.dispatchControlEvent=f,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|