jssm 5.82.0 → 5.82.3
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/CHANGELOG.md +48 -45
- package/README.md +2 -2
- package/dist/es6/jssm.d.ts +5 -3
- package/dist/es6/jssm.js +18 -2
- package/dist/es6/jssm_types.d.ts +5 -3
- package/dist/es6/jssm_types.js +3 -1
- package/dist/es6/themes/jssm_theme_plain.d.ts +11 -0
- package/dist/es6/themes/jssm_theme_plain.js +69 -0
- 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 +5 -3
- package/jssm_types.d.ts +5 -3
- package/package.json +2 -2
package/jssm.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type StateType = string;
|
|
2
2
|
import { JssmGenericState, JssmGenericConfig, JssmStateConfig, JssmTransition, JssmTransitionList, // JssmTransitionRule,
|
|
3
|
-
JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmStateStyleKeyList, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult } from './jssm_types';
|
|
3
|
+
JssmMachineInternalState, JssmParseTree, JssmStateDeclaration, JssmStateStyleKeyList, JssmArrow, JssmArrowDirection, JssmArrowKind, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslDirections, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult } from './jssm_types';
|
|
4
4
|
import { seq, unique, find_repeated, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util';
|
|
5
5
|
import * as constants from './jssm_constants';
|
|
6
6
|
declare const shapes: string[], gviz_shapes: string[], named_colors: string[];
|
|
@@ -625,7 +625,9 @@ declare class Machine<mDT> {
|
|
|
625
625
|
list_edges(): Array<JssmTransition<mDT>>;
|
|
626
626
|
list_named_transitions(): Map<StateType, number>;
|
|
627
627
|
list_actions(): Array<StateType>;
|
|
628
|
-
|
|
628
|
+
all_themes(): FslTheme[];
|
|
629
|
+
get themes(): FslTheme[];
|
|
630
|
+
set themes(to: FslTheme | FslTheme[]);
|
|
629
631
|
flow(): FslDirection;
|
|
630
632
|
get_transition_by_state_names(from: StateType, to: StateType): number;
|
|
631
633
|
lookup_transition_for(from: StateType, to: StateType): JssmTransition<mDT>;
|
|
@@ -1209,4 +1211,4 @@ declare function is_hook_complex_result<mDT>(hr: unknown): hr is HookComplexResu
|
|
|
1209
1211
|
declare function is_hook_rejection<mDT>(hr: HookResult<mDT>): boolean;
|
|
1210
1212
|
declare function abstract_hook_step<mDT>(maybe_hook: HookHandler<mDT> | undefined, hook_args: HookContext<mDT>): HookComplexResult<mDT>;
|
|
1211
1213
|
declare function deserialize<mDT>(machine_string: string, ser: JssmSerialization<mDT>): Machine<mDT>;
|
|
1212
|
-
export { version, transfer_state_properties, Machine, deserialize, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, unique, find_repeated, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, constants, shapes, gviz_shapes, named_colors, is_hook_rejection, is_hook_complex_result, abstract_hook_step, state_style_condense };
|
|
1214
|
+
export { version, transfer_state_properties, Machine, deserialize, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind, seq, unique, find_repeated, weighted_rand_select, histograph, weighted_sample_select, weighted_histo_key, constants, shapes, gviz_shapes, named_colors, is_hook_rejection, is_hook_complex_result, abstract_hook_step, state_style_condense, FslDirections };
|
package/jssm_types.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ declare type JssmArrowKind = 'none' | 'legal' | 'main' | 'forced';
|
|
|
24
24
|
declare type JssmLayout = 'dot' | 'circo' | 'twopi' | 'fdp';
|
|
25
25
|
declare type JssmCorner = 'regular' | 'rounded' | 'lined';
|
|
26
26
|
declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
|
|
27
|
-
declare
|
|
28
|
-
declare type
|
|
27
|
+
declare const FslDirections: readonly ["up", "right", "down", "left"];
|
|
28
|
+
declare type FslDirection = typeof FslDirections[number];
|
|
29
|
+
declare const FslThemes: readonly ["default", "ocean", "modern", "plain"];
|
|
30
|
+
declare type FslTheme = typeof FslThemes[number];
|
|
29
31
|
declare type JssmSerialization<DataType> = {
|
|
30
32
|
jssm_version: string;
|
|
31
33
|
timestamp: number;
|
|
@@ -351,4 +353,4 @@ declare type JssmErrorExtendedInfo = {
|
|
|
351
353
|
requested_state?: StateType | undefined;
|
|
352
354
|
};
|
|
353
355
|
declare type JssmHistory<mDT> = circular_buffer<[StateType, mDT]>;
|
|
354
|
-
export { JssmColor, JssmShape, JssmTransition, JssmTransitions, JssmTransitionList, JssmTransitionRule, JssmArrow, JssmArrowKind, JssmArrowDirection, JssmGenericConfig, JssmGenericState, JssmGenericMachine, JssmParseTree, JssmCompileSe, JssmCompileSeStart, JssmCompileRule, JssmPermitted, JssmPermittedOpt, JssmResult, JssmStateDeclaration, JssmStateDeclarationRule, JssmStateConfig, JssmStateStyleKey, JssmStateStyleKeyList, JssmBaseTheme, JssmTheme, JssmLayout, JssmHistory, JssmSerialization, JssmPropertyDefinition, JssmParseFunctionType, JssmMachineInternalState, JssmErrorExtendedInfo, FslDirection, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult };
|
|
356
|
+
export { JssmColor, JssmShape, JssmTransition, JssmTransitions, JssmTransitionList, JssmTransitionRule, JssmArrow, JssmArrowKind, JssmArrowDirection, JssmGenericConfig, JssmGenericState, JssmGenericMachine, JssmParseTree, JssmCompileSe, JssmCompileSeStart, JssmCompileRule, JssmPermitted, JssmPermittedOpt, JssmResult, JssmStateDeclaration, JssmStateDeclarationRule, JssmStateConfig, JssmStateStyleKey, JssmStateStyleKeyList, JssmBaseTheme, JssmTheme, JssmLayout, JssmHistory, JssmSerialization, JssmPropertyDefinition, JssmParseFunctionType, JssmMachineInternalState, JssmErrorExtendedInfo, FslDirections, FslDirection, FslThemes, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jssm",
|
|
3
|
-
"version": "5.82.
|
|
3
|
+
"version": "5.82.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.0.0"
|
|
6
6
|
},
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"jest-stoch": "jest -c jest-stoch.config.js --color --verbose",
|
|
32
32
|
"jest-dragon": "jest -c jest-dragon.config.js --color --verbose",
|
|
33
33
|
"jest-spec": "jest -c jest-spec.config.js --color --verbose",
|
|
34
|
-
"jest": "npm run jest-spec",
|
|
34
|
+
"jest": "npm run jest-stoch && npm run jest-spec",
|
|
35
35
|
"test": "npm run make && npm run jest",
|
|
36
36
|
"clean": "rm -rf dist && rm -rf docs && cd coverage && rm -rf cloc && cd .. && rm -f src/ts/jssm-dot.ts && rm -f src/ts/version.ts && rm -f *.d.ts && mkdir dist && mkdir docs && cd coverage && mkdir cloc && cd ..",
|
|
37
37
|
"peg": "rm -f src/ts/jssm-dot.js && pegjs src/ts/jssm-dot.peg && node src/buildjs/fixparser.js && rm src/ts/jssm-dot.js",
|