jssm 5.48.0 → 5.49.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/dist/es6/jssm.d.ts +4 -0
- package/dist/es6/jssm.js +32 -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 -0
- package/jssm.d.ts +4 -0
- package/jssm_types.d.ts +5 -1
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -38,8 +38,11 @@ declare class Machine<mDT> {
|
|
|
38
38
|
_theme: FslTheme;
|
|
39
39
|
_flow: FslDirection;
|
|
40
40
|
_has_hooks: boolean;
|
|
41
|
+
_has_basic_hooks: boolean;
|
|
42
|
+
_has_named_hooks: boolean;
|
|
41
43
|
_hooks: Map<string, Function>;
|
|
42
44
|
_named_hooks: Map<string, Function>;
|
|
45
|
+
_any_transition_hook: HookHandler | undefined;
|
|
43
46
|
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>);
|
|
44
47
|
_new_state(state_config: JssmGenericState): StateType;
|
|
45
48
|
state(): StateType;
|
|
@@ -92,6 +95,7 @@ declare class Machine<mDT> {
|
|
|
92
95
|
set_hook(HookDesc: HookDescription): void;
|
|
93
96
|
hook(from: string, to: string, handler: HookHandler): Machine<mDT>;
|
|
94
97
|
hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
|
|
98
|
+
hook_any_transition(handler: HookHandler): Machine<mDT>;
|
|
95
99
|
action(name: StateType, newData?: mDT): boolean;
|
|
96
100
|
transition(newState: StateType, newData?: mDT): boolean;
|
|
97
101
|
force_transition(newState: StateType, newData?: mDT): boolean;
|
package/jssm_types.d.ts
CHANGED
|
@@ -162,6 +162,10 @@ declare type HookDescriptionWithAction = {
|
|
|
162
162
|
action: string;
|
|
163
163
|
handler: HookHandler;
|
|
164
164
|
};
|
|
165
|
+
declare type AnyTransitionHook = {
|
|
166
|
+
kind: 'any transition';
|
|
167
|
+
handler: HookHandler;
|
|
168
|
+
};
|
|
165
169
|
declare type EntryHook = {
|
|
166
170
|
kind: 'entry';
|
|
167
171
|
to: string;
|
|
@@ -172,5 +176,5 @@ declare type ExitHook = {
|
|
|
172
176
|
from: string;
|
|
173
177
|
handler: HookHandler;
|
|
174
178
|
};
|
|
175
|
-
declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | EntryHook | ExitHook;
|
|
179
|
+
declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | AnyTransitionHook | EntryHook | ExitHook;
|
|
176
180
|
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 };
|