@diagc/cli 1.11.0 → 1.13.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/assets/guide/state-machine.md +4 -4
- package/assets/studio/assets/index-BK_mpx_Q.js +115 -0
- package/assets/studio/assets/{index-C7-EMlhy.css → index-DnTnVIet.css} +1 -1
- package/assets/studio/index.html +2 -2
- package/assets/viewer/index.html +36 -36
- package/assets/viewer/shared/viewer.css +1 -1
- package/assets/viewer/shared/viewer.js +35 -35
- package/dist/commands/diff.js +1 -1
- package/dist/diff/describe.d.ts +27 -0
- package/dist/diff/describe.js +78 -16
- package/dist/diff/index.js +1 -1
- package/dist/diff/overview.d.ts +12 -4
- package/dist/diff/overview.js +88 -9
- package/dist/diff/pages.d.ts +26 -3
- package/dist/diff/pages.js +59 -4
- package/dist/diff/summary.d.ts +2 -5
- package/dist/diff/summary.js +6 -0
- package/dist/text/vocabulary.js +1 -0
- package/package.json +2 -2
- package/assets/studio/assets/index-B-OCe1QU.js +0 -115
|
@@ -7,7 +7,8 @@ A UML state machine: states, the transitions between them, and the events, guard
|
|
|
7
7
|
## How it works
|
|
8
8
|
|
|
9
9
|
- `m.stateMachine(id, opts?)` draws a machine frame and returns a handle. `opts` takes `name`, `plane` and `planeName`. You can call it again for a second machine. Without `plane` the whole diagram becomes a state machine, and the call throws if it has another notation: pass `plane` to draw the machine beside other views.
|
|
10
|
-
- The machine, a state and a region each offer `state(id, name?, { entry?, exit?, do?, color? })`, `initial(id?)`, `final(id?)`, `choice(id?, name?)`, `junction(id?)`, `bar(id?)` and `terminate(id?)`. `entry`, `exit` and `do` are the state's `behaviors`, each an effect.
|
|
10
|
+
- The machine, a zone, a state and a region each offer `state(id, name?, { entry?, exit?, do?, kind?, color? })`, `initial(id?)`, `final(id?)`, `choice(id?, name?)`, `junction(id?)`, `bar(id?)` and `terminate(id?)`. `entry`, `exit` and `do` are the state's `behaviors`, each an effect. `kind` says how a state is going, and colours it: `ok` is green, `failed` is red, `waiting` is amber. It is the state's `stateKind`. A transition into a `failed` state is drawn red, and the legend lists the kinds in use. A state's own `color` wins over its kind.
|
|
11
|
+
- `machine.zone(id, name?, { note?, color? })` draws a titled, tinted area and returns a handle that holds states as the machine does. Use zones to show the phases of a process. Zones follow each other along the flow in the order you declare them, each as wide as the widest. A zone has no meaning to the machine: every rule reads its states as the machine's own. `note` is one line under the title. Without `color` the zones take the theme's colours in turn.
|
|
11
12
|
- A transition is `machine.transition(from, to, { trigger?, guard?, effect? })`, or `element.to(target, parts?)`, which returns the target so a path chains. A transition reads `trigger [guard] / effect`, on more lines past 24 characters. Write the parts as options, never as a `label`.
|
|
12
13
|
- `state.on(trigger, { guard?, effect })` adds an internal transition: the state is not left. It shows in the state's behaviors.
|
|
13
14
|
- A state with children is composite and rests folded in a viewer; double-click unfolds it. `state.region(id?, name?)` adds a concurrent region, and a state with regions is orthogonal. `state.entryPoint(id?, name?)` and `state.exitPoint(id?, name?)` sit on its border.
|
|
@@ -24,12 +25,11 @@ You never write these types yourself: the builder creates them. A state is compo
|
|
|
24
25
|
Every rule is a warning, never an error: the diagram still compiles. Lint reports them under these codes.
|
|
25
26
|
|
|
26
27
|
- `sm-initial-count`, `sm-initial-flow`: one initial per region, with exactly one plain transition out and none in.
|
|
27
|
-
- `sm-final-outgoing`: a final or a terminate has no transition out
|
|
28
|
-
- `sm-choice-guards`: each exit of a choice or junction has a guard, and at most one is `else`.
|
|
28
|
+
- `sm-final-outgoing`, `sm-choice-guards`: a final or a terminate has no transition out, and each exit of a choice or junction has a guard, and at most one is `else`.
|
|
29
29
|
- `sm-bar-shape`: a bar has one transition on one side, and a fork's targets are in different regions.
|
|
30
30
|
- `sm-unreachable`: a state no path from an initial reaches. A machine with no initial is not checked.
|
|
31
31
|
- `sm-transition-ends`, `sm-transition-label`: a transition joins two state-machine nodes, and its parts carry the text.
|
|
32
|
-
- `sm-region-parent`, `sm-region-siblings`, `sm-machine-parent`, `sm-pseudo-children`, `sm-history-parent`, `sm-point-parent`: where each node may sit.
|
|
32
|
+
- `sm-region-parent`, `sm-region-siblings`, `sm-machine-parent`, `sm-zone-parent`, `sm-pseudo-children`, `sm-history-parent`, `sm-point-parent`: where each node may sit. A zone sits directly in a machine.
|
|
33
33
|
|
|
34
34
|
## From a Quint spec
|
|
35
35
|
|