xstate 5.32.1 → 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-be2e51a3.development.cjs.js → StateMachine-204b27f3.development.cjs.js} +2 -2
- package/dist/{StateMachine-e6732977.cjs.js → StateMachine-425d2161.cjs.js} +2 -2
- package/dist/{StateMachine-45e79c35.esm.js → StateMachine-c47cd806.esm.js} +2 -2
- package/dist/{StateMachine-e0178d48.development.esm.js → StateMachine-db7632ed.development.esm.js} +2 -2
- package/dist/{assign-927227d6.development.cjs.js → assign-258bf201.development.cjs.js} +1 -1
- package/dist/{assign-e8f2bd75.cjs.js → assign-2c3177c8.cjs.js} +1 -1
- package/dist/{assign-2aa58daa.esm.js → assign-46f917eb.esm.js} +1 -1
- package/dist/{assign-f338cee3.development.esm.js → assign-635f6692.development.esm.js} +1 -1
- package/dist/{log-c2e11c01.development.cjs.js → log-2db8d682.development.cjs.js} +2 -2
- package/dist/{log-7776fcf2.cjs.js → log-4fd9aefe.cjs.js} +2 -2
- package/dist/{log-410e5e55.development.esm.js → log-72d94aac.development.esm.js} +2 -2
- package/dist/{log-fa75ec2d.esm.js → log-e646aed8.esm.js} +2 -2
- package/dist/{raise-964cd4e9.development.cjs.js → raise-3e483b1a.development.cjs.js} +4 -2
- package/dist/{raise-7c948725.cjs.js → raise-4c123cf0.cjs.js} +4 -2
- package/dist/{raise-e974d1c9.esm.js → raise-78b480c6.esm.js} +4 -3
- package/dist/{raise-74097812.development.esm.js → raise-b164eb3b.development.esm.js} +4 -3
- 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-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-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 +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-be2e51a3.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-e0178d48.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
|
|
@@ -1701,8 +1701,9 @@ function isInFinalState(stateNodeSet, stateNode) {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
const isStateId = str => str[0] === STATE_IDENTIFIER;
|
|
1703
1703
|
function getCandidates(stateNode, receivedEventType) {
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1704
|
+
const exactMatch = stateNode.transitions.get(receivedEventType);
|
|
1705
|
+
const wildcardCandidates = [...stateNode.transitions.keys()].filter(eventDescriptor => eventDescriptor !== receivedEventType && matchesEventDescriptor(receivedEventType, eventDescriptor)).sort((a, b) => b.length - a.length).flatMap(key => stateNode.transitions.get(key));
|
|
1706
|
+
return exactMatch ? [...exactMatch, ...wildcardCandidates] : wildcardCandidates;
|
|
1706
1707
|
}
|
|
1707
1708
|
|
|
1708
1709
|
/** All delayed transitions from the config. */
|
|
@@ -2837,6 +2838,7 @@ exports.createErrorActorEvent = createErrorActorEvent;
|
|
|
2837
2838
|
exports.createInitEvent = createInitEvent;
|
|
2838
2839
|
exports.createInvokeId = createInvokeId;
|
|
2839
2840
|
exports.createMachineSnapshot = createMachineSnapshot;
|
|
2841
|
+
exports.createSystem = createSystem;
|
|
2840
2842
|
exports.evaluateGuard = evaluateGuard;
|
|
2841
2843
|
exports.formatInitialTransition = formatInitialTransition;
|
|
2842
2844
|
exports.formatRouteTransitions = formatRouteTransitions;
|
|
@@ -1659,8 +1659,9 @@ function isInFinalState(stateNodeSet, stateNode) {
|
|
|
1659
1659
|
}
|
|
1660
1660
|
const isStateId = str => str[0] === STATE_IDENTIFIER;
|
|
1661
1661
|
function getCandidates(stateNode, receivedEventType) {
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1662
|
+
const exactMatch = stateNode.transitions.get(receivedEventType);
|
|
1663
|
+
const wildcardCandidates = [...stateNode.transitions.keys()].filter(eventDescriptor => eventDescriptor !== receivedEventType && matchesEventDescriptor(receivedEventType, eventDescriptor)).sort((a, b) => b.length - a.length).flatMap(key => stateNode.transitions.get(key));
|
|
1664
|
+
return exactMatch ? [...exactMatch, ...wildcardCandidates] : wildcardCandidates;
|
|
1664
1665
|
}
|
|
1665
1666
|
|
|
1666
1667
|
/** All delayed transitions from the config. */
|
|
@@ -2775,6 +2776,7 @@ exports.createErrorActorEvent = createErrorActorEvent;
|
|
|
2775
2776
|
exports.createInitEvent = createInitEvent;
|
|
2776
2777
|
exports.createInvokeId = createInvokeId;
|
|
2777
2778
|
exports.createMachineSnapshot = createMachineSnapshot;
|
|
2779
|
+
exports.createSystem = createSystem;
|
|
2778
2780
|
exports.evaluateGuard = evaluateGuard;
|
|
2779
2781
|
exports.formatInitialTransition = formatInitialTransition;
|
|
2780
2782
|
exports.formatRouteTransitions = formatRouteTransitions;
|
|
@@ -1657,8 +1657,9 @@ function isInFinalState(stateNodeSet, stateNode) {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
const isStateId = str => str[0] === STATE_IDENTIFIER;
|
|
1659
1659
|
function getCandidates(stateNode, receivedEventType) {
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1660
|
+
const exactMatch = stateNode.transitions.get(receivedEventType);
|
|
1661
|
+
const wildcardCandidates = [...stateNode.transitions.keys()].filter(eventDescriptor => eventDescriptor !== receivedEventType && matchesEventDescriptor(receivedEventType, eventDescriptor)).sort((a, b) => b.length - a.length).flatMap(key => stateNode.transitions.get(key));
|
|
1662
|
+
return exactMatch ? [...exactMatch, ...wildcardCandidates] : wildcardCandidates;
|
|
1662
1663
|
}
|
|
1663
1664
|
|
|
1664
1665
|
/** All delayed transitions from the config. */
|
|
@@ -2758,4 +2759,4 @@ function raise(eventOrExpr, options) {
|
|
|
2758
2759
|
return raise;
|
|
2759
2760
|
}
|
|
2760
2761
|
|
|
2761
|
-
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 };
|
|
@@ -1699,8 +1699,9 @@ function isInFinalState(stateNodeSet, stateNode) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
const isStateId = str => str[0] === STATE_IDENTIFIER;
|
|
1701
1701
|
function getCandidates(stateNode, receivedEventType) {
|
|
1702
|
-
const
|
|
1703
|
-
|
|
1702
|
+
const exactMatch = stateNode.transitions.get(receivedEventType);
|
|
1703
|
+
const wildcardCandidates = [...stateNode.transitions.keys()].filter(eventDescriptor => eventDescriptor !== receivedEventType && matchesEventDescriptor(receivedEventType, eventDescriptor)).sort((a, b) => b.length - a.length).flatMap(key => stateNode.transitions.get(key));
|
|
1704
|
+
return exactMatch ? [...exactMatch, ...wildcardCandidates] : wildcardCandidates;
|
|
1704
1705
|
}
|
|
1705
1706
|
|
|
1706
1707
|
/** All delayed transitions from the config. */
|
|
@@ -2820,4 +2821,4 @@ function raise(eventOrExpr, options) {
|
|
|
2820
2821
|
return raise;
|
|
2821
2822
|
}
|
|
2822
2823
|
|
|
2823
|
-
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';
|