Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .changeset/machine-state-children-owner-layers.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/stable-server-values.md

This file was deleted.

8 changes: 8 additions & 0 deletions packages/devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @typeonce/effect-machine-devtools

## 0.43.0

### Patch Changes

- Updated dependencies [c9934ae]
- Updated dependencies [1d6c808]
- @typeonce/effect-machine@0.43.0

## 0.42.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine-devtools",
"version": "0.42.0",
"version": "0.43.0",
"description": "Local development tools for Effect Machine",
"author": "Sandro Maglione",
"repository": {
Expand Down
25 changes: 25 additions & 0 deletions packages/effect-machine-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @typeonce/effect-machine-react

## 0.43.0

### Minor Changes

- c9934ae: `MachineState` now renders child machines: pass a child bridge such as `machine.child(QuantityChild)` and the path and snapshot are typed by the child machine. `inactive` also renders while the state that owns the child is not active. `MachineStateProps` now takes the bridge type and the path, `MachineStateProps<A, Path>`.

Add `useMachineResult(atom)` for custom readers of result atoms such as `AtomMachine.select`, `matches`, or `can`. It serves the planned value during server rendering and hydration and keeps the last success while the machine starts, so hydrated markup is not replaced. Add `AtomMachine.isMachineAtom` to tell machine bridges from child bridges.

`createMachineContext` factories can declare a per-owner capability layer as a second parameter, and the Provider then requires a matching `layer` prop:

```tsx
const SignIn = createMachineContext((input: SignInInput, navigation: Layer.Layer<Navigation>) =>
AtomMachine.bind(Atom.runtime(Layer.provideMerge(navigation, AppLayer))).make(SignInMachine, input)
)

<SignIn.Provider input={input} layer={navigationLayer(router)} />
```

### Patch Changes

- 1d6c808: Serve referentially stable server values from machine atoms, so React no longer warns that `getServerSnapshot` should be cached while hydrating `MachineState` or other hooks that read machine atoms.
- Updated dependencies [c9934ae]
- Updated dependencies [1d6c808]
- @typeonce/effect-machine@0.43.0

## 0.42.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-machine-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine-react",
"version": "0.42.0",
"version": "0.43.0",
"description": "React ownership hooks for Effect Machine atoms",
"author": "Sandro Maglione",
"repository": {
Expand Down
22 changes: 22 additions & 0 deletions packages/effect-machine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @typeonce/effect-machine

## 0.43.0

### Minor Changes

- c9934ae: `MachineState` now renders child machines: pass a child bridge such as `machine.child(QuantityChild)` and the path and snapshot are typed by the child machine. `inactive` also renders while the state that owns the child is not active. `MachineStateProps` now takes the bridge type and the path, `MachineStateProps<A, Path>`.

Add `useMachineResult(atom)` for custom readers of result atoms such as `AtomMachine.select`, `matches`, or `can`. It serves the planned value during server rendering and hydration and keeps the last success while the machine starts, so hydrated markup is not replaced. Add `AtomMachine.isMachineAtom` to tell machine bridges from child bridges.

`createMachineContext` factories can declare a per-owner capability layer as a second parameter, and the Provider then requires a matching `layer` prop:

```tsx
const SignIn = createMachineContext((input: SignInInput, navigation: Layer.Layer<Navigation>) =>
AtomMachine.bind(Atom.runtime(Layer.provideMerge(navigation, AppLayer))).make(SignInMachine, input)
)

<SignIn.Provider input={input} layer={navigationLayer(router)} />
```

### Patch Changes

- 1d6c808: Serve referentially stable server values from machine atoms, so React no longer warns that `getServerSnapshot` should be cached while hydrating `MachineState` or other hooks that read machine atoms.

## 0.42.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-machine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine",
"version": "0.42.0",
"version": "0.43.0",
"description": "Schema-first state machines and statecharts for Effect",
"author": "Sandro Maglione",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions packages/oxlint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @typeonce/oxlint-plugin-effect-machine

## 0.43.0

## 0.42.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/oxlint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/oxlint-plugin-effect-machine",
"version": "0.42.0",
"version": "0.43.0",
"description": "Oxlint rules for Effect Machine models",
"author": "Sandro Maglione",
"repository": {
Expand Down
Loading