xstate 5.32.2 → 5.32.3
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.
- package/README.md +1 -1
- package/dist/{StateMachine-67a0f463.development.cjs.js → StateMachine-204b27f3.development.cjs.js} +2 -2
- package/dist/{StateMachine-94d215e3.cjs.js → StateMachine-425d2161.cjs.js} +2 -2
- package/dist/{StateMachine-d1d80308.esm.js → StateMachine-c47cd806.esm.js} +2 -2
- package/dist/{StateMachine-23c204bb.development.esm.js → StateMachine-db7632ed.development.esm.js} +2 -2
- package/dist/{assign-f8f66278.development.cjs.js → assign-258bf201.development.cjs.js} +1 -1
- package/dist/{assign-b5bc78f7.cjs.js → assign-2c3177c8.cjs.js} +1 -1
- package/dist/{assign-54b312bc.esm.js → assign-46f917eb.esm.js} +1 -1
- package/dist/{assign-43b1b558.development.esm.js → assign-635f6692.development.esm.js} +1 -1
- package/dist/{log-d9f3f459.development.cjs.js → log-2db8d682.development.cjs.js} +2 -2
- package/dist/{log-c94995c7.cjs.js → log-4fd9aefe.cjs.js} +2 -2
- package/dist/{log-db444cad.development.esm.js → log-72d94aac.development.esm.js} +2 -2
- package/dist/{log-9b02c355.esm.js → log-e646aed8.esm.js} +2 -2
- package/dist/{raise-eca73993.development.cjs.js → raise-3e483b1a.development.cjs.js} +1 -0
- package/dist/{raise-c445379d.cjs.js → raise-4c123cf0.cjs.js} +1 -0
- package/dist/{raise-235108c6.esm.js → raise-78b480c6.esm.js} +1 -1
- package/dist/{raise-45f11c00.development.esm.js → raise-b164eb3b.development.esm.js} +1 -1
- package/dist/xstate-actions.cjs.js +3 -3
- package/dist/xstate-actions.development.cjs.js +3 -3
- package/dist/xstate-actions.development.esm.js +3 -3
- package/dist/xstate-actions.esm.js +3 -3
- package/dist/xstate-actors.cjs.js +1 -1
- package/dist/xstate-actors.development.cjs.js +1 -1
- package/dist/xstate-actors.development.esm.js +1 -1
- package/dist/xstate-actors.esm.js +1 -1
- package/dist/xstate-graph.cjs.js +3 -3
- package/dist/xstate-graph.development.cjs.js +3 -3
- package/dist/xstate-graph.development.esm.js +3 -3
- package/dist/xstate-graph.esm.js +3 -3
- package/dist/xstate-guards.cjs.js +1 -1
- package/dist/xstate-guards.development.cjs.js +1 -1
- package/dist/xstate-guards.development.esm.js +1 -1
- package/dist/xstate-guards.esm.js +1 -1
- package/dist/xstate.cjs.js +17 -5
- package/dist/xstate.development.cjs.js +17 -5
- package/dist/xstate.development.esm.js +21 -9
- package/dist/xstate.esm.js +21 -9
- package/dist/xstate.umd.min.js +1 -1
- package/dist/xstate.umd.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -164,7 +164,7 @@ toggleActor.send({ type: 'TOGGLE' });
|
|
|
164
164
|
- Deploy to Stately Sky
|
|
165
165
|
- Generate & modify machines with Stately AI
|
|
166
166
|
|
|
167
|
-
<a href="stately.ai/registry/new?ref=github" title="Stately Studio">
|
|
167
|
+
<a href="https://stately.ai/registry/new?ref=github" title="Stately Studio">
|
|
168
168
|
<img src="https://github.com/statelyai/xstate/assets/1093738/74ed9cbc-b824-4ed7-a16d-f104947af8a7" alt="XState Viz" width="800" />
|
|
169
169
|
</a>
|
|
170
170
|
|
package/dist/{StateMachine-67a0f463.development.cjs.js → StateMachine-204b27f3.development.cjs.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dist_xstateGuards = require('./raise-
|
|
4
|
-
var assign = require('./assign-
|
|
3
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
4
|
+
var assign = require('./assign-258bf201.development.cjs.js');
|
|
5
5
|
|
|
6
6
|
const cache = new WeakMap();
|
|
7
7
|
function memo(object, key, fn) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dist_xstateGuards = require('./raise-
|
|
4
|
-
var assign = require('./assign-
|
|
3
|
+
var dist_xstateGuards = require('./raise-4c123cf0.cjs.js');
|
|
4
|
+
var assign = require('./assign-2c3177c8.cjs.js');
|
|
5
5
|
|
|
6
6
|
const cache = new WeakMap();
|
|
7
7
|
function memo(object, key, fn) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as STATE_DELIMITER,
|
|
2
|
-
import { a as assign } from './assign-
|
|
1
|
+
import { S as STATE_DELIMITER, z as mapValues, t as toArray, B as formatTransitions, C as toTransitionConfigArray, D as formatTransition, N as NULL_EVENT, E as evaluateGuard, F as createInvokeId, G as getDelayedTransitions, H as formatInitialTransition, I as getCandidates, J as formatRouteTransitions, K as resolveStateValue, L as getAllStateNodes, q as getStateNodes, M as createMachineSnapshot, O as isInFinalState, e as macrostep, P as transitionNode, Q as resolveActionsAndContext, f as createInitEvent, g as initialMicrostep, R as toStatePath, T as isStateId, U as getStateNodeByPath, V as getPersistedSnapshot, W as resolveReferencedActor, c as createActor, $ as $$ACTOR_TYPE } from './raise-78b480c6.esm.js';
|
|
2
|
+
import { a as assign } from './assign-46f917eb.esm.js';
|
|
3
3
|
|
|
4
4
|
const cache = new WeakMap();
|
|
5
5
|
function memo(object, key, fn) {
|
package/dist/{StateMachine-23c204bb.development.esm.js → StateMachine-db7632ed.development.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as STATE_DELIMITER,
|
|
2
|
-
import { a as assign } from './assign-
|
|
1
|
+
import { S as STATE_DELIMITER, z as mapValues, t as toArray, B as formatTransitions, C as toTransitionConfigArray, D as formatTransition, N as NULL_EVENT, E as evaluateGuard, F as createInvokeId, G as getDelayedTransitions, H as formatInitialTransition, I as getCandidates, J as formatRouteTransitions, K as resolveStateValue, L as getAllStateNodes, q as getStateNodes, M as createMachineSnapshot, O as isInFinalState, e as macrostep, P as transitionNode, Q as resolveActionsAndContext, f as createInitEvent, g as initialMicrostep, R as toStatePath, T as isStateId, U as getStateNodeByPath, V as getPersistedSnapshot, W as resolveReferencedActor, c as createActor, $ as $$ACTOR_TYPE } from './raise-b164eb3b.development.esm.js';
|
|
2
|
+
import { a as assign } from './assign-635f6692.development.esm.js';
|
|
3
3
|
|
|
4
4
|
const cache = new WeakMap();
|
|
5
5
|
function memo(object, key, fn) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as ProcessingStatus, W as resolveReferencedActor, c as createActor, a0 as cloneMachineSnapshot } from './raise-78b480c6.esm.js';
|
|
2
2
|
|
|
3
3
|
function createSpawner(actorScope, {
|
|
4
4
|
machine,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a0 as ProcessingStatus, W as resolveReferencedActor, c as createActor, a1 as cloneMachineSnapshot, Y as executingCustomAction } from './raise-b164eb3b.development.esm.js';
|
|
2
2
|
|
|
3
3
|
function createSpawner(actorScope, {
|
|
4
4
|
machine,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dist_xstateGuards = require('./raise-
|
|
4
|
-
var assign = require('./assign-
|
|
3
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
4
|
+
var assign = require('./assign-258bf201.development.cjs.js');
|
|
5
5
|
|
|
6
6
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
7
7
|
event: eventOrExpr
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var dist_xstateGuards = require('./raise-
|
|
4
|
-
var assign = require('./assign-
|
|
3
|
+
var dist_xstateGuards = require('./raise-4c123cf0.cjs.js');
|
|
4
|
+
var assign = require('./assign-2c3177c8.cjs.js');
|
|
5
5
|
|
|
6
6
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
7
7
|
event: eventOrExpr
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as assign } from './assign-
|
|
1
|
+
import { Y as executingCustomAction, Z as XSTATE_ERROR, _ as createErrorActorEvent, E as evaluateGuard, b as cancel, r as raise, d as spawnChild, s as stopChild } from './raise-b164eb3b.development.esm.js';
|
|
2
|
+
import { a as assign } from './assign-635f6692.development.esm.js';
|
|
3
3
|
|
|
4
4
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
5
5
|
event: eventOrExpr
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as assign } from './assign-
|
|
1
|
+
import { Y as XSTATE_ERROR, Z as createErrorActorEvent, E as evaluateGuard, b as cancel, r as raise, d as spawnChild, s as stopChild } from './raise-78b480c6.esm.js';
|
|
2
|
+
import { a as assign } from './assign-46f917eb.esm.js';
|
|
3
3
|
|
|
4
4
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
5
5
|
event: eventOrExpr
|
|
@@ -2838,6 +2838,7 @@ exports.createErrorActorEvent = createErrorActorEvent;
|
|
|
2838
2838
|
exports.createInitEvent = createInitEvent;
|
|
2839
2839
|
exports.createInvokeId = createInvokeId;
|
|
2840
2840
|
exports.createMachineSnapshot = createMachineSnapshot;
|
|
2841
|
+
exports.createSystem = createSystem;
|
|
2841
2842
|
exports.evaluateGuard = evaluateGuard;
|
|
2842
2843
|
exports.formatInitialTransition = formatInitialTransition;
|
|
2843
2844
|
exports.formatRouteTransitions = formatRouteTransitions;
|
|
@@ -2776,6 +2776,7 @@ exports.createErrorActorEvent = createErrorActorEvent;
|
|
|
2776
2776
|
exports.createInitEvent = createInitEvent;
|
|
2777
2777
|
exports.createInvokeId = createInvokeId;
|
|
2778
2778
|
exports.createMachineSnapshot = createMachineSnapshot;
|
|
2779
|
+
exports.createSystem = createSystem;
|
|
2779
2780
|
exports.evaluateGuard = evaluateGuard;
|
|
2780
2781
|
exports.formatInitialTransition = formatInitialTransition;
|
|
2781
2782
|
exports.formatRouteTransitions = formatRouteTransitions;
|
|
@@ -2759,4 +2759,4 @@ function raise(eventOrExpr, options) {
|
|
|
2759
2759
|
return raise;
|
|
2760
2760
|
}
|
|
2761
2761
|
|
|
2762
|
-
export { $$ACTOR_TYPE as $, Actor as A,
|
|
2762
|
+
export { $$ACTOR_TYPE as $, Actor as A, formatTransitions as B, toTransitionConfigArray as C, formatTransition as D, evaluateGuard as E, createInvokeId as F, getDelayedTransitions as G, formatInitialTransition as H, getCandidates as I, formatRouteTransitions as J, resolveStateValue as K, getAllStateNodes as L, createMachineSnapshot as M, NULL_EVENT as N, isInFinalState as O, transitionNode as P, resolveActionsAndContext as Q, toStatePath as R, STATE_DELIMITER as S, isStateId as T, getStateNodeByPath as U, getPersistedSnapshot as V, resolveReferencedActor as W, XSTATE_STOP as X, XSTATE_ERROR as Y, createErrorActorEvent as Z, ProcessingStatus as _, createSystem as a, cloneMachineSnapshot as a0, cancel as b, createActor as c, spawnChild as d, macrostep as e, createInitEvent as f, initialMicrostep as g, getProperAncestors as h, isAtomicStateNode as i, interpret as j, and as k, stateIn as l, matchesEventDescriptor as m, not as n, or as o, isMachineSnapshot as p, getStateNodes as q, raise as r, stopChild as s, toArray as t, getAllOwnEventDescriptors as u, matchesState as v, pathToStateValue as w, toObserver as x, stop as y, mapValues as z };
|
|
@@ -2821,4 +2821,4 @@ function raise(eventOrExpr, options) {
|
|
|
2821
2821
|
return raise;
|
|
2822
2822
|
}
|
|
2823
2823
|
|
|
2824
|
-
export { $$ACTOR_TYPE as $, Actor as A,
|
|
2824
|
+
export { $$ACTOR_TYPE as $, Actor as A, formatTransitions as B, toTransitionConfigArray as C, formatTransition as D, evaluateGuard as E, createInvokeId as F, getDelayedTransitions as G, formatInitialTransition as H, getCandidates as I, formatRouteTransitions as J, resolveStateValue as K, getAllStateNodes as L, createMachineSnapshot as M, NULL_EVENT as N, isInFinalState as O, transitionNode as P, resolveActionsAndContext as Q, toStatePath as R, STATE_DELIMITER as S, isStateId as T, getStateNodeByPath as U, getPersistedSnapshot as V, resolveReferencedActor as W, XSTATE_STOP as X, executingCustomAction as Y, XSTATE_ERROR as Z, createErrorActorEvent as _, createSystem as a, ProcessingStatus as a0, cloneMachineSnapshot as a1, cancel as b, createActor as c, spawnChild as d, macrostep as e, createInitEvent as f, initialMicrostep as g, getProperAncestors as h, isAtomicStateNode as i, interpret as j, and as k, stateIn as l, matchesEventDescriptor as m, not as n, or as o, isMachineSnapshot as p, getStateNodes as q, raise as r, stopChild as s, toArray as t, getAllOwnEventDescriptors as u, matchesState as v, pathToStateValue as w, toObserver as x, stop as y, mapValues as z };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var assign = require('./assign-
|
|
6
|
-
var dist_xstateGuards = require('./raise-
|
|
7
|
-
var log = require('./log-
|
|
5
|
+
var assign = require('./assign-2c3177c8.cjs.js');
|
|
6
|
+
var dist_xstateGuards = require('./raise-4c123cf0.cjs.js');
|
|
7
|
+
var log = require('./log-4fd9aefe.cjs.js');
|
|
8
8
|
require('./xstate-dev.cjs.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var assign = require('./assign-
|
|
6
|
-
var dist_xstateGuards = require('./raise-
|
|
7
|
-
var log = require('./log-
|
|
5
|
+
var assign = require('./assign-258bf201.development.cjs.js');
|
|
6
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
7
|
+
var log = require('./log-2db8d682.development.cjs.js');
|
|
8
8
|
require('./xstate-dev.development.cjs.js');
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as assign } from './assign-
|
|
2
|
-
export {
|
|
3
|
-
export { a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-
|
|
1
|
+
export { a as assign } from './assign-635f6692.development.esm.js';
|
|
2
|
+
export { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-b164eb3b.development.esm.js';
|
|
3
|
+
export { a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-72d94aac.development.esm.js';
|
|
4
4
|
import './xstate-dev.development.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as assign } from './assign-
|
|
2
|
-
export {
|
|
3
|
-
export { a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-
|
|
1
|
+
export { a as assign } from './assign-46f917eb.esm.js';
|
|
2
|
+
export { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-78b480c6.esm.js';
|
|
3
|
+
export { a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-e646aed8.esm.js';
|
|
4
4
|
import './xstate-dev.esm.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var dist_xstateGuards = require('./raise-
|
|
5
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
6
6
|
require('./xstate-dev.development.cjs.js');
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/xstate-graph.cjs.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var dist_xstateActors = require('./xstate-actors.cjs.js');
|
|
6
|
-
var StateMachine = require('./StateMachine-
|
|
7
|
-
var dist_xstateGuards = require('./raise-
|
|
6
|
+
var StateMachine = require('./StateMachine-425d2161.cjs.js');
|
|
7
|
+
var dist_xstateGuards = require('./raise-4c123cf0.cjs.js');
|
|
8
8
|
require('./xstate-dev.cjs.js');
|
|
9
|
-
require('./assign-
|
|
9
|
+
require('./assign-2c3177c8.cjs.js');
|
|
10
10
|
|
|
11
11
|
function simpleStringify(value) {
|
|
12
12
|
return JSON.stringify(value);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var dist_xstateActors = require('./xstate-actors.development.cjs.js');
|
|
6
|
-
var StateMachine = require('./StateMachine-
|
|
7
|
-
var dist_xstateGuards = require('./raise-
|
|
6
|
+
var StateMachine = require('./StateMachine-204b27f3.development.cjs.js');
|
|
7
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
8
8
|
require('./xstate-dev.development.cjs.js');
|
|
9
|
-
require('./assign-
|
|
9
|
+
require('./assign-258bf201.development.cjs.js');
|
|
10
10
|
|
|
11
11
|
function simpleStringify(value) {
|
|
12
12
|
return JSON.stringify(value);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createEmptyActor } from './xstate-actors.development.esm.js';
|
|
2
|
-
import { S as StateMachine } from './StateMachine-
|
|
3
|
-
import {
|
|
2
|
+
import { S as StateMachine } from './StateMachine-db7632ed.development.esm.js';
|
|
3
|
+
import { p as isMachineSnapshot, u as getAllOwnEventDescriptors } from './raise-b164eb3b.development.esm.js';
|
|
4
4
|
import './xstate-dev.development.esm.js';
|
|
5
|
-
import './assign-
|
|
5
|
+
import './assign-635f6692.development.esm.js';
|
|
6
6
|
|
|
7
7
|
function simpleStringify(value) {
|
|
8
8
|
return JSON.stringify(value);
|
package/dist/xstate-graph.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createEmptyActor } from './xstate-actors.esm.js';
|
|
2
|
-
import { S as StateMachine } from './StateMachine-
|
|
3
|
-
import {
|
|
2
|
+
import { S as StateMachine } from './StateMachine-c47cd806.esm.js';
|
|
3
|
+
import { p as isMachineSnapshot, u as getAllOwnEventDescriptors } from './raise-78b480c6.esm.js';
|
|
4
4
|
import './xstate-dev.esm.js';
|
|
5
|
-
import './assign-
|
|
5
|
+
import './assign-46f917eb.esm.js';
|
|
6
6
|
|
|
7
7
|
function simpleStringify(value) {
|
|
8
8
|
return JSON.stringify(value);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { k as and, E as evaluateGuard, n as not, o as or, l as stateIn } from './raise-b164eb3b.development.esm.js';
|
|
2
2
|
import './xstate-dev.development.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { k as and, E as evaluateGuard, n as not, o as or, l as stateIn } from './raise-78b480c6.esm.js';
|
|
2
2
|
import './xstate-dev.esm.js';
|
package/dist/xstate.cjs.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var dist_xstateActors = require('./xstate-actors.cjs.js');
|
|
6
|
-
var dist_xstateGuards = require('./raise-
|
|
7
|
-
var StateMachine = require('./StateMachine-
|
|
8
|
-
var assign = require('./assign-
|
|
9
|
-
var log = require('./log-
|
|
6
|
+
var dist_xstateGuards = require('./raise-4c123cf0.cjs.js');
|
|
7
|
+
var StateMachine = require('./StateMachine-425d2161.cjs.js');
|
|
8
|
+
var assign = require('./assign-2c3177c8.cjs.js');
|
|
9
|
+
var log = require('./log-4fd9aefe.cjs.js');
|
|
10
10
|
require('./xstate-dev.cjs.js');
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -136,6 +136,18 @@ function mapState(snapshot, mapper) {
|
|
|
136
136
|
/** @internal */
|
|
137
137
|
function createInertActorScope(actorLogic) {
|
|
138
138
|
const self = dist_xstateGuards.createActor(actorLogic);
|
|
139
|
+
// The Actor constructor eagerly calls `getInitialSnapshot` during `_initState`,
|
|
140
|
+
// which can register child actors with `systemId` in `self.system`.
|
|
141
|
+
// Replace `self.system` with a fresh system so that child actors spawned by
|
|
142
|
+
// the *caller's* explicit `getInitialSnapshot` / `transition` call register
|
|
143
|
+
// into a clean system and do not collide with those from the eager
|
|
144
|
+
// construction call. This is what makes `initialTransition(machine)` safe
|
|
145
|
+
// even when invoked actors carry a `systemId`.
|
|
146
|
+
const freshSystem = dist_xstateGuards.createSystem(self, {
|
|
147
|
+
clock: self.system._clock,
|
|
148
|
+
logger: self.system._logger
|
|
149
|
+
});
|
|
150
|
+
self.system = freshSystem;
|
|
139
151
|
const inertActorScope = {
|
|
140
152
|
self,
|
|
141
153
|
defer: () => {},
|
|
@@ -143,7 +155,7 @@ function createInertActorScope(actorLogic) {
|
|
|
143
155
|
logger: () => {},
|
|
144
156
|
sessionId: '',
|
|
145
157
|
stopChild: () => {},
|
|
146
|
-
system:
|
|
158
|
+
system: freshSystem,
|
|
147
159
|
emit: () => {},
|
|
148
160
|
actionExecutor: () => {}
|
|
149
161
|
};
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var dist_xstateActors = require('./xstate-actors.development.cjs.js');
|
|
6
|
-
var dist_xstateGuards = require('./raise-
|
|
7
|
-
var StateMachine = require('./StateMachine-
|
|
8
|
-
var assign = require('./assign-
|
|
9
|
-
var log = require('./log-
|
|
6
|
+
var dist_xstateGuards = require('./raise-3e483b1a.development.cjs.js');
|
|
7
|
+
var StateMachine = require('./StateMachine-204b27f3.development.cjs.js');
|
|
8
|
+
var assign = require('./assign-258bf201.development.cjs.js');
|
|
9
|
+
var log = require('./log-2db8d682.development.cjs.js');
|
|
10
10
|
require('./xstate-dev.development.cjs.js');
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -136,6 +136,18 @@ function mapState(snapshot, mapper) {
|
|
|
136
136
|
/** @internal */
|
|
137
137
|
function createInertActorScope(actorLogic) {
|
|
138
138
|
const self = dist_xstateGuards.createActor(actorLogic);
|
|
139
|
+
// The Actor constructor eagerly calls `getInitialSnapshot` during `_initState`,
|
|
140
|
+
// which can register child actors with `systemId` in `self.system`.
|
|
141
|
+
// Replace `self.system` with a fresh system so that child actors spawned by
|
|
142
|
+
// the *caller's* explicit `getInitialSnapshot` / `transition` call register
|
|
143
|
+
// into a clean system and do not collide with those from the eager
|
|
144
|
+
// construction call. This is what makes `initialTransition(machine)` safe
|
|
145
|
+
// even when invoked actors carry a `systemId`.
|
|
146
|
+
const freshSystem = dist_xstateGuards.createSystem(self, {
|
|
147
|
+
clock: self.system._clock,
|
|
148
|
+
logger: self.system._logger
|
|
149
|
+
});
|
|
150
|
+
self.system = freshSystem;
|
|
139
151
|
const inertActorScope = {
|
|
140
152
|
self,
|
|
141
153
|
defer: () => {},
|
|
@@ -143,7 +155,7 @@ function createInertActorScope(actorLogic) {
|
|
|
143
155
|
logger: () => {},
|
|
144
156
|
sessionId: '',
|
|
145
157
|
stopChild: () => {},
|
|
146
|
-
system:
|
|
158
|
+
system: freshSystem,
|
|
147
159
|
emit: () => {},
|
|
148
160
|
actionExecutor: () => {}
|
|
149
161
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { createEmptyActor, fromCallback, fromEventObservable, fromObservable, fromPromise, fromTransition } from './xstate-actors.development.esm.js';
|
|
2
|
-
import { m as matchesEventDescriptor, t as toArray, i as isAtomicStateNode, c as createActor, r as raise,
|
|
3
|
-
export { A as Actor,
|
|
4
|
-
import { S as StateMachine } from './StateMachine-
|
|
5
|
-
export { S as StateMachine, a as StateNode } from './StateMachine-
|
|
6
|
-
import { a as assign } from './assign-
|
|
7
|
-
export { a as assign } from './assign-
|
|
8
|
-
import { s as sendTo, l as log, e as enqueueActions, a as emit } from './log-
|
|
9
|
-
export { S as SpecialTargets, a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-
|
|
2
|
+
import { m as matchesEventDescriptor, t as toArray, i as isAtomicStateNode, c as createActor, a as createSystem, r as raise, b as cancel, s as stopChild, d as spawnChild, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './raise-b164eb3b.development.esm.js';
|
|
3
|
+
export { A as Actor, u as __unsafe_getAllOwnEventDescriptors, k as and, b as cancel, c as createActor, q as getStateNodes, j as interpret, p as isMachineSnapshot, v as matchesState, n as not, o as or, w as pathToStateValue, r as raise, d as spawnChild, l as stateIn, y as stop, s as stopChild, x as toObserver } from './raise-b164eb3b.development.esm.js';
|
|
4
|
+
import { S as StateMachine } from './StateMachine-db7632ed.development.esm.js';
|
|
5
|
+
export { S as StateMachine, a as StateNode } from './StateMachine-db7632ed.development.esm.js';
|
|
6
|
+
import { a as assign } from './assign-635f6692.development.esm.js';
|
|
7
|
+
export { a as assign } from './assign-635f6692.development.esm.js';
|
|
8
|
+
import { s as sendTo, l as log, e as enqueueActions, a as emit } from './log-72d94aac.development.esm.js';
|
|
9
|
+
export { S as SpecialTargets, a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-72d94aac.development.esm.js';
|
|
10
10
|
import './xstate-dev.development.esm.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -136,6 +136,18 @@ function mapState(snapshot, mapper) {
|
|
|
136
136
|
/** @internal */
|
|
137
137
|
function createInertActorScope(actorLogic) {
|
|
138
138
|
const self = createActor(actorLogic);
|
|
139
|
+
// The Actor constructor eagerly calls `getInitialSnapshot` during `_initState`,
|
|
140
|
+
// which can register child actors with `systemId` in `self.system`.
|
|
141
|
+
// Replace `self.system` with a fresh system so that child actors spawned by
|
|
142
|
+
// the *caller's* explicit `getInitialSnapshot` / `transition` call register
|
|
143
|
+
// into a clean system and do not collide with those from the eager
|
|
144
|
+
// construction call. This is what makes `initialTransition(machine)` safe
|
|
145
|
+
// even when invoked actors carry a `systemId`.
|
|
146
|
+
const freshSystem = createSystem(self, {
|
|
147
|
+
clock: self.system._clock,
|
|
148
|
+
logger: self.system._logger
|
|
149
|
+
});
|
|
150
|
+
self.system = freshSystem;
|
|
139
151
|
const inertActorScope = {
|
|
140
152
|
self,
|
|
141
153
|
defer: () => {},
|
|
@@ -143,7 +155,7 @@ function createInertActorScope(actorLogic) {
|
|
|
143
155
|
logger: () => {},
|
|
144
156
|
sessionId: '',
|
|
145
157
|
stopChild: () => {},
|
|
146
|
-
system:
|
|
158
|
+
system: freshSystem,
|
|
147
159
|
emit: () => {},
|
|
148
160
|
actionExecutor: () => {}
|
|
149
161
|
};
|
package/dist/xstate.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { createEmptyActor, fromCallback, fromEventObservable, fromObservable, fromPromise, fromTransition } from './xstate-actors.esm.js';
|
|
2
|
-
import { m as matchesEventDescriptor, t as toArray, i as isAtomicStateNode, c as createActor, r as raise,
|
|
3
|
-
export { A as Actor,
|
|
4
|
-
import { S as StateMachine } from './StateMachine-
|
|
5
|
-
export { S as StateMachine, a as StateNode } from './StateMachine-
|
|
6
|
-
import { a as assign } from './assign-
|
|
7
|
-
export { a as assign } from './assign-
|
|
8
|
-
import { s as sendTo, l as log, e as enqueueActions, a as emit } from './log-
|
|
9
|
-
export { S as SpecialTargets, a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-
|
|
2
|
+
import { m as matchesEventDescriptor, t as toArray, i as isAtomicStateNode, c as createActor, a as createSystem, r as raise, b as cancel, s as stopChild, d as spawnChild, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './raise-78b480c6.esm.js';
|
|
3
|
+
export { A as Actor, u as __unsafe_getAllOwnEventDescriptors, k as and, b as cancel, c as createActor, q as getStateNodes, j as interpret, p as isMachineSnapshot, v as matchesState, n as not, o as or, w as pathToStateValue, r as raise, d as spawnChild, l as stateIn, y as stop, s as stopChild, x as toObserver } from './raise-78b480c6.esm.js';
|
|
4
|
+
import { S as StateMachine } from './StateMachine-c47cd806.esm.js';
|
|
5
|
+
export { S as StateMachine, a as StateNode } from './StateMachine-c47cd806.esm.js';
|
|
6
|
+
import { a as assign } from './assign-46f917eb.esm.js';
|
|
7
|
+
export { a as assign } from './assign-46f917eb.esm.js';
|
|
8
|
+
import { s as sendTo, l as log, e as enqueueActions, a as emit } from './log-e646aed8.esm.js';
|
|
9
|
+
export { S as SpecialTargets, a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-e646aed8.esm.js';
|
|
10
10
|
import './xstate-dev.esm.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -136,6 +136,18 @@ function mapState(snapshot, mapper) {
|
|
|
136
136
|
/** @internal */
|
|
137
137
|
function createInertActorScope(actorLogic) {
|
|
138
138
|
const self = createActor(actorLogic);
|
|
139
|
+
// The Actor constructor eagerly calls `getInitialSnapshot` during `_initState`,
|
|
140
|
+
// which can register child actors with `systemId` in `self.system`.
|
|
141
|
+
// Replace `self.system` with a fresh system so that child actors spawned by
|
|
142
|
+
// the *caller's* explicit `getInitialSnapshot` / `transition` call register
|
|
143
|
+
// into a clean system and do not collide with those from the eager
|
|
144
|
+
// construction call. This is what makes `initialTransition(machine)` safe
|
|
145
|
+
// even when invoked actors carry a `systemId`.
|
|
146
|
+
const freshSystem = createSystem(self, {
|
|
147
|
+
clock: self.system._clock,
|
|
148
|
+
logger: self.system._logger
|
|
149
|
+
});
|
|
150
|
+
self.system = freshSystem;
|
|
139
151
|
const inertActorScope = {
|
|
140
152
|
self,
|
|
141
153
|
defer: () => {},
|
|
@@ -143,7 +155,7 @@ function createInertActorScope(actorLogic) {
|
|
|
143
155
|
logger: () => {},
|
|
144
156
|
sessionId: '',
|
|
145
157
|
stopChild: () => {},
|
|
146
|
-
system:
|
|
158
|
+
system: freshSystem,
|
|
147
159
|
emit: () => {},
|
|
148
160
|
actionExecutor: () => {}
|
|
149
161
|
};
|