@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.
Files changed (42) hide show
  1. package/README.md +1 -1
  2. package/cores/vector.schema.json +22 -1
  3. package/kinds/cards/cards.handles.json +109 -0
  4. package/kinds/cards/cards.schema.json +483 -0
  5. package/kinds/cards/vectors/any.json +255 -0
  6. package/kinds/cards/vectors/box.json +325 -0
  7. package/kinds/cards/vectors/fork-taps.json +305 -0
  8. package/kinds/cards/vectors/fork.json +254 -0
  9. package/kinds/cards/vectors/invalid-goal.json +70 -0
  10. package/kinds/cards/vectors/invalid-ids.json +113 -0
  11. package/kinds/cards/vectors/invalid-schema.json +88 -0
  12. package/kinds/cards/vectors/invalid-taps.json +214 -0
  13. package/kinds/cards/vectors/key.json +264 -0
  14. package/kinds/cards/vectors/limit.json +274 -0
  15. package/kinds/cards/vectors/no-goal.json +205 -0
  16. package/kinds/cards/vectors/none.json +239 -0
  17. package/kinds/cards/vectors/recog.json +113 -0
  18. package/kinds/cards/vectors/riddle.json +397 -0
  19. package/kinds/cards/vectors/solo.json +218 -0
  20. package/kinds/cells/cells.schema.json +17 -2
  21. package/kinds/line/line.schema.json +17 -2
  22. package/lib/cores/kind.d.ts +21 -3
  23. package/lib/cores/search.d.ts +22 -6
  24. package/lib/cores/search.js +34 -6
  25. package/lib/kinds/cards/goal.d.ts +25 -0
  26. package/lib/kinds/cards/goal.js +72 -0
  27. package/lib/kinds/cards/index.d.ts +14 -0
  28. package/lib/kinds/cards/index.js +17 -0
  29. package/lib/kinds/cards/kind.d.ts +23 -0
  30. package/lib/kinds/cards/kind.js +101 -0
  31. package/lib/kinds/cards/parts.d.ts +36 -0
  32. package/lib/kinds/cards/parts.js +34 -0
  33. package/lib/kinds/cards/scene.d.ts +102 -0
  34. package/lib/kinds/cards/scene.js +356 -0
  35. package/lib/kinds/cards/schema.d.ts +10 -0
  36. package/lib/kinds/cards/schema.js +285 -0
  37. package/lib/kinds/cells/registry.js +1 -1
  38. package/lib/kinds/cells/schema.js +3 -1
  39. package/lib/kinds/line/registry.js +1 -1
  40. package/lib/kinds/line/schema.js +3 -1
  41. package/package.json +8 -3
  42. package/cores/handles.schema.json +0 -63
@@ -0,0 +1,113 @@
1
+ {
2
+ "description": "A scene the kind refuses for what its schema cannot say: an ID given twice, a value the sign lacks, a card that leaves a sign out and a sign the scene does not name.",
3
+ "scene": {
4
+ "signs": [
5
+ {
6
+ "id": "colour",
7
+ "label": "colour",
8
+ "values": [
9
+ {
10
+ "id": "blue",
11
+ "label": "blue"
12
+ },
13
+ {
14
+ "id": "pink",
15
+ "label": "pink"
16
+ },
17
+ {
18
+ "id": "yellow",
19
+ "label": "yellow"
20
+ },
21
+ {
22
+ "id": "purple",
23
+ "label": "purple"
24
+ },
25
+ {
26
+ "id": "green",
27
+ "label": "green"
28
+ },
29
+ {
30
+ "id": "orange",
31
+ "label": "orange"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "id": "pattern",
37
+ "label": "pattern",
38
+ "values": [
39
+ {
40
+ "id": "plain",
41
+ "label": "plain"
42
+ },
43
+ {
44
+ "id": "stripes",
45
+ "label": "stripes"
46
+ },
47
+ {
48
+ "id": "spots",
49
+ "label": "spots"
50
+ }
51
+ ]
52
+ }
53
+ ],
54
+ "groups": [
55
+ {
56
+ "id": "cards",
57
+ "cards": [
58
+ {
59
+ "id": "A",
60
+ "signs": {
61
+ "colour": "blue",
62
+ "pattern": "plain"
63
+ }
64
+ },
65
+ {
66
+ "id": "A",
67
+ "signs": {
68
+ "colour": "blue",
69
+ "pattern": "dots"
70
+ }
71
+ },
72
+ {
73
+ "id": "B",
74
+ "signs": {
75
+ "colour": "pink"
76
+ }
77
+ },
78
+ {
79
+ "id": "C",
80
+ "signs": {
81
+ "colour": "pink",
82
+ "pattern": "plain",
83
+ "hat": "yes"
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ },
90
+ "seed": "0",
91
+ "sequences": [],
92
+ "proof": {
93
+ "undecided": "invalid",
94
+ "errors": [
95
+ {
96
+ "path": "/groups/0/cards/1/id",
97
+ "message": "this ID is given twice"
98
+ },
99
+ {
100
+ "path": "/groups/0/cards/1/signs/pattern",
101
+ "message": "a value of the sign \"pattern\""
102
+ },
103
+ {
104
+ "path": "/groups/0/cards/2/signs",
105
+ "message": "the sign \"pattern\" is missing"
106
+ },
107
+ {
108
+ "path": "/groups/0/cards/3/signs/hat",
109
+ "message": "no sign of the scene has this ID"
110
+ }
111
+ ]
112
+ }
113
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "description": "A scene the schema refuses too: a goal of two forms, a column that names no value, and taps that choose from no group of the scene.",
3
+ "scene": {
4
+ "signs": [
5
+ {
6
+ "id": "colour",
7
+ "label": "colour",
8
+ "values": [
9
+ {
10
+ "id": "blue",
11
+ "label": "blue"
12
+ },
13
+ {
14
+ "id": "pink",
15
+ "label": "pink"
16
+ },
17
+ {
18
+ "id": "yellow",
19
+ "label": "yellow"
20
+ },
21
+ {
22
+ "id": "purple",
23
+ "label": "purple"
24
+ },
25
+ {
26
+ "id": "green",
27
+ "label": "green"
28
+ },
29
+ {
30
+ "id": "orange",
31
+ "label": "orange"
32
+ }
33
+ ]
34
+ }
35
+ ],
36
+ "groups": [
37
+ {
38
+ "id": "cards",
39
+ "cards": [
40
+ {
41
+ "id": "A",
42
+ "signs": {
43
+ "colour": "blue"
44
+ }
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ "choose": {
50
+ "from": ["other"]
51
+ },
52
+ "table": {
53
+ "columns": [
54
+ {
55
+ "id": "blue",
56
+ "label": "blue",
57
+ "sign": "colour"
58
+ }
59
+ ]
60
+ },
61
+ "goal": {
62
+ "signs": {
63
+ "sign": "colour",
64
+ "is": "blue"
65
+ },
66
+ "like": "cards"
67
+ }
68
+ },
69
+ "seed": "0",
70
+ "sequences": [],
71
+ "proof": {
72
+ "undecided": "invalid",
73
+ "errors": [
74
+ {
75
+ "path": "/choose/from/0",
76
+ "message": "a group of the scene"
77
+ },
78
+ {
79
+ "path": "/table/columns/0",
80
+ "message": "one of the members \"is\" and \"not\""
81
+ },
82
+ {
83
+ "path": "/goal",
84
+ "message": "one of the members \"signs\", \"like\" and \"differs\""
85
+ }
86
+ ]
87
+ }
88
+ }
@@ -0,0 +1,214 @@
1
+ {
2
+ "description": "A scene of taps the kind refuses: one choice, and two cards meet the goal, which no tap could choose together.",
3
+ "scene": {
4
+ "signs": [
5
+ {
6
+ "id": "colour",
7
+ "label": "colour",
8
+ "values": [
9
+ {
10
+ "id": "blue",
11
+ "label": "blue"
12
+ },
13
+ {
14
+ "id": "pink",
15
+ "label": "pink"
16
+ },
17
+ {
18
+ "id": "yellow",
19
+ "label": "yellow"
20
+ },
21
+ {
22
+ "id": "purple",
23
+ "label": "purple"
24
+ },
25
+ {
26
+ "id": "green",
27
+ "label": "green"
28
+ },
29
+ {
30
+ "id": "orange",
31
+ "label": "orange"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "id": "pattern",
37
+ "label": "pattern",
38
+ "values": [
39
+ {
40
+ "id": "plain",
41
+ "label": "plain"
42
+ },
43
+ {
44
+ "id": "stripes",
45
+ "label": "stripes"
46
+ },
47
+ {
48
+ "id": "spots",
49
+ "label": "spots"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "id": "eyes",
55
+ "label": "eyes",
56
+ "values": [
57
+ {
58
+ "id": "1",
59
+ "label": "one eye"
60
+ },
61
+ {
62
+ "id": "2",
63
+ "label": "two eyes"
64
+ },
65
+ {
66
+ "id": "3",
67
+ "label": "three eyes"
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "horns",
73
+ "label": "horns",
74
+ "values": [
75
+ {
76
+ "id": "no",
77
+ "label": "no horns"
78
+ },
79
+ {
80
+ "id": "yes",
81
+ "label": "horns"
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "id": "hat",
87
+ "label": "hat",
88
+ "values": [
89
+ {
90
+ "id": "no",
91
+ "label": "no hat"
92
+ },
93
+ {
94
+ "id": "yes",
95
+ "label": "a hat"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "legs",
101
+ "label": "legs",
102
+ "values": [
103
+ {
104
+ "id": "2",
105
+ "label": "two legs"
106
+ },
107
+ {
108
+ "id": "3",
109
+ "label": "three legs"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "groups": [
115
+ {
116
+ "id": "cards",
117
+ "cards": [
118
+ {
119
+ "id": "A",
120
+ "signs": {
121
+ "colour": "orange",
122
+ "pattern": "spots",
123
+ "eyes": "2",
124
+ "horns": "no",
125
+ "hat": "no",
126
+ "legs": "2"
127
+ }
128
+ },
129
+ {
130
+ "id": "B",
131
+ "signs": {
132
+ "colour": "blue",
133
+ "pattern": "spots",
134
+ "eyes": "2",
135
+ "horns": "no",
136
+ "hat": "no",
137
+ "legs": "2"
138
+ }
139
+ },
140
+ {
141
+ "id": "C",
142
+ "signs": {
143
+ "colour": "pink",
144
+ "pattern": "spots",
145
+ "eyes": "1",
146
+ "horns": "no",
147
+ "hat": "no",
148
+ "legs": "2"
149
+ }
150
+ },
151
+ {
152
+ "id": "D",
153
+ "signs": {
154
+ "colour": "green",
155
+ "pattern": "stripes",
156
+ "eyes": "2",
157
+ "horns": "no",
158
+ "hat": "no",
159
+ "legs": "2"
160
+ }
161
+ },
162
+ {
163
+ "id": "E",
164
+ "signs": {
165
+ "colour": "yellow",
166
+ "pattern": "stripes",
167
+ "eyes": "2",
168
+ "horns": "no",
169
+ "hat": "no",
170
+ "legs": "2"
171
+ }
172
+ },
173
+ {
174
+ "id": "F",
175
+ "signs": {
176
+ "colour": "purple",
177
+ "pattern": "stripes",
178
+ "eyes": "3",
179
+ "horns": "no",
180
+ "hat": "no",
181
+ "legs": "2"
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ ],
187
+ "choose": {},
188
+ "goal": {
189
+ "signs": {
190
+ "all": [
191
+ {
192
+ "sign": "pattern",
193
+ "is": "spots"
194
+ },
195
+ {
196
+ "sign": "eyes",
197
+ "is": "2"
198
+ }
199
+ ]
200
+ }
201
+ }
202
+ },
203
+ "seed": "0",
204
+ "sequences": [],
205
+ "proof": {
206
+ "undecided": "invalid",
207
+ "errors": [
208
+ {
209
+ "path": "/goal",
210
+ "message": "a goal whose answer is one card a tap chooses"
211
+ }
212
+ ]
213
+ }
214
+ }
@@ -0,0 +1,264 @@
1
+ {
2
+ "description": "The key of the lesson on signs: five creatures and the table of signs, to mark with the pen; only B has horns and no hat.",
3
+ "scene": {
4
+ "signs": [
5
+ {
6
+ "id": "colour",
7
+ "label": "colour",
8
+ "values": [
9
+ {
10
+ "id": "blue",
11
+ "label": "blue"
12
+ },
13
+ {
14
+ "id": "pink",
15
+ "label": "pink"
16
+ },
17
+ {
18
+ "id": "yellow",
19
+ "label": "yellow"
20
+ },
21
+ {
22
+ "id": "purple",
23
+ "label": "purple"
24
+ },
25
+ {
26
+ "id": "green",
27
+ "label": "green"
28
+ },
29
+ {
30
+ "id": "orange",
31
+ "label": "orange"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "id": "pattern",
37
+ "label": "pattern",
38
+ "values": [
39
+ {
40
+ "id": "plain",
41
+ "label": "plain"
42
+ },
43
+ {
44
+ "id": "stripes",
45
+ "label": "stripes"
46
+ },
47
+ {
48
+ "id": "spots",
49
+ "label": "spots"
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ "id": "eyes",
55
+ "label": "eyes",
56
+ "values": [
57
+ {
58
+ "id": "1",
59
+ "label": "one eye"
60
+ },
61
+ {
62
+ "id": "2",
63
+ "label": "two eyes"
64
+ },
65
+ {
66
+ "id": "3",
67
+ "label": "three eyes"
68
+ }
69
+ ]
70
+ },
71
+ {
72
+ "id": "horns",
73
+ "label": "horns",
74
+ "values": [
75
+ {
76
+ "id": "no",
77
+ "label": "no horns"
78
+ },
79
+ {
80
+ "id": "yes",
81
+ "label": "horns"
82
+ }
83
+ ]
84
+ },
85
+ {
86
+ "id": "hat",
87
+ "label": "hat",
88
+ "values": [
89
+ {
90
+ "id": "no",
91
+ "label": "no hat"
92
+ },
93
+ {
94
+ "id": "yes",
95
+ "label": "a hat"
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "id": "legs",
101
+ "label": "legs",
102
+ "values": [
103
+ {
104
+ "id": "2",
105
+ "label": "two legs"
106
+ },
107
+ {
108
+ "id": "3",
109
+ "label": "three legs"
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "groups": [
115
+ {
116
+ "id": "cards",
117
+ "cards": [
118
+ {
119
+ "id": "A",
120
+ "signs": {
121
+ "colour": "green",
122
+ "pattern": "plain",
123
+ "eyes": "2",
124
+ "horns": "yes",
125
+ "hat": "yes",
126
+ "legs": "2"
127
+ }
128
+ },
129
+ {
130
+ "id": "B",
131
+ "signs": {
132
+ "colour": "blue",
133
+ "pattern": "plain",
134
+ "eyes": "2",
135
+ "horns": "yes",
136
+ "hat": "no",
137
+ "legs": "2"
138
+ }
139
+ },
140
+ {
141
+ "id": "C",
142
+ "signs": {
143
+ "colour": "pink",
144
+ "pattern": "plain",
145
+ "eyes": "2",
146
+ "horns": "no",
147
+ "hat": "yes",
148
+ "legs": "2"
149
+ }
150
+ },
151
+ {
152
+ "id": "D",
153
+ "signs": {
154
+ "colour": "yellow",
155
+ "pattern": "plain",
156
+ "eyes": "2",
157
+ "horns": "no",
158
+ "hat": "no",
159
+ "legs": "2"
160
+ }
161
+ },
162
+ {
163
+ "id": "E",
164
+ "signs": {
165
+ "colour": "purple",
166
+ "pattern": "plain",
167
+ "eyes": "2",
168
+ "horns": "yes",
169
+ "hat": "yes",
170
+ "legs": "2"
171
+ }
172
+ }
173
+ ]
174
+ }
175
+ ],
176
+ "table": {
177
+ "columns": [
178
+ {
179
+ "id": "horns",
180
+ "label": "horns",
181
+ "sign": "horns",
182
+ "is": "yes"
183
+ },
184
+ {
185
+ "id": "no-hat",
186
+ "label": "no hat",
187
+ "sign": "hat",
188
+ "is": "no"
189
+ }
190
+ ]
191
+ },
192
+ "goal": {
193
+ "signs": {
194
+ "all": [
195
+ {
196
+ "sign": "horns",
197
+ "is": "yes"
198
+ },
199
+ {
200
+ "sign": "hat",
201
+ "not": "yes"
202
+ }
203
+ ]
204
+ }
205
+ }
206
+ },
207
+ "seed": "0",
208
+ "start": {
209
+ "state": {
210
+ "chosen": []
211
+ },
212
+ "goal": false
213
+ },
214
+ "sequences": [
215
+ [
216
+ {
217
+ "move": {
218
+ "choose": "B"
219
+ },
220
+ "refused": "not-choosable"
221
+ }
222
+ ]
223
+ ],
224
+ "proof": {
225
+ "key": ["B"],
226
+ "asks": "parts",
227
+ "witness": {
228
+ "rule": {
229
+ "all": [
230
+ {
231
+ "sign": "horns",
232
+ "is": "yes"
233
+ },
234
+ {
235
+ "sign": "hat",
236
+ "not": "yes"
237
+ }
238
+ ]
239
+ },
240
+ "rows": [
241
+ {
242
+ "card": "A",
243
+ "fits": [true, false]
244
+ },
245
+ {
246
+ "card": "B",
247
+ "fits": [true, true]
248
+ },
249
+ {
250
+ "card": "C",
251
+ "fits": [false, false]
252
+ },
253
+ {
254
+ "card": "D",
255
+ "fits": [false, true]
256
+ },
257
+ {
258
+ "card": "E",
259
+ "fits": [true, false]
260
+ }
261
+ ]
262
+ }
263
+ }
264
+ }