@atolljs/core 0.1.1 → 0.1.2

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 +27 -21
  2. package/package.json +6 -3
package/README.md CHANGED
@@ -1,7 +1,13 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="assets/atoll-dark.svg" />
3
+ <source media="(prefers-color-scheme: light)" srcset="assets/atoll-light.svg" />
4
+ <img src="assets/atoll-light.svg" alt="Atoll — islands of framework workers around a shared core" width="280" />
5
+ </picture>
6
+
1
7
  # AtollJS
2
8
 
3
- [![CI](https://github.com/jwhenry3/atolljs/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jwhenry3/atolljs/actions/workflows/ci.yml)
4
- [![codecov](https://codecov.io/gh/jwhenry3/atolljs/graph/badge.svg?branch=master)](https://codecov.io/gh/jwhenry3/atolljs)
9
+ [![CI](https://github.com/jwhenry3/atolljs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jwhenry3/atolljs/actions/workflows/ci.yml)
10
+ [![codecov](https://codecov.io/gh/jwhenry3/atolljs/graph/badge.svg?branch=main)](https://codecov.io/gh/jwhenry3/atolljs)
5
11
 
6
12
  Typed shared-memory worker pools for TypeScript — deterministic `SharedArrayBuffer`
7
13
  layouts, first-class task methods, and cross-thread reactive state. A worker
@@ -9,7 +15,7 @@ atoll: pools and shared workers joined to your app through one shared-memory
9
15
  fabric, so work is offloaded as typed method calls while large state stays put
10
16
  (zero-copy, no postMessage serialization of the values themselves).
11
17
 
12
- **[Atoll — package documentation](https://jwhenry3.github.io/atolljs/consumer/#/quickstart)**
18
+ **[Atoll — package documentation](https://jwhenry3.github.io/atolljs/consumer/quickstart/)**
13
19
 
14
20
  ## Install
15
21
 
@@ -89,7 +95,7 @@ Shared memory is opt-in: leave `sharedMemory` out of both `defineWorker` and
89
95
  `connectWorker` and you get a typed, pooled, cancellable worker RPC that runs
90
96
  anywhere Workers do — no isolation headers needed. With shared memory,
91
97
  `SharedArrayBuffer` requires
92
- [cross-origin isolation headers](https://jwhenry3.github.io/atolljs/consumer/#/hosting)
98
+ [cross-origin isolation headers](https://jwhenry3.github.io/atolljs/consumer/hosting/)
93
99
  (COOP/COEP) in the browser; Node needs nothing.
94
100
 
95
101
  ## Packages
@@ -101,35 +107,35 @@ install only what you use.
101
107
 
102
108
  | Framework | Package | What it is | Docs |
103
109
  |---|---|---|---|
104
- | React | [`@atolljs/react`](https://www.npmjs.com/package/@atolljs/react) | Hooks — `useObservable`, `useSharedValue`, `useTask` | [React guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-react) |
105
- | Vue | [`@atolljs/vue`](https://www.npmjs.com/package/@atolljs/vue) | Composables — `useObservable`, `useSharedValue`, `useTask` | [Vue guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-vue) |
106
- | SolidJS | [`@atolljs/solidjs`](https://www.npmjs.com/package/@atolljs/solidjs) | Primitives — `createObservable`, `createSharedValue`, `createTask` | [SolidJS guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-solid) |
107
- | Svelte | [`@atolljs/svelte`](https://www.npmjs.com/package/@atolljs/svelte) | Svelte 5 rune bindings — `observableValue`, `sharedValue`, `taskState` | [Svelte guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-svelte) |
108
- | Angular | [`@atolljs/angular`](https://www.npmjs.com/package/@atolljs/angular) | Signals + DI — `observableSignal`, `sharedValue`, `taskState`, `provideAtoll` | [Angular guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-angular) |
109
- | Next.js | [`@atolljs/nextjs`](https://www.npmjs.com/package/@atolljs/nextjs) | Client-component bindings (React re-export) | [Next.js guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-nextjs) |
110
- | NestJS | [`@atolljs/nestjs`](https://www.npmjs.com/package/@atolljs/nestjs) | Server-side module/decorators for worker pools | [NestJS guide](https://jwhenry3.github.io/atolljs/consumer/#/fw-nestjs) |
110
+ | React | [`@atolljs/react`](https://www.npmjs.com/package/@atolljs/react) | Hooks — `useObservable`, `useSharedValue`, `useTask` | [React guide](https://jwhenry3.github.io/atolljs/consumer/fw-react/) |
111
+ | Vue | [`@atolljs/vue`](https://www.npmjs.com/package/@atolljs/vue) | Composables — `useObservable`, `useSharedValue`, `useTask` | [Vue guide](https://jwhenry3.github.io/atolljs/consumer/fw-vue/) |
112
+ | SolidJS | [`@atolljs/solidjs`](https://www.npmjs.com/package/@atolljs/solidjs) | Primitives — `createObservable`, `createSharedValue`, `createTask` | [SolidJS guide](https://jwhenry3.github.io/atolljs/consumer/fw-solid/) |
113
+ | Svelte | [`@atolljs/svelte`](https://www.npmjs.com/package/@atolljs/svelte) | Svelte 5 rune bindings — `observableValue`, `sharedValue`, `taskState` | [Svelte guide](https://jwhenry3.github.io/atolljs/consumer/fw-svelte/) |
114
+ | Angular | [`@atolljs/angular`](https://www.npmjs.com/package/@atolljs/angular) | Signals + DI — `observableSignal`, `sharedValue`, `taskState`, `provideAtoll` | [Angular guide](https://jwhenry3.github.io/atolljs/consumer/fw-angular/) |
115
+ | Next.js | [`@atolljs/nextjs`](https://www.npmjs.com/package/@atolljs/nextjs) | Client-component bindings (React re-export) | [Next.js guide](https://jwhenry3.github.io/atolljs/consumer/fw-nextjs/) |
116
+ | NestJS | [`@atolljs/nestjs`](https://www.npmjs.com/package/@atolljs/nestjs) | Server-side module/decorators for worker pools | [NestJS guide](https://jwhenry3.github.io/atolljs/consumer/fw-nestjs/) |
111
117
 
112
118
  ### Worker islands — render framework trees off the main thread
113
119
 
114
120
  | Framework | Package | What it is | Docs |
115
121
  |---|---|---|---|
116
- | *(engine)* | [`@atolljs/islands`](https://www.npmjs.com/package/@atolljs/islands) | `mountIsland`, op protocol, proxy DOM, worker runtimes | [Worker islands](https://jwhenry3.github.io/atolljs/consumer/#/islands) |
117
- | React | [`@atolljs/react-island`](https://www.npmjs.com/package/@atolljs/react-island) | `<Island/>`, `islandComponent`, `lazyIsland` | [React islands](https://jwhenry3.github.io/atolljs/consumer/#/fw-react/worker-islands) |
118
- | Vue | [`@atolljs/vue-island`](https://www.npmjs.com/package/@atolljs/vue-island) | `useIsland`, `<AtollIsland>` + Vue worker renderer | [Vue islands](https://jwhenry3.github.io/atolljs/consumer/#/fw-vue/worker-islands) |
119
- | Svelte | [`@atolljs/svelte-island`](https://www.npmjs.com/package/@atolljs/svelte-island) | `use:island`, `createIslandState` + Svelte 5 worker renderer | [Svelte islands](https://jwhenry3.github.io/atolljs/consumer/#/fw-svelte/worker-islands) |
120
- | SolidJS | [`@atolljs/solid-island`](https://www.npmjs.com/package/@atolljs/solid-island) | `createIsland`, `Island` + `solid-js/universal` worker renderer | [Solid islands](https://jwhenry3.github.io/atolljs/consumer/#/fw-solid/worker-islands) |
121
- | Angular | [`@atolljs/angular-island`](https://www.npmjs.com/package/@atolljs/angular-island) | `<atoll-island>`, `[atollIsland]` + `Renderer2` worker renderer | [Angular islands](https://jwhenry3.github.io/atolljs/consumer/#/fw-angular/worker-islands) |
122
+ | *(engine)* | [`@atolljs/islands`](https://www.npmjs.com/package/@atolljs/islands) | `mountIsland`, op protocol, proxy DOM, worker runtimes | [Worker islands](https://jwhenry3.github.io/atolljs/consumer/islands/) |
123
+ | React | [`@atolljs/react-island`](https://www.npmjs.com/package/@atolljs/react-island) | `<Island/>`, `islandComponent`, `lazyIsland` | [React islands](https://jwhenry3.github.io/atolljs/consumer/fw-react/worker-islands/) |
124
+ | Vue | [`@atolljs/vue-island`](https://www.npmjs.com/package/@atolljs/vue-island) | `useIsland`, `<AtollIsland>` + Vue worker renderer | [Vue islands](https://jwhenry3.github.io/atolljs/consumer/fw-vue/worker-islands/) |
125
+ | Svelte | [`@atolljs/svelte-island`](https://www.npmjs.com/package/@atolljs/svelte-island) | `use:island`, `createIslandState` + Svelte 5 worker renderer | [Svelte islands](https://jwhenry3.github.io/atolljs/consumer/fw-svelte/worker-islands/) |
126
+ | SolidJS | [`@atolljs/solid-island`](https://www.npmjs.com/package/@atolljs/solid-island) | `createIsland`, `Island`, `islandComponent`, `lazyIsland` + `solid-js/universal` worker renderer | [Solid islands](https://jwhenry3.github.io/atolljs/consumer/fw-solid/worker-islands/) |
127
+ | Angular | [`@atolljs/angular-island`](https://www.npmjs.com/package/@atolljs/angular-island) | `islandComponent` facades typed off `@AngularIsland` worker components, `<atoll-island>`/`[atollIsland]` + `Renderer2` worker renderer | [Angular islands](https://jwhenry3.github.io/atolljs/consumer/fw-angular/worker-islands/) |
122
128
 
123
129
  ### Runtimes
124
130
 
125
131
  | Package | What it is | Docs |
126
132
  |---|---|---|
127
- | [`@atolljs/core`](https://www.npmjs.com/package/@atolljs/core) | Core SDK — `defineWorker`/`connectWorker` typed worker clients over `WorkerPool`, shared-memory contracts, `watch`/`observe`, codecs | [Quickstart](https://jwhenry3.github.io/atolljs/consumer/#/quickstart) · [Shared memory](https://jwhenry3.github.io/atolljs/consumer/#/shared-memory) · [Tasks](https://jwhenry3.github.io/atolljs/consumer/#/tasks) |
128
- | [`@atolljs/node`](https://www.npmjs.com/package/@atolljs/node) | `node:worker_threads` runtime adapter | [Tasks](https://jwhenry3.github.io/atolljs/consumer/#/tasks) |
133
+ | [`@atolljs/core`](https://www.npmjs.com/package/@atolljs/core) | Core SDK — `defineWorker`/`connectWorker` typed worker clients over `WorkerPool`, shared-memory contracts, `watch`/`observe`, codecs | [Quickstart](https://jwhenry3.github.io/atolljs/consumer/quickstart/) · [Shared memory](https://jwhenry3.github.io/atolljs/consumer/shared-memory/) · [Tasks](https://jwhenry3.github.io/atolljs/consumer/tasks/) |
134
+ | [`@atolljs/node`](https://www.npmjs.com/package/@atolljs/node) | `node:worker_threads` runtime adapter | [Tasks](https://jwhenry3.github.io/atolljs/consumer/tasks/) |
129
135
 
130
136
  ## Documentation
131
137
 
132
- - **[Atoll — package documentation](https://jwhenry3.github.io/atolljs/consumer/#/quickstart)** —
138
+ - **[Atoll — package documentation](https://jwhenry3.github.io/atolljs/consumer/quickstart/)** —
133
139
  the consumer-facing site: quickstart, API guides, framework pages, islands,
134
140
  hosting & headers.
135
141
  - [`docs/`](docs/README.md) — in-repo documentation covering internals,
@@ -144,7 +150,7 @@ packages/<fw>/ independently publishable framework bindings
144
150
  packages/incidents/ demo domain package (contract + worker + pool)
145
151
  examples/<fw>/ per-framework demo apps
146
152
  docs/ in-repo markdown documentation (internals + bindings)
147
- docs-consumer/ consumer docs site (deploys to GitHub Pages on master)
153
+ docs-consumer/ consumer docs site (deploys to GitHub Pages on main)
148
154
  ```
149
155
 
150
156
  ```bash
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@atolljs/core",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Typed shared-memory worker pools — defineWorker/connectWorker, SharedArrayBuffer contracts, cross-thread reactivity",
5
- "homepage": "https://jwhenry3.github.io/atolljs/consumer/#/quickstart",
5
+ "homepage": "https://jwhenry3.github.io/atolljs/consumer/quickstart/",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -30,11 +30,13 @@
30
30
  "serve:all": "node scripts/serve-all.mjs",
31
31
  "build": "tsc --noEmit && vite build",
32
32
  "test": "vitest run",
33
+ "test:coverage": "vitest run --coverage",
33
34
  "stats": "node scripts/bundle-stats.mjs",
34
35
  "stats:islands": "node scripts/island-perf.mjs",
35
36
  "build:pages": "node scripts/build-pages.mjs",
36
37
  "assemble:pages": "node scripts/assemble-pages.mjs",
37
- "serve:pages": "node scripts/serve-pages.mjs"
38
+ "serve:pages": "node scripts/serve-pages.mjs",
39
+ "serve:static": "node scripts/serve-static.mjs"
38
40
  },
39
41
  "devDependencies": {
40
42
  "@angular/core": "^22.2.0",
@@ -45,6 +47,7 @@
45
47
  "@sveltejs/vite-plugin-svelte": "^7.3.1",
46
48
  "@types/react": "^19.3.0",
47
49
  "@types/react-dom": "^19.3.0",
50
+ "@vitejs/plugin-vue": "^6.0.9",
48
51
  "@vitest/coverage-v8": "^4.1.11",
49
52
  "fast-json-stringify": "^7.0.1",
50
53
  "happy-dom": "^20.14.5",