opencode/packages/widgets-rs/web/package.json
Sebastian Herrlinger 64b294433e feat(widgets-rs): web, the browser widget host on widget-web
packages/widgets-rs/web: PsychoScript's web/ (web branch e16ce7e), the TypeScript host that runs widgets in Web
Workers on widget-web's WebAssembly, as package widget-web.

The module is widget_web_bg.wasm (was psychoscript_web_bg.wasm): scripts/build-wasm.sh builds crate widget-web in the
workspace one level up, with the opencode checkout's root remapped to /opencode, and the worker, the host's default
module URL, build.ts and the package's exports follow. dist/ is no longer committed (it holds the ~10 MB module):
bash scripts/build-wasm.sh && bun run build makes it. The scripts read the fixtures and preludes in place from
packages/widget, and fixtures.ts takes it by default. The bundle is otherwise byte for byte the web branch's.
2026-11-26 15:08:19 +01:00

35 lines
965 B
JSON

{
"name": "widget-web",
"version": "0.1.0",
"description": "PsychoScript widgets in the browser: the Rust PsychoScript in WebAssembly, run in Web Workers, rendered with plain DOM, Canvas2D and WebGPU",
"type": "module",
"license": "MIT",
"private": true,
"sideEffects": false,
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./worker.js": "./dist/worker.js",
"./widget_web_bg.wasm": "./dist/widget_web_bg.wasm",
"./package.json": "./package.json"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build:wasm": "bash scripts/build-wasm.sh",
"build": "bun scripts/build.ts",
"typecheck": "tsc --noEmit -p .",
"fixtures": "bun scripts/fixtures.ts",
"demo": "bun scripts/serve.ts"
},
"devDependencies": {
"@webgpu/types": "0.1.69",
"typescript": "5.9.3",
"playwright-core": "1.57.0"
}
}