jssm 5.162.11 → 5.162.13
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 +8 -7
- package/custom-elements.json +52 -10
- package/dist/cdn/instance.js +1 -1
- package/dist/cdn/viz.js +17 -1
- package/dist/cli/fsl-export-system-prompt.cjs +1 -1
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/cli/lib.cjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/deno/README.md +8 -7
- package/dist/deno/fsl_markdown_fence.d.ts +20 -3
- package/dist/deno/jssm.d.ts +14 -1
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_compiler.d.ts +21 -4
- package/dist/deno/jssm_types.d.ts +27 -1
- package/dist/deno/jssm_viz.d.ts +66 -9
- package/dist/fence/fence.js +83 -32
- 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/dist/wc/instance.js +69 -23
- package/dist/wc/viz.js +54 -9
- package/dist/wc/widgets.define.js +4 -2
- package/dist/wc/widgets.js +196 -43
- package/jssm.es5.d.cts +80 -8
- package/jssm.es6.d.ts +80 -8
- package/jssm.fence.d.ts +13 -1
- package/jssm_viz.es5.d.cts +79 -10
- package/jssm_viz.es6.d.ts +79 -10
- package/package.json +2 -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.162.
|
|
21
|
+
* Generated for version 5.162.13 at 7/12/2026, 12:27:54 PM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.162.
|
|
24
|
+
# jssm 5.162.13
|
|
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/) ·
|
|
@@ -333,7 +333,7 @@ That decision shows up everywhere downstream:
|
|
|
333
333
|
or run `npm run benny` against your own machine.
|
|
334
334
|
|
|
335
335
|
- **More thoroughly tested than any other JavaScript state-machine
|
|
336
|
-
library.** 8,
|
|
336
|
+
library.** 8,681 tests at 100.0% line coverage
|
|
337
337
|
([report](https://coveralls.io/github/StoneCypher/jssm)), plus
|
|
338
338
|
fuzz testing via `fast-check`, with parser test data across ten natural
|
|
339
339
|
languages and Emoji.
|
|
@@ -350,6 +350,7 @@ That decision shows up everywhere downstream:
|
|
|
350
350
|
- [Tutorial: a four-state traffic light](https://github.com/StoneCypher/jssm/blob/main/src/doc_md/Tutorial_TrafficLight.md) - short walkthrough that introduces the three arrow types
|
|
351
351
|
- [Tutorial: building an ATM state machine](https://github.com/StoneCypher/jssm/blob/main/src/doc_md/Tutorial_ATM.md) - longer walkthrough that builds a real-world machine in nine incremental steps
|
|
352
352
|
- [Language reference](https://github.com/StoneCypher/jssm/blob/main/src/doc_md/LanguageReference.md) - DSL reference for people already comfortable with state machines
|
|
353
|
+
- [Styling nodes and graphs](https://github.com/StoneCypher/jssm/blob/main/src/doc_md/Styling.md) - the built-in named color themes and how to select them from FSL source, code, Markdown fences, the CLI, and web components
|
|
353
354
|
- [Catalog of example machines](https://github.com/StoneCypher/jssm/blob/main/src/doc_md/ExampleMachines.md) - comparison table of worked examples (light switch, traffic light, intersection, vending machine, more)
|
|
354
355
|
- [Generated API reference](https://stonecypher.github.io/jssm/docs/) - full surface, generated from the TypeScript source
|
|
355
356
|
|
|
@@ -467,11 +468,11 @@ If your contribution is missing here, please open an issue.
|
|
|
467
468
|
|
|
468
469
|
<br/>
|
|
469
470
|
|
|
470
|
-
***8,
|
|
471
|
+
***8,681 tests***, run 98,078 times.
|
|
471
472
|
|
|
472
|
-
- 7,
|
|
473
|
-
-
|
|
474
|
-
-
|
|
473
|
+
- 7,778 specs with 100.0% coverage
|
|
474
|
+
- 903 fuzz tests with 56.3% coverage
|
|
475
|
+
- 11,033 TypeScript lines - 0.8 tests per line, 8.9 generated tests per line
|
|
475
476
|
|
|
476
477
|
[](https://github.com/StoneCypher/jssm/actions)
|
|
477
478
|
[](https://www.npmjs.com/package/jssm)
|
package/custom-elements.json
CHANGED
|
@@ -3425,7 +3425,7 @@
|
|
|
3425
3425
|
},
|
|
3426
3426
|
{
|
|
3427
3427
|
"kind": "class",
|
|
3428
|
-
"description": "Binds an `<fsl-instance>` to a segment of the URL fragment: restores from it\r\non connect and writes back (debounced, via `history.replaceState`) whenever\r\nthe machine is rebuilt. Inert when the host has no key (permalink_key_for\r\nreturns `null`), so an `fsl-instance` without an `id`/`uhash` never touches\r\n`location`.\r\n\r\nEcho guard: `
|
|
3428
|
+
"description": "Binds an `<fsl-instance>` to a segment of the URL fragment: restores from it\r\non connect and writes back (debounced, via `history.replaceState`) whenever\r\nthe machine is rebuilt. Inert when the host has no key (permalink_key_for\r\nreturns `null`), so an `fsl-instance` without an `id`/`uhash` never touches\r\n`location`.\r\n\r\nEcho guard: `_observed` holds this connection's current URL segment, including\r\nexplicit absence, so unrelated hash changes and restore→rebuild→write cycles\r\nare no-ops. Async operations share a revision: every observed segment change\r\nor source write invalidates all older work, and disconnecting invalidates all\r\nwork. This gives cross-direction latest-operation-wins semantics without\r\nallowing unrelated hash changes to cancel valid writes.",
|
|
3429
3429
|
"name": "FslPermalinkSync",
|
|
3430
3430
|
"members": [
|
|
3431
3431
|
{
|
|
@@ -3449,12 +3449,12 @@
|
|
|
3449
3449
|
},
|
|
3450
3450
|
{
|
|
3451
3451
|
"kind": "field",
|
|
3452
|
-
"name": "
|
|
3452
|
+
"name": "_observed",
|
|
3453
3453
|
"type": {
|
|
3454
|
-
"text": "
|
|
3454
|
+
"text": "ObservedSegment"
|
|
3455
3455
|
},
|
|
3456
3456
|
"privacy": "private",
|
|
3457
|
-
"default": "
|
|
3457
|
+
"default": "UNOBSERVED_SEGMENT"
|
|
3458
3458
|
},
|
|
3459
3459
|
{
|
|
3460
3460
|
"kind": "field",
|
|
@@ -3464,6 +3464,24 @@
|
|
|
3464
3464
|
},
|
|
3465
3465
|
"privacy": "private"
|
|
3466
3466
|
},
|
|
3467
|
+
{
|
|
3468
|
+
"kind": "field",
|
|
3469
|
+
"name": "_connected",
|
|
3470
|
+
"type": {
|
|
3471
|
+
"text": "boolean"
|
|
3472
|
+
},
|
|
3473
|
+
"privacy": "private",
|
|
3474
|
+
"default": "false"
|
|
3475
|
+
},
|
|
3476
|
+
{
|
|
3477
|
+
"kind": "field",
|
|
3478
|
+
"name": "_revision",
|
|
3479
|
+
"type": {
|
|
3480
|
+
"text": "number"
|
|
3481
|
+
},
|
|
3482
|
+
"privacy": "private",
|
|
3483
|
+
"default": "0"
|
|
3484
|
+
},
|
|
3467
3485
|
{
|
|
3468
3486
|
"kind": "field",
|
|
3469
3487
|
"name": "_onRebuilt",
|
|
@@ -3483,7 +3501,8 @@
|
|
|
3483
3501
|
"type": {
|
|
3484
3502
|
"text": "void"
|
|
3485
3503
|
}
|
|
3486
|
-
}
|
|
3504
|
+
},
|
|
3505
|
+
"description": "Observe the keyed URL segment and attach synchronization listeners."
|
|
3487
3506
|
},
|
|
3488
3507
|
{
|
|
3489
3508
|
"kind": "method",
|
|
@@ -3492,7 +3511,8 @@
|
|
|
3492
3511
|
"type": {
|
|
3493
3512
|
"text": "void"
|
|
3494
3513
|
}
|
|
3495
|
-
}
|
|
3514
|
+
},
|
|
3515
|
+
"description": "Invalidate work, forget observations, detach listeners, and cancel timers."
|
|
3496
3516
|
},
|
|
3497
3517
|
{
|
|
3498
3518
|
"kind": "method",
|
|
@@ -3503,7 +3523,7 @@
|
|
|
3503
3523
|
"text": "Promise<void>"
|
|
3504
3524
|
}
|
|
3505
3525
|
},
|
|
3506
|
-
"description": "
|
|
3526
|
+
"description": "Observe this instance's newest segment and push it into the host. A changed\r\nobservation supersedes older restores and writes; an unchanged observation\r\nleaves them valid. Declared source is overridden only when this decode is\r\nstill the latest operation and the actual fragment is unchanged after\r\nawaiting it, even when a corresponding hashchange handler is still queued."
|
|
3507
3527
|
},
|
|
3508
3528
|
{
|
|
3509
3529
|
"kind": "method",
|
|
@@ -3513,7 +3533,8 @@
|
|
|
3513
3533
|
"type": {
|
|
3514
3534
|
"text": "void"
|
|
3515
3535
|
}
|
|
3516
|
-
}
|
|
3536
|
+
},
|
|
3537
|
+
"description": "Debounce the newest rebuild and immediately supersede older restores or writes."
|
|
3517
3538
|
},
|
|
3518
3539
|
{
|
|
3519
3540
|
"kind": "method",
|
|
@@ -3524,7 +3545,15 @@
|
|
|
3524
3545
|
"text": "Promise<void>"
|
|
3525
3546
|
}
|
|
3526
3547
|
},
|
|
3527
|
-
"
|
|
3548
|
+
"parameters": [
|
|
3549
|
+
{
|
|
3550
|
+
"name": "revision",
|
|
3551
|
+
"type": {
|
|
3552
|
+
"text": "number"
|
|
3553
|
+
}
|
|
3554
|
+
}
|
|
3555
|
+
],
|
|
3556
|
+
"description": "Encode the scheduled source and merge it into the fragment only when no\r\nnewer source write, observed segment change, or disconnect superseded it.\r\nThe actual fragment must also match the observation captured before the\r\nawait, covering URL changes whose hashchange handler is still queued. A\r\nsuccessful write becomes the current observation, preventing echo work."
|
|
3528
3557
|
}
|
|
3529
3558
|
]
|
|
3530
3559
|
}
|
|
@@ -4460,6 +4489,11 @@
|
|
|
4460
4489
|
"description": "Minimum height of the rendered SVG container.",
|
|
4461
4490
|
"name": "--jssm-viz-min-height",
|
|
4462
4491
|
"default": "100px"
|
|
4492
|
+
},
|
|
4493
|
+
{
|
|
4494
|
+
"description": "Maximum height of the control; the rendered SVG stays bounded (aspect preserved, letterboxed) within it. Equivalent to setting `max-height` on the host from outside, without shadow surgery.",
|
|
4495
|
+
"name": "--jssm-viz-max-height",
|
|
4496
|
+
"default": "none"
|
|
4463
4497
|
}
|
|
4464
4498
|
],
|
|
4465
4499
|
"members": [
|
|
@@ -4581,7 +4615,7 @@
|
|
|
4581
4615
|
"description": "Highlight styling; see {@link HighlightOptions}. Defaults\r\n * to crimson with off-trace fading enabled.\r\n * "
|
|
4582
4616
|
}
|
|
4583
4617
|
],
|
|
4584
|
-
"description": "Programmatically highlights one execution trace (a path of state names)\r\nthrough the rendered graph, optionally fading everything off the path.\r\n\r\nMatches nodes by their Graphviz `<title>`
|
|
4618
|
+
"description": "Programmatically highlights one execution trace (a path of state names)\r\nthrough the rendered graph, optionally fading everything off the path.\r\n\r\nMatches nodes by their Graphviz `<title>` and edges by the `from->to`\r\ntitle Graphviz emits, applying inline style overrides so the highlight\r\ncomposes over — and is reversible against — the default rendering (see\r\nclearHighlights, which this calls first). No-ops when detached,\r\nbefore the first render, or given an empty trace.\r\n\r\nBecause dot generation slugs state names into node identifiers (fsl#1935\r\n— `'Wrong Pin'` renders with `<title>wrong-pin</title>`), each trace name\r\nis matched in **both** its raw form and its slugged form, using the same\r\n`slug_for` the dot generator uses. Display names (`'Red'`, `'Wrong Pin'`,\r\n`'Röd'`) and already-slug-form names (`'red'`, `'wrong-pin'`) therefore\r\nboth work. Names whose slug is empty (e.g. `'!!!'`, which renders under\r\nan indexed `node-N` title) are only matchable by passing that literal\r\n`node-N` title.\r\n\r\n```typescript\r\n// Highlight a -> b -> c in green, without dimming the rest:\r\nviz.highlightTrace(['a', 'b', 'c'], { color: '#2e7d32', fadeOthers: false });\r\n\r\n// Display-form names match their slugged titles:\r\nviz.highlightTrace(['Wrong Pin', 'Alarm']); // titles wrong-pin, alarm\r\n```"
|
|
4585
4619
|
}
|
|
4586
4620
|
],
|
|
4587
4621
|
"events": [
|
|
@@ -4941,6 +4975,14 @@
|
|
|
4941
4975
|
"name": "FslStochastic",
|
|
4942
4976
|
"module": "./fsl_stochastic_wc.js"
|
|
4943
4977
|
}
|
|
4978
|
+
},
|
|
4979
|
+
{
|
|
4980
|
+
"kind": "js",
|
|
4981
|
+
"name": "FslInfoPanel",
|
|
4982
|
+
"declaration": {
|
|
4983
|
+
"name": "FslInfoPanel",
|
|
4984
|
+
"module": "./fsl_info_panel_wc.js"
|
|
4985
|
+
}
|
|
4944
4986
|
}
|
|
4945
4987
|
]
|
|
4946
4988
|
}
|