@altnovatrail/widgets 0.1.1 → 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,194 @@
1
+ {
2
+ "description": "The course's task par-56-d3-2: a board of 4 by 4 squares with two opposite corners cut off, A1 and D4, and dominoes that cover two squares sharing a side. The goal asks the most dominoes on the board at once, without overlapping: 6, the task's key. The sequence lays two dominoes along each middle row and one along each outer row; a domino on a cut corner is refused.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 4,
6
+ "cols": 4,
7
+ "holes": ["A1", "D4"]
8
+ },
9
+ "operations": {
10
+ "polyomino": {
11
+ "shapes": [["A1", "A2"]]
12
+ }
13
+ },
14
+ "goal": {
15
+ "polyomino_most": {}
16
+ }
17
+ },
18
+ "seed": "0",
19
+ "start": {
20
+ "state": {
21
+ "marks": {},
22
+ "polyomino": []
23
+ },
24
+ "goal": true
25
+ },
26
+ "sequences": [
27
+ [
28
+ {
29
+ "move": {
30
+ "polyomino": {
31
+ "lay": {
32
+ "cells": ["A1", "A2"]
33
+ }
34
+ }
35
+ },
36
+ "refused": "hole"
37
+ },
38
+ {
39
+ "move": {
40
+ "polyomino": {
41
+ "lay": {
42
+ "cells": ["A2", "A3"]
43
+ }
44
+ }
45
+ },
46
+ "state": {
47
+ "marks": {},
48
+ "polyomino": [["A2", "A3"]]
49
+ },
50
+ "goal": true
51
+ },
52
+ {
53
+ "move": {
54
+ "polyomino": {
55
+ "lay": {
56
+ "cells": ["B1", "B2"]
57
+ }
58
+ }
59
+ },
60
+ "state": {
61
+ "marks": {},
62
+ "polyomino": [["A2", "A3"], ["B1", "B2"]]
63
+ },
64
+ "goal": true
65
+ },
66
+ {
67
+ "move": {
68
+ "polyomino": {
69
+ "lay": {
70
+ "cells": ["B3", "B4"]
71
+ }
72
+ }
73
+ },
74
+ "state": {
75
+ "marks": {},
76
+ "polyomino": [["A2", "A3"], ["B1", "B2"], ["B3", "B4"]]
77
+ },
78
+ "goal": true
79
+ },
80
+ {
81
+ "move": {
82
+ "polyomino": {
83
+ "lay": {
84
+ "cells": ["C1", "C2"]
85
+ }
86
+ }
87
+ },
88
+ "state": {
89
+ "marks": {},
90
+ "polyomino": [["A2", "A3"], ["B1", "B2"], ["B3", "B4"], ["C1", "C2"]]
91
+ },
92
+ "goal": true
93
+ },
94
+ {
95
+ "move": {
96
+ "polyomino": {
97
+ "lay": {
98
+ "cells": ["C3", "C4"]
99
+ }
100
+ }
101
+ },
102
+ "state": {
103
+ "marks": {},
104
+ "polyomino": [["A2", "A3"], ["B1", "B2"], ["B3", "B4"], ["C1", "C2"], ["C3", "C4"]]
105
+ },
106
+ "goal": true
107
+ },
108
+ {
109
+ "move": {
110
+ "polyomino": {
111
+ "lay": {
112
+ "cells": ["D2", "D3"]
113
+ }
114
+ }
115
+ },
116
+ "state": {
117
+ "marks": {},
118
+ "polyomino": [
119
+ ["A2", "A3"],
120
+ ["B1", "B2"],
121
+ ["B3", "B4"],
122
+ ["C1", "C2"],
123
+ ["C3", "C4"],
124
+ ["D2", "D3"]
125
+ ]
126
+ },
127
+ "goal": true
128
+ }
129
+ ]
130
+ ],
131
+ "proof": {
132
+ "key": 6,
133
+ "asks": "max",
134
+ "witness": {
135
+ "path": [
136
+ {
137
+ "polyomino": {
138
+ "lay": {
139
+ "cells": ["A2", "A3"]
140
+ }
141
+ }
142
+ },
143
+ {
144
+ "polyomino": {
145
+ "lay": {
146
+ "cells": ["A4", "B4"]
147
+ }
148
+ }
149
+ },
150
+ {
151
+ "polyomino": {
152
+ "lay": {
153
+ "cells": ["B1", "B2"]
154
+ }
155
+ }
156
+ },
157
+ {
158
+ "polyomino": {
159
+ "lay": {
160
+ "cells": ["B3", "C3"]
161
+ }
162
+ }
163
+ },
164
+ {
165
+ "polyomino": {
166
+ "lay": {
167
+ "cells": ["C1", "C2"]
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "polyomino": {
173
+ "lay": {
174
+ "cells": ["D1", "D2"]
175
+ }
176
+ }
177
+ }
178
+ ]
179
+ },
180
+ "ends": [
181
+ {
182
+ "marks": {},
183
+ "polyomino": [
184
+ ["A2", "A3"],
185
+ ["A4", "B4"],
186
+ ["B1", "B2"],
187
+ ["B3", "C3"],
188
+ ["C1", "C2"],
189
+ ["D1", "D2"]
190
+ ]
191
+ }
192
+ ]
193
+ }
194
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "description": "The course's task par-56-d4-3: a bug on every square of 3 by 3, each crawling at once to a square that shares a side with its own, and the fewest squares left empty. Dominoes laid on the board pair the bugs: the two bugs of a domino swap squares, a bug on a square no domino covers crawls to any neighbour, and its own square may stay empty; by the colours of a chessboard no way leaves fewer empty squares than the fewest cells the dominoes leave uncovered. The goal asks that fewest: 1, the task's key, the centre alone. The sequence lays four dominoes round the edge.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 3,
6
+ "cols": 3
7
+ },
8
+ "operations": {
9
+ "polyomino": {
10
+ "shapes": [["A1", "A2"]]
11
+ }
12
+ },
13
+ "goal": {
14
+ "polyomino_empty": {}
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": ["A3", "B3"]
46
+ }
47
+ }
48
+ },
49
+ "state": {
50
+ "marks": {},
51
+ "polyomino": [["A1", "A2"], ["A3", "B3"]]
52
+ },
53
+ "goal": true
54
+ },
55
+ {
56
+ "move": {
57
+ "polyomino": {
58
+ "lay": {
59
+ "cells": ["C3", "C2"]
60
+ }
61
+ }
62
+ },
63
+ "state": {
64
+ "marks": {},
65
+ "polyomino": [["A1", "A2"], ["A3", "B3"], ["C2", "C3"]]
66
+ },
67
+ "goal": true
68
+ },
69
+ {
70
+ "move": {
71
+ "polyomino": {
72
+ "lay": {
73
+ "cells": ["C1", "B1"]
74
+ }
75
+ }
76
+ },
77
+ "state": {
78
+ "marks": {},
79
+ "polyomino": [["A1", "A2"], ["A3", "B3"], ["B1", "C1"], ["C2", "C3"]]
80
+ },
81
+ "goal": true
82
+ }
83
+ ]
84
+ ],
85
+ "proof": {
86
+ "key": 1,
87
+ "asks": "min",
88
+ "witness": {
89
+ "path": [
90
+ {
91
+ "polyomino": {
92
+ "lay": {
93
+ "cells": ["A1", "A2"]
94
+ }
95
+ }
96
+ },
97
+ {
98
+ "polyomino": {
99
+ "lay": {
100
+ "cells": ["A3", "B3"]
101
+ }
102
+ }
103
+ },
104
+ {
105
+ "polyomino": {
106
+ "lay": {
107
+ "cells": ["B1", "B2"]
108
+ }
109
+ }
110
+ },
111
+ {
112
+ "polyomino": {
113
+ "lay": {
114
+ "cells": ["C1", "C2"]
115
+ }
116
+ }
117
+ }
118
+ ]
119
+ },
120
+ "ends": [
121
+ {
122
+ "marks": {},
123
+ "polyomino": [["A1", "A2"], ["A3", "B3"], ["B1", "B2"], ["C1", "C2"]]
124
+ }
125
+ ]
126
+ }
127
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "description": "A figure that is not one: two red cells of a sheet of 2 by 3, A1 and B3, that share no side. No state meets the goal of a perimeter, so the key is that it cannot be reached, the scene's one state its graph.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 2,
6
+ "cols": 3,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "red"
10
+ },
11
+ "B3": {
12
+ "color": "red",
13
+ "number": 2
14
+ }
15
+ }
16
+ },
17
+ "operations": {},
18
+ "goal": {
19
+ "perimeter": {
20
+ "color": "red"
21
+ }
22
+ }
23
+ },
24
+ "seed": "0",
25
+ "start": {
26
+ "state": {
27
+ "marks": {
28
+ "A1": {
29
+ "color": "red"
30
+ },
31
+ "B3": {
32
+ "color": "red",
33
+ "number": 2
34
+ }
35
+ }
36
+ },
37
+ "goal": false
38
+ },
39
+ "sequences": [],
40
+ "proof": {
41
+ "key": "unreachable",
42
+ "witness": {
43
+ "layers": [1]
44
+ },
45
+ "ends": []
46
+ }
47
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "description": "A sheet of 12 by 12 with A1 painted, folded along its middle line and along a line beside the middle, whose tab is left out wherever the tabs would crowd: then a drag across it or its button folds it. The scene has no goal.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 12,
6
+ "cols": 12,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "red"
10
+ }
11
+ }
12
+ },
13
+ "operations": {
14
+ "fold": {
15
+ "color": "red"
16
+ }
17
+ }
18
+ },
19
+ "seed": "0",
20
+ "start": {
21
+ "state": {
22
+ "marks": {
23
+ "A1": {
24
+ "color": "red"
25
+ }
26
+ }
27
+ },
28
+ "goal": false
29
+ },
30
+ "sequences": [
31
+ [
32
+ {
33
+ "move": {
34
+ "fold": {
35
+ "line": "v6"
36
+ }
37
+ },
38
+ "state": {
39
+ "marks": {
40
+ "A1": {
41
+ "color": "red"
42
+ },
43
+ "A12": {
44
+ "color": "red"
45
+ }
46
+ }
47
+ },
48
+ "goal": false
49
+ },
50
+ {
51
+ "move": {
52
+ "fold": {
53
+ "line": "h5"
54
+ }
55
+ },
56
+ "state": {
57
+ "marks": {
58
+ "A1": {
59
+ "color": "red"
60
+ },
61
+ "A12": {
62
+ "color": "red"
63
+ },
64
+ "J1": {
65
+ "color": "red"
66
+ },
67
+ "J12": {
68
+ "color": "red"
69
+ }
70
+ }
71
+ },
72
+ "goal": false
73
+ }
74
+ ]
75
+ ],
76
+ "proof": {
77
+ "undecided": "limit"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "description": "A sheet of 14 by 14 with A1 painted, folded along its middle line and along a line beside the middle, whose tab is left out wherever the tabs would crowd: then a drag across it or its button folds it. The scene has no goal.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 14,
6
+ "cols": 14,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "red"
10
+ }
11
+ }
12
+ },
13
+ "operations": {
14
+ "fold": {
15
+ "color": "red"
16
+ }
17
+ }
18
+ },
19
+ "seed": "0",
20
+ "start": {
21
+ "state": {
22
+ "marks": {
23
+ "A1": {
24
+ "color": "red"
25
+ }
26
+ }
27
+ },
28
+ "goal": false
29
+ },
30
+ "sequences": [
31
+ [
32
+ {
33
+ "move": {
34
+ "fold": {
35
+ "line": "v7"
36
+ }
37
+ },
38
+ "state": {
39
+ "marks": {
40
+ "A1": {
41
+ "color": "red"
42
+ },
43
+ "A14": {
44
+ "color": "red"
45
+ }
46
+ }
47
+ },
48
+ "goal": false
49
+ },
50
+ {
51
+ "move": {
52
+ "fold": {
53
+ "line": "h6"
54
+ }
55
+ },
56
+ "state": {
57
+ "marks": {
58
+ "A1": {
59
+ "color": "red"
60
+ },
61
+ "A14": {
62
+ "color": "red"
63
+ },
64
+ "L1": {
65
+ "color": "red"
66
+ },
67
+ "L14": {
68
+ "color": "red"
69
+ }
70
+ }
71
+ },
72
+ "goal": false
73
+ }
74
+ ]
75
+ ],
76
+ "proof": {
77
+ "undecided": "limit"
78
+ }
79
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "description": "The largest sheet, 26 by 26, with A1 painted, folded along its middle line and along a line beside the middle, whose tab is left out wherever the tabs would crowd: then a drag across it or its button folds it. The scene has no goal.",
3
+ "scene": {
4
+ "sheet": {
5
+ "rows": 26,
6
+ "cols": 26,
7
+ "marks": {
8
+ "A1": {
9
+ "color": "red"
10
+ }
11
+ }
12
+ },
13
+ "operations": {
14
+ "fold": {
15
+ "color": "red"
16
+ }
17
+ }
18
+ },
19
+ "seed": "0",
20
+ "start": {
21
+ "state": {
22
+ "marks": {
23
+ "A1": {
24
+ "color": "red"
25
+ }
26
+ }
27
+ },
28
+ "goal": false
29
+ },
30
+ "sequences": [
31
+ [
32
+ {
33
+ "move": {
34
+ "fold": {
35
+ "line": "v13"
36
+ }
37
+ },
38
+ "state": {
39
+ "marks": {
40
+ "A1": {
41
+ "color": "red"
42
+ },
43
+ "A26": {
44
+ "color": "red"
45
+ }
46
+ }
47
+ },
48
+ "goal": false
49
+ },
50
+ {
51
+ "move": {
52
+ "fold": {
53
+ "line": "h12"
54
+ }
55
+ },
56
+ "state": {
57
+ "marks": {
58
+ "A1": {
59
+ "color": "red"
60
+ },
61
+ "A26": {
62
+ "color": "red"
63
+ },
64
+ "X1": {
65
+ "color": "red"
66
+ },
67
+ "X26": {
68
+ "color": "red"
69
+ }
70
+ }
71
+ },
72
+ "goal": false
73
+ }
74
+ ]
75
+ ],
76
+ "proof": {
77
+ "undecided": "limit"
78
+ }
79
+ }