webml-kit 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webml-kit",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Framework-agnostic utilities for loading and running ML models in the browser via WebGPU/WASM",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,6 +10,10 @@
10
10
  "import": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts"
12
12
  },
13
+ "./browser": {
14
+ "import": "./dist/webml-kit.browser.js",
15
+ "types": "./dist/index.d.ts"
16
+ },
13
17
  "./worker": {
14
18
  "import": "./dist/model-worker.js",
15
19
  "types": "./dist/model-worker.d.ts"
@@ -21,10 +25,12 @@
21
25
  "logo.png"
22
26
  ],
23
27
  "scripts": {
24
- "build": "tsc",
28
+ "build": "tsc && npm run build:browser",
29
+ "build:browser": "esbuild src/index.ts --bundle --format=esm --platform=browser --alias:onnxruntime-web=./src/shim-ort.ts --external:'node:*' --external:@huggingface/transformers --external:kokoro-js --external:@wllama/wllama --external:'@wllama/*' --outfile=dist/webml-kit.browser.js",
25
30
  "dev": "tsc --watch",
26
31
  "test": "vitest run",
27
32
  "test:watch": "vitest",
33
+ "test:e2e": "node test/e2e-playground.mjs",
28
34
  "clean": "rm -rf dist",
29
35
  "prepublishOnly": "npm run clean && npm run build"
30
36
  },
@@ -43,15 +49,21 @@
43
49
  "license": "MIT",
44
50
  "repository": {
45
51
  "type": "git",
46
- "url": "https://github.com/hemanth/webml-kit.git"
52
+ "url": "git+https://github.com/hemanth/webml-kit.git"
47
53
  },
48
54
  "dependencies": {
49
55
  "@huggingface/transformers": "^4.1.0",
56
+ "kokoro-js": "^1.2.1",
50
57
  "onnxruntime-web": "^1.29.0"
51
58
  },
52
59
  "devDependencies": {
53
60
  "@webgpu/types": "^0.1.69",
61
+ "esbuild": "^0.28.2",
62
+ "playwright": "^1.63.0",
54
63
  "typescript": "^5.7.0",
55
64
  "vitest": "^4.1.4"
65
+ },
66
+ "optionalDependencies": {
67
+ "@wllama/wllama": "^3.6.1"
56
68
  }
57
69
  }