jssm 5.142.2 → 5.142.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/jssm.es5.d.cts CHANGED
@@ -51,6 +51,13 @@ declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
51
51
  * the decision to the surrounding configuration's default.
52
52
  */
53
53
  declare type JssmAllowsOverride = true | false | undefined;
54
+ /**
55
+ * Controls whether the state graph may contain disconnected components
56
+ * (islands). `true` permits islands (default), `false` requires a single
57
+ * connected component, and `'with_start'` permits islands only when every
58
+ * component contains at least one start state.
59
+ */
60
+ declare type JssmAllowIslands = true | false | 'with_start';
54
61
  /**
55
62
  * Runtime-iterable list of valid `flow` directions for FSL diagrams.
56
63
  * Use this when you need to enumerate directions; for the type itself
@@ -284,7 +291,7 @@ declare type JssmGenericConfig<StateType, DataType> = {
284
291
  history?: number;
285
292
  min_exits?: number;
286
293
  max_exits?: number;
287
- allow_islands?: false;
294
+ allow_islands?: JssmAllowIslands;
288
295
  allow_force?: false;
289
296
  actions?: JssmPermittedOpt;
290
297
  simplify_bidi?: boolean;
@@ -1390,26 +1397,6 @@ declare function transfer_state_properties(state_decl: JssmStateDeclaration): Js
1390
1397
  *
1391
1398
  */
1392
1399
  declare function state_style_condense(jssk: JssmStateStyleKeyList, machine?: any): JssmStateConfig;
1393
- /*******
1394
- *
1395
- * Core finite state machine class. Holds the full graph of states and
1396
- * transitions, the current state, hooks, data, properties, and all runtime
1397
- * behavior. Typically created via the {@link sm} tagged template literal
1398
- * rather than constructed directly.
1399
- *
1400
- * ```typescript
1401
- * import { sm } from 'jssm';
1402
- *
1403
- * const light = sm`Red 'next' => Green 'next' => Yellow 'next' => Red;`;
1404
- * light.state(); // 'Red'
1405
- * light.action('next'); // true
1406
- * light.state(); // 'Green'
1407
- * ```
1408
- *
1409
- * @typeparam mDT The machine data type — the type of the value stored in
1410
- * `.data()`. Defaults to `undefined` when no data is used.
1411
- *
1412
- */
1413
1400
  declare class Machine<mDT> {
1414
1401
  _state: StateType;
1415
1402
  _states: Map<StateType, JssmGenericState>;
@@ -1475,6 +1462,7 @@ declare class Machine<mDT> {
1475
1462
  _has_post_transition_hooks: boolean;
1476
1463
  _code_allows_override: JssmAllowsOverride;
1477
1464
  _config_allows_override: JssmAllowsOverride;
1465
+ _allow_islands: JssmAllowIslands;
1478
1466
  _post_hooks: Map<string, Map<string, HookHandler<mDT>>>;
1479
1467
  _post_named_hooks: Map<string, Map<string, Map<string, HookHandler<mDT>>>>;
1480
1468
  _post_entry_hooks: Map<string, HookHandler<mDT>>;
@@ -1514,7 +1502,7 @@ declare class Machine<mDT> {
1514
1502
  _event_handlers: Map<JssmEventName, Set<JssmEventEntry<any, any>>>;
1515
1503
  _event_listener_count: number;
1516
1504
  _firing_error: boolean;
1517
- constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
1505
+ constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, allow_islands, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
1518
1506
  /********
1519
1507
  *
1520
1508
  * Internal method for fabricating states. Not meant for external use.
@@ -2057,6 +2045,17 @@ declare class Machine<mDT> {
2057
2045
  *
2058
2046
  */
2059
2047
  get allows_override(): JssmAllowsOverride;
2048
+ /*********
2049
+ *
2050
+ * Return the effective island policy for this machine. `true` means
2051
+ * disconnected components are allowed (the default), `false` requires a
2052
+ * single connected component, and `'with_start'` allows islands only when
2053
+ * every component contains at least one start state.
2054
+ *
2055
+ * @returns The island policy stored in the machine.
2056
+ *
2057
+ */
2058
+ get allow_islands(): JssmAllowIslands;
2060
2059
  /** List all available theme names.
2061
2060
  * @returns An array of theme name strings.
2062
2061
  */
package/jssm.es6.d.ts CHANGED
@@ -51,6 +51,13 @@ declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
51
51
  * the decision to the surrounding configuration's default.
52
52
  */
53
53
  declare type JssmAllowsOverride = true | false | undefined;
54
+ /**
55
+ * Controls whether the state graph may contain disconnected components
56
+ * (islands). `true` permits islands (default), `false` requires a single
57
+ * connected component, and `'with_start'` permits islands only when every
58
+ * component contains at least one start state.
59
+ */
60
+ declare type JssmAllowIslands = true | false | 'with_start';
54
61
  /**
55
62
  * Runtime-iterable list of valid `flow` directions for FSL diagrams.
56
63
  * Use this when you need to enumerate directions; for the type itself
@@ -284,7 +291,7 @@ declare type JssmGenericConfig<StateType, DataType> = {
284
291
  history?: number;
285
292
  min_exits?: number;
286
293
  max_exits?: number;
287
- allow_islands?: false;
294
+ allow_islands?: JssmAllowIslands;
288
295
  allow_force?: false;
289
296
  actions?: JssmPermittedOpt;
290
297
  simplify_bidi?: boolean;
@@ -1390,26 +1397,6 @@ declare function transfer_state_properties(state_decl: JssmStateDeclaration): Js
1390
1397
  *
1391
1398
  */
1392
1399
  declare function state_style_condense(jssk: JssmStateStyleKeyList, machine?: any): JssmStateConfig;
1393
- /*******
1394
- *
1395
- * Core finite state machine class. Holds the full graph of states and
1396
- * transitions, the current state, hooks, data, properties, and all runtime
1397
- * behavior. Typically created via the {@link sm} tagged template literal
1398
- * rather than constructed directly.
1399
- *
1400
- * ```typescript
1401
- * import { sm } from 'jssm';
1402
- *
1403
- * const light = sm`Red 'next' => Green 'next' => Yellow 'next' => Red;`;
1404
- * light.state(); // 'Red'
1405
- * light.action('next'); // true
1406
- * light.state(); // 'Green'
1407
- * ```
1408
- *
1409
- * @typeparam mDT The machine data type — the type of the value stored in
1410
- * `.data()`. Defaults to `undefined` when no data is used.
1411
- *
1412
- */
1413
1400
  declare class Machine<mDT> {
1414
1401
  _state: StateType;
1415
1402
  _states: Map<StateType, JssmGenericState>;
@@ -1475,6 +1462,7 @@ declare class Machine<mDT> {
1475
1462
  _has_post_transition_hooks: boolean;
1476
1463
  _code_allows_override: JssmAllowsOverride;
1477
1464
  _config_allows_override: JssmAllowsOverride;
1465
+ _allow_islands: JssmAllowIslands;
1478
1466
  _post_hooks: Map<string, Map<string, HookHandler<mDT>>>;
1479
1467
  _post_named_hooks: Map<string, Map<string, Map<string, HookHandler<mDT>>>>;
1480
1468
  _post_entry_hooks: Map<string, HookHandler<mDT>>;
@@ -1514,7 +1502,7 @@ declare class Machine<mDT> {
1514
1502
  _event_handlers: Map<JssmEventName, Set<JssmEventEntry<any, any>>>;
1515
1503
  _event_listener_count: number;
1516
1504
  _firing_error: boolean;
1517
- constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
1505
+ constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, allow_islands, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
1518
1506
  /********
1519
1507
  *
1520
1508
  * Internal method for fabricating states. Not meant for external use.
@@ -2057,6 +2045,17 @@ declare class Machine<mDT> {
2057
2045
  *
2058
2046
  */
2059
2047
  get allows_override(): JssmAllowsOverride;
2048
+ /*********
2049
+ *
2050
+ * Return the effective island policy for this machine. `true` means
2051
+ * disconnected components are allowed (the default), `false` requires a
2052
+ * single connected component, and `'with_start'` allows islands only when
2053
+ * every component contains at least one start state.
2054
+ *
2055
+ * @returns The island policy stored in the machine.
2056
+ *
2057
+ */
2058
+ get allow_islands(): JssmAllowIslands;
2060
2059
  /** List all available theme names.
2061
2060
  * @returns An array of theme name strings.
2062
2061
  */
@@ -46,6 +46,13 @@ declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
46
46
  * the decision to the surrounding configuration's default.
47
47
  */
48
48
  declare type JssmAllowsOverride = true | false | undefined;
49
+ /**
50
+ * Controls whether the state graph may contain disconnected components
51
+ * (islands). `true` permits islands (default), `false` requires a single
52
+ * connected component, and `'with_start'` permits islands only when every
53
+ * component contains at least one start state.
54
+ */
55
+ declare type JssmAllowIslands = true | false | 'with_start';
49
56
  /**
50
57
  * Runtime-iterable list of valid `flow` directions for FSL diagrams.
51
58
  * Use this when you need to enumerate directions; for the type itself
@@ -279,7 +286,7 @@ declare type JssmGenericConfig<StateType, DataType> = {
279
286
  history?: number;
280
287
  min_exits?: number;
281
288
  max_exits?: number;
282
- allow_islands?: false;
289
+ allow_islands?: JssmAllowIslands;
283
290
  allow_force?: false;
284
291
  actions?: JssmPermittedOpt;
285
292
  simplify_bidi?: boolean;
@@ -788,26 +795,6 @@ declare type JssmEventEntry<mDT, Ev extends JssmEventName> = {
788
795
  filter?: JssmEventFilter<mDT, Ev>;
789
796
  once: boolean;
790
797
  };
791
- /*******
792
- *
793
- * Core finite state machine class. Holds the full graph of states and
794
- * transitions, the current state, hooks, data, properties, and all runtime
795
- * behavior. Typically created via the {@link sm} tagged template literal
796
- * rather than constructed directly.
797
- *
798
- * ```typescript
799
- * import { sm } from 'jssm';
800
- *
801
- * const light = sm`Red 'next' => Green 'next' => Yellow 'next' => Red;`;
802
- * light.state(); // 'Red'
803
- * light.action('next'); // true
804
- * light.state(); // 'Green'
805
- * ```
806
- *
807
- * @typeparam mDT The machine data type — the type of the value stored in
808
- * `.data()`. Defaults to `undefined` when no data is used.
809
- *
810
- */
811
798
  declare class Machine<mDT> {
812
799
  _state: StateType;
813
800
  _states: Map<StateType, JssmGenericState>;
@@ -873,6 +860,7 @@ declare class Machine<mDT> {
873
860
  _has_post_transition_hooks: boolean;
874
861
  _code_allows_override: JssmAllowsOverride;
875
862
  _config_allows_override: JssmAllowsOverride;
863
+ _allow_islands: JssmAllowIslands;
876
864
  _post_hooks: Map<string, Map<string, HookHandler<mDT>>>;
877
865
  _post_named_hooks: Map<string, Map<string, Map<string, HookHandler<mDT>>>>;
878
866
  _post_entry_hooks: Map<string, HookHandler<mDT>>;
@@ -912,7 +900,7 @@ declare class Machine<mDT> {
912
900
  _event_handlers: Map<JssmEventName, Set<JssmEventEntry<any, any>>>;
913
901
  _event_listener_count: number;
914
902
  _firing_error: boolean;
915
- constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
903
+ constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, allow_islands, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
916
904
  /********
917
905
  *
918
906
  * Internal method for fabricating states. Not meant for external use.
@@ -1455,6 +1443,17 @@ declare class Machine<mDT> {
1455
1443
  *
1456
1444
  */
1457
1445
  get allows_override(): JssmAllowsOverride;
1446
+ /*********
1447
+ *
1448
+ * Return the effective island policy for this machine. `true` means
1449
+ * disconnected components are allowed (the default), `false` requires a
1450
+ * single connected component, and `'with_start'` allows islands only when
1451
+ * every component contains at least one start state.
1452
+ *
1453
+ * @returns The island policy stored in the machine.
1454
+ *
1455
+ */
1456
+ get allow_islands(): JssmAllowIslands;
1458
1457
  /** List all available theme names.
1459
1458
  * @returns An array of theme name strings.
1460
1459
  */
package/jssm_viz.es6.d.ts CHANGED
@@ -46,6 +46,13 @@ declare type JssmLineStyle = 'solid' | 'dashed' | 'dotted';
46
46
  * the decision to the surrounding configuration's default.
47
47
  */
48
48
  declare type JssmAllowsOverride = true | false | undefined;
49
+ /**
50
+ * Controls whether the state graph may contain disconnected components
51
+ * (islands). `true` permits islands (default), `false` requires a single
52
+ * connected component, and `'with_start'` permits islands only when every
53
+ * component contains at least one start state.
54
+ */
55
+ declare type JssmAllowIslands = true | false | 'with_start';
49
56
  /**
50
57
  * Runtime-iterable list of valid `flow` directions for FSL diagrams.
51
58
  * Use this when you need to enumerate directions; for the type itself
@@ -279,7 +286,7 @@ declare type JssmGenericConfig<StateType, DataType> = {
279
286
  history?: number;
280
287
  min_exits?: number;
281
288
  max_exits?: number;
282
- allow_islands?: false;
289
+ allow_islands?: JssmAllowIslands;
283
290
  allow_force?: false;
284
291
  actions?: JssmPermittedOpt;
285
292
  simplify_bidi?: boolean;
@@ -788,26 +795,6 @@ declare type JssmEventEntry<mDT, Ev extends JssmEventName> = {
788
795
  filter?: JssmEventFilter<mDT, Ev>;
789
796
  once: boolean;
790
797
  };
791
- /*******
792
- *
793
- * Core finite state machine class. Holds the full graph of states and
794
- * transitions, the current state, hooks, data, properties, and all runtime
795
- * behavior. Typically created via the {@link sm} tagged template literal
796
- * rather than constructed directly.
797
- *
798
- * ```typescript
799
- * import { sm } from 'jssm';
800
- *
801
- * const light = sm`Red 'next' => Green 'next' => Yellow 'next' => Red;`;
802
- * light.state(); // 'Red'
803
- * light.action('next'); // true
804
- * light.state(); // 'Green'
805
- * ```
806
- *
807
- * @typeparam mDT The machine data type — the type of the value stored in
808
- * `.data()`. Defaults to `undefined` when no data is used.
809
- *
810
- */
811
798
  declare class Machine<mDT> {
812
799
  _state: StateType;
813
800
  _states: Map<StateType, JssmGenericState>;
@@ -873,6 +860,7 @@ declare class Machine<mDT> {
873
860
  _has_post_transition_hooks: boolean;
874
861
  _code_allows_override: JssmAllowsOverride;
875
862
  _config_allows_override: JssmAllowsOverride;
863
+ _allow_islands: JssmAllowIslands;
876
864
  _post_hooks: Map<string, Map<string, HookHandler<mDT>>>;
877
865
  _post_named_hooks: Map<string, Map<string, Map<string, HookHandler<mDT>>>>;
878
866
  _post_entry_hooks: Map<string, HookHandler<mDT>>;
@@ -912,7 +900,7 @@ declare class Machine<mDT> {
912
900
  _event_handlers: Map<JssmEventName, Set<JssmEventEntry<any, any>>>;
913
901
  _event_listener_count: number;
914
902
  _firing_error: boolean;
915
- constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
903
+ constructor({ start_states, end_states, failed_outputs, initial_state, start_states_no_enforce, complete, transitions, machine_author, machine_comment, machine_contributor, machine_definition, machine_language, machine_license, machine_name, machine_version, npm_name, 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, allow_islands, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
916
904
  /********
917
905
  *
918
906
  * Internal method for fabricating states. Not meant for external use.
@@ -1455,6 +1443,17 @@ declare class Machine<mDT> {
1455
1443
  *
1456
1444
  */
1457
1445
  get allows_override(): JssmAllowsOverride;
1446
+ /*********
1447
+ *
1448
+ * Return the effective island policy for this machine. `true` means
1449
+ * disconnected components are allowed (the default), `false` requires a
1450
+ * single connected component, and `'with_start'` allows islands only when
1451
+ * every component contains at least one start state.
1452
+ *
1453
+ * @returns The island policy stored in the machine.
1454
+ *
1455
+ */
1456
+ get allow_islands(): JssmAllowIslands;
1458
1457
  /** List all available theme names.
1459
1458
  * @returns An array of theme name strings.
1460
1459
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.142.2",
3
+ "version": "5.142.3",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },