@delurio/cli 0.8.0 → 0.9.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 +36 -0
- package/README.md +36 -5
- package/SPEC.md +170 -27
- package/dist/changes.d.ts +4 -2
- package/dist/changes.js +32 -10
- package/dist/check.d.ts +1 -1
- package/dist/check.js +208 -27
- package/dist/diff-nav.js +15 -5
- package/dist/domain-names.d.ts +18 -0
- package/dist/domain-names.js +124 -0
- package/dist/domain.js +1 -1
- package/dist/graph.d.ts +21 -2
- package/dist/graph.js +149 -30
- package/dist/html.d.ts +1 -1
- package/dist/html.js +1 -1
- package/dist/invokes.d.ts +10 -0
- package/dist/invokes.js +67 -0
- package/dist/kit.d.ts +2 -1
- package/dist/kit.js +1 -1
- package/dist/model.d.ts +9 -1
- package/dist/model.js +89 -33
- package/dist/nav-page.js +15 -3
- package/dist/nav.d.ts +20 -1
- package/dist/nav.js +37 -25
- package/dist/needs.d.ts +50 -0
- package/dist/needs.js +311 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +4 -2
- package/dist/starts.js +8 -1
- package/dist/tutorial-check.d.ts +9 -0
- package/dist/tutorial-check.js +297 -0
- package/dist/ui-check.d.ts +1 -1
- package/dist/ui-check.js +58 -13
- package/dist/wireframe.js +26 -2
- package/dist/yaml.d.ts +1 -0
- package/dist/yaml.js +36 -5
- package/package.json +2 -1
- package/schemas/domain.schema.json +7 -7
- package/schemas/gaps.schema.json +49 -0
- package/schemas/nav.schema.json +34 -3
- package/schemas/needs.schema.json +189 -0
- package/schemas/ui.schema.json +42 -9
package/schemas/ui.schema.json
CHANGED
|
@@ -36,19 +36,39 @@
|
|
|
36
36
|
"additionalProperties": { "type": "string", "description": "The sample value." },
|
|
37
37
|
"examples": [{ "client": "Acme Notes" }]
|
|
38
38
|
},
|
|
39
|
-
"
|
|
39
|
+
"task": {
|
|
40
40
|
"type": "object",
|
|
41
|
-
"description": "
|
|
41
|
+
"description": "The flow's name as its users know it, in their own words and language, such as \"Invite a member\": what Rehber names the task by, and what a list of tasks or a video shows. The graph's `title` is in the graph's language, for the people who write it; this is in every locale.",
|
|
42
42
|
"required": ["key"],
|
|
43
43
|
"additionalProperties": false,
|
|
44
44
|
"properties": {
|
|
45
|
-
"key": { "$ref": "#/$defs/catalogKey", "description": "The catalog key of the
|
|
45
|
+
"key": { "$ref": "#/$defs/catalogKey", "description": "The catalog key of the name; every locale's catalog must have it.", "examples": ["Invite.task"] }
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
+
"changes": {
|
|
49
|
+
"$comment": "exactly one of key or missing",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"description": "What the flow changes and what follows, in its users' own words: what is created, sent, charged or removed, who sees it, and whether it can be undone. Required under --strict when the flow's steps invoke a writing action of its domain: `{ key }`, or `{ missing: <why> }` where the app has no such message yet, a gap that fails nothing (SPEC.md §4).",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"properties": {
|
|
54
|
+
"key": { "$ref": "#/$defs/catalogKey", "description": "The catalog key of the note; every locale's catalog must have it.", "examples": ["Changes.note"] },
|
|
55
|
+
"missing": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"minLength": 1,
|
|
58
|
+
"description": "Why the flow has no changes note yet, such as an app that has no message saying what the flow changes. Rehber does not guide the flow's writing steps, and check gives the gap as a note (changes-note-gap).",
|
|
59
|
+
"examples": ["the app does not say what an import changes yet"]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"oneOf": [{ "required": ["key"] }, { "required": ["missing"] }]
|
|
63
|
+
},
|
|
48
64
|
"nodes": {
|
|
49
65
|
"type": "object",
|
|
50
66
|
"description": "The nodes of the screens, by id. A node is shown in a state when the state is in `in`, not in `unless`, and `when` holds.",
|
|
51
|
-
"propertyNames": {
|
|
67
|
+
"propertyNames": {
|
|
68
|
+
"$ref": "#/$defs/identifier",
|
|
69
|
+
"not": { "const": "opener" },
|
|
70
|
+
"description": "A node's id: camelCase, and not opener, which a returnsFocus says for the node that opened its dialog (SPEC.md §4)."
|
|
71
|
+
},
|
|
52
72
|
"additionalProperties": { "$ref": "#/$defs/node" }
|
|
53
73
|
},
|
|
54
74
|
"focus": {
|
|
@@ -212,8 +232,8 @@
|
|
|
212
232
|
"enum": ["page", "text", "action", "field", "list", "status", "alert"]
|
|
213
233
|
},
|
|
214
234
|
"component": {
|
|
215
|
-
"description": "A kit-neutral component; a kit maps it to the product's own (SPEC.md §8). A `TextField`'s `text` is its label, and the
|
|
216
|
-
"enum": ["Page", "Heading", "Text", "Button", "LinkButton", "TextField", "List", "ListItem", "Status", "Alert"]
|
|
235
|
+
"description": "A kit-neutral component; a kit maps it to the product's own (SPEC.md §8). A `TextField`'s, a `Checkbox`'s, a `Radio`'s and a `Select`'s `text` is its label, and the control is named by it. A `Checkbox` (role checkbox or switch) and a `Radio` (role radio) say with `checked` whether they are checked; a `Select` (role combobox) is a choice of one option, and its `value` is the option it shows chosen.",
|
|
236
|
+
"enum": ["Page", "Heading", "Text", "Button", "LinkButton", "TextField", "Checkbox", "Radio", "Select", "List", "ListItem", "Status", "Alert"]
|
|
217
237
|
},
|
|
218
238
|
"role": {
|
|
219
239
|
"description": "The WAI-ARIA 1.2 role the node exposes; `kit check` reads it from the browser's accessibility tree.",
|
|
@@ -238,6 +258,11 @@
|
|
|
238
258
|
"unless": { "$ref": "#/$defs/states", "description": "The flow states the node is not shown in." },
|
|
239
259
|
"when": { "$ref": "#/$defs/expression", "description": "A guard or context flag of the flow that must hold for the node to show." },
|
|
240
260
|
"disabledIn": { "$ref": "#/$defs/states", "description": "The states where the node is shown but disabled." },
|
|
261
|
+
"disabledWhen": {
|
|
262
|
+
"$ref": "#/$defs/expression",
|
|
263
|
+
"description": "An expression over the flow's context (SPEC.md §3): where it holds, the node is shown but disabled, in any state that shows it, such as a button that waits until a VAT number is typed or a box is ticked. Beside disabledIn, the node is disabled where either says so. A replay compares it in each situation it stops in.",
|
|
264
|
+
"examples": ["not vatGiven", "not accepted"]
|
|
265
|
+
},
|
|
241
266
|
"emits": {
|
|
242
267
|
"type": "string",
|
|
243
268
|
"description": "The event the node sends when pressed: an event of the flow, UPPER_SNAKE.",
|
|
@@ -282,7 +307,7 @@
|
|
|
282
307
|
},
|
|
283
308
|
"edge": {
|
|
284
309
|
"type": "object",
|
|
285
|
-
"description": "A relation between nodes: `{ labelledBy: [node, labelNode] }`, `{ triggers: [node, state] }` or `{ returnsFocus: [dialog, node] }`.",
|
|
310
|
+
"description": "A relation between nodes: `{ labelledBy: [node, labelNode] }`, `{ triggers: [node, state] }` or `{ returnsFocus: [dialog, node | [node, ..] | opener] }`.",
|
|
286
311
|
"minProperties": 1,
|
|
287
312
|
"maxProperties": 1,
|
|
288
313
|
"additionalProperties": false,
|
|
@@ -303,8 +328,16 @@
|
|
|
303
328
|
},
|
|
304
329
|
"returnsFocus": {
|
|
305
330
|
"type": "array",
|
|
306
|
-
"description": "A dialog (a page node whose role is dialog or alertdialog) and the node that has focus when it closes, usually the one that opened it. It wins over `focus` for the state the dialog closes into, when that state shows the node.",
|
|
307
|
-
"prefixItems": [
|
|
331
|
+
"description": "A dialog (a page node whose role is dialog or alertdialog) and the node that has focus when it closes, usually the one that opened it. Where several nodes open the dialog, the list of them, or opener: the focus goes back to the one pressed to open it. It wins over `focus` for the state the dialog closes into, when that state shows the node.",
|
|
332
|
+
"prefixItems": [
|
|
333
|
+
{ "$ref": "#/$defs/nodeRef" },
|
|
334
|
+
{
|
|
335
|
+
"anyOf": [
|
|
336
|
+
{ "$ref": "#/$defs/nodeRef", "description": "The node, or opener: the node pressed to open the dialog." },
|
|
337
|
+
{ "type": "array", "items": { "$ref": "#/$defs/nodeRef" }, "minItems": 2, "uniqueItems": true, "description": "The nodes that open the dialog: the one pressed to open it has the focus." }
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
],
|
|
308
341
|
"minItems": 2,
|
|
309
342
|
"maxItems": 2
|
|
310
343
|
}
|