jssm 5.57.1 → 5.59.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
@@ -46,6 +46,8 @@ declare class Machine<mDT> {
46
46
  _named_hooks: Map<string, Function>;
47
47
  _entry_hooks: Map<string, Function>;
48
48
  _exit_hooks: Map<string, Function>;
49
+ _global_action_hooks: Map<string, Function>;
50
+ _any_action_hook: HookHandler | undefined;
49
51
  _any_transition_hook: HookHandler | undefined;
50
52
  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>);
51
53
  _new_state(state_config: JssmGenericState): StateType;
@@ -99,6 +101,7 @@ declare class Machine<mDT> {
99
101
  set_hook(HookDesc: HookDescription): void;
100
102
  hook(from: string, to: string, handler: HookHandler): Machine<mDT>;
101
103
  hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
104
+ hook_any_action(handler: HookHandler): Machine<mDT>;
102
105
  hook_any_transition(handler: HookHandler): Machine<mDT>;
103
106
  hook_entry(to: string, handler: HookHandler): Machine<mDT>;
104
107
  hook_exit(from: string, handler: HookHandler): Machine<mDT>;
package/jssm_types.d.ts CHANGED
@@ -166,6 +166,15 @@ declare type AnyTransitionHook = {
166
166
  kind: 'any transition';
167
167
  handler: HookHandler;
168
168
  };
169
+ declare type GlobalActionHook = {
170
+ kind: 'global action';
171
+ action: string;
172
+ handler: HookHandler;
173
+ };
174
+ declare type AnyActionHook = {
175
+ kind: 'any action';
176
+ handler: HookHandler;
177
+ };
169
178
  declare type EntryHook = {
170
179
  kind: 'entry';
171
180
  to: string;
@@ -176,5 +185,5 @@ declare type ExitHook = {
176
185
  from: string;
177
186
  handler: HookHandler;
178
187
  };
179
- declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | AnyTransitionHook | EntryHook | ExitHook;
188
+ declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | GlobalActionHook | AnyActionHook | AnyTransitionHook | EntryHook | ExitHook;
180
189
  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.57.1",
3
+ "version": "5.59.0",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },