build(spf): build26 from 45504a2b

This commit is contained in:
publish
2026-08-05 18:57:39 +02:00
commit 8920135306
424 changed files with 17907 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import { signal, untrack, update } from "./signals/primitives.js";
//#region src/core/machine.ts
/**
* Provisions the shared mechanics for all machine-like primitives: a snapshot
* signal, an untracked state reader, and a transition function.
*
* Internal — consumed by `createMachineActor` and `createMachineReactor`. Not part of the
* public API.
*/
function createMachineCore(initialSnapshot) {
const snapshotSignal = signal(initialSnapshot);
const getState = () => untrack(() => snapshotSignal.get().value);
const transition = (to) => update(snapshotSignal, (current) => ({
...current,
value: to
}));
return {
snapshotSignal,
getState,
transition
};
}
//#endregion
export { createMachineCore };
//# sourceMappingURL=machine.js.map