@altnovatrail/widgets 0.1.2 → 0.1.3

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 (102) hide show
  1. package/README.md +1 -1
  2. package/cores/vector.schema.json +82 -3
  3. package/kinds/cells/cells.handles.json +145 -0
  4. package/kinds/cells/cells.schema.json +652 -4
  5. package/kinds/cells/vectors/bishop-grid-56-d1-1.json +105 -4
  6. package/kinds/cells/vectors/counter-cases.json +123 -0
  7. package/kinds/cells/vectors/counter-div-56-d1-3.json +57 -0
  8. package/kinds/cells/vectors/counter-div-56-d2-1.json +773 -0
  9. package/kinds/cells/vectors/counter-div-56-d2-3.json +65 -0
  10. package/kinds/cells/vectors/counter-div-56-d4-1.json +57 -0
  11. package/kinds/cells/vectors/counter-div-56-d4-2.json +106 -0
  12. package/kinds/cells/vectors/cut-cases.json +163 -0
  13. package/kinds/cells/vectors/cut-gaps-56-d2-1.json +142 -0
  14. package/kinds/cells/vectors/cut-grid-56-d2-4.json +45 -0
  15. package/kinds/cells/vectors/cut-grid-56-d4-1.json +154 -0
  16. package/kinds/cells/vectors/cut-grid-56-d4-2.json +136 -0
  17. package/kinds/cells/vectors/cut-invalid.json +48 -0
  18. package/kinds/cells/vectors/domino-grid-56-d3-2.json +238 -0
  19. package/kinds/cells/vectors/domino-limit.json +60 -0
  20. package/kinds/cells/vectors/domino-par-56-d3-2.json +194 -0
  21. package/kinds/cells/vectors/domino-par-56-d4-3.json +127 -0
  22. package/kinds/cells/vectors/figure-apart.json +47 -0
  23. package/kinds/cells/vectors/fold-12x12.json +79 -0
  24. package/kinds/cells/vectors/fold-14x14.json +79 -0
  25. package/kinds/cells/vectors/fold-26x26.json +79 -0
  26. package/kinds/cells/vectors/garden-enum-56-d3-4.json +96 -6
  27. package/kinds/cells/vectors/goat-grid-56-d4-4.json +325 -5
  28. package/kinds/cells/vectors/mosaic-grid-56-d2-2.json +84 -0
  29. package/kinds/cells/vectors/nodes-gaps-56-d2-2.json +44 -0
  30. package/kinds/cells/vectors/nodes-gaps-56-d4-2.json +70 -0
  31. package/kinds/cells/vectors/number-div-56-d2-2.json +49 -0
  32. package/kinds/cells/vectors/numbers-div-56-d3-1.json +24 -0
  33. package/kinds/cells/vectors/numbers-invalid.json +56 -0
  34. package/kinds/cells/vectors/paper-26x26.json +743 -0
  35. package/kinds/cells/vectors/paper-cube-12-d2-1.json +43 -19
  36. package/kinds/cells/vectors/paper-cube-12-d5-1.json +47 -4
  37. package/kinds/cells/vectors/paper-cube-56-d4-1.json +56 -5
  38. package/kinds/cells/vectors/paper-drawn-lines.json +149 -0
  39. package/kinds/cells/vectors/paper-grid-56-d1-2.json +46 -5
  40. package/kinds/cells/vectors/paper-turn-invalid.json +4 -4
  41. package/kinds/cells/vectors/path-6x6.json +119 -0
  42. package/kinds/cells/vectors/path-beside.json +108 -0
  43. package/kinds/cells/vectors/path-enum-12-d3-5.json +187 -0
  44. package/kinds/cells/vectors/path-enum-34-d4-3.json +412 -0
  45. package/kinds/cells/vectors/path-enum-56-d3-3.json +411 -0
  46. package/kinds/cells/vectors/path-enum-56-d3-5.json +351 -0
  47. package/kinds/cells/vectors/path-invalid.json +37 -0
  48. package/kinds/cells/vectors/path-limit.json +58 -0
  49. package/kinds/cells/vectors/path-maze.json +297 -0
  50. package/kinds/cells/vectors/path-unreachable.json +76 -0
  51. package/kinds/cells/vectors/perimeter-grid-56-d2-1.json +86 -0
  52. package/kinds/cells/vectors/perimeter-grid-56-d3-1.json +102 -0
  53. package/kinds/cells/vectors/perimeter-grid-56-d3-3.json +112 -0
  54. package/kinds/cells/vectors/perimeter-grid-56-d4-3.json +289 -0
  55. package/kinds/cells/vectors/polyomino-cases.json +191 -0
  56. package/kinds/cells/vectors/polyomino-grid-56-d3-4.json +205 -0
  57. package/kinds/cells/vectors/polyomino-grid-56-d4-1.json +137 -0
  58. package/kinds/cells/vectors/polyomino-grid-56-d5-3.json +157 -0
  59. package/kinds/cells/vectors/polyomino-invalid.json +45 -0
  60. package/kinds/cells/vectors/route-par-56-d3-3.json +245 -0
  61. package/kinds/cells/vectors/sides-gaps-56-d3-2.json +44 -0
  62. package/kinds/cells/vectors/sieve-div-56-d3-2.json +140 -0
  63. package/kinds/cells/vectors/tear-gaps-56-d3-1.json +84 -0
  64. package/kinds/cells/vectors/tear-limit.json +56 -0
  65. package/lib/cores/enumerate.d.ts +33 -0
  66. package/lib/cores/enumerate.js +77 -0
  67. package/lib/cores/kind.d.ts +55 -5
  68. package/lib/cores/search.d.ts +27 -8
  69. package/lib/cores/search.js +85 -28
  70. package/lib/kinds/cells/bishop.d.ts +1 -1
  71. package/lib/kinds/cells/bishop.js +1 -1
  72. package/lib/kinds/cells/counter.d.ts +26 -0
  73. package/lib/kinds/cells/counter.js +249 -0
  74. package/lib/kinds/cells/cut.d.ts +46 -0
  75. package/lib/kinds/cells/cut.js +400 -0
  76. package/lib/kinds/cells/figure.d.ts +13 -0
  77. package/lib/kinds/cells/figure.js +114 -0
  78. package/lib/kinds/cells/holes.d.ts +6 -0
  79. package/lib/kinds/cells/holes.js +57 -0
  80. package/lib/kinds/cells/kind.js +4 -2
  81. package/lib/kinds/cells/number.d.ts +6 -0
  82. package/lib/kinds/cells/number.js +32 -0
  83. package/lib/kinds/cells/operation.d.ts +12 -6
  84. package/lib/kinds/cells/paper.d.ts +10 -2
  85. package/lib/kinds/cells/paper.js +90 -8
  86. package/lib/kinds/cells/path.d.ts +38 -0
  87. package/lib/kinds/cells/path.js +288 -0
  88. package/lib/kinds/cells/piece.d.ts +10 -1
  89. package/lib/kinds/cells/piece.js +87 -3
  90. package/lib/kinds/cells/polyomino.d.ts +45 -0
  91. package/lib/kinds/cells/polyomino.js +450 -0
  92. package/lib/kinds/cells/registry.js +35 -4
  93. package/lib/kinds/cells/schema.js +41 -3
  94. package/lib/kinds/cells/sheet.d.ts +20 -1
  95. package/lib/kinds/cells/sheet.js +84 -6
  96. package/lib/kinds/cells/side.d.ts +33 -0
  97. package/lib/kinds/cells/side.js +86 -0
  98. package/lib/kinds/cells/sieve.d.ts +26 -0
  99. package/lib/kinds/cells/sieve.js +208 -0
  100. package/lib/kinds/cells/step.d.ts +1 -1
  101. package/lib/kinds/cells/step.js +1 -1
  102. package/package.json +5 -1
@@ -0,0 +1,297 @@
1
+ {
2
+ "description": "A path across the sides of cells on a sheet of 4 by 4 with a hole and walls, to D4 through B4. The goal's key is the fewest steps of a path that ends on D4 past B4: 8, round the walls below B4 and below C3. A hole, a wall, a cell apart and what is no cell are refused.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 4,
6
+ "cols": 4,
7
+ "holes": ["B2"],
8
+ "walls": [["B4", "C4"], ["C3", "D3"]]
9
+ },
10
+ "operations": {
11
+ "path": {
12
+ "from": "A1"
13
+ }
14
+ },
15
+ "goal": {
16
+ "path_to": {
17
+ "cell": "D4",
18
+ "through": ["B4"]
19
+ }
20
+ }
21
+ },
22
+ "seed": "0",
23
+ "start": {
24
+ "state": {
25
+ "marks": {},
26
+ "path": ["A1"]
27
+ },
28
+ "goal": false
29
+ },
30
+ "sequences": [
31
+ [
32
+ {
33
+ "move": {
34
+ "path": {
35
+ "to": "B1"
36
+ }
37
+ },
38
+ "state": {
39
+ "marks": {},
40
+ "path": ["A1", "B1"]
41
+ },
42
+ "goal": false
43
+ },
44
+ {
45
+ "move": {
46
+ "path": {
47
+ "to": "B2"
48
+ }
49
+ },
50
+ "refused": "hole"
51
+ },
52
+ {
53
+ "move": {
54
+ "path": {
55
+ "to": "A3"
56
+ }
57
+ },
58
+ "refused": "not-a-step"
59
+ },
60
+ {
61
+ "move": {
62
+ "path": {
63
+ "to": "E1"
64
+ }
65
+ },
66
+ "refused": "no-cell"
67
+ },
68
+ {
69
+ "move": {
70
+ "path": {
71
+ "to": "C1"
72
+ }
73
+ },
74
+ "state": {
75
+ "marks": {},
76
+ "path": ["A1", "B1", "C1"]
77
+ },
78
+ "goal": false
79
+ },
80
+ {
81
+ "move": {
82
+ "path": {
83
+ "to": "C2"
84
+ }
85
+ },
86
+ "state": {
87
+ "marks": {},
88
+ "path": ["A1", "B1", "C1", "C2"]
89
+ },
90
+ "goal": false
91
+ },
92
+ {
93
+ "move": {
94
+ "path": {
95
+ "to": "C3"
96
+ }
97
+ },
98
+ "state": {
99
+ "marks": {},
100
+ "path": ["A1", "B1", "C1", "C2", "C3"]
101
+ },
102
+ "goal": false
103
+ },
104
+ {
105
+ "move": {
106
+ "path": {
107
+ "to": "D3"
108
+ }
109
+ },
110
+ "refused": "wall"
111
+ },
112
+ {
113
+ "move": {
114
+ "path": {
115
+ "to": "C4"
116
+ }
117
+ },
118
+ "state": {
119
+ "marks": {},
120
+ "path": ["A1", "B1", "C1", "C2", "C3", "C4"]
121
+ },
122
+ "goal": false
123
+ },
124
+ {
125
+ "move": {
126
+ "path": {
127
+ "to": "D4"
128
+ }
129
+ },
130
+ "state": {
131
+ "marks": {},
132
+ "path": ["A1", "B1", "C1", "C2", "C3", "C4", "D4"]
133
+ },
134
+ "goal": false
135
+ }
136
+ ],
137
+ [
138
+ {
139
+ "move": {
140
+ "path": {
141
+ "to": "A2"
142
+ }
143
+ },
144
+ "state": {
145
+ "marks": {},
146
+ "path": ["A1", "A2"]
147
+ },
148
+ "goal": false
149
+ },
150
+ {
151
+ "move": {
152
+ "path": {
153
+ "to": "A3"
154
+ }
155
+ },
156
+ "state": {
157
+ "marks": {},
158
+ "path": ["A1", "A2", "A3"]
159
+ },
160
+ "goal": false
161
+ },
162
+ {
163
+ "move": {
164
+ "path": {
165
+ "to": "A4"
166
+ }
167
+ },
168
+ "state": {
169
+ "marks": {},
170
+ "path": ["A1", "A2", "A3", "A4"]
171
+ },
172
+ "goal": false
173
+ },
174
+ {
175
+ "move": {
176
+ "path": {
177
+ "to": "B4"
178
+ }
179
+ },
180
+ "state": {
181
+ "marks": {},
182
+ "path": ["A1", "A2", "A3", "A4", "B4"]
183
+ },
184
+ "goal": false
185
+ },
186
+ {
187
+ "move": {
188
+ "path": {
189
+ "to": "C4"
190
+ }
191
+ },
192
+ "refused": "wall"
193
+ },
194
+ {
195
+ "move": {
196
+ "path": {
197
+ "to": "B3"
198
+ }
199
+ },
200
+ "state": {
201
+ "marks": {},
202
+ "path": ["A1", "A2", "A3", "A4", "B4", "B3"]
203
+ },
204
+ "goal": false
205
+ },
206
+ {
207
+ "move": {
208
+ "path": {
209
+ "to": "C3"
210
+ }
211
+ },
212
+ "state": {
213
+ "marks": {},
214
+ "path": ["A1", "A2", "A3", "A4", "B4", "B3", "C3"]
215
+ },
216
+ "goal": false
217
+ },
218
+ {
219
+ "move": {
220
+ "path": {
221
+ "to": "C4"
222
+ }
223
+ },
224
+ "state": {
225
+ "marks": {},
226
+ "path": ["A1", "A2", "A3", "A4", "B4", "B3", "C3", "C4"]
227
+ },
228
+ "goal": false
229
+ },
230
+ {
231
+ "move": {
232
+ "path": {
233
+ "to": "D4"
234
+ }
235
+ },
236
+ "state": {
237
+ "marks": {},
238
+ "path": ["A1", "A2", "A3", "A4", "B4", "B3", "C3", "C4", "D4"]
239
+ },
240
+ "goal": true
241
+ }
242
+ ]
243
+ ],
244
+ "proof": {
245
+ "key": 8,
246
+ "witness": {
247
+ "path": [
248
+ {
249
+ "path": {
250
+ "to": "A2"
251
+ }
252
+ },
253
+ {
254
+ "path": {
255
+ "to": "A3"
256
+ }
257
+ },
258
+ {
259
+ "path": {
260
+ "to": "A4"
261
+ }
262
+ },
263
+ {
264
+ "path": {
265
+ "to": "B4"
266
+ }
267
+ },
268
+ {
269
+ "path": {
270
+ "to": "B3"
271
+ }
272
+ },
273
+ {
274
+ "path": {
275
+ "to": "C3"
276
+ }
277
+ },
278
+ {
279
+ "path": {
280
+ "to": "C4"
281
+ }
282
+ },
283
+ {
284
+ "path": {
285
+ "to": "D4"
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ "ends": [
291
+ {
292
+ "marks": {},
293
+ "path": ["A1", "A2", "A3", "A4", "B4", "B3", "C3", "C4", "D4"]
294
+ }
295
+ ]
296
+ }
297
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "description": "A path to the right and down alone from A1 to C1 on a sheet of 3 by 3, through A3: no such path goes back left, so the goal cannot be met; the key is unreachable, the whole graph its witness.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3
7
+ },
8
+ "operations": {
9
+ "path": {
10
+ "from": "A1",
11
+ "directions": ["right", "down"]
12
+ }
13
+ },
14
+ "goal": {
15
+ "path_count": {
16
+ "cell": "C1",
17
+ "through": ["A3"]
18
+ }
19
+ }
20
+ },
21
+ "seed": "0",
22
+ "start": {
23
+ "state": {
24
+ "marks": {},
25
+ "path": ["A1"]
26
+ },
27
+ "goal": false
28
+ },
29
+ "sequences": [
30
+ [
31
+ {
32
+ "move": {
33
+ "path": {
34
+ "to": "A2"
35
+ }
36
+ },
37
+ "state": {
38
+ "marks": {},
39
+ "path": ["A1", "A2"]
40
+ },
41
+ "goal": false
42
+ },
43
+ {
44
+ "move": {
45
+ "path": {
46
+ "to": "A3"
47
+ }
48
+ },
49
+ "state": {
50
+ "marks": {},
51
+ "path": ["A1", "A2", "A3"]
52
+ },
53
+ "goal": false
54
+ },
55
+ {
56
+ "move": {
57
+ "path": {
58
+ "to": "B3"
59
+ }
60
+ },
61
+ "state": {
62
+ "marks": {},
63
+ "path": ["A1", "A2", "A3", "B3"]
64
+ },
65
+ "goal": false
66
+ }
67
+ ]
68
+ ],
69
+ "proof": {
70
+ "key": "unreachable",
71
+ "witness": {
72
+ "layers": [1, 2, 4, 6, 6]
73
+ },
74
+ "ends": []
75
+ }
76
+ }
@@ -0,0 +1,86 @@
1
+ {
2
+ "description": "The course's task grid-56-d2-1: tiles on A1, B1, C1 and C2 of a grid of 3 by 3, a figure of blue cells on a sheet only to look at. The goal asks the greatest perimeter of the blue figure; the sheet has one state, so it is the figure's own, 10, the task's key. The scene allows no operation, so paint is refused.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "blue"
10
+ },
11
+ "B1": {
12
+ "color": "blue"
13
+ },
14
+ "C1": {
15
+ "color": "blue"
16
+ },
17
+ "C2": {
18
+ "color": "blue"
19
+ }
20
+ }
21
+ },
22
+ "operations": {},
23
+ "goal": {
24
+ "perimeter": {
25
+ "color": "blue"
26
+ }
27
+ }
28
+ },
29
+ "seed": "0",
30
+ "start": {
31
+ "state": {
32
+ "marks": {
33
+ "A1": {
34
+ "color": "blue"
35
+ },
36
+ "B1": {
37
+ "color": "blue"
38
+ },
39
+ "C1": {
40
+ "color": "blue"
41
+ },
42
+ "C2": {
43
+ "color": "blue"
44
+ }
45
+ }
46
+ },
47
+ "goal": true
48
+ },
49
+ "sequences": [
50
+ [
51
+ {
52
+ "move": {
53
+ "paint": {
54
+ "cell": "A2"
55
+ }
56
+ },
57
+ "refused": "op-not-in-scene"
58
+ }
59
+ ]
60
+ ],
61
+ "proof": {
62
+ "key": 10,
63
+ "asks": "max",
64
+ "witness": {
65
+ "path": []
66
+ },
67
+ "ends": [
68
+ {
69
+ "marks": {
70
+ "A1": {
71
+ "color": "blue"
72
+ },
73
+ "B1": {
74
+ "color": "blue"
75
+ },
76
+ "C1": {
77
+ "color": "blue"
78
+ },
79
+ "C2": {
80
+ "color": "blue"
81
+ }
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ }
@@ -0,0 +1,102 @@
1
+ {
2
+ "description": "The course's task grid-56-d3-1: a playground on seven squares of a grid of 3 by 3, every square but A2 and B2, the gap in the middle from the top. The goal asks the perimeter of the green figure, 16, the task's key: the sides along the gap count too.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "green"
10
+ },
11
+ "B1": {
12
+ "color": "green"
13
+ },
14
+ "C1": {
15
+ "color": "green"
16
+ },
17
+ "C2": {
18
+ "color": "green"
19
+ },
20
+ "C3": {
21
+ "color": "green"
22
+ },
23
+ "B3": {
24
+ "color": "green"
25
+ },
26
+ "A3": {
27
+ "color": "green"
28
+ }
29
+ }
30
+ },
31
+ "operations": {},
32
+ "goal": {
33
+ "perimeter": {
34
+ "color": "green"
35
+ }
36
+ }
37
+ },
38
+ "seed": "0",
39
+ "start": {
40
+ "state": {
41
+ "marks": {
42
+ "A1": {
43
+ "color": "green"
44
+ },
45
+ "A3": {
46
+ "color": "green"
47
+ },
48
+ "B1": {
49
+ "color": "green"
50
+ },
51
+ "B3": {
52
+ "color": "green"
53
+ },
54
+ "C1": {
55
+ "color": "green"
56
+ },
57
+ "C2": {
58
+ "color": "green"
59
+ },
60
+ "C3": {
61
+ "color": "green"
62
+ }
63
+ }
64
+ },
65
+ "goal": true
66
+ },
67
+ "sequences": [],
68
+ "proof": {
69
+ "key": 16,
70
+ "asks": "max",
71
+ "witness": {
72
+ "path": []
73
+ },
74
+ "ends": [
75
+ {
76
+ "marks": {
77
+ "A1": {
78
+ "color": "green"
79
+ },
80
+ "A3": {
81
+ "color": "green"
82
+ },
83
+ "B1": {
84
+ "color": "green"
85
+ },
86
+ "B3": {
87
+ "color": "green"
88
+ },
89
+ "C1": {
90
+ "color": "green"
91
+ },
92
+ "C2": {
93
+ "color": "green"
94
+ },
95
+ "C3": {
96
+ "color": "green"
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "description": "The course's task grid-56-d3-3: a cake of 3 by 3 pieces with sides of 2 cm, the corner A1 eaten, the pieces left yellow. The goal asks the perimeter of the yellow figure with a cell's side of 2, 24, the task's key: 12 sides of cells, each 2 cm.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3,
7
+ "marks": {
8
+ "A2": {
9
+ "color": "yellow"
10
+ },
11
+ "A3": {
12
+ "color": "yellow"
13
+ },
14
+ "B1": {
15
+ "color": "yellow"
16
+ },
17
+ "B2": {
18
+ "color": "yellow"
19
+ },
20
+ "B3": {
21
+ "color": "yellow"
22
+ },
23
+ "C1": {
24
+ "color": "yellow"
25
+ },
26
+ "C2": {
27
+ "color": "yellow"
28
+ },
29
+ "C3": {
30
+ "color": "yellow"
31
+ }
32
+ }
33
+ },
34
+ "operations": {},
35
+ "goal": {
36
+ "perimeter": {
37
+ "color": "yellow",
38
+ "side": 2
39
+ }
40
+ }
41
+ },
42
+ "seed": "0",
43
+ "start": {
44
+ "state": {
45
+ "marks": {
46
+ "A2": {
47
+ "color": "yellow"
48
+ },
49
+ "A3": {
50
+ "color": "yellow"
51
+ },
52
+ "B1": {
53
+ "color": "yellow"
54
+ },
55
+ "B2": {
56
+ "color": "yellow"
57
+ },
58
+ "B3": {
59
+ "color": "yellow"
60
+ },
61
+ "C1": {
62
+ "color": "yellow"
63
+ },
64
+ "C2": {
65
+ "color": "yellow"
66
+ },
67
+ "C3": {
68
+ "color": "yellow"
69
+ }
70
+ }
71
+ },
72
+ "goal": true
73
+ },
74
+ "sequences": [],
75
+ "proof": {
76
+ "key": 24,
77
+ "asks": "max",
78
+ "witness": {
79
+ "path": []
80
+ },
81
+ "ends": [
82
+ {
83
+ "marks": {
84
+ "A2": {
85
+ "color": "yellow"
86
+ },
87
+ "A3": {
88
+ "color": "yellow"
89
+ },
90
+ "B1": {
91
+ "color": "yellow"
92
+ },
93
+ "B2": {
94
+ "color": "yellow"
95
+ },
96
+ "B3": {
97
+ "color": "yellow"
98
+ },
99
+ "C1": {
100
+ "color": "yellow"
101
+ },
102
+ "C2": {
103
+ "color": "yellow"
104
+ },
105
+ "C3": {
106
+ "color": "yellow"
107
+ }
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ }