xstate 6.0.0-alpha.54 → 6.0.0-alpha.55

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 (53) hide show
  1. package/dist/{createActor-72c06d5c.development.cjs.js → createActor-2213c48b.development.cjs.js} +40 -5
  2. package/dist/{createActor-04e2ee20.development.esm.js → createActor-3dc6cdb7.development.esm.js} +40 -5
  3. package/dist/{createActor-54b4caed.cjs.js → createActor-c4723a2b.cjs.js} +40 -5
  4. package/dist/{createActor-a7b9d1be.esm.js → createActor-c7c704c2.esm.js} +40 -5
  5. package/dist/declarations/src/StateMachine.d.ts +8 -0
  6. package/dist/declarations/src/createActor.d.ts +9 -0
  7. package/dist/declarations/src/setup.d.ts +8 -4
  8. package/dist/declarations/src/types.d.ts +13 -0
  9. package/dist/declarations/src/types.v6.d.ts +4 -4
  10. package/dist/{effectDescriptor-66968b91.cjs.js → effectDescriptor-3121155c.cjs.js} +1 -1
  11. package/dist/{effectDescriptor-8ab6c005.development.esm.js → effectDescriptor-95202c94.development.esm.js} +1 -1
  12. package/dist/{effectDescriptor-de20c07d.esm.js → effectDescriptor-9cb5c006.esm.js} +1 -1
  13. package/dist/{effectDescriptor-ff81f016.development.cjs.js → effectDescriptor-c0976206.development.cjs.js} +1 -1
  14. package/dist/{types-e1c553c1.development.esm.js → types-33de9b3d.development.esm.js} +9 -1
  15. package/dist/{types-a388ae30.esm.js → types-69f39448.esm.js} +9 -1
  16. package/dist/{types-744035f0.cjs.js → types-802dc45c.cjs.js} +9 -1
  17. package/dist/{types-2dc94fbf.development.cjs.js → types-ec6c763a.development.cjs.js} +9 -1
  18. package/dist/xstate-actors.cjs.js +1 -1
  19. package/dist/xstate-actors.development.cjs.js +1 -1
  20. package/dist/xstate-actors.development.esm.js +2 -2
  21. package/dist/xstate-actors.esm.js +2 -2
  22. package/dist/xstate-actors.umd.min.js +1 -1
  23. package/dist/xstate-actors.umd.min.js.map +1 -1
  24. package/dist/xstate-durable.cjs.js +2 -2
  25. package/dist/xstate-durable.development.cjs.js +2 -2
  26. package/dist/xstate-durable.development.esm.js +2 -2
  27. package/dist/xstate-durable.esm.js +2 -2
  28. package/dist/xstate-durable.umd.min.js +1 -1
  29. package/dist/xstate-durable.umd.min.js.map +1 -1
  30. package/dist/xstate-graph.cjs.js +1 -1
  31. package/dist/xstate-graph.development.cjs.js +1 -1
  32. package/dist/xstate-graph.development.esm.js +1 -1
  33. package/dist/xstate-graph.esm.js +1 -1
  34. package/dist/xstate-graph.umd.min.js +1 -1
  35. package/dist/xstate-graph.umd.min.js.map +1 -1
  36. package/dist/xstate-scxml.cjs.js +2 -2
  37. package/dist/xstate-scxml.development.cjs.js +2 -2
  38. package/dist/xstate-scxml.development.esm.js +2 -2
  39. package/dist/xstate-scxml.esm.js +2 -2
  40. package/dist/xstate-scxml.umd.min.js +1 -1
  41. package/dist/xstate-scxml.umd.min.js.map +1 -1
  42. package/dist/xstate-validation.cjs.js +1 -1
  43. package/dist/xstate-validation.development.cjs.js +1 -1
  44. package/dist/xstate-validation.development.esm.js +1 -1
  45. package/dist/xstate-validation.esm.js +1 -1
  46. package/dist/xstate-validation.umd.min.js.map +1 -1
  47. package/dist/xstate.cjs.js +7 -3
  48. package/dist/xstate.development.cjs.js +7 -3
  49. package/dist/xstate.development.esm.js +9 -5
  50. package/dist/xstate.esm.js +9 -5
  51. package/dist/xstate.umd.min.js +1 -1
  52. package/dist/xstate.umd.min.js.map +1 -1
  53. package/package.json +1 -1
@@ -4144,7 +4144,10 @@ function toObserver(nextHandler, errorHandler, completionHandler) {
4144
4144
  return {
4145
4145
  next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),
4146
4146
  error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),
4147
- complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)
4147
+ complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self),
4148
+ ...(isObserver && nextHandler.passive ? {
4149
+ passive: true
4150
+ } : {})
4148
4151
  };
4149
4152
  }
4150
4153
  function createInvokeId(stateNodeId, index) {
@@ -5051,6 +5054,8 @@ class Actor {
5051
5054
  this.mailbox = void 0;
5052
5055
  this._mailboxStarted = false;
5053
5056
  this.observers = void 0;
5057
+ /** Whether a consumer subscribed to this actor's error after it errored. */
5058
+ this._errorObserved = false;
5054
5059
  this.eventListeners = void 0;
5055
5060
  this.logger = void 0;
5056
5061
  /** @internal */
@@ -5245,7 +5250,15 @@ class Actor {
5245
5250
  const saveExecutingCustomAction = executingCustomAction;
5246
5251
  try {
5247
5252
  executingCustomAction = true;
5248
- void action.exec();
5253
+ const result = action.exec();
5254
+ if (result && typeof result.then === 'function') {
5255
+ void Promise.resolve(result).catch(err => {
5256
+ if (this._processingStatus === ProcessingStatus.Stopped) {
5257
+ return;
5258
+ }
5259
+ this._recoverOrError(err);
5260
+ });
5261
+ }
5249
5262
  } finally {
5250
5263
  executingCustomAction = saveExecutingCustomAction;
5251
5264
  }
@@ -5455,6 +5468,9 @@ class Actor {
5455
5468
  if (!observer.error) {
5456
5469
  reportUnhandledError(err);
5457
5470
  } else {
5471
+ if (!observer.passive) {
5472
+ this._errorObserved = true;
5473
+ }
5458
5474
  safeCall(observer.error, err);
5459
5475
  }
5460
5476
  break;
@@ -5709,22 +5725,41 @@ class Actor {
5709
5725
  this.observers?.clear();
5710
5726
  this.eventListeners?.clear();
5711
5727
  }
5728
+
5729
+ /**
5730
+ * Reports an unhandled error unless a consumer observes it before the
5731
+ * report runs. An actor can error before its creator has a chance to
5732
+ * subscribe, so the check waits one macrotask for a subscriber with an
5733
+ * `error` callback.
5734
+ */
5735
+ _reportUnlessObserved(err) {
5736
+ setTimeout(() => {
5737
+ if (!this._errorObserved) {
5738
+ reportUnhandledError(err);
5739
+ }
5740
+ });
5741
+ }
5712
5742
  _error(err) {
5713
5743
  this._stopProcedure();
5714
5744
  if (!this.observers?.size) {
5715
5745
  if (!this._parent) {
5716
- reportUnhandledError(err);
5746
+ this._reportUnlessObserved(err);
5717
5747
  }
5718
5748
  } else {
5719
5749
  let reportError = false;
5750
+ let handled = false;
5720
5751
  for (const observer of this.observers) {
5721
5752
  const errorListener = observer.error;
5722
- reportError ||= !errorListener;
5753
+ if (!observer.passive) {
5754
+ reportError ||= !errorListener;
5755
+ handled ||= !!errorListener;
5756
+ }
5723
5757
  safeCall(errorListener, err);
5724
5758
  }
5759
+ reportError ||= !handled;
5725
5760
  this.observers.clear();
5726
5761
  if (reportError) {
5727
- reportUnhandledError(err);
5762
+ this._reportUnlessObserved(err);
5728
5763
  }
5729
5764
  }
5730
5765
  this.eventListeners?.clear();
@@ -4142,7 +4142,10 @@ function toObserver(nextHandler, errorHandler, completionHandler) {
4142
4142
  return {
4143
4143
  next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),
4144
4144
  error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),
4145
- complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)
4145
+ complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self),
4146
+ ...(isObserver && nextHandler.passive ? {
4147
+ passive: true
4148
+ } : {})
4146
4149
  };
4147
4150
  }
4148
4151
  function createInvokeId(stateNodeId, index) {
@@ -5049,6 +5052,8 @@ class Actor {
5049
5052
  this.mailbox = void 0;
5050
5053
  this._mailboxStarted = false;
5051
5054
  this.observers = void 0;
5055
+ /** Whether a consumer subscribed to this actor's error after it errored. */
5056
+ this._errorObserved = false;
5052
5057
  this.eventListeners = void 0;
5053
5058
  this.logger = void 0;
5054
5059
  /** @internal */
@@ -5243,7 +5248,15 @@ class Actor {
5243
5248
  const saveExecutingCustomAction = executingCustomAction;
5244
5249
  try {
5245
5250
  executingCustomAction = true;
5246
- void action.exec();
5251
+ const result = action.exec();
5252
+ if (result && typeof result.then === 'function') {
5253
+ void Promise.resolve(result).catch(err => {
5254
+ if (this._processingStatus === ProcessingStatus.Stopped) {
5255
+ return;
5256
+ }
5257
+ this._recoverOrError(err);
5258
+ });
5259
+ }
5247
5260
  } finally {
5248
5261
  executingCustomAction = saveExecutingCustomAction;
5249
5262
  }
@@ -5453,6 +5466,9 @@ class Actor {
5453
5466
  if (!observer.error) {
5454
5467
  reportUnhandledError(err);
5455
5468
  } else {
5469
+ if (!observer.passive) {
5470
+ this._errorObserved = true;
5471
+ }
5456
5472
  safeCall(observer.error, err);
5457
5473
  }
5458
5474
  break;
@@ -5707,22 +5723,41 @@ class Actor {
5707
5723
  this.observers?.clear();
5708
5724
  this.eventListeners?.clear();
5709
5725
  }
5726
+
5727
+ /**
5728
+ * Reports an unhandled error unless a consumer observes it before the
5729
+ * report runs. An actor can error before its creator has a chance to
5730
+ * subscribe, so the check waits one macrotask for a subscriber with an
5731
+ * `error` callback.
5732
+ */
5733
+ _reportUnlessObserved(err) {
5734
+ setTimeout(() => {
5735
+ if (!this._errorObserved) {
5736
+ reportUnhandledError(err);
5737
+ }
5738
+ });
5739
+ }
5710
5740
  _error(err) {
5711
5741
  this._stopProcedure();
5712
5742
  if (!this.observers?.size) {
5713
5743
  if (!this._parent) {
5714
- reportUnhandledError(err);
5744
+ this._reportUnlessObserved(err);
5715
5745
  }
5716
5746
  } else {
5717
5747
  let reportError = false;
5748
+ let handled = false;
5718
5749
  for (const observer of this.observers) {
5719
5750
  const errorListener = observer.error;
5720
- reportError ||= !errorListener;
5751
+ if (!observer.passive) {
5752
+ reportError ||= !errorListener;
5753
+ handled ||= !!errorListener;
5754
+ }
5721
5755
  safeCall(errorListener, err);
5722
5756
  }
5757
+ reportError ||= !handled;
5723
5758
  this.observers.clear();
5724
5759
  if (reportError) {
5725
- reportUnhandledError(err);
5760
+ this._reportUnlessObserved(err);
5726
5761
  }
5727
5762
  }
5728
5763
  this.eventListeners?.clear();
@@ -4120,7 +4120,10 @@ function toObserver(nextHandler, errorHandler, completionHandler) {
4120
4120
  return {
4121
4121
  next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),
4122
4122
  error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),
4123
- complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)
4123
+ complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self),
4124
+ ...(isObserver && nextHandler.passive ? {
4125
+ passive: true
4126
+ } : {})
4124
4127
  };
4125
4128
  }
4126
4129
  function createInvokeId(stateNodeId, index) {
@@ -5018,6 +5021,8 @@ class Actor {
5018
5021
  this.mailbox = void 0;
5019
5022
  this._mailboxStarted = false;
5020
5023
  this.observers = void 0;
5024
+ /** Whether a consumer subscribed to this actor's error after it errored. */
5025
+ this._errorObserved = false;
5021
5026
  this.eventListeners = void 0;
5022
5027
  this.logger = void 0;
5023
5028
  /** @internal */
@@ -5212,7 +5217,15 @@ class Actor {
5212
5217
  const saveExecutingCustomAction = executingCustomAction;
5213
5218
  try {
5214
5219
  executingCustomAction = true;
5215
- void action.exec();
5220
+ const result = action.exec();
5221
+ if (result && typeof result.then === 'function') {
5222
+ void Promise.resolve(result).catch(err => {
5223
+ if (this._processingStatus === ProcessingStatus.Stopped) {
5224
+ return;
5225
+ }
5226
+ this._recoverOrError(err);
5227
+ });
5228
+ }
5216
5229
  } finally {
5217
5230
  executingCustomAction = saveExecutingCustomAction;
5218
5231
  }
@@ -5422,6 +5435,9 @@ class Actor {
5422
5435
  if (!observer.error) {
5423
5436
  reportUnhandledError(err);
5424
5437
  } else {
5438
+ if (!observer.passive) {
5439
+ this._errorObserved = true;
5440
+ }
5425
5441
  safeCall(observer.error, err);
5426
5442
  }
5427
5443
  break;
@@ -5676,22 +5692,41 @@ class Actor {
5676
5692
  this.observers?.clear();
5677
5693
  this.eventListeners?.clear();
5678
5694
  }
5695
+
5696
+ /**
5697
+ * Reports an unhandled error unless a consumer observes it before the
5698
+ * report runs. An actor can error before its creator has a chance to
5699
+ * subscribe, so the check waits one macrotask for a subscriber with an
5700
+ * `error` callback.
5701
+ */
5702
+ _reportUnlessObserved(err) {
5703
+ setTimeout(() => {
5704
+ if (!this._errorObserved) {
5705
+ reportUnhandledError(err);
5706
+ }
5707
+ });
5708
+ }
5679
5709
  _error(err) {
5680
5710
  this._stopProcedure();
5681
5711
  if (!this.observers?.size) {
5682
5712
  if (!this._parent) {
5683
- reportUnhandledError(err);
5713
+ this._reportUnlessObserved(err);
5684
5714
  }
5685
5715
  } else {
5686
5716
  let reportError = false;
5717
+ let handled = false;
5687
5718
  for (const observer of this.observers) {
5688
5719
  const errorListener = observer.error;
5689
- reportError ||= !errorListener;
5720
+ if (!observer.passive) {
5721
+ reportError ||= !errorListener;
5722
+ handled ||= !!errorListener;
5723
+ }
5690
5724
  safeCall(errorListener, err);
5691
5725
  }
5726
+ reportError ||= !handled;
5692
5727
  this.observers.clear();
5693
5728
  if (reportError) {
5694
- reportUnhandledError(err);
5729
+ this._reportUnlessObserved(err);
5695
5730
  }
5696
5731
  }
5697
5732
  this.eventListeners?.clear();
@@ -4118,7 +4118,10 @@ function toObserver(nextHandler, errorHandler, completionHandler) {
4118
4118
  return {
4119
4119
  next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),
4120
4120
  error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),
4121
- complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)
4121
+ complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self),
4122
+ ...(isObserver && nextHandler.passive ? {
4123
+ passive: true
4124
+ } : {})
4122
4125
  };
4123
4126
  }
4124
4127
  function createInvokeId(stateNodeId, index) {
@@ -5016,6 +5019,8 @@ class Actor {
5016
5019
  this.mailbox = void 0;
5017
5020
  this._mailboxStarted = false;
5018
5021
  this.observers = void 0;
5022
+ /** Whether a consumer subscribed to this actor's error after it errored. */
5023
+ this._errorObserved = false;
5019
5024
  this.eventListeners = void 0;
5020
5025
  this.logger = void 0;
5021
5026
  /** @internal */
@@ -5210,7 +5215,15 @@ class Actor {
5210
5215
  const saveExecutingCustomAction = executingCustomAction;
5211
5216
  try {
5212
5217
  executingCustomAction = true;
5213
- void action.exec();
5218
+ const result = action.exec();
5219
+ if (result && typeof result.then === 'function') {
5220
+ void Promise.resolve(result).catch(err => {
5221
+ if (this._processingStatus === ProcessingStatus.Stopped) {
5222
+ return;
5223
+ }
5224
+ this._recoverOrError(err);
5225
+ });
5226
+ }
5214
5227
  } finally {
5215
5228
  executingCustomAction = saveExecutingCustomAction;
5216
5229
  }
@@ -5420,6 +5433,9 @@ class Actor {
5420
5433
  if (!observer.error) {
5421
5434
  reportUnhandledError(err);
5422
5435
  } else {
5436
+ if (!observer.passive) {
5437
+ this._errorObserved = true;
5438
+ }
5423
5439
  safeCall(observer.error, err);
5424
5440
  }
5425
5441
  break;
@@ -5674,22 +5690,41 @@ class Actor {
5674
5690
  this.observers?.clear();
5675
5691
  this.eventListeners?.clear();
5676
5692
  }
5693
+
5694
+ /**
5695
+ * Reports an unhandled error unless a consumer observes it before the
5696
+ * report runs. An actor can error before its creator has a chance to
5697
+ * subscribe, so the check waits one macrotask for a subscriber with an
5698
+ * `error` callback.
5699
+ */
5700
+ _reportUnlessObserved(err) {
5701
+ setTimeout(() => {
5702
+ if (!this._errorObserved) {
5703
+ reportUnhandledError(err);
5704
+ }
5705
+ });
5706
+ }
5677
5707
  _error(err) {
5678
5708
  this._stopProcedure();
5679
5709
  if (!this.observers?.size) {
5680
5710
  if (!this._parent) {
5681
- reportUnhandledError(err);
5711
+ this._reportUnlessObserved(err);
5682
5712
  }
5683
5713
  } else {
5684
5714
  let reportError = false;
5715
+ let handled = false;
5685
5716
  for (const observer of this.observers) {
5686
5717
  const errorListener = observer.error;
5687
- reportError ||= !errorListener;
5718
+ if (!observer.passive) {
5719
+ reportError ||= !errorListener;
5720
+ handled ||= !!errorListener;
5721
+ }
5688
5722
  safeCall(errorListener, err);
5689
5723
  }
5724
+ reportError ||= !handled;
5690
5725
  this.observers.clear();
5691
5726
  if (reportError) {
5692
- reportUnhandledError(err);
5727
+ this._reportUnlessObserved(err);
5693
5728
  }
5694
5729
  }
5695
5730
  this.eventListeners?.clear();
@@ -20,6 +20,14 @@ export declare class StateMachine<TContext extends MachineContext, TEvent extend
20
20
  internalEvents?: readonly string[];
21
21
  };
22
22
  validator?: ActorLogicValidator | undefined;
23
+ /**
24
+ * Type-level carriers for the machine's source maps and state schema. Type
25
+ * helpers in integration packages read these to walk a machine's declared
26
+ * actions, actors and invoked sources. They are never assigned at runtime.
27
+ */
28
+ readonly _actionMap: TActionMap;
29
+ readonly _actorMap: TActorMap;
30
+ readonly _stateSchema: TConfig;
23
31
  /** The machine's own version. */
24
32
  version?: string;
25
33
  schemas: AnyMachineSchemas | undefined;
@@ -38,6 +38,8 @@ export declare class Actor<TLogic extends AnyActorLogic> implements ActorInstanc
38
38
  private mailbox?;
39
39
  private _mailboxStarted;
40
40
  private observers?;
41
+ /** Whether a consumer subscribed to this actor's error after it errored. */
42
+ private _errorObserved;
41
43
  private eventListeners;
42
44
  private logger;
43
45
  private _forceDeferredActions;
@@ -161,6 +163,13 @@ export declare class Actor<TLogic extends AnyActorLogic> implements ActorInstanc
161
163
  /** Stops the Actor and unsubscribe all listeners. */
162
164
  stop(): this;
163
165
  private _complete;
166
+ /**
167
+ * Reports an unhandled error unless a consumer observes it before the
168
+ * report runs. An actor can error before its creator has a chance to
169
+ * subscribe, so the check waits one macrotask for a subscriber with an
170
+ * `error` callback.
171
+ */
172
+ private _reportUnlessObserved;
164
173
  private _error;
165
174
  private _stopProcedure;
166
175
  /**
@@ -2,7 +2,7 @@ import { SetupStateSchemas, StandardSchemaV1 } from "./schema.types.js";
2
2
  import type { ActorLogicValidator } from "./validation.types.js";
3
3
  import { StateMachine } from "./StateMachine.js";
4
4
  import { type Actor, type RequiredActorOptionsKeys } from "./createActor.js";
5
- import { AnyActorRef, AnyActorLogic, ActorRefFromLogic, AnyStateNode, EventObject, AnyEventObject, EventDescriptor, ExtractEvent, MachineContext, ProvidedActor, RoutableStateId, StateSchema, StateValue, StateValueFromStateSchema, ToChildren, MetaObject, Cast, Compute, EnqueueObject, DoneActorEvent, DoneStateEvent, ErrorActorEvent, SystemRegistry, RegistryKeyForLogic, ActorOptions, Observer, Subscription, OutputArg, SnapshotEvent, SingleOrArray, AfterEvent, TimeoutEvent, ErrorEvent } from "./types.js";
5
+ import { AnyActorRef, AnyActorLogic, ActorRefFromLogic, AnyStateNode, EventObject, AnyEventObject, EventDescriptor, ExtractEvent, MachineContext, ProvidedActor, RoutableStateId, StateSchema, StateValue, StateValueFromStateSchema, ToChildren, MetaObject, Cast, Compute, EnqueueObject, DoneActorEvent, DoneStateEvent, ErrorFrom, ErrorActorEvent, SystemRegistry, RegistryKeyForLogic, ActorOptions, Observer, Subscription, OutputArg, SnapshotEvent, SingleOrArray, AfterEvent, TimeoutEvent, ErrorEvent } from "./types.js";
6
6
  import { AnyActorSystem } from "./system.js";
7
7
  import { InspectionEvent } from "./inspection.js";
8
8
  import { ActionSchemas, DelayMapFromNames, DelaySourceMap, GuardSourceMap, GuardSchemas, InferChildren, InferActions, InferGuards, Sources, InferOutput, InferEvents, InferInternalEvents, Next_MachineConfig, Next_InvokeConfig, Next_StateNodeConfig, Next_TransitionConfigOrTarget, OutputFromConfig, ValidateHistoryDefaults, ValidateStateTargets, WithDefault } from "./types.v6.js";
@@ -507,9 +507,10 @@ type StateContext<TStateSchema extends SetupStateSchema, TFallbackContext extend
507
507
  context: infer TContextSchema;
508
508
  } ? TContextSchema extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<TContextSchema> & RootContext<TFallbackContext> & MachineContext & RootContextMarker<TFallbackContext> : RootContext<TFallbackContext> : RootContext<TFallbackContext>;
509
509
  declare const rootContext: unique symbol;
510
- type RootContextMarker<TContext> = {
510
+ /** @public Referenced by emitted declarations of narrowed state contexts. */
511
+ export interface RootContextMarker<TContext> {
511
512
  readonly [rootContext]?: RootContext<TContext>;
512
- };
513
+ }
513
514
  type RootContext<TContext> = typeof rootContext extends keyof TContext ? TContext[typeof rootContext] : TContext;
514
515
  type StateContextShape<TStateSchema extends SetupStateSchema, TFallbackContext> = TStateSchema['schemas'] extends {
515
516
  context: infer TContextSchema;
@@ -908,10 +909,13 @@ type SetupInvokeConfig<TStateSchemas extends Record<string, SetupStateSchema>, T
908
909
  } ? [
909
910
  Extract<NonNullable<TOnDone>, (...args: any[]) => unknown>
910
911
  ] extends [never] ? undefined | StateTransitionObjectConfig<TStateSchemas, TContext, TContextShape, DoneActorEvent, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry, false> : StateTransitionConfigOrTarget<TStateSchemas, TContext, TContextShape, InvokeDoneEvent<TInvoke>, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry> : never;
911
- onError?: StateTransitionConfigOrTarget<TStateSchemas, TContext, TContextShape, ErrorActorEvent, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry>;
912
+ onError?: StateTransitionConfigOrTarget<TStateSchemas, TContext, TContextShape, InvokeErrorEvent<TInvoke, TActorMap>, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry>;
912
913
  onSnapshot?: StateTransitionConfigOrTarget<TStateSchemas, TContext, TContextShape, SnapshotEvent<any>, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry>;
913
914
  onTimeout?: StateTransitionConfigOrTarget<TStateSchemas, TContext, TContextShape, TEvent, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry>;
914
915
  } : never : never;
916
+ type InvokeErrorEvent<TInvoke, TActorMap extends Sources['actors']> = TInvoke extends {
917
+ src: infer TSrc;
918
+ } ? TSrc extends keyof TActorMap & string ? ErrorActorEvent<ErrorFrom<TActorMap[TSrc]>> : TSrc extends AnyActorLogic ? ErrorActorEvent<ErrorFrom<TSrc>> : ErrorActorEvent : ErrorActorEvent;
915
919
  type StateTransitionConfigOrTarget<TStateSchemas extends Record<string, SetupStateSchema>, TContext extends MachineContext, TContextShape, TExpressionEvent extends EventObject, TEvent extends EventObject, TEmitted extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TMeta extends MetaObject, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays'], TSystemRegistry extends SystemRegistry, TInput = undefined, TTarget extends string = SetupStateTarget<TStateSchemas>, TKnownTarget extends string = KnownSetupStateTarget<TStateSchemas>> = undefined | StateTransitionObjectConfig<TStateSchemas, TContext, TContextShape, TExpressionEvent, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry, true, TTarget, TKnownTarget> | StateTransitionFunction<TStateSchemas, TContext, TContextShape, TExpressionEvent, TEvent, TEmitted, TChildren, TMeta, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry, TInput, TTarget, TKnownTarget>;
916
920
  type StateTransitionObjectConfig<TStateSchemas extends Record<string, SetupStateSchema>, TContext extends MachineContext, TContextShape, TExpressionEvent extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TMeta extends MetaObject, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays'], TSystemRegistry extends SystemRegistry, TAllowContextMapper extends boolean = true, TTarget extends string = SetupStateTarget<TStateSchemas>, TKnownTarget extends string = KnownSetupStateTarget<TStateSchemas>> = (StateTransitionResult<TStateSchemas, TContext, TContextShape, TMeta, TExpressionEvent, TChildren, TActionMap, TActorMap, TGuardMap, TDelayMap, TSystemRegistry, TAllowContextMapper, TTarget, TKnownTarget> & {
917
921
  description?: string;
@@ -107,6 +107,12 @@ export type OutputFrom<T> = T extends ActorLogic<infer TSnapshot, infer _TEvent,
107
107
  })['output'] : T extends ActorRef<infer TSnapshot, infer _TEvent, infer _TEmitted> ? (TSnapshot & {
108
108
  status: 'done';
109
109
  })['output'] : never;
110
+ type ErrorFromSnapshot<TSnapshot> = TSnapshot extends {
111
+ error: infer TError;
112
+ } ? Exclude<TError, undefined> : unknown;
113
+ export type ErrorFrom<T> = T extends {
114
+ transition: (snapshot: infer TSnapshot, ...args: any[]) => any;
115
+ } ? ErrorFromSnapshot<TSnapshot> : T extends ActorRef<infer TSnapshot, infer _TEvent, infer _TEmitted> ? ErrorFromSnapshot<TSnapshot> : never;
110
116
  export type NoRequiredParams<T extends ParameterizedObject> = T extends any ? undefined extends T['params'] ? T['type'] : never : never;
111
117
  export type ConditionalRequired<T, Condition extends boolean> = Condition extends true ? Required<T> : T;
112
118
  export type WithDynamicParams<TContext extends MachineContext, TExpressionEvent extends EventObject, T extends ParameterizedObject> = T extends any ? ConditionalRequired<{
@@ -769,6 +775,13 @@ export type Observer<T> = {
769
775
  next?: (value: T) => void;
770
776
  error?: (err: unknown) => void;
771
777
  complete?: () => void;
778
+ /**
779
+ * Marks an observer that only tracks the actor's lifecycle, such as one
780
+ * installed by a runtime integration. A passive observer does not count as
781
+ * an error handler: an unhandled actor error is still reported when every
782
+ * observer with an `error` callback is passive.
783
+ */
784
+ passive?: boolean;
772
785
  };
773
786
  export interface Subscription {
774
787
  unsubscribe(): void;
@@ -1,6 +1,6 @@
1
1
  import { SetupStateSchemas, StandardSchemaV1, TypeSchema } from "./schema.types.js";
2
2
  import { MachineSnapshot } from "./State.js";
3
- import { Action, ActorTimeoutEvent, AfterEvent, ActorLogic, ActorRef, ActorRefFromLogic, ActorSelf, AnyActorLogic, AnyActorRef, Compute, DoneActorEvent, DoNotInfer, ErrorActorEvent, EnqueueObject, EventDescriptor, ErrorEvent, EventObject, EventPayloadPattern, ExtractEvent, InitialContext, InputFrom, IsNever, MetaObject, NonReducibleUnknown, OutputFrom, SingleOrArray, SnapshotEvent, StateValue, TODO, TransitionContextMapper, TransitionContextPatch, TransitionConfigFunction, Values, AnyStateNode, SystemRegistry, TimeoutEvent } from "./types.js";
3
+ import { Action, ActorTimeoutEvent, AfterEvent, ActorLogic, ActorRef, ActorRefFromLogic, ActorSelf, AnyActorLogic, AnyActorRef, Compute, DoneActorEvent, DoNotInfer, ErrorFrom, ErrorActorEvent, EnqueueObject, EventDescriptor, ErrorEvent, EventObject, EventPayloadPattern, ExtractEvent, InitialContext, InputFrom, IsNever, MetaObject, NonReducibleUnknown, OutputFrom, SingleOrArray, SnapshotEvent, StateValue, TODO, TransitionContextMapper, TransitionContextPatch, TransitionConfigFunction, Values, AnyStateNode, SystemRegistry, TimeoutEvent } from "./types.js";
4
4
  import { MachineContext, Mapper } from "./types.js";
5
5
  import { LowInfer } from "./types.js";
6
6
  import { DoneStateEvent } from "./types.js";
@@ -240,7 +240,7 @@ export type Next_InvokeConfig<TContext extends MachineContext, TEvent extends Ev
240
240
  src: string | AnyActorLogic | ((args: InvokeSrcArgs<TContext, TEvent, TActorMap>) => string | AnyActorLogic);
241
241
  input?: ((args: InvokeInputArgs<TContext, TEvent, TEmitted, TChildren, TInput>) => unknown) | NonReducibleUnknown;
242
242
  } : {
243
- [K in keyof TActorMap & string]: Next_InvokeConfigBase<TContext, TEvent, TEmitted, TChildren, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, TSystemRegistry, DoneActorEvent<OutputFrom<TActorMap[K]>>> & {
243
+ [K in keyof TActorMap & string]: Next_InvokeConfigBase<TContext, TEvent, TEmitted, TChildren, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, TSystemRegistry, DoneActorEvent<OutputFrom<TActorMap[K]>>, ErrorActorEvent<ErrorFrom<TActorMap[K]>>> & {
244
244
  id?: ChildIdForLogic<TActorMap[K], TChildren>;
245
245
  input?: ((args: InvokeInputArgs<TContext, TEvent, TEmitted, TChildren, TInput>) => InputFrom<TActorMap[K]>) | InputFrom<TActorMap[K]>;
246
246
  } & ({
@@ -251,11 +251,11 @@ export type Next_InvokeConfig<TContext extends MachineContext, TEvent extends Ev
251
251
  src: (args: InvokeSrcArgs<TContext, TEvent, TActorMap>) => K | TActorMap[K];
252
252
  });
253
253
  }[keyof TActorMap & string] | InlineInvokeConfig<TContext, TEvent, TEmitted, TChildren, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, TSystemRegistry, TInput>;
254
- interface Next_InvokeConfigBase<TContext extends MachineContext, TEvent extends EventObject, TEmitted extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays'], TMeta extends MetaObject, TSystemRegistry extends SystemRegistry, TDoneEvent extends EventObject = [keyof TActorMap & string] extends [never] ? DoneActorEvent<any> : DoneActorEvent<OutputFrom<TActorMap[keyof TActorMap & string]>>> {
254
+ interface Next_InvokeConfigBase<TContext extends MachineContext, TEvent extends EventObject, TEmitted extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TActionMap extends Sources['actions'], TActorMap extends Sources['actors'], TGuardMap extends Sources['guards'], TDelayMap extends Sources['delays'], TMeta extends MetaObject, TSystemRegistry extends SystemRegistry, TDoneEvent extends EventObject = [keyof TActorMap & string] extends [never] ? DoneActorEvent<any> : DoneActorEvent<OutputFrom<TActorMap[keyof TActorMap & string]>>, TErrorEvent extends EventObject = [keyof TActorMap & string] extends [never] ? ErrorActorEvent<any> : ErrorActorEvent<ErrorFrom<TActorMap[keyof TActorMap & string]>>> {
255
255
  id?: string;
256
256
  registryKey?: keyof TSystemRegistry & string;
257
257
  onDone?: Next_TransitionConfigOrTarget<TContext, TDoneEvent, TEvent, TEmitted, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, undefined, TChildren>;
258
- onError?: Next_TransitionConfigOrTarget<TContext, ErrorActorEvent, TEvent, TEmitted, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, undefined, TChildren>;
258
+ onError?: Next_TransitionConfigOrTarget<TContext, TErrorEvent, TEvent, TEmitted, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, undefined, TChildren>;
259
259
  onSnapshot?: Next_TransitionConfigOrTarget<TContext, SnapshotEvent<any>, TEvent, TEmitted, TActionMap, TActorMap, TGuardMap, TDelayMap, TMeta, undefined, TChildren>;
260
260
  /**
261
261
  * The duration (in ms) after which this invocation will time out if it has
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var createActor = require('./createActor-54b4caed.cjs.js');
3
+ var createActor = require('./createActor-c4723a2b.cjs.js');
4
4
 
5
5
  function attachMicrostepActorRefs(microsteps, actorScope, inputSnapshot) {
6
6
  if (!microsteps.length) {
@@ -1,4 +1,4 @@
1
- import { a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, F as finalizeTransitionResult, a6 as attachSnapshotActorRef, y as createInitEvent, av as hasAmbientInspector, a5 as beginSpawnAllocation, a7 as macrostep, ak as createSpawnEffect, al as initialMicrostep, i as isAtomicStateNode, aw as getProperAncestors, ax as isRemoteActorRef, ay as getActorIdPrefix } from './createActor-04e2ee20.development.esm.js';
1
+ import { a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, F as finalizeTransitionResult, a6 as attachSnapshotActorRef, y as createInitEvent, av as hasAmbientInspector, a5 as beginSpawnAllocation, a7 as macrostep, ak as createSpawnEffect, al as initialMicrostep, i as isAtomicStateNode, aw as getProperAncestors, ax as isRemoteActorRef, ay as getActorIdPrefix } from './createActor-3dc6cdb7.development.esm.js';
2
2
 
3
3
  function attachMicrostepActorRefs(microsteps, actorScope, inputSnapshot) {
4
4
  if (!microsteps.length) {
@@ -1,4 +1,4 @@
1
- import { a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, F as finalizeTransitionResult, a6 as attachSnapshotActorRef, y as createInitEvent, av as hasAmbientInspector, a5 as beginSpawnAllocation, a7 as macrostep, ak as createSpawnEffect, al as initialMicrostep, i as isAtomicStateNode, aw as getProperAncestors, ax as isRemoteActorRef, ay as getActorIdPrefix } from './createActor-a7b9d1be.esm.js';
1
+ import { a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, F as finalizeTransitionResult, a6 as attachSnapshotActorRef, y as createInitEvent, av as hasAmbientInspector, a5 as beginSpawnAllocation, a7 as macrostep, ak as createSpawnEffect, al as initialMicrostep, i as isAtomicStateNode, aw as getProperAncestors, ax as isRemoteActorRef, ay as getActorIdPrefix } from './createActor-c7c704c2.esm.js';
2
2
 
3
3
  function attachMicrostepActorRefs(microsteps, actorScope, inputSnapshot) {
4
4
  if (!microsteps.length) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var createActor = require('./createActor-72c06d5c.development.cjs.js');
3
+ var createActor = require('./createActor-2213c48b.development.cjs.js');
4
4
 
5
5
  function attachMicrostepActorRefs(microsteps, actorScope, inputSnapshot) {
6
6
  if (!microsteps.length) {
@@ -1,4 +1,4 @@
1
- import { J as resolveRegisteredActorSource, K as allocateChildId, L as assertChildIdFree, M as reserveChildId, S as STATE_DELIMITER, N as mapValues, t as toArray, O as createInvokeId, P as getDelayedTransitions, Q as getEventDescriptorKey, R as getCandidates, T as evaluateCandidate, U as formatTransition, V as NULL_EVENT, W as toTransitionConfigArray, Y as createInvokeTimeoutEventId, Z as matchesActorSession, _ as formatRouteTransitions, $ as resolveStateValue, a0 as getAllStateNodes, f as getStateNodes, a1 as createMachineSnapshot, a2 as isInFinalState, a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, z as createDeadLetterEffect, a5 as beginSpawnAllocation, a6 as attachSnapshotActorRef, a7 as macrostep, a8 as isInertActorScope, a9 as setSnapshotActorRef, aa as cloneMachineSnapshot, ab as transitionNode, ac as XSTATE_TIMER, m as matchesEventDescriptor, ad as getTransitionResult, ae as hasEffect, af as createErrorPlatformEvent, ag as withActorSelf, ah as resolveActionsWithContext, ai as takeSpawnAllocationCounters, aj as mergeActorIdCounters, y as createInitEvent, ak as createSpawnEffect, al as initialMicrostep, am as toStatePath, an as isStateId, ao as getStateNodeByPath, ap as getPersistedSnapshot, aq as createRemoteActorRef, ar as resolveReferencedActor, as as createInvokeTimeoutEvent, at as parseGeneratedActorId, au as ACTOR_REF_TYPE, c as createActor } from './createActor-04e2ee20.development.esm.js';
1
+ import { J as resolveRegisteredActorSource, K as allocateChildId, L as assertChildIdFree, M as reserveChildId, S as STATE_DELIMITER, N as mapValues, t as toArray, O as createInvokeId, P as getDelayedTransitions, Q as getEventDescriptorKey, R as getCandidates, T as evaluateCandidate, U as formatTransition, V as NULL_EVENT, W as toTransitionConfigArray, Y as createInvokeTimeoutEventId, Z as matchesActorSession, _ as formatRouteTransitions, $ as resolveStateValue, a0 as getAllStateNodes, f as getStateNodes, a1 as createMachineSnapshot, a2 as isInFinalState, a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, z as createDeadLetterEffect, a5 as beginSpawnAllocation, a6 as attachSnapshotActorRef, a7 as macrostep, a8 as isInertActorScope, a9 as setSnapshotActorRef, aa as cloneMachineSnapshot, ab as transitionNode, ac as XSTATE_TIMER, m as matchesEventDescriptor, ad as getTransitionResult, ae as hasEffect, af as createErrorPlatformEvent, ag as withActorSelf, ah as resolveActionsWithContext, ai as takeSpawnAllocationCounters, aj as mergeActorIdCounters, y as createInitEvent, ak as createSpawnEffect, al as initialMicrostep, am as toStatePath, an as isStateId, ao as getStateNodeByPath, ap as getPersistedSnapshot, aq as createRemoteActorRef, ar as resolveReferencedActor, as as createInvokeTimeoutEvent, at as parseGeneratedActorId, au as ACTOR_REF_TYPE, c as createActor } from './createActor-3dc6cdb7.development.esm.js';
2
2
  import { a as assertValid } from './validation-e69470ad.development.esm.js';
3
3
 
4
4
  function createSpawner(actorScope, actors, spawnedChildren) {
@@ -485,6 +485,14 @@ class StateMachine {
485
485
  this._internalEventType = void 0;
486
486
  /** @internal Type-only marker for transition metadata. */
487
487
  this._transitionMetaType = void 0;
488
+ /**
489
+ * Type-level carriers for the machine's source maps and state schema. Type
490
+ * helpers in integration packages read these to walk a machine's declared
491
+ * actions, actors and invoked sources. They are never assigned at runtime.
492
+ */
493
+ this._actionMap = void 0;
494
+ this._actorMap = void 0;
495
+ this._stateSchema = void 0;
488
496
  /** The machine's own version. */
489
497
  this.version = void 0;
490
498
  this.schemas = void 0;
@@ -1,4 +1,4 @@
1
- import { J as resolveRegisteredActorSource, K as allocateChildId, L as assertChildIdFree, M as reserveChildId, S as STATE_DELIMITER, N as mapValues, t as toArray, O as createInvokeId, P as getDelayedTransitions, Q as getEventDescriptorKey, R as getCandidates, T as evaluateCandidate, U as formatTransition, V as NULL_EVENT, W as toTransitionConfigArray, Y as createInvokeTimeoutEventId, Z as matchesActorSession, _ as formatRouteTransitions, $ as resolveStateValue, a0 as getAllStateNodes, f as getStateNodes, a1 as createMachineSnapshot, a2 as isInFinalState, a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, z as createDeadLetterEffect, a5 as beginSpawnAllocation, a6 as attachSnapshotActorRef, a7 as macrostep, a8 as isInertActorScope, a9 as setSnapshotActorRef, aa as cloneMachineSnapshot, ab as transitionNode, ac as XSTATE_TIMER, m as matchesEventDescriptor, ad as getTransitionResult, ae as hasEffect, af as createErrorPlatformEvent, ag as withActorSelf, ah as resolveActionsWithContext, ai as takeSpawnAllocationCounters, aj as mergeActorIdCounters, y as createInitEvent, ak as createSpawnEffect, al as initialMicrostep, am as toStatePath, an as isStateId, ao as getStateNodeByPath, ap as getPersistedSnapshot, aq as createRemoteActorRef, ar as resolveReferencedActor, as as createInvokeTimeoutEvent, at as parseGeneratedActorId, au as ACTOR_REF_TYPE, c as createActor } from './createActor-a7b9d1be.esm.js';
1
+ import { J as resolveRegisteredActorSource, K as allocateChildId, L as assertChildIdFree, M as reserveChildId, S as STATE_DELIMITER, N as mapValues, t as toArray, O as createInvokeId, P as getDelayedTransitions, Q as getEventDescriptorKey, R as getCandidates, T as evaluateCandidate, U as formatTransition, V as NULL_EVENT, W as toTransitionConfigArray, Y as createInvokeTimeoutEventId, Z as matchesActorSession, _ as formatRouteTransitions, $ as resolveStateValue, a0 as getAllStateNodes, f as getStateNodes, a1 as createMachineSnapshot, a2 as isInFinalState, a3 as createInertActorScope, a4 as setInertActorScopeSnapshot, z as createDeadLetterEffect, a5 as beginSpawnAllocation, a6 as attachSnapshotActorRef, a7 as macrostep, a8 as isInertActorScope, a9 as setSnapshotActorRef, aa as cloneMachineSnapshot, ab as transitionNode, ac as XSTATE_TIMER, m as matchesEventDescriptor, ad as getTransitionResult, ae as hasEffect, af as createErrorPlatformEvent, ag as withActorSelf, ah as resolveActionsWithContext, ai as takeSpawnAllocationCounters, aj as mergeActorIdCounters, y as createInitEvent, ak as createSpawnEffect, al as initialMicrostep, am as toStatePath, an as isStateId, ao as getStateNodeByPath, ap as getPersistedSnapshot, aq as createRemoteActorRef, ar as resolveReferencedActor, as as createInvokeTimeoutEvent, at as parseGeneratedActorId, au as ACTOR_REF_TYPE, c as createActor } from './createActor-c7c704c2.esm.js';
2
2
  import { a as assertValid } from './validation-05f1d517.esm.js';
3
3
 
4
4
  function createSpawner(actorScope, actors, spawnedChildren) {
@@ -467,6 +467,14 @@ class StateMachine {
467
467
  this._internalEventType = void 0;
468
468
  /** @internal Type-only marker for transition metadata. */
469
469
  this._transitionMetaType = void 0;
470
+ /**
471
+ * Type-level carriers for the machine's source maps and state schema. Type
472
+ * helpers in integration packages read these to walk a machine's declared
473
+ * actions, actors and invoked sources. They are never assigned at runtime.
474
+ */
475
+ this._actionMap = void 0;
476
+ this._actorMap = void 0;
477
+ this._stateSchema = void 0;
470
478
  /** The machine's own version. */
471
479
  this.version = void 0;
472
480
  this.schemas = void 0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var createActor = require('./createActor-54b4caed.cjs.js');
3
+ var createActor = require('./createActor-c4723a2b.cjs.js');
4
4
  var validation = require('./validation-4561b43c.cjs.js');
5
5
 
6
6
  function createSpawner(actorScope, actors, spawnedChildren) {
@@ -469,6 +469,14 @@ class StateMachine {
469
469
  this._internalEventType = void 0;
470
470
  /** @internal Type-only marker for transition metadata. */
471
471
  this._transitionMetaType = void 0;
472
+ /**
473
+ * Type-level carriers for the machine's source maps and state schema. Type
474
+ * helpers in integration packages read these to walk a machine's declared
475
+ * actions, actors and invoked sources. They are never assigned at runtime.
476
+ */
477
+ this._actionMap = void 0;
478
+ this._actorMap = void 0;
479
+ this._stateSchema = void 0;
472
480
  /** The machine's own version. */
473
481
  this.version = void 0;
474
482
  this.schemas = void 0;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var createActor = require('./createActor-72c06d5c.development.cjs.js');
3
+ var createActor = require('./createActor-2213c48b.development.cjs.js');
4
4
  var validation = require('./validation-f2714a35.development.cjs.js');
5
5
 
6
6
  function createSpawner(actorScope, actors, spawnedChildren) {
@@ -487,6 +487,14 @@ class StateMachine {
487
487
  this._internalEventType = void 0;
488
488
  /** @internal Type-only marker for transition metadata. */
489
489
  this._transitionMetaType = void 0;
490
+ /**
491
+ * Type-level carriers for the machine's source maps and state schema. Type
492
+ * helpers in integration packages read these to walk a machine's declared
493
+ * actions, actors and invoked sources. They are never assigned at runtime.
494
+ */
495
+ this._actionMap = void 0;
496
+ this._actorMap = void 0;
497
+ this._stateSchema = void 0;
490
498
  /** The machine's own version. */
491
499
  this.version = void 0;
492
500
  this.schemas = void 0;