chess-moments 0.12.1 → 0.14.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.
- package/functions/index.js +0 -2
- package/functions/shape.js +2 -2
- package/index.js +8 -0
- package/package.json +1 -1
- package/functions/brush.js +0 -9
package/functions/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const brush = require('./brush');
|
|
2
1
|
const fen = require('./fen');
|
|
3
2
|
const flat = require('./flat');
|
|
4
3
|
const lines = require('./lines');
|
|
@@ -13,7 +12,6 @@ const train = require('./train');
|
|
|
13
12
|
const tree = require('./tree');
|
|
14
13
|
|
|
15
14
|
module.exports = {
|
|
16
|
-
brush,
|
|
17
15
|
fen,
|
|
18
16
|
flat,
|
|
19
17
|
lines,
|
package/functions/shape.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const { getBrushColor } = require('./helpers');
|
|
2
2
|
|
|
3
3
|
module.exports = (comment) => {
|
|
4
4
|
try {
|
|
@@ -16,7 +16,7 @@ module.exports = (comment) => {
|
|
|
16
16
|
|
|
17
17
|
for (const target of shapes.join('').split(',')) {
|
|
18
18
|
draw.push({
|
|
19
|
-
brush:
|
|
19
|
+
brush: getBrushColor(target.substr(0, 1)),
|
|
20
20
|
orig: target.substr(1, 2),
|
|
21
21
|
dest: target.substr(3, 2),
|
|
22
22
|
});
|
package/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
const { fen, pgn, flat, train, tree } = require('./functions');
|
|
2
|
+
const {
|
|
3
|
+
getNextMoments,
|
|
4
|
+
getPrevMoment,
|
|
5
|
+
momentsToPgn,
|
|
6
|
+
} = require('./functions/extras');
|
|
2
7
|
|
|
3
8
|
module.exports = {
|
|
4
9
|
fen,
|
|
@@ -6,4 +11,7 @@ module.exports = {
|
|
|
6
11
|
flat,
|
|
7
12
|
train,
|
|
8
13
|
tree,
|
|
14
|
+
getNextMoments,
|
|
15
|
+
getPrevMoment,
|
|
16
|
+
momentsToPgn,
|
|
9
17
|
};
|
package/package.json
CHANGED