xstate 5.32.4 → 5.32.6
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/dist/{StateMachine-812cc9b1.development.esm.js → StateMachine-28a9f50e.esm.js} +21 -14
- package/dist/{StateMachine-1fa46288.cjs.js → StateMachine-3778f5e0.development.cjs.js} +27 -8
- package/dist/{StateMachine-a83f1412.development.cjs.js → StateMachine-3f520def.cjs.js} +21 -14
- package/dist/{StateMachine-5f345bba.esm.js → StateMachine-fffbf42d.development.esm.js} +27 -8
- package/dist/{assign-29f23f4d.esm.js → assign-54f9e2d3.esm.js} +1 -1
- package/dist/{assign-afc27880.development.esm.js → assign-c349a5e8.development.esm.js} +1 -1
- package/dist/{assign-20143fe8.cjs.js → assign-d3f33159.cjs.js} +1 -1
- package/dist/{assign-bc0d949a.development.cjs.js → assign-f03a9bed.development.cjs.js} +1 -1
- package/dist/{log-9aab1c6d.development.cjs.js → log-0ed3e43f.development.cjs.js} +6 -5
- package/dist/{log-c1dec807.development.esm.js → log-140dec60.development.esm.js} +6 -5
- package/dist/{log-92e88543.cjs.js → log-3beea04f.cjs.js} +6 -5
- package/dist/{log-79409d72.esm.js → log-66075555.esm.js} +6 -5
- package/dist/{raise-898d0d91.development.cjs.js → raise-53e20da7.development.cjs.js} +14 -5
- package/dist/{raise-5fb0c8ca.esm.js → raise-8dd8aaec.esm.js} +8 -4
- package/dist/{raise-16ff4f94.cjs.js → raise-a26997bd.cjs.js} +7 -3
- package/dist/{raise-47978999.development.esm.js → raise-c90786ef.development.esm.js} +15 -6
- 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-actions.umd.min.js.map +1 -1
- 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-actors.umd.min.js.map +1 -1
- package/dist/xstate-graph.cjs.js +4 -4
- package/dist/xstate-graph.development.cjs.js +4 -4
- package/dist/xstate-graph.development.esm.js +4 -4
- package/dist/xstate-graph.esm.js +4 -4
- package/dist/xstate-graph.umd.min.js +1 -1
- package/dist/xstate-graph.umd.min.js.map +1 -1
- 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-guards.umd.min.js.map +1 -1
- package/dist/xstate.cjs.js +9 -10
- package/dist/xstate.development.cjs.js +9 -10
- package/dist/xstate.development.esm.js +13 -14
- package/dist/xstate.esm.js +13 -14
- package/dist/xstate.umd.min.js +1 -1
- package/dist/xstate.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -470,6 +470,9 @@ function createSystem(rootActor, options) {
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
// those are needed to make JSDoc `@link` work properly
|
|
473
|
+
// oxlint-disable no-unused-vars
|
|
474
|
+
|
|
475
|
+
// oxlint-enable no-unused-vars
|
|
473
476
|
|
|
474
477
|
let executingCustomAction = false;
|
|
475
478
|
const $$ACTOR_TYPE = 1;
|
|
@@ -1049,7 +1052,12 @@ class Actor {
|
|
|
1049
1052
|
if (this._processingStatus === ProcessingStatus.Stopped) {
|
|
1050
1053
|
// do nothing
|
|
1051
1054
|
{
|
|
1052
|
-
|
|
1055
|
+
let eventString;
|
|
1056
|
+
try {
|
|
1057
|
+
eventString = JSON.stringify(event);
|
|
1058
|
+
} catch {
|
|
1059
|
+
eventString = String(event);
|
|
1060
|
+
}
|
|
1053
1061
|
console.warn(`Event "${event.type}" was sent to stopped actor "${this.id} (${this.sessionId})". This actor has already reached its final state, and will not transition.\nEvent: ${eventString}`);
|
|
1054
1062
|
}
|
|
1055
1063
|
return;
|
|
@@ -1268,7 +1276,7 @@ function resolveSpawn(actorScope, snapshot, actionArgs, _actionParams, {
|
|
|
1268
1276
|
}
|
|
1269
1277
|
if (!actorRef) {
|
|
1270
1278
|
console.warn(
|
|
1271
|
-
//
|
|
1279
|
+
// oxlint-disable-next-line typescript/restrict-template-expressions,typescript/no-base-to-string
|
|
1272
1280
|
`Actor type '${src}' not found in machine '${actorScope.id}'.`);
|
|
1273
1281
|
}
|
|
1274
1282
|
return [cloneMachineSnapshot(snapshot, {
|
|
@@ -1843,7 +1851,7 @@ function formatInitialTransition(stateNode, _target) {
|
|
|
1843
1851
|
const resolvedTarget = typeof _target === 'string' ? stateNode.states[_target] : _target ? stateNode.states[_target.target] : undefined;
|
|
1844
1852
|
if (!resolvedTarget && _target) {
|
|
1845
1853
|
throw new Error(
|
|
1846
|
-
//
|
|
1854
|
+
// oxlint-disable-next-line typescript/restrict-template-expressions, typescript/no-base-to-string
|
|
1847
1855
|
`Initial state node "${_target}" not found on parent state node #${stateNode.id}`);
|
|
1848
1856
|
}
|
|
1849
1857
|
const transition = {
|
|
@@ -2218,7 +2226,7 @@ function microstep(transitions, currentSnapshot, actorScope, event, isInitial, i
|
|
|
2218
2226
|
nextState = resolveActionsAndContext(nextState, event, actorScope, nextStateNodes.sort((a, b) => b.order - a.order).flatMap(state => state.exit), internalQueue, undefined);
|
|
2219
2227
|
}
|
|
2220
2228
|
|
|
2221
|
-
//
|
|
2229
|
+
// oxlint-disable no-useless-catch
|
|
2222
2230
|
try {
|
|
2223
2231
|
if (historyValue === currentSnapshot.historyValue && areStateNodeCollectionsEqual(currentSnapshot._nodes, mutStateNodeSet)) {
|
|
2224
2232
|
return [nextState, actions];
|
|
@@ -2232,6 +2240,7 @@ function microstep(transitions, currentSnapshot, actorScope, event, isInitial, i
|
|
|
2232
2240
|
// See https://github.com/statelyai/rfcs/pull/4
|
|
2233
2241
|
throw e;
|
|
2234
2242
|
}
|
|
2243
|
+
// oxlint-enable no-useless-catch
|
|
2235
2244
|
} finally {
|
|
2236
2245
|
actorScope.actionExecutor = originalExecutor;
|
|
2237
2246
|
}
|
|
@@ -2768,7 +2777,7 @@ function resolveRaise(_, snapshot, args, actionParams, {
|
|
|
2768
2777
|
const delaysMap = snapshot.machine.implementations.delays;
|
|
2769
2778
|
if (typeof eventOrExpr === 'string') {
|
|
2770
2779
|
throw new Error(
|
|
2771
|
-
//
|
|
2780
|
+
// oxlint-disable-next-line typescript/restrict-template-expressions
|
|
2772
2781
|
`Only event objects may be used with raise; use raise({ type: "${eventOrExpr}" }) instead`);
|
|
2773
2782
|
}
|
|
2774
2783
|
const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;
|
|
@@ -2826,4 +2835,4 @@ function raise(eventOrExpr, options) {
|
|
|
2826
2835
|
return raise;
|
|
2827
2836
|
}
|
|
2828
2837
|
|
|
2829
|
-
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,
|
|
2838
|
+
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, cloneMachineSnapshot as R, STATE_DELIMITER as S, toStatePath as T, isStateId as U, getStateNodeByPath as V, getPersistedSnapshot as W, XSTATE_STOP as X, resolveReferencedActor as Y, executingCustomAction as Z, XSTATE_ERROR as _, createSystem as a, createErrorActorEvent as a0, ProcessingStatus 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-d3f33159.cjs.js');
|
|
6
|
+
var dist_xstateGuards = require('./raise-a26997bd.cjs.js');
|
|
7
|
+
var log = require('./log-3beea04f.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-f03a9bed.development.cjs.js');
|
|
6
|
+
var dist_xstateGuards = require('./raise-53e20da7.development.cjs.js');
|
|
7
|
+
var log = require('./log-0ed3e43f.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 { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-
|
|
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-c349a5e8.development.esm.js';
|
|
2
|
+
export { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-c90786ef.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-140dec60.development.esm.js';
|
|
4
4
|
import './xstate-dev.development.esm.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as assign } from './assign-
|
|
2
|
-
export { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-
|
|
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-54f9e2d3.esm.js';
|
|
2
|
+
export { b as cancel, r as raise, d as spawnChild, y as stop, s as stopChild } from './raise-8dd8aaec.esm.js';
|
|
3
|
+
export { a as emit, e as enqueueActions, f as forwardTo, l as log, b as sendParent, s as sendTo } from './log-66075555.esm.js';
|
|
4
4
|
import './xstate-dev.esm.js';
|