@altnovatrail/widgets 0.1.2 → 0.2.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 (110) hide show
  1. package/README.md +1 -1
  2. package/cores/vector.schema.json +82 -3
  3. package/kinds/cells/cells.handles.json +148 -3
  4. package/kinds/cells/cells.schema.json +716 -8
  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/knight-after-no-parity.json +31 -0
  29. package/kinds/cells/vectors/knight-par-56-d2-2.json +61 -6
  30. package/kinds/cells/vectors/mosaic-grid-56-d2-2.json +84 -0
  31. package/kinds/cells/vectors/nodes-gaps-56-d2-2.json +44 -0
  32. package/kinds/cells/vectors/nodes-gaps-56-d4-2.json +70 -0
  33. package/kinds/cells/vectors/number-div-56-d2-2.json +49 -0
  34. package/kinds/cells/vectors/numbers-div-56-d3-1.json +24 -0
  35. package/kinds/cells/vectors/numbers-invalid.json +56 -0
  36. package/kinds/cells/vectors/paper-26x26.json +743 -0
  37. package/kinds/cells/vectors/paper-cube-12-d2-1.json +43 -19
  38. package/kinds/cells/vectors/paper-cube-12-d5-1.json +47 -4
  39. package/kinds/cells/vectors/paper-cube-56-d4-1.json +56 -5
  40. package/kinds/cells/vectors/paper-drawn-lines.json +184 -0
  41. package/kinds/cells/vectors/paper-grid-56-d1-2.json +46 -5
  42. package/kinds/cells/vectors/paper-turn-invalid.json +4 -4
  43. package/kinds/cells/vectors/path-6x6.json +119 -0
  44. package/kinds/cells/vectors/path-beside.json +108 -0
  45. package/kinds/cells/vectors/path-enum-12-d3-5.json +187 -0
  46. package/kinds/cells/vectors/path-enum-34-d4-3.json +412 -0
  47. package/kinds/cells/vectors/path-enum-56-d3-3.json +411 -0
  48. package/kinds/cells/vectors/path-enum-56-d3-5.json +351 -0
  49. package/kinds/cells/vectors/path-invalid.json +37 -0
  50. package/kinds/cells/vectors/path-limit.json +58 -0
  51. package/kinds/cells/vectors/path-maze.json +297 -0
  52. package/kinds/cells/vectors/path-unreachable.json +76 -0
  53. package/kinds/cells/vectors/perimeter-grid-56-d2-1.json +86 -0
  54. package/kinds/cells/vectors/perimeter-grid-56-d3-1.json +102 -0
  55. package/kinds/cells/vectors/perimeter-grid-56-d3-3.json +112 -0
  56. package/kinds/cells/vectors/perimeter-grid-56-d4-3.json +289 -0
  57. package/kinds/cells/vectors/polyomino-cases.json +191 -0
  58. package/kinds/cells/vectors/polyomino-grid-56-d3-4.json +205 -0
  59. package/kinds/cells/vectors/polyomino-grid-56-d4-1.json +137 -0
  60. package/kinds/cells/vectors/polyomino-grid-56-d5-3.json +157 -0
  61. package/kinds/cells/vectors/polyomino-invalid.json +45 -0
  62. package/kinds/cells/vectors/polyomino-one-pieces.json +28 -0
  63. package/kinds/cells/vectors/route-par-56-d3-3.json +245 -0
  64. package/kinds/cells/vectors/sides-gaps-56-d3-2.json +44 -0
  65. package/kinds/cells/vectors/sieve-div-56-d3-2.json +140 -0
  66. package/kinds/cells/vectors/tear-gaps-56-d3-1.json +84 -0
  67. package/kinds/cells/vectors/tear-limit.json +56 -0
  68. package/lib/cores/enumerate.d.ts +33 -0
  69. package/lib/cores/enumerate.js +77 -0
  70. package/lib/cores/kind.d.ts +70 -5
  71. package/lib/cores/kind.js +2 -2
  72. package/lib/cores/search.d.ts +47 -10
  73. package/lib/cores/search.js +129 -37
  74. package/lib/kinds/cells/bishop.d.ts +1 -1
  75. package/lib/kinds/cells/bishop.js +1 -1
  76. package/lib/kinds/cells/counter.d.ts +26 -0
  77. package/lib/kinds/cells/counter.js +249 -0
  78. package/lib/kinds/cells/cut.d.ts +46 -0
  79. package/lib/kinds/cells/cut.js +400 -0
  80. package/lib/kinds/cells/figure.d.ts +13 -0
  81. package/lib/kinds/cells/figure.js +114 -0
  82. package/lib/kinds/cells/holes.d.ts +6 -0
  83. package/lib/kinds/cells/holes.js +57 -0
  84. package/lib/kinds/cells/index.d.ts +8 -0
  85. package/lib/kinds/cells/index.js +10 -2
  86. package/lib/kinds/cells/kind.d.ts +3 -2
  87. package/lib/kinds/cells/kind.js +23 -8
  88. package/lib/kinds/cells/knight.d.ts +1 -1
  89. package/lib/kinds/cells/number.d.ts +6 -0
  90. package/lib/kinds/cells/number.js +32 -0
  91. package/lib/kinds/cells/operation.d.ts +27 -7
  92. package/lib/kinds/cells/paper.d.ts +10 -2
  93. package/lib/kinds/cells/paper.js +109 -13
  94. package/lib/kinds/cells/path.d.ts +38 -0
  95. package/lib/kinds/cells/path.js +288 -0
  96. package/lib/kinds/cells/piece.d.ts +27 -7
  97. package/lib/kinds/cells/piece.js +202 -37
  98. package/lib/kinds/cells/polyomino.d.ts +45 -0
  99. package/lib/kinds/cells/polyomino.js +461 -0
  100. package/lib/kinds/cells/registry.js +35 -4
  101. package/lib/kinds/cells/schema.js +45 -4
  102. package/lib/kinds/cells/sheet.d.ts +20 -1
  103. package/lib/kinds/cells/sheet.js +84 -6
  104. package/lib/kinds/cells/side.d.ts +33 -0
  105. package/lib/kinds/cells/side.js +86 -0
  106. package/lib/kinds/cells/sieve.d.ts +26 -0
  107. package/lib/kinds/cells/sieve.js +208 -0
  108. package/lib/kinds/cells/step.d.ts +1 -1
  109. package/lib/kinds/cells/step.js +1 -1
  110. package/package.json +5 -1
@@ -0,0 +1,154 @@
1
+ {
2
+ "description": "The course's task grid-56-d4-1: a bar of 2 rows of 3 squares broken along its lines into two pieces of 3 squares, each holding together. Cuts along single sides; the goal counts the ways to cut the bar into 2 parts of as many cells, no side cut inside a part: 3, the task's key — the two rows, and the two corners. The sequence cuts the corner A1, B1, B2 off; a side cut already and a side on the edge are refused.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 2,
6
+ "cols": 3
7
+ },
8
+ "operations": {
9
+ "cut": {}
10
+ },
11
+ "goal": {
12
+ "cut_ways": {
13
+ "parts": 2
14
+ }
15
+ }
16
+ },
17
+ "seed": "0",
18
+ "start": {
19
+ "state": {
20
+ "marks": {},
21
+ "cut": []
22
+ },
23
+ "goal": false
24
+ },
25
+ "sequences": [
26
+ [
27
+ {
28
+ "move": {
29
+ "cut": {
30
+ "side": "v1:A"
31
+ }
32
+ },
33
+ "state": {
34
+ "marks": {},
35
+ "cut": ["v1:A"]
36
+ },
37
+ "goal": false
38
+ },
39
+ {
40
+ "move": {
41
+ "cut": {
42
+ "side": "v1:A"
43
+ }
44
+ },
45
+ "refused": "cut"
46
+ },
47
+ {
48
+ "move": {
49
+ "cut": {
50
+ "side": "h1:2"
51
+ }
52
+ },
53
+ "state": {
54
+ "marks": {},
55
+ "cut": ["v1:A", "h1:2"]
56
+ },
57
+ "goal": false
58
+ },
59
+ {
60
+ "move": {
61
+ "cut": {
62
+ "side": "v3:B"
63
+ }
64
+ },
65
+ "refused": "not-between"
66
+ },
67
+ {
68
+ "move": {
69
+ "cut": {
70
+ "side": "v2:B"
71
+ }
72
+ },
73
+ "state": {
74
+ "marks": {},
75
+ "cut": ["v1:A", "v2:B", "h1:2"]
76
+ },
77
+ "goal": true
78
+ }
79
+ ]
80
+ ],
81
+ "proof": {
82
+ "key": 3,
83
+ "asks": "count",
84
+ "witness": {
85
+ "paths": [
86
+ [
87
+ {
88
+ "cut": {
89
+ "side": "v1:A"
90
+ }
91
+ },
92
+ {
93
+ "cut": {
94
+ "side": "v2:B"
95
+ }
96
+ },
97
+ {
98
+ "cut": {
99
+ "side": "h1:2"
100
+ }
101
+ }
102
+ ],
103
+ [
104
+ {
105
+ "cut": {
106
+ "side": "v1:B"
107
+ }
108
+ },
109
+ {
110
+ "cut": {
111
+ "side": "v2:A"
112
+ }
113
+ },
114
+ {
115
+ "cut": {
116
+ "side": "h1:2"
117
+ }
118
+ }
119
+ ],
120
+ [
121
+ {
122
+ "cut": {
123
+ "side": "h1:1"
124
+ }
125
+ },
126
+ {
127
+ "cut": {
128
+ "side": "h1:2"
129
+ }
130
+ },
131
+ {
132
+ "cut": {
133
+ "side": "h1:3"
134
+ }
135
+ }
136
+ ]
137
+ ]
138
+ },
139
+ "ends": [
140
+ {
141
+ "marks": {},
142
+ "cut": ["v1:A", "v2:B", "h1:2"]
143
+ },
144
+ {
145
+ "marks": {},
146
+ "cut": ["v1:B", "v2:A", "h1:2"]
147
+ },
148
+ {
149
+ "marks": {},
150
+ "cut": ["h1:1", "h1:2", "h1:3"]
151
+ }
152
+ ]
153
+ }
154
+ }
@@ -0,0 +1,136 @@
1
+ {
2
+ "description": "The course's task grid-56-d4-2: a pond in the middle of 3 by 3 squares, a hole, and the 8 slabs round it shared 4 each, each gardener's joined by sides. Cuts along single sides; the goal counts the ways to cut the ring into 2 parts of 4 cells: 4, the task's key. The sequence cuts the ring between A1 and B1 and between B3 and C3; a side beside the pond is refused.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3,
7
+ "holes": ["B2"]
8
+ },
9
+ "operations": {
10
+ "cut": {}
11
+ },
12
+ "goal": {
13
+ "cut_ways": {
14
+ "parts": 2
15
+ }
16
+ }
17
+ },
18
+ "seed": "0",
19
+ "start": {
20
+ "state": {
21
+ "marks": {},
22
+ "cut": []
23
+ },
24
+ "goal": false
25
+ },
26
+ "sequences": [
27
+ [
28
+ {
29
+ "move": {
30
+ "cut": {
31
+ "side": "v1:B"
32
+ }
33
+ },
34
+ "refused": "beside-hole"
35
+ },
36
+ {
37
+ "move": {
38
+ "cut": {
39
+ "side": "h1:1"
40
+ }
41
+ },
42
+ "state": {
43
+ "marks": {},
44
+ "cut": ["h1:1"]
45
+ },
46
+ "goal": false
47
+ },
48
+ {
49
+ "move": {
50
+ "cut": {
51
+ "side": "h2:3"
52
+ }
53
+ },
54
+ "state": {
55
+ "marks": {},
56
+ "cut": ["h1:1", "h2:3"]
57
+ },
58
+ "goal": true
59
+ }
60
+ ]
61
+ ],
62
+ "proof": {
63
+ "key": 4,
64
+ "asks": "count",
65
+ "witness": {
66
+ "paths": [
67
+ [
68
+ {
69
+ "cut": {
70
+ "side": "v1:A"
71
+ }
72
+ },
73
+ {
74
+ "cut": {
75
+ "side": "v2:C"
76
+ }
77
+ }
78
+ ],
79
+ [
80
+ {
81
+ "cut": {
82
+ "side": "v1:C"
83
+ }
84
+ },
85
+ {
86
+ "cut": {
87
+ "side": "v2:A"
88
+ }
89
+ }
90
+ ],
91
+ [
92
+ {
93
+ "cut": {
94
+ "side": "h1:1"
95
+ }
96
+ },
97
+ {
98
+ "cut": {
99
+ "side": "h2:3"
100
+ }
101
+ }
102
+ ],
103
+ [
104
+ {
105
+ "cut": {
106
+ "side": "h1:3"
107
+ }
108
+ },
109
+ {
110
+ "cut": {
111
+ "side": "h2:1"
112
+ }
113
+ }
114
+ ]
115
+ ]
116
+ },
117
+ "ends": [
118
+ {
119
+ "marks": {},
120
+ "cut": ["v1:A", "v2:C"]
121
+ },
122
+ {
123
+ "marks": {},
124
+ "cut": ["v1:C", "v2:A"]
125
+ },
126
+ {
127
+ "marks": {},
128
+ "cut": ["h1:1", "h2:3"]
129
+ },
130
+ {
131
+ "marks": {},
132
+ "cut": ["h1:3", "h2:1"]
133
+ }
134
+ ]
135
+ }
136
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "description": "An invalid scene of cuts: a way to run a cut that is none, a mark on a node beside holes alone and on a side off the sheet, and a goal of ways into parts that do not divide the cells, beside paint. The kind names every error by its JSON Pointer and gives no state.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 2,
6
+ "cols": 2,
7
+ "holes": ["A1"],
8
+ "node_marks": {
9
+ "v0:h0": {
10
+ "color": "red"
11
+ }
12
+ },
13
+ "side_marks": {
14
+ "v3:A": {
15
+ "color": "blue"
16
+ }
17
+ }
18
+ },
19
+ "operations": {
20
+ "cut": {
21
+ "along": "edge"
22
+ },
23
+ "paint": {
24
+ "color": "red"
25
+ }
26
+ },
27
+ "goal": {
28
+ "cut_ways": {
29
+ "parts": 2
30
+ }
31
+ }
32
+ },
33
+ "seed": "0",
34
+ "sequences": [],
35
+ "proof": {
36
+ "undecided": "invalid",
37
+ "errors": [
38
+ {
39
+ "path": "/sheet/node_marks/v0:h0",
40
+ "message": "off the sheet, or beside holes alone: a mark on nothing"
41
+ },
42
+ {
43
+ "path": "/sheet/side_marks/v3:A",
44
+ "message": "off the sheet, or beside holes alone: a mark on nothing"
45
+ }
46
+ ]
47
+ }
48
+ }
@@ -0,0 +1,238 @@
1
+ {
2
+ "description": "The course's task grid-56-d3-2: a domino covers two squares of a 3 by 3 board that share a side, two placements different where they cover different squares. One domino; the goal counts the places it lies on: 12, the task's key. The sequence lays the domino across, lifts it and lays it standing up.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3
7
+ },
8
+ "operations": {
9
+ "polyomino": {
10
+ "shapes": [["A1", "A2"]],
11
+ "pieces": 1
12
+ }
13
+ },
14
+ "goal": {
15
+ "polyomino_placings": {}
16
+ }
17
+ },
18
+ "seed": "0",
19
+ "start": {
20
+ "state": {
21
+ "marks": {},
22
+ "polyomino": []
23
+ },
24
+ "goal": false
25
+ },
26
+ "sequences": [
27
+ [
28
+ {
29
+ "move": {
30
+ "polyomino": {
31
+ "lay": {
32
+ "cells": ["B2", "B3"]
33
+ }
34
+ }
35
+ },
36
+ "state": {
37
+ "marks": {},
38
+ "polyomino": [["B2", "B3"]]
39
+ },
40
+ "goal": true
41
+ },
42
+ {
43
+ "move": {
44
+ "polyomino": {
45
+ "lift": {
46
+ "cell": "B3"
47
+ }
48
+ }
49
+ },
50
+ "state": {
51
+ "marks": {},
52
+ "polyomino": []
53
+ },
54
+ "goal": false
55
+ },
56
+ {
57
+ "move": {
58
+ "polyomino": {
59
+ "lay": {
60
+ "cells": ["A1", "B1"]
61
+ }
62
+ }
63
+ },
64
+ "state": {
65
+ "marks": {},
66
+ "polyomino": [["A1", "B1"]]
67
+ },
68
+ "goal": true
69
+ }
70
+ ]
71
+ ],
72
+ "proof": {
73
+ "key": 12,
74
+ "asks": "count",
75
+ "witness": {
76
+ "paths": [
77
+ [
78
+ {
79
+ "polyomino": {
80
+ "lay": {
81
+ "cells": ["A1", "A2"]
82
+ }
83
+ }
84
+ }
85
+ ],
86
+ [
87
+ {
88
+ "polyomino": {
89
+ "lay": {
90
+ "cells": ["A1", "B1"]
91
+ }
92
+ }
93
+ }
94
+ ],
95
+ [
96
+ {
97
+ "polyomino": {
98
+ "lay": {
99
+ "cells": ["A2", "A3"]
100
+ }
101
+ }
102
+ }
103
+ ],
104
+ [
105
+ {
106
+ "polyomino": {
107
+ "lay": {
108
+ "cells": ["A2", "B2"]
109
+ }
110
+ }
111
+ }
112
+ ],
113
+ [
114
+ {
115
+ "polyomino": {
116
+ "lay": {
117
+ "cells": ["A3", "B3"]
118
+ }
119
+ }
120
+ }
121
+ ],
122
+ [
123
+ {
124
+ "polyomino": {
125
+ "lay": {
126
+ "cells": ["B1", "B2"]
127
+ }
128
+ }
129
+ }
130
+ ],
131
+ [
132
+ {
133
+ "polyomino": {
134
+ "lay": {
135
+ "cells": ["B1", "C1"]
136
+ }
137
+ }
138
+ }
139
+ ],
140
+ [
141
+ {
142
+ "polyomino": {
143
+ "lay": {
144
+ "cells": ["B2", "B3"]
145
+ }
146
+ }
147
+ }
148
+ ],
149
+ [
150
+ {
151
+ "polyomino": {
152
+ "lay": {
153
+ "cells": ["B2", "C2"]
154
+ }
155
+ }
156
+ }
157
+ ],
158
+ [
159
+ {
160
+ "polyomino": {
161
+ "lay": {
162
+ "cells": ["B3", "C3"]
163
+ }
164
+ }
165
+ }
166
+ ],
167
+ [
168
+ {
169
+ "polyomino": {
170
+ "lay": {
171
+ "cells": ["C1", "C2"]
172
+ }
173
+ }
174
+ }
175
+ ],
176
+ [
177
+ {
178
+ "polyomino": {
179
+ "lay": {
180
+ "cells": ["C2", "C3"]
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ ]
186
+ },
187
+ "ends": [
188
+ {
189
+ "marks": {},
190
+ "polyomino": [["A1", "A2"]]
191
+ },
192
+ {
193
+ "marks": {},
194
+ "polyomino": [["A1", "B1"]]
195
+ },
196
+ {
197
+ "marks": {},
198
+ "polyomino": [["A2", "A3"]]
199
+ },
200
+ {
201
+ "marks": {},
202
+ "polyomino": [["A2", "B2"]]
203
+ },
204
+ {
205
+ "marks": {},
206
+ "polyomino": [["A3", "B3"]]
207
+ },
208
+ {
209
+ "marks": {},
210
+ "polyomino": [["B1", "B2"]]
211
+ },
212
+ {
213
+ "marks": {},
214
+ "polyomino": [["B1", "C1"]]
215
+ },
216
+ {
217
+ "marks": {},
218
+ "polyomino": [["B2", "B3"]]
219
+ },
220
+ {
221
+ "marks": {},
222
+ "polyomino": [["B2", "C2"]]
223
+ },
224
+ {
225
+ "marks": {},
226
+ "polyomino": [["B3", "C3"]]
227
+ },
228
+ {
229
+ "marks": {},
230
+ "polyomino": [["C1", "C2"]]
231
+ },
232
+ {
233
+ "marks": {},
234
+ "polyomino": [["C2", "C3"]]
235
+ }
236
+ ]
237
+ }
238
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "description": "Dominoes on a whole board of 4 by 4, any number of them: 10,012 ways to lay them, past the kind's limit of states, so the scene does not decide and enters no module, as a board of 8 by 8 does not. The sequence lays two dominoes all the same.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 4,
6
+ "cols": 4
7
+ },
8
+ "operations": {
9
+ "polyomino": {
10
+ "shapes": [["A1", "A2"]]
11
+ }
12
+ },
13
+ "goal": {
14
+ "polyomino_most": {}
15
+ }
16
+ },
17
+ "seed": "0",
18
+ "start": {
19
+ "state": {
20
+ "marks": {},
21
+ "polyomino": []
22
+ },
23
+ "goal": true
24
+ },
25
+ "sequences": [
26
+ [
27
+ {
28
+ "move": {
29
+ "polyomino": {
30
+ "lay": {
31
+ "cells": ["A1", "A2"]
32
+ }
33
+ }
34
+ },
35
+ "state": {
36
+ "marks": {},
37
+ "polyomino": [["A1", "A2"]]
38
+ },
39
+ "goal": true
40
+ },
41
+ {
42
+ "move": {
43
+ "polyomino": {
44
+ "lay": {
45
+ "cells": ["B1", "C1"]
46
+ }
47
+ }
48
+ },
49
+ "state": {
50
+ "marks": {},
51
+ "polyomino": [["A1", "A2"], ["B1", "C1"]]
52
+ },
53
+ "goal": true
54
+ }
55
+ ]
56
+ ],
57
+ "proof": {
58
+ "undecided": "limit"
59
+ }
60
+ }