jssm 5.143.28 → 5.143.29

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/README.md CHANGED
@@ -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.143.28 at 6/12/2026, 4:10:08 PM
21
+ * Generated for version 5.143.29 at 6/12/2026, 4:39:23 PM
22
22
 
23
23
  -->
24
- # jssm 5.143.28
24
+ # jssm 5.143.29
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/) ·
@@ -250,6 +250,37 @@ observation point.
250
250
  returns `false`. An unknown state throws. Branching code can rely on the
251
251
  distinction.
252
252
 
253
+ **Overlapping state groups** let a state belong to several groups at once -
254
+ something a strict hierarchy can't express. A group is declared with `&`,
255
+ and the same `&name` then drives transitions, shared metadata, boundary
256
+ hooks, and runtime queries:
257
+
258
+ ```javascript
259
+ const req = sm`
260
+ &InProgress : [connecting sending receiving];
261
+ &Receiving : [receiving draining];
262
+
263
+ idle 'send' -> connecting 'open' -> sending 'reply' -> receiving;
264
+ receiving 'eof' -> draining 'done' -> idle;
265
+
266
+ &InProgress 'abort' -> idle; // a transition from every group member
267
+ on enter &Receiving do 'log_rx'; // boundary hook fires crossing in
268
+ `;
269
+
270
+ req.action('send');
271
+ req.isIn('InProgress'); // true - connecting is in &InProgress
272
+ req.groupsOf('receiving'); // Set { 'InProgress', 'Receiving' } - overlap
273
+ ```
274
+
275
+ `receiving` is in **both** groups simultaneously - it is in-progress *and*
276
+ receiving. When two groups disagree about the same action, a CSS-like
277
+ cascade decides: state-specific edges win, then the innermost (nearest)
278
+ group, then the later-declared one. Groups render as nested Graphviz
279
+ clusters, or as bracketed chips on the node label where memberships
280
+ genuinely overlap.
281
+
282
+ See the cookbook's overlapping-groups recipes for fuller worked examples.
283
+
253
284
 
254
285
 
255
286
  <br/>
@@ -281,7 +312,7 @@ That decision shows up everywhere downstream:
281
312
  or run `npm run benny` against your own machine.
282
313
 
283
314
  - **More thoroughly tested than any other JavaScript state-machine
284
- library.** 7,017 tests at 100.0% line coverage
315
+ library.** 7,227 tests at 100.0% line coverage
285
316
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
286
317
  fuzz testing via `fast-check`, with parser test data across ten natural
287
318
  languages and Emoji.
@@ -414,11 +445,11 @@ If your contribution is missing here, please open an issue.
414
445
 
415
446
  <br/>
416
447
 
417
- ***7,017 tests***, run 81,861 times.
448
+ ***7,227 tests***, run 82,269 times.
418
449
 
419
- - 6,261 specs with 100.0% coverage
420
- - 756 fuzz tests with 83.5% coverage
421
- - 5,880 TypeScript lines - 1.2 tests per line, 13.9 generated tests per line
450
+ - 6,469 specs with 100.0% coverage
451
+ - 758 fuzz tests with 76.7% coverage
452
+ - 6,610 TypeScript lines - 1.1 tests per line, 12.4 generated tests per line
422
453
 
423
454
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
424
455
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)