@altnovatrail/widgets 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cores/vector.schema.json +22 -1
- package/kinds/cards/cards.handles.json +109 -0
- package/kinds/cards/cards.schema.json +483 -0
- package/kinds/cards/vectors/any.json +255 -0
- package/kinds/cards/vectors/box.json +325 -0
- package/kinds/cards/vectors/fork-taps.json +305 -0
- package/kinds/cards/vectors/fork.json +254 -0
- package/kinds/cards/vectors/invalid-goal.json +70 -0
- package/kinds/cards/vectors/invalid-ids.json +113 -0
- package/kinds/cards/vectors/invalid-schema.json +88 -0
- package/kinds/cards/vectors/invalid-taps.json +214 -0
- package/kinds/cards/vectors/key.json +264 -0
- package/kinds/cards/vectors/limit.json +274 -0
- package/kinds/cards/vectors/no-goal.json +205 -0
- package/kinds/cards/vectors/none.json +239 -0
- package/kinds/cards/vectors/recog.json +113 -0
- package/kinds/cards/vectors/riddle.json +397 -0
- package/kinds/cards/vectors/solo.json +218 -0
- package/kinds/cells/cells.schema.json +17 -2
- package/kinds/line/line.schema.json +17 -2
- package/lib/cores/kind.d.ts +21 -3
- package/lib/cores/search.d.ts +22 -6
- package/lib/cores/search.js +34 -6
- package/lib/kinds/cards/goal.d.ts +25 -0
- package/lib/kinds/cards/goal.js +72 -0
- package/lib/kinds/cards/index.d.ts +14 -0
- package/lib/kinds/cards/index.js +17 -0
- package/lib/kinds/cards/kind.d.ts +23 -0
- package/lib/kinds/cards/kind.js +101 -0
- package/lib/kinds/cards/parts.d.ts +36 -0
- package/lib/kinds/cards/parts.js +34 -0
- package/lib/kinds/cards/scene.d.ts +102 -0
- package/lib/kinds/cards/scene.js +356 -0
- package/lib/kinds/cards/schema.d.ts +10 -0
- package/lib/kinds/cards/schema.js +285 -0
- package/lib/kinds/cells/registry.js +1 -1
- package/lib/kinds/cells/schema.js +3 -1
- package/lib/kinds/line/registry.js +1 -1
- package/lib/kinds/line/schema.js +3 -1
- package/package.json +8 -3
- package/cores/handles.schema.json +0 -63
package/README.md
CHANGED
|
@@ -19,6 +19,6 @@ A component of [NovaTrail](https://github.com/altnovatrail/spec), a universal op
|
|
|
19
19
|
|
|
20
20
|
Its widgets run in `app` through the widget host of `canvas`, in an iframe sandbox with no network; each kind has a scene schema and a solver of its own; `modules` takes its bundles at a tag and pins each by its hash, and proves each scene's key with the kinds' solvers, an npm package of the same release.
|
|
21
21
|
|
|
22
|
-
Its design is detailed, and
|
|
22
|
+
Its design is detailed, and three widget kinds are built. The sheet of cells: folds and paint, pieces on a board, paper folded in layers and punched, a table of numbers, paths, cuts and polyominoes, drawn in perspective on a canvas, seen on the table or from above, as the learner switches. The number line: a row of places, upright too, and a ring, with posts, cuts and a jumper, and counters of posts, gaps, length, pieces and distance, drawn flat in SVG. The cards: creatures drawn from their signs and cards of tasks, in groups, with options and a table of signs for the pen's ticks and crosses, a tap that chooses a card or an option, and a goal — a condition, a group's rule, the odd one out — whose answer is the cards that meet it, laid as one panel in SVG. Their rules and solvers stand on the cores of exact arithmetic, of search over states and of enumeration, the last two proving the fewest moves to a goal, a count, a maximum or a minimum, and the cards' answer is read off the scene, with their scene vectors, as an npm package checked the way a module's build takes it; each kind's drawing is bundled as one HTML file, with its handles for an AI. Every kind shares the shell, which speaks spec's widget protocol at the tag `spec/` is on, and the test host plays each kind in the engines of Chromium, WebKit and Firefox and passes spec's conformance tests of both sides. A release carries each kind's bundle with its bundle's file — its protocol version and the digests a host's Content Security Policy names —, its handles, the npm package and the list of withdrawn bundles by the protocol's schema; the releases are published, the package in npm by trusted publishing.
|
|
23
23
|
|
|
24
24
|
Its card is in the architecture of [spec](https://github.com/altnovatrail/spec); its own documents, its decisions and its plan are in [docs/](docs/README.md).
|
package/cores/vector.schema.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://altnovatrail.github.io/widgets/cores/1.
|
|
3
|
+
"$id": "https://altnovatrail.github.io/widgets/cores/1.2/vector.schema.json",
|
|
4
4
|
"title": "A scene vector of a widget kind",
|
|
5
5
|
"description": "A scene of a kind, the seed of the widget, sequences of moves from the scene with the state each move leads to and whether it meets the scene's goal, and the proof the kind's solver gives. Written by hand in kinds/<kind>/vectors/, and passed by the kind's rules and solver on every change.",
|
|
6
6
|
"type": "object",
|
|
@@ -170,6 +170,27 @@
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"description": "Which of the scene's parts meet the goal, for a kind whose answer is no number: their IDs, read off the scene with no search, and the witness that shows it, in the kind's own form.",
|
|
175
|
+
"type": "object",
|
|
176
|
+
"properties": {
|
|
177
|
+
"key": {
|
|
178
|
+
"description": "The IDs of the parts that meet the goal, sorted by UTF-16 code units; none where none does.",
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": { "description": "A part's ID.", "type": "string" },
|
|
181
|
+
"uniqueItems": true
|
|
182
|
+
},
|
|
183
|
+
"asks": { "description": "The key is the parts that meet the goal.", "const": "parts" },
|
|
184
|
+
"witness": {
|
|
185
|
+
"description": "What shows the key, in the form the kind gives it.",
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": {
|
|
188
|
+
"description": "A member of the witness, as the kind names it."
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"required": ["key", "asks", "witness"]
|
|
193
|
+
},
|
|
173
194
|
{
|
|
174
195
|
"description": "The goal cannot be met, whatever it asks: the whole state graph, which no state of it meets, given by the count of states in each layer.",
|
|
175
196
|
"type": "object",
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"handles": [
|
|
3
|
+
{
|
|
4
|
+
"name": "highlight",
|
|
5
|
+
"description": "Highlight parts of the widget, by the IDs its parts carry, so that the learner looks there. A highlight stays until clear, until your next reply, or until its part changes.",
|
|
6
|
+
"inputSchema": {
|
|
7
|
+
"description": "The parts to highlight.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"parts": {
|
|
11
|
+
"description": "The IDs of the parts, as the widget's parts give them.",
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"description": "A part's ID.",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"
|
|
17
|
+
},
|
|
18
|
+
"minItems": 1,
|
|
19
|
+
"uniqueItems": true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": ["parts"],
|
|
23
|
+
"unevaluatedProperties": false
|
|
24
|
+
},
|
|
25
|
+
"class": "show"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "camera",
|
|
29
|
+
"description": "Turn the widget's camera to frame the parts named, by their IDs, or the whole widget where none are named. The state does not change.",
|
|
30
|
+
"inputSchema": {
|
|
31
|
+
"description": "The parts to frame; none for the whole widget.",
|
|
32
|
+
"type": "object",
|
|
33
|
+
"properties": {
|
|
34
|
+
"parts": {
|
|
35
|
+
"description": "The IDs of the parts, as the widget's parts give them.",
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"description": "A part's ID.",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]{0,63}$"
|
|
41
|
+
},
|
|
42
|
+
"minItems": 1,
|
|
43
|
+
"uniqueItems": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"unevaluatedProperties": false
|
|
47
|
+
},
|
|
48
|
+
"class": "show"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "clear",
|
|
52
|
+
"description": "Take away every highlight and showing your calls laid on the widget. The state does not change.",
|
|
53
|
+
"inputSchema": {
|
|
54
|
+
"description": "No arguments.",
|
|
55
|
+
"type": "object",
|
|
56
|
+
"unevaluatedProperties": false
|
|
57
|
+
},
|
|
58
|
+
"class": "show"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "undo",
|
|
62
|
+
"description": "Bring back the widget's state from before its last change: the learner's last move, an earlier call of this reply, or the whole of an earlier reply of yours. Refused where there is no change to undo.",
|
|
63
|
+
"inputSchema": {
|
|
64
|
+
"description": "No arguments.",
|
|
65
|
+
"type": "object",
|
|
66
|
+
"unevaluatedProperties": false
|
|
67
|
+
},
|
|
68
|
+
"class": "rewind"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "reset",
|
|
72
|
+
"description": "Lay again the state the widget started from: the scene's own, or in a lesson the view of the step shown. The learner can undo it.",
|
|
73
|
+
"inputSchema": {
|
|
74
|
+
"description": "No arguments.",
|
|
75
|
+
"type": "object",
|
|
76
|
+
"unevaluatedProperties": false
|
|
77
|
+
},
|
|
78
|
+
"class": "rewind"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "choose",
|
|
82
|
+
"description": "Choose a card or an option by its ID, as the learner would by a tap: where a tap chooses one, the choice moves to it; where taps choose many, it is added to them; one chosen already is let go. Refused where the scene has no such card or option, or where no tap of the scene chooses it. The learner can undo it.",
|
|
83
|
+
"inputSchema": {
|
|
84
|
+
"description": "The card or the option to choose.",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"part": {
|
|
88
|
+
"description": "The ID of the card or the option, as the widget's parts give it.",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,23}$"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"required": ["part"],
|
|
94
|
+
"unevaluatedProperties": false
|
|
95
|
+
},
|
|
96
|
+
"class": "solve"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "show_answer",
|
|
100
|
+
"description": "Show the answer the solver reads off the scene: ring the cards that meet the goal, and put a tick in each cell of the table of signs whose card fits its column's sign and a cross in the others. It chooses nothing, and stays until clear or your next reply. Refused where the scene has no goal.",
|
|
101
|
+
"inputSchema": {
|
|
102
|
+
"description": "No arguments.",
|
|
103
|
+
"type": "object",
|
|
104
|
+
"unevaluatedProperties": false
|
|
105
|
+
},
|
|
106
|
+
"class": "solve"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://altnovatrail.github.io/widgets/kinds/cards/1.0/cards.schema.json",
|
|
4
|
+
"title": "A scene of the widget kind cards",
|
|
5
|
+
"description": "Cards in groups, each giving a value to every sign the scene names; options to choose among; how a tap chooses; a table of signs, its rows the cards and its columns conditions of signs; and at most one goal, whose answer is the cards that meet it. Under $defs, a move and a state of the kind, and the form of a scene's key.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"signs": {
|
|
9
|
+
"description": "The signs the cards give values to, each with its values: a colour, a pattern, eyes, a hat, or any other the scene names.",
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"description": "A sign.",
|
|
13
|
+
"$ref": "#/$defs/sign",
|
|
14
|
+
"unevaluatedProperties": false
|
|
15
|
+
},
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"maxItems": 10
|
|
18
|
+
},
|
|
19
|
+
"groups": {
|
|
20
|
+
"description": "The groups of cards, in the order they are drawn: the examples a goal learns from, the cards to choose among, the cards to mark with the pen.",
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"description": "A group.",
|
|
24
|
+
"$ref": "#/$defs/group",
|
|
25
|
+
"unevaluatedProperties": false
|
|
26
|
+
},
|
|
27
|
+
"minItems": 1,
|
|
28
|
+
"maxItems": 6
|
|
29
|
+
},
|
|
30
|
+
"options": {
|
|
31
|
+
"description": "Options to choose among that are no cards, each a label, as an answer that the learner does not know yet; a tap chooses them wherever the scene lets a tap choose.",
|
|
32
|
+
"type": "array",
|
|
33
|
+
"items": {
|
|
34
|
+
"description": "An option.",
|
|
35
|
+
"type": "object",
|
|
36
|
+
"properties": {
|
|
37
|
+
"id": {
|
|
38
|
+
"description": "The option's ID, its part's.",
|
|
39
|
+
"$ref": "#/$defs/id"
|
|
40
|
+
},
|
|
41
|
+
"label": {
|
|
42
|
+
"description": "The option's words.",
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1,
|
|
45
|
+
"maxLength": 80
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"id",
|
|
50
|
+
"label"
|
|
51
|
+
],
|
|
52
|
+
"unevaluatedProperties": false
|
|
53
|
+
},
|
|
54
|
+
"minItems": 1,
|
|
55
|
+
"maxItems": 6
|
|
56
|
+
},
|
|
57
|
+
"choose": {
|
|
58
|
+
"description": "How a tap chooses, where it does: none where left out, a scene only to look at and mark with the pen.",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"many": {
|
|
62
|
+
"description": "Whether a tap adds to what is chosen; where false or left out, a tap chooses one and lets the one before go.",
|
|
63
|
+
"type": "boolean"
|
|
64
|
+
},
|
|
65
|
+
"from": {
|
|
66
|
+
"description": "The groups whose cards a tap chooses; every group where left out. The options are chosen whatever it names.",
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"description": "A group, by its ID.",
|
|
70
|
+
"$ref": "#/$defs/id"
|
|
71
|
+
},
|
|
72
|
+
"minItems": 1,
|
|
73
|
+
"maxItems": 6,
|
|
74
|
+
"uniqueItems": true
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"unevaluatedProperties": false
|
|
78
|
+
},
|
|
79
|
+
"table": {
|
|
80
|
+
"description": "The table of signs: a row for each card of the groups named, a column for each condition, and an empty cell where they cross, for the pen to tick or cross. A tap fills no cell.",
|
|
81
|
+
"type": "object",
|
|
82
|
+
"properties": {
|
|
83
|
+
"rows": {
|
|
84
|
+
"description": "The groups whose cards are the rows; every group where left out.",
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"description": "A group, by its ID.",
|
|
88
|
+
"$ref": "#/$defs/id"
|
|
89
|
+
},
|
|
90
|
+
"minItems": 1,
|
|
91
|
+
"maxItems": 6,
|
|
92
|
+
"uniqueItems": true
|
|
93
|
+
},
|
|
94
|
+
"columns": {
|
|
95
|
+
"description": "The columns, in order.",
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"description": "A column: its ID, its heading and the condition it asks of a card.",
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"id": {
|
|
102
|
+
"description": "The column's ID.",
|
|
103
|
+
"$ref": "#/$defs/name"
|
|
104
|
+
},
|
|
105
|
+
"label": {
|
|
106
|
+
"description": "The column's heading, as horns or no hat.",
|
|
107
|
+
"type": "string",
|
|
108
|
+
"minLength": 1,
|
|
109
|
+
"maxLength": 80
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"id",
|
|
114
|
+
"label"
|
|
115
|
+
],
|
|
116
|
+
"oneOf": [
|
|
117
|
+
{
|
|
118
|
+
"description": "A column that holds where a card gives the sign this value.",
|
|
119
|
+
"properties": {
|
|
120
|
+
"sign": {
|
|
121
|
+
"description": "The sign, by its ID.",
|
|
122
|
+
"$ref": "#/$defs/name"
|
|
123
|
+
},
|
|
124
|
+
"is": {
|
|
125
|
+
"description": "The value, by its ID.",
|
|
126
|
+
"$ref": "#/$defs/name"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"sign",
|
|
131
|
+
"is"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"description": "A column that holds where a card gives the sign any value but this one.",
|
|
136
|
+
"properties": {
|
|
137
|
+
"sign": {
|
|
138
|
+
"description": "The sign, by its ID.",
|
|
139
|
+
"$ref": "#/$defs/name"
|
|
140
|
+
},
|
|
141
|
+
"not": {
|
|
142
|
+
"description": "The value, by its ID.",
|
|
143
|
+
"$ref": "#/$defs/name"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"required": [
|
|
147
|
+
"sign",
|
|
148
|
+
"not"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"unevaluatedProperties": false
|
|
153
|
+
},
|
|
154
|
+
"minItems": 1,
|
|
155
|
+
"maxItems": 8
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"columns"
|
|
160
|
+
],
|
|
161
|
+
"unevaluatedProperties": false
|
|
162
|
+
},
|
|
163
|
+
"goal": {
|
|
164
|
+
"description": "What a card is to meet, over the cards of the groups it ranges over: a condition of signs, the values every card of a group shares, or a difference from every other card by the signs named. The answer is the cards that meet it, and a state meets the goal where it holds them chosen.",
|
|
165
|
+
"type": "object",
|
|
166
|
+
"properties": {
|
|
167
|
+
"signs": {
|
|
168
|
+
"description": "A condition of signs, which a card meets.",
|
|
169
|
+
"$ref": "#/$defs/condition",
|
|
170
|
+
"unevaluatedProperties": false
|
|
171
|
+
},
|
|
172
|
+
"like": {
|
|
173
|
+
"description": "A group, by its ID, whose cards' shared values a card must give, every one: the group teaches its rule by example.",
|
|
174
|
+
"$ref": "#/$defs/id"
|
|
175
|
+
},
|
|
176
|
+
"differs": {
|
|
177
|
+
"description": "The signs a card must differ by from every other card of the range, at least one of them for each other card: the odd one out by those signs, the others left out.",
|
|
178
|
+
"type": "array",
|
|
179
|
+
"items": {
|
|
180
|
+
"description": "A sign, by its ID.",
|
|
181
|
+
"$ref": "#/$defs/name"
|
|
182
|
+
},
|
|
183
|
+
"minItems": 1,
|
|
184
|
+
"maxItems": 10,
|
|
185
|
+
"uniqueItems": true
|
|
186
|
+
},
|
|
187
|
+
"among": {
|
|
188
|
+
"description": "The groups whose cards the goal ranges over; where left out, every group but the one it learns from.",
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": {
|
|
191
|
+
"description": "A group, by its ID.",
|
|
192
|
+
"$ref": "#/$defs/id"
|
|
193
|
+
},
|
|
194
|
+
"minItems": 1,
|
|
195
|
+
"maxItems": 6,
|
|
196
|
+
"uniqueItems": true
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"oneOf": [
|
|
200
|
+
{
|
|
201
|
+
"description": "A goal of the form signs.",
|
|
202
|
+
"properties": {
|
|
203
|
+
"signs": {
|
|
204
|
+
"description": "The goal's signs."
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": [
|
|
208
|
+
"signs"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"description": "A goal of the form like.",
|
|
213
|
+
"properties": {
|
|
214
|
+
"like": {
|
|
215
|
+
"description": "The goal's like."
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"required": [
|
|
219
|
+
"like"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"description": "A goal of the form differs.",
|
|
224
|
+
"properties": {
|
|
225
|
+
"differs": {
|
|
226
|
+
"description": "The goal's differs."
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"required": [
|
|
230
|
+
"differs"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"unevaluatedProperties": false
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"required": [
|
|
238
|
+
"signs",
|
|
239
|
+
"groups"
|
|
240
|
+
],
|
|
241
|
+
"unevaluatedProperties": false,
|
|
242
|
+
"$defs": {
|
|
243
|
+
"id": {
|
|
244
|
+
"description": "The ID of a card, a group or an option, the ID of its part: each once in the scene.",
|
|
245
|
+
"type": "string",
|
|
246
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,23}$"
|
|
247
|
+
},
|
|
248
|
+
"name": {
|
|
249
|
+
"description": "The ID of a sign, a value or a column, in kebab-case.",
|
|
250
|
+
"type": "string",
|
|
251
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,23}$"
|
|
252
|
+
},
|
|
253
|
+
"sign": {
|
|
254
|
+
"description": "A sign, its label and its values.",
|
|
255
|
+
"type": "object",
|
|
256
|
+
"properties": {
|
|
257
|
+
"id": {
|
|
258
|
+
"description": "The sign's ID, each once in the scene.",
|
|
259
|
+
"$ref": "#/$defs/name"
|
|
260
|
+
},
|
|
261
|
+
"label": {
|
|
262
|
+
"description": "The sign's name, as colour.",
|
|
263
|
+
"type": "string",
|
|
264
|
+
"minLength": 1,
|
|
265
|
+
"maxLength": 80
|
|
266
|
+
},
|
|
267
|
+
"values": {
|
|
268
|
+
"description": "The values a card may give the sign.",
|
|
269
|
+
"type": "array",
|
|
270
|
+
"items": {
|
|
271
|
+
"description": "A value.",
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"id": {
|
|
275
|
+
"description": "The value's ID, each once in its sign.",
|
|
276
|
+
"$ref": "#/$defs/name"
|
|
277
|
+
},
|
|
278
|
+
"label": {
|
|
279
|
+
"description": "The value's words, as blue or two eyes.",
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1,
|
|
282
|
+
"maxLength": 80
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"required": [
|
|
286
|
+
"id",
|
|
287
|
+
"label"
|
|
288
|
+
],
|
|
289
|
+
"unevaluatedProperties": false
|
|
290
|
+
},
|
|
291
|
+
"minItems": 1,
|
|
292
|
+
"maxItems": 12
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"required": [
|
|
296
|
+
"id",
|
|
297
|
+
"label",
|
|
298
|
+
"values"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"card": {
|
|
302
|
+
"description": "A card: a creature drawn from its signs, or the card of a task, its statement's text.",
|
|
303
|
+
"type": "object",
|
|
304
|
+
"properties": {
|
|
305
|
+
"id": {
|
|
306
|
+
"description": "The card's ID, its part's.",
|
|
307
|
+
"$ref": "#/$defs/id"
|
|
308
|
+
},
|
|
309
|
+
"text": {
|
|
310
|
+
"description": "The statement of a task, drawn in place of a creature.",
|
|
311
|
+
"type": "string",
|
|
312
|
+
"minLength": 1,
|
|
313
|
+
"maxLength": 300
|
|
314
|
+
},
|
|
315
|
+
"signs": {
|
|
316
|
+
"description": "The value the card gives each sign of the scene, every one, by its ID.",
|
|
317
|
+
"type": "object",
|
|
318
|
+
"propertyNames": {
|
|
319
|
+
"description": "A sign's ID.",
|
|
320
|
+
"$ref": "#/$defs/name"
|
|
321
|
+
},
|
|
322
|
+
"additionalProperties": {
|
|
323
|
+
"description": "The value's ID.",
|
|
324
|
+
"$ref": "#/$defs/name"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"required": [
|
|
329
|
+
"id",
|
|
330
|
+
"signs"
|
|
331
|
+
]
|
|
332
|
+
},
|
|
333
|
+
"group": {
|
|
334
|
+
"description": "A group of cards, with its heading where it has one.",
|
|
335
|
+
"type": "object",
|
|
336
|
+
"properties": {
|
|
337
|
+
"id": {
|
|
338
|
+
"description": "The group's ID, its part's.",
|
|
339
|
+
"$ref": "#/$defs/id"
|
|
340
|
+
},
|
|
341
|
+
"label": {
|
|
342
|
+
"description": "The group's heading, as Bips.",
|
|
343
|
+
"type": "string",
|
|
344
|
+
"minLength": 1,
|
|
345
|
+
"maxLength": 80
|
|
346
|
+
},
|
|
347
|
+
"cards": {
|
|
348
|
+
"description": "The group's cards, in the order they are drawn.",
|
|
349
|
+
"type": "array",
|
|
350
|
+
"items": {
|
|
351
|
+
"description": "A card.",
|
|
352
|
+
"$ref": "#/$defs/card",
|
|
353
|
+
"unevaluatedProperties": false
|
|
354
|
+
},
|
|
355
|
+
"minItems": 1,
|
|
356
|
+
"maxItems": 12
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"id",
|
|
361
|
+
"cards"
|
|
362
|
+
]
|
|
363
|
+
},
|
|
364
|
+
"condition": {
|
|
365
|
+
"description": "A condition of signs: a sign has a value, or any other; or conditions joined, all of them or any.",
|
|
366
|
+
"type": "object",
|
|
367
|
+
"oneOf": [
|
|
368
|
+
{
|
|
369
|
+
"description": "A literal that holds where a card gives the sign this value.",
|
|
370
|
+
"properties": {
|
|
371
|
+
"sign": {
|
|
372
|
+
"description": "The sign, by its ID.",
|
|
373
|
+
"$ref": "#/$defs/name"
|
|
374
|
+
},
|
|
375
|
+
"is": {
|
|
376
|
+
"description": "The value, by its ID.",
|
|
377
|
+
"$ref": "#/$defs/name"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"required": [
|
|
381
|
+
"sign",
|
|
382
|
+
"is"
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"description": "A literal that holds where a card gives the sign any value but this one.",
|
|
387
|
+
"properties": {
|
|
388
|
+
"sign": {
|
|
389
|
+
"description": "The sign, by its ID.",
|
|
390
|
+
"$ref": "#/$defs/name"
|
|
391
|
+
},
|
|
392
|
+
"not": {
|
|
393
|
+
"description": "The value, by its ID.",
|
|
394
|
+
"$ref": "#/$defs/name"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": [
|
|
398
|
+
"sign",
|
|
399
|
+
"not"
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"description": "Every condition holds.",
|
|
404
|
+
"properties": {
|
|
405
|
+
"all": {
|
|
406
|
+
"description": "The conditions joined.",
|
|
407
|
+
"type": "array",
|
|
408
|
+
"items": {
|
|
409
|
+
"description": "A condition.",
|
|
410
|
+
"$ref": "#/$defs/condition",
|
|
411
|
+
"unevaluatedProperties": false
|
|
412
|
+
},
|
|
413
|
+
"minItems": 1,
|
|
414
|
+
"maxItems": 8
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"required": [
|
|
418
|
+
"all"
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"description": "At least one condition holds.",
|
|
423
|
+
"properties": {
|
|
424
|
+
"any": {
|
|
425
|
+
"description": "The conditions joined.",
|
|
426
|
+
"type": "array",
|
|
427
|
+
"items": {
|
|
428
|
+
"description": "A condition.",
|
|
429
|
+
"$ref": "#/$defs/condition",
|
|
430
|
+
"unevaluatedProperties": false
|
|
431
|
+
},
|
|
432
|
+
"minItems": 1,
|
|
433
|
+
"maxItems": 8
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"required": [
|
|
437
|
+
"any"
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
},
|
|
442
|
+
"move": {
|
|
443
|
+
"description": "A tap on a card or an option, by its ID.",
|
|
444
|
+
"type": "object",
|
|
445
|
+
"properties": {
|
|
446
|
+
"choose": {
|
|
447
|
+
"description": "The card or the option, by its ID.",
|
|
448
|
+
"$ref": "#/$defs/id"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
"required": [
|
|
452
|
+
"choose"
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
"state": {
|
|
456
|
+
"description": "What is chosen.",
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"chosen": {
|
|
460
|
+
"description": "The cards and options chosen, by their IDs sorted by UTF-16 code units.",
|
|
461
|
+
"type": "array",
|
|
462
|
+
"items": {
|
|
463
|
+
"description": "A card or an option, by its ID.",
|
|
464
|
+
"$ref": "#/$defs/id"
|
|
465
|
+
},
|
|
466
|
+
"uniqueItems": true
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"required": [
|
|
470
|
+
"chosen"
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"key": {
|
|
474
|
+
"description": "The key of a scene, the form of the kind solver's proof: the IDs of the cards that meet the goal, sorted by UTF-16 code units, each once; none where no card meets it.",
|
|
475
|
+
"type": "array",
|
|
476
|
+
"items": {
|
|
477
|
+
"description": "A card, by its ID.",
|
|
478
|
+
"$ref": "#/$defs/id"
|
|
479
|
+
},
|
|
480
|
+
"uniqueItems": true
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|