@invinite-org/chartlang-host-worker 1.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 (51) hide show
  1. package/CHANGELOG.md +228 -0
  2. package/LICENSE +21 -0
  3. package/README.md +70 -0
  4. package/dist/createWorkerBoot.d.ts +45 -0
  5. package/dist/createWorkerBoot.d.ts.map +1 -0
  6. package/dist/createWorkerBoot.js +122 -0
  7. package/dist/createWorkerBoot.js.map +1 -0
  8. package/dist/createWorkerHost.d.ts +55 -0
  9. package/dist/createWorkerHost.d.ts.map +1 -0
  10. package/dist/createWorkerHost.js +167 -0
  11. package/dist/createWorkerHost.js.map +1 -0
  12. package/dist/defaultWorkerFactory.d.ts +19 -0
  13. package/dist/defaultWorkerFactory.d.ts.map +1 -0
  14. package/dist/defaultWorkerFactory.js +23 -0
  15. package/dist/defaultWorkerFactory.js.map +1 -0
  16. package/dist/filterEmissions.d.ts +21 -0
  17. package/dist/filterEmissions.d.ts.map +1 -0
  18. package/dist/filterEmissions.js +107 -0
  19. package/dist/filterEmissions.js.map +1 -0
  20. package/dist/idb.d.ts +2 -0
  21. package/dist/idb.d.ts.map +1 -0
  22. package/dist/idb.js +4 -0
  23. package/dist/idb.js.map +1 -0
  24. package/dist/idbStateStore.d.ts +22 -0
  25. package/dist/idbStateStore.d.ts.map +1 -0
  26. package/dist/idbStateStore.js +255 -0
  27. package/dist/idbStateStore.js.map +1 -0
  28. package/dist/index.d.ts +8 -0
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/limits.d.ts +40 -0
  33. package/dist/limits.d.ts.map +1 -0
  34. package/dist/limits.js +48 -0
  35. package/dist/limits.js.map +1 -0
  36. package/dist/protocol.d.ts +70 -0
  37. package/dist/protocol.d.ts.map +1 -0
  38. package/dist/protocol.js +4 -0
  39. package/dist/protocol.js.map +1 -0
  40. package/dist/types.d.ts +164 -0
  41. package/dist/types.d.ts.map +1 -0
  42. package/dist/types.js +4 -0
  43. package/dist/types.js.map +1 -0
  44. package/dist/worker-boot.d.ts +6 -0
  45. package/dist/worker-boot.js +14999 -0
  46. package/dist/worker-boot.js.map +7 -0
  47. package/dist/workerBoot.d.ts +2 -0
  48. package/dist/workerBoot.d.ts.map +1 -0
  49. package/dist/workerBoot.js +18 -0
  50. package/dist/workerBoot.js.map +1 -0
  51. package/package.json +57 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=workerBoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workerBoot.d.ts","sourceRoot":"","sources":["../src/workerBoot.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ // Copyright (c) 2026 Invinite. Licensed under the MIT License.
2
+ // See the LICENSE file in the repo root for full license text.
3
+ /**
4
+ * Production worker entry. Bundled to `dist/worker-boot.js` via
5
+ * `scripts/buildWorkerBoot.ts` and loaded by the main-side host through a
6
+ * `new URL("./worker-boot.js", import.meta.url)` reference (see
7
+ * `defaultWorkerFactory.ts`).
8
+ *
9
+ * The boot logic itself lives in {@link createWorkerBoot} so it can be
10
+ * unit-tested against a `MessageChannel` port — this file is the thin
11
+ * `self` adapter and is excluded from coverage (`vitest.config.ts`).
12
+ *
13
+ * @since 0.1
14
+ * @stable
15
+ */
16
+ import { createWorkerBoot } from "./createWorkerBoot.js";
17
+ createWorkerBoot(self);
18
+ //# sourceMappingURL=workerBoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workerBoot.js","sourceRoot":"","sources":["../src/workerBoot.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,+DAA+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,gBAAgB,EAAwB,MAAM,uBAAuB,CAAC;AAE/E,gBAAgB,CAAC,IAAkC,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@invinite-org/chartlang-host-worker",
3
+ "version": "1.0.1",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "description": "Web Worker ScriptHost for the browser",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ },
14
+ "./idb": {
15
+ "types": "./dist/idb.d.ts",
16
+ "import": "./dist/idb.js"
17
+ },
18
+ "./worker-boot": {
19
+ "types": "./dist/worker-boot.d.ts",
20
+ "import": "./dist/worker-boot.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "README.md",
26
+ "CHANGELOG.md",
27
+ "LICENSE"
28
+ ],
29
+ "dependencies": {
30
+ "@invinite-org/chartlang-adapter-kit": "^1.1.0",
31
+ "@invinite-org/chartlang-core": "^1.0.1",
32
+ "@invinite-org/chartlang-runtime": "^1.0.2"
33
+ },
34
+ "devDependencies": {
35
+ "esbuild": "^0.24.0",
36
+ "fake-indexeddb": "^6.0.0"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public",
40
+ "provenance": true
41
+ },
42
+ "engines": {
43
+ "node": ">=20"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/outraday-org/chartlang.git",
48
+ "directory": "packages/host-worker"
49
+ },
50
+ "scripts": {
51
+ "build": "tsc -p tsconfig.json && pnpm tsx ./scripts/buildWorkerBoot.ts",
52
+ "build:worker-boot": "pnpm tsx ./scripts/buildWorkerBoot.ts",
53
+ "typecheck": "tsc -p tsconfig.json --noEmit",
54
+ "test": "vitest run --coverage",
55
+ "bench": "vitest bench --run"
56
+ }
57
+ }