@altnovatrail/widgets 0.2.0 → 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 (97) 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.handles.json +195 -0
  22. package/kinds/line/line.schema.json +336 -0
  23. package/kinds/line/vectors/cases.json +213 -0
  24. package/kinds/line/vectors/gaps-12-d1-1.json +140 -0
  25. package/kinds/line/vectors/gaps-12-d1-2.json +95 -0
  26. package/kinds/line/vectors/gaps-12-d1-3.json +122 -0
  27. package/kinds/line/vectors/gaps-12-d1-4.json +121 -0
  28. package/kinds/line/vectors/gaps-12-d1-5.json +87 -0
  29. package/kinds/line/vectors/gaps-12-d2-1.json +173 -0
  30. package/kinds/line/vectors/gaps-12-d2-6.json +87 -0
  31. package/kinds/line/vectors/gaps-12-d3-2.json +173 -0
  32. package/kinds/line/vectors/gaps-12-d4-4.json +168 -0
  33. package/kinds/line/vectors/gaps-12-d5-3.json +99 -0
  34. package/kinds/line/vectors/gaps-12-d5-4.json +215 -0
  35. package/kinds/line/vectors/gaps-34-d1-1.json +37 -0
  36. package/kinds/line/vectors/gaps-34-d1-2.json +130 -0
  37. package/kinds/line/vectors/gaps-34-d1-4.json +155 -0
  38. package/kinds/line/vectors/gaps-34-d1-5.json +43 -0
  39. package/kinds/line/vectors/gaps-34-d3-2.json +38 -0
  40. package/kinds/line/vectors/gaps-34-d3-5.json +177 -0
  41. package/kinds/line/vectors/gaps-34-d5-3.json +39 -0
  42. package/kinds/line/vectors/invalid-line.json +34 -0
  43. package/kinds/line/vectors/invalid-ring.json +34 -0
  44. package/kinds/line/vectors/invalid.json +43 -0
  45. package/kinds/line/vectors/jump-unreachable.json +104 -0
  46. package/kinds/line/vectors/limit.json +40 -0
  47. package/kinds/line/vectors/op-not-in-scene.json +47 -0
  48. package/kinds/line/vectors/ring-cut.json +104 -0
  49. package/kinds/line/vectors/ring-every.json +107 -0
  50. package/kinds/line/vectors/ring-jump.json +135 -0
  51. package/lib/cores/arith.d.ts +62 -0
  52. package/lib/cores/arith.js +197 -0
  53. package/lib/cores/kind.d.ts +31 -3
  54. package/lib/cores/registry.d.ts +43 -0
  55. package/lib/cores/registry.js +87 -0
  56. package/lib/cores/search.d.ts +22 -6
  57. package/lib/cores/search.js +70 -14
  58. package/lib/kinds/cards/goal.d.ts +25 -0
  59. package/lib/kinds/cards/goal.js +72 -0
  60. package/lib/kinds/cards/index.d.ts +14 -0
  61. package/lib/kinds/cards/index.js +17 -0
  62. package/lib/kinds/cards/kind.d.ts +23 -0
  63. package/lib/kinds/cards/kind.js +101 -0
  64. package/lib/kinds/cards/parts.d.ts +36 -0
  65. package/lib/kinds/cards/parts.js +34 -0
  66. package/lib/kinds/cards/scene.d.ts +102 -0
  67. package/lib/kinds/cards/scene.js +356 -0
  68. package/lib/kinds/cards/schema.d.ts +10 -0
  69. package/lib/kinds/cards/schema.js +285 -0
  70. package/lib/kinds/cells/kind.js +11 -64
  71. package/lib/kinds/cells/operation.d.ts +6 -0
  72. package/lib/kinds/cells/polyomino.d.ts +14 -0
  73. package/lib/kinds/cells/polyomino.js +100 -24
  74. package/lib/kinds/cells/registry.js +1 -1
  75. package/lib/kinds/cells/schema.js +3 -1
  76. package/lib/kinds/line/cut.d.ts +2 -0
  77. package/lib/kinds/line/cut.js +63 -0
  78. package/lib/kinds/line/goals.d.ts +22 -0
  79. package/lib/kinds/line/goals.js +137 -0
  80. package/lib/kinds/line/index.d.ts +13 -0
  81. package/lib/kinds/line/index.js +17 -0
  82. package/lib/kinds/line/jump.d.ts +10 -0
  83. package/lib/kinds/line/jump.js +95 -0
  84. package/lib/kinds/line/kind.d.ts +25 -0
  85. package/lib/kinds/line/kind.js +125 -0
  86. package/lib/kinds/line/line.d.ts +63 -0
  87. package/lib/kinds/line/line.js +157 -0
  88. package/lib/kinds/line/operation.d.ts +69 -0
  89. package/lib/kinds/line/operation.js +1 -0
  90. package/lib/kinds/line/posts.d.ts +11 -0
  91. package/lib/kinds/line/posts.js +85 -0
  92. package/lib/kinds/line/registry.d.ts +2 -0
  93. package/lib/kinds/line/registry.js +11 -0
  94. package/lib/kinds/line/schema.d.ts +4 -0
  95. package/lib/kinds/line/schema.js +159 -0
  96. package/package.json +16 -4
  97. package/cores/handles.schema.json +0 -63
@@ -0,0 +1,113 @@
1
+ {
2
+ "description": "The recognition of the lesson on signs: three cards of tasks, each its statement's text and its class, and a tap chooses one; th1 is of today's class.",
3
+ "scene": {
4
+ "signs": [
5
+ {
6
+ "id": "class",
7
+ "label": "class",
8
+ "values": [
9
+ {
10
+ "id": "counting",
11
+ "label": "Counting in a picture"
12
+ },
13
+ {
14
+ "id": "attributes",
15
+ "label": "Find it by its signs"
16
+ },
17
+ {
18
+ "id": "weights",
19
+ "label": "Which is heavier"
20
+ }
21
+ ]
22
+ }
23
+ ],
24
+ "groups": [
25
+ {
26
+ "id": "tasks",
27
+ "cards": [
28
+ {
29
+ "id": "th0",
30
+ "text": "How many apples are on the tree?",
31
+ "signs": {
32
+ "class": "counting"
33
+ }
34
+ },
35
+ {
36
+ "id": "th1",
37
+ "text": "Which basket holds three apples and no pears?",
38
+ "signs": {
39
+ "class": "attributes"
40
+ }
41
+ },
42
+ {
43
+ "id": "th2",
44
+ "text": "Which is heavier: the cat or the rabbit?",
45
+ "signs": {
46
+ "class": "weights"
47
+ }
48
+ }
49
+ ]
50
+ }
51
+ ],
52
+ "choose": {},
53
+ "goal": {
54
+ "signs": {
55
+ "sign": "class",
56
+ "is": "attributes"
57
+ }
58
+ }
59
+ },
60
+ "seed": "0",
61
+ "start": {
62
+ "state": {
63
+ "chosen": []
64
+ },
65
+ "goal": false
66
+ },
67
+ "sequences": [
68
+ [
69
+ {
70
+ "move": {
71
+ "choose": "th0"
72
+ },
73
+ "state": {
74
+ "chosen": ["th0"]
75
+ },
76
+ "goal": false
77
+ },
78
+ {
79
+ "move": {
80
+ "choose": "th1"
81
+ },
82
+ "state": {
83
+ "chosen": ["th1"]
84
+ },
85
+ "goal": true
86
+ }
87
+ ]
88
+ ],
89
+ "proof": {
90
+ "key": ["th1"],
91
+ "asks": "parts",
92
+ "witness": {
93
+ "rule": {
94
+ "sign": "class",
95
+ "is": "attributes"
96
+ },
97
+ "rows": [
98
+ {
99
+ "card": "th0",
100
+ "fits": [false]
101
+ },
102
+ {
103
+ "card": "th1",
104
+ "fits": [true]
105
+ },
106
+ {
107
+ "card": "th2",
108
+ "fits": [false]
109
+ }
110
+ ]
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,397 @@
1
+ {
2
+ "description": "The riddle of the lesson on signs: three Bips and two not-Bips teach the rule by example, and a tap chooses one of five creatures or an option; C, green with stripes and two eyes, gives every value the Bips share.",
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": "bips",
117
+ "label": "Bips",
118
+ "cards": [
119
+ {
120
+ "id": "b1",
121
+ "signs": {
122
+ "colour": "blue",
123
+ "pattern": "stripes",
124
+ "eyes": "2",
125
+ "horns": "no",
126
+ "hat": "no",
127
+ "legs": "2"
128
+ }
129
+ },
130
+ {
131
+ "id": "b2",
132
+ "signs": {
133
+ "colour": "pink",
134
+ "pattern": "stripes",
135
+ "eyes": "2",
136
+ "horns": "no",
137
+ "hat": "no",
138
+ "legs": "2"
139
+ }
140
+ },
141
+ {
142
+ "id": "b3",
143
+ "signs": {
144
+ "colour": "yellow",
145
+ "pattern": "stripes",
146
+ "eyes": "2",
147
+ "horns": "no",
148
+ "hat": "no",
149
+ "legs": "2"
150
+ }
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "id": "not-bips",
156
+ "label": "Not Bips",
157
+ "cards": [
158
+ {
159
+ "id": "n1",
160
+ "signs": {
161
+ "colour": "purple",
162
+ "pattern": "stripes",
163
+ "eyes": "3",
164
+ "horns": "no",
165
+ "hat": "no",
166
+ "legs": "2"
167
+ }
168
+ },
169
+ {
170
+ "id": "n2",
171
+ "signs": {
172
+ "colour": "green",
173
+ "pattern": "spots",
174
+ "eyes": "2",
175
+ "horns": "no",
176
+ "hat": "no",
177
+ "legs": "2"
178
+ }
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ "id": "choices",
184
+ "label": "Which one is a Bip?",
185
+ "cards": [
186
+ {
187
+ "id": "A",
188
+ "signs": {
189
+ "colour": "orange",
190
+ "pattern": "stripes",
191
+ "eyes": "3",
192
+ "horns": "no",
193
+ "hat": "no",
194
+ "legs": "2"
195
+ }
196
+ },
197
+ {
198
+ "id": "B",
199
+ "signs": {
200
+ "colour": "blue",
201
+ "pattern": "spots",
202
+ "eyes": "2",
203
+ "horns": "no",
204
+ "hat": "no",
205
+ "legs": "2"
206
+ }
207
+ },
208
+ {
209
+ "id": "C",
210
+ "signs": {
211
+ "colour": "green",
212
+ "pattern": "stripes",
213
+ "eyes": "2",
214
+ "horns": "no",
215
+ "hat": "no",
216
+ "legs": "2"
217
+ }
218
+ },
219
+ {
220
+ "id": "D",
221
+ "signs": {
222
+ "colour": "pink",
223
+ "pattern": "plain",
224
+ "eyes": "2",
225
+ "horns": "no",
226
+ "hat": "no",
227
+ "legs": "2"
228
+ }
229
+ },
230
+ {
231
+ "id": "E",
232
+ "signs": {
233
+ "colour": "yellow",
234
+ "pattern": "stripes",
235
+ "eyes": "3",
236
+ "horns": "no",
237
+ "hat": "yes",
238
+ "legs": "2"
239
+ }
240
+ }
241
+ ]
242
+ }
243
+ ],
244
+ "options": [
245
+ {
246
+ "id": "unsure",
247
+ "label": "Not sure yet"
248
+ }
249
+ ],
250
+ "choose": {
251
+ "from": ["choices"]
252
+ },
253
+ "goal": {
254
+ "like": "bips",
255
+ "among": ["choices"]
256
+ }
257
+ },
258
+ "seed": "0",
259
+ "start": {
260
+ "state": {
261
+ "chosen": []
262
+ },
263
+ "goal": false
264
+ },
265
+ "sequences": [
266
+ [
267
+ {
268
+ "move": {
269
+ "choose": "A"
270
+ },
271
+ "state": {
272
+ "chosen": ["A"]
273
+ },
274
+ "goal": false
275
+ },
276
+ {
277
+ "move": {
278
+ "choose": "C"
279
+ },
280
+ "state": {
281
+ "chosen": ["C"]
282
+ },
283
+ "goal": true
284
+ },
285
+ {
286
+ "move": {
287
+ "choose": "C"
288
+ },
289
+ "state": {
290
+ "chosen": []
291
+ },
292
+ "goal": false
293
+ },
294
+ {
295
+ "move": {
296
+ "choose": "unsure"
297
+ },
298
+ "state": {
299
+ "chosen": ["unsure"]
300
+ },
301
+ "goal": false
302
+ },
303
+ {
304
+ "move": {
305
+ "choose": "D"
306
+ },
307
+ "state": {
308
+ "chosen": ["D"]
309
+ },
310
+ "goal": false
311
+ }
312
+ ],
313
+ [
314
+ {
315
+ "move": {
316
+ "choose": "b1"
317
+ },
318
+ "refused": "not-choosable"
319
+ },
320
+ {
321
+ "move": {
322
+ "choose": "Z"
323
+ },
324
+ "refused": "no-part"
325
+ },
326
+ {
327
+ "move": {
328
+ "choose": 3
329
+ },
330
+ "refused": "not-a-move"
331
+ },
332
+ {
333
+ "move": {
334
+ "choose": "A",
335
+ "many": true
336
+ },
337
+ "refused": "not-a-move"
338
+ },
339
+ {
340
+ "move": "A",
341
+ "refused": "not-a-move"
342
+ }
343
+ ]
344
+ ],
345
+ "proof": {
346
+ "key": ["C"],
347
+ "asks": "parts",
348
+ "witness": {
349
+ "rule": {
350
+ "all": [
351
+ {
352
+ "sign": "pattern",
353
+ "is": "stripes"
354
+ },
355
+ {
356
+ "sign": "eyes",
357
+ "is": "2"
358
+ },
359
+ {
360
+ "sign": "horns",
361
+ "is": "no"
362
+ },
363
+ {
364
+ "sign": "hat",
365
+ "is": "no"
366
+ },
367
+ {
368
+ "sign": "legs",
369
+ "is": "2"
370
+ }
371
+ ]
372
+ },
373
+ "rows": [
374
+ {
375
+ "card": "A",
376
+ "fits": [true, false, true, true, true]
377
+ },
378
+ {
379
+ "card": "B",
380
+ "fits": [false, true, true, true, true]
381
+ },
382
+ {
383
+ "card": "C",
384
+ "fits": [true, true, true, true, true]
385
+ },
386
+ {
387
+ "card": "D",
388
+ "fits": [false, true, true, true, true]
389
+ },
390
+ {
391
+ "card": "E",
392
+ "fits": [true, false, true, false, true]
393
+ }
394
+ ]
395
+ }
396
+ }
397
+ }