xstate 6.0.0-alpha.13 → 6.0.0-alpha.15

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.
Files changed (29) hide show
  1. package/dist/{StateMachine-193c2d4d.development.esm.js → StateMachine-0fa9c094.development.esm.js} +1 -1
  2. package/dist/{StateMachine-614c0f36.esm.js → StateMachine-8dbd20ad.esm.js} +1 -1
  3. package/dist/{StateMachine-3120a7ff.development.cjs.js → StateMachine-98411dc5.development.cjs.js} +1 -1
  4. package/dist/{StateMachine-1b26c5de.cjs.js → StateMachine-e3b1aa2d.cjs.js} +1 -1
  5. package/dist/declarations/src/State.d.ts +13 -2
  6. package/dist/declarations/src/setup.d.ts +47 -5
  7. package/dist/declarations/src/types.d.ts +18 -2
  8. package/dist/declarations/src/types.v6.d.ts +2 -2
  9. package/dist/{index-08d86676.development.cjs.js → index-07b19ed0.development.cjs.js} +2 -3
  10. package/dist/{index-32631949.cjs.js → index-0d940f2c.cjs.js} +2 -3
  11. package/dist/{index-603c1cda.esm.js → index-2635a437.esm.js} +2 -3
  12. package/dist/{index-7081e0c9.development.esm.js → index-362125ce.development.esm.js} +2 -3
  13. package/dist/xstate-actors.cjs.js +1 -1
  14. package/dist/xstate-actors.development.cjs.js +1 -1
  15. package/dist/xstate-actors.development.esm.js +1 -1
  16. package/dist/xstate-actors.esm.js +1 -1
  17. package/dist/xstate-graph.cjs.js +2 -2
  18. package/dist/xstate-graph.development.cjs.js +2 -2
  19. package/dist/xstate-graph.development.esm.js +2 -2
  20. package/dist/xstate-graph.esm.js +2 -2
  21. package/dist/xstate-graph.umd.min.js +1 -1
  22. package/dist/xstate-graph.umd.min.js.map +1 -1
  23. package/dist/xstate.cjs.js +26 -4
  24. package/dist/xstate.development.cjs.js +26 -4
  25. package/dist/xstate.development.esm.js +28 -6
  26. package/dist/xstate.esm.js +28 -6
  27. package/dist/xstate.umd.min.js +1 -1
  28. package/dist/xstate.umd.min.js.map +1 -1
  29. package/package.json +1 -1
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_xstateActors = require('./index-32631949.cjs.js');
6
- var StateMachine = require('./StateMachine-1b26c5de.cjs.js');
5
+ var dist_xstateActors = require('./index-0d940f2c.cjs.js');
6
+ var StateMachine = require('./StateMachine-e3b1aa2d.cjs.js');
7
7
 
8
8
  /**
9
9
  * Asserts that the given event object is of the specified type or types. Throws
@@ -1925,6 +1925,28 @@ function isTypeSchema(value) {
1925
1925
 
1926
1926
  /** State schema with optional schemas.input and nested states */
1927
1927
 
1928
+ /**
1929
+ * The sibling state schemas of a dotted path: the children of the path's
1930
+ * parent. A bare transition target resolves relative to the parent, so the
1931
+ * valid targets for a path's config are its siblings. For a dotless (top-level)
1932
+ * path the siblings are the root states.
1933
+ */
1934
+
1935
+ // dotless path: siblings are the current level's states
1936
+
1937
+ /**
1938
+ * Resolves a dotted state path (e.g. `'parent.child'`) into the leaf
1939
+ * `SetupStateSchema` it addresses, or `never` if any segment is missing.
1940
+ */
1941
+
1942
+ /** Union of every addressable dotted path into a setup states tree */
1943
+
1944
+ /**
1945
+ * Shared body of both `createStateConfig` overloads: the
1946
+ * `StateNodeConfigWithNestedInput` instantiation whose only varying parts are
1947
+ * the leading sibling-schemas and state-schema arguments.
1948
+ */
1949
+
1928
1950
  /** Extracts input type from a state schema */
1929
1951
 
1930
1952
  /**
@@ -2020,8 +2042,8 @@ function setup(config = {}) {
2020
2042
  } : undefined)
2021
2043
  });
2022
2044
  },
2023
- createStateConfig(stateConfig) {
2024
- return stateConfig;
2045
+ createStateConfig(...args) {
2046
+ return args.length > 1 ? args[1] : args[0];
2025
2047
  },
2026
2048
  states
2027
2049
  };
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var dist_xstateActors = require('./index-08d86676.development.cjs.js');
6
- var StateMachine = require('./StateMachine-3120a7ff.development.cjs.js');
5
+ var dist_xstateActors = require('./index-07b19ed0.development.cjs.js');
6
+ var StateMachine = require('./StateMachine-98411dc5.development.cjs.js');
7
7
 
8
8
  /**
9
9
  * Asserts that the given event object is of the specified type or types. Throws
@@ -1925,6 +1925,28 @@ function isTypeSchema(value) {
1925
1925
 
1926
1926
  /** State schema with optional schemas.input and nested states */
1927
1927
 
1928
+ /**
1929
+ * The sibling state schemas of a dotted path: the children of the path's
1930
+ * parent. A bare transition target resolves relative to the parent, so the
1931
+ * valid targets for a path's config are its siblings. For a dotless (top-level)
1932
+ * path the siblings are the root states.
1933
+ */
1934
+
1935
+ // dotless path: siblings are the current level's states
1936
+
1937
+ /**
1938
+ * Resolves a dotted state path (e.g. `'parent.child'`) into the leaf
1939
+ * `SetupStateSchema` it addresses, or `never` if any segment is missing.
1940
+ */
1941
+
1942
+ /** Union of every addressable dotted path into a setup states tree */
1943
+
1944
+ /**
1945
+ * Shared body of both `createStateConfig` overloads: the
1946
+ * `StateNodeConfigWithNestedInput` instantiation whose only varying parts are
1947
+ * the leading sibling-schemas and state-schema arguments.
1948
+ */
1949
+
1928
1950
  /** Extracts input type from a state schema */
1929
1951
 
1930
1952
  /**
@@ -2020,8 +2042,8 @@ function setup(config = {}) {
2020
2042
  } : undefined)
2021
2043
  });
2022
2044
  },
2023
- createStateConfig(stateConfig) {
2024
- return stateConfig;
2045
+ createStateConfig(...args) {
2046
+ return args.length > 1 ? args[1] : args[0];
2025
2047
  },
2026
2048
  states
2027
2049
  };
@@ -1,7 +1,7 @@
1
- import { m as matchesEventDescriptor, t as toArray$1, b as builtInActions, X as XSTATE_INIT, c as createTransitionEnqueue, a as XSTATE_STOP, r as resolveActionsWithContext, p as parseDelayToMilliseconds, i as isAtomicStateNode, d as createActor, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './index-7081e0c9.development.esm.js';
2
- export { A as Actor, T as TimeoutError, l as __unsafe_getAllOwnEventDescriptors, o as checkStateIn, d as createActor, B as createAsyncLogic, w as createCallbackLogic, v as createEmptyActor, y as createEventObservableLogic, C as createListenerLogic, z as createLogic, x as createObservableLogic, E as createSubscriptionLogic, k as getStateNodes, u as isBuiltInExecutableAction, j as isMachineSnapshot, D as listenerLogic, n as matchesState, q as pathToStateValue, F as subscriptionLogic, s as toObserver } from './index-7081e0c9.development.esm.js';
3
- import { S as StateMachine } from './StateMachine-193c2d4d.development.esm.js';
4
- export { S as StateMachine, a as StateNode } from './StateMachine-193c2d4d.development.esm.js';
1
+ import { m as matchesEventDescriptor, t as toArray$1, b as builtInActions, X as XSTATE_INIT, c as createTransitionEnqueue, a as XSTATE_STOP, r as resolveActionsWithContext, p as parseDelayToMilliseconds, i as isAtomicStateNode, d as createActor, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './index-362125ce.development.esm.js';
2
+ export { A as Actor, T as TimeoutError, l as __unsafe_getAllOwnEventDescriptors, o as checkStateIn, d as createActor, B as createAsyncLogic, w as createCallbackLogic, v as createEmptyActor, y as createEventObservableLogic, C as createListenerLogic, z as createLogic, x as createObservableLogic, E as createSubscriptionLogic, k as getStateNodes, u as isBuiltInExecutableAction, j as isMachineSnapshot, D as listenerLogic, n as matchesState, q as pathToStateValue, F as subscriptionLogic, s as toObserver } from './index-362125ce.development.esm.js';
3
+ import { S as StateMachine } from './StateMachine-0fa9c094.development.esm.js';
4
+ export { S as StateMachine, a as StateNode } from './StateMachine-0fa9c094.development.esm.js';
5
5
 
6
6
  /**
7
7
  * Asserts that the given event object is of the specified type or types. Throws
@@ -1923,6 +1923,28 @@ function isTypeSchema(value) {
1923
1923
 
1924
1924
  /** State schema with optional schemas.input and nested states */
1925
1925
 
1926
+ /**
1927
+ * The sibling state schemas of a dotted path: the children of the path's
1928
+ * parent. A bare transition target resolves relative to the parent, so the
1929
+ * valid targets for a path's config are its siblings. For a dotless (top-level)
1930
+ * path the siblings are the root states.
1931
+ */
1932
+
1933
+ // dotless path: siblings are the current level's states
1934
+
1935
+ /**
1936
+ * Resolves a dotted state path (e.g. `'parent.child'`) into the leaf
1937
+ * `SetupStateSchema` it addresses, or `never` if any segment is missing.
1938
+ */
1939
+
1940
+ /** Union of every addressable dotted path into a setup states tree */
1941
+
1942
+ /**
1943
+ * Shared body of both `createStateConfig` overloads: the
1944
+ * `StateNodeConfigWithNestedInput` instantiation whose only varying parts are
1945
+ * the leading sibling-schemas and state-schema arguments.
1946
+ */
1947
+
1926
1948
  /** Extracts input type from a state schema */
1927
1949
 
1928
1950
  /**
@@ -2018,8 +2040,8 @@ function setup(config = {}) {
2018
2040
  } : undefined)
2019
2041
  });
2020
2042
  },
2021
- createStateConfig(stateConfig) {
2022
- return stateConfig;
2043
+ createStateConfig(...args) {
2044
+ return args.length > 1 ? args[1] : args[0];
2023
2045
  },
2024
2046
  states
2025
2047
  };
@@ -1,7 +1,7 @@
1
- import { m as matchesEventDescriptor, t as toArray$1, b as builtInActions, X as XSTATE_INIT, c as createTransitionEnqueue, a as XSTATE_STOP, r as resolveActionsWithContext, p as parseDelayToMilliseconds, i as isAtomicStateNode, d as createActor, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './index-603c1cda.esm.js';
2
- export { A as Actor, T as TimeoutError, l as __unsafe_getAllOwnEventDescriptors, o as checkStateIn, d as createActor, B as createAsyncLogic, w as createCallbackLogic, v as createEmptyActor, y as createEventObservableLogic, C as createListenerLogic, z as createLogic, x as createObservableLogic, E as createSubscriptionLogic, k as getStateNodes, u as isBuiltInExecutableAction, j as isMachineSnapshot, D as listenerLogic, n as matchesState, q as pathToStateValue, F as subscriptionLogic, s as toObserver } from './index-603c1cda.esm.js';
3
- import { S as StateMachine } from './StateMachine-614c0f36.esm.js';
4
- export { S as StateMachine, a as StateNode } from './StateMachine-614c0f36.esm.js';
1
+ import { m as matchesEventDescriptor, t as toArray$1, b as builtInActions, X as XSTATE_INIT, c as createTransitionEnqueue, a as XSTATE_STOP, r as resolveActionsWithContext, p as parseDelayToMilliseconds, i as isAtomicStateNode, d as createActor, e as macrostep, f as createInitEvent, g as initialMicrostep, h as getProperAncestors } from './index-2635a437.esm.js';
2
+ export { A as Actor, T as TimeoutError, l as __unsafe_getAllOwnEventDescriptors, o as checkStateIn, d as createActor, B as createAsyncLogic, w as createCallbackLogic, v as createEmptyActor, y as createEventObservableLogic, C as createListenerLogic, z as createLogic, x as createObservableLogic, E as createSubscriptionLogic, k as getStateNodes, u as isBuiltInExecutableAction, j as isMachineSnapshot, D as listenerLogic, n as matchesState, q as pathToStateValue, F as subscriptionLogic, s as toObserver } from './index-2635a437.esm.js';
3
+ import { S as StateMachine } from './StateMachine-8dbd20ad.esm.js';
4
+ export { S as StateMachine, a as StateNode } from './StateMachine-8dbd20ad.esm.js';
5
5
 
6
6
  /**
7
7
  * Asserts that the given event object is of the specified type or types. Throws
@@ -1923,6 +1923,28 @@ function isTypeSchema(value) {
1923
1923
 
1924
1924
  /** State schema with optional schemas.input and nested states */
1925
1925
 
1926
+ /**
1927
+ * The sibling state schemas of a dotted path: the children of the path's
1928
+ * parent. A bare transition target resolves relative to the parent, so the
1929
+ * valid targets for a path's config are its siblings. For a dotless (top-level)
1930
+ * path the siblings are the root states.
1931
+ */
1932
+
1933
+ // dotless path: siblings are the current level's states
1934
+
1935
+ /**
1936
+ * Resolves a dotted state path (e.g. `'parent.child'`) into the leaf
1937
+ * `SetupStateSchema` it addresses, or `never` if any segment is missing.
1938
+ */
1939
+
1940
+ /** Union of every addressable dotted path into a setup states tree */
1941
+
1942
+ /**
1943
+ * Shared body of both `createStateConfig` overloads: the
1944
+ * `StateNodeConfigWithNestedInput` instantiation whose only varying parts are
1945
+ * the leading sibling-schemas and state-schema arguments.
1946
+ */
1947
+
1926
1948
  /** Extracts input type from a state schema */
1927
1949
 
1928
1950
  /**
@@ -2018,8 +2040,8 @@ function setup(config = {}) {
2018
2040
  } : undefined)
2019
2041
  });
2020
2042
  },
2021
- createStateConfig(stateConfig) {
2022
- return stateConfig;
2043
+ createStateConfig(...args) {
2044
+ return args.length > 1 ? args[1] : args[0];
2023
2045
  },
2024
2046
  states
2025
2047
  };