jssm 5.104.2 → 5.112.3

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.
Files changed (62) hide show
  1. package/.gitattributes +17 -6
  2. package/.log-progress.json +9 -0
  3. package/CHANGELOG.md +130 -45
  4. package/CLAUDE.md +11 -0
  5. package/MIGRATING-jssm-viz.md +67 -0
  6. package/README.md +179 -882
  7. package/dist/es6/fsl_parser.js +1 -1
  8. package/dist/es6/jssm.d.ts +773 -39
  9. package/dist/es6/jssm.js +921 -89
  10. package/dist/es6/jssm_arrow.js +24 -0
  11. package/dist/es6/jssm_compiler.d.ts +17 -2
  12. package/dist/es6/jssm_compiler.js +17 -3
  13. package/dist/es6/jssm_constants.d.ts +27 -0
  14. package/dist/es6/jssm_constants.js +27 -0
  15. package/dist/es6/jssm_error.d.ts +19 -0
  16. package/dist/es6/jssm_error.js +19 -0
  17. package/dist/es6/jssm_theme.d.ts +11 -0
  18. package/dist/es6/jssm_theme.js +11 -0
  19. package/dist/es6/jssm_types.d.ts +29 -3
  20. package/dist/es6/jssm_util.d.ts +161 -9
  21. package/dist/es6/jssm_util.js +174 -17
  22. package/dist/es6/jssm_viz.d.ts +175 -0
  23. package/dist/es6/jssm_viz.js +560 -0
  24. package/dist/es6/jssm_viz_colors.d.ts +63 -0
  25. package/dist/es6/jssm_viz_colors.js +63 -0
  26. package/dist/es6/version.js +1 -1
  27. package/dist/jssm.es5.cjs +1 -1
  28. package/dist/jssm.es5.iife.js +1 -0
  29. package/dist/jssm.es5.nonmin.cjs +2201 -870
  30. package/dist/jssm.es6.mjs +1 -1
  31. package/dist/jssm.es6.nonmin.cjs +2200 -871
  32. package/dist/jssm_viz.cjs +1 -0
  33. package/dist/{jssm.es5.iife.nonmin.cjs → jssm_viz.es5.iife.nonmin.cjs} +2589 -1090
  34. package/dist/jssm_viz.es5.nonmin.cjs +24674 -0
  35. package/dist/jssm_viz.es6.nonmin.cjs +24661 -0
  36. package/dist/jssm_viz.iife.cjs +1 -0
  37. package/dist/jssm_viz.mjs +1 -0
  38. package/jest-dragon.config.cjs +4 -1
  39. package/jest-spec.config.cjs +9 -6
  40. package/jest-stoch.config.cjs +4 -1
  41. package/jest-unicode.config.cjs +4 -1
  42. package/jssm.es5.d.cts +950 -41
  43. package/jssm.es6.d.ts +950 -41
  44. package/jssm_viz.es5.d.cts +2127 -0
  45. package/jssm_viz.es6.d.ts +2127 -0
  46. package/log-progress.data.json +28 -0
  47. package/package.json +56 -23
  48. package/rollup.config.viz.es5.js +46 -0
  49. package/rollup.config.viz.es6.js +46 -0
  50. package/rollup.config.viz.iife.js +36 -0
  51. package/typedoc-options.cjs +4 -3
  52. package/dist/jssm.es5.iife.cjs +0 -1
  53. package/fsl_parser.d.ts +0 -6
  54. package/jssm.d.ts +0 -1141
  55. package/jssm_arrow.d.ts +0 -53
  56. package/jssm_compiler.d.ts +0 -135
  57. package/jssm_constants.d.ts +0 -5
  58. package/jssm_error.d.ts +0 -8
  59. package/jssm_theme.d.ts +0 -4
  60. package/jssm_types.d.ts +0 -378
  61. package/jssm_util.d.ts +0 -106
  62. package/version.d.ts +0 -2
@@ -0,0 +1,28 @@
1
+ {
2
+ "projectTitle": "jssm Progress Log",
3
+ "titleUrl": "https://stonecypher.github.io/jssm/",
4
+ "weeks": [
5
+ {
6
+ "sundayDate": "2026-05-10",
7
+ "label": "Week of May 10, 2026",
8
+ "entries": [
9
+ {
10
+ "title": "Tougher tests",
11
+ "body": "Began a serious upgrade in how the parser is tested: it now faces hundreds of randomly generated inputs per run, hunting for edge cases that fixed tests can never reach. This approach has already turned up real bugs that earlier coverage missed, and it lays the groundwork for an even more aggressive testing tier planned next."
12
+ },
13
+ {
14
+ "title": "Diagram polish",
15
+ "body": "State diagrams now adapt automatically to light and dark themes, classify each kind of state more accurately, and render noticeably faster. The result is sharper, more readable visuals out of the box with no extra configuration on the user's part."
16
+ },
17
+ {
18
+ "title": "Pattern cookbook",
19
+ "body": "Published an online cookbook of state-machine patterns and recipes that users can browse, learn from, and copy directly into their projects. This makes the library substantially easier to adopt for newcomers who would otherwise face a blank page."
20
+ },
21
+ {
22
+ "title": "Hardened releases",
23
+ "body": "Modernized how the project publishes new versions so the process no longer relies on stored credentials that could be stolen or misused. Releases are now verified cryptographically at the source, reducing tampering risk and bringing the project in line with current industry security practices."
24
+ }
25
+ ]
26
+ }
27
+ ]
28
+ }
package/package.json CHANGED
@@ -1,23 +1,39 @@
1
1
  {
2
2
  "name": "jssm",
3
- "version": "5.104.2",
3
+ "version": "5.112.3",
4
4
  "engines": {
5
5
  "node": ">=10.0.0"
6
6
  },
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
7
10
  "exports": {
8
- "require": {
9
- "types": "./jssm.es5.d.cts",
10
- "default": "./dist/jssm.es5.cjs"
11
- },
12
- "import": {
13
- "types": "./jssm.es6.d.ts",
14
- "default": "./dist/jssm.es6.mjs"
11
+ ".": {
12
+ "require": {
13
+ "types": "./jssm.es5.d.cts",
14
+ "default": "./dist/jssm.es5.cjs"
15
+ },
16
+ "import": {
17
+ "types": "./jssm.es6.d.ts",
18
+ "default": "./dist/jssm.es6.mjs"
19
+ },
20
+ "default": {
21
+ "types": "./jssm.es5.d.cts",
22
+ "default": "./dist/jssm.es5.cjs"
23
+ },
24
+ "browser": "./dist/jssm.es5.iife.js"
15
25
  },
16
- "default": {
17
- "types": "./jssm.es5.d.cts",
18
- "default": "./dist/jssm.es5.cjs"
19
- },
20
- "browser": "dist/jssm.es5.iife.cjs"
26
+ "./viz": {
27
+ "require": {
28
+ "types": "./jssm_viz.es5.d.cts",
29
+ "default": "./dist/jssm_viz.cjs"
30
+ },
31
+ "import": {
32
+ "types": "./jssm_viz.es6.d.ts",
33
+ "default": "./dist/jssm_viz.mjs"
34
+ },
35
+ "browser": "./dist/jssm_viz.iife.cjs"
36
+ }
21
37
  },
22
38
  "autoupdate": {
23
39
  "source": "git",
@@ -35,8 +51,8 @@
35
51
  "description": "A Javascript finite state machine (FSM) with a terse DSL and a simple API. Most FSMs are one-liners. Fast, easy, powerful, well tested, typed with TypeScript, and visualizations. MIT License.",
36
52
  "main": "dist/jssm.es5.cjs",
37
53
  "module": "dist/jssm.es6.js",
38
- "browser": "dist/jssm.es5.iife.cjs",
39
- "types": "./jssm.d.ts",
54
+ "browser": "dist/jssm.es5.iife.js",
55
+ "types": "./jssm.es5.d.cts",
40
56
  "scripts": {
41
57
  "jest-unicode-action": "jest unicode-actions.uspec.ts -c jest-unicode.config.cjs --color --verbose",
42
58
  "jest-unicode-string": "jest unicode-strings.uspec.ts -c jest-unicode.config.cjs --color --verbose",
@@ -49,30 +65,39 @@
49
65
  "jest-spec": "jest -c jest-spec.config.cjs --color --verbose",
50
66
  "jest": "npm run jest-stoch && npm run jest-spec",
51
67
  "test": "npm run make && npm run jest",
52
- "clean": "rm -rf dist && rm -rf docs && cd coverage && rm -rf cloc && cd .. && rm -f src/ts/fsl_parser.ts && rm -f src/ts/version.ts && rm -f *.d.ts && mkdir dist && mkdir docs && cd coverage && mkdir cloc && cd .. && rm -f ./src/tools/jssm.es5.iife.nonmin.cjs",
68
+ "clean": "rm -rf dist && rm -rf docs && cd coverage && rm -rf cloc && cd .. && rm -f src/ts/fsl_parser.ts && rm -f src/ts/version.ts && rm -f *.d.ts && mkdir dist && mkdir docs && cd coverage && mkdir cloc && cd .. && rm -f ./src/tools/jssm.es5.iife.nonmin.js",
53
69
  "peg": "rm -f src/ts/fsl_parser.js && pegjs src/ts/fsl_parser.peg && node src/buildjs/fixparser.cjs",
54
70
  "make_cjs": "rollup -c rollup.config.es5.js",
55
71
  "make_es6": "rollup -c rollup.config.es6.js",
56
72
  "make_iife": "rollup -c rollup.config.iife.js",
57
73
  "make_deno": "rollup -c rollup.config.deno.js && cp dist/es6/*.d.ts dist/deno",
58
- "typescript": "tsc --build tsconfig.json && cp dist/es6/*.d.ts .",
74
+ "make_viz_cjs": "rollup -c rollup.config.viz.es5.js",
75
+ "make_viz_es6": "rollup -c rollup.config.viz.es6.js",
76
+ "make_viz_iife": "rollup -c rollup.config.viz.iife.js",
77
+ "typescript": "tsc --build tsconfig.json",
59
78
  "makever": "node src/buildjs/makever.cjs",
60
- "make": "npm run clean && npm run makever && npm run peg && npm run typescript && npm run make_iife && npm run make_es6 && npm run make_deno && npm run make_cjs && npm run minify && npm run min_iife && npm run min_es6 && npm run min_cjs && npm run min_deno && rm ./dist/es6/*.nonmin.js",
79
+ "make": "npm run clean && npm run makever && npm run peg && npm run typescript && npm run make_iife && npm run make_es6 && npm run make_deno && npm run make_cjs && npm run make_viz_iife && npm run make_viz_es6 && npm run make_viz_cjs && npm run minify && npm run min_iife && npm run min_es6 && npm run min_cjs && npm run min_deno && npm run min_viz_iife && npm run min_viz_es6 && npm run min_viz_cjs && rm ./dist/es6/*.nonmin.js",
61
80
  "eslint": "eslint --color src/ts/jssm.ts src/ts/jssm_types.ts src/ts/tests/*.ts",
62
81
  "audit": "text_audit -r -t major MAJOR wasteful WASTEFUL any mixed fixme FIXME checkme CHECKME testme TESTME stochable STOCHABLE todo TODO comeback COMEBACK whargarbl WHARGARBL -g ./src/ts/**/*.{js,ts}",
63
82
  "vet": "npm run eslint && npm run audit",
64
83
  "benny": "node ./src/buildjs/benchmark.cjs",
65
- "build": "npm run vet && npm run test && npm run site && npm run changelog && npm run docs && npm run cloc && npm run readme",
84
+ "ci_profile": "node ./src/buildjs/ci_profile.cjs",
85
+ "build": "npm run vet && npm run test && npm run site && npm run make_cookbook && npm run site_fsl_tools && npm run changelog && npm run docs && npm run cloc && npm run readme",
66
86
  "clean_bench": "npm run test && npm run benny",
67
87
  "qbuild": "npm run test",
68
88
  "ci_build": "npm run vet && npm run test",
69
89
  "minify": "mv dist/es6/fsl_parser.js dist/es6/fsl_parser.nonmin.js && terser dist/es6/fsl_parser.nonmin.js > dist/es6/fsl_parser.js",
70
- "min_iife": "mv dist/jssm.es5.iife.js dist/jssm.es5.iife.nonmin.cjs && terser dist/jssm.es5.iife.nonmin.cjs > dist/jssm.es5.iife.cjs && cp dist/jssm.es5.iife.nonmin.cjs ./src/tools/",
90
+ "min_iife": "mv dist/jssm.es5.iife.js dist/jssm.es5.iife.nonmin.js && terser dist/jssm.es5.iife.nonmin.js > dist/jssm.es5.iife.js && cp dist/jssm.es5.iife.nonmin.js ./src/tools/",
71
91
  "min_cjs": "mv dist/jssm.es5.cjs.js dist/jssm.es5.nonmin.cjs && terser dist/jssm.es5.nonmin.cjs > dist/jssm.es5.cjs",
72
92
  "min_es6": "mv dist/jssm.es6.js dist/jssm.es6.nonmin.cjs && terser dist/jssm.es6.nonmin.cjs > dist/jssm.es6.mjs",
73
93
  "min_deno": "terser dist/deno/jssm.deno-esm.nonmin.js > dist/deno/jssm.js",
74
- "site": "cp src/site/* docs/ && cp -r src/assets docs/assets/",
75
- "docs": "typedoc src/ts/jssm.ts src/ts/jssm_types.ts src/ts/jssm_constants.ts src/ts/jssm_error.ts src/ts/jssm_util.ts src/ts/version.ts --options typedoc-options.cjs",
94
+ "min_viz_iife": "mv dist/jssm_viz.es5.iife.js dist/jssm_viz.es5.iife.nonmin.cjs && terser dist/jssm_viz.es5.iife.nonmin.cjs > dist/jssm_viz.iife.cjs",
95
+ "min_viz_cjs": "mv dist/jssm_viz.es5.cjs.js dist/jssm_viz.es5.nonmin.cjs && terser dist/jssm_viz.es5.nonmin.cjs > dist/jssm_viz.cjs",
96
+ "min_viz_es6": "mv dist/jssm_viz.es6.js dist/jssm_viz.es6.nonmin.cjs && terser dist/jssm_viz.es6.nonmin.cjs > dist/jssm_viz.mjs",
97
+ "site": "cp src/site/* docs/ && cp -r src/assets docs/assets/ && cp -r src/demo docs/ && cp dist/jssm.es5.iife.js docs/demo",
98
+ "make_cookbook": "node src/fsl.tools/site/scripts/build.cjs",
99
+ "site_fsl_tools": "cd docs && mkdir fsl.tools && cd .. && cp -r src/fsl.tools/site/* docs/fsl.tools/ && rm -rf docs/fsl.tools/recipes docs/fsl.tools/scripts",
100
+ "docs": "typedoc src/ts/jssm.ts src/ts/jssm_viz.ts src/ts/jssm_types.ts src/ts/jssm_constants.ts src/ts/jssm_error.ts src/ts/jssm_util.ts src/ts/version.ts --options typedoc-options.cjs",
76
101
  "cloc": "cloc --quiet ./src/** --exclude-list-file=./.clocignore --3 --json --out=./coverage/cloc/report_wt.json && cloc --quiet ./src/** --exclude-list-file=./.clocignore --exclude-dir=tests --3 --json --out=./coverage/cloc/report_nt.json && node ./src/buildjs/cloc_report.cjs",
77
102
  "readme": "rm -f ./README.md && node ./src/buildjs/make_readme.cjs && cp README.md dist/deno",
78
103
  "changelog": "rm -f CHANGELOG.md && rm -f ./src/doc_md/CHANGELOG.md && better_git_changelog -b && cp CHANGELOG.* ./src/doc_md/"
@@ -124,10 +149,14 @@
124
149
  "@rollup/plugin-commonjs": "^28.0.1",
125
150
  "@rollup/plugin-node-resolve": "^15.3.0",
126
151
  "@rollup/plugin-replace": "^6.0.1",
152
+ "@swc/core": "^1.15.33",
153
+ "@swc/jest": "^0.2.39",
127
154
  "@types/chalk": "^2.2.0",
128
155
  "@types/jest": "^29.5.12",
156
+ "@types/jsdom": "^21.1.7",
129
157
  "@typescript-eslint/eslint-plugin": "^5.30.4",
130
158
  "@typescript-eslint/parser": "^5.30.4",
159
+ "@viz-js/viz": "^3.26.0",
131
160
  "benny": "^3.7.1",
132
161
  "cloc": "^2.10.0",
133
162
  "eslint": "^7.32.0",
@@ -139,7 +168,9 @@
139
168
  "fast-check": "^2.12.0",
140
169
  "glob": "^7.1.6",
141
170
  "jest": "^29.7.0",
171
+ "jest-environment-jsdom": "^30.3.0",
142
172
  "jest-json-reporter2": "^1.1.0",
173
+ "jsdom": "^24.1.0",
143
174
  "pegjs": "^0.10.0",
144
175
  "picocolors": "^1.0.0",
145
176
  "rollup": "^4.24.0",
@@ -147,7 +178,6 @@
147
178
  "semver": "^7.5.4",
148
179
  "terser": "^5.14.2",
149
180
  "text_audit": "^0.9.3",
150
- "ts-jest": "^29.1.5",
151
181
  "twitter-api-client": "^1.6.0",
152
182
  "typedoc": "^0.22.18",
153
183
  "typedoc-plugin-missing-exports": "^0.23.0",
@@ -158,5 +188,8 @@
158
188
  "better_git_changelog": "^1.6.1",
159
189
  "circular_buffer_js": "^1.10.0",
160
190
  "reduce-to-639-1": "^1.1.0"
191
+ },
192
+ "optionalDependencies": {
193
+ "@viz-js/viz": "^3.26.0"
161
194
  }
162
195
  }
@@ -0,0 +1,46 @@
1
+
2
+ import nodeResolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import replace from '@rollup/plugin-replace';
5
+ import dts from "rollup-plugin-dts";
6
+
7
+
8
+ const config = [{
9
+
10
+ input: 'dist/es6/jssm_viz.js',
11
+
12
+ output: {
13
+ file : 'dist/jssm_viz.es5.cjs.js',
14
+ format : 'cjs',
15
+ name : 'jssm_viz'
16
+ },
17
+
18
+ external : ['@viz-js/viz'],
19
+
20
+ plugins : [
21
+ nodeResolve({
22
+ mainFields : ['module', 'main'],
23
+ browser : false,
24
+ extensions : ['.js', '.json', '.ts', '.tsx'],
25
+ preferBuiltins : false
26
+ }),
27
+ commonjs(),
28
+ replace({
29
+ preventAssignment : true,
30
+ 'process.env.NODE_ENV' : JSON.stringify('production')
31
+ })
32
+ ]
33
+ }, {
34
+
35
+ input: 'dist/es6/jssm_viz.d.ts',
36
+
37
+ output: {
38
+ file : './jssm_viz.es5.d.cts',
39
+ format : 'es'
40
+ },
41
+
42
+ plugins : [dts()]
43
+ }];
44
+
45
+
46
+ export default config;
@@ -0,0 +1,46 @@
1
+
2
+ import nodeResolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import replace from '@rollup/plugin-replace';
5
+ import dts from "rollup-plugin-dts";
6
+
7
+
8
+ const config = [{
9
+
10
+ input: 'dist/es6/jssm_viz.js',
11
+
12
+ output: {
13
+ file : 'dist/jssm_viz.es6.js',
14
+ format : 'es',
15
+ name : 'jssm_viz'
16
+ },
17
+
18
+ external : ['@viz-js/viz'],
19
+
20
+ plugins : [
21
+ nodeResolve({
22
+ mainFields : ['module', 'main'],
23
+ browser : true,
24
+ extensions : ['.js', '.json', '.ts', '.tsx'],
25
+ preferBuiltins : false
26
+ }),
27
+ commonjs(),
28
+ replace({
29
+ preventAssignment : true,
30
+ 'process.env.NODE_ENV' : JSON.stringify('production')
31
+ })
32
+ ]
33
+ }, {
34
+
35
+ input: 'dist/es6/jssm_viz.d.ts',
36
+
37
+ output: {
38
+ file : './jssm_viz.es6.d.ts',
39
+ format : 'es'
40
+ },
41
+
42
+ plugins : [dts()]
43
+ }];
44
+
45
+
46
+ export default config;
@@ -0,0 +1,36 @@
1
+
2
+ import nodeResolve from '@rollup/plugin-node-resolve';
3
+ import commonjs from '@rollup/plugin-commonjs';
4
+ import replace from '@rollup/plugin-replace';
5
+
6
+
7
+ const config = [{
8
+
9
+ input: 'dist/es6/jssm_viz.js',
10
+
11
+ output: {
12
+ file : 'dist/jssm_viz.es5.iife.js',
13
+ format : 'iife',
14
+ name : 'jssm_viz',
15
+ inlineDynamicImports: false
16
+ },
17
+
18
+ external : ['@viz-js/viz'],
19
+
20
+ plugins : [
21
+ nodeResolve({
22
+ mainFields : ['module', 'main'],
23
+ browser : true,
24
+ extensions : ['.js', '.json', '.ts', '.tsx'],
25
+ preferBuiltins : false
26
+ }),
27
+ commonjs(),
28
+ replace({
29
+ preventAssignment : true,
30
+ 'process.env.NODE_ENV' : JSON.stringify('production')
31
+ })
32
+ ]
33
+ }];
34
+
35
+
36
+ export default config;
@@ -47,9 +47,10 @@ module.exports = {
47
47
  ] },
48
48
  ] },
49
49
  { title: 'Tools', childrenDir: './', children: [
50
- { title: 'Live Editor', source: 'live_editor.md' },
51
- { title: 'Github Action', source: 'todo.md' },
52
- { title: 'CLI', source: 'todo.md' },
50
+ { title: 'Live Editor', source: 'live_editor.md' },
51
+ { title: 'Visualization', source: 'Visualization.md' },
52
+ { title: 'Github Action', source: 'todo.md' },
53
+ { title: 'CLI', source: 'todo.md' },
53
54
  ] },
54
55
  { title: 'VIRTUAL', childrenDir: './', children: [
55
56
  { title: 'Community', source: 'community.md' }