@altnovatrail/widgets 0.2.0 → 0.2.1

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 (62) hide show
  1. package/README.md +1 -1
  2. package/kinds/line/line.handles.json +195 -0
  3. package/kinds/line/line.schema.json +321 -0
  4. package/kinds/line/vectors/cases.json +213 -0
  5. package/kinds/line/vectors/gaps-12-d1-1.json +140 -0
  6. package/kinds/line/vectors/gaps-12-d1-2.json +95 -0
  7. package/kinds/line/vectors/gaps-12-d1-3.json +122 -0
  8. package/kinds/line/vectors/gaps-12-d1-4.json +121 -0
  9. package/kinds/line/vectors/gaps-12-d1-5.json +87 -0
  10. package/kinds/line/vectors/gaps-12-d2-1.json +173 -0
  11. package/kinds/line/vectors/gaps-12-d2-6.json +87 -0
  12. package/kinds/line/vectors/gaps-12-d3-2.json +173 -0
  13. package/kinds/line/vectors/gaps-12-d4-4.json +168 -0
  14. package/kinds/line/vectors/gaps-12-d5-3.json +99 -0
  15. package/kinds/line/vectors/gaps-12-d5-4.json +215 -0
  16. package/kinds/line/vectors/gaps-34-d1-1.json +37 -0
  17. package/kinds/line/vectors/gaps-34-d1-2.json +130 -0
  18. package/kinds/line/vectors/gaps-34-d1-4.json +155 -0
  19. package/kinds/line/vectors/gaps-34-d1-5.json +43 -0
  20. package/kinds/line/vectors/gaps-34-d3-2.json +38 -0
  21. package/kinds/line/vectors/gaps-34-d3-5.json +177 -0
  22. package/kinds/line/vectors/gaps-34-d5-3.json +39 -0
  23. package/kinds/line/vectors/invalid-line.json +34 -0
  24. package/kinds/line/vectors/invalid-ring.json +34 -0
  25. package/kinds/line/vectors/invalid.json +43 -0
  26. package/kinds/line/vectors/jump-unreachable.json +104 -0
  27. package/kinds/line/vectors/limit.json +40 -0
  28. package/kinds/line/vectors/op-not-in-scene.json +47 -0
  29. package/kinds/line/vectors/ring-cut.json +104 -0
  30. package/kinds/line/vectors/ring-every.json +107 -0
  31. package/kinds/line/vectors/ring-jump.json +135 -0
  32. package/lib/cores/arith.d.ts +62 -0
  33. package/lib/cores/arith.js +197 -0
  34. package/lib/cores/kind.d.ts +10 -0
  35. package/lib/cores/registry.d.ts +43 -0
  36. package/lib/cores/registry.js +87 -0
  37. package/lib/cores/search.js +36 -8
  38. package/lib/kinds/cells/kind.js +11 -64
  39. package/lib/kinds/cells/operation.d.ts +6 -0
  40. package/lib/kinds/cells/polyomino.d.ts +14 -0
  41. package/lib/kinds/cells/polyomino.js +100 -24
  42. package/lib/kinds/line/cut.d.ts +2 -0
  43. package/lib/kinds/line/cut.js +63 -0
  44. package/lib/kinds/line/goals.d.ts +22 -0
  45. package/lib/kinds/line/goals.js +137 -0
  46. package/lib/kinds/line/index.d.ts +13 -0
  47. package/lib/kinds/line/index.js +17 -0
  48. package/lib/kinds/line/jump.d.ts +10 -0
  49. package/lib/kinds/line/jump.js +95 -0
  50. package/lib/kinds/line/kind.d.ts +25 -0
  51. package/lib/kinds/line/kind.js +125 -0
  52. package/lib/kinds/line/line.d.ts +63 -0
  53. package/lib/kinds/line/line.js +157 -0
  54. package/lib/kinds/line/operation.d.ts +69 -0
  55. package/lib/kinds/line/operation.js +1 -0
  56. package/lib/kinds/line/posts.d.ts +11 -0
  57. package/lib/kinds/line/posts.js +85 -0
  58. package/lib/kinds/line/registry.d.ts +2 -0
  59. package/lib/kinds/line/registry.js +11 -0
  60. package/lib/kinds/line/schema.d.ts +4 -0
  61. package/lib/kinds/line/schema.js +157 -0
  62. package/package.json +9 -2
@@ -0,0 +1,87 @@
1
+ {
2
+ "description": "The task gaps-12-d1-5, on an upright line: Anna walks up from floor 1 to floor 4; how many times does she go up one floor? The fewest jumps of one floor, 3.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 4,
6
+ "first": 1,
7
+ "vertical": true
8
+ },
9
+ "operations": {
10
+ "jump": {
11
+ "from": 1,
12
+ "step": 1
13
+ }
14
+ },
15
+ "goal": {
16
+ "counters": {
17
+ "is": {
18
+ "at": 4
19
+ }
20
+ }
21
+ }
22
+ },
23
+ "seed": "0",
24
+ "start": {
25
+ "state": {
26
+ "posts": [],
27
+ "at": 1
28
+ },
29
+ "goal": false
30
+ },
31
+ "sequences": [
32
+ [
33
+ {
34
+ "move": {
35
+ "jump": "forward"
36
+ },
37
+ "state": {
38
+ "posts": [],
39
+ "at": 2
40
+ },
41
+ "goal": false
42
+ },
43
+ {
44
+ "move": {
45
+ "jump": "forward"
46
+ },
47
+ "state": {
48
+ "posts": [],
49
+ "at": 3
50
+ },
51
+ "goal": false
52
+ },
53
+ {
54
+ "move": {
55
+ "jump": "forward"
56
+ },
57
+ "state": {
58
+ "posts": [],
59
+ "at": 4
60
+ },
61
+ "goal": true
62
+ }
63
+ ]
64
+ ],
65
+ "proof": {
66
+ "key": 3,
67
+ "witness": {
68
+ "path": [
69
+ {
70
+ "jump": "forward"
71
+ },
72
+ {
73
+ "jump": "forward"
74
+ },
75
+ {
76
+ "jump": "forward"
77
+ }
78
+ ]
79
+ },
80
+ "ends": [
81
+ {
82
+ "posts": [],
83
+ "at": 4
84
+ }
85
+ ]
86
+ }
87
+ }
@@ -0,0 +1,173 @@
1
+ {
2
+ "description": "The task gaps-12-d2-1 of the lesson counting-gaps-grades-1-2: a fence has 8 posts, each 2 metres from the next; how many metres from the first post to the last? The places are 2 metres apart, and the key is the length of the fence of 8 posts, 14 metres, not the 16 of a gap for every post.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 8,
6
+ "first": 1,
7
+ "spacing": 2
8
+ },
9
+ "operations": {
10
+ "post": {}
11
+ },
12
+ "goal": {
13
+ "counters": {
14
+ "is": {
15
+ "posts": 8
16
+ },
17
+ "max": "length"
18
+ }
19
+ }
20
+ },
21
+ "seed": "0",
22
+ "start": {
23
+ "state": {
24
+ "posts": []
25
+ },
26
+ "goal": false
27
+ },
28
+ "sequences": [
29
+ [
30
+ {
31
+ "move": {
32
+ "post": {
33
+ "at": 1
34
+ }
35
+ },
36
+ "state": {
37
+ "posts": [1]
38
+ },
39
+ "goal": false
40
+ },
41
+ {
42
+ "move": {
43
+ "post": {
44
+ "at": 2
45
+ }
46
+ },
47
+ "state": {
48
+ "posts": [1, 2]
49
+ },
50
+ "goal": false
51
+ },
52
+ {
53
+ "move": {
54
+ "post": {
55
+ "at": 3
56
+ }
57
+ },
58
+ "state": {
59
+ "posts": [1, 2, 3]
60
+ },
61
+ "goal": false
62
+ },
63
+ {
64
+ "move": {
65
+ "post": {
66
+ "at": 4
67
+ }
68
+ },
69
+ "state": {
70
+ "posts": [1, 2, 3, 4]
71
+ },
72
+ "goal": false
73
+ },
74
+ {
75
+ "move": {
76
+ "post": {
77
+ "at": 5
78
+ }
79
+ },
80
+ "state": {
81
+ "posts": [1, 2, 3, 4, 5]
82
+ },
83
+ "goal": false
84
+ },
85
+ {
86
+ "move": {
87
+ "post": {
88
+ "at": 6
89
+ }
90
+ },
91
+ "state": {
92
+ "posts": [1, 2, 3, 4, 5, 6]
93
+ },
94
+ "goal": false
95
+ },
96
+ {
97
+ "move": {
98
+ "post": {
99
+ "at": 7
100
+ }
101
+ },
102
+ "state": {
103
+ "posts": [1, 2, 3, 4, 5, 6, 7]
104
+ },
105
+ "goal": false
106
+ },
107
+ {
108
+ "move": {
109
+ "post": {
110
+ "at": 8
111
+ }
112
+ },
113
+ "state": {
114
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
115
+ },
116
+ "goal": true
117
+ }
118
+ ]
119
+ ],
120
+ "proof": {
121
+ "key": 14,
122
+ "asks": "max",
123
+ "witness": {
124
+ "path": [
125
+ {
126
+ "post": {
127
+ "at": 1
128
+ }
129
+ },
130
+ {
131
+ "post": {
132
+ "at": 2
133
+ }
134
+ },
135
+ {
136
+ "post": {
137
+ "at": 3
138
+ }
139
+ },
140
+ {
141
+ "post": {
142
+ "at": 4
143
+ }
144
+ },
145
+ {
146
+ "post": {
147
+ "at": 5
148
+ }
149
+ },
150
+ {
151
+ "post": {
152
+ "at": 6
153
+ }
154
+ },
155
+ {
156
+ "post": {
157
+ "at": 7
158
+ }
159
+ },
160
+ {
161
+ "post": {
162
+ "at": 8
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ "ends": [
168
+ {
169
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
170
+ }
171
+ ]
172
+ }
173
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "description": "The task gaps-12-d2-6, on an upright line: a frog jumps 3 steps at a time up 9 steps from the floor, step 0; how many jumps to the top step? The fewest jumps, 3.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 10,
6
+ "first": 0,
7
+ "vertical": true
8
+ },
9
+ "operations": {
10
+ "jump": {
11
+ "from": 0,
12
+ "step": 3
13
+ }
14
+ },
15
+ "goal": {
16
+ "counters": {
17
+ "is": {
18
+ "at": 9
19
+ }
20
+ }
21
+ }
22
+ },
23
+ "seed": "0",
24
+ "start": {
25
+ "state": {
26
+ "posts": [],
27
+ "at": 0
28
+ },
29
+ "goal": false
30
+ },
31
+ "sequences": [
32
+ [
33
+ {
34
+ "move": {
35
+ "jump": "forward"
36
+ },
37
+ "state": {
38
+ "posts": [],
39
+ "at": 3
40
+ },
41
+ "goal": false
42
+ },
43
+ {
44
+ "move": {
45
+ "jump": "forward"
46
+ },
47
+ "state": {
48
+ "posts": [],
49
+ "at": 6
50
+ },
51
+ "goal": false
52
+ },
53
+ {
54
+ "move": {
55
+ "jump": "forward"
56
+ },
57
+ "state": {
58
+ "posts": [],
59
+ "at": 9
60
+ },
61
+ "goal": true
62
+ }
63
+ ]
64
+ ],
65
+ "proof": {
66
+ "key": 3,
67
+ "witness": {
68
+ "path": [
69
+ {
70
+ "jump": "forward"
71
+ },
72
+ {
73
+ "jump": "forward"
74
+ },
75
+ {
76
+ "jump": "forward"
77
+ }
78
+ ]
79
+ },
80
+ "ends": [
81
+ {
82
+ "posts": [],
83
+ "at": 9
84
+ }
85
+ ]
86
+ }
87
+ }
@@ -0,0 +1,173 @@
1
+ {
2
+ "description": "The task gaps-12-d3-2: 8 rose bushes grow round a round flowerbed; how many gaps are there between neighbouring bushes? On a ring of eight places the learner plants a bush on each, and the key is the gaps of a ring of eight bushes, 8: as many as the bushes, the last next to the first.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 8,
6
+ "first": 1,
7
+ "closed": true
8
+ },
9
+ "operations": {
10
+ "post": {}
11
+ },
12
+ "goal": {
13
+ "counters": {
14
+ "is": {
15
+ "posts": 8
16
+ },
17
+ "max": "gaps"
18
+ }
19
+ }
20
+ },
21
+ "seed": "0",
22
+ "start": {
23
+ "state": {
24
+ "posts": []
25
+ },
26
+ "goal": false
27
+ },
28
+ "sequences": [
29
+ [
30
+ {
31
+ "move": {
32
+ "post": {
33
+ "at": 1
34
+ }
35
+ },
36
+ "state": {
37
+ "posts": [1]
38
+ },
39
+ "goal": false
40
+ },
41
+ {
42
+ "move": {
43
+ "post": {
44
+ "at": 2
45
+ }
46
+ },
47
+ "state": {
48
+ "posts": [1, 2]
49
+ },
50
+ "goal": false
51
+ },
52
+ {
53
+ "move": {
54
+ "post": {
55
+ "at": 3
56
+ }
57
+ },
58
+ "state": {
59
+ "posts": [1, 2, 3]
60
+ },
61
+ "goal": false
62
+ },
63
+ {
64
+ "move": {
65
+ "post": {
66
+ "at": 4
67
+ }
68
+ },
69
+ "state": {
70
+ "posts": [1, 2, 3, 4]
71
+ },
72
+ "goal": false
73
+ },
74
+ {
75
+ "move": {
76
+ "post": {
77
+ "at": 5
78
+ }
79
+ },
80
+ "state": {
81
+ "posts": [1, 2, 3, 4, 5]
82
+ },
83
+ "goal": false
84
+ },
85
+ {
86
+ "move": {
87
+ "post": {
88
+ "at": 6
89
+ }
90
+ },
91
+ "state": {
92
+ "posts": [1, 2, 3, 4, 5, 6]
93
+ },
94
+ "goal": false
95
+ },
96
+ {
97
+ "move": {
98
+ "post": {
99
+ "at": 7
100
+ }
101
+ },
102
+ "state": {
103
+ "posts": [1, 2, 3, 4, 5, 6, 7]
104
+ },
105
+ "goal": false
106
+ },
107
+ {
108
+ "move": {
109
+ "post": {
110
+ "at": 8
111
+ }
112
+ },
113
+ "state": {
114
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
115
+ },
116
+ "goal": true
117
+ }
118
+ ]
119
+ ],
120
+ "proof": {
121
+ "key": 8,
122
+ "asks": "max",
123
+ "witness": {
124
+ "path": [
125
+ {
126
+ "post": {
127
+ "at": 1
128
+ }
129
+ },
130
+ {
131
+ "post": {
132
+ "at": 2
133
+ }
134
+ },
135
+ {
136
+ "post": {
137
+ "at": 3
138
+ }
139
+ },
140
+ {
141
+ "post": {
142
+ "at": 4
143
+ }
144
+ },
145
+ {
146
+ "post": {
147
+ "at": 5
148
+ }
149
+ },
150
+ {
151
+ "post": {
152
+ "at": 6
153
+ }
154
+ },
155
+ {
156
+ "post": {
157
+ "at": 7
158
+ }
159
+ },
160
+ {
161
+ "post": {
162
+ "at": 8
163
+ }
164
+ }
165
+ ]
166
+ },
167
+ "ends": [
168
+ {
169
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
170
+ }
171
+ ]
172
+ }
173
+ }
@@ -0,0 +1,168 @@
1
+ {
2
+ "description": "The task gaps-12-d4-4: bushes along the sides of a square flowerbed, a bush in every corner and three on each side, the corners counted; how many bushes? A square ring of four sides of two gaps each, eight places, and the fewest bushes that fill every place, 8.",
3
+ "scene": {
4
+ "line": {
5
+ "places": 8,
6
+ "first": 1,
7
+ "closed": true,
8
+ "sides": [2, 2, 2, 2]
9
+ },
10
+ "operations": {
11
+ "post": {}
12
+ },
13
+ "goal": {
14
+ "every": {}
15
+ }
16
+ },
17
+ "seed": "0",
18
+ "start": {
19
+ "state": {
20
+ "posts": []
21
+ },
22
+ "goal": false
23
+ },
24
+ "sequences": [
25
+ [
26
+ {
27
+ "move": {
28
+ "post": {
29
+ "at": 1
30
+ }
31
+ },
32
+ "state": {
33
+ "posts": [1]
34
+ },
35
+ "goal": false
36
+ },
37
+ {
38
+ "move": {
39
+ "post": {
40
+ "at": 3
41
+ }
42
+ },
43
+ "state": {
44
+ "posts": [1, 3]
45
+ },
46
+ "goal": false
47
+ },
48
+ {
49
+ "move": {
50
+ "post": {
51
+ "at": 5
52
+ }
53
+ },
54
+ "state": {
55
+ "posts": [1, 3, 5]
56
+ },
57
+ "goal": false
58
+ },
59
+ {
60
+ "move": {
61
+ "post": {
62
+ "at": 7
63
+ }
64
+ },
65
+ "state": {
66
+ "posts": [1, 3, 5, 7]
67
+ },
68
+ "goal": false
69
+ },
70
+ {
71
+ "move": {
72
+ "post": {
73
+ "at": 2
74
+ }
75
+ },
76
+ "state": {
77
+ "posts": [1, 2, 3, 5, 7]
78
+ },
79
+ "goal": false
80
+ },
81
+ {
82
+ "move": {
83
+ "post": {
84
+ "at": 4
85
+ }
86
+ },
87
+ "state": {
88
+ "posts": [1, 2, 3, 4, 5, 7]
89
+ },
90
+ "goal": false
91
+ },
92
+ {
93
+ "move": {
94
+ "post": {
95
+ "at": 6
96
+ }
97
+ },
98
+ "state": {
99
+ "posts": [1, 2, 3, 4, 5, 6, 7]
100
+ },
101
+ "goal": false
102
+ },
103
+ {
104
+ "move": {
105
+ "post": {
106
+ "at": 8
107
+ }
108
+ },
109
+ "state": {
110
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
111
+ },
112
+ "goal": true
113
+ }
114
+ ]
115
+ ],
116
+ "proof": {
117
+ "key": 8,
118
+ "witness": {
119
+ "path": [
120
+ {
121
+ "post": {
122
+ "at": 1
123
+ }
124
+ },
125
+ {
126
+ "post": {
127
+ "at": 2
128
+ }
129
+ },
130
+ {
131
+ "post": {
132
+ "at": 3
133
+ }
134
+ },
135
+ {
136
+ "post": {
137
+ "at": 4
138
+ }
139
+ },
140
+ {
141
+ "post": {
142
+ "at": 5
143
+ }
144
+ },
145
+ {
146
+ "post": {
147
+ "at": 6
148
+ }
149
+ },
150
+ {
151
+ "post": {
152
+ "at": 7
153
+ }
154
+ },
155
+ {
156
+ "post": {
157
+ "at": 8
158
+ }
159
+ }
160
+ ]
161
+ },
162
+ "ends": [
163
+ {
164
+ "posts": [1, 2, 3, 4, 5, 6, 7, 8]
165
+ }
166
+ ]
167
+ }
168
+ }