From db887a03cdbfeeeaa1d82886f6ccb95c0af496df Mon Sep 17 00:00:00 2001 From: SandroMaglione Date: Sat, 1 Aug 2026 16:25:29 +0200 Subject: [PATCH 1/2] chore(examples): add typecheck commands --- examples/platformer/package.json | 3 ++- examples/platformer/src/machine.ts | 33 ++++++++++++++++++++---------- examples/pokemon/package.json | 3 ++- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/examples/platformer/package.json b/examples/platformer/package.json index a885a3d..b0fed9e 100644 --- a/examples/platformer/package.json +++ b/examples/platformer/package.json @@ -6,7 +6,8 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc --noEmit && vite build", + "typecheck": "tsc --noEmit", + "build": "pnpm typecheck && vite build", "preview": "vite preview", "check": "pnpm build" }, diff --git a/examples/platformer/src/machine.ts b/examples/platformer/src/machine.ts index 1ef6358..8316b1e 100644 --- a/examples/platformer/src/machine.ts +++ b/examples/platformer/src/machine.ts @@ -151,18 +151,29 @@ export const CharacterMachine = Machine.make({ Grounded: { on: { JumpPressed: ({ event, target }) => - target.branch.Character.locomotion.Airborne( - State.cases.Airborne.make({ originY: event.y }), - (airborne) => - airborne - .motion(State.cases.Motion.make({}), (motion) => - motion.Jumping( - State.cases.Jumping.make({ startedAt: event.at, push: 0, kind: "Ground" }) - ) - ) - .airJump(State.cases.AirJump.make({}), (airJump) => - airJump.AirJumpGroundLock(State.cases.AirJumpGroundLock.make({})) + target.full.Character(State.cases.Character.make({}), (character) => + character + .locomotion(State.cases.Locomotion.make({}), (locomotion) => + locomotion.Airborne(State.cases.Airborne.make({ originY: event.y }), (airborne) => + airborne + .motion(State.cases.Motion.make({}), (motion) => + motion.Jumping( + State.cases.Jumping.make({ startedAt: event.at, push: 0, kind: "Ground" }) + ) + ) + .airJump(State.cases.AirJump.make({}), (airJump) => + airJump.AirJumpGroundLock(State.cases.AirJumpGroundLock.make({})) + ) ) + ) + .facing(State.cases.Facing.make({}), (facing) => facing.Right(State.cases.Right.make({}))) + .contact(State.cases.WallContact.make({}), (contact) => + event.wall === -1 + ? contact.LeftWall(State.cases.LeftWall.make({})) + : event.wall === 1 + ? contact.RightWall(State.cases.RightWall.make({})) + : contact.NoWall(State.cases.NoWall.make({})) + ) ) }, states: { diff --git a/examples/pokemon/package.json b/examples/pokemon/package.json index 440ccb3..1a79ac7 100644 --- a/examples/pokemon/package.json +++ b/examples/pokemon/package.json @@ -6,7 +6,8 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc --noEmit && vite build", + "typecheck": "tsc --noEmit", + "build": "pnpm typecheck && vite build", "preview": "vite preview", "check": "pnpm build" }, From 4451beb89403e8e543ef89bab648e28def2b435e Mon Sep 17 00:00:00 2001 From: SandroMaglione Date: Sun, 2 Aug 2026 10:33:15 +0200 Subject: [PATCH 2/2] feat: add examples playground --- examples/platformer/src/machine.ts | 4 +- examples/playground/.gitignore | 3 + examples/playground/README.md | 45 + examples/playground/index.html | 14 + examples/playground/package.json | 34 + examples/playground/pnpm-lock.yaml | 865 ++++++++++++++++++ examples/playground/pnpm-workspace.yaml | 10 + .../playground/src/components/ExamplePage.tsx | 34 + .../examples/media-player/MediaPlayerPage.tsx | 49 + .../src/examples/media-player/machine.ts | 107 +++ .../src/examples/microwave/MicrowavePage.tsx | 30 + .../src/examples/microwave/machine.ts | 81 ++ .../traffic-light/TrafficLightPage.tsx | 27 + .../src/examples/traffic-light/machine.ts | 43 + .../src/examples/turnstile/TurnstilePage.tsx | 26 + .../src/examples/turnstile/machine.ts | 32 + .../examples/worker-tabs/WorkerTabsPage.tsx | 91 ++ .../src/examples/worker-tabs/machine.ts | 39 + .../examples/worker-tabs/machine.worker.ts | 26 + .../src/examples/worker-tabs/protocol.ts | 15 + .../src/examples/worker-tabs/tab-channel.ts | 18 + .../src/examples/worker-tabs/worker-client.ts | 21 + examples/playground/src/main.tsx | 20 + examples/playground/src/router.tsx | 134 +++ examples/playground/src/styles.css | 430 +++++++++ examples/playground/tsconfig.json | 18 + examples/playground/vite.config.ts | 6 + 27 files changed, 2220 insertions(+), 2 deletions(-) create mode 100644 examples/playground/.gitignore create mode 100644 examples/playground/README.md create mode 100644 examples/playground/index.html create mode 100644 examples/playground/package.json create mode 100644 examples/playground/pnpm-lock.yaml create mode 100644 examples/playground/pnpm-workspace.yaml create mode 100644 examples/playground/src/components/ExamplePage.tsx create mode 100644 examples/playground/src/examples/media-player/MediaPlayerPage.tsx create mode 100644 examples/playground/src/examples/media-player/machine.ts create mode 100644 examples/playground/src/examples/microwave/MicrowavePage.tsx create mode 100644 examples/playground/src/examples/microwave/machine.ts create mode 100644 examples/playground/src/examples/traffic-light/TrafficLightPage.tsx create mode 100644 examples/playground/src/examples/traffic-light/machine.ts create mode 100644 examples/playground/src/examples/turnstile/TurnstilePage.tsx create mode 100644 examples/playground/src/examples/turnstile/machine.ts create mode 100644 examples/playground/src/examples/worker-tabs/WorkerTabsPage.tsx create mode 100644 examples/playground/src/examples/worker-tabs/machine.ts create mode 100644 examples/playground/src/examples/worker-tabs/machine.worker.ts create mode 100644 examples/playground/src/examples/worker-tabs/protocol.ts create mode 100644 examples/playground/src/examples/worker-tabs/tab-channel.ts create mode 100644 examples/playground/src/examples/worker-tabs/worker-client.ts create mode 100644 examples/playground/src/main.tsx create mode 100644 examples/playground/src/router.tsx create mode 100644 examples/playground/src/styles.css create mode 100644 examples/playground/tsconfig.json create mode 100644 examples/playground/vite.config.ts diff --git a/examples/platformer/src/machine.ts b/examples/platformer/src/machine.ts index 8316b1e..1315313 100644 --- a/examples/platformer/src/machine.ts +++ b/examples/platformer/src/machine.ts @@ -137,8 +137,8 @@ const initialCharacter = () => export const CharacterMachine = Machine.make({ id: "PlatformerCharacter", states: CharacterStates.states, - events: Object.values(Event.cases), - internalEvents: Object.values(InternalEvent.cases), + events: [Event], + internalEvents: [InternalEvent], initial: initialCharacter }).handle({ Character: { diff --git a/examples/playground/.gitignore b/examples/playground/.gitignore new file mode 100644 index 0000000..1502ec2 --- /dev/null +++ b/examples/playground/.gitignore @@ -0,0 +1,3 @@ +dist +node_modules + diff --git a/examples/playground/README.md b/examples/playground/README.md new file mode 100644 index 0000000..7b2b06a --- /dev/null +++ b/examples/playground/README.md @@ -0,0 +1,45 @@ +# Effect Machine examples playground + +A React and Vite workspace with TanStack Router routes for implementing small +`@typeonce/effect-machine` examples. + +## Run it + +From this directory: + +```sh +pnpm install +pnpm dev +``` + +Build and type-check with: + +```sh +pnpm check +``` + +## Starters + +Each starter keeps its machine definition next to its route component: + +- `src/examples/turnstile` +- `src/examples/traffic-light` +- `src/examples/microwave` +- `src/examples/media-player` +- `src/examples/worker-tabs` + +The first four route components are intentionally light: their domain schemas, +events, and state topology are ready, while the React-to-machine adapter is left +for the exercise. + +The workers route additionally contains: + +- `machine.worker.ts`: Vite's module-worker entry point and the place to start + the machine runtime. +- `worker-client.ts`: typed worker construction, send, subscribe, and cleanup. +- `tab-channel.ts`: a typed `BroadcastChannel` wrapper for cross-tab messages. +- `protocol.ts`: worker and tab message boundaries. + +Vite discovers the worker because `worker-client.ts` constructs it with +`new Worker(new URL("./machine.worker.ts", import.meta.url), { type: "module" })`. +No extra Vite worker plugin is required. diff --git a/examples/playground/index.html b/examples/playground/index.html new file mode 100644 index 0000000..1817520 --- /dev/null +++ b/examples/playground/index.html @@ -0,0 +1,14 @@ + + + + + + + Effect Machine examples + + +
+ + + + diff --git a/examples/playground/package.json b/examples/playground/package.json new file mode 100644 index 0000000..0b35521 --- /dev/null +++ b/examples/playground/package.json @@ -0,0 +1,34 @@ +{ + "name": "@typeonce/effect-machine-example-playground", + "version": "0.0.0", + "private": true, + "description": "React playground for building @typeonce/effect-machine examples", + "type": "module", + "scripts": { + "dev": "vite", + "typecheck": "tsc --noEmit", + "build": "pnpm typecheck && vite build", + "preview": "vite preview", + "check": "pnpm build" + }, + "dependencies": { + "@effect/atom-react": "4.0.0-beta.102", + "@tanstack/react-router": "1.170.18", + "@typeonce/effect-machine": "file:../..", + "effect": "4.0.0-beta.102", + "react": "19.2.7", + "react-dom": "19.2.7", + "scheduler": "0.27.0" + }, + "devDependencies": { + "@types/react": "19.2.17", + "@types/react-dom": "19.2.2", + "@vitejs/plugin-react": "6.0.4", + "typescript": "6.0.3", + "vite": "8.1.5" + }, + "packageManager": "pnpm@10.17.1", + "engines": { + "node": "^20.19.0 || >=22.12.0" + } +} diff --git a/examples/playground/pnpm-lock.yaml b/examples/playground/pnpm-lock.yaml new file mode 100644 index 0000000..bfe4277 --- /dev/null +++ b/examples/playground/pnpm-lock.yaml @@ -0,0 +1,865 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +overrides: + effect: 4.0.0-beta.102 + +importers: + + .: + dependencies: + '@effect/atom-react': + specifier: 4.0.0-beta.102 + version: 4.0.0-beta.102(effect@4.0.0-beta.102)(react@19.2.7)(scheduler@0.27.0) + '@tanstack/react-router': + specifier: 1.170.18 + version: 1.170.18(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@typeonce/effect-machine': + specifier: file:../.. + version: file:../..(effect@4.0.0-beta.102) + effect: + specifier: 4.0.0-beta.102 + version: 4.0.0-beta.102 + react: + specifier: 19.2.7 + version: 19.2.7 + react-dom: + specifier: 19.2.7 + version: 19.2.7(react@19.2.7) + scheduler: + specifier: 0.27.0 + version: 0.27.0 + devDependencies: + '@types/react': + specifier: 19.2.17 + version: 19.2.17 + '@types/react-dom': + specifier: 19.2.2 + version: 19.2.2(@types/react@19.2.17) + '@vitejs/plugin-react': + specifier: 6.0.4 + version: 6.0.4(vite@8.1.5(yaml@2.9.0)) + typescript: + specifier: 6.0.3 + version: 6.0.3 + vite: + specifier: 8.1.5 + version: 8.1.5(yaml@2.9.0) + +packages: + + '@effect/atom-react@4.0.0-beta.102': + resolution: {integrity: sha512-6SX11h7OFwje4YhxYUml9qGjBU8hvnEMrLWe3TKI3lEH/W6tkU/BzajC263eXkxM68h+BJNzE81Ipi5DTfEgug==} + peerDependencies: + effect: 4.0.0-beta.102 + react: ^19.2.4 + scheduler: '*' + + '@emnapi/core@1.11.1': + resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} + + '@emnapi/runtime@1.11.1': + resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} + + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} + + '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.4': + resolution: {integrity: sha512-LCkGo6JDfaBhgST7UpPWgNgLINpcpabaHfyz5OBx75nUYxBsaEPxjnyNjWpeb/xBup/682QnBfRBy2/LvPutZQ==} + cpu: [arm64] + os: [darwin] + + '@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.4': + resolution: {integrity: sha512-zExlW9zUJKZH/tOtVMttwjKa4Xm/3KcNjnE3dPN92uCktwavMxpgCA3MoJK/DOnTWsQgo224OaST27/mPNAf+w==} + cpu: [x64] + os: [darwin] + + '@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.4': + resolution: {integrity: sha512-dgX0P/9wGPJeHFBG+ZmhgE6bmtMt7NP5CRBGyyktpopdk/mW4POnrpQsSLtKI1dwpc+pPLuXHDh6vvskyQE/sw==} + cpu: [arm64] + os: [linux] + + '@msgpackr-extract/msgpackr-extract-linux-arm@3.0.4': + resolution: {integrity: sha512-Tg3yX65f5GbtXLkrYEHE5oibZG9epyYWas7FogTTEJeDEF9JlXJzKgXaNhT3UXlTOeA+AfZpYZYZ0uPj7Cfquw==} + cpu: [arm] + os: [linux] + + '@msgpackr-extract/msgpackr-extract-linux-x64@3.0.4': + resolution: {integrity: sha512-8TNXMEjJc3QEy7R/x1INhgiU+XakDAFUzBhaz7+Rbrs8NH5UQeHQxxmzsSBJGyV6I1jW79undiQm8tOI+D+8FQ==} + cpu: [x64] + os: [linux] + + '@msgpackr-extract/msgpackr-extract-win32-x64@3.0.4': + resolution: {integrity: sha512-CmCXPQrkbwExx3j946/PtHWHbYJiCRBRDl4BlkRQcJB/YOwQxJRTpoo7aTsortjgoJ1x7opzTSxn7C+ASSLVjQ==} + cpu: [x64] + os: [win32] + + '@napi-rs/wasm-runtime@1.2.2': + resolution: {integrity: sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.3 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.3 + + '@oxc-project/types@0.139.0': + resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==} + + '@rolldown/binding-android-arm64@1.1.5': + resolution: {integrity: sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.1.5': + resolution: {integrity: sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.1.5': + resolution: {integrity: sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.1.5': + resolution: {integrity: sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': + resolution: {integrity: sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.1.5': + resolution: {integrity: sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.1.5': + resolution: {integrity: sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.1.5': + resolution: {integrity: sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.1.5': + resolution: {integrity: sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.1.5': + resolution: {integrity: sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.1.5': + resolution: {integrity: sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.1.5': + resolution: {integrity: sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.1.5': + resolution: {integrity: sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.1.5': + resolution: {integrity: sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.1.5': + resolution: {integrity: sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tanstack/history@1.162.0': + resolution: {integrity: sha512-79pf/RkhteYZTRgcR4F9kbk84P2N8rugQJswxfIqovlbRiT3yI7eBE+5QorIrZaOKktsgzRlXh1l/du/xpl4iA==} + engines: {node: '>=20.19'} + + '@tanstack/react-router@1.170.18': + resolution: {integrity: sha512-wpbGYZEp/fmz1q4bn7BD8VZ+/VZ7GBqSJv5V969pU+chP8y7dquWDmKTFMohvUegb9lg12m1uPVvD6kB2wORvQ==} + engines: {node: '>=20.19'} + peerDependencies: + react: '>=18.0.0 || >=19.0.0' + react-dom: '>=18.0.0 || >=19.0.0' + + '@tanstack/react-store@0.9.3': + resolution: {integrity: sha512-y2iHd/N9OkoQbFJLUX1T9vbc2O9tjH0pQRgTcx1/Nz4IlwLvkgpuglXUx+mXt0g5ZDFrEeDnONPqkbfxXJKwRg==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + '@tanstack/router-core@1.171.15': + resolution: {integrity: sha512-IILCDcLaItMZQ2jEmCABHY1Nhjjn5XUvwpQp3e4Nmu+vfg0BgYFuu/QASz2SwE2ZNbVMrvt8X/wxa+Gg5aErxA==} + engines: {node: '>=20.19'} + + '@tanstack/store@0.9.3': + resolution: {integrity: sha512-8reSzl/qGWGGVKhBoxXPMWzATSbZLZFWhwBAFO9NAyp0TxzfBP0mIrGb8CP8KrQTmvzXlR/vFPPUrHTLBGyFyw==} + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@typeonce/effect-machine@file:../..': + resolution: {directory: ../.., type: directory} + engines: {node: '>=20'} + peerDependencies: + effect: 4.0.0-beta.102 + + '@types/react-dom@19.2.2': + resolution: {integrity: sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==} + peerDependencies: + '@types/react': ^19.2.0 + + '@types/react@19.2.17': + resolution: {integrity: sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==} + + '@vitejs/plugin-react@6.0.4': + resolution: {integrity: sha512-XcCQz0TBpBgljhj0gMuuDj49i6Ytqh5q1osT/Gp5uAVJUCTWxyskk/l1jwYYiu2xcNHHipdMz40EGfM1VdamVg==} + engines: {node: ^20.19.0 || >=22.12.0} + peerDependencies: + '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 + babel-plugin-react-compiler: ^1.0.0 + vite: ^8.0.0 + peerDependenciesMeta: + '@rolldown/plugin-babel': + optional: true + babel-plugin-react-compiler: + optional: true + + cookie-es@3.1.1: + resolution: {integrity: sha512-UaXxwISYJPTr9hwQxMFYZ7kNhSXboMXP+Z3TRX6f1/NyaGPfuNUZOWP1pUEb75B2HjfklIYLVRfWiFZJyC6Npg==} + + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + effect@4.0.0-beta.102: + resolution: {integrity: sha512-z8Y+Q76Hh/kjLFZrXu8tGn6e+tDsg45R+UHhxd190pXxD53OGwf/G/zDxXTkse4HJ5mobNZfitLfUCp4fMvu6w==} + + fast-check@4.9.0: + resolution: {integrity: sha512-7ms6T7SybUev/PQITciI0yLM2pOSFy5zpG8Ty7tQofcVaQUvrMXp6CBwqF6fThLCLOrfBtuHAtwq6Yu4XPCllg==} + engines: {node: '>=12.17.0'} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + find-my-way-ts@0.1.6: + resolution: {integrity: sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + ini@7.0.0: + resolution: {integrity: sha512-ifK0CgjALofS5bkrcTy4RaQ9Vx2Knf/eLeIO+NaswQEpH1UblrtTSCIvN71qQDMq0PeQ/SSPojvEJp9vvvfr+w==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + isbot@5.2.1: + resolution: {integrity: sha512-dJ+LpKyClQZ7NG+j3OensC/mAZkGpukE9YUrgPYvAZj2doVL0edfDgywTUh5CXa0o+nW9a1V9e5+CJTX8+SxRw==} + engines: {node: '>=18'} + + kubernetes-types@1.30.0: + resolution: {integrity: sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + msgpackr-extract@3.0.4: + resolution: {integrity: sha512-4kmO/MdyUIkLIvTPr8VHLil4AtoKIoniWPIEk5+CDy0xnWC84azhSFmuJ7PxZdsYtiP5kEeQsORAVIeMgxT+Hw==} + hasBin: true + + msgpackr@2.0.5: + resolution: {integrity: sha512-cef05H/dSYpLpqp3sj/qyZh5vhUYCalnaLO7j1yOmpsR0y/XwLVtK7r5gn+U/F7CTEfMowcGhlUQJDLcLf7jcA==} + + multipasta@0.2.8: + resolution: {integrity: sha512-ZPWuMKyv0cSO29f7hozp+k6+crZbQijV8ipMvxNxRf2SwtYGTX1ZX89Kd20VV4H9Znonx+EQn+iy1wGQsJ+b+Q==} + + nanoid@3.3.16: + resolution: {integrity: sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + node-gyp-build-optional-packages@5.2.2: + resolution: {integrity: sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==} + hasBin: true + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + postcss@8.5.25: + resolution: {integrity: sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==} + engines: {node: ^10 || ^12 || >=14} + + pure-rand@8.4.2: + resolution: {integrity: sha512-vvuOGgcuPJAirlHvuQw1TrOiw7ptaIXXmIbNuiNOY6lNGJJH49PQ1Kj4nd783nPdQhQdicgOjVI2yI/9BD6/Ng==} + + react-dom@19.2.7: + resolution: {integrity: sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==} + peerDependencies: + react: ^19.2.7 + + react@19.2.7: + resolution: {integrity: sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==} + engines: {node: '>=0.10.0'} + + rolldown@1.1.5: + resolution: {integrity: sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} + + seroval-plugins@1.6.0: + resolution: {integrity: sha512-CbR5DP5DPicpd9RwRUzka7hi4x1577eGFXJVBW409LXqqJNst99JSUTZ8CXcnskQX7laPOWpmzliq0gBZEGlrQ==} + engines: {node: '>=10'} + peerDependencies: + seroval: ^1.0 + + seroval@1.6.0: + resolution: {integrity: sha512-TBwwKfscTEgnBEWmYKKeCcmCGmrJi0LV6qNUY//WBA3MDesh/zfn+KOMq/ckpxM4gZ0ouAE706A1eenekM2sug==} + engines: {node: '>=10'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + toml@4.3.0: + resolution: {integrity: sha512-lVb8X9BsPVuH0M4BKeS91tXAmJvCjQ5UIyAbQFaxkKGyUFK2RPkhwaFSQH8vbpl1d23eu/IBH+dwVMHWaq9A5A==} + engines: {node: '>=20'} + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + use-sync-external-store@1.6.0: + resolution: {integrity: sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 + + uuid@14.0.1: + resolution: {integrity: sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==} + hasBin: true + + vite@8.1.5: + resolution: {integrity: sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.3.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + +snapshots: + + '@effect/atom-react@4.0.0-beta.102(effect@4.0.0-beta.102)(react@19.2.7)(scheduler@0.27.0)': + dependencies: + effect: 4.0.0-beta.102 + react: 19.2.7 + scheduler: 0.27.0 + + '@emnapi/core@1.11.1': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.4': + optional: true + + '@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.4': + optional: true + + '@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.4': + optional: true + + '@msgpackr-extract/msgpackr-extract-linux-arm@3.0.4': + optional: true + + '@msgpackr-extract/msgpackr-extract-linux-x64@3.0.4': + optional: true + + '@msgpackr-extract/msgpackr-extract-win32-x64@3.0.4': + optional: true + + '@napi-rs/wasm-runtime@1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@oxc-project/types@0.139.0': {} + + '@rolldown/binding-android-arm64@1.1.5': + optional: true + + '@rolldown/binding-darwin-arm64@1.1.5': + optional: true + + '@rolldown/binding-darwin-x64@1.1.5': + optional: true + + '@rolldown/binding-freebsd-x64@1.1.5': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.1.5': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-x64-musl@1.1.5': + optional: true + + '@rolldown/binding-openharmony-arm64@1.1.5': + optional: true + + '@rolldown/binding-wasm32-wasi@1.1.5': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.1.5': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.1.5': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@standard-schema/spec@1.1.0': {} + + '@tanstack/history@1.162.0': {} + + '@tanstack/react-router@1.170.18(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + dependencies: + '@tanstack/history': 1.162.0 + '@tanstack/react-store': 0.9.3(react-dom@19.2.7(react@19.2.7))(react@19.2.7) + '@tanstack/router-core': 1.171.15 + isbot: 5.2.1 + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + + '@tanstack/react-store@0.9.3(react-dom@19.2.7(react@19.2.7))(react@19.2.7)': + dependencies: + '@tanstack/store': 0.9.3 + react: 19.2.7 + react-dom: 19.2.7(react@19.2.7) + use-sync-external-store: 1.6.0(react@19.2.7) + + '@tanstack/router-core@1.171.15': + dependencies: + '@tanstack/history': 1.162.0 + cookie-es: 3.1.1 + seroval: 1.6.0 + seroval-plugins: 1.6.0(seroval@1.6.0) + + '@tanstack/store@0.9.3': {} + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@typeonce/effect-machine@file:../..(effect@4.0.0-beta.102)': + dependencies: + effect: 4.0.0-beta.102 + + '@types/react-dom@19.2.2(@types/react@19.2.17)': + dependencies: + '@types/react': 19.2.17 + + '@types/react@19.2.17': + dependencies: + csstype: 3.2.3 + + '@vitejs/plugin-react@6.0.4(vite@8.1.5(yaml@2.9.0))': + dependencies: + '@rolldown/pluginutils': 1.0.1 + vite: 8.1.5(yaml@2.9.0) + + cookie-es@3.1.1: {} + + csstype@3.2.3: {} + + detect-libc@2.1.2: {} + + effect@4.0.0-beta.102: + dependencies: + '@standard-schema/spec': 1.1.0 + fast-check: 4.9.0 + find-my-way-ts: 0.1.6 + ini: 7.0.0 + kubernetes-types: 1.30.0 + msgpackr: 2.0.5 + multipasta: 0.2.8 + toml: 4.3.0 + uuid: 14.0.1 + yaml: 2.9.0 + + fast-check@4.9.0: + dependencies: + pure-rand: 8.4.2 + + fdir@6.5.0(picomatch@4.0.5): + optionalDependencies: + picomatch: 4.0.5 + + find-my-way-ts@0.1.6: {} + + fsevents@2.3.3: + optional: true + + ini@7.0.0: {} + + isbot@5.2.1: {} + + kubernetes-types@1.30.0: {} + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + msgpackr-extract@3.0.4: + dependencies: + node-gyp-build-optional-packages: 5.2.2 + optionalDependencies: + '@msgpackr-extract/msgpackr-extract-darwin-arm64': 3.0.4 + '@msgpackr-extract/msgpackr-extract-darwin-x64': 3.0.4 + '@msgpackr-extract/msgpackr-extract-linux-arm': 3.0.4 + '@msgpackr-extract/msgpackr-extract-linux-arm64': 3.0.4 + '@msgpackr-extract/msgpackr-extract-linux-x64': 3.0.4 + '@msgpackr-extract/msgpackr-extract-win32-x64': 3.0.4 + optional: true + + msgpackr@2.0.5: + optionalDependencies: + msgpackr-extract: 3.0.4 + + multipasta@0.2.8: {} + + nanoid@3.3.16: {} + + node-gyp-build-optional-packages@5.2.2: + dependencies: + detect-libc: 2.1.2 + optional: true + + picocolors@1.1.1: {} + + picomatch@4.0.5: {} + + postcss@8.5.25: + dependencies: + nanoid: 3.3.16 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + pure-rand@8.4.2: {} + + react-dom@19.2.7(react@19.2.7): + dependencies: + react: 19.2.7 + scheduler: 0.27.0 + + react@19.2.7: {} + + rolldown@1.1.5: + dependencies: + '@oxc-project/types': 0.139.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.1.5 + '@rolldown/binding-darwin-arm64': 1.1.5 + '@rolldown/binding-darwin-x64': 1.1.5 + '@rolldown/binding-freebsd-x64': 1.1.5 + '@rolldown/binding-linux-arm-gnueabihf': 1.1.5 + '@rolldown/binding-linux-arm64-gnu': 1.1.5 + '@rolldown/binding-linux-arm64-musl': 1.1.5 + '@rolldown/binding-linux-ppc64-gnu': 1.1.5 + '@rolldown/binding-linux-s390x-gnu': 1.1.5 + '@rolldown/binding-linux-x64-gnu': 1.1.5 + '@rolldown/binding-linux-x64-musl': 1.1.5 + '@rolldown/binding-openharmony-arm64': 1.1.5 + '@rolldown/binding-wasm32-wasi': 1.1.5 + '@rolldown/binding-win32-arm64-msvc': 1.1.5 + '@rolldown/binding-win32-x64-msvc': 1.1.5 + + scheduler@0.27.0: {} + + seroval-plugins@1.6.0(seroval@1.6.0): + dependencies: + seroval: 1.6.0 + + seroval@1.6.0: {} + + source-map-js@1.2.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + + toml@4.3.0: {} + + tslib@2.8.1: + optional: true + + typescript@6.0.3: {} + + use-sync-external-store@1.6.0(react@19.2.7): + dependencies: + react: 19.2.7 + + uuid@14.0.1: {} + + vite@8.1.5(yaml@2.9.0): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.5 + postcss: 8.5.25 + rolldown: 1.1.5 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + yaml: 2.9.0 + + yaml@2.9.0: {} diff --git a/examples/playground/pnpm-workspace.yaml b/examples/playground/pnpm-workspace.yaml new file mode 100644 index 0000000..d80d736 --- /dev/null +++ b/examples/playground/pnpm-workspace.yaml @@ -0,0 +1,10 @@ +packages: + - "." + +overrides: + effect: 4.0.0-beta.102 + +minimumReleaseAge: 1440 +minimumReleaseAgeExclude: + - effect@4.0.0-beta.102 + diff --git a/examples/playground/src/components/ExamplePage.tsx b/examples/playground/src/components/ExamplePage.tsx new file mode 100644 index 0000000..7e03044 --- /dev/null +++ b/examples/playground/src/components/ExamplePage.tsx @@ -0,0 +1,34 @@ +import type { ReactNode } from "react" + +export function ExamplePage({ + title, + summary, + machineFile, + children +}: { + readonly title: string + readonly summary: string + readonly machineFile: string + readonly children: ReactNode +}) { + return ( +
+
+

Machine starter

+

{title}

+

{summary}

+ {machineFile} +
+
{children}
+
+ ) +} + +export function StarterPanel({ children }: { readonly children: ReactNode }) { + return ( +
+

Implementation area

+ {children} +
+ ) +} diff --git a/examples/playground/src/examples/media-player/MediaPlayerPage.tsx b/examples/playground/src/examples/media-player/MediaPlayerPage.tsx new file mode 100644 index 0000000..79a09bf --- /dev/null +++ b/examples/playground/src/examples/media-player/MediaPlayerPage.tsx @@ -0,0 +1,49 @@ +import { useEffect, useState } from "react" +import { ExamplePage, StarterPanel } from "../../components/ExamplePage.tsx" +import { MediaPlayerMachine } from "./machine.ts" + +export function MediaPlayerPage() { + void MediaPlayerMachine + + const [source, setSource] = useState() + + useEffect( + () => () => { + if (source !== undefined) URL.revokeObjectURL(source) + }, + [source] + ) + + return ( + + + + +

Translate DOM events

+

+ The statechart separates playback and volume. Wire playing, pause,{" "} + waiting,{` `} + canplay, ended, and error into the prepared events. +

+
+
+ ) +} diff --git a/examples/playground/src/examples/media-player/machine.ts b/examples/playground/src/examples/media-player/machine.ts new file mode 100644 index 0000000..d4d60b1 --- /dev/null +++ b/examples/playground/src/examples/media-player/machine.ts @@ -0,0 +1,107 @@ +import { Machine } from "@typeonce/effect-machine" +import { Schema } from "effect" + +export const MediaPlayerState = Schema.TaggedUnion({ + Player: {}, + playback: {}, + Empty: {}, + Loading: {}, + Paused: {}, + Playing: {}, + Buffering: {}, + Ended: {}, + Failed: { message: Schema.String }, + volume: {}, + Audible: { volume: Schema.Number }, + Muted: { previousVolume: Schema.Number } +}) + +export const MediaPlayerEvent = Schema.TaggedUnion({ + SourceSelected: { url: Schema.String }, + PlayRequested: {}, + PauseRequested: {}, + MediaPlaying: {}, + MediaPaused: {}, + MediaWaiting: {}, + MediaCanPlay: {}, + MediaEnded: {}, + MediaFailed: { message: Schema.String }, + VolumeChanged: { volume: Schema.Number }, + MuteToggled: {} +}) + +export const MediaPlayerStates = Machine.defineStates({ + Player: { + schema: MediaPlayerState.cases.Player, + type: "parallel", + states: { + playback: { + schema: MediaPlayerState.cases.playback, + initial: "Empty", + states: { + Empty: MediaPlayerState.cases.Empty, + Loading: MediaPlayerState.cases.Loading, + Paused: MediaPlayerState.cases.Paused, + Playing: MediaPlayerState.cases.Playing, + Buffering: MediaPlayerState.cases.Buffering, + Ended: MediaPlayerState.cases.Ended, + Failed: MediaPlayerState.cases.Failed + } + }, + volume: { + schema: MediaPlayerState.cases.volume, + initial: "Audible", + states: { + Audible: MediaPlayerState.cases.Audible, + Muted: MediaPlayerState.cases.Muted + } + } + } + } +}) + +const initialPlayer = () => + MediaPlayerStates.initial.Player(MediaPlayerState.cases.Player.make({}), (player) => + player + .playback( + MediaPlayerState.cases.playback.make({}), + (playback) => playback.Empty(MediaPlayerState.cases.Empty.make({})) + ) + .volume( + MediaPlayerState.cases.volume.make({}), + (volume) => volume.Audible(MediaPlayerState.cases.Audible.make({ volume: 1 })) + )) + +/** + * The browser event protocol and parallel topology are ready. Keep calls to + * HTMLAudioElement.play/pause in the React adapter (or staged actions), and + * feed resulting DOM events back into this machine. + */ +export const MediaPlayerMachine = Machine.make({ + id: "MediaPlayer", + states: MediaPlayerStates.states, + events: [MediaPlayerEvent], + initial: initialPlayer +}).handle({ + Player: { + states: { + playback: { + states: { + Empty: {}, + Loading: {}, + Paused: {}, + Playing: {}, + Buffering: {}, + Ended: {}, + Failed: {} + } + }, + volume: { + states: { + Audible: {}, + Muted: {} + } + } + } + } +}) diff --git a/examples/playground/src/examples/microwave/MicrowavePage.tsx b/examples/playground/src/examples/microwave/MicrowavePage.tsx new file mode 100644 index 0000000..906cac5 --- /dev/null +++ b/examples/playground/src/examples/microwave/MicrowavePage.tsx @@ -0,0 +1,30 @@ +import { ExamplePage, StarterPanel } from "../../components/ExamplePage.tsx" +import { MicrowaveMachine } from "./machine.ts" + +export function MicrowavePage() { + void MicrowaveMachine + + return ( + + +