xstate 5.17.3 → 5.18.0
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/actions/dist/xstate-actions.umd.min.js.map +1 -1
- package/actors/dist/xstate-actors.cjs.js +6 -7
- package/actors/dist/xstate-actors.development.cjs.js +6 -7
- package/actors/dist/xstate-actors.development.esm.js +6 -7
- package/actors/dist/xstate-actors.esm.js +6 -7
- package/actors/dist/xstate-actors.umd.min.js.map +1 -1
- package/dist/declarations/src/State.d.ts +4 -4
- package/dist/declarations/src/actions/emit.d.ts +3 -3
- package/dist/declarations/src/actors/callback.d.ts +5 -6
- package/dist/declarations/src/actors/index.d.ts +1 -1
- package/dist/declarations/src/inspection.d.ts +2 -2
- package/dist/declarations/src/setup.d.ts +1 -17
- package/dist/declarations/src/types.d.ts +21 -0
- package/dist/declarations/src/waitFor.d.ts +2 -0
- package/dist/xstate.cjs.js +27 -1
- package/dist/xstate.development.cjs.js +27 -1
- package/dist/xstate.development.esm.js +27 -1
- package/dist/xstate.esm.js +27 -1
- package/dist/xstate.umd.min.js +1 -1
- package/dist/xstate.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -248,9 +248,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
248
248
|
* });
|
|
249
249
|
* ```
|
|
250
250
|
*
|
|
251
|
-
* @param
|
|
252
|
-
*
|
|
253
|
-
* properties:
|
|
251
|
+
* @param callback - The callback function used to describe the callback logic
|
|
252
|
+
* The callback function is passed an object with the following properties:
|
|
254
253
|
*
|
|
255
254
|
* - `receive` - A function that can send events back to the parent actor; the
|
|
256
255
|
* listener is then called whenever events are received by the callback
|
|
@@ -263,12 +262,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
263
262
|
* when the actor is stopped.
|
|
264
263
|
*
|
|
265
264
|
* @returns Callback logic
|
|
266
|
-
* @see {@link
|
|
265
|
+
* @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
|
|
267
266
|
* @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
|
|
268
267
|
*/
|
|
269
|
-
function fromCallback(
|
|
268
|
+
function fromCallback(callback) {
|
|
270
269
|
const logic = {
|
|
271
|
-
config:
|
|
270
|
+
config: callback,
|
|
272
271
|
start: (state, actorScope) => {
|
|
273
272
|
const {
|
|
274
273
|
self,
|
|
@@ -280,7 +279,7 @@ function fromCallback(invokeCallback) {
|
|
|
280
279
|
dispose: undefined
|
|
281
280
|
};
|
|
282
281
|
instanceStates.set(self, callbackState);
|
|
283
|
-
callbackState.dispose =
|
|
282
|
+
callbackState.dispose = callback({
|
|
284
283
|
input: state.input,
|
|
285
284
|
system,
|
|
286
285
|
self,
|
|
@@ -248,9 +248,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
248
248
|
* });
|
|
249
249
|
* ```
|
|
250
250
|
*
|
|
251
|
-
* @param
|
|
252
|
-
*
|
|
253
|
-
* properties:
|
|
251
|
+
* @param callback - The callback function used to describe the callback logic
|
|
252
|
+
* The callback function is passed an object with the following properties:
|
|
254
253
|
*
|
|
255
254
|
* - `receive` - A function that can send events back to the parent actor; the
|
|
256
255
|
* listener is then called whenever events are received by the callback
|
|
@@ -263,12 +262,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
263
262
|
* when the actor is stopped.
|
|
264
263
|
*
|
|
265
264
|
* @returns Callback logic
|
|
266
|
-
* @see {@link
|
|
265
|
+
* @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
|
|
267
266
|
* @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
|
|
268
267
|
*/
|
|
269
|
-
function fromCallback(
|
|
268
|
+
function fromCallback(callback) {
|
|
270
269
|
const logic = {
|
|
271
|
-
config:
|
|
270
|
+
config: callback,
|
|
272
271
|
start: (state, actorScope) => {
|
|
273
272
|
const {
|
|
274
273
|
self,
|
|
@@ -280,7 +279,7 @@ function fromCallback(invokeCallback) {
|
|
|
280
279
|
dispose: undefined
|
|
281
280
|
};
|
|
282
281
|
instanceStates.set(self, callbackState);
|
|
283
|
-
callbackState.dispose =
|
|
282
|
+
callbackState.dispose = callback({
|
|
284
283
|
input: state.input,
|
|
285
284
|
system,
|
|
286
285
|
self,
|
|
@@ -244,9 +244,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
244
244
|
* });
|
|
245
245
|
* ```
|
|
246
246
|
*
|
|
247
|
-
* @param
|
|
248
|
-
*
|
|
249
|
-
* properties:
|
|
247
|
+
* @param callback - The callback function used to describe the callback logic
|
|
248
|
+
* The callback function is passed an object with the following properties:
|
|
250
249
|
*
|
|
251
250
|
* - `receive` - A function that can send events back to the parent actor; the
|
|
252
251
|
* listener is then called whenever events are received by the callback
|
|
@@ -259,12 +258,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
259
258
|
* when the actor is stopped.
|
|
260
259
|
*
|
|
261
260
|
* @returns Callback logic
|
|
262
|
-
* @see {@link
|
|
261
|
+
* @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
|
|
263
262
|
* @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
|
|
264
263
|
*/
|
|
265
|
-
function fromCallback(
|
|
264
|
+
function fromCallback(callback) {
|
|
266
265
|
const logic = {
|
|
267
|
-
config:
|
|
266
|
+
config: callback,
|
|
268
267
|
start: (state, actorScope) => {
|
|
269
268
|
const {
|
|
270
269
|
self,
|
|
@@ -276,7 +275,7 @@ function fromCallback(invokeCallback) {
|
|
|
276
275
|
dispose: undefined
|
|
277
276
|
};
|
|
278
277
|
instanceStates.set(self, callbackState);
|
|
279
|
-
callbackState.dispose =
|
|
278
|
+
callbackState.dispose = callback({
|
|
280
279
|
input: state.input,
|
|
281
280
|
system,
|
|
282
281
|
self,
|
|
@@ -244,9 +244,8 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
244
244
|
* });
|
|
245
245
|
* ```
|
|
246
246
|
*
|
|
247
|
-
* @param
|
|
248
|
-
*
|
|
249
|
-
* properties:
|
|
247
|
+
* @param callback - The callback function used to describe the callback logic
|
|
248
|
+
* The callback function is passed an object with the following properties:
|
|
250
249
|
*
|
|
251
250
|
* - `receive` - A function that can send events back to the parent actor; the
|
|
252
251
|
* listener is then called whenever events are received by the callback
|
|
@@ -259,12 +258,12 @@ const instanceStates = /* #__PURE__ */new WeakMap();
|
|
|
259
258
|
* when the actor is stopped.
|
|
260
259
|
*
|
|
261
260
|
* @returns Callback logic
|
|
262
|
-
* @see {@link
|
|
261
|
+
* @see {@link CallbackLogicFunction} for more information about the callback function and its object argument
|
|
263
262
|
* @see {@link https://stately.ai/docs/input | Input docs} for more information about how input is passed
|
|
264
263
|
*/
|
|
265
|
-
function fromCallback(
|
|
264
|
+
function fromCallback(callback) {
|
|
266
265
|
const logic = {
|
|
267
|
-
config:
|
|
266
|
+
config: callback,
|
|
268
267
|
start: (state, actorScope) => {
|
|
269
268
|
const {
|
|
270
269
|
self,
|
|
@@ -276,7 +275,7 @@ function fromCallback(invokeCallback) {
|
|
|
276
275
|
dispose: undefined
|
|
277
276
|
};
|
|
278
277
|
instanceStates.set(self, callbackState);
|
|
279
|
-
callbackState.dispose =
|
|
278
|
+
callbackState.dispose = callback({
|
|
280
279
|
input: state.input,
|
|
281
280
|
system,
|
|
282
281
|
self,
|