alphavalid-sdk 0.0.3 → 0.0.4
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/dist/alphavalid.es.js +1 -0
- package/dist/alphavalid.umd.js +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/package.json +2 -1
- package/tsconfig.json +6 -3
package/dist/alphavalid.es.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//#region src/index.ts
|
|
2
2
|
var e = class {
|
|
3
|
+
video;
|
|
3
4
|
async start(e) {
|
|
4
5
|
let t = await navigator.mediaDevices.getUserMedia({ video: { facingMode: "user" } });
|
|
5
6
|
this.video = document.createElement("video"), this.video.srcObject = t, this.video.autoplay = !0, this.video.playsInline = !0, e.container.appendChild(this.video);
|
package/dist/alphavalid.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AlphaValid={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.AlphaValid=class{async start(e){let t=await navigator.mediaDevices.getUserMedia({video:{facingMode:`user`}});this.video=document.createElement(`video`),this.video.srcObject=t,this.video.autoplay=!0,this.video.playsInline=!0,e.container.appendChild(this.video)}async capture(){let e=document.createElement(`canvas`);return e.width=this.video.videoWidth,e.height=this.video.videoHeight,e.getContext(`2d`)?.drawImage(this.video,0,0),new Promise(t=>{e.toBlob(e=>t(e),`image/jpeg`)})}}});
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.AlphaValid={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),e.AlphaValid=class{video;async start(e){let t=await navigator.mediaDevices.getUserMedia({video:{facingMode:`user`}});this.video=document.createElement(`video`),this.video.srcObject=t,this.video.autoplay=!0,this.video.playsInline=!0,e.container.appendChild(this.video)}async capture(){let e=document.createElement(`canvas`);return e.width=this.video.videoWidth,e.height=this.video.videoHeight,e.getContext(`2d`)?.drawImage(this.video,0,0),new Promise(t=>{e.toBlob(e=>t(e),`image/jpeg`)})}}});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,OAAO,CAAC,KAAK,CAAoB;IAE3B,KAAK,CAAC,OAAO,EAAE,GAAG;IAalB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAY/B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "alphavalid-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "SDK de validação facial e liveness",
|
|
5
5
|
"main": "dist/alphavalid.umd.js",
|
|
6
6
|
"module": "dist/alphavalid.es.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"build:all": "rm -rf dist && npm run build && npm run types"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
+
"@types/node": "^25.5.0",
|
|
14
15
|
"typescript": "^6.0.2",
|
|
15
16
|
"vite": "^8.0.2"
|
|
16
17
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "
|
|
3
|
+
"target": "ES2022",
|
|
4
4
|
"module": "ESNext",
|
|
5
|
-
"lib": ["DOM", "
|
|
5
|
+
"lib": ["DOM", "ES2022", "ESNext"],
|
|
6
6
|
|
|
7
7
|
"declaration": true,
|
|
8
8
|
"declarationMap": true,
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"rootDir": "src",
|
|
13
13
|
|
|
14
14
|
"strict": true,
|
|
15
|
-
"skipLibCheck": true
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
|
|
17
|
+
"types": [],
|
|
18
|
+
"moduleResolution": "Bundler"
|
|
16
19
|
},
|
|
17
20
|
"include": ["src"]
|
|
18
21
|
}
|