state-machine-cat 11.1.4 → 12.0.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 +2 -14
- package/dist/parse/smcat/smcat-parser.mjs +10 -31
- package/dist/version.mjs +1 -1
- package/package.json +19 -28
package/README.md
CHANGED
|
@@ -52,17 +52,6 @@ To enable me to make state charts ...
|
|
|
52
52
|
|
|
53
53
|
A no-frills interpreter on line: [state-machine-cat.js.org](https://state-machine-cat.js.org).
|
|
54
54
|
|
|
55
|
-
### Within the Atom editor
|
|
56
|
-
|
|
57
|
-
There's an [Atom package](https://atom.io/packages/state-machine-cat-preview)
|
|
58
|
-
with syntax highlighting, a previewer and some export options. You can install
|
|
59
|
-
it from within Atom (search for _state machine cat_ in the _install_ section
|
|
60
|
-
of the settings screen) or use `apm i state-machine-cat-preview`
|
|
61
|
-
if you're a command line person.
|
|
62
|
-
|
|
63
|
-
OTOH. if you're a command line person the _command line interface_ might be
|
|
64
|
-
something for you too:
|
|
65
|
-
|
|
66
55
|
### Command line interface
|
|
67
56
|
|
|
68
57
|
Just `npm install --global state-machine-cat` and run `smcat`
|
|
@@ -124,8 +113,7 @@ bin/smcat --dot-graph-attrs "bgcolor=transparent splines=line" docs/sample.smcat
|
|
|
124
113
|
|
|
125
114
|
### Syntax highlighting
|
|
126
115
|
|
|
127
|
-
- For editors supporting tree sitter (like atom): there's [tree-sitter-smcat](https://github.com/sverweij/tree-sitter-smcat)
|
|
128
|
-
- The [atom-state-machine-cat-preview](https://github.com/sverweij/atom-state-machine-cat-preview) plugin includes syntax highlighting for atom as well.
|
|
116
|
+
- For editors supporting tree sitter (like the now defunct atom): there's [tree-sitter-smcat](https://github.com/sverweij/tree-sitter-smcat)
|
|
129
117
|
- For vim there's [ambagasdowa/vim-syntax-smcat](https://github.com/ambagasdowa/vim-syntax-smcat/)
|
|
130
118
|
|
|
131
119
|
### State chart XML (SCXML)
|
|
@@ -207,7 +195,7 @@ off => on: switch flicked/
|
|
|
207
195
|
|
|
208
196
|
> You note that smcat rendered the states in this chart _top down_ instead of
|
|
209
197
|
> _left to right_. It did that because we told it so. You can do that too
|
|
210
|
-
> with `--direction` on the command line
|
|
198
|
+
> with `--direction` on the command line
|
|
211
199
|
|
|
212
200
|
#### notes
|
|
213
201
|
|
|
@@ -389,15 +389,6 @@ function peg$parse(input, options) {
|
|
|
389
389
|
var peg$f38 = function (c) { return c; };
|
|
390
390
|
var peg$f39 = function (c) { return c; };
|
|
391
391
|
var peg$f40 = function (chars) { return chars.join(""); };
|
|
392
|
-
var peg$f41 = function (c) { return c; };
|
|
393
|
-
var peg$f42 = function (c) { return c; };
|
|
394
|
-
var peg$f43 = function (c) { return c; };
|
|
395
|
-
var peg$f44 = function (start, com, end) {
|
|
396
|
-
return start + com.join("") + end;
|
|
397
|
-
};
|
|
398
|
-
var peg$f45 = function (start, com) {
|
|
399
|
-
return start + com.join("");
|
|
400
|
-
};
|
|
401
392
|
var peg$currPos = 0;
|
|
402
393
|
var peg$savedPos = 0;
|
|
403
394
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
@@ -2673,22 +2664,16 @@ function peg$parse(input, options) {
|
|
|
2673
2664
|
function peg$parsewhitespace() {
|
|
2674
2665
|
var s0, s1;
|
|
2675
2666
|
peg$silentFails++;
|
|
2676
|
-
s0 = peg$currPos;
|
|
2677
2667
|
if (peg$r3.test(input.charAt(peg$currPos))) {
|
|
2678
|
-
|
|
2668
|
+
s0 = input.charAt(peg$currPos);
|
|
2679
2669
|
peg$currPos++;
|
|
2680
2670
|
}
|
|
2681
2671
|
else {
|
|
2682
|
-
|
|
2672
|
+
s0 = peg$FAILED;
|
|
2683
2673
|
if (peg$silentFails === 0) {
|
|
2684
2674
|
peg$fail(peg$e70);
|
|
2685
2675
|
}
|
|
2686
2676
|
}
|
|
2687
|
-
if (s1 !== peg$FAILED) {
|
|
2688
|
-
peg$savedPos = s0;
|
|
2689
|
-
s1 = peg$f41(s1);
|
|
2690
|
-
}
|
|
2691
|
-
s0 = s1;
|
|
2692
2677
|
peg$silentFails--;
|
|
2693
2678
|
if (s0 === peg$FAILED) {
|
|
2694
2679
|
s1 = peg$FAILED;
|
|
@@ -2701,22 +2686,16 @@ function peg$parse(input, options) {
|
|
|
2701
2686
|
function peg$parselineend() {
|
|
2702
2687
|
var s0, s1;
|
|
2703
2688
|
peg$silentFails++;
|
|
2704
|
-
s0 = peg$currPos;
|
|
2705
2689
|
if (peg$r4.test(input.charAt(peg$currPos))) {
|
|
2706
|
-
|
|
2690
|
+
s0 = input.charAt(peg$currPos);
|
|
2707
2691
|
peg$currPos++;
|
|
2708
2692
|
}
|
|
2709
2693
|
else {
|
|
2710
|
-
|
|
2694
|
+
s0 = peg$FAILED;
|
|
2711
2695
|
if (peg$silentFails === 0) {
|
|
2712
2696
|
peg$fail(peg$e72);
|
|
2713
2697
|
}
|
|
2714
2698
|
}
|
|
2715
|
-
if (s1 !== peg$FAILED) {
|
|
2716
|
-
peg$savedPos = s0;
|
|
2717
|
-
s1 = peg$f42(s1);
|
|
2718
|
-
}
|
|
2719
|
-
s0 = s1;
|
|
2720
2699
|
peg$silentFails--;
|
|
2721
2700
|
if (s0 === peg$FAILED) {
|
|
2722
2701
|
s1 = peg$FAILED;
|
|
@@ -2789,8 +2768,8 @@ function peg$parse(input, options) {
|
|
|
2789
2768
|
}
|
|
2790
2769
|
}
|
|
2791
2770
|
if (s2 !== peg$FAILED) {
|
|
2792
|
-
|
|
2793
|
-
s0 =
|
|
2771
|
+
s1 = [s1, s2];
|
|
2772
|
+
s0 = s1;
|
|
2794
2773
|
}
|
|
2795
2774
|
else {
|
|
2796
2775
|
peg$currPos = s0;
|
|
@@ -2816,8 +2795,8 @@ function peg$parse(input, options) {
|
|
|
2816
2795
|
}
|
|
2817
2796
|
s3 = peg$parsemlcomend();
|
|
2818
2797
|
if (s3 !== peg$FAILED) {
|
|
2819
|
-
|
|
2820
|
-
s0 =
|
|
2798
|
+
s1 = [s1, s2, s3];
|
|
2799
|
+
s0 = s1;
|
|
2821
2800
|
}
|
|
2822
2801
|
else {
|
|
2823
2802
|
peg$currPos = s0;
|
|
@@ -2869,8 +2848,8 @@ function peg$parse(input, options) {
|
|
|
2869
2848
|
s2.push(s3);
|
|
2870
2849
|
s3 = peg$parseslcomtok();
|
|
2871
2850
|
}
|
|
2872
|
-
|
|
2873
|
-
s0 =
|
|
2851
|
+
s1 = [s1, s2];
|
|
2852
|
+
s0 = s1;
|
|
2874
2853
|
}
|
|
2875
2854
|
else {
|
|
2876
2855
|
peg$currPos = s0;
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "
|
|
1
|
+
export const version = "12.0.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "state-machine-cat",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "write beautiful state charts",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -90,59 +90,50 @@
|
|
|
90
90
|
"state-machine-cat": "bin/smcat.mjs"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@hpcc-js/wasm": "2.
|
|
93
|
+
"@hpcc-js/wasm": "2.14.0",
|
|
94
94
|
"ajv": "8.12.0",
|
|
95
95
|
"commander": "11.0.0",
|
|
96
|
-
"fast-xml-parser": "4.2
|
|
96
|
+
"fast-xml-parser": "4.3.2",
|
|
97
97
|
"handlebars": "4.7.8",
|
|
98
98
|
"he": "1.2.0",
|
|
99
99
|
"semver": "^7.5.4",
|
|
100
100
|
"traverse": "0.6.7"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@types/
|
|
104
|
-
"@types/
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@typescript-eslint/eslint-plugin": "6.2.1",
|
|
108
|
-
"@typescript-eslint/parser": "6.2.1",
|
|
103
|
+
"@types/he": "1.2.1",
|
|
104
|
+
"@types/mocha": "10.0.2",
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
106
|
+
"@typescript-eslint/parser": "6.7.4",
|
|
109
107
|
"c8": "8.0.1",
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"eslint": "8.46.0",
|
|
108
|
+
"dependency-cruiser": "14.1.0",
|
|
109
|
+
"esbuild": "0.19.4",
|
|
110
|
+
"eslint": "8.51.0",
|
|
114
111
|
"eslint-config-moving-meadow": "4.0.2",
|
|
115
|
-
"eslint-config-prettier": "
|
|
112
|
+
"eslint-config-prettier": "9.0.0",
|
|
116
113
|
"eslint-plugin-budapestian": "5.0.1",
|
|
117
114
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
118
|
-
"eslint-plugin-import": "2.28.
|
|
119
|
-
"eslint-plugin-mocha": "10.
|
|
115
|
+
"eslint-plugin-import": "2.28.1",
|
|
116
|
+
"eslint-plugin-mocha": "10.2.0",
|
|
120
117
|
"eslint-plugin-node": "11.1.0",
|
|
121
118
|
"eslint-plugin-security": "1.7.1",
|
|
122
119
|
"eslint-plugin-unicorn": "48.0.1",
|
|
123
120
|
"husky": "8.0.3",
|
|
124
121
|
"is-pdf": "1.0.0",
|
|
125
122
|
"is-png": "3.0.1",
|
|
126
|
-
"lint-staged": "
|
|
123
|
+
"lint-staged": "14.0.1",
|
|
127
124
|
"mocha": "10.2.0",
|
|
128
125
|
"npm-run-all": "4.1.5",
|
|
129
126
|
"peggy": "3.0.2",
|
|
130
|
-
"prettier": "3.0.
|
|
127
|
+
"prettier": "3.0.3",
|
|
131
128
|
"query-string": "8.1.0",
|
|
132
129
|
"ts-node": "10.9.1",
|
|
133
|
-
"typescript": "5.
|
|
134
|
-
"upem": "
|
|
135
|
-
"watskeburt": "0.
|
|
130
|
+
"typescript": "5.2.2",
|
|
131
|
+
"upem": "9.0.2",
|
|
132
|
+
"watskeburt": "2.0.0",
|
|
136
133
|
"xml-name-validator": "4.0.0"
|
|
137
134
|
},
|
|
138
|
-
"overrides": {
|
|
139
|
-
"xml2js": "^0.5.0"
|
|
140
|
-
},
|
|
141
|
-
"resolutions": {
|
|
142
|
-
"xml2js": "^0.5.0"
|
|
143
|
-
},
|
|
144
135
|
"engines": {
|
|
145
|
-
"node": "^
|
|
136
|
+
"node": "^18.17||>=20"
|
|
146
137
|
},
|
|
147
138
|
"types": "types/state-machine-cat.d.ts",
|
|
148
139
|
"browserslist": [
|