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 +38 -7
- package/dist/cdn/instance.js +2716 -654
- package/dist/cdn/viz.js +3258 -739
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/deno/README.md +38 -7
- package/dist/deno/jssm.d.ts +339 -12
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_compiler.d.ts +129 -2
- package/dist/deno/jssm_types.d.ts +246 -1
- package/dist/deno/jssm_viz.d.ts +309 -1
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/jssm.es5.d.cts +568 -11
- package/jssm.es6.d.ts +568 -11
- package/jssm_viz.es5.d.cts +876 -12
- package/jssm_viz.es6.d.ts +876 -12
- package/package.json +1 -1
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.
|
|
21
|
+
* Generated for version 5.143.29 at 6/12/2026, 4:39:23 PM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.143.
|
|
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,
|
|
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,
|
|
448
|
+
***7,227 tests***, run 82,269 times.
|
|
418
449
|
|
|
419
|
-
- 6,
|
|
420
|
-
-
|
|
421
|
-
-
|
|
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
|
[](https://github.com/StoneCypher/jssm/actions)
|
|
424
455
|
[](https://www.npmjs.com/package/jssm)
|