jssm 5.59.1 → 5.60.4
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 +7 -0
- package/dist/es6/jssm.js +70 -2
- package/dist/es6/jssm_types.d.ts +13 -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 +7 -0
- package/jssm_types.d.ts +13 -1
- package/package.json +1 -1
package/jssm.d.ts
CHANGED
|
@@ -48,6 +48,9 @@ declare class Machine<mDT> {
|
|
|
48
48
|
_exit_hooks: Map<string, Function>;
|
|
49
49
|
_global_action_hooks: Map<string, Function>;
|
|
50
50
|
_any_action_hook: HookHandler | undefined;
|
|
51
|
+
_standard_transition_hook: HookHandler | undefined;
|
|
52
|
+
_main_transition_hook: HookHandler | undefined;
|
|
53
|
+
_forced_transition_hook: HookHandler | undefined;
|
|
51
54
|
_any_transition_hook: HookHandler | undefined;
|
|
52
55
|
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>);
|
|
53
56
|
_new_state(state_config: JssmGenericState): StateType;
|
|
@@ -103,9 +106,13 @@ declare class Machine<mDT> {
|
|
|
103
106
|
hook_action(from: string, to: string, action: string, handler: HookHandler): Machine<mDT>;
|
|
104
107
|
hook_global_action(action: string, handler: HookHandler): Machine<mDT>;
|
|
105
108
|
hook_any_action(handler: HookHandler): Machine<mDT>;
|
|
109
|
+
hook_standard_transition(handler: HookHandler): Machine<mDT>;
|
|
110
|
+
hook_main_transition(handler: HookHandler): Machine<mDT>;
|
|
111
|
+
hook_forced_transition(handler: HookHandler): Machine<mDT>;
|
|
106
112
|
hook_any_transition(handler: HookHandler): Machine<mDT>;
|
|
107
113
|
hook_entry(to: string, handler: HookHandler): Machine<mDT>;
|
|
108
114
|
hook_exit(from: string, handler: HookHandler): Machine<mDT>;
|
|
115
|
+
edges_between(from: string, to: string): JssmTransition<mDT>[];
|
|
109
116
|
transition_impl(newStateOrAction: StateType, newData: mDT | undefined, wasForced: boolean, wasAction: boolean): boolean;
|
|
110
117
|
action(actionName: StateType, newData?: mDT): boolean;
|
|
111
118
|
transition(newState: StateType, newData?: mDT): boolean;
|
package/jssm_types.d.ts
CHANGED
|
@@ -162,6 +162,18 @@ declare type HookDescriptionWithAction = {
|
|
|
162
162
|
action: string;
|
|
163
163
|
handler: HookHandler;
|
|
164
164
|
};
|
|
165
|
+
declare type StandardTransitionHook = {
|
|
166
|
+
kind: 'standard transition';
|
|
167
|
+
handler: HookHandler;
|
|
168
|
+
};
|
|
169
|
+
declare type MainTransitionHook = {
|
|
170
|
+
kind: 'main transition';
|
|
171
|
+
handler: HookHandler;
|
|
172
|
+
};
|
|
173
|
+
declare type ForcedTransitionHook = {
|
|
174
|
+
kind: 'forced transition';
|
|
175
|
+
handler: HookHandler;
|
|
176
|
+
};
|
|
165
177
|
declare type AnyTransitionHook = {
|
|
166
178
|
kind: 'any transition';
|
|
167
179
|
handler: HookHandler;
|
|
@@ -185,5 +197,5 @@ declare type ExitHook = {
|
|
|
185
197
|
from: string;
|
|
186
198
|
handler: HookHandler;
|
|
187
199
|
};
|
|
188
|
-
declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | GlobalActionHook | AnyActionHook | AnyTransitionHook | EntryHook | ExitHook;
|
|
200
|
+
declare type HookDescription = BasicHookDescription | HookDescriptionWithAction | GlobalActionHook | AnyActionHook | StandardTransitionHook | MainTransitionHook | ForcedTransitionHook | AnyTransitionHook | EntryHook | ExitHook;
|
|
189
201
|
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 };
|