@microblink/biometrics 1000.0.2 → 1000.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/README.md +3 -1
- package/dist/biometrics.js +19 -28
- package/package.json +4 -4
- package/types/index.rollup.d.ts +7 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Production consumer bundle sizes for `@microblink/biometrics`:
|
|
|
10
10
|
|
|
11
11
|
| Entrypoint | Minified | Gzip |
|
|
12
12
|
| ---------- | -------- | ------- |
|
|
13
|
-
| `root` | 26.
|
|
13
|
+
| `root` | 26.38 kB | 7.28 kB |
|
|
14
14
|
|
|
15
15
|
External packages and runtime assets such as workers, WASM, and models are excluded. Shared code is included in each entrypoint that loads it.
|
|
16
16
|
|
|
@@ -253,6 +253,8 @@ Every guided and headless capture returns `FaceCaptureResult`:
|
|
|
253
253
|
- `captureFrame` is the optional engine-produced JPEG frame for face matching.
|
|
254
254
|
- `livenessFrames` contains ordered engine-produced JPEG frames for liveness checks.
|
|
255
255
|
- `livenessBatchSignature` contains the optional batch signature.
|
|
256
|
+
- `signatureVersion` is the signature scheme of the signed frames.
|
|
257
|
+
- `captureFrameMetadata` is the JSON metadata for the signed `captureFrame`.
|
|
256
258
|
|
|
257
259
|
Frame and batch signatures are present only when the native engine produces them. When the engine does not produce capture or liveness frames, `captureFrame` is undefined and `livenessFrames` is empty.
|
|
258
260
|
|
package/dist/biometrics.js
CHANGED
|
@@ -185,17 +185,17 @@ function ve(e, t) {
|
|
|
185
185
|
return n({ sessionNumber: 0 });
|
|
186
186
|
}
|
|
187
187
|
//#endregion
|
|
188
|
-
//#region \0@oxc-project+runtime@0.
|
|
188
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/checkPrivateRedeclaration.js
|
|
189
189
|
function ye(e, t) {
|
|
190
190
|
if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
|
|
191
191
|
}
|
|
192
192
|
//#endregion
|
|
193
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
194
194
|
function be(e, t) {
|
|
195
195
|
ye(e, t), t.add(e);
|
|
196
196
|
}
|
|
197
197
|
//#endregion
|
|
198
|
-
//#region \0@oxc-project+runtime@0.
|
|
198
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/typeof.js
|
|
199
199
|
function y(e) {
|
|
200
200
|
"@babel/helpers - typeof";
|
|
201
201
|
return y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -205,7 +205,7 @@ function y(e) {
|
|
|
205
205
|
}, y(e);
|
|
206
206
|
}
|
|
207
207
|
//#endregion
|
|
208
|
-
//#region \0@oxc-project+runtime@0.
|
|
208
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPrimitive.js
|
|
209
209
|
function xe(e, t) {
|
|
210
210
|
if (y(e) != "object" || !e) return e;
|
|
211
211
|
var n = e[Symbol.toPrimitive];
|
|
@@ -217,13 +217,13 @@ function xe(e, t) {
|
|
|
217
217
|
return (t === "string" ? String : Number)(e);
|
|
218
218
|
}
|
|
219
219
|
//#endregion
|
|
220
|
-
//#region \0@oxc-project+runtime@0.
|
|
220
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/toPropertyKey.js
|
|
221
221
|
function Se(e) {
|
|
222
222
|
var t = xe(e, "string");
|
|
223
223
|
return y(t) == "symbol" ? t : t + "";
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
|
-
//#region \0@oxc-project+runtime@0.
|
|
226
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/defineProperty.js
|
|
227
227
|
function b(e, t, n) {
|
|
228
228
|
return (t = Se(t)) in e ? Object.defineProperty(e, t, {
|
|
229
229
|
value: n,
|
|
@@ -233,23 +233,23 @@ function b(e, t, n) {
|
|
|
233
233
|
}) : e[t] = n, e;
|
|
234
234
|
}
|
|
235
235
|
//#endregion
|
|
236
|
-
//#region \0@oxc-project+runtime@0.
|
|
236
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
237
237
|
function x(e, t, n) {
|
|
238
238
|
ye(e, t), t.set(e, n);
|
|
239
239
|
}
|
|
240
240
|
//#endregion
|
|
241
|
-
//#region \0@oxc-project+runtime@0.
|
|
241
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/assertClassBrand.js
|
|
242
242
|
function S(e, t, n) {
|
|
243
243
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
244
244
|
throw TypeError("Private element is not present on this object");
|
|
245
245
|
}
|
|
246
246
|
//#endregion
|
|
247
|
-
//#region \0@oxc-project+runtime@0.
|
|
247
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldGet2.js
|
|
248
248
|
function C(e, t) {
|
|
249
249
|
return e.get(S(e, t));
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
|
-
//#region \0@oxc-project+runtime@0.
|
|
252
|
+
//#region \0@oxc-project+runtime@0.154.0/helpers/esm/classPrivateFieldSet2.js
|
|
253
253
|
function w(e, t, n) {
|
|
254
254
|
return e.set(S(e, t), n), n;
|
|
255
255
|
}
|
|
@@ -265,8 +265,8 @@ function T() {
|
|
|
265
265
|
return new s("Session is finished", "SESSION_CLOSED");
|
|
266
266
|
}
|
|
267
267
|
var E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakSet(), we = class {
|
|
268
|
-
constructor(e, t = {}, n, r = () => () => void 0) {
|
|
269
|
-
be(this, V), b(this, "createCaptureSession", void 0), b(this, "config", void 0), b(this, "analytics", void 0), b(this, "subscribeDiagnostic", void 0), x(this, E, /* @__PURE__ */ new Set()), x(this, D, /* @__PURE__ */ new Set()), x(this, O, /* @__PURE__ */ new Set()), x(this, k, /* @__PURE__ */ new Set()), x(this, A, /* @__PURE__ */ new Set()), x(this, j, { phase: "idle" }), x(this, M, void 0), x(this, N, 0), x(this, P, 0), x(this, F, void 0), x(this, I, void 0), x(this, L, void 0), x(this, R, void 0), x(this, z, void 0), x(this, B, void 0), this.createCaptureSession = e, this.config = t, this.analytics = n, this.subscribeDiagnostic = r, S(V, this, Oe).call(this);
|
|
268
|
+
constructor(e, t = {}, n, r = () => () => void 0, i) {
|
|
269
|
+
be(this, V), b(this, "createCaptureSession", void 0), b(this, "config", void 0), b(this, "analytics", void 0), b(this, "subscribeDiagnostic", void 0), b(this, "cameraCaptureHooks", void 0), x(this, E, /* @__PURE__ */ new Set()), x(this, D, /* @__PURE__ */ new Set()), x(this, O, /* @__PURE__ */ new Set()), x(this, k, /* @__PURE__ */ new Set()), x(this, A, /* @__PURE__ */ new Set()), x(this, j, { phase: "idle" }), x(this, M, void 0), x(this, N, 0), x(this, P, 0), x(this, F, void 0), x(this, I, void 0), x(this, L, void 0), x(this, R, void 0), x(this, z, void 0), x(this, B, void 0), this.createCaptureSession = e, this.config = t, this.analytics = n, this.subscribeDiagnostic = r, this.cameraCaptureHooks = i, S(V, this, Oe).call(this);
|
|
270
270
|
}
|
|
271
271
|
getState() {
|
|
272
272
|
return C(j, this);
|
|
@@ -283,6 +283,9 @@ var E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /*
|
|
|
283
283
|
track: t
|
|
284
284
|
} : void 0), C(I, this)?.setCameraSource(e, t);
|
|
285
285
|
}
|
|
286
|
+
getCameraCaptureHooks() {
|
|
287
|
+
return this.cameraCaptureHooks?.();
|
|
288
|
+
}
|
|
286
289
|
setCaptureTimeoutPaused(e) {
|
|
287
290
|
C(j, this).phase === "capturing" && C(I, this)?.setCaptureTimeoutPaused(e);
|
|
288
291
|
}
|
|
@@ -513,22 +516,14 @@ var Ve = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), Ue =
|
|
|
513
516
|
o = !0, i(S(Y, this, Qe).call(this, t));
|
|
514
517
|
}, a) : void 0;
|
|
515
518
|
o && i(S(Y, this, Qe).call(this, t)), e.then((e) => {
|
|
516
|
-
|
|
517
|
-
n && Promise.resolve().then(() => n(e)).catch(() => void 0);
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
clearTimeout(s), r(e);
|
|
519
|
+
o ? n && Promise.resolve().then(() => n(e)).catch(() => void 0) : (clearTimeout(s), r(e));
|
|
521
520
|
}, (e) => {
|
|
522
521
|
o || (clearTimeout(s), i(e));
|
|
523
522
|
});
|
|
524
523
|
});
|
|
525
524
|
}
|
|
526
525
|
async waitForCleanup(e, t) {
|
|
527
|
-
|
|
528
|
-
e.catch(() => void 0);
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
await this.wait(e).catch(() => void 0);
|
|
526
|
+
t.code === "INITIALIZATION_TIMEOUT" ? e.catch(() => void 0) : await this.wait(e).catch(() => void 0);
|
|
532
527
|
}
|
|
533
528
|
reportError(e, t = "sdk") {
|
|
534
529
|
return S(Y, this, Ze).call(this, _(e, {
|
|
@@ -605,7 +600,7 @@ var X = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Q = /*
|
|
|
605
600
|
b(this, "subscribeDiagnostic", void 0), b(this, "flushDiagnostics", void 0), x(this, X, void 0), x(this, Z, void 0), x(this, Q, void 0), this.subscribeDiagnostic = n, this.flushDiagnostics = r, w(X, this, e), w(Z, this, t);
|
|
606
601
|
}
|
|
607
602
|
startSession(e = {}) {
|
|
608
|
-
return new we(() => C(X, this).startSession(e.captureFace?.thresholds), e, C(Z, this), this.subscribeDiagnostic);
|
|
603
|
+
return new we(() => C(X, this).startSession(e.captureFace?.thresholds), e, C(Z, this), this.subscribeDiagnostic, () => C(X, this).getCameraCaptureHooks());
|
|
609
604
|
}
|
|
610
605
|
close() {
|
|
611
606
|
return C(Q, this) ?? w(Q, this, (async () => {
|
|
@@ -679,11 +674,7 @@ function at(e, ...t) {
|
|
|
679
674
|
}
|
|
680
675
|
}
|
|
681
676
|
async function ot(e, t) {
|
|
682
|
-
|
|
683
|
-
await e.startCameraStream({ preferredCamera: (e) => e.find((e) => e.deviceInfo.deviceId === t) });
|
|
684
|
-
return;
|
|
685
|
-
}
|
|
686
|
-
await e.startCameraStream({ preferredFacing: "front" });
|
|
677
|
+
t && (await e.getCameraDevices()).some((e) => e.deviceInfo.deviceId === t) ? await e.startCameraStream({ preferredCamera: (e) => e.find((e) => e.deviceInfo.deviceId === t) }) : await e.startCameraStream({ preferredFacing: "front" });
|
|
687
678
|
}
|
|
688
679
|
async function st(e) {
|
|
689
680
|
let t = new Xe({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microblink/biometrics",
|
|
3
|
-
"version": "1000.0.
|
|
3
|
+
"version": "1000.0.4",
|
|
4
4
|
"author": "Microblink",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/biometrics.js",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"solid-zustand": "^2.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@microblink/biometrics-core": "1000.0.
|
|
21
|
-
"@microblink/biometrics-ux-manager": "1000.0.
|
|
22
|
-
"@microblink/camera-manager": "^8.
|
|
20
|
+
"@microblink/biometrics-core": "1000.0.4",
|
|
21
|
+
"@microblink/biometrics-ux-manager": "1000.0.4",
|
|
22
|
+
"@microblink/camera-manager": "^8.2.0"
|
|
23
23
|
},
|
|
24
24
|
"access": "public",
|
|
25
25
|
"types": "./types/index.rollup.d.ts",
|
package/types/index.rollup.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BiometricsDiagnosticCallback, BiometricsDiagnosticCallback as BiometricsDiagnosticCallback$1, BiometricsDiagnosticComponent, BiometricsDiagnosticEvent, BiometricsDiagnosticPhase, BiometricsDiagnosticResource, BiometricsDiagnosticStatus, BiometricsError, BiometricsError as BiometricsError$1, BiometricsErrorCode, BiometricsErrorComponent, BiometricsErrorOptions, BiometricsErrorStage, BiometricsFace, BiometricsResourceKind, BiometricsResourceKind as CaptureBiometricsResourceKind, BiometricsSupportCheck, BiometricsSupportCheckId, BiometricsSupportCheckStatus, BiometricsSupportReport, BrowserStorageSupport, CaptureFaceConfig, CaptureFaceConfig as CaptureFaceConfig$1, CaptureFrame, CaptureLogLevel, CaptureSessionState, CaptureSignature, CapturedImage, CheckBiometricsSupportOptions, ConfigurationError, DerivedDeviceInfo, DeviceInfo, DeviceScreenInfo, FaceAnalysisSessionSettings, FaceCaptureResult, FaceCaptureResult as FaceCaptureResult$1, FaceLandmarks, FaceLandmarks as FaceLandmarks$1, FormFactor, GpuInfo, ImageOrigin, LicenseError, LivenessFrame, LivenessFrameQuality, PermissionError, SessionError, UADataValues, UnifiedFeedback, UnifiedFeedback as UnifiedFeedback$1, WasmVariant, WasmVariant as WasmVariant$1, checkBiometricsSupport, createDerivedDeviceInfo, getBiometricsFaceFromCaptureResult, getDeviceInfo, getUserAgentData, isFaceCaptureResult, normalizeBiometricsError } from "@microblink/biometrics-core";
|
|
2
2
|
import { FeedbackUiOptions, LocaleRecord, LocalizationStrings, PartialLocalizationStrings } from "@microblink/biometrics-ux-manager/ui";
|
|
3
|
+
import { CameraCaptureHooks } from "@microblink/camera-manager/core";
|
|
3
4
|
import { CameraManagerUiOptions } from "@microblink/camera-manager/ui";
|
|
4
5
|
//#region ../analytics/types/ping/ping.browser.device.info.d.ts
|
|
5
6
|
type PingBrowserDeviceInfoData = {
|
|
@@ -317,6 +318,12 @@ type BiometricsSession = {
|
|
|
317
318
|
processFrame(imageData: ImageData): Promise<ArrayBuffer>;
|
|
318
319
|
/** Set the camera source used by subsequent capture attempts. */
|
|
319
320
|
setCameraSource(videoElement: HTMLVideoElement | undefined, track: MediaStreamTrack | undefined): void;
|
|
321
|
+
/**
|
|
322
|
+
* Provides camera operations for SDK-managed capture.
|
|
323
|
+
*
|
|
324
|
+
* @internal
|
|
325
|
+
*/
|
|
326
|
+
getCameraCaptureHooks?(): CameraCaptureHooks | undefined;
|
|
320
327
|
/** Pauses or resumes the active capture attempt's timeout. */
|
|
321
328
|
setCaptureTimeoutPaused(paused: boolean): void;
|
|
322
329
|
/** Starts face capture. */
|