react-native-chess-kit 0.1.0 → 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.
- package/lib/commonjs/board-annotations.js +131 -0
- package/lib/commonjs/board-annotations.js.map +1 -0
- package/lib/commonjs/board-arrows.js +164 -0
- package/lib/commonjs/board-arrows.js.map +1 -0
- package/lib/commonjs/board-highlights.js +212 -0
- package/lib/commonjs/board-highlights.js.map +1 -0
- package/lib/commonjs/board-piece.js +41 -12
- package/lib/commonjs/board-piece.js.map +1 -1
- package/lib/commonjs/board-pieces.js +2 -0
- package/lib/commonjs/board-pieces.js.map +1 -1
- package/lib/commonjs/board.js +392 -42
- package/lib/commonjs/board.js.map +1 -1
- package/lib/commonjs/constants.js +104 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.js +128 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pieces/default-pieces.js +536 -0
- package/lib/commonjs/pieces/default-pieces.js.map +1 -0
- package/lib/commonjs/pieces/index.js +13 -0
- package/lib/commonjs/pieces/index.js.map +1 -0
- package/lib/commonjs/promotion-picker.js +129 -0
- package/lib/commonjs/promotion-picker.js.map +1 -0
- package/lib/commonjs/static-board.js +150 -0
- package/lib/commonjs/static-board.js.map +1 -0
- package/lib/commonjs/themes.js +175 -0
- package/lib/commonjs/themes.js.map +1 -0
- package/lib/commonjs/use-board-gesture.js +184 -11
- package/lib/commonjs/use-board-gesture.js.map +1 -1
- package/lib/commonjs/use-premove.js +44 -0
- package/lib/commonjs/use-premove.js.map +1 -0
- package/lib/module/board-annotations.js +126 -0
- package/lib/module/board-annotations.js.map +1 -0
- package/lib/module/board-arrows.js +161 -0
- package/lib/module/board-arrows.js.map +1 -0
- package/lib/module/board-highlights.js +206 -0
- package/lib/module/board-highlights.js.map +1 -0
- package/lib/module/board-piece.js +42 -13
- package/lib/module/board-piece.js.map +1 -1
- package/lib/module/board-pieces.js +2 -0
- package/lib/module/board-pieces.js.map +1 -1
- package/lib/module/board.js +395 -44
- package/lib/module/board.js.map +1 -1
- package/lib/module/constants.js +100 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.js +29 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pieces/default-pieces.js +530 -0
- package/lib/module/pieces/default-pieces.js.map +1 -0
- package/lib/module/pieces/index.js +4 -0
- package/lib/module/pieces/index.js.map +1 -0
- package/lib/module/promotion-picker.js +124 -0
- package/lib/module/promotion-picker.js.map +1 -0
- package/lib/module/static-board.js +146 -0
- package/lib/module/static-board.js.map +1 -0
- package/lib/module/themes.js +171 -0
- package/lib/module/themes.js.map +1 -0
- package/lib/module/use-board-gesture.js +185 -11
- package/lib/module/use-board-gesture.js.map +1 -1
- package/lib/module/use-premove.js +40 -0
- package/lib/module/use-premove.js.map +1 -0
- package/lib/typescript/board-annotations.d.ts +30 -0
- package/lib/typescript/board-annotations.d.ts.map +1 -0
- package/lib/typescript/board-arrows.d.ts +27 -0
- package/lib/typescript/board-arrows.d.ts.map +1 -0
- package/lib/typescript/board-highlights.d.ts +65 -0
- package/lib/typescript/board-highlights.d.ts.map +1 -0
- package/lib/typescript/board-piece.d.ts +10 -4
- package/lib/typescript/board-piece.d.ts.map +1 -1
- package/lib/typescript/board-pieces.d.ts +2 -1
- package/lib/typescript/board-pieces.d.ts.map +1 -1
- package/lib/typescript/board.d.ts +11 -2
- package/lib/typescript/board.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +54 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pieces/default-pieces.d.ts +3 -0
- package/lib/typescript/pieces/default-pieces.d.ts.map +1 -0
- package/lib/typescript/pieces/index.d.ts +2 -0
- package/lib/typescript/pieces/index.d.ts.map +1 -0
- package/lib/typescript/promotion-picker.d.ts +30 -0
- package/lib/typescript/promotion-picker.d.ts.map +1 -0
- package/lib/typescript/static-board.d.ts +12 -0
- package/lib/typescript/static-board.d.ts.map +1 -0
- package/lib/typescript/themes.d.ts +15 -0
- package/lib/typescript/themes.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +194 -24
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/use-board-gesture.d.ts +28 -2
- package/lib/typescript/use-board-gesture.d.ts.map +1 -1
- package/lib/typescript/use-premove.d.ts +31 -0
- package/lib/typescript/use-premove.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/board-annotations.tsx +147 -0
- package/src/board-arrows.tsx +197 -0
- package/src/board-highlights.tsx +226 -0
- package/src/board-piece.tsx +50 -12
- package/src/board-pieces.tsx +4 -1
- package/src/board.tsx +462 -46
- package/src/constants.ts +100 -0
- package/src/index.ts +62 -1
- package/src/pieces/default-pieces.tsx +383 -0
- package/src/pieces/index.ts +1 -0
- package/src/promotion-picker.tsx +147 -0
- package/src/static-board.tsx +150 -0
- package/src/themes.ts +129 -0
- package/src/types.ts +251 -25
- package/src/use-board-gesture.ts +219 -8
- package/src/use-premove.ts +59 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Default colors
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
/** Default board colors (chess.com green) */
|
|
8
|
+
export const DEFAULT_BOARD_COLORS = {
|
|
9
|
+
light: '#eeeed2',
|
|
10
|
+
dark: '#769656'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** Default last-move highlight color */
|
|
14
|
+
export const DEFAULT_LAST_MOVE_COLOR = 'rgba(255, 255, 0, 0.4)';
|
|
15
|
+
|
|
16
|
+
/** Default check highlight color (red radial feel) */
|
|
17
|
+
export const DEFAULT_CHECK_COLOR = 'rgba(235, 97, 80, 0.8)';
|
|
18
|
+
|
|
19
|
+
/** Default selected piece square color */
|
|
20
|
+
export const DEFAULT_SELECTED_COLOR = 'rgba(20, 85, 200, 0.5)';
|
|
21
|
+
|
|
22
|
+
/** Default premove highlight color */
|
|
23
|
+
export const DEFAULT_PREMOVE_COLOR = 'rgba(20, 85, 200, 0.3)';
|
|
24
|
+
|
|
25
|
+
/** Default drag target highlight color */
|
|
26
|
+
export const DEFAULT_DRAG_TARGET_COLOR = 'rgba(0, 0, 0, 0.1)';
|
|
27
|
+
|
|
28
|
+
/** Default arrow color */
|
|
29
|
+
export const DEFAULT_ARROW_COLOR = 'rgba(243, 166, 50, 0.85)';
|
|
30
|
+
|
|
31
|
+
/** Default shape (circle) color */
|
|
32
|
+
export const DEFAULT_SHAPE_COLOR = 'rgba(21, 120, 27, 0.7)';
|
|
33
|
+
|
|
34
|
+
/** Default annotation background color */
|
|
35
|
+
export const DEFAULT_ANNOTATION_BG = 'rgba(235, 97, 80, 0.9)';
|
|
36
|
+
|
|
37
|
+
/** Default annotation text color */
|
|
38
|
+
export const DEFAULT_ANNOTATION_TEXT = '#ffffff';
|
|
39
|
+
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Animation defaults
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
|
|
44
|
+
/** Default move animation duration in ms */
|
|
45
|
+
export const DEFAULT_MOVE_DURATION = 200;
|
|
46
|
+
|
|
47
|
+
/** Duration for capture fade-out animation in ms */
|
|
48
|
+
export const CAPTURE_FADE_DURATION = 150;
|
|
49
|
+
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// Layout constants
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
/** Legal move dot size as fraction of square size */
|
|
55
|
+
export const DOT_SCALE = 0.28;
|
|
56
|
+
|
|
57
|
+
/** Legal move capture ring size as fraction of square size */
|
|
58
|
+
export const RING_SCALE = 0.85;
|
|
59
|
+
|
|
60
|
+
/** Legal move capture ring border as fraction of square size */
|
|
61
|
+
export const RING_BORDER_RATIO = 0.08;
|
|
62
|
+
|
|
63
|
+
/** Arrow stroke width as fraction of square size (percentage-based viewBox) */
|
|
64
|
+
export const ARROW_STROKE_WIDTH = 2.5;
|
|
65
|
+
|
|
66
|
+
/** Arrow head size */
|
|
67
|
+
export const ARROW_HEAD_SIZE = 2.5;
|
|
68
|
+
|
|
69
|
+
/** Arrow shorten amount (to avoid overlapping squares) */
|
|
70
|
+
export const ARROW_SHORTEN_BY = 4;
|
|
71
|
+
|
|
72
|
+
/** Annotation badge size as fraction of square size */
|
|
73
|
+
export const ANNOTATION_SCALE = 0.35;
|
|
74
|
+
|
|
75
|
+
/** Coordinate font size as fraction of square size */
|
|
76
|
+
export const COORDINATE_FONT_SCALE = 0.22;
|
|
77
|
+
|
|
78
|
+
/** Drag ghost scale factor (1.1x larger than normal piece) */
|
|
79
|
+
export const DRAG_GHOST_SCALE = 1.1;
|
|
80
|
+
|
|
81
|
+
/** Promotion picker piece padding as fraction of square size */
|
|
82
|
+
export const PROMOTION_PIECE_PADDING = 0.1;
|
|
83
|
+
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// Piece codes (pre-computed to avoid allocation)
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
export const PIECE_CODES = ['wp', 'wn', 'wb', 'wr', 'wq', 'wk', 'bp', 'bn', 'bb', 'br', 'bq', 'bk'];
|
|
89
|
+
|
|
90
|
+
/** Board square indices 0-63 (pre-computed) */
|
|
91
|
+
export const SQUARE_INDICES = Array.from({
|
|
92
|
+
length: 64
|
|
93
|
+
}, (_, i) => i);
|
|
94
|
+
|
|
95
|
+
/** File letters in order */
|
|
96
|
+
export const FILES_WHITE = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
|
|
97
|
+
export const FILES_BLACK = ['h', 'g', 'f', 'e', 'd', 'c', 'b', 'a'];
|
|
98
|
+
export const RANKS_WHITE = ['8', '7', '6', '5', '4', '3', '2', '1'];
|
|
99
|
+
export const RANKS_BLACK = ['1', '2', '3', '4', '5', '6', '7', '8'];
|
|
100
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_BOARD_COLORS","light","dark","DEFAULT_LAST_MOVE_COLOR","DEFAULT_CHECK_COLOR","DEFAULT_SELECTED_COLOR","DEFAULT_PREMOVE_COLOR","DEFAULT_DRAG_TARGET_COLOR","DEFAULT_ARROW_COLOR","DEFAULT_SHAPE_COLOR","DEFAULT_ANNOTATION_BG","DEFAULT_ANNOTATION_TEXT","DEFAULT_MOVE_DURATION","CAPTURE_FADE_DURATION","DOT_SCALE","RING_SCALE","RING_BORDER_RATIO","ARROW_STROKE_WIDTH","ARROW_HEAD_SIZE","ARROW_SHORTEN_BY","ANNOTATION_SCALE","COORDINATE_FONT_SCALE","DRAG_GHOST_SCALE","PROMOTION_PIECE_PADDING","PIECE_CODES","SQUARE_INDICES","Array","from","length","_","i","FILES_WHITE","FILES_BLACK","RANKS_WHITE","RANKS_BLACK"],"sourceRoot":"..\\..\\src","sources":["constants.ts"],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,oBAAiC,GAAG;EAC/CC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE;AACR,CAAC;;AAED;AACA,OAAO,MAAMC,uBAAuB,GAAG,wBAAwB;;AAE/D;AACA,OAAO,MAAMC,mBAAmB,GAAG,wBAAwB;;AAE3D;AACA,OAAO,MAAMC,sBAAsB,GAAG,wBAAwB;;AAE9D;AACA,OAAO,MAAMC,qBAAqB,GAAG,wBAAwB;;AAE7D;AACA,OAAO,MAAMC,yBAAyB,GAAG,oBAAoB;;AAE7D;AACA,OAAO,MAAMC,mBAAmB,GAAG,0BAA0B;;AAE7D;AACA,OAAO,MAAMC,mBAAmB,GAAG,wBAAwB;;AAE3D;AACA,OAAO,MAAMC,qBAAqB,GAAG,wBAAwB;;AAE7D;AACA,OAAO,MAAMC,uBAAuB,GAAG,SAAS;;AAEhD;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,qBAAqB,GAAG,GAAG;;AAExC;AACA,OAAO,MAAMC,qBAAqB,GAAG,GAAG;;AAExC;AACA;AACA;;AAEA;AACA,OAAO,MAAMC,SAAS,GAAG,IAAI;;AAE7B;AACA,OAAO,MAAMC,UAAU,GAAG,IAAI;;AAE9B;AACA,OAAO,MAAMC,iBAAiB,GAAG,IAAI;;AAErC;AACA,OAAO,MAAMC,kBAAkB,GAAG,GAAG;;AAErC;AACA,OAAO,MAAMC,eAAe,GAAG,GAAG;;AAElC;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAC;;AAEjC;AACA,OAAO,MAAMC,gBAAgB,GAAG,IAAI;;AAEpC;AACA,OAAO,MAAMC,qBAAqB,GAAG,IAAI;;AAEzC;AACA,OAAO,MAAMC,gBAAgB,GAAG,GAAG;;AAEnC;AACA,OAAO,MAAMC,uBAAuB,GAAG,GAAG;;AAE1C;AACA;AACA;;AAEA,OAAO,MAAMC,WAAW,GAAG,CACzB,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAClC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAC1B;;AAEV;AACA,OAAO,MAAMC,cAAc,GAAGC,KAAK,CAACC,IAAI,CAAC;EAAEC,MAAM,EAAE;AAAG,CAAC,EAAE,CAACC,CAAC,EAAEC,CAAC,KAAKA,CAAC,CAAC;;AAErE;AACA,OAAO,MAAMC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAC5E,OAAO,MAAMC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAC5E,OAAO,MAAMC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU;AAC5E,OAAO,MAAMC,WAAW,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -4,10 +4,38 @@
|
|
|
4
4
|
// High-performance chess board for React Native
|
|
5
5
|
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
7
|
-
// Main
|
|
7
|
+
// Main components
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
9
|
|
|
10
10
|
export { Board } from './board';
|
|
11
|
+
export { StaticBoard } from './static-board';
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Overlay primitives (for advanced consumers building custom layers)
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
export { SquareHighlight } from './board-highlights';
|
|
18
|
+
export { Arrow } from './board-arrows';
|
|
19
|
+
export { Annotation } from './board-annotations';
|
|
20
|
+
export { PromotionPicker } from './promotion-picker';
|
|
21
|
+
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
// Default piece set
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
export { DefaultPieceSet } from './pieces';
|
|
27
|
+
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
// Themes
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
|
|
32
|
+
export { BOARD_THEMES, BOARD_COLORS } from './themes';
|
|
33
|
+
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// Constants (useful for custom overlays matching library defaults)
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
export { DEFAULT_BOARD_COLORS, DEFAULT_LAST_MOVE_COLOR, DEFAULT_CHECK_COLOR, DEFAULT_SELECTED_COLOR, DEFAULT_PREMOVE_COLOR, DEFAULT_DRAG_TARGET_COLOR, DEFAULT_ARROW_COLOR, DEFAULT_SHAPE_COLOR, DEFAULT_ANNOTATION_BG, DEFAULT_ANNOTATION_TEXT, DEFAULT_MOVE_DURATION, CAPTURE_FADE_DURATION } from './constants';
|
|
11
39
|
|
|
12
40
|
// ---------------------------------------------------------------------------
|
|
13
41
|
// Types
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Board","squareToXY","xyToSquare"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,SAAS
|
|
1
|
+
{"version":3,"names":["Board","StaticBoard","SquareHighlight","Arrow","Annotation","PromotionPicker","DefaultPieceSet","BOARD_THEMES","BOARD_COLORS","DEFAULT_BOARD_COLORS","DEFAULT_LAST_MOVE_COLOR","DEFAULT_CHECK_COLOR","DEFAULT_SELECTED_COLOR","DEFAULT_PREMOVE_COLOR","DEFAULT_DRAG_TARGET_COLOR","DEFAULT_ARROW_COLOR","DEFAULT_SHAPE_COLOR","DEFAULT_ANNOTATION_BG","DEFAULT_ANNOTATION_TEXT","DEFAULT_MOVE_DURATION","CAPTURE_FADE_DURATION","squareToXY","xyToSquare"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;AAAA;AACA;;AAEA;AACA;AACA;;AAEA,SAASA,KAAK,QAAQ,SAAS;AAC/B,SAASC,WAAW,QAAQ,gBAAgB;;AAE5C;AACA;AACA;;AAEA,SAASC,eAAe,QAAQ,oBAAoB;AACpD,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,UAAU,QAAQ,qBAAqB;AAChD,SAASC,eAAe,QAAQ,oBAAoB;;AAEpD;AACA;AACA;;AAEA,SAASC,eAAe,QAAQ,UAAU;;AAE1C;AACA;AACA;;AAEA,SAASC,YAAY,EAAEC,YAAY,QAAQ,UAAU;;AAErD;AACA;AACA;;AAEA,SACEC,oBAAoB,EACpBC,uBAAuB,EACvBC,mBAAmB,EACnBC,sBAAsB,EACtBC,qBAAqB,EACrBC,yBAAyB,EACzBC,mBAAmB,EACnBC,mBAAmB,EACnBC,qBAAqB,EACrBC,uBAAuB,EACvBC,qBAAqB,EACrBC,qBAAqB,QAChB,aAAa;;AAEpB;AACA;AACA;;AA2CA;AACA;AACA;;AAEA,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Svg, { Path, Circle, G } from 'react-native-svg';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Shared stroke / fill constants
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
const WHITE_FILL = '#ffffff';
|
|
11
|
+
const WHITE_STROKE = '#333333';
|
|
12
|
+
const BLACK_FILL = '#333333';
|
|
13
|
+
const BLACK_STROKE = '#1a1a1a';
|
|
14
|
+
const STROKE_WIDTH = 1.5;
|
|
15
|
+
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// King
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
const WhiteKing = /*#__PURE__*/React.memo(({
|
|
21
|
+
size
|
|
22
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
23
|
+
width: size,
|
|
24
|
+
height: size,
|
|
25
|
+
viewBox: "0 0 45 45",
|
|
26
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
27
|
+
fill: WHITE_FILL,
|
|
28
|
+
stroke: WHITE_STROKE,
|
|
29
|
+
strokeWidth: STROKE_WIDTH,
|
|
30
|
+
strokeLinecap: "round",
|
|
31
|
+
strokeLinejoin: "round",
|
|
32
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
33
|
+
d: "M 22.5,11.63 L 22.5,6",
|
|
34
|
+
fill: "none"
|
|
35
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
36
|
+
d: "M 20,8 L 25,8",
|
|
37
|
+
fill: "none"
|
|
38
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
39
|
+
d: "M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25"
|
|
40
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
41
|
+
d: "M 12.5,37 C 18,33.5 27,33.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37"
|
|
42
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
43
|
+
d: "M 12,37.5 C 18,40.5 27,40.5 33,37.5",
|
|
44
|
+
fill: "none"
|
|
45
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
46
|
+
d: "M 20,8 L 25,8",
|
|
47
|
+
fill: "none"
|
|
48
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
49
|
+
d: "M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5",
|
|
50
|
+
fill: "none",
|
|
51
|
+
stroke: WHITE_STROKE,
|
|
52
|
+
strokeWidth: 1
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
}));
|
|
56
|
+
const BlackKing = /*#__PURE__*/React.memo(({
|
|
57
|
+
size
|
|
58
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
59
|
+
width: size,
|
|
60
|
+
height: size,
|
|
61
|
+
viewBox: "0 0 45 45",
|
|
62
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
63
|
+
fill: BLACK_FILL,
|
|
64
|
+
stroke: BLACK_STROKE,
|
|
65
|
+
strokeWidth: STROKE_WIDTH,
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeLinejoin: "round",
|
|
68
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
69
|
+
d: "M 22.5,11.63 L 22.5,6",
|
|
70
|
+
stroke: BLACK_STROKE,
|
|
71
|
+
fill: "none"
|
|
72
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
73
|
+
d: "M 20,8 L 25,8",
|
|
74
|
+
stroke: BLACK_STROKE,
|
|
75
|
+
fill: "none"
|
|
76
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
77
|
+
d: "M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25"
|
|
78
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
79
|
+
d: "M 12.5,37 C 18,33.5 27,33.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37"
|
|
80
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
81
|
+
d: "M 12,37.5 C 18,40.5 27,40.5 33,37.5",
|
|
82
|
+
fill: "none"
|
|
83
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
84
|
+
d: "M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5",
|
|
85
|
+
fill: "none",
|
|
86
|
+
stroke: "#ffffff",
|
|
87
|
+
strokeWidth: 1
|
|
88
|
+
})]
|
|
89
|
+
})
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// Queen
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
const WhiteQueen = /*#__PURE__*/React.memo(({
|
|
97
|
+
size
|
|
98
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
99
|
+
width: size,
|
|
100
|
+
height: size,
|
|
101
|
+
viewBox: "0 0 45 45",
|
|
102
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
103
|
+
fill: WHITE_FILL,
|
|
104
|
+
stroke: WHITE_STROKE,
|
|
105
|
+
strokeWidth: STROKE_WIDTH,
|
|
106
|
+
strokeLinecap: "round",
|
|
107
|
+
strokeLinejoin: "round",
|
|
108
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
109
|
+
cx: 6,
|
|
110
|
+
cy: 12,
|
|
111
|
+
r: 2.75
|
|
112
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
113
|
+
cx: 14,
|
|
114
|
+
cy: 9,
|
|
115
|
+
r: 2.75
|
|
116
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
117
|
+
cx: 22.5,
|
|
118
|
+
cy: 8,
|
|
119
|
+
r: 2.75
|
|
120
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
121
|
+
cx: 31,
|
|
122
|
+
cy: 9,
|
|
123
|
+
r: 2.75
|
|
124
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
125
|
+
cx: 39,
|
|
126
|
+
cy: 12,
|
|
127
|
+
r: 2.75
|
|
128
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
129
|
+
d: "M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.5,10.5 L 26,27.5 L 22.5,10 L 19,27.5 L 14.5,10.5 L 14,25 L 6.5,13.5 L 9,26 Z"
|
|
130
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
131
|
+
d: "M 9,26 C 9,28 10.5,29.5 11.5,30 C 17,31.5 28,31.5 33.5,30 C 34.5,29.5 36,28 36,26"
|
|
132
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
133
|
+
d: "M 11.5,30 C 15,33.5 30,33.5 33.5,30",
|
|
134
|
+
fill: "none"
|
|
135
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
136
|
+
d: "M 12,33.5 C 18,37.5 27,37.5 33,33.5",
|
|
137
|
+
fill: "none"
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
}));
|
|
141
|
+
const BlackQueen = /*#__PURE__*/React.memo(({
|
|
142
|
+
size
|
|
143
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
144
|
+
width: size,
|
|
145
|
+
height: size,
|
|
146
|
+
viewBox: "0 0 45 45",
|
|
147
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
148
|
+
fill: BLACK_FILL,
|
|
149
|
+
stroke: BLACK_STROKE,
|
|
150
|
+
strokeWidth: STROKE_WIDTH,
|
|
151
|
+
strokeLinecap: "round",
|
|
152
|
+
strokeLinejoin: "round",
|
|
153
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
154
|
+
cx: 6,
|
|
155
|
+
cy: 12,
|
|
156
|
+
r: 2.75
|
|
157
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
158
|
+
cx: 14,
|
|
159
|
+
cy: 9,
|
|
160
|
+
r: 2.75
|
|
161
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
162
|
+
cx: 22.5,
|
|
163
|
+
cy: 8,
|
|
164
|
+
r: 2.75
|
|
165
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
166
|
+
cx: 31,
|
|
167
|
+
cy: 9,
|
|
168
|
+
r: 2.75
|
|
169
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
170
|
+
cx: 39,
|
|
171
|
+
cy: 12,
|
|
172
|
+
r: 2.75
|
|
173
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
174
|
+
d: "M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.5,10.5 L 26,27.5 L 22.5,10 L 19,27.5 L 14.5,10.5 L 14,25 L 6.5,13.5 L 9,26 Z"
|
|
175
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
176
|
+
d: "M 9,26 C 9,28 10.5,29.5 11.5,30 C 17,31.5 28,31.5 33.5,30 C 34.5,29.5 36,28 36,26"
|
|
177
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
178
|
+
d: "M 11.5,30 C 15,33.5 30,33.5 33.5,30",
|
|
179
|
+
fill: "none"
|
|
180
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
181
|
+
d: "M 12,33.5 C 18,37.5 27,37.5 33,33.5",
|
|
182
|
+
fill: "none"
|
|
183
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
184
|
+
d: "M 11,29.5 C 15,32 30,32 34,29.5",
|
|
185
|
+
fill: "none",
|
|
186
|
+
stroke: "#ffffff",
|
|
187
|
+
strokeWidth: 1
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
}));
|
|
191
|
+
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
// Rook
|
|
194
|
+
// ---------------------------------------------------------------------------
|
|
195
|
+
|
|
196
|
+
const WhiteRook = /*#__PURE__*/React.memo(({
|
|
197
|
+
size
|
|
198
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
199
|
+
width: size,
|
|
200
|
+
height: size,
|
|
201
|
+
viewBox: "0 0 45 45",
|
|
202
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
203
|
+
fill: WHITE_FILL,
|
|
204
|
+
stroke: WHITE_STROKE,
|
|
205
|
+
strokeWidth: STROKE_WIDTH,
|
|
206
|
+
strokeLinecap: "round",
|
|
207
|
+
strokeLinejoin: "round",
|
|
208
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
209
|
+
d: "M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 Z"
|
|
210
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
211
|
+
d: "M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 Z"
|
|
212
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
213
|
+
d: "M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 Z"
|
|
214
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
215
|
+
d: "M 34,14 L 31,17 L 14,17 L 11,14"
|
|
216
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
217
|
+
d: "M 31,17 L 31,29.5 L 14,29.5 L 14,17",
|
|
218
|
+
fill: WHITE_FILL
|
|
219
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
220
|
+
d: "M 31,29.5 L 33,32 L 12,32 L 14,29.5"
|
|
221
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
222
|
+
d: "M 14,17 L 31,17",
|
|
223
|
+
fill: "none"
|
|
224
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
225
|
+
d: "M 14,29.5 L 31,29.5",
|
|
226
|
+
fill: "none"
|
|
227
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
228
|
+
d: "M 14,17 L 14,29.5",
|
|
229
|
+
fill: "none"
|
|
230
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
231
|
+
d: "M 31,17 L 31,29.5",
|
|
232
|
+
fill: "none"
|
|
233
|
+
})]
|
|
234
|
+
})
|
|
235
|
+
}));
|
|
236
|
+
const BlackRook = /*#__PURE__*/React.memo(({
|
|
237
|
+
size
|
|
238
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
239
|
+
width: size,
|
|
240
|
+
height: size,
|
|
241
|
+
viewBox: "0 0 45 45",
|
|
242
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
243
|
+
fill: BLACK_FILL,
|
|
244
|
+
stroke: BLACK_STROKE,
|
|
245
|
+
strokeWidth: STROKE_WIDTH,
|
|
246
|
+
strokeLinecap: "round",
|
|
247
|
+
strokeLinejoin: "round",
|
|
248
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
249
|
+
d: "M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 Z"
|
|
250
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
251
|
+
d: "M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 Z"
|
|
252
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
253
|
+
d: "M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 Z"
|
|
254
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
255
|
+
d: "M 34,14 L 31,17 L 14,17 L 11,14"
|
|
256
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
257
|
+
d: "M 31,17 L 31,29.5 L 14,29.5 L 14,17",
|
|
258
|
+
fill: BLACK_FILL
|
|
259
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
260
|
+
d: "M 31,29.5 L 33,32 L 12,32 L 14,29.5"
|
|
261
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
262
|
+
d: "M 14,17 L 31,17",
|
|
263
|
+
fill: "none",
|
|
264
|
+
stroke: "#ffffff",
|
|
265
|
+
strokeWidth: 1
|
|
266
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
267
|
+
d: "M 14,29.5 L 31,29.5",
|
|
268
|
+
fill: "none",
|
|
269
|
+
stroke: "#ffffff",
|
|
270
|
+
strokeWidth: 1
|
|
271
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
272
|
+
d: "M 14,17 L 14,29.5",
|
|
273
|
+
fill: "none",
|
|
274
|
+
stroke: "#ffffff",
|
|
275
|
+
strokeWidth: 1
|
|
276
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
277
|
+
d: "M 31,17 L 31,29.5",
|
|
278
|
+
fill: "none",
|
|
279
|
+
stroke: "#ffffff",
|
|
280
|
+
strokeWidth: 1
|
|
281
|
+
})]
|
|
282
|
+
})
|
|
283
|
+
}));
|
|
284
|
+
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
286
|
+
// Bishop
|
|
287
|
+
// ---------------------------------------------------------------------------
|
|
288
|
+
|
|
289
|
+
const WhiteBishop = /*#__PURE__*/React.memo(({
|
|
290
|
+
size
|
|
291
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
292
|
+
width: size,
|
|
293
|
+
height: size,
|
|
294
|
+
viewBox: "0 0 45 45",
|
|
295
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
296
|
+
fill: WHITE_FILL,
|
|
297
|
+
stroke: WHITE_STROKE,
|
|
298
|
+
strokeWidth: STROKE_WIDTH,
|
|
299
|
+
strokeLinecap: "round",
|
|
300
|
+
strokeLinejoin: "round",
|
|
301
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
302
|
+
cx: 22.5,
|
|
303
|
+
cy: 8,
|
|
304
|
+
r: 2.5
|
|
305
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
306
|
+
d: "M 17.5,26 L 15,13 L 22.5,7 L 30,13 L 27.5,26"
|
|
307
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
308
|
+
d: "M 22.5,15.5 L 22.5,20.5",
|
|
309
|
+
fill: "none",
|
|
310
|
+
strokeWidth: 1.5
|
|
311
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
312
|
+
d: "M 20,18 L 25,18",
|
|
313
|
+
fill: "none",
|
|
314
|
+
strokeWidth: 1.5
|
|
315
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
316
|
+
d: "M 17.5,26 C 21,28 24,28 27.5,26 C 28.5,27.5 29,29 29,31 C 29,33 27.5,34.5 22.5,34.5 C 17.5,34.5 16,33 16,31 C 16,29 16.5,27.5 17.5,26"
|
|
317
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
318
|
+
d: "M 14.5,34.5 C 18,37.5 27,37.5 30.5,34.5 L 31,39 L 14,39 L 14.5,34.5 Z"
|
|
319
|
+
})]
|
|
320
|
+
})
|
|
321
|
+
}));
|
|
322
|
+
const BlackBishop = /*#__PURE__*/React.memo(({
|
|
323
|
+
size
|
|
324
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
325
|
+
width: size,
|
|
326
|
+
height: size,
|
|
327
|
+
viewBox: "0 0 45 45",
|
|
328
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
329
|
+
fill: BLACK_FILL,
|
|
330
|
+
stroke: BLACK_STROKE,
|
|
331
|
+
strokeWidth: STROKE_WIDTH,
|
|
332
|
+
strokeLinecap: "round",
|
|
333
|
+
strokeLinejoin: "round",
|
|
334
|
+
children: [/*#__PURE__*/_jsx(Circle, {
|
|
335
|
+
cx: 22.5,
|
|
336
|
+
cy: 8,
|
|
337
|
+
r: 2.5
|
|
338
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
339
|
+
d: "M 17.5,26 L 15,13 L 22.5,7 L 30,13 L 27.5,26"
|
|
340
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
341
|
+
d: "M 22.5,15.5 L 22.5,20.5",
|
|
342
|
+
fill: "none",
|
|
343
|
+
stroke: "#ffffff",
|
|
344
|
+
strokeWidth: 1.5
|
|
345
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
346
|
+
d: "M 20,18 L 25,18",
|
|
347
|
+
fill: "none",
|
|
348
|
+
stroke: "#ffffff",
|
|
349
|
+
strokeWidth: 1.5
|
|
350
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
351
|
+
d: "M 17.5,26 C 21,28 24,28 27.5,26 C 28.5,27.5 29,29 29,31 C 29,33 27.5,34.5 22.5,34.5 C 17.5,34.5 16,33 16,31 C 16,29 16.5,27.5 17.5,26"
|
|
352
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
353
|
+
d: "M 14.5,34.5 C 18,37.5 27,37.5 30.5,34.5 L 31,39 L 14,39 L 14.5,34.5 Z"
|
|
354
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
355
|
+
d: "M 17.5,26 C 21,28 24,28 27.5,26",
|
|
356
|
+
fill: "none",
|
|
357
|
+
stroke: "#ffffff",
|
|
358
|
+
strokeWidth: 1
|
|
359
|
+
})]
|
|
360
|
+
})
|
|
361
|
+
}));
|
|
362
|
+
|
|
363
|
+
// ---------------------------------------------------------------------------
|
|
364
|
+
// Knight
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
|
|
367
|
+
const WhiteKnight = /*#__PURE__*/React.memo(({
|
|
368
|
+
size
|
|
369
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
370
|
+
width: size,
|
|
371
|
+
height: size,
|
|
372
|
+
viewBox: "0 0 45 45",
|
|
373
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
374
|
+
fill: WHITE_FILL,
|
|
375
|
+
stroke: WHITE_STROKE,
|
|
376
|
+
strokeWidth: STROKE_WIDTH,
|
|
377
|
+
strokeLinecap: "round",
|
|
378
|
+
strokeLinejoin: "round",
|
|
379
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
380
|
+
d: "M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18"
|
|
381
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
382
|
+
d: "M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10"
|
|
383
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
384
|
+
cx: 12,
|
|
385
|
+
cy: 25.5,
|
|
386
|
+
r: 0.5,
|
|
387
|
+
fill: WHITE_STROKE,
|
|
388
|
+
stroke: "none"
|
|
389
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
390
|
+
d: "M 17,34.5 C 18.5,32 19.28,30 19,28.25",
|
|
391
|
+
fill: "none",
|
|
392
|
+
strokeWidth: 1
|
|
393
|
+
})]
|
|
394
|
+
})
|
|
395
|
+
}));
|
|
396
|
+
const BlackKnight = /*#__PURE__*/React.memo(({
|
|
397
|
+
size
|
|
398
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
399
|
+
width: size,
|
|
400
|
+
height: size,
|
|
401
|
+
viewBox: "0 0 45 45",
|
|
402
|
+
children: /*#__PURE__*/_jsxs(G, {
|
|
403
|
+
fill: BLACK_FILL,
|
|
404
|
+
stroke: BLACK_STROKE,
|
|
405
|
+
strokeWidth: STROKE_WIDTH,
|
|
406
|
+
strokeLinecap: "round",
|
|
407
|
+
strokeLinejoin: "round",
|
|
408
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
409
|
+
d: "M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18"
|
|
410
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
411
|
+
d: "M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10"
|
|
412
|
+
}), /*#__PURE__*/_jsx(Circle, {
|
|
413
|
+
cx: 12,
|
|
414
|
+
cy: 25.5,
|
|
415
|
+
r: 0.5,
|
|
416
|
+
fill: "#ffffff",
|
|
417
|
+
stroke: "none"
|
|
418
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
419
|
+
d: "M 17,34.5 C 18.5,32 19.28,30 19,28.25",
|
|
420
|
+
fill: "none",
|
|
421
|
+
stroke: "#ffffff",
|
|
422
|
+
strokeWidth: 1
|
|
423
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
424
|
+
d: "M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31",
|
|
425
|
+
fill: "none",
|
|
426
|
+
stroke: "#ffffff",
|
|
427
|
+
strokeWidth: 1
|
|
428
|
+
})]
|
|
429
|
+
})
|
|
430
|
+
}));
|
|
431
|
+
|
|
432
|
+
// ---------------------------------------------------------------------------
|
|
433
|
+
// Pawn
|
|
434
|
+
// ---------------------------------------------------------------------------
|
|
435
|
+
|
|
436
|
+
const WhitePawn = /*#__PURE__*/React.memo(({
|
|
437
|
+
size
|
|
438
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
439
|
+
width: size,
|
|
440
|
+
height: size,
|
|
441
|
+
viewBox: "0 0 45 45",
|
|
442
|
+
children: /*#__PURE__*/_jsx(G, {
|
|
443
|
+
fill: WHITE_FILL,
|
|
444
|
+
stroke: WHITE_STROKE,
|
|
445
|
+
strokeWidth: STROKE_WIDTH,
|
|
446
|
+
strokeLinecap: "round",
|
|
447
|
+
strokeLinejoin: "round",
|
|
448
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
449
|
+
d: "M 22.5,9 C 19.79,9 17.609,11.19 17.609,13.9 C 17.609,15.42 18.34,16.77 19.47,17.62 C 16.98,19.04 15.35,21.72 15.35,24.79 C 15.35,25.87 15.59,26.88 15.99,27.81 C 13.08,29.21 11,32.16 11,35.6 L 11,37.5 C 11,38.33 11.67,39 12.5,39 L 32.5,39 C 33.33,39 34,38.33 34,37.5 L 34,35.6 C 34,32.16 31.92,29.21 29.01,27.81 C 29.41,26.88 29.65,25.87 29.65,24.79 C 29.65,21.72 28.02,19.04 25.53,17.62 C 26.66,16.77 27.39,15.42 27.39,13.9 C 27.39,11.19 25.21,9 22.5,9 Z"
|
|
450
|
+
})
|
|
451
|
+
})
|
|
452
|
+
}));
|
|
453
|
+
const BlackPawn = /*#__PURE__*/React.memo(({
|
|
454
|
+
size
|
|
455
|
+
}) => /*#__PURE__*/_jsx(Svg, {
|
|
456
|
+
width: size,
|
|
457
|
+
height: size,
|
|
458
|
+
viewBox: "0 0 45 45",
|
|
459
|
+
children: /*#__PURE__*/_jsx(G, {
|
|
460
|
+
fill: BLACK_FILL,
|
|
461
|
+
stroke: BLACK_STROKE,
|
|
462
|
+
strokeWidth: STROKE_WIDTH,
|
|
463
|
+
strokeLinecap: "round",
|
|
464
|
+
strokeLinejoin: "round",
|
|
465
|
+
children: /*#__PURE__*/_jsx(Path, {
|
|
466
|
+
d: "M 22.5,9 C 19.79,9 17.609,11.19 17.609,13.9 C 17.609,15.42 18.34,16.77 19.47,17.62 C 16.98,19.04 15.35,21.72 15.35,24.79 C 15.35,25.87 15.59,26.88 15.99,27.81 C 13.08,29.21 11,32.16 11,35.6 L 11,37.5 C 11,38.33 11.67,39 12.5,39 L 32.5,39 C 33.33,39 34,38.33 34,37.5 L 34,35.6 C 34,32.16 31.92,29.21 29.01,27.81 C 29.41,26.88 29.65,25.87 29.65,24.79 C 29.65,21.72 28.02,19.04 25.53,17.62 C 26.66,16.77 27.39,15.42 27.39,13.9 C 27.39,11.19 25.21,9 22.5,9 Z"
|
|
467
|
+
})
|
|
468
|
+
})
|
|
469
|
+
}));
|
|
470
|
+
|
|
471
|
+
// ---------------------------------------------------------------------------
|
|
472
|
+
// Piece render functions
|
|
473
|
+
// ---------------------------------------------------------------------------
|
|
474
|
+
|
|
475
|
+
const wp = size => /*#__PURE__*/_jsx(WhitePawn, {
|
|
476
|
+
size: size
|
|
477
|
+
});
|
|
478
|
+
const wn = size => /*#__PURE__*/_jsx(WhiteKnight, {
|
|
479
|
+
size: size
|
|
480
|
+
});
|
|
481
|
+
const wb = size => /*#__PURE__*/_jsx(WhiteBishop, {
|
|
482
|
+
size: size
|
|
483
|
+
});
|
|
484
|
+
const wr = size => /*#__PURE__*/_jsx(WhiteRook, {
|
|
485
|
+
size: size
|
|
486
|
+
});
|
|
487
|
+
const wq = size => /*#__PURE__*/_jsx(WhiteQueen, {
|
|
488
|
+
size: size
|
|
489
|
+
});
|
|
490
|
+
const wk = size => /*#__PURE__*/_jsx(WhiteKing, {
|
|
491
|
+
size: size
|
|
492
|
+
});
|
|
493
|
+
const bp = size => /*#__PURE__*/_jsx(BlackPawn, {
|
|
494
|
+
size: size
|
|
495
|
+
});
|
|
496
|
+
const bn = size => /*#__PURE__*/_jsx(BlackKnight, {
|
|
497
|
+
size: size
|
|
498
|
+
});
|
|
499
|
+
const bb = size => /*#__PURE__*/_jsx(BlackBishop, {
|
|
500
|
+
size: size
|
|
501
|
+
});
|
|
502
|
+
const br = size => /*#__PURE__*/_jsx(BlackRook, {
|
|
503
|
+
size: size
|
|
504
|
+
});
|
|
505
|
+
const bq = size => /*#__PURE__*/_jsx(BlackQueen, {
|
|
506
|
+
size: size
|
|
507
|
+
});
|
|
508
|
+
const bk = size => /*#__PURE__*/_jsx(BlackKing, {
|
|
509
|
+
size: size
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
// ---------------------------------------------------------------------------
|
|
513
|
+
// Default piece set
|
|
514
|
+
// ---------------------------------------------------------------------------
|
|
515
|
+
|
|
516
|
+
export const DefaultPieceSet = {
|
|
517
|
+
wp,
|
|
518
|
+
wn,
|
|
519
|
+
wb,
|
|
520
|
+
wr,
|
|
521
|
+
wq,
|
|
522
|
+
wk,
|
|
523
|
+
bp,
|
|
524
|
+
bn,
|
|
525
|
+
bb,
|
|
526
|
+
br,
|
|
527
|
+
bq,
|
|
528
|
+
bk
|
|
529
|
+
};
|
|
530
|
+
//# sourceMappingURL=default-pieces.js.map
|