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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- 1037 merges; 148 releases; Changlogging the last 10 commits; Full changelog at [CHANGELOG.long.md](CHANGELOG.long.md)
5
+ 1026 merges; 5 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__80__1">5.80.1</a>, <a href="#5__80__0">5.80.0</a>, <a href="#5__79__18">5.79.18</a>, <a href="#5__79__17">5.79.17</a>, <a href="#5__79__16">5.79.16</a>, <a href="#5__79__15">5.79.15</a>, <a href="#5__79__11">5.79.11</a>, <a href="#5__79__10">5.79.10</a>, <a href="#5__79__9">5.79.9</a>, <a href="#5__79__8">5.79.8</a>, <a href="#5__79__6">5.79.6</a>, <a href="#5__79__4">5.79.4</a>, <a href="#5__79__3">5.79.3</a>, <a href="#5__79__2">5.79.2</a>, <a href="#5__79__1">5.79.1</a>, <a href="#5__79__0">5.79.0</a>, <a href="#5__78__0">5.78.0</a>, <a href="#5__77__1">5.77.1</a>, <a href="#5__77__0">5.77.0</a>, <a href="#5__76__2">5.76.2</a>, <a href="#5__76__0">5.76.0</a>, <a href="#5__75__1">5.75.1</a>, <a href="#5__75__0">5.75.0</a>, <a href="#5__74__0">5.74.0</a>, <a href="#5__73__1">5.73.1</a>, <a href="#5__73__0">5.73.0</a>, <a href="#5__72__5">5.72.5</a>, <a href="#5__72__4">5.72.4</a>, <a href="#5__72__3">5.72.3</a>, <a href="#5__72__2">5.72.2</a>, <a href="#5__72__1">5.72.1</a>, <a href="#5__72__0">5.72.0</a>, <a href="#5__71__1">5.71.1</a>, <a href="#5__71__0">5.71.0</a>, <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>
15
+ <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,13 +22,13 @@ Published tags:
22
22
 
23
23
  &nbsp;
24
24
 
25
- ## [Untagged] - 8/19/2022 8:44:55 PM
25
+ ## [Untagged] - 9/1/2022 4:53:34 PM
26
26
 
27
- Commit [2cf5a3f8121a68db58bba992e85b95a8b0e6315e](https://github.com/StoneCypher/jssm/commit/2cf5a3f8121a68db58bba992e85b95a8b0e6315e)
27
+ Commit [07e19355674ecf8c44ceb54f31cafebefdf08921](https://github.com/StoneCypher/jssm/commit/07e19355674ecf8c44ceb54f31cafebefdf08921)
28
28
 
29
- Author: `John Haugeland <stonecypher@gmail.com>`
29
+ Author: `Vat Raghavan <machinshin@gmail.com>`
30
30
 
31
- * coverage pass prior to multitheme
31
+ * relative link to code in Shootout.md
32
32
 
33
33
 
34
34
 
@@ -37,13 +37,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
37
37
 
38
38
  &nbsp;
39
39
 
40
- ## [Untagged] - 8/18/2022 10:12:07 PM
40
+ ## [Untagged] - 9/1/2022 4:47:48 PM
41
41
 
42
- Commit [2f81a2682202a239acc8acbefe0360e3481c8ca9](https://github.com/StoneCypher/jssm/commit/2f81a2682202a239acc8acbefe0360e3481c8ca9)
42
+ Commit [223713ea6a253834711cd8bd61ffc35598bc63a4](https://github.com/StoneCypher/jssm/commit/223713ea6a253834711cd8bd61ffc35598bc63a4)
43
43
 
44
- Author: `John Haugeland <stonecypher@gmail.com>`
44
+ Author: `Vat Raghavan <machinshin@gmail.com>`
45
45
 
46
- * draft themes in place
46
+ Merges [da69e65, a781f59]
47
+
48
+ * WIP on main: da69e65 re-enable stoch testing, fixes StoneCypher/fsl#1187; replace .replaceAll with .replace, fixes StoneCypher/fsl#1188
47
49
 
48
50
 
49
51
 
@@ -52,13 +54,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
52
54
 
53
55
  &nbsp;
54
56
 
55
- ## [Untagged] - 8/17/2022 10:02:39 PM
57
+ ## [Untagged] - 9/1/2022 4:47:48 PM
56
58
 
57
- Commit [9209392cd7e025b365da88aa29649c63b241074d](https://github.com/StoneCypher/jssm/commit/9209392cd7e025b365da88aa29649c63b241074d)
59
+ Commit [a781f59bc5ca472f7d5927b4e1ff5b46e66b6bfb](https://github.com/StoneCypher/jssm/commit/a781f59bc5ca472f7d5927b4e1ff5b46e66b6bfb)
58
60
 
59
- Author: `John Haugeland <stonecypher@gmail.com>`
61
+ Author: `Vat Raghavan <machinshin@gmail.com>`
60
62
 
61
- * mostly done, just have to surface the themes then do testing
63
+ * index on main: da69e65 re-enable stoch testing, fixes StoneCypher/fsl#1187; replace .replaceAll with .replace, fixes StoneCypher/fsl#1188
62
64
 
63
65
 
64
66
 
@@ -67,13 +69,15 @@ Author: `John Haugeland <stonecypher@gmail.com>`
67
69
 
68
70
  &nbsp;
69
71
 
70
- ## [Untagged] - 8/14/2022 4:22:34 PM
72
+ ## [Untagged] - 9/1/2022 4:37:55 PM
71
73
 
72
- Commit [72d6ef77839234d9763ba3c5e667f0eb5ef43951](https://github.com/StoneCypher/jssm/commit/72d6ef77839234d9763ba3c5e667f0eb5ef43951)
74
+ Commit [081f1c50b8c73ffbfc46588c3fe27f2103841f4e](https://github.com/StoneCypher/jssm/commit/081f1c50b8c73ffbfc46588c3fe27f2103841f4e)
73
75
 
74
- Author: `John Haugeland <stonecypher@gmail.com>`
76
+ Author: `Vat Raghavan <machinshin@gmail.com>`
77
+
78
+ Merges [9e18022, 7e48176]
75
79
 
76
- * Clarify composite style type before we start work on themes
80
+ * WIP on feature/new-readme: 9e18022 more-readable README
77
81
 
78
82
 
79
83
 
@@ -82,13 +86,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
82
86
 
83
87
  &nbsp;
84
88
 
85
- ## [Untagged] - 8/11/2022 9:01:49 PM
89
+ ## [Untagged] - 9/1/2022 4:37:55 PM
86
90
 
87
- Commit [df1dd4c1d190b6571cf43637183b831229793eba](https://github.com/StoneCypher/jssm/commit/df1dd4c1d190b6571cf43637183b831229793eba)
91
+ Commit [7e481765d45ab7950adabfc11d98b866baa71ec5](https://github.com/StoneCypher/jssm/commit/7e481765d45ab7950adabfc11d98b866baa71ec5)
88
92
 
89
- Author: `John Haugeland <stonecypher@gmail.com>`
93
+ Author: `Vat Raghavan <machinshin@gmail.com>`
90
94
 
91
- * Small type changes preparing for theme
95
+ * index on feature/new-readme: 9e18022 more-readable README
92
96
 
93
97
 
94
98
 
@@ -97,13 +101,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
97
101
 
98
102
  &nbsp;
99
103
 
100
- ## [Untagged] - 8/10/2022 11:32:42 PM
104
+ ## [Untagged] - 9/1/2022 4:17:04 PM
101
105
 
102
- Commit [5162f2299530514aecba1bf78fbfe77910e3a417](https://github.com/StoneCypher/jssm/commit/5162f2299530514aecba1bf78fbfe77910e3a417)
106
+ Commit [da69e65ee5a1567825b011d3e17655c2dbd6261d](https://github.com/StoneCypher/jssm/commit/da69e65ee5a1567825b011d3e17655c2dbd6261d)
103
107
 
104
108
  Author: `John Haugeland <stonecypher@gmail.com>`
105
109
 
106
- * Engine and parser support for label substitution (no viz yet,) fixes StoneCypher/fsl#117; fixes StoneCypher/fsl#263
110
+ * re-enable stoch testing, fixes StoneCypher/fsl#1187; replace .replaceAll with .replace, fixes StoneCypher/fsl#1188
107
111
 
108
112
 
109
113
 
@@ -112,15 +116,13 @@ Author: `John Haugeland <stonecypher@gmail.com>`
112
116
 
113
117
  &nbsp;
114
118
 
115
- ## [Untagged] - 8/10/2022 10:25:03 PM
119
+ ## [Untagged] - 9/1/2022 3:57:04 PM
116
120
 
117
- Commit [bab9f160ae1dab672a2800c175c21fed2e74f48e](https://github.com/StoneCypher/jssm/commit/bab9f160ae1dab672a2800c175c21fed2e74f48e)
121
+ Commit [9e18022f7b474f06e30df55df254f01a0bf6ceb6](https://github.com/StoneCypher/jssm/commit/9e18022f7b474f06e30df55df254f01a0bf6ceb6)
118
122
 
119
- Author: `John Haugeland <stonecypher@gmail.com>`
120
-
121
- Merges [59e95d8, c3939c3]
123
+ Author: `Vat Raghavan <machinshin@gmail.com>`
122
124
 
123
- * Merge branch 'main' of github.com:StoneCypher/jssm
125
+ * more-readable README
124
126
 
125
127
 
126
128
 
@@ -129,33 +131,31 @@ Merges [59e95d8, c3939c3]
129
131
 
130
132
  &nbsp;
131
133
 
132
- ## [Untagged] - 8/10/2022 10:24:55 PM
134
+ ## [Untagged] - 8/20/2022 11:19:53 AM
133
135
 
134
- Commit [59e95d8d4c06a63fb51b0c886d23612a4835ccfc](https://github.com/StoneCypher/jssm/commit/59e95d8d4c06a63fb51b0c886d23612a4835ccfc)
136
+ Commit [27480ec9b23dc281db0212e68f53aabcdc8b946f](https://github.com/StoneCypher/jssm/commit/27480ec9b23dc281db0212e68f53aabcdc8b946f)
135
137
 
136
138
  Author: `John Haugeland <stonecypher@gmail.com>`
137
139
 
138
- * tests for property overriding from inline and for border lines
140
+ Merges [5278df4, 03e1ad3]
139
141
 
142
+ * Merge pull request #529 from StoneCypher/ExposeThemesAndDirections
143
+ * Expose themes and directions; fixes StoneCypher/fsl#540, fixes StoneCypher/fsl#541
140
144
 
141
145
 
142
146
 
143
- &nbsp;
144
147
 
145
148
  &nbsp;
146
149
 
147
- <a name="5__80__1" />
150
+ &nbsp;
148
151
 
149
- ## [5.80.1] - 8/7/2022 11:57:01 PM
152
+ ## [Untagged] - 8/20/2022 11:16:34 AM
150
153
 
151
- Commit [c3939c3486d8ae2338385de375d753ef5a38673d](https://github.com/StoneCypher/jssm/commit/c3939c3486d8ae2338385de375d753ef5a38673d)
154
+ Commit [03e1ad3acf5074dd570eb9a2e2001abab10fb923](https://github.com/StoneCypher/jssm/commit/03e1ad3acf5074dd570eb9a2e2001abab10fb923)
152
155
 
153
156
  Author: `John Haugeland <stonecypher@gmail.com>`
154
157
 
155
- Merges [6cb2816, b59b5b5]
156
-
157
- * Merge pull request #527 from StoneCypher/AddInlineStylesToResolver
158
- * Adds inline styles to resolver, fixes StoneCypher/fsl#1160
158
+ * Expose themes and directions; fixes StoneCypher/fsl#540, fixes StoneCypher/fsl#541
159
159
 
160
160
 
161
161
 
@@ -164,10 +164,13 @@ Merges [6cb2816, b59b5b5]
164
164
 
165
165
  &nbsp;
166
166
 
167
- ## [Untagged] - 8/7/2022 11:52:57 PM
167
+ ## [Untagged] - 8/19/2022 11:11:19 PM
168
168
 
169
- Commit [b59b5b530de566d82b6fa707d66f9b5ceb2037e8](https://github.com/StoneCypher/jssm/commit/b59b5b530de566d82b6fa707d66f9b5ceb2037e8)
169
+ Commit [5278df4d94a347b37da6cdca2a64a6ca85665b42](https://github.com/StoneCypher/jssm/commit/5278df4d94a347b37da6cdca2a64a6ca85665b42)
170
170
 
171
171
  Author: `John Haugeland <stonecypher@gmail.com>`
172
172
 
173
- * Adds inline styles to resolver, fixes StoneCypher/fsl#1160
173
+ Merges [72d6ef7, 88d7309]
174
+
175
+ * Merge pull request #528 from StoneCypher/SpinUpThemes
176
+ * Spin up themes
package/README.md CHANGED
@@ -18,7 +18,7 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
18
18
 
19
19
 
20
20
 
21
- * Generated for version 5.82.0 at 8/19/2022, 11:01:13 PM
21
+ * Generated for version 5.82.3 at 9/1/2022, 5:03:43 PM
22
22
 
23
23
  -->
24
24
  # jssm
@@ -29,7 +29,7 @@ share online. Easy to embed.
29
29
 
30
30
  Readable, useful state machines as one-liner strings.
31
31
 
32
- ***4,837 tests*** run 5,728 times. 4,828 specs with 100.0% coverage, 9 fuzz tests with 5.4% coverage. With 2,511 lines, that's about 1.9 tests per line, or 2.3 generated tests per line.
32
+ ***4,840 tests*** run 5,731 times. 4,831 specs with 100.0% coverage, 9 fuzz tests with 11.8% coverage. With 2,612 lines, that's about 1.9 tests per line, or 2.2 generated tests per line.
33
33
 
34
34
  ***Meet your new state machine library.***
35
35
 
@@ -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
- themes(): FslTheme[];
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/dist/es6/jssm.js CHANGED
@@ -1,14 +1,17 @@
1
1
  // whargarbl lots of these return arrays could/should be sets
2
2
  import { reduce as reduce_to_639 } from 'reduce-to-639-1';
3
3
  import { circular_buffer } from 'circular_buffer_js';
4
+ import { FslDirections } from './jssm_types';
4
5
  import { base_theme } from './themes/jssm_base_stylesheet';
5
6
  import { default_theme } from './themes/jssm_theme_default';
6
7
  import { modern_theme } from './themes/jssm_theme_modern';
7
8
  import { ocean_theme } from './themes/jssm_theme_ocean';
9
+ import { plain_theme } from './themes/jssm_theme_plain';
8
10
  const theme_mapping = new Map();
9
11
  theme_mapping.set('default', default_theme);
10
12
  theme_mapping.set('modern', modern_theme);
11
13
  theme_mapping.set('ocean', ocean_theme);
14
+ theme_mapping.set('plain', plain_theme);
12
15
  import { seq, unique, find_repeated, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key, array_box_if_string, name_bind_prop_and_state, hook_name, named_hook_name } from './jssm_util';
13
16
  import * as constants from './jssm_constants';
14
17
  const { shapes, gviz_shapes, named_colors } = constants;
@@ -1387,9 +1390,20 @@ class Machine {
1387
1390
  list_actions() {
1388
1391
  return Array.from(this._actions.keys());
1389
1392
  }
1390
- themes() {
1393
+ all_themes() {
1394
+ return [...theme_mapping.keys()]; // constructor sets this to "default" otherwise
1395
+ }
1396
+ get themes() {
1391
1397
  return this._themes; // constructor sets this to "default" otherwise
1392
1398
  }
1399
+ set themes(to) {
1400
+ if (typeof to === 'string') {
1401
+ this._themes = [to];
1402
+ }
1403
+ else {
1404
+ this._themes = to;
1405
+ }
1406
+ }
1393
1407
  flow() {
1394
1408
  return this._flow;
1395
1409
  }
@@ -2713,4 +2727,6 @@ function deserialize(machine_string, ser) {
2713
2727
  }
2714
2728
  export { version, transfer_state_properties, Machine, deserialize, make, wrap_parse as parse, compile, sm, from, arrow_direction, arrow_left_kind, arrow_right_kind,
2715
2729
  // WHARGARBL TODO these should be exported to a utility library
2716
- 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 };
2730
+ 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
2731
+ // FslThemes
2732
+ };
@@ -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 type FslDirection = 'up' | 'right' | 'down' | 'left';
28
- declare type FslTheme = 'default' | 'ocean' | 'modern' | 'none';
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 };
@@ -1 +1,3 @@
1
- export {};
1
+ const FslDirections = ['up', 'right', 'down', 'left'];
2
+ const FslThemes = ['default', 'ocean', 'modern', 'plain'];
3
+ export { FslDirections, FslThemes };
@@ -0,0 +1,11 @@
1
+ import { JssmStateConfig, JssmBaseTheme } from '../jssm_types';
2
+ declare const base_state_style: JssmStateConfig;
3
+ declare const base_active_state_style: JssmStateConfig;
4
+ declare const base_terminal_state_style: JssmStateConfig;
5
+ declare const base_active_terminal_state_style: JssmStateConfig;
6
+ declare const base_start_state_style: JssmStateConfig;
7
+ declare const base_active_start_state_style: JssmStateConfig;
8
+ declare const base_end_state_style: JssmStateConfig;
9
+ declare const base_active_end_state_style: JssmStateConfig;
10
+ declare const plain_theme: JssmBaseTheme;
11
+ export { base_state_style, base_active_state_style, base_terminal_state_style, base_active_terminal_state_style, base_start_state_style, base_active_start_state_style, base_end_state_style, base_active_end_state_style, plain_theme, plain_theme as theme };
@@ -0,0 +1,69 @@
1
+ const base_state_style = {
2
+ textColor: 'black',
3
+ backgroundColor: 'transparent',
4
+ shape: 'plaintext'
5
+ };
6
+ const base_active_state_style = {
7
+ textColor: 'black',
8
+ backgroundColor: 'transparent',
9
+ shape: 'plaintext'
10
+ };
11
+ const base_hooked_state_style = {
12
+ textColor: 'black',
13
+ backgroundColor: 'transparent',
14
+ shape: 'plaintext'
15
+ };
16
+ const base_terminal_state_style = {
17
+ textColor: 'black',
18
+ backgroundColor: 'transparent',
19
+ shape: 'plaintext'
20
+ };
21
+ const base_active_terminal_state_style = {
22
+ textColor: 'black',
23
+ backgroundColor: 'transparent',
24
+ shape: 'plaintext'
25
+ };
26
+ const base_start_state_style = {
27
+ textColor: 'black',
28
+ backgroundColor: 'transparent',
29
+ shape: 'plaintext'
30
+ };
31
+ const base_active_start_state_style = {
32
+ textColor: 'black',
33
+ backgroundColor: 'transparent',
34
+ shape: 'plaintext'
35
+ };
36
+ const base_active_hooked_state_style = {
37
+ textColor: 'black',
38
+ backgroundColor: 'transparent',
39
+ shape: 'plaintext'
40
+ };
41
+ const base_end_state_style = {
42
+ textColor: 'black',
43
+ backgroundColor: 'transparent',
44
+ shape: 'plaintext'
45
+ };
46
+ const base_active_end_state_style = {
47
+ textColor: 'black',
48
+ backgroundColor: 'transparent',
49
+ shape: 'plaintext'
50
+ };
51
+ const plain_theme = {
52
+ state: base_state_style,
53
+ start: base_start_state_style,
54
+ end: base_end_state_style,
55
+ terminal: base_terminal_state_style,
56
+ hooked: base_hooked_state_style,
57
+ active: base_active_state_style,
58
+ active_start: base_active_start_state_style,
59
+ active_end: base_active_end_state_style,
60
+ active_terminal: base_active_terminal_state_style,
61
+ active_hooked: base_active_hooked_state_style,
62
+ legal: undefined,
63
+ main: undefined,
64
+ forced: undefined,
65
+ action: undefined,
66
+ graph: undefined,
67
+ title: undefined // TODO FIXME
68
+ };
69
+ export { base_state_style, base_active_state_style, base_terminal_state_style, base_active_terminal_state_style, base_start_state_style, base_active_start_state_style, base_end_state_style, base_active_end_state_style, plain_theme, plain_theme as theme };
@@ -1,2 +1,2 @@
1
- const version = "5.82.0";
1
+ const version = "5.82.3";
2
2
  export { version };