jssm 5.118.0 → 5.119.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 +31 -7
- package/custom-elements.json +138 -0
- package/dist/cdn/viz.js +24901 -0
- package/dist/deno/README.md +31 -7
- package/dist/deno/jssm.js +1 -1
- package/dist/deno/jssm_viz.d.ts +16 -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/viz.define.js +6 -0
- package/dist/wc/viz.js +135 -0
- package/jssm_viz.es5.d.cts +16 -1
- package/jssm_viz.es6.d.ts +16 -1
- package/package.json +36 -6
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.119.0 at 5/13/2026, 4:03:07 PM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.
|
|
24
|
+
# jssm 5.119.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/) ·
|
|
@@ -120,6 +120,30 @@ usage patterns.
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
<br/>
|
|
124
|
+
|
|
125
|
+
## Web Components
|
|
126
|
+
|
|
127
|
+
`jssm` ships Lit-based web components for use in plain HTML or as a base for framework wrappers.
|
|
128
|
+
|
|
129
|
+
CDN one-liner (with an import map for `@viz-js/viz`):
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/jssm/dist/cdn/viz.js"></script>
|
|
133
|
+
<jssm-viz fsl="Off -> On -> Off;"></jssm-viz>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
npm one-liner:
|
|
137
|
+
|
|
138
|
+
```ts
|
|
139
|
+
import 'jssm/wc/viz/define';
|
|
140
|
+
// then use <jssm-viz fsl="..."> anywhere
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Full documentation: [src/doc_md/WebComponents.md](src/doc_md/WebComponents.md).
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
123
147
|
<br/>
|
|
124
148
|
|
|
125
149
|
## 60-second tour
|
|
@@ -198,7 +222,7 @@ That decision shows up everywhere downstream:
|
|
|
198
222
|
or run `npm run benny` against your own machine.
|
|
199
223
|
|
|
200
224
|
- **More thoroughly tested than any other JavaScript state-machine
|
|
201
|
-
library.** 5,
|
|
225
|
+
library.** 5,809 tests at 100.0% line coverage
|
|
202
226
|
([report](https://coveralls.io/github/StoneCypher/jssm)), plus
|
|
203
227
|
fuzz testing via `fast-check`, with parser test data across ten natural
|
|
204
228
|
languages and Emoji.
|
|
@@ -331,11 +355,11 @@ If your contribution is missing here, please open an issue.
|
|
|
331
355
|
|
|
332
356
|
<br/>
|
|
333
357
|
|
|
334
|
-
***5,
|
|
358
|
+
***5,809 tests***, run 56,596 times.
|
|
335
359
|
|
|
336
|
-
- 5,
|
|
337
|
-
-
|
|
338
|
-
- 3,
|
|
360
|
+
- 5,296 specs with 100.0% coverage
|
|
361
|
+
- 513 fuzz tests with 59.2% coverage
|
|
362
|
+
- 3,593 TypeScript lines - 1.6 tests per line, 15.8 generated tests per line
|
|
339
363
|
|
|
340
364
|
[](https://github.com/StoneCypher/jssm/actions)
|
|
341
365
|
[](https://www.npmjs.com/package/jssm)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/ts/wc/jssm_viz_wc.ts",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "function",
|
|
11
|
+
"name": "normalize_viz_error",
|
|
12
|
+
"return": {
|
|
13
|
+
"type": {
|
|
14
|
+
"text": ""
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"parameters": [
|
|
18
|
+
{
|
|
19
|
+
"name": "e",
|
|
20
|
+
"type": {
|
|
21
|
+
"text": "unknown"
|
|
22
|
+
},
|
|
23
|
+
"description": "The thrown value to normalize."
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"description": "Normalize an arbitrary thrown value into a JssmVizErrorDetail.\r\nAccepts anything (Error instances, JssmErrors with `.location`, plain\r\nstrings, etc.) and always produces a string `message`.\r\n\r\n```typescript\r\nnormalize_viz_error(new Error('boom'));\r\n// => { message: 'boom', location: undefined }\r\n\r\nnormalize_viz_error({ message: 'parse failed', location: { line: 1 } });\r\n// => { message: 'parse failed', location: { line: 1 } }\r\n\r\nnormalize_viz_error('bare string failure');\r\n// => { message: 'bare string failure', location: undefined }\r\n```"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "class",
|
|
30
|
+
"description": "Web component that renders a jssm machine as inline SVG.",
|
|
31
|
+
"name": "JssmViz",
|
|
32
|
+
"cssProperties": [
|
|
33
|
+
{
|
|
34
|
+
"description": "Minimum height of the rendered SVG container.",
|
|
35
|
+
"name": "--jssm-viz-min-height",
|
|
36
|
+
"default": "100px"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"members": [
|
|
40
|
+
{
|
|
41
|
+
"kind": "field",
|
|
42
|
+
"name": "fsl",
|
|
43
|
+
"type": {
|
|
44
|
+
"text": "string"
|
|
45
|
+
},
|
|
46
|
+
"default": "''",
|
|
47
|
+
"description": "FSL source to render.",
|
|
48
|
+
"attribute": "fsl"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "field",
|
|
52
|
+
"name": "engine",
|
|
53
|
+
"type": {
|
|
54
|
+
"text": "string | undefined"
|
|
55
|
+
},
|
|
56
|
+
"default": "undefined",
|
|
57
|
+
"description": "Optional Graphviz layout engine override (e.g. 'dot', 'neato').",
|
|
58
|
+
"attribute": "engine"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"kind": "field",
|
|
62
|
+
"name": "_svg",
|
|
63
|
+
"type": {
|
|
64
|
+
"text": "string"
|
|
65
|
+
},
|
|
66
|
+
"privacy": "private",
|
|
67
|
+
"default": "''"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"kind": "method",
|
|
71
|
+
"name": "_renderSvg",
|
|
72
|
+
"privacy": "private",
|
|
73
|
+
"return": {
|
|
74
|
+
"type": {
|
|
75
|
+
"text": ""
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"description": "Render the current `fsl` source to an SVG string via the headless\r\n`fsl_to_svg_string` pipeline. Updates `_svg` on success; emits a\r\n`viz-error` `CustomEvent` on failure. Guards against stale results\r\nwhen `fsl` changes mid-flight."
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"events": [
|
|
82
|
+
{
|
|
83
|
+
"name": "viz-error",
|
|
84
|
+
"type": {
|
|
85
|
+
"text": "CustomEvent<{ message: string; location?: unknown }>"
|
|
86
|
+
},
|
|
87
|
+
"description": "Fires when the FSL source fails to parse or render."
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"attributes": [
|
|
91
|
+
{
|
|
92
|
+
"name": "fsl",
|
|
93
|
+
"type": {
|
|
94
|
+
"text": "string"
|
|
95
|
+
},
|
|
96
|
+
"default": "''",
|
|
97
|
+
"description": "FSL source to render.",
|
|
98
|
+
"fieldName": "fsl"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "engine",
|
|
102
|
+
"type": {
|
|
103
|
+
"text": "string | undefined"
|
|
104
|
+
},
|
|
105
|
+
"default": "undefined",
|
|
106
|
+
"description": "Optional Graphviz layout engine override (e.g. 'dot', 'neato').",
|
|
107
|
+
"fieldName": "engine"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"superclass": {
|
|
111
|
+
"name": "LitElement",
|
|
112
|
+
"package": "lit"
|
|
113
|
+
},
|
|
114
|
+
"tagName": "jssm-viz",
|
|
115
|
+
"customElement": true
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"exports": [
|
|
119
|
+
{
|
|
120
|
+
"kind": "js",
|
|
121
|
+
"name": "normalize_viz_error",
|
|
122
|
+
"declaration": {
|
|
123
|
+
"name": "normalize_viz_error",
|
|
124
|
+
"module": "src/ts/wc/jssm_viz_wc.ts"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"kind": "js",
|
|
129
|
+
"name": "JssmViz",
|
|
130
|
+
"declaration": {
|
|
131
|
+
"name": "JssmViz",
|
|
132
|
+
"module": "src/ts/wc/jssm_viz_wc.ts"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
]
|
|
138
|
+
}
|