@microblink/blinkid-core 7.0.0-next.9 → 7.0.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.
Files changed (44) hide show
  1. package/README.md +45 -30
  2. package/dist/blinkid-core.js +351 -510
  3. package/dist/resources/blinkid-worker.js +647 -2
  4. package/dist/resources/full/advanced/{BlinkIDWasmSDK.data → BlinkIdModule.data} +0 -0
  5. package/dist/resources/full/advanced/BlinkIdModule.js +153 -0
  6. package/dist/resources/full/advanced/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  7. package/dist/resources/full/{basic/BlinkIDWasmSDK.data → advanced-threads/BlinkIdModule.data} +0 -0
  8. package/dist/resources/full/advanced-threads/BlinkIdModule.js +173 -0
  9. package/dist/resources/full/advanced-threads/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  10. package/dist/resources/full/advanced-threads/BlinkIdModule.worker.mjs +1 -0
  11. package/dist/resources/full/{advanced-threads/BlinkIDWasmSDK.data → basic/BlinkIdModule.data} +0 -0
  12. package/dist/resources/full/basic/BlinkIdModule.js +153 -0
  13. package/dist/resources/full/basic/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  14. package/dist/resources/lightweight/advanced/BlinkIdModule.data +0 -0
  15. package/dist/resources/lightweight/advanced/BlinkIdModule.js +153 -0
  16. package/dist/resources/lightweight/advanced/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  17. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.data +0 -0
  18. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.js +172 -0
  19. package/dist/resources/lightweight/advanced-threads/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  20. package/dist/resources/lightweight/advanced-threads/BlinkIdModule.worker.mjs +1 -0
  21. package/dist/resources/lightweight/basic/BlinkIdModule.data +0 -0
  22. package/dist/resources/lightweight/basic/BlinkIdModule.js +153 -0
  23. package/dist/resources/lightweight/basic/{BlinkIDWasmSDK.wasm → BlinkIdModule.wasm} +0 -0
  24. package/package.json +4 -4
  25. package/types/BlinkIdCore.d.ts +9 -52
  26. package/types/BlinkIdCore.d.ts.map +1 -1
  27. package/types/createProxyWorker.d.ts +1 -1
  28. package/types/createProxyWorker.d.ts.map +1 -1
  29. package/types/getCrossOriginWorkerURL.d.ts.map +1 -1
  30. package/types/index.d.ts +5 -2
  31. package/types/index.d.ts.map +1 -1
  32. package/types/index.rollup.d.ts +2052 -2989
  33. package/dist/resources/BlinkIDWasmSDK.worker.min.js +0 -1
  34. package/dist/resources/full/advanced/BlinkIDWasmSDK.js +0 -174
  35. package/dist/resources/full/advanced-threads/BlinkIDWasmSDK.js +0 -193
  36. package/dist/resources/full/advanced-threads/BlinkIDWasmSDK.worker.js +0 -1
  37. package/dist/resources/full/basic/BlinkIDWasmSDK.js +0 -174
  38. package/dist/resources/lightweight/advanced/BlinkIDWasmSDK.data +0 -0
  39. package/dist/resources/lightweight/advanced/BlinkIDWasmSDK.js +0 -173
  40. package/dist/resources/lightweight/advanced-threads/BlinkIDWasmSDK.data +0 -0
  41. package/dist/resources/lightweight/advanced-threads/BlinkIDWasmSDK.js +0 -193
  42. package/dist/resources/lightweight/advanced-threads/BlinkIDWasmSDK.worker.js +0 -1
  43. package/dist/resources/lightweight/basic/BlinkIDWasmSDK.data +0 -0
  44. package/dist/resources/lightweight/basic/BlinkIDWasmSDK.js +0 -173
package/README.md CHANGED
@@ -1,56 +1,71 @@
1
- # BlinkID Core
1
+ # @microblink/blinkid-core
2
2
 
3
- `@microblink/blinkid-core` provides the core BlinkID functionality.
3
+ This package provides the core BlinkID functionality for browser-based document scanning. It exposes a low-level API for initializing and controlling the BlinkID engine, managing sessions, and processing images. It can be used directly by end users for advanced or custom integrations, or as a dependency of higher-level packages such as [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid).
4
4
 
5
- ## Before you start
5
+ ## Overview
6
6
 
7
- `@microblink/blinkid-core` is a part of `@microblink/blinkid-next`. All packages in the monorepo (TODO: add link) are currently in a prerelease stage.
8
-
9
- ## Quick start
10
-
11
- See the example apps in the `apps/examples` directory in the github repository (TODO: link)
7
+ - Provides the main API for BlinkID scanning and recognition in the browser.
8
+ - Handles initialization, licensing, and session management.
9
+ - Can be used directly by end users for advanced use cases.
10
+ - Used internally by [`@microblink/blinkid`](https://www.npmjs.com/package/@microblink/blinkid).
12
11
 
13
12
  ## Installation
14
13
 
15
- `blinkid-core` is available on the npm registry and can be installed using a package manager, using the `@next` dist tag:
14
+ Install from npm using your preferred package manager:
16
15
 
17
16
  ```sh
18
- npm install @microblink/blinkid-core@next # or yarn or pnpm
17
+ npm install @microblink/blinkid-core
18
+ # or
19
+ yarn add @microblink/blinkid-core
20
+ # or
21
+ pnpm add @microblink/blinkid-core
19
22
  ```
20
23
 
21
- ## Environment & Setup
24
+ ## Usage
22
25
 
23
- BlinkID Core is an ESM-only published package for use in browsers using a bundler such as Vite, or by including them directly via [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html) in your HTML.
26
+ You can use `@microblink/blinkid-core` directly in your project for custom integrations. See the example apps in the `apps/examples` directory in the GitHub repository for usage details.
24
27
 
25
- Alternatively, you can use it via [esm.sh](https://esm.sh/) that allows you to import JavaScript modules from http URLs without a build step.
28
+ ## Environment & Setup
26
29
 
27
- If used in the `blinkid-next-monorepo` from github, read the usage instructions in its root (TODO: link).
30
+ - ESM-only: Use in browsers with a bundler (e.g., Vite) or via [`<script type="module">`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html).
31
+ - Can also be used via [esm.sh](https://esm.sh/) for direct HTTP imports.
28
32
 
29
- ### Licence key
33
+ ### License key
30
34
 
31
- In order to use BlinkID, you need to have a valid licence key. You can request a free trial license key, after you register, at [Microblink Developer Hub](https://account.microblink.com/signin).
35
+ A valid license key is required. Request a free trial at [Microblink Developer Hub](https://account.microblink.com/signin).
32
36
 
33
- ### Hosting the neccessary resources
37
+ ### Hosting resources
34
38
 
35
- In order to use BlinkID Core, you need to host the accompanying resources directory, without modifying it. It can be found in `dist/resources` in this package. It contains the following, in 6 different builds:
39
+ You must host the `dist/resources` directory from this package without modification. It contains:
36
40
 
37
- - The WebAssembly `.wasm` and `.data` files
38
- - Supporting Emscripten code
39
- - `@microblink/blinkid-worker` Web Worker
41
+ - WebAssembly `.wasm` and `.data` files
42
+ - Emscripten JS glue code
43
+ - The `@microblink/blinkid-worker` Web Worker script
40
44
 
41
45
  ### Hosting requirements
42
46
 
43
- BlinkID Core needs to be run in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) in order to work.
47
+ - Must be served in a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).
48
+ - For multithreaded builds, your site must be [cross-origin isolated](https://web.dev/articles/why-coop-coep):
44
49
 
45
- Additionally, to use the multithreaded build, your website also must be cross-origin isolated. This can be achieved by placing the following headers on your website:
50
+ ```
51
+ Cross-Origin-Embedder-Policy: require-corp
52
+ Cross-Origin-Opener-Policy: same-origin
53
+ ```
46
54
 
47
- ```
48
- "Cross-Origin-Embedder-Policy": "require-corp",
49
- "Cross-Origin-Opener-Policy": "same-origin",
50
- ```
55
+ ## Development
51
56
 
52
- For more details, check out https://web.dev/articles/why-coop-coep
57
+ To build the package locally:
53
58
 
54
- ## Usage
59
+ 1. Install dependencies in the monorepo root:
60
+
61
+ ```sh
62
+ pnpm install
63
+ ```
64
+
65
+ 2. Build the package:
66
+
67
+ ```sh
68
+ pnpm build
69
+ ```
55
70
 
56
- `blinkid-core` is a low-level API used as a part of the browser SDK. See the example for usage.
71
+ The output files will be available in the `dist/` and `types/` directories.