diff --git a/.changeset/calm-machines-own.md b/.changeset/calm-machines-own.md deleted file mode 100644 index 40d5bf5..0000000 --- a/.changeset/calm-machines-own.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@typeonce/effect-machine": minor -"@typeonce/effect-machine-react": minor ---- - -Add `@typeonce/effect-machine-react` with `useMachineAtom` for owning and mounting one stable machine atom without subscribing its React owner to machine state. - -Typed state-path projections now return the same atom for repeated calls with the same machine and path. Descendants can select state-owned data directly during render: - -```tsx -const machine = useMachineAtom(() => MachineAtoms.make(AuthMachine, input)) -const editing = useAtomSuspense(AtomMachine.selectSnapshot(machine, "Editing")).value -``` - -Startup input is captured when React creates the owner. Send an event to update the running workflow, or change the owner's React key to replace the machine. diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index fb49b27..70872ea 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -1,5 +1,12 @@ # @typeonce/effect-machine-devtools +## 0.29.0 + +### Patch Changes + +- Updated dependencies [d739ebd] + - @typeonce/effect-machine@0.29.0 + ## 0.28.0 ### Patch Changes diff --git a/packages/devtools/package.json b/packages/devtools/package.json index 7df98c1..52f4abe 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine-devtools", - "version": "0.28.0", + "version": "0.29.0", "description": "Local development tools for Effect Machine", "author": "Sandro Maglione", "repository": { diff --git a/packages/effect-machine-react/CHANGELOG.md b/packages/effect-machine-react/CHANGELOG.md new file mode 100644 index 0000000..022cf80 --- /dev/null +++ b/packages/effect-machine-react/CHANGELOG.md @@ -0,0 +1,23 @@ +# @typeonce/effect-machine-react + +## 0.29.0 + +### Minor Changes + +- d739ebd: Add `@typeonce/effect-machine-react` with `useMachineAtom` for owning and mounting one stable machine atom without subscribing its React owner to machine state. + + Typed state-path projections now return the same atom for repeated calls with the same machine and path. Descendants can select state-owned data directly during render: + + ```tsx + const machine = useMachineAtom(() => MachineAtoms.make(AuthMachine, input)); + const editing = useAtomSuspense( + AtomMachine.selectSnapshot(machine, "Editing") + ).value; + ``` + + Startup input is captured when React creates the owner. Send an event to update the running workflow, or change the owner's React key to replace the machine. + +### Patch Changes + +- Updated dependencies [d739ebd] + - @typeonce/effect-machine@0.29.0 diff --git a/packages/effect-machine-react/package.json b/packages/effect-machine-react/package.json index b7e74af..158ce55 100644 --- a/packages/effect-machine-react/package.json +++ b/packages/effect-machine-react/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine-react", - "version": "0.28.0", + "version": "0.29.0", "description": "React ownership hooks for Effect Machine atoms", "author": "Sandro Maglione", "repository": { diff --git a/packages/effect-machine/CHANGELOG.md b/packages/effect-machine/CHANGELOG.md index 160e6dc..461ff8e 100644 --- a/packages/effect-machine/CHANGELOG.md +++ b/packages/effect-machine/CHANGELOG.md @@ -1,5 +1,22 @@ # @typeonce/effect-machine +## 0.29.0 + +### Minor Changes + +- d739ebd: Add `@typeonce/effect-machine-react` with `useMachineAtom` for owning and mounting one stable machine atom without subscribing its React owner to machine state. + + Typed state-path projections now return the same atom for repeated calls with the same machine and path. Descendants can select state-owned data directly during render: + + ```tsx + const machine = useMachineAtom(() => MachineAtoms.make(AuthMachine, input)); + const editing = useAtomSuspense( + AtomMachine.selectSnapshot(machine, "Editing") + ).value; + ``` + + Startup input is captured when React creates the owner. Send an event to update the running workflow, or change the owner's React key to replace the machine. + ## 0.28.0 ### Minor Changes diff --git a/packages/effect-machine/package.json b/packages/effect-machine/package.json index 81c7240..e49722d 100644 --- a/packages/effect-machine/package.json +++ b/packages/effect-machine/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine", - "version": "0.28.0", + "version": "0.29.0", "description": "Schema-first state machines and statecharts for Effect", "author": "Sandro Maglione", "repository": { diff --git a/packages/oxlint-plugin/CHANGELOG.md b/packages/oxlint-plugin/CHANGELOG.md index 412f660..9aee2d5 100644 --- a/packages/oxlint-plugin/CHANGELOG.md +++ b/packages/oxlint-plugin/CHANGELOG.md @@ -1,5 +1,7 @@ # @typeonce/oxlint-plugin-effect-machine +## 0.29.0 + ## 0.28.0 ## 0.27.1 diff --git a/packages/oxlint-plugin/package.json b/packages/oxlint-plugin/package.json index b832a2e..ac648fb 100644 --- a/packages/oxlint-plugin/package.json +++ b/packages/oxlint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/oxlint-plugin-effect-machine", - "version": "0.28.0", + "version": "0.29.0", "description": "Oxlint rules for Effect Machine models", "author": "Sandro Maglione", "repository": {