jssm 5.97.1 → 5.98.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/CHANGELOG.md +35 -50
- package/README.md +6 -6
- package/dist/es6/jssm.d.ts +1 -1
- package/dist/es6/jssm.js +14 -2
- package/dist/es6/jssm_types.d.ts +2 -0
- package/dist/es6/version.js +1 -1
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.cjs +1 -1
- package/dist/jssm.es5.iife.nonmin.cjs +15 -3
- package/dist/jssm.es5.nonmin.cjs +15 -3
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm.es6.nonmin.cjs +15 -3
- package/jssm.d.ts +1 -1
- package/jssm_types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -20654,7 +20654,7 @@ var jssm = (function (exports) {
|
|
|
20654
20654
|
named_colors: named_colors$1
|
|
20655
20655
|
});
|
|
20656
20656
|
|
|
20657
|
-
const version = "5.
|
|
20657
|
+
const version = "5.98.0", build_time = 1711419354245;
|
|
20658
20658
|
|
|
20659
20659
|
// whargarbl lots of these return arrays could/should be sets
|
|
20660
20660
|
const { shapes, gviz_shapes, named_colors } = constants;
|
|
@@ -20773,11 +20773,10 @@ var jssm = (function (exports) {
|
|
|
20773
20773
|
// TODO add a lotta docblock here
|
|
20774
20774
|
class Machine {
|
|
20775
20775
|
// whargarbl this badly needs to be broken up, monolith master
|
|
20776
|
-
constructor({ start_states, end_states = [], complete = [], transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, property_definition, state_property, fsl_version, dot_preamble = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = ['default'], flow = 'down', graph_layout = 'dot', instance_name, history, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, allows_override, config_allows_override, rng_seed, time_source, timeout_source, clear_timeout_source }) {
|
|
20776
|
+
constructor({ start_states, end_states = [], initial_state, start_states_no_enforce, complete = [], transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, property_definition, state_property, fsl_version, dot_preamble = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = ['default'], flow = 'down', graph_layout = 'dot', instance_name, history, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, allows_override, config_allows_override, rng_seed, time_source, timeout_source, clear_timeout_source }) {
|
|
20777
20777
|
this._time_source = () => new Date().getTime();
|
|
20778
20778
|
this._create_started = this._time_source();
|
|
20779
20779
|
this._instance_name = instance_name;
|
|
20780
|
-
this._state = start_states[0];
|
|
20781
20780
|
this._states = new Map();
|
|
20782
20781
|
this._state_declarations = new Map();
|
|
20783
20782
|
this._edges = [];
|
|
@@ -20999,6 +20998,19 @@ var jssm = (function (exports) {
|
|
|
20999
20998
|
this._state_properties.set(sp.name, sp.default_value);
|
|
21000
20999
|
});
|
|
21001
21000
|
}
|
|
21001
|
+
// set initial state either from the specified or the start state list. validate admission behavior.
|
|
21002
|
+
if (initial_state) {
|
|
21003
|
+
if (!(this._states.has(initial_state))) {
|
|
21004
|
+
throw new JssmError(this, `requested start state ${initial_state} does not exist`);
|
|
21005
|
+
}
|
|
21006
|
+
if ((!(start_states_no_enforce)) && (!(start_states.includes(initial_state)))) {
|
|
21007
|
+
throw new JssmError(this, `requested start state ${initial_state} is not in start state list; add {start_states_no_enforce:true} to constructor options if desired`);
|
|
21008
|
+
}
|
|
21009
|
+
this._state = initial_state;
|
|
21010
|
+
}
|
|
21011
|
+
else {
|
|
21012
|
+
this._state = start_states[0];
|
|
21013
|
+
}
|
|
21002
21014
|
// done building, do checks
|
|
21003
21015
|
// assert all props are valid
|
|
21004
21016
|
this._state_properties.forEach((_value, key) => {
|
package/dist/jssm.es5.nonmin.cjs
CHANGED
|
@@ -20655,7 +20655,7 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
20655
20655
|
named_colors: named_colors$1
|
|
20656
20656
|
});
|
|
20657
20657
|
|
|
20658
|
-
const version = "5.
|
|
20658
|
+
const version = "5.98.0", build_time = 1711419354245;
|
|
20659
20659
|
|
|
20660
20660
|
// whargarbl lots of these return arrays could/should be sets
|
|
20661
20661
|
const { shapes, gviz_shapes, named_colors } = constants;
|
|
@@ -20774,11 +20774,10 @@ function state_style_condense(jssk) {
|
|
|
20774
20774
|
// TODO add a lotta docblock here
|
|
20775
20775
|
class Machine {
|
|
20776
20776
|
// whargarbl this badly needs to be broken up, monolith master
|
|
20777
|
-
constructor({ start_states, end_states = [], complete = [], transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, property_definition, state_property, fsl_version, dot_preamble = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = ['default'], flow = 'down', graph_layout = 'dot', instance_name, history, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, allows_override, config_allows_override, rng_seed, time_source, timeout_source, clear_timeout_source }) {
|
|
20777
|
+
constructor({ start_states, end_states = [], initial_state, start_states_no_enforce, complete = [], transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, state_declaration, property_definition, state_property, fsl_version, dot_preamble = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = ['default'], flow = 'down', graph_layout = 'dot', instance_name, history, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, allows_override, config_allows_override, rng_seed, time_source, timeout_source, clear_timeout_source }) {
|
|
20778
20778
|
this._time_source = () => new Date().getTime();
|
|
20779
20779
|
this._create_started = this._time_source();
|
|
20780
20780
|
this._instance_name = instance_name;
|
|
20781
|
-
this._state = start_states[0];
|
|
20782
20781
|
this._states = new Map();
|
|
20783
20782
|
this._state_declarations = new Map();
|
|
20784
20783
|
this._edges = [];
|
|
@@ -21000,6 +20999,19 @@ class Machine {
|
|
|
21000
20999
|
this._state_properties.set(sp.name, sp.default_value);
|
|
21001
21000
|
});
|
|
21002
21001
|
}
|
|
21002
|
+
// set initial state either from the specified or the start state list. validate admission behavior.
|
|
21003
|
+
if (initial_state) {
|
|
21004
|
+
if (!(this._states.has(initial_state))) {
|
|
21005
|
+
throw new JssmError(this, `requested start state ${initial_state} does not exist`);
|
|
21006
|
+
}
|
|
21007
|
+
if ((!(start_states_no_enforce)) && (!(start_states.includes(initial_state)))) {
|
|
21008
|
+
throw new JssmError(this, `requested start state ${initial_state} is not in start state list; add {start_states_no_enforce:true} to constructor options if desired`);
|
|
21009
|
+
}
|
|
21010
|
+
this._state = initial_state;
|
|
21011
|
+
}
|
|
21012
|
+
else {
|
|
21013
|
+
this._state = start_states[0];
|
|
21014
|
+
}
|
|
21003
21015
|
// done building, do checks
|
|
21004
21016
|
// assert all props are valid
|
|
21005
21017
|
this._state_properties.forEach((_value, key) => {
|