jssm 5.71.1 → 5.72.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 +17 -19
- package/dist/es6/jssm.d.ts +2 -1
- package/dist/es6/jssm.js +3 -12
- 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 +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
918 merges; 114 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -18,6 +18,21 @@ Published tags:
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [Untagged] - 6/23/2022 6:34:38 PM
|
|
26
|
+
|
|
27
|
+
Commit [1dc7c24bfb651eec57fddc902f78db796f71a6c5](https://github.com/StoneCypher/jssm/commit/1dc7c24bfb651eec57fddc902f78db796f71a6c5)
|
|
28
|
+
|
|
29
|
+
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
30
|
+
|
|
31
|
+
* Small documentation tweaks. First attempt to lodge on deno.land
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
21
36
|
|
|
22
37
|
|
|
23
38
|
|
|
@@ -162,21 +177,4 @@ Commit [3211f94bb943a63ae07f202eb168916d73f94f90](https://github.com/StoneCypher
|
|
|
162
177
|
|
|
163
178
|
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
164
179
|
|
|
165
|
-
* missing closing div tag was breaking examples page
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<a name="5__70__29" />
|
|
175
|
-
|
|
176
|
-
## [5.70.29] - 6/18/2022 8:40:30 AM
|
|
177
|
-
|
|
178
|
-
Commit [7373cfa90383dc2adbe0649be86cb89bef1c0518](https://github.com/StoneCypher/jssm/commit/7373cfa90383dc2adbe0649be86cb89bef1c0518)
|
|
179
|
-
|
|
180
|
-
Author: `John Haugeland <stonecypher@gmail.com>`
|
|
181
|
-
|
|
182
|
-
* One more build to trigger remote.
|
|
180
|
+
* missing closing div tag was breaking examples page
|
package/dist/es6/jssm.d.ts
CHANGED
|
@@ -208,6 +208,7 @@ declare class Machine<mDT> {
|
|
|
208
208
|
_raw_state_declaration?: Array<Object>;
|
|
209
209
|
_state_declarations: Map<StateType, JssmStateDeclaration>;
|
|
210
210
|
_instance_name: string;
|
|
211
|
+
_data?: mDT;
|
|
211
212
|
_graph_layout: JssmLayout;
|
|
212
213
|
_dot_preamble: string;
|
|
213
214
|
_arrange_declaration: Array<Array<StateType>>;
|
|
@@ -232,7 +233,7 @@ declare class Machine<mDT> {
|
|
|
232
233
|
_main_transition_hook: HookHandler | undefined;
|
|
233
234
|
_forced_transition_hook: HookHandler | undefined;
|
|
234
235
|
_any_transition_hook: HookHandler | undefined;
|
|
235
|
-
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, instance_name }: JssmGenericConfig<mDT>);
|
|
236
|
+
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, instance_name, data }: JssmGenericConfig<mDT>);
|
|
236
237
|
/********
|
|
237
238
|
*
|
|
238
239
|
* Internal method for fabricating states. Not meant for external use.
|
package/dist/es6/jssm.js
CHANGED
|
@@ -534,7 +534,7 @@ function transfer_state_properties(state_decl) {
|
|
|
534
534
|
// TODO add a lotta docblock here
|
|
535
535
|
class Machine {
|
|
536
536
|
// whargarbl this badly needs to be broken up, monolith master
|
|
537
|
-
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 = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = 'default', flow = 'down', graph_layout = 'dot', instance_name }) {
|
|
537
|
+
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 = undefined, arrange_declaration = [], arrange_start_declaration = [], arrange_end_declaration = [], theme = 'default', flow = 'down', graph_layout = 'dot', instance_name, data }) {
|
|
538
538
|
this._instance_name = instance_name;
|
|
539
539
|
this._state = start_states[0];
|
|
540
540
|
this._states = new Map();
|
|
@@ -581,6 +581,7 @@ class Machine {
|
|
|
581
581
|
this._forced_transition_hook = undefined;
|
|
582
582
|
this._any_transition_hook = undefined;
|
|
583
583
|
this._standard_transition_hook = undefined;
|
|
584
|
+
this._data = data;
|
|
584
585
|
if (state_declaration) {
|
|
585
586
|
state_declaration.map((state_decl) => {
|
|
586
587
|
if (this._state_declarations.has(state_decl.state)) { // no repeats
|
|
@@ -1229,52 +1230,42 @@ class Machine {
|
|
|
1229
1230
|
}
|
|
1230
1231
|
}
|
|
1231
1232
|
hook(from, to, handler) {
|
|
1232
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1233
1233
|
this.set_hook({ kind: 'hook', from, to, handler });
|
|
1234
1234
|
return this;
|
|
1235
1235
|
}
|
|
1236
1236
|
hook_action(from, to, action, handler) {
|
|
1237
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1238
1237
|
this.set_hook({ kind: 'named', from, to, action, handler });
|
|
1239
1238
|
return this;
|
|
1240
1239
|
}
|
|
1241
1240
|
hook_global_action(action, handler) {
|
|
1242
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1243
1241
|
this.set_hook({ kind: 'global action', action, handler });
|
|
1244
1242
|
return this;
|
|
1245
1243
|
}
|
|
1246
1244
|
hook_any_action(handler) {
|
|
1247
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1248
1245
|
this.set_hook({ kind: 'any action', handler });
|
|
1249
1246
|
return this;
|
|
1250
1247
|
}
|
|
1251
1248
|
hook_standard_transition(handler) {
|
|
1252
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1253
1249
|
this.set_hook({ kind: 'standard transition', handler });
|
|
1254
1250
|
return this;
|
|
1255
1251
|
}
|
|
1256
1252
|
hook_main_transition(handler) {
|
|
1257
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1258
1253
|
this.set_hook({ kind: 'main transition', handler });
|
|
1259
1254
|
return this;
|
|
1260
1255
|
}
|
|
1261
1256
|
hook_forced_transition(handler) {
|
|
1262
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1263
1257
|
this.set_hook({ kind: 'forced transition', handler });
|
|
1264
1258
|
return this;
|
|
1265
1259
|
}
|
|
1266
1260
|
hook_any_transition(handler) {
|
|
1267
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1268
1261
|
this.set_hook({ kind: 'any transition', handler });
|
|
1269
1262
|
return this;
|
|
1270
1263
|
}
|
|
1271
1264
|
hook_entry(to, handler) {
|
|
1272
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1273
1265
|
this.set_hook({ kind: 'entry', to, handler });
|
|
1274
1266
|
return this;
|
|
1275
1267
|
}
|
|
1276
1268
|
hook_exit(from, handler) {
|
|
1277
|
-
// TODO: should this throw if setting the hook fails, or ignore it and continue?
|
|
1278
1269
|
this.set_hook({ kind: 'exit', from, handler });
|
|
1279
1270
|
return this;
|
|
1280
1271
|
}
|
|
@@ -1317,7 +1308,7 @@ class Machine {
|
|
|
1317
1308
|
// todo major incomplete whargarbl comeback
|
|
1318
1309
|
if (valid) {
|
|
1319
1310
|
if (this._has_hooks) {
|
|
1320
|
-
const hook_args = { action: fromAction, from: this._state, to: newState, forced: wasForced };
|
|
1311
|
+
const hook_args = { data: this._data, action: fromAction, from: this._state, to: newState, forced: wasForced };
|
|
1321
1312
|
if (wasAction) {
|
|
1322
1313
|
// 1. any action hook
|
|
1323
1314
|
if (this._any_action_hook !== undefined) {
|
package/dist/es6/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const version = "5.
|
|
1
|
+
const version = "5.72.0";
|
|
2
2
|
export { version };
|