@microblink/blinkid-core 7.3.2 → 7.4.1
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/blinkid-core.js +16 -0
- package/dist/blinkid-core.js.map +1 -1
- package/dist/resources/blinkid-worker.js +59 -18
- package/dist/resources/full/advanced/BlinkIdModule.data +0 -0
- package/dist/resources/full/advanced/BlinkIdModule.js +120 -122
- package/dist/resources/full/advanced/BlinkIdModule.wasm +0 -0
- package/dist/resources/full/advanced-threads/BlinkIdModule.data +0 -0
- package/dist/resources/full/advanced-threads/BlinkIdModule.js +144 -147
- package/dist/resources/full/advanced-threads/BlinkIdModule.wasm +0 -0
- package/dist/resources/full/basic/BlinkIdModule.data +0 -0
- package/dist/resources/full/basic/BlinkIdModule.js +118 -120
- package/dist/resources/full/basic/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/advanced/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/advanced/BlinkIdModule.js +119 -121
- package/dist/resources/lightweight/advanced/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.js +143 -147
- package/dist/resources/lightweight/advanced-threads/BlinkIdModule.wasm +0 -0
- package/dist/resources/lightweight/basic/BlinkIdModule.data +0 -0
- package/dist/resources/lightweight/basic/BlinkIdModule.js +117 -119
- package/dist/resources/lightweight/basic/BlinkIdModule.wasm +0 -0
- package/package.json +1 -1
- package/types/BlinkIdCore.d.ts +17 -3
- package/types/BlinkIdCore.d.ts.map +1 -1
- package/types/createCustomImageData.d.ts +6 -8
- package/types/createCustomImageData.d.ts.map +1 -1
- package/types/createProxyWorker.d.ts +6 -0
- package/types/createProxyWorker.d.ts.map +1 -1
- package/types/defaultSessionSettings.d.ts +8 -0
- package/types/defaultSessionSettings.d.ts.map +1 -1
- package/types/getCrossOriginWorkerURL.d.ts +15 -0
- package/types/getCrossOriginWorkerURL.d.ts.map +1 -1
- package/types/getUserId.d.ts +4 -1
- package/types/getUserId.d.ts.map +1 -1
- package/types/index.d.ts +7 -0
- package/types/index.d.ts.map +1 -1
- package/types/index.rollup.d.ts +469 -106
- package/types/utils.d.ts +32 -0
- package/types/utils.d.ts.map +1 -1
package/types/BlinkIdCore.d.ts
CHANGED
|
@@ -4,13 +4,27 @@
|
|
|
4
4
|
import type { BlinkIdWorkerInitSettings, BlinkIdWorkerProxy, ProgressStatusCallback } from "@microblink/blinkid-worker";
|
|
5
5
|
import type { SetOptional, Simplify } from "type-fest";
|
|
6
6
|
import { Remote } from "comlink";
|
|
7
|
+
/**
|
|
8
|
+
* Configuration options for initializing the BlinkID core.
|
|
9
|
+
*
|
|
10
|
+
* This type extends the BlinkIdWorkerInitSettings type by making the userId and useLightweightBuild properties optional.
|
|
11
|
+
* It allows for partial configuration of the initialization settings.
|
|
12
|
+
*/
|
|
7
13
|
export type BlinkIdInitSettings = SetOptional<BlinkIdWorkerInitSettings, "userId" | "useLightweightBuild">;
|
|
14
|
+
/**
|
|
15
|
+
* Represents the BlinkID core instance.
|
|
16
|
+
*
|
|
17
|
+
* This type extends the Remote type from Comlink, which is used to proxy calls to the BlinkID worker.
|
|
18
|
+
* It simplifies the type to remove unnecessary complexity.
|
|
19
|
+
*/
|
|
8
20
|
export type BlinkIdCore = Simplify<Remote<BlinkIdWorkerProxy>>;
|
|
9
21
|
/**
|
|
10
|
-
* Creates
|
|
22
|
+
* Creates and initializes a BlinkID core instance.
|
|
11
23
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
24
|
+
* @param settings - Configuration for BlinkID initialization including license key and resources location
|
|
25
|
+
* @param progressCallback - Optional callback for tracking resource download progress (WASM, data files)
|
|
26
|
+
* @returns Promise that resolves with initialized BlinkID core instance
|
|
27
|
+
* @throws Error if initialization fails
|
|
14
28
|
*/
|
|
15
29
|
export declare function loadBlinkIdCore(settings: BlinkIdInitSettings, progressCallback?: ProgressStatusCallback): Promise<BlinkIdCore>;
|
|
16
30
|
//# sourceMappingURL=BlinkIdCore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlinkIdCore.d.ts","sourceRoot":"","sources":["../src/BlinkIdCore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAS,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BlinkIdCore.d.ts","sourceRoot":"","sources":["../src/BlinkIdCore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGvD,OAAO,EAAS,MAAM,EAAE,MAAM,SAAS,CAAC;AAGxC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAC3C,yBAAyB,EAEzB,QAAQ,GAAG,qBAAqB,CACjC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE/D;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,mBAAmB,EAC7B,gBAAgB,CAAC,EAAE,sBAAsB,GACxC,OAAO,CAAC,WAAW,CAAC,CAqCtB"}
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Creates a custom ImageData object with the same properties as the original ImageData.
|
|
6
|
+
* This is a workaround for the performance issue in Chromium browsers.
|
|
7
|
+
*
|
|
8
|
+
* @param imageData - The original ImageData object to be wrapped.
|
|
9
|
+
* @returns A custom ImageData object with the same properties.
|
|
7
10
|
*/
|
|
8
|
-
export declare function createCustomImageData(imageData: ImageData):
|
|
9
|
-
data: Uint8ClampedArray<ArrayBufferLike>;
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
colorSpace: PredefinedColorSpace;
|
|
13
|
-
};
|
|
11
|
+
export declare function createCustomImageData(imageData: ImageData): ImageData;
|
|
14
12
|
//# sourceMappingURL=createCustomImageData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCustomImageData.d.ts","sourceRoot":"","sources":["../src/createCustomImageData.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"createCustomImageData.d.ts","sourceRoot":"","sources":["../src/createCustomImageData.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CA2BrE"}
|
|
@@ -10,5 +10,11 @@ import type { BlinkIdWorkerProxy } from "@microblink/blinkid-worker";
|
|
|
10
10
|
* @returns a Comlink-proxied instance of the Web Worker
|
|
11
11
|
*/
|
|
12
12
|
export declare const createProxyWorker: (resourcesLocation?: string) => Promise<import("comlink").Remote<BlinkIdWorkerProxy>>;
|
|
13
|
+
/**
|
|
14
|
+
* Represents a remote worker instance.
|
|
15
|
+
*
|
|
16
|
+
* This type is the return type of the createProxyWorker function, which creates a Comlink-proxied Web Worker.
|
|
17
|
+
* It simplifies the type to remove unnecessary complexity.
|
|
18
|
+
*/
|
|
13
19
|
export type RemoteWorker = ReturnType<typeof createProxyWorker>;
|
|
14
20
|
//# sourceMappingURL=createProxyWorker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProxyWorker.d.ts","sourceRoot":"","sources":["../src/createProxyWorker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA8DrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,oBAAmB,MAA6B,0DAuBjD,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"createProxyWorker.d.ts","sourceRoot":"","sources":["../src/createProxyWorker.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AA8DrE;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAC5B,oBAAmB,MAA6B,0DAuBjD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -2,5 +2,13 @@
|
|
|
2
2
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { BlinkIdSessionSettings } from "@microblink/blinkid-wasm";
|
|
5
|
+
/**
|
|
6
|
+
* Default session settings for BlinkID core.
|
|
7
|
+
*
|
|
8
|
+
* This is the default session settings for BlinkID core.
|
|
9
|
+
* It is used to initialize the BlinkID core instance, unless overridden by the user.
|
|
10
|
+
*
|
|
11
|
+
* @see BlinkIdSessionSettings for more details.
|
|
12
|
+
*/
|
|
5
13
|
export declare const defaultSessionSettings: BlinkIdSessionSettings;
|
|
6
14
|
//# sourceMappingURL=defaultSessionSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultSessionSettings.d.ts","sourceRoot":"","sources":["../src/defaultSessionSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,sBAAsB,EAAE,sBAwCpC,CAAC"}
|
|
1
|
+
{"version":3,"file":"defaultSessionSettings.d.ts","sourceRoot":"","sources":["../src/defaultSessionSettings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,sBAwCpC,CAAC"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* Options for the getCrossOriginWorkerURL function.
|
|
6
|
+
*
|
|
7
|
+
* @param skipSameOrigin - If true, the function will return the original URL if it is same-origin.
|
|
8
|
+
* @param useBlob - If true, the function will return a blob URL.
|
|
9
|
+
*/
|
|
4
10
|
type Options = {
|
|
11
|
+
/** If true, the function will return the original URL if it is same-origin. */
|
|
5
12
|
skipSameOrigin?: boolean;
|
|
13
|
+
/** If true, the function will return a blob URL if not same-origin. */
|
|
6
14
|
useBlob?: boolean;
|
|
7
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Gets a cross-origin worker URL as a data URL or blob URL. If the URL is same-origin, it will return the original URL.
|
|
18
|
+
*
|
|
19
|
+
* @param originalWorkerUrl - The original worker URL.
|
|
20
|
+
* @param _options - The options for the worker.
|
|
21
|
+
* @returns A promise that resolves with the cross-origin worker URL.
|
|
22
|
+
*/
|
|
8
23
|
export declare const getCrossOriginWorkerURL: (originalWorkerUrl: string, _options?: Options) => Promise<string>;
|
|
9
24
|
export {};
|
|
10
25
|
//# sourceMappingURL=getCrossOriginWorkerURL.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCrossOriginWorkerURL.d.ts","sourceRoot":"","sources":["../src/getCrossOriginWorkerURL.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,KAAK,OAAO,GAAG;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,MAAM,EACzB,WAAU,OAAY,
|
|
1
|
+
{"version":3,"file":"getCrossOriginWorkerURL.d.ts","sourceRoot":"","sources":["../src/getCrossOriginWorkerURL.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;;GAKG;AACH,KAAK,OAAO,GAAG;IACb,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,uEAAuE;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,MAAM,EACzB,WAAU,OAAY,oBA4DvB,CAAC"}
|
package/types/getUserId.d.ts
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Gets the user id from local storage, or generates a new one
|
|
5
|
+
* Gets the user id from local storage, or generates a new one.
|
|
6
|
+
*
|
|
7
|
+
* This is a workaround for the lack of a user id in the worker scope.
|
|
8
|
+
*
|
|
6
9
|
* @returns a unique user id
|
|
7
10
|
*/
|
|
8
11
|
export declare function getUserId(): string;
|
package/types/getUserId.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUserId.d.ts","sourceRoot":"","sources":["../src/getUserId.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH
|
|
1
|
+
{"version":3,"file":"getUserId.d.ts","sourceRoot":"","sources":["../src/getUserId.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH;;;;;;GAMG;AACH,wBAAgB,SAAS,WAgBxB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,YAQ/B"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2025 Microblink Ltd. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
+
/**
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* Core functionality of BlinkID SDK - provides essential document scanning capabilities and worker management.
|
|
7
|
+
* This package serves as the foundation for document scanning, handling WASM initialization, worker communication,
|
|
8
|
+
* and core scanning operations.
|
|
9
|
+
*/
|
|
4
10
|
import { WorkerScanningSession } from "@microblink/blinkid-worker";
|
|
5
11
|
import { Remote } from "comlink";
|
|
6
12
|
export * from "./BlinkIdCore";
|
|
@@ -12,6 +18,7 @@ export * from "./getUserId";
|
|
|
12
18
|
export * from "./utils";
|
|
13
19
|
export type * from "@microblink/blinkid-wasm";
|
|
14
20
|
export type * from "@microblink/blinkid-worker";
|
|
21
|
+
/** Represents a remote scanning session. */
|
|
15
22
|
export type RemoteScanningSession = Remote<WorkerScanningSession>;
|
|
16
23
|
declare const testSymbol: unique symbol;
|
|
17
24
|
declare global {
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAExB,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,4BAA4B,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAIlE,QAAA,MAAM,UAAU,eAAW,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,gBAAgB,EAAE,OAAO,UAAU,CAAC;CACzC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAExB,mBAAmB,0BAA0B,CAAC;AAC9C,mBAAmB,4BAA4B,CAAC;AAEhD,4CAA4C;AAC5C,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAIlE,QAAA,MAAM,UAAU,eAAW,CAAC;AAE5B,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,gBAAgB,EAAE,OAAO,UAAU,CAAC;CACzC"}
|