@scanly/browser 2.0.1 → 2.1.0

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 CHANGED
@@ -1,38 +1,38 @@
1
- # @scanly/browser
2
-
3
- Browser upload, module Worker, camera, ScannerSession, tracking, batch, and default engine composition for Scanly SDK v2.0.1. The optional ZXing-C++ WASM backend is included and loaded lazily.
4
-
5
- ```bash
6
- npm install @scanly/browser
7
- ```
8
-
9
- ```js
10
- import { BrowserCaptureSession } from "@scanly/browser";
11
-
12
- const scanner = new BrowserCaptureSession();
13
- scanner.initialize();
14
- scanner.start();
15
- const outcome = await scanner.scanFile(file);
16
- if (outcome.ok) console.log(outcome.results);
17
- await scanner.dispose();
18
- ```
19
-
20
- ```ts
21
- import { BrowserCameraSource } from "@scanly/browser";
22
-
23
- const camera = new BrowserCameraSource();
24
- await camera.start(videoElement, {
25
- onResult: console.log,
26
- onError: console.error,
27
- });
28
- camera.stop();
29
- camera.dispose();
30
- ```
31
-
32
- The Worker is self-hosted through `new URL(..., import.meta.url)`. Deployments must emit the Worker and WASM asset, serve WASM as `application/wasm`, and permit the Worker URL in CSP `worker-src`. Camera access requires HTTPS or localhost and user permission. Scanly uses no cloud decoder or telemetry.
33
-
34
- This is the standard public Browser package. React users may install `@scanly/react`, which depends on it.
35
-
36
- Version: 2.0.1 · [Browser usage and deployment](https://github.com/Yangjunjie-Lin/Scanly/blob/main/docs/sdk/usage.md)
37
-
38
- `ScannerSession.stop()` remains restartable. `ScannerSession.dispose()` is terminal: subsequent `start()`, `reset()`, and `switchSource()` calls reject with `session_disposed`, pending work is drained, and an injected decoder remains caller-owned.
1
+ # @scanly/browser
2
+
3
+ Browser upload, module Worker, camera, ScannerSession, tracking, batch, and default engine composition for Scanly SDK v2.1.0. The optional ZXing-C++ WASM backend is included and loaded lazily.
4
+
5
+ ```bash
6
+ npm install @scanly/browser
7
+ ```
8
+
9
+ ```js
10
+ import { BrowserCaptureSession } from "@scanly/browser";
11
+
12
+ const scanner = new BrowserCaptureSession();
13
+ scanner.initialize();
14
+ scanner.start();
15
+ const outcome = await scanner.scanFile(file);
16
+ if (outcome.ok) console.log(outcome.results);
17
+ await scanner.dispose();
18
+ ```
19
+
20
+ ```ts
21
+ import { BrowserCameraSource } from "@scanly/browser";
22
+
23
+ const camera = new BrowserCameraSource();
24
+ await camera.start(videoElement, {
25
+ onResult: console.log,
26
+ onError: console.error,
27
+ });
28
+ camera.stop();
29
+ camera.dispose();
30
+ ```
31
+
32
+ The Worker is self-hosted through `new URL(..., import.meta.url)`. Deployments must emit the Worker and WASM asset, serve WASM as `application/wasm`, and permit the Worker URL in CSP `worker-src`. Camera access requires HTTPS or localhost and user permission. Scanly uses no cloud decoder or telemetry.
33
+
34
+ This is the standard public Browser package. React users may install `@scanly/react`, which depends on it.
35
+
36
+ Version: 2.1.0 · [Browser usage and deployment](https://github.com/Yangjunjie-Lin/Scanly/blob/main/docs/sdk/usage.md)
37
+
38
+ `ScannerSession.stop()` remains restartable. `ScannerSession.dispose()` is terminal: subsequent `start()`, `reset()`, and `switchSource()` calls reject with `session_disposed`, pending work is drained, and an injected decoder remains caller-owned.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const BROWSER_SDK_VERSION: "2.0.1";
1
+ export declare const BROWSER_SDK_VERSION: "2.1.0";
2
2
  export * from "./browser-session.js";
3
3
  export * from "./camera-source.js";
4
4
  export * from "./image-loader.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const BROWSER_SDK_VERSION = "2.0.1";
1
+ export const BROWSER_SDK_VERSION = "2.1.0";
2
2
  export * from "./browser-session.js";
3
3
  export * from "./camera-source.js";
4
4
  export * from "./image-loader.js";
package/package.json CHANGED
@@ -1,40 +1,40 @@
1
- {
2
- "name": "@scanly/browser",
3
- "version": "2.0.1",
4
- "description": "Browser, Worker, and camera barcode scanning runtime for Scanly SDK",
5
- "keywords": ["barcode", "qr-code", "scanner", "web-worker", "wasm", "camera"],
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/Yangjunjie-Lin/Scanly.git",
9
- "directory": "packages/browser"
10
- },
11
- "homepage": "https://github.com/Yangjunjie-Lin/Scanly#readme",
12
- "bugs": {
13
- "url": "https://github.com/Yangjunjie-Lin/Scanly/issues"
14
- },
15
- "license": "MIT",
16
- "type": "module",
17
- "sideEffects": false,
18
- "main": "./dist/index.js",
19
- "types": "./dist/index.d.ts",
20
- "exports": {
21
- ".": {
22
- "types": "./dist/index.d.ts",
23
- "import": "./dist/index.js"
24
- }
25
- },
26
- "files": [
27
- "dist",
28
- "README.md"
29
- ],
30
- "scripts": {
31
- "build": "tsc -p tsconfig.build.json"
32
- },
33
- "dependencies": {
34
- "@scanly/core": "2.0.1",
35
- "@scanly/engine-jsqr": "2.0.1",
36
- "@scanly/engine-zxing-cpp-wasm": "2.0.1",
37
- "@scanly/engine-zxing-js": "2.0.1",
38
- "@scanly/scenario-schema": "2.0.1"
39
- }
40
- }
1
+ {
2
+ "name": "@scanly/browser",
3
+ "version": "2.1.0",
4
+ "description": "Browser, Worker, and camera barcode scanning runtime for Scanly SDK",
5
+ "keywords": ["barcode", "qr-code", "scanner", "web-worker", "wasm", "camera"],
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Yangjunjie-Lin/Scanly.git",
9
+ "directory": "packages/browser"
10
+ },
11
+ "homepage": "https://github.com/Yangjunjie-Lin/Scanly#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Yangjunjie-Lin/Scanly/issues"
14
+ },
15
+ "license": "MIT",
16
+ "type": "module",
17
+ "sideEffects": false,
18
+ "main": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
+ }
25
+ },
26
+ "files": [
27
+ "dist",
28
+ "README.md"
29
+ ],
30
+ "scripts": {
31
+ "build": "tsc -p tsconfig.build.json"
32
+ },
33
+ "dependencies": {
34
+ "@scanly/core": "2.1.0",
35
+ "@scanly/engine-jsqr": "2.1.0",
36
+ "@scanly/engine-zxing-cpp-wasm": "2.1.0",
37
+ "@scanly/engine-zxing-js": "2.1.0",
38
+ "@scanly/scenario-schema": "2.1.0"
39
+ }
40
+ }