jssm 5.70.36 → 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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- 915 merges; 113 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
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
 
@@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file.
12
12
 
13
13
  Published tags:
14
14
 
15
- <a href="#5__70__35">5.70.35</a>, <a href="#5__70__34">5.70.34</a>, <a href="#5__70__33">5.70.33</a>, <a href="#5__70__32">5.70.32</a>, <a href="#5__70__31">5.70.31</a>, <a href="#5__70__30">5.70.30</a>, <a href="#5__70__29">5.70.29</a>, <a href="#5__70__28">5.70.28</a>, <a href="#5__70__27">5.70.27</a>, <a href="#5__70__26">5.70.26</a>, <a href="#5__70__25">5.70.25</a>, <a href="#5__70__24">5.70.24</a>, <a href="#5__70__23">5.70.23</a>, <a href="#5__70__22">5.70.22</a>, <a href="#5__70__21">5.70.21</a>, <a href="#5__70__20">5.70.20</a>, <a href="#5__70__19">5.70.19</a>, <a href="#5__70__18">5.70.18</a>, <a href="#5__70__16">5.70.16</a>, <a href="#5__70__15">5.70.15</a>, <a href="#5__70__14">5.70.14</a>, <a href="#5__70__13">5.70.13</a>, <a href="#5__70__12">5.70.12</a>, <a href="#5__70__11">5.70.11</a>, <a href="#5__70__10">5.70.10</a>, <a href="#5__70__9">5.70.9</a>, <a href="#5__70__8">5.70.8</a>, <a href="#5__70__7">5.70.7</a>, <a href="#5__70__6">5.70.6</a>, <a href="#5__70__5">5.70.5</a>, <a href="#5__70__4">5.70.4</a>, <a href="#5__70__3">5.70.3</a>, <a href="#5__70__2">5.70.2</a>, <a href="#5__70__1">5.70.1</a>, <a href="#5__70__0">5.70.0</a>, <a href="#5__69__4">5.69.4</a>, <a href="#5__69__3">5.69.3</a>, <a href="#5__69__2">5.69.2</a>, <a href="#5__69__0">5.69.0</a>, <a href="#5__68__0">5.68.0</a>, <a href="#5__67__2">5.67.2</a>, <a href="#5__67__0">5.67.0</a>, <a href="#5__66__0">5.66.0</a>, <a href="#5__65__14">5.65.14</a>, <a href="#5__65__12">5.65.12</a>, <a href="#5__65__11">5.65.11</a>, <a href="#5__65__10">5.65.10</a>, <a href="#5__65__9">5.65.9</a>, <a href="#5__65__8">5.65.8</a>, <a href="#5__65__7">5.65.7</a>, <a href="#5__65__5">5.65.5</a>, <a href="#5__65__4">5.65.4</a>, <a href="#5__65__3">5.65.3</a>, <a href="#5__65__2">5.65.2</a>, <a href="#5__65__1">5.65.1</a>, <a href="#5__65__0">5.65.0</a>, <a href="#5__64__2">5.64.2</a>, <a href="#5__64__1">5.64.1</a>, <a href="#5__64__0">5.64.0</a>, <a href="#5__63__0">5.63.0</a>, <a href="#5__62__0">5.62.0</a>, <a href="#5__61__4">5.61.4</a>, <a href="#5__61__3">5.61.3</a>, <a href="#5__61__2">5.61.2</a>, <a href="#5__61__1">5.61.1</a>, <a href="#5__60__4">5.60.4</a>, <a href="#5__60__3">5.60.3</a>, <a href="#5__60__0">5.60.0</a>, <a href="#5__59__1">5.59.1</a>, <a href="#5__59__0">5.59.0</a>, <a href="#5__58__1">5.58.1</a>, <a href="#5__58__0">5.58.0</a>, <a href="#5__57__1">5.57.1</a>, <a href="#5__57__0">5.57.0</a>, <a href="#5__56__2">5.56.2</a>, <a href="#5__56__1">5.56.1</a>, <a href="#5__55__0">5.55.0</a>, <a href="#5__54__0">5.54.0</a>, <a href="#5__53__0">5.53.0</a>, <a href="#5__52__0">5.52.0</a>, <a href="#5__51__0">5.51.0</a>, <a href="#5__50__0">5.50.0</a>, <a href="#5__49__0">5.49.0</a>, <a href="#5__48__0">5.48.0</a>, <a href="#5__47__0">5.47.0</a>, <a href="#5__46__0">5.46.0</a>, <a href="#5__45__2">5.45.2</a>, <a href="#5__45__0">5.45.0</a>, <a href="#5__44__0">5.44.0</a>, <a href="#5__43__2">5.43.2</a>, <a href="#v5__42__0">v5.42.0</a>, <a href="#5__42__0">5.42.0</a>, <a href="#v5__41__15">v5.41.15</a>, <a href="#5__41__15">5.41.15</a>, <a href="#v5__41__14">v5.41.14</a>, <a href="#5__41__14">5.41.14</a>, <a href="#v5__41__12">v5.41.12</a>, <a href="#5__41__12">5.41.12</a>, <a href="#v5__41__10">v5.41.10</a>, <a href="#5__41__10">5.41.10</a>, <a href="#v5__41__9">v5.41.9</a>, <a href="#5__41__9">5.41.9</a>, <a href="#v5__41__8">v5.41.8</a>, <a href="#5__41__8">5.41.8</a>, <a href="#v5__41__7">v5.41.7</a>, <a href="#v5__41__2">v5.41.2</a>, <a href="#v5__41__1">v5.41.1</a>, <a href="#v5__32__14">v5.32.14</a>, <a href="#5__14__0">5.14.0</a>, <a href="#5__12__0">5.12.0</a>, <a href="#5__11__12">5.11.12</a>, <a href="#5__11__1">5.11.1</a>, <a href="#5__11__0">5.11.0</a>
15
+ <a href="#5__70__36">5.70.36</a>, <a href="#5__70__35">5.70.35</a>, <a href="#5__70__34">5.70.34</a>, <a href="#5__70__33">5.70.33</a>, <a href="#5__70__32">5.70.32</a>, <a href="#5__70__31">5.70.31</a>, <a href="#5__70__30">5.70.30</a>, <a href="#5__70__29">5.70.29</a>, <a href="#5__70__28">5.70.28</a>, <a href="#5__70__27">5.70.27</a>, <a href="#5__70__26">5.70.26</a>, <a href="#5__70__25">5.70.25</a>, <a href="#5__70__24">5.70.24</a>, <a href="#5__70__23">5.70.23</a>, <a href="#5__70__22">5.70.22</a>, <a href="#5__70__21">5.70.21</a>, <a href="#5__70__20">5.70.20</a>, <a href="#5__70__19">5.70.19</a>, <a href="#5__70__18">5.70.18</a>, <a href="#5__70__16">5.70.16</a>, <a href="#5__70__15">5.70.15</a>, <a href="#5__70__14">5.70.14</a>, <a href="#5__70__13">5.70.13</a>, <a href="#5__70__12">5.70.12</a>, <a href="#5__70__11">5.70.11</a>, <a href="#5__70__10">5.70.10</a>, <a href="#5__70__9">5.70.9</a>, <a href="#5__70__8">5.70.8</a>, <a href="#5__70__7">5.70.7</a>, <a href="#5__70__6">5.70.6</a>, <a href="#5__70__5">5.70.5</a>, <a href="#5__70__4">5.70.4</a>, <a href="#5__70__3">5.70.3</a>, <a href="#5__70__2">5.70.2</a>, <a href="#5__70__1">5.70.1</a>, <a href="#5__70__0">5.70.0</a>, <a href="#5__69__4">5.69.4</a>, <a href="#5__69__3">5.69.3</a>, <a href="#5__69__2">5.69.2</a>, <a href="#5__69__0">5.69.0</a>, <a href="#5__68__0">5.68.0</a>, <a href="#5__67__2">5.67.2</a>, <a href="#5__67__0">5.67.0</a>, <a href="#5__66__0">5.66.0</a>, <a href="#5__65__14">5.65.14</a>, <a href="#5__65__12">5.65.12</a>, <a href="#5__65__11">5.65.11</a>, <a href="#5__65__10">5.65.10</a>, <a href="#5__65__9">5.65.9</a>, <a href="#5__65__8">5.65.8</a>, <a href="#5__65__7">5.65.7</a>, <a href="#5__65__5">5.65.5</a>, <a href="#5__65__4">5.65.4</a>, <a href="#5__65__3">5.65.3</a>, <a href="#5__65__2">5.65.2</a>, <a href="#5__65__1">5.65.1</a>, <a href="#5__65__0">5.65.0</a>, <a href="#5__64__2">5.64.2</a>, <a href="#5__64__1">5.64.1</a>, <a href="#5__64__0">5.64.0</a>, <a href="#5__63__0">5.63.0</a>, <a href="#5__62__0">5.62.0</a>, <a href="#5__61__4">5.61.4</a>, <a href="#5__61__3">5.61.3</a>, <a href="#5__61__2">5.61.2</a>, <a href="#5__61__1">5.61.1</a>, <a href="#5__60__4">5.60.4</a>, <a href="#5__60__3">5.60.3</a>, <a href="#5__60__0">5.60.0</a>, <a href="#5__59__1">5.59.1</a>, <a href="#5__59__0">5.59.0</a>, <a href="#5__58__1">5.58.1</a>, <a href="#5__58__0">5.58.0</a>, <a href="#5__57__1">5.57.1</a>, <a href="#5__57__0">5.57.0</a>, <a href="#5__56__2">5.56.2</a>, <a href="#5__56__1">5.56.1</a>, <a href="#5__55__0">5.55.0</a>, <a href="#5__54__0">5.54.0</a>, <a href="#5__53__0">5.53.0</a>, <a href="#5__52__0">5.52.0</a>, <a href="#5__51__0">5.51.0</a>, <a href="#5__50__0">5.50.0</a>, <a href="#5__49__0">5.49.0</a>, <a href="#5__48__0">5.48.0</a>, <a href="#5__47__0">5.47.0</a>, <a href="#5__46__0">5.46.0</a>, <a href="#5__45__2">5.45.2</a>, <a href="#5__45__0">5.45.0</a>, <a href="#5__44__0">5.44.0</a>, <a href="#5__43__2">5.43.2</a>, <a href="#v5__42__0">v5.42.0</a>, <a href="#5__42__0">5.42.0</a>, <a href="#v5__41__15">v5.41.15</a>, <a href="#5__41__15">5.41.15</a>, <a href="#v5__41__14">v5.41.14</a>, <a href="#5__41__14">5.41.14</a>, <a href="#v5__41__12">v5.41.12</a>, <a href="#5__41__12">5.41.12</a>, <a href="#v5__41__10">v5.41.10</a>, <a href="#5__41__10">5.41.10</a>, <a href="#v5__41__9">v5.41.9</a>, <a href="#5__41__9">5.41.9</a>, <a href="#v5__41__8">v5.41.8</a>, <a href="#5__41__8">5.41.8</a>, <a href="#v5__41__7">v5.41.7</a>, <a href="#v5__41__2">v5.41.2</a>, <a href="#v5__41__1">v5.41.1</a>, <a href="#v5__32__14">v5.32.14</a>, <a href="#5__14__0">5.14.0</a>, <a href="#5__12__0">5.12.0</a>, <a href="#5__11__12">5.11.12</a>, <a href="#5__11__1">5.11.1</a>, <a href="#5__11__0">5.11.0</a>
16
16
 
17
17
 
18
18
 
@@ -22,15 +22,13 @@ Published tags:
22
22
 
23
23
  &nbsp;
24
24
 
25
- <a name="5__70__35" />
26
-
27
- ## [5.70.35] - 6/19/2022 10:56:41 AM
25
+ ## [Untagged] - 6/23/2022 6:34:38 PM
28
26
 
29
- Commit [13ee9eb71ca9ab868699e535abf6ba30c8ad5829](https://github.com/StoneCypher/jssm/commit/13ee9eb71ca9ab868699e535abf6ba30c8ad5829)
27
+ Commit [1dc7c24bfb651eec57fddc902f78db796f71a6c5](https://github.com/StoneCypher/jssm/commit/1dc7c24bfb651eec57fddc902f78db796f71a6c5)
30
28
 
31
29
  Author: `John Haugeland <stonecypher@gmail.com>`
32
30
 
33
- * new trigger with replaced token - this time with a bump
31
+ * Small documentation tweaks. First attempt to lodge on deno.land
34
32
 
35
33
 
36
34
 
@@ -39,13 +37,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
39
37
 
40
38
  &nbsp;
41
39
 
42
- ## [Untagged] - 6/19/2022 10:37:04 AM
40
+ ## [Untagged] - 6/23/2022 1:41:18 PM
43
41
 
44
- Commit [b3e69d9745b92d845bedcfbc08f342997137af3d](https://github.com/StoneCypher/jssm/commit/b3e69d9745b92d845bedcfbc08f342997137af3d)
42
+ Commit [67c3240798d31933413aab27db7ea9fbb5de3b2a](https://github.com/StoneCypher/jssm/commit/67c3240798d31933413aab27db7ea9fbb5de3b2a)
45
43
 
46
44
  Author: `John Haugeland <stonecypher@gmail.com>`
47
45
 
48
- * new trigger with replaced token
46
+ * Normalize arguments to hooks, fixes StoneCypher/fsl#895; more docs
49
47
 
50
48
 
51
49
 
@@ -54,15 +52,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
54
52
 
55
53
  &nbsp;
56
54
 
57
- <a name="5__70__34" />
55
+ <a name="5__70__36" />
58
56
 
59
- ## [5.70.34] - 6/18/2022 9:40:31 PM
57
+ ## [5.70.36] - 6/21/2022 6:53:36 PM
60
58
 
61
- Commit [a0f295f060c7f08a8b10b2208dd1c95dc7f3c97a](https://github.com/StoneCypher/jssm/commit/a0f295f060c7f08a8b10b2208dd1c95dc7f3c97a)
59
+ Commit [093db23b719161e35e477cc0fe7d9f1132bc28b8](https://github.com/StoneCypher/jssm/commit/093db23b719161e35e477cc0fe7d9f1132bc28b8)
62
60
 
63
61
  Author: `John Haugeland <stonecypher@gmail.com>`
64
62
 
65
- * another trigger commit with mild doc extension
63
+ * Another trivial build - this one to cause chain publishment
66
64
 
67
65
 
68
66
 
@@ -71,15 +69,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
71
69
 
72
70
  &nbsp;
73
71
 
74
- <a name="5__70__33" />
72
+ <a name="5__70__35" />
75
73
 
76
- ## [5.70.33] - 6/18/2022 8:57:42 PM
74
+ ## [5.70.35] - 6/19/2022 10:56:41 AM
77
75
 
78
- Commit [ca254f455f2c19f21e77834e993c310e05272822](https://github.com/StoneCypher/jssm/commit/ca254f455f2c19f21e77834e993c310e05272822)
76
+ Commit [13ee9eb71ca9ab868699e535abf6ba30c8ad5829](https://github.com/StoneCypher/jssm/commit/13ee9eb71ca9ab868699e535abf6ba30c8ad5829)
79
77
 
80
78
  Author: `John Haugeland <stonecypher@gmail.com>`
81
79
 
82
- * holy another facile build for triggering, batman
80
+ * new trigger with replaced token - this time with a bump
83
81
 
84
82
 
85
83
 
@@ -88,15 +86,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
88
86
 
89
87
  &nbsp;
90
88
 
91
- <a name="5__70__32" />
92
-
93
- ## [5.70.32] - 6/18/2022 8:48:07 PM
89
+ ## [Untagged] - 6/19/2022 10:37:04 AM
94
90
 
95
- Commit [8115e8b62d8ac1cff3c7eb07afabced097f1be42](https://github.com/StoneCypher/jssm/commit/8115e8b62d8ac1cff3c7eb07afabced097f1be42)
91
+ Commit [b3e69d9745b92d845bedcfbc08f342997137af3d](https://github.com/StoneCypher/jssm/commit/b3e69d9745b92d845bedcfbc08f342997137af3d)
96
92
 
97
93
  Author: `John Haugeland <stonecypher@gmail.com>`
98
94
 
99
- * yet another small commit as a trigger, this time to get the extended diff
95
+ * new trigger with replaced token
100
96
 
101
97
 
102
98
 
@@ -105,15 +101,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
105
101
 
106
102
  &nbsp;
107
103
 
108
- <a name="5__70__31" />
104
+ <a name="5__70__34" />
109
105
 
110
- ## [5.70.31] - 6/18/2022 8:00:06 PM
106
+ ## [5.70.34] - 6/18/2022 9:40:31 PM
111
107
 
112
- Commit [de3d8a105aa85045a9f19ed46b4b3c5e5fb1e235](https://github.com/StoneCypher/jssm/commit/de3d8a105aa85045a9f19ed46b4b3c5e5fb1e235)
108
+ Commit [a0f295f060c7f08a8b10b2208dd1c95dc7f3c97a](https://github.com/StoneCypher/jssm/commit/a0f295f060c7f08a8b10b2208dd1c95dc7f3c97a)
113
109
 
114
110
  Author: `John Haugeland <stonecypher@gmail.com>`
115
111
 
116
- * another small commit as a trigger, this time to get the diff
112
+ * another trigger commit with mild doc extension
117
113
 
118
114
 
119
115
 
@@ -122,15 +118,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
122
118
 
123
119
  &nbsp;
124
120
 
125
- <a name="5__70__30" />
121
+ <a name="5__70__33" />
126
122
 
127
- ## [5.70.30] - 6/18/2022 10:54:02 AM
123
+ ## [5.70.33] - 6/18/2022 8:57:42 PM
128
124
 
129
- Commit [3211f94bb943a63ae07f202eb168916d73f94f90](https://github.com/StoneCypher/jssm/commit/3211f94bb943a63ae07f202eb168916d73f94f90)
125
+ Commit [ca254f455f2c19f21e77834e993c310e05272822](https://github.com/StoneCypher/jssm/commit/ca254f455f2c19f21e77834e993c310e05272822)
130
126
 
131
127
  Author: `John Haugeland <stonecypher@gmail.com>`
132
128
 
133
- * missing closing div tag was breaking examples page
129
+ * holy another facile build for triggering, batman
134
130
 
135
131
 
136
132
 
@@ -139,15 +135,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
139
135
 
140
136
  &nbsp;
141
137
 
142
- <a name="5__70__29" />
138
+ <a name="5__70__32" />
143
139
 
144
- ## [5.70.29] - 6/18/2022 8:40:30 AM
140
+ ## [5.70.32] - 6/18/2022 8:48:07 PM
145
141
 
146
- Commit [7373cfa90383dc2adbe0649be86cb89bef1c0518](https://github.com/StoneCypher/jssm/commit/7373cfa90383dc2adbe0649be86cb89bef1c0518)
142
+ Commit [8115e8b62d8ac1cff3c7eb07afabced097f1be42](https://github.com/StoneCypher/jssm/commit/8115e8b62d8ac1cff3c7eb07afabced097f1be42)
147
143
 
148
144
  Author: `John Haugeland <stonecypher@gmail.com>`
149
145
 
150
- * One more build to trigger remote.
146
+ * yet another small commit as a trigger, this time to get the extended diff
151
147
 
152
148
 
153
149
 
@@ -156,15 +152,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
156
152
 
157
153
  &nbsp;
158
154
 
159
- <a name="5__70__28" />
155
+ <a name="5__70__31" />
160
156
 
161
- ## [5.70.28] - 6/18/2022 8:21:21 AM
157
+ ## [5.70.31] - 6/18/2022 8:00:06 PM
162
158
 
163
- Commit [9a95a6b865b1d517859c45f0b525bbebed6af5e3](https://github.com/StoneCypher/jssm/commit/9a95a6b865b1d517859c45f0b525bbebed6af5e3)
159
+ Commit [de3d8a105aa85045a9f19ed46b4b3c5e5fb1e235](https://github.com/StoneCypher/jssm/commit/de3d8a105aa85045a9f19ed46b4b3c5e5fb1e235)
164
160
 
165
161
  Author: `John Haugeland <stonecypher@gmail.com>`
166
162
 
167
- * Believed to be final triggering build
163
+ * another small commit as a trigger, this time to get the diff
168
164
 
169
165
 
170
166
 
@@ -173,12 +169,12 @@ Author: `John Haugeland <stonecypher@gmail.com>`
173
169
 
174
170
  &nbsp;
175
171
 
176
- <a name="5__70__27" />
172
+ <a name="5__70__30" />
177
173
 
178
- ## [5.70.27] - 6/18/2022 8:05:30 AM
174
+ ## [5.70.30] - 6/18/2022 10:54:02 AM
179
175
 
180
- Commit [5cb795f450f141c3f743b6583d7a22495e945864](https://github.com/StoneCypher/jssm/commit/5cb795f450f141c3f743b6583d7a22495e945864)
176
+ Commit [3211f94bb943a63ae07f202eb168916d73f94f90](https://github.com/StoneCypher/jssm/commit/3211f94bb943a63ae07f202eb168916d73f94f90)
181
177
 
182
178
  Author: `John Haugeland <stonecypher@gmail.com>`
183
179
 
184
- * one more facile doc commit to trigger a remote build, maybe there, definitely close
180
+ * missing closing div tag was breaking examples page
@@ -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
  }
@@ -1287,7 +1278,7 @@ class Machine {
1287
1278
  transition_impl(newStateOrAction, newData, wasForced, wasAction) {
1288
1279
  // TODO the forced-ness behavior needs to be cleaned up a lot here
1289
1280
  // TODO all the callbacks are wrong on forced, action, etc
1290
- let valid = false, trans_type, newState;
1281
+ let valid = false, trans_type, newState, fromAction = undefined;
1291
1282
  if (wasForced) {
1292
1283
  if (this.valid_force_transition(newStateOrAction, newData)) {
1293
1284
  valid = true;
@@ -1301,6 +1292,7 @@ class Machine {
1301
1292
  valid = true;
1302
1293
  trans_type = edge.kind;
1303
1294
  newState = edge.to;
1295
+ fromAction = newStateOrAction;
1304
1296
  }
1305
1297
  }
1306
1298
  else {
@@ -1316,24 +1308,25 @@ class Machine {
1316
1308
  // todo major incomplete whargarbl comeback
1317
1309
  if (valid) {
1318
1310
  if (this._has_hooks) {
1311
+ const hook_args = { data: this._data, action: fromAction, from: this._state, to: newState, forced: wasForced };
1319
1312
  if (wasAction) {
1320
1313
  // 1. any action hook
1321
1314
  if (this._any_action_hook !== undefined) {
1322
- if (this._any_action_hook() === false) {
1315
+ if (this._any_action_hook(hook_args) === false) {
1323
1316
  return false;
1324
1317
  }
1325
1318
  }
1326
1319
  // 2. global specific action hook
1327
1320
  const maybe_ga_hook = this._global_action_hooks.get(newStateOrAction);
1328
1321
  if (maybe_ga_hook !== undefined) {
1329
- if (maybe_ga_hook({ action: newStateOrAction, forced: wasForced }) === false) {
1322
+ if (maybe_ga_hook(hook_args) === false) {
1330
1323
  return false;
1331
1324
  }
1332
1325
  }
1333
1326
  }
1334
1327
  // 3. any transition hook
1335
1328
  if (this._any_transition_hook !== undefined) {
1336
- if (this._any_transition_hook() === false) {
1329
+ if (this._any_transition_hook(hook_args) === false) {
1337
1330
  return false;
1338
1331
  }
1339
1332
  }
@@ -1341,7 +1334,7 @@ class Machine {
1341
1334
  if (this._has_exit_hooks) {
1342
1335
  const maybe_ex_hook = this._exit_hooks.get(this._state);
1343
1336
  if (maybe_ex_hook !== undefined) {
1344
- if (maybe_ex_hook({ from: this._state, forced: wasForced }) === false) {
1337
+ if (maybe_ex_hook(hook_args) === false) {
1345
1338
  return false;
1346
1339
  }
1347
1340
  }
@@ -1351,7 +1344,7 @@ class Machine {
1351
1344
  if (wasAction) {
1352
1345
  const nhn = named_hook_name(this._state, newState, newStateOrAction), n_maybe_hook = this._named_hooks.get(nhn);
1353
1346
  if (n_maybe_hook !== undefined) {
1354
- if (n_maybe_hook({ from: this._state, to: newState, action: newStateOrAction }) === false) {
1347
+ if (n_maybe_hook(hook_args) === false) {
1355
1348
  return false;
1356
1349
  }
1357
1350
  }
@@ -1361,7 +1354,7 @@ class Machine {
1361
1354
  if (this._has_basic_hooks) {
1362
1355
  const hn = hook_name(this._state, newState), maybe_hook = this._hooks.get(hn);
1363
1356
  if (maybe_hook !== undefined) {
1364
- if (maybe_hook({ from: this._state, to: newState, forced: wasForced, action: wasAction ? newStateOrAction : undefined }) === false) {
1357
+ if (maybe_hook(hook_args) === false) {
1365
1358
  return false;
1366
1359
  }
1367
1360
  }
@@ -1372,7 +1365,7 @@ class Machine {
1372
1365
  if (this._standard_transition_hook !== undefined) {
1373
1366
  // todo handle actions
1374
1367
  // todo handle forced
1375
- if (this._standard_transition_hook({ from: this._state, to: newState }) === false) {
1368
+ if (this._standard_transition_hook(hook_args) === false) {
1376
1369
  return false;
1377
1370
  }
1378
1371
  }
@@ -1382,7 +1375,7 @@ class Machine {
1382
1375
  if (this._main_transition_hook !== undefined) {
1383
1376
  // todo handle actions
1384
1377
  // todo handle forced
1385
- if (this._main_transition_hook({ from: this._state, to: newState }) === false) {
1378
+ if (this._main_transition_hook(hook_args) === false) {
1386
1379
  return false;
1387
1380
  }
1388
1381
  }
@@ -1392,7 +1385,7 @@ class Machine {
1392
1385
  if (this._forced_transition_hook !== undefined) {
1393
1386
  // todo handle actions
1394
1387
  // todo handle forced
1395
- if (this._forced_transition_hook({ from: this._state, to: newState }) === false) {
1388
+ if (this._forced_transition_hook(hook_args) === false) {
1396
1389
  return false;
1397
1390
  }
1398
1391
  }
@@ -1401,7 +1394,7 @@ class Machine {
1401
1394
  if (this._has_entry_hooks) {
1402
1395
  const maybe_en_hook = this._entry_hooks.get(newState);
1403
1396
  if (maybe_en_hook !== undefined) {
1404
- if (maybe_en_hook({ to: newState, forced: wasForced }) === false) {
1397
+ if (maybe_en_hook(hook_args) === false) {
1405
1398
  return false;
1406
1399
  }
1407
1400
  }
@@ -1,2 +1,2 @@
1
- const version = "5.70.36";
1
+ const version = "5.72.0";
2
2
  export { version };