jssm 5.86.1 → 5.86.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/jssm.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare type StateType = string;
2
2
  import { JssmGenericState, JssmGenericConfig, JssmStateConfig, JssmTransition, JssmTransitionList, // JssmTransitionRule,
3
- JssmMachineInternalState, JssmStateDeclaration, JssmStateStyleKeyList, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslDirections, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult } from './jssm_types';
3
+ JssmMachineInternalState, JssmAllowsOverride, JssmStateDeclaration, JssmStateStyleKeyList, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslDirections, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult } from './jssm_types';
4
4
  import { arrow_direction, arrow_left_kind, arrow_right_kind } from './jssm_arrow';
5
5
  import { compile, make, wrap_parse } from './jssm_compiler';
6
6
  import { seq, unique, find_repeated, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key } from './jssm_util';
@@ -74,7 +74,8 @@ declare class Machine<mDT> {
74
74
  _has_post_exit_hooks: boolean;
75
75
  _has_post_global_action_hooks: boolean;
76
76
  _has_post_transition_hooks: boolean;
77
- _allows_override: boolean;
77
+ _code_allows_override: JssmAllowsOverride;
78
+ _config_allows_override: JssmAllowsOverride;
78
79
  _post_hooks: Map<string, HookHandler<mDT>>;
79
80
  _post_named_hooks: Map<string, HookHandler<mDT>>;
80
81
  _post_entry_hooks: Map<string, HookHandler<mDT>>;
@@ -98,7 +99,7 @@ declare class Machine<mDT> {
98
99
  _start_state_style: JssmStateConfig;
99
100
  _end_state_style: JssmStateConfig;
100
101
  _state_labels: Map<string, string>;
101
- 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, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout, 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 }: JssmGenericConfig<StateType, mDT>);
102
+ 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, arrange_declaration, arrange_start_declaration, arrange_end_declaration, theme, flow, graph_layout, 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 }: JssmGenericConfig<StateType, mDT>);
102
103
  /********
103
104
  *
104
105
  * Internal method for fabricating states. Not meant for external use.
@@ -484,12 +485,24 @@ declare class Machine<mDT> {
484
485
  list_actions(): Array<StateType>;
485
486
  get uses_actions(): boolean;
486
487
  get uses_forced_transitions(): boolean;
488
+ /*********
489
+ *
490
+ * Check if the code that built the machine allows overriding state and data.
491
+ *
492
+ */
493
+ get code_allows_override(): JssmAllowsOverride;
494
+ /*********
495
+ *
496
+ * Check if the machine config allows overriding state and data.
497
+ *
498
+ */
499
+ get config_allows_override(): JssmAllowsOverride;
487
500
  /*********
488
501
  *
489
502
  * Check if a machine allows overriding state and data.
490
503
  *
491
504
  */
492
- get allows_override(): boolean;
505
+ get allows_override(): JssmAllowsOverride;
493
506
  all_themes(): FslTheme[];
494
507
  get themes(): FslTheme | FslTheme[];
495
508
  set themes(to: FslTheme | FslTheme[]);
package/jssm_types.d.ts CHANGED
@@ -24,6 +24,7 @@ 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 JssmAllowsOverride = true | false | undefined;
27
28
  declare const FslDirections: readonly ["up", "right", "down", "left"];
28
29
  declare type FslDirection = typeof FslDirections[number];
29
30
  declare const FslThemes: readonly ["default", "ocean", "modern", "plain", "bold"];
@@ -190,6 +191,8 @@ declare type JssmGenericConfig<StateType, DataType> = {
190
191
  allow_force?: false;
191
192
  actions?: JssmPermittedOpt;
192
193
  simplify_bidi?: boolean;
194
+ allows_override?: JssmAllowsOverride;
195
+ config_allows_override?: JssmAllowsOverride;
193
196
  dot_preamble?: string;
194
197
  start_states: Array<StateType>;
195
198
  end_states?: Array<StateType>;
@@ -354,4 +357,4 @@ declare type JssmErrorExtendedInfo = {
354
357
  requested_state?: StateType | undefined;
355
358
  };
356
359
  declare type JssmHistory<mDT> = circular_buffer<[StateType, mDT]>;
357
- 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 };
360
+ 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, JssmAllowsOverride, JssmParseFunctionType, JssmMachineInternalState, JssmErrorExtendedInfo, FslDirections, FslDirection, FslThemes, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.86.1",
3
+ "version": "5.86.2",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },