jssm 5.82.5 → 5.83.2

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/dist/es6/jssm.js CHANGED
@@ -7,11 +7,13 @@ import { default_theme } from './themes/jssm_theme_default';
7
7
  import { modern_theme } from './themes/jssm_theme_modern';
8
8
  import { ocean_theme } from './themes/jssm_theme_ocean';
9
9
  import { plain_theme } from './themes/jssm_theme_plain';
10
+ import { bold_theme } from './themes/jssm_theme_bold';
10
11
  const theme_mapping = new Map();
11
12
  theme_mapping.set('default', default_theme);
12
13
  theme_mapping.set('modern', modern_theme);
13
14
  theme_mapping.set('ocean', ocean_theme);
14
15
  theme_mapping.set('plain', plain_theme);
16
+ theme_mapping.set('bold', bold_theme);
15
17
  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';
16
18
  import * as constants from './jssm_constants';
17
19
  const { shapes, gviz_shapes, named_colors } = constants;
@@ -26,7 +26,7 @@ declare type JssmCorner = 'regular' | 'rounded' | 'lined';
26
26
  declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
27
27
  declare const FslDirections: readonly ["up", "right", "down", "left"];
28
28
  declare type FslDirection = typeof FslDirections[number];
29
- declare const FslThemes: readonly ["default", "ocean", "modern", "plain"];
29
+ declare const FslThemes: readonly ["default", "ocean", "modern", "plain", "bold"];
30
30
  declare type FslTheme = typeof FslThemes[number];
31
31
  declare type JssmSerialization<DataType> = {
32
32
  jssm_version: string;
@@ -154,6 +154,7 @@ declare type JssmStateStyleBorderColor = {
154
154
  declare type JssmStateStyleKey = JssmStateStyleShape | JssmStateStyleColor | JssmStateStyleTextColor | JssmStateStyleCorners | JssmStateStyleLineStyle | JssmStateStyleBackgroundColor | JssmStateStyleStateLabel | JssmStateStyleBorderColor;
155
155
  declare type JssmStateStyleKeyList = JssmStateStyleKey[];
156
156
  declare type JssmBaseTheme = {
157
+ name: string;
157
158
  state: JssmStateConfig;
158
159
  hooked: JssmStateConfig;
159
160
  start: JssmStateConfig;
@@ -1,3 +1,3 @@
1
1
  const FslDirections = ['up', 'right', 'down', 'left'];
2
- const FslThemes = ['default', 'ocean', 'modern', 'plain'];
2
+ const FslThemes = ['default', 'ocean', 'modern', 'plain', 'bold'];
3
3
  export { FslDirections, FslThemes };
@@ -1,6 +1,6 @@
1
1
  const base_state_style = {
2
2
  shape: 'rectangle',
3
- backgroundColor: 'khaki',
3
+ backgroundColor: 'white',
4
4
  textColor: 'black',
5
5
  borderColor: 'black'
6
6
  };
@@ -37,6 +37,7 @@ const base_active_end_state_style = {
37
37
  backgroundColor: 'darkgreen'
38
38
  };
39
39
  const base_theme = {
40
+ name: 'base',
40
41
  state: base_state_style,
41
42
  start: base_start_state_style,
42
43
  end: base_end_state_style,
@@ -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 bold_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, bold_theme, bold_theme as theme };
@@ -0,0 +1,58 @@
1
+ const base_state_style = {
2
+ shape: 'rectangle',
3
+ backgroundColor: 'khaki',
4
+ textColor: 'black',
5
+ borderColor: 'black'
6
+ };
7
+ const base_active_state_style = {
8
+ textColor: 'white',
9
+ backgroundColor: 'dodgerblue4'
10
+ };
11
+ const base_hooked_state_style = {
12
+ shape: 'component'
13
+ };
14
+ const base_terminal_state_style = {
15
+ textColor: 'white',
16
+ backgroundColor: 'crimson'
17
+ };
18
+ const base_active_terminal_state_style = {
19
+ textColor: 'white',
20
+ backgroundColor: 'indigo'
21
+ };
22
+ const base_start_state_style = {
23
+ backgroundColor: 'yellow'
24
+ };
25
+ const base_active_start_state_style = {
26
+ backgroundColor: 'yellowgreen'
27
+ };
28
+ const base_active_hooked_state_style = {
29
+ backgroundColor: 'yellowgreen'
30
+ };
31
+ const base_end_state_style = {
32
+ textColor: 'white',
33
+ backgroundColor: 'darkolivegreen'
34
+ };
35
+ const base_active_end_state_style = {
36
+ textColor: 'white',
37
+ backgroundColor: 'darkgreen'
38
+ };
39
+ const bold_theme = {
40
+ name: 'bold',
41
+ state: base_state_style,
42
+ start: base_start_state_style,
43
+ end: base_end_state_style,
44
+ terminal: base_terminal_state_style,
45
+ hooked: base_hooked_state_style,
46
+ active: base_active_state_style,
47
+ active_start: base_active_start_state_style,
48
+ active_end: base_active_end_state_style,
49
+ active_terminal: base_active_terminal_state_style,
50
+ active_hooked: base_active_hooked_state_style,
51
+ legal: undefined,
52
+ main: undefined,
53
+ forced: undefined,
54
+ action: undefined,
55
+ graph: undefined,
56
+ title: undefined // TODO FIXME
57
+ };
58
+ 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, bold_theme, bold_theme as theme };
@@ -1,6 +1,6 @@
1
1
  const base_state_style = {
2
2
  shape: 'rectangle',
3
- backgroundColor: 'khaki',
3
+ backgroundColor: 'white',
4
4
  textColor: 'black',
5
5
  borderColor: 'black'
6
6
  };
@@ -37,6 +37,7 @@ const base_active_end_state_style = {
37
37
  backgroundColor: 'darkgreen'
38
38
  };
39
39
  const default_theme = {
40
+ name: 'default',
40
41
  state: base_state_style,
41
42
  start: base_start_state_style,
42
43
  end: base_end_state_style,
@@ -37,6 +37,7 @@ const base_active_end_state_style = {
37
37
  backgroundColor: 'darkgreen'
38
38
  };
39
39
  const modern_theme = {
40
+ name: 'modern',
40
41
  state: base_state_style,
41
42
  start: base_start_state_style,
42
43
  end: base_end_state_style,
@@ -35,6 +35,7 @@ const base_active_end_state_style = {
35
35
  backgroundColor: 'darkgreen'
36
36
  };
37
37
  const ocean_theme = {
38
+ name: 'ocean',
38
39
  state: base_state_style,
39
40
  start: base_start_state_style,
40
41
  end: base_end_state_style,
@@ -49,6 +49,7 @@ const base_active_end_state_style = {
49
49
  shape: 'plaintext'
50
50
  };
51
51
  const plain_theme = {
52
+ name: 'plain',
52
53
  state: base_state_style,
53
54
  start: base_start_state_style,
54
55
  end: base_end_state_style,
@@ -1,2 +1,2 @@
1
- const version = "5.82.5";
1
+ const version = "5.83.2";
2
2
  export { version };