@delurio/cli 0.13.0 → 0.14.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/CHANGELOG.md +17 -0
- package/README.md +21 -11
- package/SPEC.md +57 -9
- package/js/graph.d.ts +12 -1
- package/js/kit.d.ts +22 -1
- package/js/kit.js +11 -2
- package/js/native.d.cts +11 -2
- package/js/wireframe.d.ts +11 -2
- package/js/wireframe.js +10 -4
- package/package.json +7 -7
- package/schemas/flow.schema.json +1 -1
- package/schemas/ui.schema.json +42 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
While the version is 0.x, a release that can judge the same graphs differently (a new check, a stricter schema) bumps the minor; a fix that judges nothing differently bumps the patch.
|
|
4
4
|
|
|
5
|
+
## 0.14.0 (2026-11-22)
|
|
6
|
+
|
|
7
|
+
- New rule of `check`, which fails `--strict`: `event-unhandled`, a node that sends an event (`emits`) in a state that shows it enabled and does not handle that event (SPEC.md §4), the part of [#3](https://github.com/delurio-labs/delurio/issues/3) that asks for events handled where they are shown. In every situation the checker reaches, a state that shows the node (`in`, `unless`, and its `when` over that situation's context) and does not disable it (`disabledIn`, `disabledWhen`) has a transition on the event in its `on`. Three are not held, by what SPEC.md §2 says of them: a node that sends `NAVIGATE`, the person leaving the page, which is always possible; an exit, which has no transitions, so what a node on its page does is outside the flow; and a state with `always`, which the flow passes at once. It is given once per node and state, at the node in `ui.yaml`; where the node's `when` or `disabledWhen` decides it, its notes, and in SARIF its code flow, give the way from a start to the first situation that shows it enabled. It reads the exploration `check` already makes, so no flow is explored twice. Before, a Save button left enabled while its step runs, an answer that a question's saving state does not handle, and a link back to the list shown in states that do not handle it all passed `--strict`; Medaris's graphs had all three. On delurio's own graphs it finds 24, each in a state that runs a server step. A graph whose screens leave no event unhandled is judged as before; a project can record what it finds with `--baseline` while it fixes it.
|
|
8
|
+
- `renderCheckScreens` in `@delurio/cli/wireframe` gives each expectation's `native` again: 0.13.0's JavaScript module dropped the kind the addon returns, so a replay or `kit check` built on the module could not find a `native` control among the controls of its kind. The command line was not affected.
|
|
9
|
+
- A node may say how it looks in a state: `tone`, one of `neutral`, `info`, `success`, `warning` and `danger`, or a map from these to expressions over the context, of which the first that holds wins, such as an exam's countdown that turns red in its last five minutes (`tone: { danger: "clock == 'lastFive'" }`, SPEC.md §4). It is how the node looks, never all it says (WCAG 2.2, 1.4.1): its words and its role say the same, and the accessibility tree, `kit check` and a replay are as they were. An expression of a `tone` that does not parse, or names what is not a variable, a guard or `state`, keeps the graph from loading, as `checked` does; a word that is not a tone is the `schema` rule's. The page draws a fixed tone and names it in the node's annotations, and names a map there as `tone danger when …`, as it names `when`; the fixed components draw a tone as the class `wf-tone-<word>`, red for `danger`, with styles the page adds only when a node of its flow has a tone (`TONE_CSS` in `@delurio/cli/wireframe`, for a video stage too). `renderStageScreen` takes the situation's context as its sixth argument and draws each node in the first tone of its map that holds there; without it, in its fixed tone only. Graphs without `tone` are drawn byte for byte as before.
|
|
10
|
+
- A kit draws a node's tone with the slot `{tone}` and `tones`, a map from each tone to the word the slot gives, with `default` for a node without one, at the top of kit.yaml and in a component, whose own is read first (SPEC.md §8). A kit that has `tones` gives an entry for every tone a node drawn with a `{tone}` template may take, any of a map included: one it lacks is `kit-uncovered`, as an intent is. A key of `tones` that is not a tone keeps the kit from loading.
|
|
11
|
+
- A kit may carry its fonts: `fonts`, a list of `{ family, file, weight, style, unicodeRange }`, each `file` a woff2, woff, ttf or otf file in the kit's folder, licensed for embedding (SPEC.md §8). The page and the video stage's CSS (`kitCss`) embed each as a data: URL in an `@font-face`, once per page, so a kit still fetches nothing and its screens are drawn in its own fonts on any machine. A file may be at most 2 MiB, and a kit's files at most 8 MiB together, room for four variable fonts of about 1.5 MB. New rule of `check`, which fails `--strict`: `kit-font`, at a font entry whose file is not in the kit's folder (an absolute path, `..`, or a link out of it, none of which is read), is not there, is not a file, is not by its first bytes the format its name says, or is too large; it is given once per kit, and `page` warns of it and draws without the font. New warning of `check`, which fails nothing: `kit-font-unembedded`, a family the kit's CSS draws in first (the first of a `font-family` or `font` stack, through the custom properties it reads from the tokens or the CSS) that is neither a family of `fonts` nor a generic one, where the tokens or the CSS write it. `kitFamilies(kit)` in `@delurio/cli/kit` lists the families a kit carries, so that a tool that draws the screens in a browser can ask whether it drew them. Kits without `fonts` are drawn as before, and the example kit leads with `system-ui`, so it is warned of nothing.
|
|
12
|
+
- A repeat's items may be given as rows (SPEC.md §4): `samples: { question.options: [ { id: a, text: "Four" }, { id: b, text: "Three" } ] }`, a list of maps under the repeat's data. A node with that `repeat` is then drawn once per row, on the page, on the tutorial stage and in `kit check`'s screens, which expect each element it draws with its `index`; a param that reads `row.<field>` (`params: { option: row.text }`) takes that row's field, and `nodeTexts` gives the texts of every row. A repeat node's `checked` may read its row (`checked: "row.id == answer"`), so the options of a radio group are written as one node again; `row.<field>` on a node without `repeat` keeps the graph from loading, as before. Without rows, a node is drawn once, as before. Before, Medaris's exam showed one option per question and could not draw the one chosen.
|
|
13
|
+
- `renderStageScreen(g, state, reveal, warn, kit, ctx)` in `@delurio/cli/wireframe` takes the context of the situation the stage shows, a map of the flow's variables to their values: each node's `checked` is read over it, for each row it is drawn for. Without it, or with `null`, only `checked: true` is drawn, as before; the page draws each state's screen once, for all the situations that show it, so it draws only that.
|
|
14
|
+
- An effect may set a variable from the row that was pressed, `set: { answer: row.id }`, on a transition whose event a repeat node sends (SPEC.md §4). The flow does not say which row is pressed, and the sample rows only illustrate the screens, so the checker lets such a variable take any of its values, as `havoc` does, whether rows are given or not. Before, `row.id` was set as the text it is.
|
|
15
|
+
- A tutorial's press says which row of a repeat node it presses, `{ press: option, row: 2 }`, counted from 1 (SPEC.md §7): the step takes the case in which every variable the transition sets from the row has that row's value. `check` gives `tutorial-mismatch` at a `row` that is not a whole number from 1, on a step that presses nothing or a node without `repeat`, past the rows the samples give, of a row without a field the effects read, and where no case of the press has the row's value. A press without `row` takes the first case, as before.
|
|
16
|
+
- Rows and tables in the wireframe (SPEC.md §4): adjacent nodes that share a `repeat` are drawn side by side, one row per item, on the page, on the stage and in `kit check`'s screens; a List holds those rows as its items, and a ListItem that begins a row holds the nodes beside it. A List whose role is `table` or `grid` draws its header cells (role `columnheader`) as its header row and its repeat nodes as its rows. With a kit each node keeps its template inside the rows, a table's row being an element of role `row`; the expected accessibility tree and `kit check`'s expectations follow the rows. Before, a table was drawn as one column, and the number and the state of one question in a list stood on separate lines. Screens without a table and with no nodes that share a repeat are drawn as before.
|
|
17
|
+
- The ui schema lets a sample be a list of rows, each a map of strings, numbers and booleans, with at least one row.
|
|
18
|
+
- A node's `when` that does not parse, or names what is not a variable, a guard or `state`, keeps the graph from loading (exit 1), at the `when` in `ui.yaml`, as a `checked` or a `disabledWhen` does (SPEC.md §4); decided on 22 Nov 2026. Before, such a `when` was passed over without a word: the page drew the node, `event-unhandled` decided nothing for it, and only a replay or a tutorial that read it stopped. It stops none of delurio's own graphs, whose nodes give 835 `when`s, nor of Medaris's, which give 3,954.
|
|
19
|
+
- A node may stay usable while a step runs: `duringStep: true` on it (SPEC.md §4) says that in a state that runs a step (`invoke`) the node may be pressed, and that its event is handled once the step ends, by the state the step's outcome leads to; decided on 22 Nov 2026. `event-unhandled` then does not hold the step's state to the event, but every situation that the step's `DONE` and `FAIL.<class>` lead to, past states with `always`, from each situation of the step that shows the node enabled: it handles the event, shows the node disabled or not at all, is an exit, or runs a step of its own that shows the node enabled, where the press waits again, onward, each situation walked once so that a cycle of steps ends. Where one does none of these, the error is given for the step's state, as before, and says the outcome and the state the press is left in; its notes, and in SARIF its code flow, give the way there through the step. The error for a node shown enabled in a step's state now says the marker too. A replay does not press a node while a step runs, so it is not changed. New warning of `check`, which does not fail `--strict`: `during-step-unused`, a node marked so where no state that runs a step shows it enabled (by `in`, `unless` and `disabledIn`), or that sends `NAVIGATE`; the `schema` rule refuses the marker on a node that sends no event. A graph without the marker is judged as before. Of the findings in a step's state, the marker would clear all 24 on delurio's own graphs and 725 of 945 on Medaris's, those whose step's outcomes already handle the event, disable the node or do not show it; Medaris's other 220 lead, mostly through a `FAIL.<class>`, to a state that shows the node enabled and does not handle it.
|
|
20
|
+
- SPEC.md §7 says what a draft and a maker's mark are beside the AI marks; nothing a tool does changes. A draft, a review copy of a video for the person who asked for it, is never published; it keeps the first card and the watermark in the sound, leaves out only the watermark in the picture, and carries in its place a visible stamp on every frame (the maker's mark, the word for draft, the time of the frame, the draft's id) and a draft assertion in its signed metadata. A maker may draw its own mark in a corner of the picture. Neither is the AI label, which is the first card, and nothing but the two is burnt into the picture; every published video keeps all three marks. Before, §7 said that nothing is burnt into the picture after the first card, that every video delurio makes carries all three marks, and that its video tool did not add the watermark or the metadata yet, which it does.
|
|
21
|
+
|
|
5
22
|
## 0.13.0 (2026-11-21)
|
|
6
23
|
|
|
7
24
|
- A variant of a flow's binding written beside it, `binding.<variant>.yaml` (`binding.noSessions.yaml`, `binding.common.yaml`), is a binding (SPEC.md §7): `check` holds it to the binding schema, as it holds `binding.yaml` and a shared `<name>.binding.yaml`. Before, it was read as no graph file at all, and a value the schema refuses passed unseen; Medaris had 271 such files.
|
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Several folders may be given (`check graphs examples`); a graph under two of the
|
|
|
62
62
|
|---|---|
|
|
63
63
|
| 0 | every graph loads, and under `--strict` nothing is wrong |
|
|
64
64
|
| 1 | a graph cannot be loaded, or is written for a newer format than this version reads |
|
|
65
|
-
| 2 | under `--strict`: a guarantee is broken, a state cannot be reached or has no way out, a catalog key is missing from a locale or a sample is missing, the main story cannot be walked, a tutorial no longer matches its flow, a writing flow has no changes note, a domain names an entity or a field it does not have, a flow invokes an action or lists a failure code its domain does not have, a policy names one, a `source:` anchor names a file or a line that is not there, a need's evidence is not there or a product's gaps and its needs disagree… |
|
|
65
|
+
| 2 | under `--strict`: a guarantee is broken, a state cannot be reached or has no way out, a catalog key is missing from a locale or a sample is missing, the main story cannot be walked, a node is shown enabled where its event is not handled, a tutorial no longer matches its flow, a writing flow has no changes note, a domain names an entity or a field it does not have, a flow invokes an action or lists a failure code its domain does not have, a policy names one, a `source:` anchor names a file or a line that is not there, a need's evidence is not there or a product's gaps and its needs disagree… |
|
|
66
66
|
|
|
67
67
|
## What a product must have: needs and gaps
|
|
68
68
|
|
|
@@ -98,7 +98,7 @@ A kit (SPEC.md §8) says how the components of `ui.yaml` look in one product, so
|
|
|
98
98
|
3. Put your design tokens in `tokens.json`, in the W3C Design Tokens format (2025.10): groups nest, a token has `$value`, `$type` is inherited from its group, and `"{color.accent}"` is an alias. Each token becomes a CSS custom property named by its path: `color.accent` is `--color-accent`, `font.size-body` is `--font-size-body`. `dark.json` gives the same names other values for a dark page; a name that `tokens.json` lacks is refused.
|
|
99
99
|
4. Write the CSS in `kit.css`, from the tokens. It is scoped to the drawn screen: `&` is the screen itself, a rule never reaches the rest of the page, `:root`, `html` and `body` are refused as they never match there, and only `@media`, `@supports` and `@container` may wrap rules. Nothing is fetched: `url()` takes only `data:` addresses.
|
|
100
100
|
5. Give each component its screens use a `template`, one HTML element or a few, filled per node:
|
|
101
|
-
- slots: `{text}`, the node's visible text; `{name}`, its accessible name; `{id}`, the node's id; `{intent}`, the word `intents` gives its intent (`confirm`, `dismiss`, `secondary`, and `default` for a node with none); `{children}`, the items of a `List`;
|
|
101
|
+
- slots: `{text}`, the node's visible text; `{name}`, its accessible name; `{id}`, the node's id; `{intent}`, the word `intents` gives its intent (`confirm`, `dismiss`, `secondary`, and `default` for a node with none); `{children}`, the items of a `List`; `{tone}`, the word `tones` gives the node's tone (`neutral`, `info`, `success`, `warning`, `danger`, and `default` for a node with none), from the component's `tones` or else the kit's own, at the top of `kit.yaml`;
|
|
102
102
|
- flags, each a section that opens and closes in the same place: `{?disabled}..{/disabled}` where the node is disabled, `{!disabled}..{/disabled}` where it is not, `{?named}` where the graph gives an accessible name other than the visible text (so `aria-label="{name}"` goes inside it), and `{?conditional}` where the node shows only when a flag holds;
|
|
103
103
|
- `roles`: a template of its own for a node whose ARIA role differs, such as a `Button` drawn as a link or a `ListItem` that is a checkbox or a radio;
|
|
104
104
|
- a `List`'s and a `ListItem`'s template is one element, which the page marks with the node it draws.
|
|
@@ -107,24 +107,34 @@ A kit (SPEC.md §8) says how the components of `ui.yaml` look in one product, so
|
|
|
107
107
|
|
|
108
108
|
`Page` has no template: it is the screen itself, styled with `&`, and a dialog is a page node whose role is `dialog`, drawn as its screen. A component a screen uses that the kit has no template for, or an intent with no word in `intents`, is drawn with the fixed component and reported (`kit-uncovered`), which fails `--strict`. A kit that cannot be read, such as a template that is not well-formed or a token that refers to one no file defines, keeps every graph that names it from loading.
|
|
109
109
|
|
|
110
|
+
A kit fetches nothing, so the screens are drawn in the fonts its CSS names only where the machine that draws them has them installed, unless the kit carries them. List them in `fonts`, each a file in the kit's folder whose licence allows it to be embedded (the SIL Open Font License does), and the page and the video embed them:
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
fonts:
|
|
114
|
+
- { family: Instrument Sans, file: fonts/InstrumentSans.woff2, weight: "400 700" }
|
|
115
|
+
- { family: Literata, file: fonts/Literata.woff2, weight: "200 900" }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
A file is a woff2, woff, ttf or otf file of at most 2 MiB, and a kit's files are at most 8 MiB together. One that is not there, not in the kit's folder, or not a font is an error of `check` (`kit-font`); a family the kit's CSS draws in first that it does not carry is a warning (`kit-font-unembedded`), SPEC.md §8.
|
|
119
|
+
|
|
110
120
|
## Write a graph in an editor
|
|
111
121
|
|
|
112
122
|
The npm package ships a JSON Schema (2020-12) for each kind of graph file in `schemas/`: `flow`, `ui`, `nav` (also `nav.extracted.yaml`), `domain`, `catalog`, `needs`, `gaps` (`needs.gaps.yaml`) and `binding` (`binding.yaml` and a shared `<name>.binding.yaml`). With them an editor completes keys, explains each one from SPEC.md on hover, and marks a typo, a value of the wrong kind, or a title cut short by a comma inside `{ }`. In VS Code, with the YAML extension, put this in `.vscode/settings.json`, with the version your project pins in
|
|
113
|
-
place of 0.
|
|
123
|
+
place of 0.14.0 (a schema from an older release does not know the keys added since):
|
|
114
124
|
|
|
115
125
|
```json
|
|
116
126
|
{
|
|
117
127
|
"yaml.schemas": {
|
|
118
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
119
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
120
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
121
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
122
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
123
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
124
|
-
"https://unpkg.com/@delurio/cli@0.
|
|
128
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/flow.schema.json": "**/flow.yaml",
|
|
129
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/ui.schema.json": "**/ui.yaml",
|
|
130
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/nav.schema.json": ["**/nav.yaml", "**/nav.extracted.yaml"],
|
|
131
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/domain.schema.json": ["**/domain.yaml", "**/domain/*.yaml"],
|
|
132
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/needs.schema.json": "**/needs.yaml",
|
|
133
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/gaps.schema.json": "**/needs.gaps.yaml",
|
|
134
|
+
"https://unpkg.com/@delurio/cli@0.14.0/schemas/binding.schema.json": ["**/binding.yaml", "**/binding.*.yaml", "**/*.binding.yaml"]
|
|
125
135
|
},
|
|
126
136
|
"json.schemas": [
|
|
127
|
-
{ "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.
|
|
137
|
+
{ "fileMatch": ["**/catalog/*.json"], "url": "https://unpkg.com/@delurio/cli@0.14.0/schemas/catalog.schema.json" }
|
|
128
138
|
]
|
|
129
139
|
}
|
|
130
140
|
```
|
package/SPEC.md
CHANGED
|
@@ -177,12 +177,14 @@ rules: [ { id, rule } ]
|
|
|
177
177
|
| `disabledIn` | states where the node is shown but disabled |
|
|
178
178
|
| `disabledWhen` | an expression over the context (§3): where it holds, the node is shown but disabled, in any state that shows it |
|
|
179
179
|
| `emits` | the event the node sends when pressed |
|
|
180
|
+
| `duringStep: true` | in a state that runs a step (`invoke`): the node stays usable while the step runs, and its event is handled once the step ends, by the state the step's outcome leads to (below) |
|
|
180
181
|
| `initialFocus` | on a page: the node that has focus when it opens (Focus, below) |
|
|
181
|
-
| `repeat` | the node is drawn once per item of this data (`request.scopes`) |
|
|
182
|
+
| `repeat` | the node is drawn once per item of this data (`request.scopes`): once per row the samples give it (Rows of a repeat, below) |
|
|
182
183
|
| `frame` | for a page: whether it may be framed (`never`) |
|
|
183
184
|
| `value` | on a field: what it holds when it is shown, until someone types in it: `{ key, params }`, `{ literal }` or `{ oneOf }`; `{ literal: "" }` is an empty field |
|
|
184
185
|
| `holds` | the field of the flow's domain whose value the node shows, or a control takes: `<Entity>.<field>`. A node that holds a field whose `sensitivity` the binding's `mask` names, `credential` unless it says, is masked wherever the flow's screens are recorded (§7) |
|
|
185
186
|
| `checked` | on a node whose role is `checkbox`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio` or `switch`: whether it is checked (an `option`: selected) when it is shown, as an expression over the context (§3), or `true` or `false` |
|
|
187
|
+
| `tone` | how the node looks in a state: `neutral`, `info`, `success`, `warning` or `danger`, or a map from these to expressions over the context (§3), of which the first that holds wins (Tone, below) |
|
|
186
188
|
| `script` | on a page: how much of it works without JavaScript. `optional`: the page and its actions; `actions`: the page is drawn and read without it, and only its actions need it. Without `script`, the page needs JavaScript |
|
|
187
189
|
| `source` | the code that draws it |
|
|
188
190
|
|
|
@@ -196,7 +198,7 @@ An app may have no such message yet, and a captured graph describes the app as i
|
|
|
196
198
|
|
|
197
199
|
A `role` is a WAI-ARIA 1.2 role, and `name` is the accessible name that Accessible Name and Description Computation 1.2 gives the node; `kit check` reads both from the browser's accessibility tree. A node of type `field` or `action` with no `role` is a warning of `check` (`role-missing`): a screen reader, a replay and `kit check` find a control by its role, and `kit check` holds such a node's name and state but cannot hold its role. Some HTML controls have no WAI-ARIA role at all (HTML-AAM gives them none): an `<input>` of type `date`, `time`, `datetime-local`, `month`, `week`, `file` or `color`, and a `<summary>`. A field or an action that is one says which with `native` (`native: date`) instead of a `role`: `role-missing` does not apply to it, a `role` beside it is an error of the schema, and a replay and `kit check` find it by its name among controls of that kind.
|
|
198
200
|
|
|
199
|
-
A node is shown in a state when the state is in `in`, not in `unless`, and `when` holds. `edges` records relations the page and the checks use: a node labelled by another, an action that leads to a state, the node a dialog gives the focus back to. `rules` are written but no tool reads them yet; checking them, together with labelled dialogs
|
|
201
|
+
A node is shown in a state when the state is in `in`, not in `unless`, and `when` holds. `edges` records relations the page and the checks use: a node labelled by another, an action that leads to a state, the node a dialog gives the focus back to. `rules` are written but no tool reads them yet; checking them, together with labelled dialogs and confirmation before a destructive action, is [#3](https://github.com/delurio-labs/delurio/issues/3). The focus return of #3 is partly answered: a dialog says where the focus returns with `returnsFocus` (below), and `check` holds that it starts at a dialog and gives the focus to a node shown where the dialog closes. That every dialog says it is still #3. Events handled where shown are answered: `check` holds that a node's event is handled wherever the node is shown enabled (`event-unhandled`, below).
|
|
200
202
|
|
|
201
203
|
### Focus
|
|
202
204
|
|
|
@@ -212,11 +214,15 @@ The node that opened a dialog is the one pressed to open it: a node shown in the
|
|
|
212
214
|
|
|
213
215
|
A state that `focus` names that is not a state of the flow keeps the graph from loading. `check` gives an error (`focus-not-shown`) where `focus` gives the focus to a node its state does not show (by `in` and `unless`; a replay reads `when`), or a `returnsFocus` to a node no state the dialog closes into shows, and one (`returns-focus-not-dialog`) where a `returnsFocus` starts at a node that is not a dialog. For a list, each node it lists is held so; for `opener`, each node that opens the dialog, and a dialog that no node opens is `focus-not-shown` too.
|
|
214
216
|
|
|
217
|
+
`check` gives an error (`event-unhandled`) where a node that sends an event (`emits`) is shown and enabled in a state that does not handle it: in a situation the checker reaches (§2), the state is in the node's `in` and not in its `unless`, its `when` holds, the state is not in its `disabledIn` and its `disabledWhen` does not hold, and the state has no transition on the event in its `on`. Pressing the node there sends an event after which the flow says nothing, such as a Save button left enabled while the save runs. Each state that shows such a node disables it or handles its event. Three are not held, by what §2 says of them: a node that sends `NAVIGATE`, the person leaving the page, which is always possible; an exit (`type: final`), which has no transitions, so what a node on its page does is outside the flow (a new run of it, or another flow); and a state with `always`, which is passed at once, so nothing is pressed there. It is given once per node and state, at the node; where the node's `when` or `disabledWhen` decides it, its notes give the way from a start to the first situation that shows it enabled, as for a broken assertion.
|
|
218
|
+
|
|
219
|
+
A node may be meant to stay usable while a step runs, such as a link to sign out beside a form being saved, or a plan's other buttons while a payment is taken: the app lets it be pressed, and acts on the press once the step is over. `duringStep: true` on the node says so, and its event is handled after the step: in a state that runs a step (`invoke`), the state need not handle it, and the state the step's outcome leads to does. So `check` holds, from each situation of the step that shows the node enabled, every situation its `DONE` and its `FAIL.<class>` lead to, past states with `always`: there the state handles the event, or shows the node disabled or not at all, or is an exit; or it runs a step of its own and shows the node enabled, and the press waits again, for that step's outcome, and is held where that leads. A step that leads back to one already walked is not walked twice. Where none of these holds, the error (`event-unhandled`) is given for the step's state, as before, and says the outcome and the state the press is left in; its notes give the way to that state through the step. In a state the person is in, and in a step whose state handles the event, the marker changes nothing. It is what UML 2.5.1 calls a deferred event (a State's `deferrableTrigger`): each state that runs a step defers the node's event, until the flow stops in one that does not. A replay does not press a node while a step runs: in the step's state it checks what the state shows, a marked node enabled as the graph shows it, and then waits for the step's outcome (§7, `call`), so the marker changes nothing a replay does. A node marked so is a warning of `check` (`during-step-unused`) where the marker can change nothing: no state that runs a step shows it, by `in` and `unless`, or every one that does disables it (`disabledIn`), or it sends `NAVIGATE`. On a node that sends no event the `schema` rule refuses it.
|
|
220
|
+
|
|
215
221
|
### What a control holds, and pages without JavaScript
|
|
216
222
|
|
|
217
|
-
`value` is what a field holds when it is shown, until someone types in it. It takes the forms of a node's words except `labelledBy`: `{ key, params }` from the catalog, `{ literal }`, or `{ oneOf }`, and `{ literal: "" }` is an empty field. A replay compares it in each state that shows the field, up to the step at which its walk types in that field. `checked` says whether a control is checked, or for an `option` selected, in each state that shows it: an expression over the context there (§3), or `true` or `false`. A control someone checks during the flow is checked by an event, and the expression reads what that event's effect sets; one that the flow finds already checked is said over the context, such as the radio of the role a member already has (`checked: "role == 'admin'"`). A replay compares it in each state that shows the node. On a node drawn more than once (`repeat`, or words given as `oneOf`), `value` and `checked` hold for each control it draws; controls that differ are written as separate nodes.
|
|
223
|
+
`value` is what a field holds when it is shown, until someone types in it. It takes the forms of a node's words except `labelledBy`: `{ key, params }` from the catalog, `{ literal }`, or `{ oneOf }`, and `{ literal: "" }` is an empty field. A replay compares it in each state that shows the field, up to the step at which its walk types in that field. `checked` says whether a control is checked, or for an `option` selected, in each state that shows it: an expression over the context there (§3), or `true` or `false`. A control someone checks during the flow is checked by an event, and the expression reads what that event's effect sets; one that the flow finds already checked is said over the context, such as the radio of the role a member already has (`checked: "role == 'admin'"`). A replay compares it in each state that shows the node. On a node drawn more than once (`repeat`, or words given as `oneOf`), `value` and `checked` hold for each control it draws; controls that differ are written as separate nodes, except the items of a repeat whose `checked` reads its row (`row.<field>`, below), such as the options of a radio group, one of which is chosen.
|
|
218
224
|
|
|
219
|
-
`disabledIn` lists the states in which a node is shown but disabled. `disabledWhen` disables it by what the context holds, in every state that shows it: a Continue button disabled until a VAT number is typed (`disabledWhen: "not vatGiven"`, where typing it is an event whose effect sets `vatGiven`), or until a box is ticked (`disabledWhen: "not accepted"`, beside the box's `checked: accepted`). A node is disabled where either says so. A replay compares it in each situation it stops in, from the context it has walked to there. A `disabledWhen` that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does
|
|
225
|
+
`disabledIn` lists the states in which a node is shown but disabled. `disabledWhen` disables it by what the context holds, in every state that shows it: a Continue button disabled until a VAT number is typed (`disabledWhen: "not vatGiven"`, where typing it is an event whose effect sets `vatGiven`), or until a box is ticked (`disabledWhen: "not accepted"`, beside the box's `checked: accepted`). A node is disabled where either says so. A replay compares it in each situation it stops in, from the context it has walked to there. A `disabledWhen` that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does, and so does such a `when`.
|
|
220
226
|
|
|
221
227
|
`script` on a page says how much of it works without JavaScript. With `script: optional` the page and its actions work without it: its forms are posted and its links followed by the browser itself, and JavaScript only adds to them. With `script: actions` the page is drawn and can be read without JavaScript, as a page rendered on the server is, but its actions need it. Without `script` the page needs JavaScript, and the graph says nothing of it without. A replay with `--no-js` (§7) walks the flow a second time with JavaScript off. In a state whose page is `optional` it checks what the state shows, as on the first walk, and takes the next step there. In a state whose page is `actions` it checks what the state shows, and takes no step from it: the walk ends there, as it does where a step leads to a page without `script`.
|
|
222
228
|
|
|
@@ -224,7 +230,41 @@ While scripts do not run, an action of a page marked `actions` is not there, or
|
|
|
224
230
|
|
|
225
231
|
`holds` says which field of the flow's domain (§5) a node holds: the value a text shows, such as a client's name in a heading, or the value a field takes, such as a password or an API key typed into it. It names an entity of the domain and one of its fields, `<Entity>.<field>`, as `references` names an entity. So the screens say where a value the domain marks with `sensitivity` is shown or typed, and a tool that records them knows what to keep out: a recording masks every node that holds a field whose `sensitivity` the binding's `mask` names, `credential` unless it says (§7). `check` holds each `holds` to the domain the flow names, found as for `invoke` (§5): an entity the domain does not have, a field the entity does not have, or a domain that is not found beside the flow, is an error (`holds-unknown`) at the `holds`; an entity none of whose files gives `fields` yet is not held to them. `maskedNodes(g, mask)` in `@delurio/cli/graph` names the nodes of a graph that a recording masks, in the order of `nodes`, for the binding's `mask` (`[credential]` when it is left out).
|
|
226
232
|
|
|
227
|
-
The `schema` rule refuses `value` on a node that is not a field, `checked` on a node of another role, `script` on a node that is not a page, and a node called `opener`. A `checked` or a `disabledWhen` expression that names neither a variable, a guard nor `state
|
|
233
|
+
The `schema` rule refuses `value` on a node that is not a field, `checked` on a node of another role, `script` on a node that is not a page, and a node called `opener`. A `checked`, a `when` or a `disabledWhen` expression that does not parse, or names neither a variable, a guard nor `state`, keeps the graph from loading. A `value` from the catalog is held as a node's text is (`catalog-key-missing`, `sample-missing`).
|
|
234
|
+
|
|
235
|
+
### Tone
|
|
236
|
+
|
|
237
|
+
`tone` says how a node looks in a state, beside what it says: `neutral`, `info`, `success`, `warning` or `danger`. It is one word in every state that shows the node, `tone: danger`, or a map from words to expressions over the context (§3), `tone: { danger: "clock == 'lastFive'", warning: "clock == 'lastQuarter'" }`: in each situation the node takes the first word, in the order written, whose expression holds there, and no tone where none holds. An exam's countdown that turns red in its last five minutes is the second form. The words are those design systems share for the weight of a message: Bootstrap names its colours for it info, success, warning and danger, and Carbon its notifications info, success, warning and error; `neutral` is a tone that stands out from none of them. WAI-ARIA has none, as how a node looks is not in the accessibility tree: a tone changes neither a node's role nor its name, and neither `kit check` nor a replay reads it. So a tone is never all a node says (WCAG 2.2, 1.4.1 Use of Color): what it shows in a colour, its words say too, such as "5 minutes left", and where it matters to someone who does not see it, so does its role, as `alert` and `status` do. A `tone` expression that does not parse, or names anything but a variable, a guard or `state`, keeps the graph from loading, as `checked` does; a word that is not a tone is an error of the schema.
|
|
238
|
+
|
|
239
|
+
The page draws a fixed tone and names it among the node's annotations (`tone danger`). A map is named there as `tone danger when clock == 'lastFive'`, as `when` is, and the page, which draws each state once rather than each situation, draws it in no tone. The video stage draws the tone of the situation it shows: `renderStageScreen` in `@delurio/cli/wireframe` takes that situation's context as its sixth argument, a name and its value each, and picks the first word that holds; without it, only a fixed tone is drawn. The fixed components draw a tone as the class `wf-tone-<word>`, whose styles (`TONE_CSS` of the same module) a page adds only when a node of its flow has a tone; a kit draws it with its `{tone}` slot (§8).
|
|
240
|
+
|
|
241
|
+
### Rows of a repeat
|
|
242
|
+
|
|
243
|
+
A node with `repeat` stands for each item of its data. `samples` may give those items as rows, under the data's name: a list of maps, one per item, each holding the item's fields as strings, numbers or booleans.
|
|
244
|
+
|
|
245
|
+
```yaml
|
|
246
|
+
samples:
|
|
247
|
+
question.options: [ { id: a, text: "Four" }, { id: b, text: "Three" } ]
|
|
248
|
+
nodes:
|
|
249
|
+
options: { type: list, component: List, role: radiogroup, name: { labelledBy: question }, in: [answering] }
|
|
250
|
+
option:
|
|
251
|
+
type: field
|
|
252
|
+
component: ListItem
|
|
253
|
+
role: radio
|
|
254
|
+
repeat: question.options
|
|
255
|
+
text: { key: Exam.option, params: { option: row.text } }
|
|
256
|
+
checked: "row.id == answer"
|
|
257
|
+
in: [answering]
|
|
258
|
+
emits: CHOOSE
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Such a node is drawn once per row, in their order: on the page, on the tutorial stage, and in the screens `kit check` draws, which expect each element it draws (`index` counts them, as it counts a ListItem's texts). A param that reads `row.<field>` (`params: { option: row.text }`) fills its placeholder with that field of each row; where the row has no such field, the placeholder takes the sample of its name, as it does on every other node. Only a repeat node reads rows: a node drawn once has no row of its own, so its placeholders take the samples by their names even when its params name a field of some data. Without rows the node is drawn once, as before.
|
|
262
|
+
|
|
263
|
+
A repeat node's `checked` may read its row as well, `checked: "row.id == answer"`: which option of a radio group is chosen, by what the context holds. A page draws each state's screen once, for all the situations that show it, so it draws only `checked: true`. A screen drawn for one situation, as the tutorial stage draws each step, reads `checked` over that situation's context and each row (`renderStageScreen`'s `ctx` in `@delurio/cli/wireframe`). `row.<field>` in the `checked` of a node without `repeat` keeps the graph from loading, as any other name that is not a variable or a guard does.
|
|
264
|
+
|
|
265
|
+
A transition whose event a repeat node sends may set a variable from the row that was pressed: `effects: { choose: { set: { answer: row.id } } }`, the effect of the transition on `CHOOSE`. The flow alone does not say which row is pressed, and the sample rows illustrate the screens: they are not the app's data and never decide what the flow can reach. So the checker lets such a variable take any of its values, as `havoc` does (§2), whether the samples give rows or not, and every row the app may draw is among the situations it explores. A tutorial says which row it presses (`row`, §7), and takes the case that row gives.
|
|
266
|
+
|
|
267
|
+
Adjacent nodes, in the order of `nodes`, that share the same `repeat` are drawn as one row per item, side by side: the number of an entry in a list of questions beside its state, or the cells of a table's row. A List holds, besides the ListItems after it, the rows of the nodes after it that share a repeat: each row is one item of the list, and a ListItem that begins a row is that item, with the other nodes beside its words. A List whose role is `table` or `grid` draws its items row by row: the header cells after it (role `columnheader`) form its header row, and the rows of the repeat nodes after them are the table's rows. The first node that is none of these ends the list, as before. A lone repeat node outside a list is drawn once per row, as it was drawn once. With a kit each node keeps its own template, and the rows are drawn around them; a table's row is an element of role `row`, so a kit draws a table with elements of roles `table` and `cell` (`<div role="table">`), not with `<table>`, out of which the HTML parser moves the rows. The expected accessibility tree gives the same rows. Decided on 22 Nov 2026, with rows in the samples and `checked` and effects that read the row.
|
|
228
268
|
|
|
229
269
|
### Catalog
|
|
230
270
|
|
|
@@ -405,15 +445,23 @@ A **tutorial** is written against a flow: `title`, `audience`, `locale`, `appNam
|
|
|
405
445
|
|
|
406
446
|
`then { <variable>: <value> }` says how a step comes out where an effect leaves it to chance (`havoc`, §2): what the host answered, what a folder held. Of the cases the step's transitions can take, the step takes the one in which these variables have these values. A step without `then` takes the model's first case, and a `then` that no case of the step matches stops the tutorial at that step. So a tutorial can go the way a person meets most, such as a host that lists their repositories, when the graph also allows every other answer.
|
|
407
447
|
|
|
448
|
+
`row: <n>` on a step that presses a repeat node (§4) says which of the node's sample rows it presses, counted from 1: `{ press: option, row: 2 }` presses the second option. Of the cases the press can take, the step takes the one in which each variable that the transition's effects set from the row (`row.<field>`) has that row's value. `check` stops the tutorial at that step (`tutorial-mismatch`) when `row` is not a whole number from 1, the step presses no node, the node has no `repeat`, the samples give it no rows or fewer than `n`, the row lacks a field the effects read, or no case of the press has the row's value, such as a value its variable does not have. A press on a repeat node without `row` takes the model's first case, as a step without `then` does.
|
|
449
|
+
|
|
408
450
|
`stage` says what the video shows: the flow's screens (`screen`, the default), or its diagram (`diagram`), for a flow with no screens, such as two programs talking or a job in the background. On the diagram the camera goes from state to state, and the tutorial's own way is drawn as the story, whether or not it is the flow's `main` story; the diagram holds every transition, failures included. No state is passed on its own there: `show <state>` and `end <state>` walk the flow to their state along its normal way (a transition with no event, then `DONE`) and stop the tutorial when that way does not reach it, and every other event is given with `after`. `press`, `reveal` and `focus` point at nodes a diagram does not have, and stop it too. An `end` on the diagram needs no `card`; one it has is shown after the ending.
|
|
409
451
|
|
|
410
452
|
`check` reads the `tutorial.yaml` beside a flow and replays it on the flow as the video does, from the start its `scenario` gives: a value of its list for each variable that starts from any value, and none that differs from a fixed `initial`. On the screens, a step that shows no screen passes on its own along its normal way (a transition with no event, then `DONE`), and one with no such way waits for an event given with `after`; on the diagram, `show` and `end` walk as above. A tutorial that no longer matches its flow is an error (`tutorial-mismatch`) that fails `--strict`, at the step where it stops: its `flow` is not the flow beside it; a step names a state, a node, an event, a variable or a value the graph does not have, or a `{word}` that is neither a sample value nor a node with visible text; `show` names a state the flow is not in; `cut` names a state no reachable situation is in, with the nodes it `reveal`s shown; `press` names a node the state does not show, or disables, or that sends no event the state handles; `after` names an event the state does not handle; `reveal` or `focus` names a node the step's screen does not show, or `focus` one shown only `when` something holds and not revealed; `end` names a state the flow is not in, or, given no state, the flow is not at an exit; or a `then` matches no case of its step. Every name is looked for on every step, and the steps are replayed once all are found.
|
|
411
453
|
|
|
412
|
-
A video is an MP4 file. Its captions are WebVTT (`tutorial.vtt`, what an HTML `<track>` plays, with `tutorial.srt` beside it), and its chapters a WebVTT chapters track (`chapters.vtt`). Every video delurio
|
|
454
|
+
A video is an MP4 file. Its captions are WebVTT (`tutorial.vtt`, what an HTML `<track>` plays, with `tutorial.srt` beside it), and its chapters a WebVTT chapters track (`chapters.vtt`). Every video delurio publishes is marked as AI-made in three ways, none of which can be turned off: a first card that says the whole video is made with AI, an imperceptible watermark in the sound and the picture, and signed, time-stamped provenance metadata (C2PA). The watermark and the metadata are the machine-readable marking that Art. 50(2) of the EU AI Act asks of a system that generates synthetic audio and video, and the Commission's Code of Practice of 10 June 2026 describes. The disclosure is there because every voice is made from real people's recordings and may resemble one of them, which Art. 50(4) treats as a deep fake to disclose; a catalogue voice is no different from a cloned one in that, and delurio cannot tell which listener would recognise which voice (Taha, 24 Oct 2026: "Klon olmayan sesler de gerçek insan sesinden"). It opens the video, since Art. 50(5) asks for it at the latest at the first exposure, and no label is burnt into the picture after it (Taha, 25 Oct 2026: "en başta 'videonun tamamı' diye belirtip yazsak yetmez mi"); a clip cut from the middle loses the card but keeps the watermark and the metadata. A video's maker may draw its own mark in a corner of the picture, for the whole video. That mark is not the AI label, and neither is a draft's stamp (below): the first card is the disclosure, and nothing but that mark and the stamp is burnt into the picture. A lawyer is to confirm this reading. delurio's video tool adds both to every video it makes; the certificate that signs the metadata is not on the C2PA trust list yet.
|
|
455
|
+
|
|
456
|
+
A **draft** is a review copy of a video, made for the person who asked for it, and it is never published: no player, page or embed plays it. It keeps the first card and the watermark in the sound, and leaves out only the watermark in the picture. In its place a visible stamp on every frame shows the maker's mark, the word for draft in the video's language, the time of the frame in the video and the draft's id, and its signed metadata assert that it is a draft. A video published once its draft is approved carries all three marks, as every published video does, and no stamp.
|
|
413
457
|
|
|
414
458
|
## 8. Kit (`kind: kit`)
|
|
415
459
|
|
|
416
|
-
A kit says how the components of `ui.yaml` look in one product: `tokens` and `dark` (design tokens files in the Design Tokens Format Module 2025.10 of the W3C Design Tokens Community Group), `css` (scoped to the screen), and per component a `template` with slots (`{text}`, `{name}`, `{intent}`, `{id}`, `{children}`), flags (`{?disabled}..{/disabled}`, `named`, `conditional`, `checked`: a node whose `checked` is `true`), `roles` and `
|
|
460
|
+
A kit says how the components of `ui.yaml` look in one product: `tokens` and `dark` (design tokens files in the Design Tokens Format Module 2025.10 of the W3C Design Tokens Community Group), `css` (scoped to the screen), and per component a `template` with slots (`{text}`, `{name}`, `{intent}`, `{id}`, `{children}`, `{tone}`), flags (`{?disabled}..{/disabled}`, `named`, `conditional`, `checked`: a node whose `checked` is `true`), `roles`, `intents` and `tones`; and the kit's `tones` and `fonts`. A kit is data: nothing in it runs or is fetched. `kit check` proves that every node keeps the role, the name and the disabled state the graph expects.
|
|
461
|
+
|
|
462
|
+
**Tones.** A template's `{tone}` gives the node's tone (§4), as `{intent}` gives its intent. `tones` maps each tone to the word the slot gives: at the top of kit.yaml for every component, `tones: { danger: mds-text--danger, warning: mds-text--warning, default: "" }`, and in a component for its own, which it reads first. `default` is the word for a node without a tone, or whose map holds no word in the situation drawn. Without `tones` the slot gives the tone itself, `danger`, and nothing for a node without one. A kit that has `tones` gives an entry for every tone that a node drawn with a template that has `{tone}` may take, its fixed one or any of its map, whether or not the screen drawn shows it: one it lacks is drawn as `default`, and is an error of `check` (`kit-uncovered`), as an intent that `intents` lacks is. A template without `{tone}` draws no tone and is held to none. A key of `tones` that is neither a tone nor `default` keeps the kit from loading.
|
|
463
|
+
|
|
464
|
+
**Fonts.** As a kit fetches nothing, a font its CSS names is drawn only where the machine that draws the screens has it, unless the kit carries it. `fonts` lists the files it carries, `{ family, file, weight, style, unicodeRange }` each: `file` is a woff2, woff, ttf or otf file in the kit's folder, given relative to it; `weight` a number from 1 to 1000, a range of two (`100 900`, a variable font's), `normal` or `bold`; `style` `normal`, `italic` or `oblique`; `unicodeRange` the code points the file draws, as CSS writes them (`U+0000-00FF, U+0131`). The page and the video stage embed each file in an `@font-face`, as a data: URL, once whatever the number of screens. A font is carried only when its licence allows it to be embedded, as the SIL Open Font License does. A file is embedded when it is at most 2 MiB, and while the kit's files together are at most 8 MiB, which four variable fonts of about 1.5 MB each fit. A file that is not in the kit's folder (an absolute path, a path that climbs out of it with `..`, or a link to a file outside it) is not read; it, and one that is not there, is not a file, is not by its first bytes the format its name says, or is too large, is not embedded: an error of `check` (`kit-font`) at its entry, once however many flows draw with the kit, and a warning of `page`. An entry whose `family` is not a name a CSS string holds, or whose `weight`, `style` or `unicodeRange` is none of the above, keeps the kit from loading. `check` warns (`kit-font-unembedded`), once, of each family that the kit's CSS draws in first, the first of the stack a `font-family` or `font` declaration gives, through the custom properties it reads from the tokens or the CSS, that is neither a family of `fonts` nor a generic family (`serif`, `sans-serif`, `monospace`, `cursive`, `fantasy`, `system-ui`, `math`, `emoji`, `fangsong` and the `ui-` families): the screens are drawn in it only where the machine has it. The rest of a stack is its fallbacks, and is not held. `kitFamilies` in `@delurio/cli/kit` lists the families a kit carries, so that a tool that draws its screens in a browser can ask which it drew.
|
|
417
465
|
|
|
418
466
|
## 9. Source anchors
|
|
419
467
|
|
|
@@ -441,7 +489,7 @@ What is not known touches every graph, and the answer says why: the base or the
|
|
|
441
489
|
|---|---|
|
|
442
490
|
| 0 | the graph loads and, under `--strict`, nothing is wrong |
|
|
443
491
|
| 1 | the graph cannot be loaded: a YAML error, unsupported YAML (§1), an unknown state, an unknown name in an expression or one that does not parse, a non-exhaustive `always`, an unsupported construct, a `ui.yaml` that names no catalog or a catalog that is not there or not JSON (§4) |
|
|
444
|
-
| 2 | under `--strict`: an assertion is violated, a state no situation reaches or a state that is no exit and has no way out (§2), a catalog key is missing from a locale's catalog or a sample value from the samples, a component has no renderer, the kit does not cover a component, the main story cannot be walked, the focus goes to a node that is not shown or a `returnsFocus` does not start at a dialog (§4), a domain's files clash, a server function has what only a route has, a domain names an entity or a field it does not have, a policy names an action or an entity its domain does not have, or a flow invokes an action its domain does not have, names a domain that is not found, or lists a failure code that is neither a refusal of its action nor a transport code, or a node holds a field its flow's domain does not have (§4), or a planned entity or action names its code (§5), a tutorial no longer matches its flow (§7), a state of a captured flow names no code or an anchor does not resolve (§9), or a need's evidence does not resolve, a need that is not missing names none, or a product's gaps and its needs disagree (§13) |
|
|
492
|
+
| 2 | under `--strict`: an assertion is violated, a state no situation reaches or a state that is no exit and has no way out (§2), a catalog key is missing from a locale's catalog or a sample value from the samples, a component has no renderer, the kit does not cover a component or a tone or a font file it lists cannot be embedded (§8), the main story cannot be walked, the focus goes to a node that is not shown or a `returnsFocus` does not start at a dialog, or a node is shown enabled in a state that does not handle its event (§4), a domain's files clash, a server function has what only a route has, a domain names an entity or a field it does not have, a policy names an action or an entity its domain does not have, or a flow invokes an action its domain does not have, names a domain that is not found, or lists a failure code that is neither a refusal of its action nor a transport code, or a node holds a field its flow's domain does not have (§4), or a planned entity or action names its code (§5), a tutorial no longer matches its flow (§7), a state of a captured flow names no code or an anchor does not resolve (§9), or a need's evidence does not resolve, a need that is not missing names none, or a product's gaps and its needs disagree (§13) |
|
|
445
493
|
|
|
446
494
|
**Where the code is.** What a graph names of the application is read from the application's repository root: the folder `check --app <dir>` names, or else the folder `check` runs in, as a CI runs it at the root of the repository it checked out. That is every `source:` anchor and every citation in words (§9), and a need's `source`, `test` and `setting`, and a `scenario` whose binding is named by its path (§13). A check that has a project's graphs without its code, such as the panel's check of a graphs folder alone, says `--no-app`: none of these is looked for, and rather than a finding for each, the output says once how many were not, on a line before the summary in text and as a notification of the run (`toolExecutionNotifications`, at the level `note`) in SARIF, as `check examples --no-app` gives it:
|
|
447
495
|
|
|
@@ -471,7 +519,7 @@ graphs/product/flow.yaml:88:7: note: step 2: CODE_CHANGED from developing, with
|
|
|
471
519
|
| a finding: its rule, level, message, file, line and column | `result`: `ruleId`, `level`, `message`, `locations[0].physicalLocation` with its `region` |
|
|
472
520
|
| the graph element it is about: a state, a node, a page, an action | `logicalLocations`, e.g. `qauth.authorize/states/consent` |
|
|
473
521
|
| the guard or the assertion involved, the app code a `source:` names | `relatedLocations`; the graph's files under the base `SRCROOT`, the app's under `APPROOT` |
|
|
474
|
-
| the path that breaks an assertion: the start, each event, the context at each step, the steps inside an invoked flow | `codeFlows[].threadFlows[].locations`, with `state` for the context and `nestingLevel` for the invoked flow |
|
|
522
|
+
| the path that breaks an assertion, or reaches a node shown enabled where its event is not handled (§4): the start, each event, the context at each step, the steps inside an invoked flow | `codeFlows[].threadFlows[].locations`, with `state` for the context and `nestingLevel` for the invoked flow |
|
|
475
523
|
| the flow itself, and the path drawn on it | `run.graphs` and `result.graphTraversals` |
|
|
476
524
|
| the same finding in a later run, though its lines moved | `fingerprints` (`delurio/v1`: from the rule, the graph and the element, not the line) |
|
|
477
525
|
| a finding dismissed with a reason (`finding.triage`) | `suppressions`, with `justification` |
|
package/js/graph.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface ContextVar {
|
|
|
39
39
|
say?: Record<string, string>;
|
|
40
40
|
}
|
|
41
41
|
export interface Effect {
|
|
42
|
+
/** Values the variables are given; `row.<field>` is a field of the row pressed, which the checker lets be any value of the variable. */
|
|
42
43
|
set?: Record<string, Scalar>;
|
|
43
44
|
havoc?: string[];
|
|
44
45
|
}
|
|
@@ -96,14 +97,23 @@ export interface UiNode {
|
|
|
96
97
|
disabledWhen?: string;
|
|
97
98
|
emits?: string;
|
|
98
99
|
initialFocus?: string;
|
|
100
|
+
/** Drawn once per item of this data: once per row the samples give it, else once. */
|
|
99
101
|
repeat?: string;
|
|
100
102
|
frame?: string;
|
|
101
103
|
value?: Label;
|
|
102
104
|
holds?: string;
|
|
105
|
+
/** Whether it is checked: an expression over the context (on a repeat node, also over its row, `row.<field>`), or true or false. */
|
|
103
106
|
checked?: boolean | string;
|
|
104
107
|
script?: 'optional' | 'actions';
|
|
105
108
|
source?: string;
|
|
109
|
+
/** How the node looks, never all it says (SPEC.md §4): a fixed tone, or each tone with the expression over the context under which the node takes it; the first that holds wins. */
|
|
110
|
+
tone?: Tone | Partial<Record<Tone, string>>;
|
|
111
|
+
duringStep?: boolean;
|
|
106
112
|
}
|
|
113
|
+
/** The tones a node may take (SPEC.md §4). */
|
|
114
|
+
export type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
115
|
+
/** One item of a repeat's data in the samples: its fields and their values (SPEC.md §4). */
|
|
116
|
+
export type SampleRow = Record<string, Scalar>;
|
|
107
117
|
export interface UiEdge {
|
|
108
118
|
labelledBy?: [string, string];
|
|
109
119
|
triggers?: [string, string];
|
|
@@ -117,7 +127,8 @@ export interface Ui {
|
|
|
117
127
|
id: string;
|
|
118
128
|
catalog: string;
|
|
119
129
|
kit?: string;
|
|
120
|
-
|
|
130
|
+
/** A sample value for each catalog parameter, or, under a repeat's data (`question.options`), its rows: each a map of the fields its nodes read as `row.<field>`. */
|
|
131
|
+
samples: Record<string, string | SampleRow[]>;
|
|
121
132
|
nodes: Record<string, UiNode>;
|
|
122
133
|
locales?: string[];
|
|
123
134
|
changes?: {
|
package/js/kit.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare class KitError extends Error {
|
|
2
2
|
}
|
|
3
|
-
declare const SLOTS: readonly ['text', 'name', 'id', 'intent', 'children'];
|
|
3
|
+
declare const SLOTS: readonly ['text', 'name', 'id', 'intent', 'children', 'tone'];
|
|
4
4
|
declare const FLAGS: readonly ['disabled', 'named', 'conditional', 'checked'];
|
|
5
5
|
type Slot = (typeof SLOTS)[number];
|
|
6
6
|
type Flag = (typeof FLAGS)[number];
|
|
@@ -22,6 +22,19 @@ export interface KitComponent {
|
|
|
22
22
|
template: Template;
|
|
23
23
|
roles: Record<string, Template>;
|
|
24
24
|
intents?: Record<string, string>;
|
|
25
|
+
/** node tone -> the word {tone} gives, read before the kit's own `tones`; `default` for a node without one */
|
|
26
|
+
tones?: Record<string, string>;
|
|
27
|
+
}
|
|
28
|
+
/** A font the kit carries (`fonts:` in kit.yaml, SPEC.md §8). */
|
|
29
|
+
export interface KitFont {
|
|
30
|
+
family: string;
|
|
31
|
+
/** as kit.yaml gives it, relative to the kit's folder */
|
|
32
|
+
file: string;
|
|
33
|
+
weight?: string;
|
|
34
|
+
style?: 'normal' | 'italic' | 'oblique';
|
|
35
|
+
unicodeRange?: string;
|
|
36
|
+
/** the file as a data: URL; absent when it cannot be embedded */
|
|
37
|
+
src?: string;
|
|
25
38
|
}
|
|
26
39
|
export interface Kit {
|
|
27
40
|
id: string;
|
|
@@ -32,6 +45,10 @@ export interface Kit {
|
|
|
32
45
|
dark: Array<[string, string]>;
|
|
33
46
|
css: string;
|
|
34
47
|
zoom: number;
|
|
48
|
+
/** node tone -> the word {tone} gives, for a component that gives none of its own; `default` for a node without one */
|
|
49
|
+
tones?: Record<string, string>;
|
|
50
|
+
/** the fonts it carries, in the order of kit.yaml */
|
|
51
|
+
fonts?: KitFont[];
|
|
35
52
|
}
|
|
36
53
|
export interface Fill {
|
|
37
54
|
id: string;
|
|
@@ -44,6 +61,8 @@ export interface Fill {
|
|
|
44
61
|
named: boolean;
|
|
45
62
|
conditional: boolean;
|
|
46
63
|
checked: boolean;
|
|
64
|
+
/** the tone the node is drawn in (SPEC.md §4) */
|
|
65
|
+
tone?: string;
|
|
47
66
|
}
|
|
48
67
|
export declare function drawWith(kit: Kit, component: string, f: Fill, warn: (m: string) => void): string | null;
|
|
49
68
|
export declare function mark(html: string, id: string, chips: string): string;
|
|
@@ -51,4 +70,6 @@ export declare function loadKit(path: string): Kit;
|
|
|
51
70
|
export declare function resolveKit(graphDir: string, uiKit: string | undefined, flagValue: string | undefined): Kit | null;
|
|
52
71
|
export declare function kitCss(kit: Kit, target: 'page' | 'stage'): string;
|
|
53
72
|
export declare function kitStageScript(kit: Kit): string;
|
|
73
|
+
/** The families of the kit's own fonts (`fonts:`), each once, in the order of kit.yaml: what its screens should be drawn in. */
|
|
74
|
+
export declare function kitFamilies(kit: Kit): string[];
|
|
54
75
|
export {};
|
package/js/kit.js
CHANGED
|
@@ -4,10 +4,13 @@ import { KitError, Trap, call, json, native, nativeKit, rememberKit, warnings }
|
|
|
4
4
|
|
|
5
5
|
export { KitError };
|
|
6
6
|
|
|
7
|
-
// a kit as loadKit gave it: each component's `intents` is a key of its own, undefined when the kit gives none
|
|
7
|
+
// a kit as loadKit gave it: each component's `intents` is a key of its own, undefined when the kit gives none, and
|
|
8
|
+
// its `tones` one only when the kit gives them
|
|
8
9
|
function kitOf(n) {
|
|
9
10
|
const k = JSON.parse(n.json());
|
|
10
|
-
for (const [name, c] of Object.entries(k.components))
|
|
11
|
+
for (const [name, c] of Object.entries(k.components)) {
|
|
12
|
+
k.components[name] = { template: c.template, roles: c.roles, intents: c.intents, ...(c.tones === undefined ? {} : { tones: c.tones }) };
|
|
13
|
+
}
|
|
11
14
|
return rememberKit(k, n);
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -52,3 +55,9 @@ export function kitCss(kit, target) {
|
|
|
52
55
|
export function kitStageScript(kit) {
|
|
53
56
|
return native.kitStageScript(nativeKit(kit));
|
|
54
57
|
}
|
|
58
|
+
|
|
59
|
+
// The families of the kit's own fonts (`fonts:`), each once, in the order of kit.yaml: what its screens should be
|
|
60
|
+
// drawn in, so that a tool can ask the browser whether it drew them.
|
|
61
|
+
export function kitFamilies(kit) {
|
|
62
|
+
return native.kitFamilies(nativeKit(kit));
|
|
63
|
+
}
|
package/js/native.d.cts
CHANGED
|
@@ -162,6 +162,9 @@ export declare function kindOf(g: NativeGraph, name: string): string
|
|
|
162
162
|
/** `kitCss(kit, target)` */
|
|
163
163
|
export declare function kitCss(kit: NativeKit, target: string): string
|
|
164
164
|
|
|
165
|
+
/** `kitFamilies(kit)` */
|
|
166
|
+
export declare function kitFamilies(kit: NativeKit): Array<string>
|
|
167
|
+
|
|
165
168
|
/** `kitStageScript(kit)` */
|
|
166
169
|
export declare function kitStageScript(kit: NativeKit): string
|
|
167
170
|
|
|
@@ -262,8 +265,11 @@ export declare function renderCheckScreens(g: NativeGraph, kit: NativeKit | unde
|
|
|
262
265
|
/** `renderScreens(g, warn, kit)` */
|
|
263
266
|
export declare function renderScreens(g: NativeGraph, warn: (arg: string) => void, kit?: NativeKit | undefined | null): string
|
|
264
267
|
|
|
265
|
-
/**
|
|
266
|
-
|
|
268
|
+
/**
|
|
269
|
+
* `renderStageScreen(g, state, reveal, warn, kit, ctx)`: `ctx`, the situation's context as JSON (a map of the flow's
|
|
270
|
+
* variables to their values), or undefined
|
|
271
|
+
*/
|
|
272
|
+
export declare function renderStageScreen(g: NativeGraph, state: string, reveal: Array<string>, warn: (arg: string) => void, kit?: NativeKit | undefined | null, ctx?: string | undefined | null): string
|
|
267
273
|
|
|
268
274
|
/** `resolveKit(graphDir, uiKit, flagValue)` */
|
|
269
275
|
export declare function resolveKit(graphDir: string, uiKit?: string | undefined | null, flagValue?: string | undefined | null): NativeKit | null
|
|
@@ -306,6 +312,9 @@ export declare function takeYamlWarnings(): string
|
|
|
306
312
|
/** `titleOf(flow, state)` */
|
|
307
313
|
export declare function titleOfState(flow: NativeValue, state: string): string
|
|
308
314
|
|
|
315
|
+
/** `TONE_CSS`: the styles of a tone the fixed components draw */
|
|
316
|
+
export declare function toneCss(): string
|
|
317
|
+
|
|
309
318
|
/** `transitionPath(state, st, event, i)` */
|
|
310
319
|
export declare function transitionPathOf(state: string, st: string, event: string | undefined | null, i: number): Array<string>
|
|
311
320
|
|
package/js/wireframe.d.ts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
import type { Graph } from './graph.js';
|
|
1
|
+
import type { Graph, Scalar } from './graph.js';
|
|
2
2
|
import type { Kit } from './kit.js';
|
|
3
3
|
type Warn = (message: string) => void;
|
|
4
4
|
export declare function renderScreens(g: Graph, warn: Warn, kit?: Kit | null): string;
|
|
5
|
-
|
|
5
|
+
/** The context a stage screen is drawn in: each name of the flow's expressions and its value. */
|
|
6
|
+
export type StageContext = Record<string, Scalar | null>;
|
|
7
|
+
/**
|
|
8
|
+
* One state's screen for the tutorial stage. `ctx`, the context of the situation it shows (each variable of the flow
|
|
9
|
+
* and its value), picks each node's tone from its map (SPEC.md §4) and draws each node's `checked` as it reads there,
|
|
10
|
+
* for each row it is drawn for; without it only a fixed tone and `checked: true` are drawn.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderStageScreen(g: Graph, state: string, reveal: string[], warn: Warn, kit?: Kit | null, ctx?: StageContext | null): string;
|
|
13
|
+
/** The styles of a tone drawn by the fixed components (`wf-tone-<word>`): a page adds them where a node has a tone; a video stage adds them too. */
|
|
14
|
+
export declare const TONE_CSS: string;
|
|
6
15
|
export interface Expectation {
|
|
7
16
|
state: string;
|
|
8
17
|
id: string;
|
package/js/wireframe.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// A flow's screens as wireframes, drawn with the fixed components or with a kit. The checker is the Rust one
|
|
2
2
|
// (crates/delurio-core/src/wireframe.rs).
|
|
3
|
-
import { Trap, call, native, nativeGraph, nativeKit } from './internal.js';
|
|
3
|
+
import { Trap, call, json, native, nativeGraph, nativeKit } from './internal.js';
|
|
4
|
+
|
|
5
|
+
// The styles of a tone drawn by the fixed components (`wf-tone-<word>`), for the page and the video stage.
|
|
6
|
+
export const TONE_CSS = native.toneCss();
|
|
4
7
|
|
|
5
8
|
export function renderScreens(g, warn, kit = null) {
|
|
6
9
|
const t = new Trap();
|
|
@@ -8,9 +11,12 @@ export function renderScreens(g, warn, kit = null) {
|
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
// One state's screen for the tutorial stage. Nodes that depend on a flag (`when`) appear only when named in `reveal`.
|
|
11
|
-
|
|
14
|
+
// `ctx`, the situation's context (each variable of the flow and its value), picks each node's tone from its map and draws
|
|
15
|
+
// `checked` as it reads there; without it only a fixed tone and `checked: true` are drawn.
|
|
16
|
+
export function renderStageScreen(g, state, reveal, warn, kit = null, ctx = null) {
|
|
12
17
|
const t = new Trap();
|
|
13
|
-
|
|
18
|
+
const c = ctx === null || ctx === undefined ? undefined : json(ctx);
|
|
19
|
+
return call(t, () => native.renderStageScreen(nativeGraph(g), String(state), [...(reveal ?? [])].map(String), t.warner(warn), nativeKit(kit), c));
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
// For `kit check`: every screen with all its nodes (flags revealed, no annotations), and what each node must expose.
|
|
@@ -19,7 +25,7 @@ export function renderCheckScreens(g, kit, warn) {
|
|
|
19
25
|
const out = JSON.parse(call(t, () => native.renderCheckScreens(nativeGraph(g), nativeKit(kit), t.warner(warn))));
|
|
20
26
|
return {
|
|
21
27
|
html: out.html,
|
|
22
|
-
expected: out.expected.map((e) => ({ state: e.state, id: e.id, index: e.index, role: e.role, ...('roleGiven' in e ? { roleGiven: e.roleGiven } : {}), name: e.name, disabled: e.disabled })),
|
|
28
|
+
expected: out.expected.map((e) => ({ state: e.state, id: e.id, index: e.index, role: e.role, ...('roleGiven' in e ? { roleGiven: e.roleGiven } : {}), ...('native' in e ? { native: e.native } : {}), name: e.name, disabled: e.disabled })),
|
|
23
29
|
};
|
|
24
30
|
}
|
|
25
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delurio/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "The open checker and page of delurio-graph/0: check every graph in a project's own CI, offline, with GNU error lines and SARIF.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"elkjs": "0.12.1"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@delurio/cli-linux-x64-gnu": "0.
|
|
51
|
-
"@delurio/cli-linux-x64-musl": "0.
|
|
52
|
-
"@delurio/cli-linux-arm64-gnu": "0.
|
|
53
|
-
"@delurio/cli-linux-arm64-musl": "0.
|
|
54
|
-
"@delurio/cli-darwin-arm64": "0.
|
|
55
|
-
"@delurio/cli-win32-x64-msvc": "0.
|
|
50
|
+
"@delurio/cli-linux-x64-gnu": "0.14.0",
|
|
51
|
+
"@delurio/cli-linux-x64-musl": "0.14.0",
|
|
52
|
+
"@delurio/cli-linux-arm64-gnu": "0.14.0",
|
|
53
|
+
"@delurio/cli-linux-arm64-musl": "0.14.0",
|
|
54
|
+
"@delurio/cli-darwin-arm64": "0.14.0",
|
|
55
|
+
"@delurio/cli-win32-x64-msvc": "0.14.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@napi-rs/cli": "3.10.12"
|
package/schemas/flow.schema.json
CHANGED
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
"properties": {
|
|
182
182
|
"set": {
|
|
183
183
|
"type": "object",
|
|
184
|
-
"description": "Variables and the values they are given.",
|
|
184
|
+
"description": "Variables and the values they are given. A value written `row.<field>` is the field of the row pressed, on a transition whose event a repeat node sends (SPEC.md §4): the checker lets the variable take any of its values, as `havoc` does.",
|
|
185
185
|
"propertyNames": { "$ref": "#/$defs/identifier" },
|
|
186
186
|
"additionalProperties": { "$ref": "#/$defs/scalar" }
|
|
187
187
|
},
|
package/schemas/ui.schema.json
CHANGED
|
@@ -32,9 +32,18 @@
|
|
|
32
32
|
"kit": { "type": "string", "description": "The kit the screens are drawn with (SPEC.md §8), relative to the graph; `--kit` wins.", "examples": ["../kit"] },
|
|
33
33
|
"samples": {
|
|
34
34
|
"type": "object",
|
|
35
|
-
"description": "Values for catalog parameters, on the page and in videos: `{client}` in a message is filled with `samples.client`.",
|
|
36
|
-
"additionalProperties": {
|
|
37
|
-
|
|
35
|
+
"description": "Values for catalog parameters, on the page and in videos: `{client}` in a message is filled with `samples.client`. A key that is a repeat's data (`question.options`) may give its rows instead: a list of maps, one per item, with the fields its nodes' params read as `row.<field>`; each such node is then drawn once per row (SPEC.md §4).",
|
|
36
|
+
"additionalProperties": {
|
|
37
|
+
"type": ["string", "array"],
|
|
38
|
+
"description": "The sample value, or the rows of a repeat's data.",
|
|
39
|
+
"minItems": 1,
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"description": "One item of the data: its fields and their values.",
|
|
43
|
+
"additionalProperties": { "type": ["string", "number", "boolean"] }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"examples": [{ "client": "Acme Notes" }, { "question.options": [{ "id": "a", "text": "Four" }, { "id": "b", "text": "Three" }] }]
|
|
38
47
|
},
|
|
39
48
|
"task": {
|
|
40
49
|
"type": "object",
|
|
@@ -273,7 +282,7 @@
|
|
|
273
282
|
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
274
283
|
},
|
|
275
284
|
"initialFocus": { "$ref": "#/$defs/nodeRef", "description": "On a page: the node that has focus when it opens, at the flow's start or when a transition shows it." },
|
|
276
|
-
"repeat": { "type": "string", "description": "The node is drawn once per item of this data.", "examples": ["request.scopes"] },
|
|
285
|
+
"repeat": { "type": "string", "description": "The node is drawn once per item of this data: once per row when the samples give its rows (`samples.<data>`), else once. Its params may read the item's fields as `row.<field>`, and so may its `checked`. Adjacent nodes with the same repeat are drawn side by side, one row per item.", "examples": ["request.scopes"] },
|
|
277
286
|
"frame": {
|
|
278
287
|
"description": "For a page: whether it may be framed; `never` (served with CSP frame-ancestors 'none').",
|
|
279
288
|
"const": "never"
|
|
@@ -288,14 +297,31 @@
|
|
|
288
297
|
"checked": {
|
|
289
298
|
"type": ["boolean", "string"],
|
|
290
299
|
"minLength": 1,
|
|
291
|
-
"description": "On a checkbox, menuitemcheckbox, menuitemradio, option, radio or switch: whether it is checked (or selected) when it is shown, as an expression over the flow's context (SPEC.md §3), or true or false. A replay reads its checked state and compares it.",
|
|
292
|
-
"examples": [true, "pinned", "plan == 'yearly'"]
|
|
300
|
+
"description": "On a checkbox, menuitemcheckbox, menuitemradio, option, radio or switch: whether it is checked (or selected) when it is shown, as an expression over the flow's context (SPEC.md §3), or true or false. On a repeat node it may read the item it is drawn for, `row.<field>`. A replay reads its checked state and compares it.",
|
|
301
|
+
"examples": [true, "pinned", "plan == 'yearly'", "row.id == answer"]
|
|
293
302
|
},
|
|
294
303
|
"script": {
|
|
295
304
|
"description": "On a page: how much of it works without JavaScript. `optional`: the page and its actions (plain forms and links). `actions`: the page is drawn and read without it (rendered on the server), and only its actions need it. Without it, the page needs JavaScript. A replay's second walk with JavaScript off checks an `optional` page and takes its actions, and checks an `actions` page but its actions, and ends there.",
|
|
296
305
|
"enum": ["optional", "actions"]
|
|
297
306
|
},
|
|
298
|
-
"source": { "$ref": "#/$defs/sourceAnchor" }
|
|
307
|
+
"source": { "$ref": "#/$defs/sourceAnchor" },
|
|
308
|
+
"tone": {
|
|
309
|
+
"description": "How the node looks, never all it says (WCAG 2.2, 1.4.1 Use of Color): its words and its role say the same (SPEC.md §4). One tone in every state that shows it, or each tone with the expression over the flow's context (SPEC.md §3) under which the node takes it, in order: the first whose expression holds wins, and none, no tone. A kit draws it with its {tone} slot and its `tones` (SPEC.md §8).",
|
|
310
|
+
"oneOf": [
|
|
311
|
+
{ "$ref": "#/$defs/tone" },
|
|
312
|
+
{
|
|
313
|
+
"type": "object",
|
|
314
|
+
"minProperties": 1,
|
|
315
|
+
"propertyNames": { "$ref": "#/$defs/tone" },
|
|
316
|
+
"additionalProperties": { "$ref": "#/$defs/expression" }
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"examples": ["danger", { "danger": "clock == 'lastFive'", "warning": "clock == 'lastQuarter'" }]
|
|
320
|
+
},
|
|
321
|
+
"duringStep": {
|
|
322
|
+
"type": "boolean",
|
|
323
|
+
"description": "`true`: in a state that runs a step (`invoke`), the node stays usable while the step runs, and its event is handled once the step ends, by the state the step's outcome (DONE, FAIL.<class>) leads to, such as a link to sign out beside a form that is being saved. `check` then holds that state, not the step's, to the event (event-unhandled). A replay does not press a node while a step runs (SPEC.md §4)."
|
|
324
|
+
}
|
|
299
325
|
},
|
|
300
326
|
"allOf": [
|
|
301
327
|
{
|
|
@@ -322,6 +348,11 @@
|
|
|
322
348
|
"$comment": "a node that names its native control gives no role: WAI-ARIA gives that control none",
|
|
323
349
|
"if": { "required": ["native"] },
|
|
324
350
|
"then": { "properties": { "role": false } }
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"$comment": "duringStep is only on a node that sends an event: it says where that event is handled",
|
|
354
|
+
"if": { "required": ["duringStep"], "properties": { "duringStep": { "const": true } } },
|
|
355
|
+
"then": { "required": ["emits"] }
|
|
325
356
|
}
|
|
326
357
|
]
|
|
327
358
|
},
|
|
@@ -362,6 +393,10 @@
|
|
|
362
393
|
"maxItems": 2
|
|
363
394
|
}
|
|
364
395
|
}
|
|
396
|
+
},
|
|
397
|
+
"tone": {
|
|
398
|
+
"description": "A tone a node takes (SPEC.md §4): neutral, info, success, warning or danger.",
|
|
399
|
+
"enum": ["neutral", "info", "success", "warning", "danger"]
|
|
365
400
|
}
|
|
366
401
|
}
|
|
367
402
|
}
|