jssm 5.141.4 → 5.141.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/jssm.es5.d.cts CHANGED
@@ -2410,6 +2410,20 @@ declare class Machine<mDT> {
2410
2410
  * @internal
2411
2411
  */
2412
2412
  _subscribe<Ev extends JssmEventName>(name: Ev, filterOrFn: JssmEventFilter<mDT, Ev> | JssmEventHandler<mDT, Ev>, maybeFn: JssmEventHandler<mDT, Ev> | undefined, once: boolean): JssmUnsubscribe;
2413
+ /**
2414
+ * Invoke a single event-handler entry, respecting its filter, once-removal
2415
+ * semantics, and the error re-fire / recursion-guard logic. Extracted so
2416
+ * {@link _fire} can share identical behavior between the size-1 fast-path
2417
+ * and the general snapshotted loop.
2418
+ *
2419
+ * @param entry - The subscriber descriptor to invoke.
2420
+ * @param set - The live Set that owns `entry`; needed for once-removal.
2421
+ * @param name - The event name being dispatched (used in error re-fires).
2422
+ * @param detail - The event payload forwarded to the handler.
2423
+ *
2424
+ * @internal
2425
+ */
2426
+ _fire_one<Ev extends JssmEventName>(entry: JssmEventEntry<mDT, Ev>, set: Set<JssmEventEntry<any, any>>, name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
2413
2427
  /**
2414
2428
  * Dispatch an event to every registered subscriber in registration
2415
2429
  * order. Filters are checked first; non-matching handlers are skipped
@@ -2421,6 +2435,11 @@ declare class Machine<mDT> {
2421
2435
  * handler throws, the new exception is swallowed rather than rebroadcast
2422
2436
  * to avoid an infinite loop.
2423
2437
  *
2438
+ * When exactly one subscriber is registered the common case avoids the
2439
+ * `Array.from(set)` snapshot allocation by capturing the lone entry into a
2440
+ * local first — equivalent to a 1-element snapshot but allocation-free.
2441
+ * The general path still snapshots for re-entrancy safety.
2442
+ *
2424
2443
  * @internal
2425
2444
  */
2426
2445
  _fire<Ev extends JssmEventName>(name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
@@ -2687,6 +2706,33 @@ declare class Machine<mDT> {
2687
2706
  *
2688
2707
  */
2689
2708
  override(newState: StateType, newData?: mDT | undefined): void;
2709
+ /*********
2710
+ *
2711
+ * Fire a `'rejection'` event caused by a hook vetoing a pending transition.
2712
+ * Extracted from the per-call closures inside {@link transition_impl} so
2713
+ * that it is allocated once at class-definition time rather than on every
2714
+ * hooked transition.
2715
+ *
2716
+ * @param hook_name Name of the hook that rejected (e.g. `'exit'`).
2717
+ * @param fromState State the machine was in when the transition was
2718
+ * attempted; used as the `from` field of the rejection event.
2719
+ * @param newState State that would have been entered had the hook
2720
+ * passed; used as the `to` field of the rejection event.
2721
+ * @param fromAction Action name when the transition was initiated by an
2722
+ * action call; `undefined` for plain state transitions.
2723
+ * @param oldData Machine data at the moment the transition was
2724
+ * attempted, before any hook mutations.
2725
+ * @param newData The `next_data` value passed to the transition call.
2726
+ * @param wasForced Whether the transition was attempted via
2727
+ * `force_transition`.
2728
+ *
2729
+ * @see transition_impl
2730
+ * @see _fire
2731
+ *
2732
+ * @internal
2733
+ *
2734
+ */
2735
+ _fire_hook_rejection(hook_name: string, fromState: StateType, newState: StateType, fromAction: StateType | undefined, oldData: mDT, newData: mDT | undefined, wasForced: boolean): void;
2690
2736
  /*********
2691
2737
  *
2692
2738
  * Shared transition core used by {@link transition}, {@link force_transition},
package/jssm.es6.d.ts CHANGED
@@ -2410,6 +2410,20 @@ declare class Machine<mDT> {
2410
2410
  * @internal
2411
2411
  */
2412
2412
  _subscribe<Ev extends JssmEventName>(name: Ev, filterOrFn: JssmEventFilter<mDT, Ev> | JssmEventHandler<mDT, Ev>, maybeFn: JssmEventHandler<mDT, Ev> | undefined, once: boolean): JssmUnsubscribe;
2413
+ /**
2414
+ * Invoke a single event-handler entry, respecting its filter, once-removal
2415
+ * semantics, and the error re-fire / recursion-guard logic. Extracted so
2416
+ * {@link _fire} can share identical behavior between the size-1 fast-path
2417
+ * and the general snapshotted loop.
2418
+ *
2419
+ * @param entry - The subscriber descriptor to invoke.
2420
+ * @param set - The live Set that owns `entry`; needed for once-removal.
2421
+ * @param name - The event name being dispatched (used in error re-fires).
2422
+ * @param detail - The event payload forwarded to the handler.
2423
+ *
2424
+ * @internal
2425
+ */
2426
+ _fire_one<Ev extends JssmEventName>(entry: JssmEventEntry<mDT, Ev>, set: Set<JssmEventEntry<any, any>>, name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
2413
2427
  /**
2414
2428
  * Dispatch an event to every registered subscriber in registration
2415
2429
  * order. Filters are checked first; non-matching handlers are skipped
@@ -2421,6 +2435,11 @@ declare class Machine<mDT> {
2421
2435
  * handler throws, the new exception is swallowed rather than rebroadcast
2422
2436
  * to avoid an infinite loop.
2423
2437
  *
2438
+ * When exactly one subscriber is registered the common case avoids the
2439
+ * `Array.from(set)` snapshot allocation by capturing the lone entry into a
2440
+ * local first — equivalent to a 1-element snapshot but allocation-free.
2441
+ * The general path still snapshots for re-entrancy safety.
2442
+ *
2424
2443
  * @internal
2425
2444
  */
2426
2445
  _fire<Ev extends JssmEventName>(name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
@@ -2687,6 +2706,33 @@ declare class Machine<mDT> {
2687
2706
  *
2688
2707
  */
2689
2708
  override(newState: StateType, newData?: mDT | undefined): void;
2709
+ /*********
2710
+ *
2711
+ * Fire a `'rejection'` event caused by a hook vetoing a pending transition.
2712
+ * Extracted from the per-call closures inside {@link transition_impl} so
2713
+ * that it is allocated once at class-definition time rather than on every
2714
+ * hooked transition.
2715
+ *
2716
+ * @param hook_name Name of the hook that rejected (e.g. `'exit'`).
2717
+ * @param fromState State the machine was in when the transition was
2718
+ * attempted; used as the `from` field of the rejection event.
2719
+ * @param newState State that would have been entered had the hook
2720
+ * passed; used as the `to` field of the rejection event.
2721
+ * @param fromAction Action name when the transition was initiated by an
2722
+ * action call; `undefined` for plain state transitions.
2723
+ * @param oldData Machine data at the moment the transition was
2724
+ * attempted, before any hook mutations.
2725
+ * @param newData The `next_data` value passed to the transition call.
2726
+ * @param wasForced Whether the transition was attempted via
2727
+ * `force_transition`.
2728
+ *
2729
+ * @see transition_impl
2730
+ * @see _fire
2731
+ *
2732
+ * @internal
2733
+ *
2734
+ */
2735
+ _fire_hook_rejection(hook_name: string, fromState: StateType, newState: StateType, fromAction: StateType | undefined, oldData: mDT, newData: mDT | undefined, wasForced: boolean): void;
2690
2736
  /*********
2691
2737
  *
2692
2738
  * Shared transition core used by {@link transition}, {@link force_transition},
@@ -1808,6 +1808,20 @@ declare class Machine<mDT> {
1808
1808
  * @internal
1809
1809
  */
1810
1810
  _subscribe<Ev extends JssmEventName>(name: Ev, filterOrFn: JssmEventFilter<mDT, Ev> | JssmEventHandler<mDT, Ev>, maybeFn: JssmEventHandler<mDT, Ev> | undefined, once: boolean): JssmUnsubscribe;
1811
+ /**
1812
+ * Invoke a single event-handler entry, respecting its filter, once-removal
1813
+ * semantics, and the error re-fire / recursion-guard logic. Extracted so
1814
+ * {@link _fire} can share identical behavior between the size-1 fast-path
1815
+ * and the general snapshotted loop.
1816
+ *
1817
+ * @param entry - The subscriber descriptor to invoke.
1818
+ * @param set - The live Set that owns `entry`; needed for once-removal.
1819
+ * @param name - The event name being dispatched (used in error re-fires).
1820
+ * @param detail - The event payload forwarded to the handler.
1821
+ *
1822
+ * @internal
1823
+ */
1824
+ _fire_one<Ev extends JssmEventName>(entry: JssmEventEntry<mDT, Ev>, set: Set<JssmEventEntry<any, any>>, name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
1811
1825
  /**
1812
1826
  * Dispatch an event to every registered subscriber in registration
1813
1827
  * order. Filters are checked first; non-matching handlers are skipped
@@ -1819,6 +1833,11 @@ declare class Machine<mDT> {
1819
1833
  * handler throws, the new exception is swallowed rather than rebroadcast
1820
1834
  * to avoid an infinite loop.
1821
1835
  *
1836
+ * When exactly one subscriber is registered the common case avoids the
1837
+ * `Array.from(set)` snapshot allocation by capturing the lone entry into a
1838
+ * local first — equivalent to a 1-element snapshot but allocation-free.
1839
+ * The general path still snapshots for re-entrancy safety.
1840
+ *
1822
1841
  * @internal
1823
1842
  */
1824
1843
  _fire<Ev extends JssmEventName>(name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
@@ -2085,6 +2104,33 @@ declare class Machine<mDT> {
2085
2104
  *
2086
2105
  */
2087
2106
  override(newState: StateType, newData?: mDT | undefined): void;
2107
+ /*********
2108
+ *
2109
+ * Fire a `'rejection'` event caused by a hook vetoing a pending transition.
2110
+ * Extracted from the per-call closures inside {@link transition_impl} so
2111
+ * that it is allocated once at class-definition time rather than on every
2112
+ * hooked transition.
2113
+ *
2114
+ * @param hook_name Name of the hook that rejected (e.g. `'exit'`).
2115
+ * @param fromState State the machine was in when the transition was
2116
+ * attempted; used as the `from` field of the rejection event.
2117
+ * @param newState State that would have been entered had the hook
2118
+ * passed; used as the `to` field of the rejection event.
2119
+ * @param fromAction Action name when the transition was initiated by an
2120
+ * action call; `undefined` for plain state transitions.
2121
+ * @param oldData Machine data at the moment the transition was
2122
+ * attempted, before any hook mutations.
2123
+ * @param newData The `next_data` value passed to the transition call.
2124
+ * @param wasForced Whether the transition was attempted via
2125
+ * `force_transition`.
2126
+ *
2127
+ * @see transition_impl
2128
+ * @see _fire
2129
+ *
2130
+ * @internal
2131
+ *
2132
+ */
2133
+ _fire_hook_rejection(hook_name: string, fromState: StateType, newState: StateType, fromAction: StateType | undefined, oldData: mDT, newData: mDT | undefined, wasForced: boolean): void;
2088
2134
  /*********
2089
2135
  *
2090
2136
  * Shared transition core used by {@link transition}, {@link force_transition},
package/jssm_viz.es6.d.ts CHANGED
@@ -1808,6 +1808,20 @@ declare class Machine<mDT> {
1808
1808
  * @internal
1809
1809
  */
1810
1810
  _subscribe<Ev extends JssmEventName>(name: Ev, filterOrFn: JssmEventFilter<mDT, Ev> | JssmEventHandler<mDT, Ev>, maybeFn: JssmEventHandler<mDT, Ev> | undefined, once: boolean): JssmUnsubscribe;
1811
+ /**
1812
+ * Invoke a single event-handler entry, respecting its filter, once-removal
1813
+ * semantics, and the error re-fire / recursion-guard logic. Extracted so
1814
+ * {@link _fire} can share identical behavior between the size-1 fast-path
1815
+ * and the general snapshotted loop.
1816
+ *
1817
+ * @param entry - The subscriber descriptor to invoke.
1818
+ * @param set - The live Set that owns `entry`; needed for once-removal.
1819
+ * @param name - The event name being dispatched (used in error re-fires).
1820
+ * @param detail - The event payload forwarded to the handler.
1821
+ *
1822
+ * @internal
1823
+ */
1824
+ _fire_one<Ev extends JssmEventName>(entry: JssmEventEntry<mDT, Ev>, set: Set<JssmEventEntry<any, any>>, name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
1811
1825
  /**
1812
1826
  * Dispatch an event to every registered subscriber in registration
1813
1827
  * order. Filters are checked first; non-matching handlers are skipped
@@ -1819,6 +1833,11 @@ declare class Machine<mDT> {
1819
1833
  * handler throws, the new exception is swallowed rather than rebroadcast
1820
1834
  * to avoid an infinite loop.
1821
1835
  *
1836
+ * When exactly one subscriber is registered the common case avoids the
1837
+ * `Array.from(set)` snapshot allocation by capturing the lone entry into a
1838
+ * local first — equivalent to a 1-element snapshot but allocation-free.
1839
+ * The general path still snapshots for re-entrancy safety.
1840
+ *
1822
1841
  * @internal
1823
1842
  */
1824
1843
  _fire<Ev extends JssmEventName>(name: Ev, detail: JssmEventDetailMap<mDT>[Ev]): void;
@@ -2085,6 +2104,33 @@ declare class Machine<mDT> {
2085
2104
  *
2086
2105
  */
2087
2106
  override(newState: StateType, newData?: mDT | undefined): void;
2107
+ /*********
2108
+ *
2109
+ * Fire a `'rejection'` event caused by a hook vetoing a pending transition.
2110
+ * Extracted from the per-call closures inside {@link transition_impl} so
2111
+ * that it is allocated once at class-definition time rather than on every
2112
+ * hooked transition.
2113
+ *
2114
+ * @param hook_name Name of the hook that rejected (e.g. `'exit'`).
2115
+ * @param fromState State the machine was in when the transition was
2116
+ * attempted; used as the `from` field of the rejection event.
2117
+ * @param newState State that would have been entered had the hook
2118
+ * passed; used as the `to` field of the rejection event.
2119
+ * @param fromAction Action name when the transition was initiated by an
2120
+ * action call; `undefined` for plain state transitions.
2121
+ * @param oldData Machine data at the moment the transition was
2122
+ * attempted, before any hook mutations.
2123
+ * @param newData The `next_data` value passed to the transition call.
2124
+ * @param wasForced Whether the transition was attempted via
2125
+ * `force_transition`.
2126
+ *
2127
+ * @see transition_impl
2128
+ * @see _fire
2129
+ *
2130
+ * @internal
2131
+ *
2132
+ */
2133
+ _fire_hook_rejection(hook_name: string, fromState: StateType, newState: StateType, fromAction: StateType | undefined, oldData: mDT, newData: mDT | undefined, wasForced: boolean): void;
2088
2134
  /*********
2089
2135
  *
2090
2136
  * Shared transition core used by {@link transition}, {@link force_transition},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.141.4",
3
+ "version": "5.141.6",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },