jssm 5.56.2 → 5.58.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/jssm.d.ts CHANGED
@@ -41,9 +41,12 @@ declare class Machine<mDT> {
41
41
  _has_basic_hooks: boolean;
42
42
  _has_named_hooks: boolean;
43
43
  _has_entry_hooks: boolean;
44
+ _has_exit_hooks: boolean;
44
45
  _hooks: Map<string, Function>;
45
46
  _named_hooks: Map<string, Function>;
46
47
  _entry_hooks: Map<string, Function>;
48
+ _exit_hooks: Map<string, Function>;
49
+ _any_action_hook: HookHandler | undefined;
47
50
  _any_transition_hook: HookHandler | undefined;
48
51
  constructor({ start_states, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, fsl_version, dot_preamble, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout }: JssmGenericConfig<mDT>);
49
52
  _new_state(state_config: JssmGenericState): StateType;
@@ -99,6 +102,7 @@ declare class Machine<mDT> {
99
102
  hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
100
103
  hook_any_transition(handler: HookHandler): Machine<mDT>;
101
104
  hook_entry(to: string, handler: HookHandler): Machine<mDT>;
105
+ hook_exit(from: string, handler: HookHandler): Machine<mDT>;
102
106
  transition_impl(newStateOrAction: StateType, newData: mDT | undefined, wasForced: boolean, wasAction: boolean): boolean;
103
107
  action(actionName: StateType, newData?: mDT): boolean;
104
108
  transition(newState: StateType, newData?: mDT): boolean;
package/jssm_types.d.ts CHANGED
@@ -166,6 +166,10 @@ declare type AnyTransitionHook = {
166
166
  kind: 'any transition';
167
167
  handler: HookHandler;
168
168
  };
169
+ declare type AnyActionHook = {
170
+ kind: 'any action';
171
+ handler: HookHandler;
172
+ };
169
173
  declare type EntryHook = {
170
174
  kind: 'entry';
171
175
  to: string;
@@ -176,5 +180,5 @@ declare type ExitHook = {
176
180
  from: string;
177
181
  handler: HookHandler;
178
182
  };
179
- declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | AnyTransitionHook | EntryHook | ExitHook;
183
+ declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | AnyActionHook | AnyTransitionHook | EntryHook | ExitHook;
180
184
  export { JssmColor, JssmTransition, JssmTransitions, JssmTransitionList, JssmTransitionRule, JssmArrow, JssmArrowKind, JssmArrowDirection, JssmGenericConfig, JssmGenericState, JssmGenericMachine, JssmParseTree, JssmCompileSe, JssmCompileSeStart, JssmCompileRule, JssmPermitted, JssmPermittedOpt, JssmResult, JssmStateDeclaration, JssmStateDeclarationRule, JssmLayout, JssmParseFunctionType, JssmMachineInternalState, FslDirection, FslTheme, HookDescription, HookHandler };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.56.2",
3
+ "version": "5.58.0",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },