jssm 5.57.0 → 5.58.1
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/dist/es6/jssm.d.ts +3 -0
- package/dist/es6/jssm.js +29 -6
- package/dist/es6/jssm_types.d.ts +5 -1
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs.js +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/jssm.d.ts +3 -0
- package/jssm_types.d.ts +5 -1
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ 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
|
+
_any_action_hook: HookHandler | undefined;
|
|
49
50
|
_any_transition_hook: HookHandler | undefined;
|
|
50
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>);
|
|
51
52
|
_new_state(state_config: JssmGenericState): StateType;
|
|
@@ -99,8 +100,10 @@ declare class Machine<mDT> {
|
|
|
99
100
|
set_hook(HookDesc: HookDescription): void;
|
|
100
101
|
hook(from: string, to: string, handler: HookHandler): Machine<mDT>;
|
|
101
102
|
hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
|
|
103
|
+
hook_any_action(handler: HookHandler): Machine<mDT>;
|
|
102
104
|
hook_any_transition(handler: HookHandler): Machine<mDT>;
|
|
103
105
|
hook_entry(to: string, handler: HookHandler): Machine<mDT>;
|
|
106
|
+
hook_exit(from: string, handler: HookHandler): Machine<mDT>;
|
|
104
107
|
transition_impl(newStateOrAction: StateType, newData: mDT | undefined, wasForced: boolean, wasAction: boolean): boolean;
|
|
105
108
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
106
109
|
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 };
|