jssm 5.152.0 → 5.154.0
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 +7 -7
- package/custom-elements.json +293 -7
- package/dist/cdn/instance.js +352 -11
- package/dist/cdn/viz.js +374 -16
- 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 +7 -7
- package/dist/deno/jssm.d.ts +70 -5
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_types.d.ts +31 -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/dist/wc/instance.js +2 -0
- package/dist/wc/widgets.define.js +3 -2
- package/dist/wc/widgets.js +331 -34
- package/jssm.es5.d.cts +100 -5
- package/jssm.es6.d.ts +100 -5
- package/jssm_viz.es5.d.cts +95 -4
- package/jssm_viz.es6.d.ts +95 -4
- 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.
|
|
21
|
+
* Generated for version 5.154.0 at 6/28/2026, 7:29:51 PM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.
|
|
24
|
+
# jssm 5.154.0
|
|
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,
|
|
315
|
+
library.** 7,810 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,
|
|
448
|
+
***7,810 tests***, run 82,852 times.
|
|
449
449
|
|
|
450
|
-
- 7,
|
|
451
|
-
-
|
|
452
|
-
- 9,
|
|
450
|
+
- 7,052 specs with 100.0% coverage
|
|
451
|
+
- 758 fuzz tests with 54.8% coverage
|
|
452
|
+
- 9,666 TypeScript lines - 0.8 tests per line, 8.6 generated tests per line
|
|
453
453
|
|
|
454
454
|
[](https://github.com/StoneCypher/jssm/actions)
|
|
455
455
|
[](https://www.npmjs.com/package/jssm)
|
package/custom-elements.json
CHANGED
|
@@ -2138,6 +2138,10 @@
|
|
|
2138
2138
|
"description": "Slot for the random-walk simulation (`<fsl-simulation>`, #668).",
|
|
2139
2139
|
"name": "simulation"
|
|
2140
2140
|
},
|
|
2141
|
+
{
|
|
2142
|
+
"description": "Slot for the stochastic analysis panel (`<fsl-stochastic>`, fsl#1384).",
|
|
2143
|
+
"name": "stochastic"
|
|
2144
|
+
},
|
|
2141
2145
|
{
|
|
2142
2146
|
"description": "Slot for the export menu (`<fsl-export>`, #667).",
|
|
2143
2147
|
"name": "export"
|
|
@@ -3065,7 +3069,7 @@
|
|
|
3065
3069
|
}
|
|
3066
3070
|
}
|
|
3067
3071
|
],
|
|
3068
|
-
"description": "URL-safe base64 (RFC 4648 §5) of raw bytes: standard base64 with `+`→`-`,\n`/`→`_`, and trailing `=` padding stripped."
|
|
3072
|
+
"description": "URL-safe base64 (RFC 4648 §5) of raw bytes: standard base64 with `+`→`-`,\r\n`/`→`_`, and trailing `=` padding stripped."
|
|
3069
3073
|
},
|
|
3070
3074
|
{
|
|
3071
3075
|
"kind": "function",
|
|
@@ -3137,7 +3141,7 @@
|
|
|
3137
3141
|
}
|
|
3138
3142
|
}
|
|
3139
3143
|
],
|
|
3140
|
-
"description": "Encode FSL to a `<scheme><payload>` segment value (the part after `key=`).\nDEFLATE is used (scheme `1`) only when it is strictly shorter than the raw\nbytes (scheme `0`)."
|
|
3144
|
+
"description": "Encode FSL to a `<scheme><payload>` segment value (the part after `key=`).\r\nDEFLATE is used (scheme `1`) only when it is strictly shorter than the raw\r\nbytes (scheme `0`)."
|
|
3141
3145
|
},
|
|
3142
3146
|
{
|
|
3143
3147
|
"kind": "function",
|
|
@@ -3155,7 +3159,7 @@
|
|
|
3155
3159
|
}
|
|
3156
3160
|
}
|
|
3157
3161
|
],
|
|
3158
|
-
"description": "Inverse of encode_machine: decode a `<scheme><payload>` segment back\nto FSL. Async because inflate is async."
|
|
3162
|
+
"description": "Inverse of encode_machine: decode a `<scheme><payload>` segment back\r\nto FSL. Async because inflate is async."
|
|
3159
3163
|
},
|
|
3160
3164
|
{
|
|
3161
3165
|
"kind": "function",
|
|
@@ -3209,7 +3213,7 @@
|
|
|
3209
3213
|
}
|
|
3210
3214
|
}
|
|
3211
3215
|
],
|
|
3212
|
-
"description": "Return a new fragment body (no leading `#`) with `key`'s segment set to\n`value`, preserving every other segment and its order; appends if absent."
|
|
3216
|
+
"description": "Return a new fragment body (no leading `#`) with `key`'s segment set to\r\n`value`, preserving every other segment and its order; appends if absent."
|
|
3213
3217
|
},
|
|
3214
3218
|
{
|
|
3215
3219
|
"kind": "function",
|
|
@@ -3227,7 +3231,7 @@
|
|
|
3227
3231
|
}
|
|
3228
3232
|
}
|
|
3229
3233
|
],
|
|
3230
|
-
"description": "The fragment key an element owns: its `uhash` attribute if set, else its\n`id`, else `null` (does not participate in URL sync). The single source of\nthis rule, shared by the toolbar export and the sync controller."
|
|
3234
|
+
"description": "The fragment key an element owns: its `uhash` attribute if set, else its\r\n`id`, else `null` (does not participate in URL sync). The single source of\r\nthis rule, shared by the toolbar export and the sync controller."
|
|
3231
3235
|
},
|
|
3232
3236
|
{
|
|
3233
3237
|
"kind": "function",
|
|
@@ -3266,7 +3270,7 @@
|
|
|
3266
3270
|
}
|
|
3267
3271
|
}
|
|
3268
3272
|
],
|
|
3269
|
-
"description": "A shareable URL for `fsl` under `key`, merging into `currentHash` so sibling\nmachines' segments survive. Browser-defaulted (`location`) but injectable for\ntests."
|
|
3273
|
+
"description": "A shareable URL for `fsl` under `key`, merging into `currentHash` so sibling\r\nmachines' segments survive. Browser-defaulted (`location`) but injectable for\r\ntests."
|
|
3270
3274
|
},
|
|
3271
3275
|
{
|
|
3272
3276
|
"kind": "function",
|
|
@@ -3408,7 +3412,7 @@
|
|
|
3408
3412
|
},
|
|
3409
3413
|
{
|
|
3410
3414
|
"kind": "class",
|
|
3411
|
-
"description": "Binds an `<fsl-instance>` to a segment of the URL fragment: restores from it\non connect and writes back (debounced, via `history.replaceState`) whenever\nthe machine is rebuilt. Inert when the host has no key (permalink_key_for\nreturns `null`), so an `fsl-instance` without an `id`/`uhash` never touches\n`location`.\n\nEcho guard: `_last` holds the segment most recently read or written, so a\nrestore→rebuild→write cycle and a self-induced `hashchange` are both no-ops.",
|
|
3415
|
+
"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: `_last` holds the segment most recently read or written, so a\r\nrestore→rebuild→write cycle and a self-induced `hashchange` are both no-ops.",
|
|
3412
3416
|
"name": "FslPermalinkSync",
|
|
3413
3417
|
"members": [
|
|
3414
3418
|
{
|
|
@@ -3653,6 +3657,280 @@
|
|
|
3653
3657
|
}
|
|
3654
3658
|
]
|
|
3655
3659
|
},
|
|
3660
|
+
{
|
|
3661
|
+
"kind": "javascript-module",
|
|
3662
|
+
"path": "src/ts/wc/fsl_stochastic_wc.ts",
|
|
3663
|
+
"declarations": [
|
|
3664
|
+
{
|
|
3665
|
+
"kind": "class",
|
|
3666
|
+
"description": "`<fsl-stochastic>` — a statistical/Monte-Carlo explorer for a parent\n`<fsl-instance>` (fsl#1384). Builds its own throwaway machine from the\nhost's `.fsl` source (never touching the live machine) and renders\naggregate run statistics in-panel. Standalone (no host) the controls are\ndisabled.",
|
|
3667
|
+
"name": "FslStochastic",
|
|
3668
|
+
"cssParts": [
|
|
3669
|
+
{
|
|
3670
|
+
"description": "The control row.",
|
|
3671
|
+
"name": "controls"
|
|
3672
|
+
}
|
|
3673
|
+
],
|
|
3674
|
+
"members": [
|
|
3675
|
+
{
|
|
3676
|
+
"kind": "field",
|
|
3677
|
+
"name": "runs",
|
|
3678
|
+
"default": "STOCHASTIC_DEFAULT_RUNS",
|
|
3679
|
+
"description": "Run-count (montecarlo). Defaults from editor_config().stochastic_run_count.",
|
|
3680
|
+
"attribute": "runs"
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
"kind": "field",
|
|
3684
|
+
"name": "maxSteps",
|
|
3685
|
+
"default": "STOCHASTIC_DEFAULT_MAX_STEPS",
|
|
3686
|
+
"description": "Per-run step cap (montecarlo) / walk length (steady_state).",
|
|
3687
|
+
"attribute": "maxSteps"
|
|
3688
|
+
},
|
|
3689
|
+
{
|
|
3690
|
+
"kind": "field",
|
|
3691
|
+
"name": "seed",
|
|
3692
|
+
"type": {
|
|
3693
|
+
"text": "string"
|
|
3694
|
+
},
|
|
3695
|
+
"default": "''",
|
|
3696
|
+
"description": "Seed string ('' = time-based). Kept as string so the field can be blank.",
|
|
3697
|
+
"attribute": "seed"
|
|
3698
|
+
},
|
|
3699
|
+
{
|
|
3700
|
+
"kind": "field",
|
|
3701
|
+
"name": "mode",
|
|
3702
|
+
"type": {
|
|
3703
|
+
"text": "JssmStochasticMode"
|
|
3704
|
+
},
|
|
3705
|
+
"default": "'montecarlo'",
|
|
3706
|
+
"description": "Run mode.",
|
|
3707
|
+
"attribute": "mode"
|
|
3708
|
+
},
|
|
3709
|
+
{
|
|
3710
|
+
"kind": "field",
|
|
3711
|
+
"name": "_summary",
|
|
3712
|
+
"type": {
|
|
3713
|
+
"text": "JssmStochasticSummary | null"
|
|
3714
|
+
},
|
|
3715
|
+
"privacy": "private",
|
|
3716
|
+
"default": "null"
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
"kind": "field",
|
|
3720
|
+
"name": "_error",
|
|
3721
|
+
"type": {
|
|
3722
|
+
"text": "string | null"
|
|
3723
|
+
},
|
|
3724
|
+
"privacy": "private",
|
|
3725
|
+
"default": "null"
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"kind": "field",
|
|
3729
|
+
"name": "_host",
|
|
3730
|
+
"type": {
|
|
3731
|
+
"text": "StochHost | null"
|
|
3732
|
+
},
|
|
3733
|
+
"privacy": "private",
|
|
3734
|
+
"default": "null"
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"kind": "field",
|
|
3738
|
+
"name": "_playing",
|
|
3739
|
+
"type": {
|
|
3740
|
+
"text": "boolean"
|
|
3741
|
+
},
|
|
3742
|
+
"privacy": "private",
|
|
3743
|
+
"default": "false"
|
|
3744
|
+
},
|
|
3745
|
+
{
|
|
3746
|
+
"kind": "field",
|
|
3747
|
+
"name": "run",
|
|
3748
|
+
"description": "Execute a batch synchronously and render the aggregates."
|
|
3749
|
+
},
|
|
3750
|
+
{
|
|
3751
|
+
"kind": "field",
|
|
3752
|
+
"name": "play",
|
|
3753
|
+
"description": "Animate the batch: accumulate runs incrementally via `requestAnimationFrame`,\nredrawing as they land. Resolves when the batch completes or is paused-to-stop.\n\nFalls back to immediate (synchronous chunk) scheduling under jsdom where\n`requestAnimationFrame` is undefined."
|
|
3754
|
+
},
|
|
3755
|
+
{
|
|
3756
|
+
"kind": "method",
|
|
3757
|
+
"name": "_commit",
|
|
3758
|
+
"privacy": "private",
|
|
3759
|
+
"return": {
|
|
3760
|
+
"type": {
|
|
3761
|
+
"text": "void"
|
|
3762
|
+
}
|
|
3763
|
+
},
|
|
3764
|
+
"parameters": [
|
|
3765
|
+
{
|
|
3766
|
+
"name": "state_visits",
|
|
3767
|
+
"type": {
|
|
3768
|
+
"text": "Map<string, number>"
|
|
3769
|
+
},
|
|
3770
|
+
"description": "Accumulated visit counts per state name."
|
|
3771
|
+
},
|
|
3772
|
+
{
|
|
3773
|
+
"name": "edge_traversals",
|
|
3774
|
+
"type": {
|
|
3775
|
+
"text": "Map<string, number>"
|
|
3776
|
+
},
|
|
3777
|
+
"description": "Accumulated traversal counts per edge key."
|
|
3778
|
+
},
|
|
3779
|
+
{
|
|
3780
|
+
"name": "path_lengths",
|
|
3781
|
+
"type": {
|
|
3782
|
+
"text": "number[]"
|
|
3783
|
+
},
|
|
3784
|
+
"description": "Lengths of completed (terminated) paths."
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
"name": "terminal_reached",
|
|
3788
|
+
"type": {
|
|
3789
|
+
"text": "number"
|
|
3790
|
+
},
|
|
3791
|
+
"description": "Count of runs that reached a terminal state."
|
|
3792
|
+
},
|
|
3793
|
+
{
|
|
3794
|
+
"name": "capped",
|
|
3795
|
+
"type": {
|
|
3796
|
+
"text": "number"
|
|
3797
|
+
},
|
|
3798
|
+
"description": "Count of runs that hit the step cap."
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
"name": "runs",
|
|
3802
|
+
"type": {
|
|
3803
|
+
"text": "number"
|
|
3804
|
+
},
|
|
3805
|
+
"description": "Total runs processed so far."
|
|
3806
|
+
},
|
|
3807
|
+
{
|
|
3808
|
+
"name": "seed",
|
|
3809
|
+
"type": {
|
|
3810
|
+
"text": "number"
|
|
3811
|
+
},
|
|
3812
|
+
"description": "The effective RNG seed used for this batch."
|
|
3813
|
+
}
|
|
3814
|
+
],
|
|
3815
|
+
"description": "Fold accumulated counters into a rendered summary. Shared by play\nfor incremental rendering during animation."
|
|
3816
|
+
},
|
|
3817
|
+
{
|
|
3818
|
+
"kind": "field",
|
|
3819
|
+
"name": "_togglePlay",
|
|
3820
|
+
"privacy": "private",
|
|
3821
|
+
"description": "Toggle between playing and paused. Starts a new play batch when idle."
|
|
3822
|
+
},
|
|
3823
|
+
{
|
|
3824
|
+
"kind": "field",
|
|
3825
|
+
"name": "_onMode",
|
|
3826
|
+
"privacy": "private"
|
|
3827
|
+
},
|
|
3828
|
+
{
|
|
3829
|
+
"kind": "field",
|
|
3830
|
+
"name": "_onRuns",
|
|
3831
|
+
"privacy": "private"
|
|
3832
|
+
},
|
|
3833
|
+
{
|
|
3834
|
+
"kind": "field",
|
|
3835
|
+
"name": "_onMax",
|
|
3836
|
+
"privacy": "private"
|
|
3837
|
+
},
|
|
3838
|
+
{
|
|
3839
|
+
"kind": "field",
|
|
3840
|
+
"name": "_onSeed",
|
|
3841
|
+
"privacy": "private"
|
|
3842
|
+
},
|
|
3843
|
+
{
|
|
3844
|
+
"kind": "method",
|
|
3845
|
+
"name": "_bars",
|
|
3846
|
+
"privacy": "private",
|
|
3847
|
+
"return": {
|
|
3848
|
+
"type": {
|
|
3849
|
+
"text": "TemplateResult"
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
},
|
|
3853
|
+
{
|
|
3854
|
+
"kind": "method",
|
|
3855
|
+
"name": "_panes",
|
|
3856
|
+
"privacy": "private",
|
|
3857
|
+
"return": {
|
|
3858
|
+
"type": {
|
|
3859
|
+
"text": "TemplateResult"
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3862
|
+
}
|
|
3863
|
+
],
|
|
3864
|
+
"events": [
|
|
3865
|
+
{
|
|
3866
|
+
"description": "CustomEvent<JssmStochasticSummary> after a run.",
|
|
3867
|
+
"name": "fsl-stochastic-complete"
|
|
3868
|
+
}
|
|
3869
|
+
],
|
|
3870
|
+
"attributes": [
|
|
3871
|
+
{
|
|
3872
|
+
"name": "runs",
|
|
3873
|
+
"default": "STOCHASTIC_DEFAULT_RUNS",
|
|
3874
|
+
"description": "Run-count (montecarlo). Defaults from editor_config().stochastic_run_count.",
|
|
3875
|
+
"fieldName": "runs"
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
"name": "maxSteps",
|
|
3879
|
+
"default": "STOCHASTIC_DEFAULT_MAX_STEPS",
|
|
3880
|
+
"description": "Per-run step cap (montecarlo) / walk length (steady_state).",
|
|
3881
|
+
"fieldName": "maxSteps"
|
|
3882
|
+
},
|
|
3883
|
+
{
|
|
3884
|
+
"name": "seed",
|
|
3885
|
+
"type": {
|
|
3886
|
+
"text": "string"
|
|
3887
|
+
},
|
|
3888
|
+
"default": "''",
|
|
3889
|
+
"description": "Seed string ('' = time-based). Kept as string so the field can be blank.",
|
|
3890
|
+
"fieldName": "seed"
|
|
3891
|
+
},
|
|
3892
|
+
{
|
|
3893
|
+
"name": "mode",
|
|
3894
|
+
"type": {
|
|
3895
|
+
"text": "JssmStochasticMode"
|
|
3896
|
+
},
|
|
3897
|
+
"default": "'montecarlo'",
|
|
3898
|
+
"description": "Run mode.",
|
|
3899
|
+
"fieldName": "mode"
|
|
3900
|
+
}
|
|
3901
|
+
],
|
|
3902
|
+
"superclass": {
|
|
3903
|
+
"name": "LitElement",
|
|
3904
|
+
"package": "lit"
|
|
3905
|
+
},
|
|
3906
|
+
"tagName": "fsl-stochastic",
|
|
3907
|
+
"customElement": true
|
|
3908
|
+
},
|
|
3909
|
+
{
|
|
3910
|
+
"kind": "variable",
|
|
3911
|
+
"name": "state_visits",
|
|
3912
|
+
"default": "new Map<string, number>()"
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
"kind": "variable",
|
|
3916
|
+
"name": "runs",
|
|
3917
|
+
"type": {
|
|
3918
|
+
"text": "number"
|
|
3919
|
+
},
|
|
3920
|
+
"default": "0"
|
|
3921
|
+
}
|
|
3922
|
+
],
|
|
3923
|
+
"exports": [
|
|
3924
|
+
{
|
|
3925
|
+
"kind": "js",
|
|
3926
|
+
"name": "FslStochastic",
|
|
3927
|
+
"declaration": {
|
|
3928
|
+
"name": "FslStochastic",
|
|
3929
|
+
"module": "src/ts/wc/fsl_stochastic_wc.ts"
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
]
|
|
3933
|
+
},
|
|
3656
3934
|
{
|
|
3657
3935
|
"kind": "javascript-module",
|
|
3658
3936
|
"path": "src/ts/wc/fsl_themes.ts",
|
|
@@ -4603,6 +4881,14 @@
|
|
|
4603
4881
|
"name": "FslExport",
|
|
4604
4882
|
"module": "./fsl_export_wc.js"
|
|
4605
4883
|
}
|
|
4884
|
+
},
|
|
4885
|
+
{
|
|
4886
|
+
"kind": "js",
|
|
4887
|
+
"name": "FslStochastic",
|
|
4888
|
+
"declaration": {
|
|
4889
|
+
"name": "FslStochastic",
|
|
4890
|
+
"module": "./fsl_stochastic_wc.js"
|
|
4891
|
+
}
|
|
4606
4892
|
}
|
|
4607
4893
|
]
|
|
4608
4894
|
}
|