@microblink/blinkid-core 7.0.0-next.4 → 7.0.0-next.5

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 (2) hide show
  1. package/README.md +56 -0
  2. package/package.json +7 -2
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # BlinkID Core
2
+
3
+ `@microblink/blinkid-core` provides the core BlinkID functionality.
4
+
5
+ ## Before you start
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)
12
+
13
+ ## Installation
14
+
15
+ `blinkid-core` is available on the npm registry and can be installed using a package manager, using the `@next` dist tag:
16
+
17
+ ```sh
18
+ npm install @microblink/blinkid-core@next # or yarn or pnpm
19
+ ```
20
+
21
+ ## Environment & Setup
22
+
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.
24
+
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.
26
+
27
+ If used in the `blinkid-next-monorepo` from github, read the usage instructions in its root (TODO: link).
28
+
29
+ ### Licence key
30
+
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).
32
+
33
+ ### Hosting the neccessary resources
34
+
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:
36
+
37
+ - The WebAssembly `.wasm` and `.data` files
38
+ - Supporting Emscripten code
39
+ - `@microblink/blinkid-worker` Web Worker
40
+
41
+ ### Hosting requirements
42
+
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.
44
+
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:
46
+
47
+ ```
48
+ "Cross-Origin-Embedder-Policy": "require-corp",
49
+ "Cross-Origin-Opener-Policy": "same-origin",
50
+ ```
51
+
52
+ For more details, check out https://web.dev/articles/why-coop-coep
53
+
54
+ ## Usage
55
+
56
+ `blinkid-core` is a low-level API used as a part of the browser SDK. See the example for usage.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@microblink/blinkid-core",
3
- "version": "7.0.0-next.4",
4
- "author": "",
3
+ "version": "7.0.0-next.5",
4
+ "author": "Microblink",
5
5
  "type": "module",
6
6
  "main": "./dist/blinkid-core.js",
7
7
  "module": "./dist/blinkid-core.js",
@@ -13,6 +13,11 @@
13
13
  "access": "public",
14
14
  "registry": "https://registry.npmjs.org/",
15
15
  "types": "./types/index.rollup.d.ts",
16
+ "homepage": "https://github.com/BlinkID/blinkid-next-web",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/BlinkID/blinkid-next-web.git"
20
+ },
16
21
  "exports": {
17
22
  ".": {
18
23
  "types": "./types/index.rollup.d.ts",