jssm 5.149.2 → 5.150.1

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.
@@ -32,7 +32,7 @@ const fslDeprecated = Tag.defineModifier('fslDeprecated');
32
32
  */
33
33
  const STRUCTURAL_KEYWORDS = new Set([
34
34
  'state', 'start_state', 'end_state', 'active_state', 'terminal_state', 'hooked_state',
35
- 'action', 'transition', 'validation', 'configuration', 'graph', 'hooks',
35
+ 'action', 'transition', 'validation', 'configuration', 'graph', 'editor', 'hooks',
36
36
  'property', 'required', 'default',
37
37
  ]);
38
38
  /**
@@ -53,6 +53,8 @@ const PROPERTY_KEYWORDS = new Set([
53
53
  'label', 'color', 'shape', 'corners', 'linestyle', 'image', 'url',
54
54
  // hyphenated style keys (read as a single compound token by the tokenizer)
55
55
  'background-color', 'text-color', 'border-color', 'edge-color', 'line-style',
56
+ // editor: {} block keys (fsl#1334)
57
+ 'stochastic_run_count', 'panels',
56
58
  ]);
57
59
  /**
58
60
  * Keys that still parse but are deprecated. Highlighted with the
@@ -18,10 +18,10 @@ 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.149.2 at 6/28/2026, 9:27:00 AM
21
+ * Generated for version 5.150.1 at 6/28/2026, 10:20:13 AM
22
22
 
23
23
  -->
24
- # jssm 5.149.2
24
+ # jssm 5.150.1
25
25
 
26
26
  [**Try the live editor**](https://stonecypher.github.io/jssm-viz-demo/graph_explorer.html) ·
27
27
  [Documentation](https://stonecypher.github.io/jssm/docs/) ·
@@ -312,7 +312,7 @@ That decision shows up everywhere downstream:
312
312
  or run `npm run benny` against your own machine.
313
313
 
314
314
  - **More thoroughly tested than any other JavaScript state-machine
315
- library.** 7,704 tests at 100.0% line coverage
315
+ library.** 7,720 tests at 100.0% line coverage
316
316
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
317
317
  fuzz testing via `fast-check`, with parser test data across ten natural
318
318
  languages and Emoji.
@@ -445,11 +445,11 @@ If your contribution is missing here, please open an issue.
445
445
 
446
446
  <br/>
447
447
 
448
- ***7,704 tests***, run 82,350 times.
448
+ ***7,720 tests***, run 82,366 times.
449
449
 
450
- - 6,950 specs with 100.0% coverage
451
- - 754 fuzz tests with 57.5% coverage
452
- - 8,989 TypeScript lines - 0.9 tests per line, 9.2 generated tests per line
450
+ - 6,966 specs with 100.0% coverage
451
+ - 754 fuzz tests with 57.0% coverage
452
+ - 9,100 TypeScript lines - 0.8 tests per line, 9.1 generated tests per line
453
453
 
454
454
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
455
455
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
@@ -1,6 +1,6 @@
1
1
  declare type StateType = string;
2
2
  import { JssmGenericState, JssmGenericConfig, JssmStateConfig, JssmTransition, JssmTransitionList, // JssmTransitionRule,
3
- JssmMachineInternalState, JssmAllowsOverride, JssmAllowIslands, JssmDefaultSize, JssmStateDeclaration, JssmStateStyleKeyList, JssmTransitionConfig, JssmGraphConfig, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslDirections, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult, EverythingHookContext, EverythingHookHandler, PostEverythingHookHandler, HookPhase, HookRegistryEntry, HookQuery, JssmEventName, JssmEventDetailMap, JssmEventFilter, JssmEventHandler, JssmUnsubscribe, JssmBaseTheme, JssmGroupRegistry, JssmGroupHooks, JssmStateHooks, JssmRng } from './jssm_types.js';
3
+ JssmMachineInternalState, JssmAllowsOverride, JssmAllowIslands, JssmEditorConfig, JssmDefaultSize, JssmStateDeclaration, JssmStateStyleKeyList, JssmTransitionConfig, JssmGraphConfig, JssmLayout, JssmHistory, JssmSerialization, FslDirection, FslDirections, FslTheme, HookDescription, HookHandler, HookContext, HookResult, HookComplexResult, EverythingHookContext, EverythingHookHandler, PostEverythingHookHandler, HookPhase, HookRegistryEntry, HookQuery, JssmEventName, JssmEventDetailMap, JssmEventFilter, JssmEventHandler, JssmUnsubscribe, JssmBaseTheme, JssmGroupRegistry, JssmGroupHooks, JssmStateHooks, JssmRng } from './jssm_types.js';
4
4
  import { arrow_direction, arrow_left_kind, arrow_right_kind } from './jssm_arrow.js';
5
5
  import { compile, make, wrap_parse } from './jssm_compiler.js';
6
6
  import { seq, unique, find_repeated, weighted_rand_select, weighted_sample_select, histograph, weighted_histo_key, gen_splitmix32, sleep } from './jssm_util.js';
@@ -158,6 +158,7 @@ declare class Machine<mDT> {
158
158
  _code_allows_override: JssmAllowsOverride;
159
159
  _config_allows_override: JssmAllowsOverride;
160
160
  _allow_islands: JssmAllowIslands;
161
+ _editor_config?: JssmEditorConfig;
161
162
  _post_hooks: Map<number, HookHandler<mDT>>;
162
163
  _post_named_hooks: Map<number, Map<number, HookHandler<mDT>>>;
163
164
  _post_entry_hooks: Map<number, HookHandler<mDT>>;
@@ -207,7 +208,7 @@ declare class Machine<mDT> {
207
208
  _firing_error: boolean;
208
209
  _boundary_depth: number;
209
210
  _boundary_depth_limit: number;
210
- 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, default_size, 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, boundary_depth_limit, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, default_transition_config, default_graph_config, group_registry, group_metadata, group_hooks, state_hooks, allows_override, config_allows_override, allow_islands, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
211
+ 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, default_size, 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, boundary_depth_limit, data, default_state_config, default_active_state_config, default_hooked_state_config, default_terminal_state_config, default_start_state_config, default_end_state_config, default_transition_config, default_graph_config, group_registry, group_metadata, group_hooks, state_hooks, allows_override, config_allows_override, allow_islands, editor_config, rng_seed, time_source, timeout_source, clear_timeout_source }: JssmGenericConfig<StateType, mDT>);
211
212
  /********
212
213
  *
213
214
  * Internal method for fabricating states. Not meant for external use.
@@ -635,6 +636,17 @@ declare class Machine<mDT> {
635
636
  * @returns The machine name string.
636
637
  */
637
638
  machine_name(): string;
639
+ /** The editor/panel defaults declared in the FSL `editor: {}` block, or
640
+ * `undefined` when none was given. Read by the all-widgets web control
641
+ * (fsl#1334) — `panels` drives `request` panel mode.
642
+ *
643
+ * @returns `{ stochastic_run_count?, panels? }`, or `undefined`.
644
+ *
645
+ * @example
646
+ * const m = sm`editor: { panels: [history]; }; a -> b;`;
647
+ * m.editor_config(); // => { panels: ['history'] }
648
+ */
649
+ editor_config(): JssmEditorConfig | undefined;
638
650
  /** Get the npm package name associated with the machine. Set via the FSL `npm_name` directive.
639
651
  * Returns `undefined` when not present.
640
652
  * @returns The npm package name string, or `undefined`.