state-machine-cat 14.0.0 → 14.0.2

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.
@@ -1,13 +1,15 @@
1
- import Ajv from "ajv";
2
1
  import { getOptionValue } from "../options.mjs";
3
2
  import { parse as parseSmCat } from "./smcat/parse.mjs";
4
- import $schema from "./smcat-ast.schema.mjs";
5
- const ajv = new Ajv();
6
- const validate = ajv.compile($schema);
3
+ import { validate } from "./smcat-ast.validate.mjs";
7
4
  const parseSCXML = async (pScript) => {
8
5
  const { parse } = await import("./scxml/index.mjs");
9
6
  return parse(pScript);
10
7
  };
8
+ export function validateErrorsToString(pErrors) {
9
+ return (pErrors || [])
10
+ .map((pError) => `data${pError.instancePath} ${pError.message}`)
11
+ .join(", ");
12
+ }
11
13
  export async function getAST(pScript, pOptions) {
12
14
  let lReturnValue = pScript;
13
15
  if (getOptionValue(pOptions, "inputType") === "smcat") {
@@ -19,7 +21,7 @@ export async function getAST(pScript, pOptions) {
19
21
  }
20
22
  if (!validate(lReturnValue)) {
21
23
  throw new Error(
22
- `The provided JSON is not a valid state-machine-cat AST: ${ajv.errorsText()}.\n`,
24
+ `The provided JSON is not a valid state-machine-cat AST: ${validateErrorsToString(validate.errors)}.\n`,
23
25
  );
24
26
  }
25
27
  return lReturnValue;
@@ -0,0 +1 @@
1
+ "use strict";export const validate=C;export default C;const z={type:"object",additionalProperties:!1,required:["states"],properties:{states:{type:"array",items:{type:"object",required:["name","type"],additionalProperties:!1,properties:{name:{type:"string"},type:{$ref:"#/definitions/StateType"},label:{type:"string"},color:{type:"string"},class:{$ref:"#/definitions/ClassType"},active:{type:"boolean"},typeExplicitlySet:{type:"boolean"},isComposite:{type:"boolean"},actions:{type:"array",items:{$ref:"#/definitions/ActionType"}},note:{$ref:"#/definitions/NoteType"},statemachine:{$ref:"#/definitions/StateMachineType"}}}},transitions:{type:"array",items:{type:"object",required:["id","from","to"],additionalProperties:!1,properties:{id:{type:"number"},from:{type:"string"},to:{type:"string"},label:{type:"string"},event:{type:"string"},cond:{type:"string"},action:{type:"string"},note:{$ref:"#/definitions/NoteType"},color:{type:"string"},width:{type:"number",minimum:0,maximum:30},class:{$ref:"#/definitions/ClassType"},type:{$ref:"#/definitions/TransitionType"}}}}}},R={type:"string",enum:["regular","initial","terminate","final","parallel","history","deephistory","choice","forkjoin","fork","join","junction"]};const B={type:"string",enum:["internal","external"]},Z=Object.prototype.hasOwnProperty,O=new RegExp("^[a-zA-Z0-9_\\- ]*$","u");const G={type:"string",enum:["entry","activity","exit"]};function c(y,{instancePath:r="",parentData:j,parentDataProperty:$,rootData:w=y}={}){let m=null,e=0;if(e===0)if(y&&typeof y=="object"&&!Array.isArray(y)){let n;if(y.type===void 0&&(n="type")||y.body===void 0&&(n="body"))return c.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:n},message:"must have required property '"+n+"'"}],!1;{const _=e;for(const f in y)if(!(f==="type"||f==="body")){return c.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"}],!1;break}if(_===e){if(y.type!==void 0){let f=y.type;const P=e;if(typeof f!="string")return c.errors=[{instancePath:r+"/type",schemaPath:"#/definitions/ActionTypeType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(f==="entry"||f==="activity"||f==="exit"))return c.errors=[{instancePath:r+"/type",schemaPath:"#/definitions/ActionTypeType/enum",keyword:"enum",params:{allowedValues:G.enum},message:"must be equal to one of the allowed values"}],!1;var g=P===e}else var g=!0;if(g)if(y.body!==void 0){const f=e;if(typeof y.body!="string")return c.errors=[{instancePath:r+"/body",schemaPath:"#/properties/body/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=f===e}else var g=!0}}}else return c.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return c.errors=m,e===0}const N={validate:i};function i(y,{instancePath:r="",parentData:j,parentDataProperty:$,rootData:w=y}={}){let m=null,e=0;if(e===0)if(y&&typeof y=="object"&&!Array.isArray(y)){let q;if(y.states===void 0&&(q="states"))return i.errors=[{instancePath:r,schemaPath:"#/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"}],!1;{const M=e;for(const u in y)if(!(u==="states"||u==="transitions")){return i.errors=[{instancePath:r,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:u},message:"must NOT have additional properties"}],!1;break}if(M===e){if(y.states!==void 0){let u=y.states;const T=e;if(e===T)if(Array.isArray(u)){var g=!0;const V=u.length;for(let l=0;l<V;l++){let t=u[l];const p=e;if(e===p)if(t&&typeof t=="object"&&!Array.isArray(t)){let A;if(t.name===void 0&&(A="name")||t.type===void 0&&(A="type"))return i.errors=[{instancePath:r+"/states/"+l,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty:A},message:"must have required property '"+A+"'"}],!1;{const v=e;for(const a in t)if(!Z.call(z.properties.states.items.properties,a)){return i.errors=[{instancePath:r+"/states/"+l,schemaPath:"#/properties/states/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;break}if(v===e){if(t.name!==void 0){const a=e;if(typeof t.name!="string")return i.errors=[{instancePath:r+"/states/"+l+"/name",schemaPath:"#/properties/states/items/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var n=a===e}else var n=!0;if(n){if(t.type!==void 0){let a=t.type;const s=e;if(typeof a!="string")return i.errors=[{instancePath:r+"/states/"+l+"/type",schemaPath:"#/definitions/StateType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(a==="regular"||a==="initial"||a==="terminate"||a==="final"||a==="parallel"||a==="history"||a==="deephistory"||a==="choice"||a==="forkjoin"||a==="fork"||a==="join"||a==="junction"))return i.errors=[{instancePath:r+"/states/"+l+"/type",schemaPath:"#/definitions/StateType/enum",keyword:"enum",params:{allowedValues:R.enum},message:"must be equal to one of the allowed values"}],!1;var n=s===e}else var n=!0;if(n){if(t.label!==void 0){const a=e;if(typeof t.label!="string")return i.errors=[{instancePath:r+"/states/"+l+"/label",schemaPath:"#/properties/states/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var n=a===e}else var n=!0;if(n){if(t.color!==void 0){const a=e;if(typeof t.color!="string")return i.errors=[{instancePath:r+"/states/"+l+"/color",schemaPath:"#/properties/states/items/properties/color/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var n=a===e}else var n=!0;if(n){if(t.class!==void 0){let a=t.class;const s=e;if(e===e)if(typeof a=="string"){if(!O.test(a))return i.errors=[{instancePath:r+"/states/"+l+"/class",schemaPath:"#/definitions/ClassType/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_\\- ]*$"},message:'must match pattern "^[a-zA-Z0-9_\\- ]*$"'}],!1}else return i.errors=[{instancePath:r+"/states/"+l+"/class",schemaPath:"#/definitions/ClassType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var n=s===e}else var n=!0;if(n){if(t.active!==void 0){const a=e;if(typeof t.active!="boolean")return i.errors=[{instancePath:r+"/states/"+l+"/active",schemaPath:"#/properties/states/items/properties/active/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var n=a===e}else var n=!0;if(n){if(t.typeExplicitlySet!==void 0){const a=e;if(typeof t.typeExplicitlySet!="boolean")return i.errors=[{instancePath:r+"/states/"+l+"/typeExplicitlySet",schemaPath:"#/properties/states/items/properties/typeExplicitlySet/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var n=a===e}else var n=!0;if(n){if(t.isComposite!==void 0){const a=e;if(typeof t.isComposite!="boolean")return i.errors=[{instancePath:r+"/states/"+l+"/isComposite",schemaPath:"#/properties/states/items/properties/isComposite/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var n=a===e}else var n=!0;if(n){if(t.actions!==void 0){let a=t.actions;const s=e;if(e===s)if(Array.isArray(a)){var _=!0;const x=a.length;for(let b=0;b<x;b++){const h=e;c(a[b],{instancePath:r+"/states/"+l+"/actions/"+b,parentData:a,parentDataProperty:b,rootData:w})||(m=m===null?c.errors:m.concat(c.errors),e=m.length);var _=h===e;if(!_)break}}else return i.errors=[{instancePath:r+"/states/"+l+"/actions",schemaPath:"#/properties/states/items/properties/actions/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var n=s===e}else var n=!0;if(n){if(t.note!==void 0){let a=t.note;const s=e;if(e===e)if(Array.isArray(a)){var f=!0;const b=a.length;for(let h=0;h<b;h++){const k=e;if(typeof a[h]!="string")return i.errors=[{instancePath:r+"/states/"+l+"/note/"+h,schemaPath:"#/definitions/NoteType/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=k===e;if(!f)break}}else return i.errors=[{instancePath:r+"/states/"+l+"/note",schemaPath:"#/definitions/NoteType/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var n=s===e}else var n=!0;if(n)if(t.statemachine!==void 0){const a=e;N.validate(t.statemachine,{instancePath:r+"/states/"+l+"/statemachine",parentData:t,parentDataProperty:"statemachine",rootData:w})||(m=m===null?N.validate.errors:m.concat(N.validate.errors),e=m.length);var n=a===e}else var n=!0}}}}}}}}}}}}else return i.errors=[{instancePath:r+"/states/"+l,schemaPath:"#/properties/states/items/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var g=p===e;if(!g)break}}else return i.errors=[{instancePath:r+"/states",schemaPath:"#/properties/states/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var P=T===e}else var P=!0;if(P)if(y.transitions!==void 0){let u=y.transitions;const T=e;if(e===T)if(Array.isArray(u)){var S=!0;const l=u.length;for(let t=0;t<l;t++){let p=u[t];const D=e;if(e===D)if(p&&typeof p=="object"&&!Array.isArray(p)){let v;if(p.id===void 0&&(v="id")||p.from===void 0&&(v="from")||p.to===void 0&&(v="to"))return i.errors=[{instancePath:r+"/transitions/"+t,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"}],!1;{const a=e;for(const s in p)if(!Z.call(z.properties.transitions.items.properties,s)){return i.errors=[{instancePath:r+"/transitions/"+t,schemaPath:"#/properties/transitions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;break}if(a===e){if(p.id!==void 0){let s=p.id;const d=e;if(!(typeof s=="number"&&isFinite(s)))return i.errors=[{instancePath:r+"/transitions/"+t+"/id",schemaPath:"#/properties/transitions/items/properties/id/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var o=d===e}else var o=!0;if(o){if(p.from!==void 0){const s=e;if(typeof p.from!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/from",schemaPath:"#/properties/transitions/items/properties/from/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.to!==void 0){const s=e;if(typeof p.to!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/to",schemaPath:"#/properties/transitions/items/properties/to/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.label!==void 0){const s=e;if(typeof p.label!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/label",schemaPath:"#/properties/transitions/items/properties/label/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.event!==void 0){const s=e;if(typeof p.event!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/event",schemaPath:"#/properties/transitions/items/properties/event/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.cond!==void 0){const s=e;if(typeof p.cond!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/cond",schemaPath:"#/properties/transitions/items/properties/cond/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.action!==void 0){const s=e;if(typeof p.action!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/action",schemaPath:"#/properties/transitions/items/properties/action/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.note!==void 0){let s=p.note;const d=e;if(e===e)if(Array.isArray(s)){var E=!0;const h=s.length;for(let k=0;k<h;k++){const F=e;if(typeof s[k]!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/note/"+k,schemaPath:"#/definitions/NoteType/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=F===e;if(!E)break}}else return i.errors=[{instancePath:r+"/transitions/"+t+"/note",schemaPath:"#/definitions/NoteType/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var o=d===e}else var o=!0;if(o){if(p.color!==void 0){const s=e;if(typeof p.color!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/color",schemaPath:"#/properties/transitions/items/properties/color/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=s===e}else var o=!0;if(o){if(p.width!==void 0){let s=p.width;const d=e;if(e===d)if(typeof s=="number"&&isFinite(s)){if(s>30||isNaN(s))return i.errors=[{instancePath:r+"/transitions/"+t+"/width",schemaPath:"#/properties/transitions/items/properties/width/maximum",keyword:"maximum",params:{comparison:"<=",limit:30},message:"must be <= 30"}],!1;if(s<0||isNaN(s))return i.errors=[{instancePath:r+"/transitions/"+t+"/width",schemaPath:"#/properties/transitions/items/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"}],!1}else return i.errors=[{instancePath:r+"/transitions/"+t+"/width",schemaPath:"#/properties/transitions/items/properties/width/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var o=d===e}else var o=!0;if(o){if(p.class!==void 0){let s=p.class;const d=e;if(e===e)if(typeof s=="string"){if(!O.test(s))return i.errors=[{instancePath:r+"/transitions/"+t+"/class",schemaPath:"#/definitions/ClassType/pattern",keyword:"pattern",params:{pattern:"^[a-zA-Z0-9_\\- ]*$"},message:'must match pattern "^[a-zA-Z0-9_\\- ]*$"'}],!1}else return i.errors=[{instancePath:r+"/transitions/"+t+"/class",schemaPath:"#/definitions/ClassType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var o=d===e}else var o=!0;if(o)if(p.type!==void 0){let s=p.type;const d=e;if(typeof s!="string")return i.errors=[{instancePath:r+"/transitions/"+t+"/type",schemaPath:"#/definitions/TransitionType/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="internal"||s==="external"))return i.errors=[{instancePath:r+"/transitions/"+t+"/type",schemaPath:"#/definitions/TransitionType/enum",keyword:"enum",params:{allowedValues:B.enum},message:"must be equal to one of the allowed values"}],!1;var o=d===e}else var o=!0}}}}}}}}}}}}}else return i.errors=[{instancePath:r+"/transitions/"+t,schemaPath:"#/properties/transitions/items/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var S=D===e;if(!S)break}}else return i.errors=[{instancePath:r+"/transitions",schemaPath:"#/properties/transitions/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var P=T===e}else var P=!0}}}else return i.errors=[{instancePath:r,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return i.errors=m,e===0}function C(y,{instancePath:r="",parentData:j,parentDataProperty:$,rootData:w=y}={}){let m=null,e=0;return i(y,{instancePath:r,parentData:j,parentDataProperty:$,rootData:w})||(m=m===null?i.errors:m.concat(i.errors),e=m.length),C.errors=m,e===0}
package/dist/version.mjs CHANGED
@@ -1 +1 @@
1
- export const version = "14.0.0";
1
+ export const version = "14.0.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "state-machine-cat",
3
- "version": "14.0.0",
3
+ "version": "14.0.2",
4
4
  "description": "write beautiful state charts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -41,9 +41,8 @@
41
41
  "state-machine-cat": "dist/cli/main.mjs"
42
42
  },
43
43
  "dependencies": {
44
- "@hpcc-js/wasm-graphviz": "1.15.0",
45
- "ajv": "8.17.1",
46
- "fast-xml-parser": "5.3.1",
44
+ "@hpcc-js/wasm-graphviz": "1.17.0",
45
+ "fast-xml-parser": "5.3.3",
47
46
  "he": "1.2.0",
48
47
  "neotraverse": "0.6.18"
49
48
  },
@@ -1,190 +0,0 @@
1
- export default {
2
- $schema: "http://json-schema.org/draft-07/schema#",
3
- title: "state-machine-cat abstract syntax tree schema",
4
- $ref: "#/definitions/StateMachineType",
5
- $id: "org.js.state-machine-cat/v7.4.0",
6
- definitions: {
7
- StateType: {
8
- type: "string",
9
- enum: [
10
- "regular",
11
- "initial",
12
- "terminate",
13
- "final",
14
- "parallel",
15
- "history",
16
- "deephistory",
17
- "choice",
18
- "forkjoin",
19
- "fork",
20
- "join",
21
- "junction",
22
- ],
23
- },
24
- TransitionType: {
25
- type: "string",
26
- enum: ["internal", "external"],
27
- },
28
- NoteType: {
29
- type: "array",
30
- items: {
31
- type: "string",
32
- },
33
- },
34
- ActionTypeType: {
35
- type: "string",
36
- enum: ["entry", "activity", "exit"],
37
- },
38
- ActionType: {
39
- type: "object",
40
- required: ["type", "body"],
41
- additionalProperties: false,
42
- properties: {
43
- type: { $ref: "#/definitions/ActionTypeType" },
44
- body: { type: "string" },
45
- },
46
- },
47
- ClassType: {
48
- type: "string",
49
- pattern: "^[a-zA-Z0-9_\\- ]*$",
50
- },
51
- StateMachineType: {
52
- type: "object",
53
- additionalProperties: false,
54
- required: ["states"],
55
- properties: {
56
- states: {
57
- type: "array",
58
- items: {
59
- type: "object",
60
- required: ["name", "type"],
61
- additionalProperties: false,
62
- properties: {
63
- name: {
64
- description:
65
- "The name and identifier of the state. Unique within the root state machine.",
66
- type: "string",
67
- },
68
- type: {
69
- description:
70
- "What kind of state (or pseudo state) this state is. E.g. 'regular' for normal states or 'initial', 'final', 'choice' etc for pseudo states. Most UML (pseudo-) states are supported.",
71
- $ref: "#/definitions/StateType",
72
- },
73
- label: {
74
- description:
75
- "The display label of the state. If it's not present, most renderers will use the states' name in stead.",
76
- type: "string",
77
- },
78
- color: {
79
- description:
80
- 'Color to use for rendering the state. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',
81
- type: "string",
82
- },
83
- class: {
84
- description:
85
- "Class name to give the state in dot and svg output.",
86
- $ref: "#/definitions/ClassType",
87
- },
88
- active: {
89
- description:
90
- "If true the state is considered to be active and rendered as such.",
91
- type: "boolean",
92
- },
93
- typeExplicitlySet: {
94
- description:
95
- "The default parser derives the `type` from the `name` with inband signaling. The user can override that behavior by explicitly setting the `type`. This attribute is there to express that (and make sure that on next parses & processing it doesn't get accidentily re-derived from the name again).",
96
- type: "boolean",
97
- },
98
- isComposite: {
99
- description:
100
- "convenience, derived attribute - set to true if there's a state machine inside the state; false in all other cases. For internal use - @deprecated",
101
- type: "boolean",
102
- },
103
- actions: {
104
- type: "array",
105
- description:
106
- "A series of actions and their types. The type describe when the action takes place (on entry, exit, or otherwise ('activity'))",
107
- items: { $ref: "#/definitions/ActionType" },
108
- },
109
- note: {
110
- description:
111
- "Comments related to this state. Some renderers will use the note attribute to render a note (i.e. as a post-it) attached to the state.",
112
- $ref: "#/definitions/NoteType",
113
- },
114
- statemachine: {
115
- description: "state machine nested within the state.",
116
- $ref: "#/definitions/StateMachineType",
117
- },
118
- },
119
- },
120
- },
121
- transitions: {
122
- type: "array",
123
- items: {
124
- type: "object",
125
- required: ["id", "from", "to"],
126
- additionalProperties: false,
127
- properties: {
128
- id: {
129
- type: "number",
130
- },
131
- from: {
132
- description:
133
- "The name of the state this transition transitions from",
134
- type: "string",
135
- },
136
- to: {
137
- description:
138
- "The name of the state this transition transitions to",
139
- type: "string",
140
- },
141
- label: {
142
- description:
143
- "A display label to represent this transition. Parsers can parse this label into events conditions and actions.",
144
- type: "string",
145
- },
146
- event: {
147
- description: "Event triggering the transition",
148
- type: "string",
149
- },
150
- cond: {
151
- description: "Condition for the transition to occur.",
152
- type: "string",
153
- },
154
- action: {
155
- description: "Action to execute when the transition occurs.",
156
- type: "string",
157
- },
158
- note: {
159
- description: "Comments related to this transition",
160
- $ref: "#/definitions/NoteType",
161
- },
162
- color: {
163
- description:
164
- 'Color to use for rendering the transition. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',
165
- type: "string",
166
- },
167
- width: {
168
- description:
169
- "The line width to use for rendering the transition",
170
- type: "number",
171
- minimum: 0,
172
- maximum: 30,
173
- },
174
- class: {
175
- description:
176
- "Class name to give the state in dot and svg output.",
177
- $ref: "#/definitions/ClassType",
178
- },
179
- type: {
180
- description:
181
- "Whether the transition is external (default) or internal. See https://www.w3.org/TR/scxml/#transition for details.",
182
- $ref: "#/definitions/TransitionType",
183
- },
184
- },
185
- },
186
- },
187
- },
188
- },
189
- },
190
- };