gigaboard 1.2.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 (156) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/board-model-BvJOtwQ3.d.cts +675 -0
  4. package/dist/board-model-BvJOtwQ3.d.ts +675 -0
  5. package/dist/canvas.cjs +8 -0
  6. package/dist/canvas.cjs.map +1 -0
  7. package/dist/canvas.d.cts +14 -0
  8. package/dist/canvas.d.ts +14 -0
  9. package/dist/canvas.js +6 -0
  10. package/dist/canvas.js.map +1 -0
  11. package/dist/chunk-3HNIF4ZE.js +3 -0
  12. package/dist/chunk-3HNIF4ZE.js.map +1 -0
  13. package/dist/chunk-44YKPXXT.js +63 -0
  14. package/dist/chunk-44YKPXXT.js.map +1 -0
  15. package/dist/chunk-5WAOEWKS.js +16 -0
  16. package/dist/chunk-5WAOEWKS.js.map +1 -0
  17. package/dist/chunk-AYVQCHSG.cjs +10 -0
  18. package/dist/chunk-AYVQCHSG.cjs.map +1 -0
  19. package/dist/chunk-B26QLI2K.cjs +18 -0
  20. package/dist/chunk-B26QLI2K.cjs.map +1 -0
  21. package/dist/chunk-B2TBDDJN.cjs +10 -0
  22. package/dist/chunk-B2TBDDJN.cjs.map +1 -0
  23. package/dist/chunk-BFN5JI3T.js +8 -0
  24. package/dist/chunk-BFN5JI3T.js.map +1 -0
  25. package/dist/chunk-BWNBPN3P.cjs +10 -0
  26. package/dist/chunk-BWNBPN3P.cjs.map +1 -0
  27. package/dist/chunk-CXDGJMYL.js +105 -0
  28. package/dist/chunk-CXDGJMYL.js.map +1 -0
  29. package/dist/chunk-EOSX5UX3.js +8 -0
  30. package/dist/chunk-EOSX5UX3.js.map +1 -0
  31. package/dist/chunk-FNRS6YJI.cjs +67 -0
  32. package/dist/chunk-FNRS6YJI.cjs.map +1 -0
  33. package/dist/chunk-G6ZFOJZR.cjs +18 -0
  34. package/dist/chunk-G6ZFOJZR.cjs.map +1 -0
  35. package/dist/chunk-HSMILJKQ.cjs +18 -0
  36. package/dist/chunk-HSMILJKQ.cjs.map +1 -0
  37. package/dist/chunk-I4BQGFP5.cjs +113 -0
  38. package/dist/chunk-I4BQGFP5.cjs.map +1 -0
  39. package/dist/chunk-J6GGNP5S.js +1104 -0
  40. package/dist/chunk-J6GGNP5S.js.map +1 -0
  41. package/dist/chunk-JQSBAWIZ.cjs +4 -0
  42. package/dist/chunk-JQSBAWIZ.cjs.map +1 -0
  43. package/dist/chunk-KW56FEBY.js +8 -0
  44. package/dist/chunk-KW56FEBY.js.map +1 -0
  45. package/dist/chunk-N7ED2MZS.cjs +10 -0
  46. package/dist/chunk-N7ED2MZS.cjs.map +1 -0
  47. package/dist/chunk-NAA5O4BT.js +16 -0
  48. package/dist/chunk-NAA5O4BT.js.map +1 -0
  49. package/dist/chunk-OQLY5GJF.js +16 -0
  50. package/dist/chunk-OQLY5GJF.js.map +1 -0
  51. package/dist/chunk-P72B3YTG.js +16 -0
  52. package/dist/chunk-P72B3YTG.js.map +1 -0
  53. package/dist/chunk-U6WAD322.js +8 -0
  54. package/dist/chunk-U6WAD322.js.map +1 -0
  55. package/dist/chunk-UUTEFNFO.cjs +1148 -0
  56. package/dist/chunk-UUTEFNFO.cjs.map +1 -0
  57. package/dist/chunk-VYSVIIZA.cjs +18 -0
  58. package/dist/chunk-VYSVIIZA.cjs.map +1 -0
  59. package/dist/core.cjs +180 -0
  60. package/dist/core.cjs.map +1 -0
  61. package/dist/core.d.cts +164 -0
  62. package/dist/core.d.ts +164 -0
  63. package/dist/core.js +3 -0
  64. package/dist/core.js.map +1 -0
  65. package/dist/create-image-piece-set-BcmRKGql.d.cts +100 -0
  66. package/dist/create-image-piece-set-BcmRKGql.d.ts +100 -0
  67. package/dist/gigachess-3BDD--yT.d.cts +22 -0
  68. package/dist/gigachess-DolQlR82.d.ts +22 -0
  69. package/dist/index.cjs +2972 -0
  70. package/dist/index.cjs.map +1 -0
  71. package/dist/index.d.cts +435 -0
  72. package/dist/index.d.ts +435 -0
  73. package/dist/index.js +2898 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/pieces/alpha.cjs +13 -0
  76. package/dist/pieces/alpha.cjs.map +1 -0
  77. package/dist/pieces/alpha.d.cts +17 -0
  78. package/dist/pieces/alpha.d.ts +17 -0
  79. package/dist/pieces/alpha.js +4 -0
  80. package/dist/pieces/alpha.js.map +1 -0
  81. package/dist/pieces/cburnett.cjs +13 -0
  82. package/dist/pieces/cburnett.cjs.map +1 -0
  83. package/dist/pieces/cburnett.d.cts +19 -0
  84. package/dist/pieces/cburnett.d.ts +19 -0
  85. package/dist/pieces/cburnett.js +4 -0
  86. package/dist/pieces/cburnett.js.map +1 -0
  87. package/dist/pieces/chesscom.cjs +14 -0
  88. package/dist/pieces/chesscom.cjs.map +1 -0
  89. package/dist/pieces/chesscom.d.cts +3 -0
  90. package/dist/pieces/chesscom.d.ts +3 -0
  91. package/dist/pieces/chesscom.js +5 -0
  92. package/dist/pieces/chesscom.js.map +1 -0
  93. package/dist/pieces/merida.cjs +13 -0
  94. package/dist/pieces/merida.cjs.map +1 -0
  95. package/dist/pieces/merida.d.cts +17 -0
  96. package/dist/pieces/merida.d.ts +17 -0
  97. package/dist/pieces/merida.js +4 -0
  98. package/dist/pieces/merida.js.map +1 -0
  99. package/dist/pieces/neo.cjs +13 -0
  100. package/dist/pieces/neo.cjs.map +1 -0
  101. package/dist/pieces/neo.d.cts +18 -0
  102. package/dist/pieces/neo.d.ts +18 -0
  103. package/dist/pieces/neo.js +4 -0
  104. package/dist/pieces/neo.js.map +1 -0
  105. package/dist/pieces.cjs +55 -0
  106. package/dist/pieces.cjs.map +1 -0
  107. package/dist/pieces.d.cts +21 -0
  108. package/dist/pieces.d.ts +21 -0
  109. package/dist/pieces.js +24 -0
  110. package/dist/pieces.js.map +1 -0
  111. package/dist/server.cjs +207 -0
  112. package/dist/server.cjs.map +1 -0
  113. package/dist/server.d.cts +60 -0
  114. package/dist/server.d.ts +60 -0
  115. package/dist/server.js +205 -0
  116. package/dist/server.js.map +1 -0
  117. package/dist/sounds/capture.mp3 +0 -0
  118. package/dist/sounds/castle.mp3 +0 -0
  119. package/dist/sounds/game-end.mp3 +0 -0
  120. package/dist/sounds/move-check.mp3 +0 -0
  121. package/dist/sounds/move-opponent.mp3 +0 -0
  122. package/dist/sounds/move-self.mp3 +0 -0
  123. package/dist/sounds/promote.mp3 +0 -0
  124. package/dist/themes/blue.cjs +12 -0
  125. package/dist/themes/blue.cjs.map +1 -0
  126. package/dist/themes/blue.d.cts +102 -0
  127. package/dist/themes/blue.d.ts +102 -0
  128. package/dist/themes/blue.js +3 -0
  129. package/dist/themes/blue.js.map +1 -0
  130. package/dist/themes/brown.cjs +12 -0
  131. package/dist/themes/brown.cjs.map +1 -0
  132. package/dist/themes/brown.d.cts +1 -0
  133. package/dist/themes/brown.d.ts +1 -0
  134. package/dist/themes/brown.js +3 -0
  135. package/dist/themes/brown.js.map +1 -0
  136. package/dist/themes/green.cjs +12 -0
  137. package/dist/themes/green.cjs.map +1 -0
  138. package/dist/themes/green.d.cts +1 -0
  139. package/dist/themes/green.d.ts +1 -0
  140. package/dist/themes/green.js +3 -0
  141. package/dist/themes/green.js.map +1 -0
  142. package/dist/themes/wood.cjs +12 -0
  143. package/dist/themes/wood.cjs.map +1 -0
  144. package/dist/themes/wood.d.cts +1 -0
  145. package/dist/themes/wood.d.ts +1 -0
  146. package/dist/themes/wood.js +3 -0
  147. package/dist/themes/wood.js.map +1 -0
  148. package/dist/themes.cjs +36 -0
  149. package/dist/themes.cjs.map +1 -0
  150. package/dist/themes.d.cts +1 -0
  151. package/dist/themes.d.ts +1 -0
  152. package/dist/themes.js +21 -0
  153. package/dist/themes.js.map +1 -0
  154. package/dist/types-Bg2xiUHE.d.cts +501 -0
  155. package/dist/types-D5eBJGzj.d.ts +501 -0
  156. package/package.json +210 -0
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkB2TBDDJN_cjs = require('../chunk-B2TBDDJN.cjs');
4
+ require('../chunk-FNRS6YJI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "alpha", {
9
+ enumerable: true,
10
+ get: function () { return chunkB2TBDDJN_cjs.alpha; }
11
+ });
12
+ //# sourceMappingURL=alpha.cjs.map
13
+ //# sourceMappingURL=alpha.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"alpha.cjs"}
@@ -0,0 +1,17 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.cjs';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Alpha** — chess.com's Alpha set.
6
+ *
7
+ * Thin, minimalist silhouettes; reads well at small sizes. Good fit for
8
+ * mobile boards and puzzle thumbnails.
9
+ *
10
+ * ```tsx
11
+ * import { alpha } from "gigaboard/pieces/alpha";
12
+ * <Chessboard game={game} pieces={alpha} />
13
+ * ```
14
+ */
15
+ declare const alpha: PieceRenderer;
16
+
17
+ export { alpha };
@@ -0,0 +1,17 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.js';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Alpha** — chess.com's Alpha set.
6
+ *
7
+ * Thin, minimalist silhouettes; reads well at small sizes. Good fit for
8
+ * mobile boards and puzzle thumbnails.
9
+ *
10
+ * ```tsx
11
+ * import { alpha } from "gigaboard/pieces/alpha";
12
+ * <Chessboard game={game} pieces={alpha} />
13
+ * ```
14
+ */
15
+ declare const alpha: PieceRenderer;
16
+
17
+ export { alpha };
@@ -0,0 +1,4 @@
1
+ export { alpha } from '../chunk-BFN5JI3T.js';
2
+ import '../chunk-44YKPXXT.js';
3
+ //# sourceMappingURL=alpha.js.map
4
+ //# sourceMappingURL=alpha.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"alpha.js"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkN7ED2MZS_cjs = require('../chunk-N7ED2MZS.cjs');
4
+ require('../chunk-FNRS6YJI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "cburnett", {
9
+ enumerable: true,
10
+ get: function () { return chunkN7ED2MZS_cjs.cburnett; }
11
+ });
12
+ //# sourceMappingURL=cburnett.cjs.map
13
+ //# sourceMappingURL=cburnett.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"cburnett.cjs"}
@@ -0,0 +1,19 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.cjs';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Cburnett** — chess.com "classic" style.
6
+ *
7
+ * Chess.com hosts a `classic` piece set that visually matches the look
8
+ * and spirit of the `cburnett` Lichess set — bold outlines, traditional
9
+ * silhouette. This export points at chess.com's CDN for legal and visual
10
+ * consistency with the rest of the `gigaboard/pieces` range.
11
+ *
12
+ * ```tsx
13
+ * import { cburnett } from "gigaboard/pieces/cburnett";
14
+ * <Chessboard game={game} pieces={cburnett} />
15
+ * ```
16
+ */
17
+ declare const cburnett: PieceRenderer;
18
+
19
+ export { cburnett };
@@ -0,0 +1,19 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.js';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Cburnett** — chess.com "classic" style.
6
+ *
7
+ * Chess.com hosts a `classic` piece set that visually matches the look
8
+ * and spirit of the `cburnett` Lichess set — bold outlines, traditional
9
+ * silhouette. This export points at chess.com's CDN for legal and visual
10
+ * consistency with the rest of the `gigaboard/pieces` range.
11
+ *
12
+ * ```tsx
13
+ * import { cburnett } from "gigaboard/pieces/cburnett";
14
+ * <Chessboard game={game} pieces={cburnett} />
15
+ * ```
16
+ */
17
+ declare const cburnett: PieceRenderer;
18
+
19
+ export { cburnett };
@@ -0,0 +1,4 @@
1
+ export { cburnett } from '../chunk-KW56FEBY.js';
2
+ import '../chunk-44YKPXXT.js';
3
+ //# sourceMappingURL=cburnett.js.map
4
+ //# sourceMappingURL=cburnett.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"cburnett.js"}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ require('../chunk-JQSBAWIZ.cjs');
4
+ var chunkAYVQCHSG_cjs = require('../chunk-AYVQCHSG.cjs');
5
+ require('../chunk-FNRS6YJI.cjs');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "chesscom", {
10
+ enumerable: true,
11
+ get: function () { return chunkAYVQCHSG_cjs.neo; }
12
+ });
13
+ //# sourceMappingURL=chesscom.cjs.map
14
+ //# sourceMappingURL=chesscom.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chesscom.cjs"}
@@ -0,0 +1,3 @@
1
+ export { neo as chesscom } from './neo.cjs';
2
+ import '../create-image-piece-set-BcmRKGql.cjs';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { neo as chesscom } from './neo.js';
2
+ import '../create-image-piece-set-BcmRKGql.js';
3
+ import 'react';
@@ -0,0 +1,5 @@
1
+ import '../chunk-3HNIF4ZE.js';
2
+ export { neo as chesscom } from '../chunk-U6WAD322.js';
3
+ import '../chunk-44YKPXXT.js';
4
+ //# sourceMappingURL=chesscom.js.map
5
+ //# sourceMappingURL=chesscom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chesscom.js"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkBWNBPN3P_cjs = require('../chunk-BWNBPN3P.cjs');
4
+ require('../chunk-FNRS6YJI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "merida", {
9
+ enumerable: true,
10
+ get: function () { return chunkBWNBPN3P_cjs.merida; }
11
+ });
12
+ //# sourceMappingURL=merida.cjs.map
13
+ //# sourceMappingURL=merida.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"merida.cjs"}
@@ -0,0 +1,17 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.cjs';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Merida** — chess.com's `neo_wood` set.
6
+ *
7
+ * Warm wood-tinted pieces with traditional proportions; visually closest
8
+ * to the classic `merida` tournament set used in print publications.
9
+ *
10
+ * ```tsx
11
+ * import { merida } from "gigaboard/pieces/merida";
12
+ * <Chessboard game={game} pieces={merida} />
13
+ * ```
14
+ */
15
+ declare const merida: PieceRenderer;
16
+
17
+ export { merida };
@@ -0,0 +1,17 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.js';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Merida** — chess.com's `neo_wood` set.
6
+ *
7
+ * Warm wood-tinted pieces with traditional proportions; visually closest
8
+ * to the classic `merida` tournament set used in print publications.
9
+ *
10
+ * ```tsx
11
+ * import { merida } from "gigaboard/pieces/merida";
12
+ * <Chessboard game={game} pieces={merida} />
13
+ * ```
14
+ */
15
+ declare const merida: PieceRenderer;
16
+
17
+ export { merida };
@@ -0,0 +1,4 @@
1
+ export { merida } from '../chunk-EOSX5UX3.js';
2
+ import '../chunk-44YKPXXT.js';
3
+ //# sourceMappingURL=merida.js.map
4
+ //# sourceMappingURL=merida.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"merida.js"}
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkAYVQCHSG_cjs = require('../chunk-AYVQCHSG.cjs');
4
+ require('../chunk-FNRS6YJI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "neo", {
9
+ enumerable: true,
10
+ get: function () { return chunkAYVQCHSG_cjs.neo; }
11
+ });
12
+ //# sourceMappingURL=neo.cjs.map
13
+ //# sourceMappingURL=neo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"neo.cjs"}
@@ -0,0 +1,18 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.cjs';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Neo** — chess.com's default piece set.
6
+ *
7
+ * ```tsx
8
+ * import { neo } from "gigaboard/pieces/neo";
9
+ * <Chessboard game={game} pieces={neo} />
10
+ * ```
11
+ *
12
+ * Sources its PNGs from chess.com's public piece CDN. Neo is the set
13
+ * chess.com ships on every board by default, so this renderer delivers
14
+ * the highest chess.com-visual-parity out of the box.
15
+ */
16
+ declare const neo: PieceRenderer;
17
+
18
+ export { neo };
@@ -0,0 +1,18 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.js';
2
+ import 'react';
3
+
4
+ /**
5
+ * **Neo** — chess.com's default piece set.
6
+ *
7
+ * ```tsx
8
+ * import { neo } from "gigaboard/pieces/neo";
9
+ * <Chessboard game={game} pieces={neo} />
10
+ * ```
11
+ *
12
+ * Sources its PNGs from chess.com's public piece CDN. Neo is the set
13
+ * chess.com ships on every board by default, so this renderer delivers
14
+ * the highest chess.com-visual-parity out of the box.
15
+ */
16
+ declare const neo: PieceRenderer;
17
+
18
+ export { neo };
@@ -0,0 +1,4 @@
1
+ export { neo } from '../chunk-U6WAD322.js';
2
+ import '../chunk-44YKPXXT.js';
3
+ //# sourceMappingURL=neo.js.map
4
+ //# sourceMappingURL=neo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"neo.js"}
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ var chunkB2TBDDJN_cjs = require('./chunk-B2TBDDJN.cjs');
4
+ require('./chunk-JQSBAWIZ.cjs');
5
+ var chunkAYVQCHSG_cjs = require('./chunk-AYVQCHSG.cjs');
6
+ var chunkN7ED2MZS_cjs = require('./chunk-N7ED2MZS.cjs');
7
+ var chunkBWNBPN3P_cjs = require('./chunk-BWNBPN3P.cjs');
8
+ var chunkFNRS6YJI_cjs = require('./chunk-FNRS6YJI.cjs');
9
+
10
+ // src/pieces/index.ts
11
+ var pieceSets = Object.freeze({
12
+ alpha: chunkB2TBDDJN_cjs.alpha,
13
+ cburnett: chunkN7ED2MZS_cjs.cburnett,
14
+ chesscom: chunkAYVQCHSG_cjs.neo,
15
+ merida: chunkBWNBPN3P_cjs.merida,
16
+ neo: chunkAYVQCHSG_cjs.neo
17
+ });
18
+ var PACKAGE_VERSION = "0.1.0-alpha";
19
+
20
+ Object.defineProperty(exports, "alpha", {
21
+ enumerable: true,
22
+ get: function () { return chunkB2TBDDJN_cjs.alpha; }
23
+ });
24
+ Object.defineProperty(exports, "chesscom", {
25
+ enumerable: true,
26
+ get: function () { return chunkAYVQCHSG_cjs.neo; }
27
+ });
28
+ Object.defineProperty(exports, "neo", {
29
+ enumerable: true,
30
+ get: function () { return chunkAYVQCHSG_cjs.neo; }
31
+ });
32
+ Object.defineProperty(exports, "cburnett", {
33
+ enumerable: true,
34
+ get: function () { return chunkN7ED2MZS_cjs.cburnett; }
35
+ });
36
+ Object.defineProperty(exports, "merida", {
37
+ enumerable: true,
38
+ get: function () { return chunkBWNBPN3P_cjs.merida; }
39
+ });
40
+ Object.defineProperty(exports, "BOARD_CELL_KEY", {
41
+ enumerable: true,
42
+ get: function () { return chunkFNRS6YJI_cjs.BOARD_CELL_KEY; }
43
+ });
44
+ Object.defineProperty(exports, "chesscomPieceUrls", {
45
+ enumerable: true,
46
+ get: function () { return chunkFNRS6YJI_cjs.chesscomPieceUrls; }
47
+ });
48
+ Object.defineProperty(exports, "createImagePieceSet", {
49
+ enumerable: true,
50
+ get: function () { return chunkFNRS6YJI_cjs.createImagePieceSet; }
51
+ });
52
+ exports.PACKAGE_VERSION = PACKAGE_VERSION;
53
+ exports.pieceSets = pieceSets;
54
+ //# sourceMappingURL=pieces.cjs.map
55
+ //# sourceMappingURL=pieces.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pieces/index.ts"],"names":["alpha","cburnett","neo","merida"],"mappings":";;;;;;;;;;AAyDO,IAAM,SAAA,GAAY,OAAO,MAAA,CAAO;AAAA,SACrCA,uBAAA;AAAA,YACAC,0BAAA;AAAA,EACA,QAAA,EAAAC,qBAAA;AAAA,UACAC,wBAAA;AAAA,OACAD;AACF,CAAC;AAKM,IAAM,eAAA,GAAkB","file":"pieces.cjs","sourcesContent":["/**\n * `gigaboard/pieces` — piece renderers for `<Chessboard/>`.\n *\n * Every set is a URL-backed `PieceRenderer` built by\n * {@link createImagePieceSet}. Ships **image** pieces (chess.com's public\n * PNG CDN by default) rather than inline SVG so the JS budget stays under\n * 1 KB per set — the pixels live in the browser's image cache, not in\n * your bundle.\n *\n * ### Tree-shaking\n *\n * Import a specific set from its sub-path to keep your bundle minimal:\n *\n * ```tsx\n * import { neo } from \"gigaboard/pieces/neo\"; // chess.com default\n * import { chesscom } from \"gigaboard/pieces/chesscom\"; // alias of `neo`\n * import { alpha } from \"gigaboard/pieces/alpha\";\n * import { cburnett } from \"gigaboard/pieces/cburnett\";\n * import { merida } from \"gigaboard/pieces/merida\";\n * ```\n *\n * Or bring the whole registry (useful when building a piece-set picker):\n *\n * ```tsx\n * import { pieceSets } from \"gigaboard/pieces\";\n * ```\n *\n * ### Custom chess.com styles\n *\n * chess.com hosts ~25 piece styles — if one of them isn't exported here\n * you can plug its slug into {@link chesscomPieceUrls} and build the\n * renderer yourself:\n *\n * ```tsx\n * import { chesscomPieceUrls, createImagePieceSet } from \"gigaboard/pieces\";\n * const marble = createImagePieceSet(chesscomPieceUrls(\"marble\"));\n * ```\n */\n\nimport { alpha } from \"./sets/alpha.js\";\nimport { cburnett } from \"./sets/cburnett.js\";\nimport { chesscom } from \"./sets/chesscom.js\";\nimport { merida } from \"./sets/merida.js\";\nimport { neo } from \"./sets/neo.js\";\n\nexport type {\n PieceRenderer,\n PieceUrlTable,\n} from \"./create-image-piece-set.js\";\nexport {\n BOARD_CELL_KEY,\n chesscomPieceUrls,\n createImagePieceSet,\n} from \"./create-image-piece-set.js\";\nexport { alpha, cburnett, chesscom, merida, neo };\n\n/** Registry of every built-in set. Handy when building piece-set pickers. */\nexport const pieceSets = Object.freeze({\n alpha,\n cburnett,\n chesscom,\n merida,\n neo,\n});\n\n/** Union of built-in piece-set names. */\nexport type PieceSetName = keyof typeof pieceSets;\n\nexport const PACKAGE_VERSION = \"0.1.0-alpha\";\n"]}
@@ -0,0 +1,21 @@
1
+ import { P as PieceRenderer } from './create-image-piece-set-BcmRKGql.cjs';
2
+ export { B as BOARD_CELL_KEY, a as PieceUrlTable, c as chesscomPieceUrls, b as createImagePieceSet } from './create-image-piece-set-BcmRKGql.cjs';
3
+ export { alpha } from './pieces/alpha.cjs';
4
+ export { cburnett } from './pieces/cburnett.cjs';
5
+ export { neo as chesscom, neo } from './pieces/neo.cjs';
6
+ export { merida } from './pieces/merida.cjs';
7
+ import 'react';
8
+
9
+ /** Registry of every built-in set. Handy when building piece-set pickers. */
10
+ declare const pieceSets: Readonly<{
11
+ alpha: PieceRenderer;
12
+ cburnett: PieceRenderer;
13
+ chesscom: PieceRenderer;
14
+ merida: PieceRenderer;
15
+ neo: PieceRenderer;
16
+ }>;
17
+ /** Union of built-in piece-set names. */
18
+ type PieceSetName = keyof typeof pieceSets;
19
+ declare const PACKAGE_VERSION = "0.1.0-alpha";
20
+
21
+ export { PACKAGE_VERSION, PieceRenderer, type PieceSetName, pieceSets };
@@ -0,0 +1,21 @@
1
+ import { P as PieceRenderer } from './create-image-piece-set-BcmRKGql.js';
2
+ export { B as BOARD_CELL_KEY, a as PieceUrlTable, c as chesscomPieceUrls, b as createImagePieceSet } from './create-image-piece-set-BcmRKGql.js';
3
+ export { alpha } from './pieces/alpha.js';
4
+ export { cburnett } from './pieces/cburnett.js';
5
+ export { neo as chesscom, neo } from './pieces/neo.js';
6
+ export { merida } from './pieces/merida.js';
7
+ import 'react';
8
+
9
+ /** Registry of every built-in set. Handy when building piece-set pickers. */
10
+ declare const pieceSets: Readonly<{
11
+ alpha: PieceRenderer;
12
+ cburnett: PieceRenderer;
13
+ chesscom: PieceRenderer;
14
+ merida: PieceRenderer;
15
+ neo: PieceRenderer;
16
+ }>;
17
+ /** Union of built-in piece-set names. */
18
+ type PieceSetName = keyof typeof pieceSets;
19
+ declare const PACKAGE_VERSION = "0.1.0-alpha";
20
+
21
+ export { PACKAGE_VERSION, PieceRenderer, type PieceSetName, pieceSets };
package/dist/pieces.js ADDED
@@ -0,0 +1,24 @@
1
+ import { alpha } from './chunk-BFN5JI3T.js';
2
+ export { alpha } from './chunk-BFN5JI3T.js';
3
+ import './chunk-3HNIF4ZE.js';
4
+ import { neo } from './chunk-U6WAD322.js';
5
+ export { neo as chesscom, neo } from './chunk-U6WAD322.js';
6
+ import { cburnett } from './chunk-KW56FEBY.js';
7
+ export { cburnett } from './chunk-KW56FEBY.js';
8
+ import { merida } from './chunk-EOSX5UX3.js';
9
+ export { merida } from './chunk-EOSX5UX3.js';
10
+ export { BOARD_CELL_KEY, chesscomPieceUrls, createImagePieceSet } from './chunk-44YKPXXT.js';
11
+
12
+ // src/pieces/index.ts
13
+ var pieceSets = Object.freeze({
14
+ alpha,
15
+ cburnett,
16
+ chesscom: neo,
17
+ merida,
18
+ neo
19
+ });
20
+ var PACKAGE_VERSION = "0.1.0-alpha";
21
+
22
+ export { PACKAGE_VERSION, pieceSets };
23
+ //# sourceMappingURL=pieces.js.map
24
+ //# sourceMappingURL=pieces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/pieces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAyDO,IAAM,SAAA,GAAY,OAAO,MAAA,CAAO;AAAA,EACrC,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA,EAAA,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAC;AAKM,IAAM,eAAA,GAAkB","file":"pieces.js","sourcesContent":["/**\n * `gigaboard/pieces` — piece renderers for `<Chessboard/>`.\n *\n * Every set is a URL-backed `PieceRenderer` built by\n * {@link createImagePieceSet}. Ships **image** pieces (chess.com's public\n * PNG CDN by default) rather than inline SVG so the JS budget stays under\n * 1 KB per set — the pixels live in the browser's image cache, not in\n * your bundle.\n *\n * ### Tree-shaking\n *\n * Import a specific set from its sub-path to keep your bundle minimal:\n *\n * ```tsx\n * import { neo } from \"gigaboard/pieces/neo\"; // chess.com default\n * import { chesscom } from \"gigaboard/pieces/chesscom\"; // alias of `neo`\n * import { alpha } from \"gigaboard/pieces/alpha\";\n * import { cburnett } from \"gigaboard/pieces/cburnett\";\n * import { merida } from \"gigaboard/pieces/merida\";\n * ```\n *\n * Or bring the whole registry (useful when building a piece-set picker):\n *\n * ```tsx\n * import { pieceSets } from \"gigaboard/pieces\";\n * ```\n *\n * ### Custom chess.com styles\n *\n * chess.com hosts ~25 piece styles — if one of them isn't exported here\n * you can plug its slug into {@link chesscomPieceUrls} and build the\n * renderer yourself:\n *\n * ```tsx\n * import { chesscomPieceUrls, createImagePieceSet } from \"gigaboard/pieces\";\n * const marble = createImagePieceSet(chesscomPieceUrls(\"marble\"));\n * ```\n */\n\nimport { alpha } from \"./sets/alpha.js\";\nimport { cburnett } from \"./sets/cburnett.js\";\nimport { chesscom } from \"./sets/chesscom.js\";\nimport { merida } from \"./sets/merida.js\";\nimport { neo } from \"./sets/neo.js\";\n\nexport type {\n PieceRenderer,\n PieceUrlTable,\n} from \"./create-image-piece-set.js\";\nexport {\n BOARD_CELL_KEY,\n chesscomPieceUrls,\n createImagePieceSet,\n} from \"./create-image-piece-set.js\";\nexport { alpha, cburnett, chesscom, merida, neo };\n\n/** Registry of every built-in set. Handy when building piece-set pickers. */\nexport const pieceSets = Object.freeze({\n alpha,\n cburnett,\n chesscom,\n merida,\n neo,\n});\n\n/** Union of built-in piece-set names. */\nexport type PieceSetName = keyof typeof pieceSets;\n\nexport const PACKAGE_VERSION = \"0.1.0-alpha\";\n"]}
@@ -0,0 +1,207 @@
1
+ 'use strict';
2
+
3
+ var chunkI4BQGFP5_cjs = require('./chunk-I4BQGFP5.cjs');
4
+ require('./chunk-G6ZFOJZR.cjs');
5
+ require('./chunk-AYVQCHSG.cjs');
6
+ require('./chunk-FNRS6YJI.cjs');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function algebraicOf(index) {
10
+ const file = index & 7;
11
+ const rank = index >> 3;
12
+ return `${String.fromCharCode(97 + file)}${rank + 1}`;
13
+ }
14
+ function positionOf(index, orientation) {
15
+ const file = index & 7;
16
+ const rank = index >> 3;
17
+ const col = orientation === "white" ? file : 7 - file;
18
+ const row = orientation === "white" ? 7 - rank : rank;
19
+ return { x: col * 12.5, y: row * 12.5 };
20
+ }
21
+ function StaticChessboard(props) {
22
+ const {
23
+ fen,
24
+ orientation = "white",
25
+ theme = chunkI4BQGFP5_cjs.defaultTheme,
26
+ pieces = chunkI4BQGFP5_cjs.defaultPieces,
27
+ showCoordinates = true,
28
+ style,
29
+ className,
30
+ ariaLabel = "Chess position"
31
+ } = props;
32
+ const board = chunkI4BQGFP5_cjs.parseFenPlacement(fen);
33
+ const squares = buildSquareOrder(orientation);
34
+ const containerStyle = {
35
+ position: "relative",
36
+ aspectRatio: "1 / 1",
37
+ width: "100%",
38
+ ...theme,
39
+ ...style
40
+ };
41
+ return /* @__PURE__ */ jsxRuntime.jsxs(
42
+ "div",
43
+ {
44
+ className,
45
+ style: containerStyle,
46
+ "data-gb-orientation": orientation,
47
+ "data-gb-static": "true",
48
+ children: [
49
+ /* @__PURE__ */ jsxRuntime.jsx(
50
+ "div",
51
+ {
52
+ role: "grid",
53
+ "aria-label": ariaLabel,
54
+ "aria-rowcount": 8,
55
+ "aria-colcount": 8,
56
+ "aria-readonly": "true",
57
+ style: {
58
+ position: "absolute",
59
+ inset: 0,
60
+ display: "grid",
61
+ gridTemplateColumns: "repeat(8, 1fr)",
62
+ gridTemplateRows: "repeat(8, 1fr)"
63
+ },
64
+ children: squares.map((index) => {
65
+ const file = index & 7;
66
+ const rank = index >> 3;
67
+ const isLight = (file + rank) % 2 === 1;
68
+ return /* @__PURE__ */ jsxRuntime.jsx(
69
+ "div",
70
+ {
71
+ role: "gridcell",
72
+ "aria-label": algebraicOf(index),
73
+ "aria-rowindex": rank + 1,
74
+ "aria-colindex": file + 1,
75
+ "data-square": algebraicOf(index),
76
+ "data-light": isLight ? "true" : "false",
77
+ style: {
78
+ background: `var(${isLight ? chunkI4BQGFP5_cjs.CSS_VARS.SQ_LIGHT : chunkI4BQGFP5_cjs.CSS_VARS.SQ_DARK})`,
79
+ userSelect: "none",
80
+ containerType: "size"
81
+ }
82
+ },
83
+ index
84
+ );
85
+ })
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsxRuntime.jsx(
89
+ "div",
90
+ {
91
+ "aria-hidden": "true",
92
+ style: {
93
+ position: "absolute",
94
+ inset: 0,
95
+ pointerEvents: "none"
96
+ },
97
+ children: Array.from({ length: 64 }, (_, i) => {
98
+ const cell = board[i];
99
+ if (cell === 0) return null;
100
+ const idx = i;
101
+ const square = algebraicOf(idx);
102
+ const { x, y } = positionOf(idx, orientation);
103
+ return /* @__PURE__ */ jsxRuntime.jsx(
104
+ "div",
105
+ {
106
+ "data-piece-square": square,
107
+ "data-piece-cell": cell,
108
+ style: {
109
+ position: "absolute",
110
+ left: `${x}%`,
111
+ top: `${y}%`,
112
+ width: "12.5%",
113
+ height: "12.5%",
114
+ display: "flex",
115
+ alignItems: "center",
116
+ justifyContent: "center",
117
+ containerType: "size"
118
+ },
119
+ children: pieces({ cell, square: idx })
120
+ },
121
+ square
122
+ );
123
+ })
124
+ }
125
+ ),
126
+ showCoordinates ? /* @__PURE__ */ jsxRuntime.jsx(StaticCoordinates, { orientation }) : null
127
+ ]
128
+ }
129
+ );
130
+ }
131
+ function buildSquareOrder(orientation) {
132
+ const squares = [];
133
+ if (orientation === "white") {
134
+ for (let rank = 7; rank >= 0; rank--) {
135
+ for (let file = 0; file < 8; file++) {
136
+ squares.push(rank * 8 + file);
137
+ }
138
+ }
139
+ } else {
140
+ for (let rank = 0; rank < 8; rank++) {
141
+ for (let file = 7; file >= 0; file--) {
142
+ squares.push(rank * 8 + file);
143
+ }
144
+ }
145
+ }
146
+ return squares;
147
+ }
148
+ var FILE_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h"];
149
+ function StaticCoordinates({ orientation }) {
150
+ return /* @__PURE__ */ jsxRuntime.jsxs(
151
+ "div",
152
+ {
153
+ "aria-hidden": "true",
154
+ style: {
155
+ position: "absolute",
156
+ inset: 0,
157
+ pointerEvents: "none",
158
+ fontSize: "min(1.6vmin, 11px)",
159
+ fontWeight: 600,
160
+ fontFamily: "system-ui, -apple-system, sans-serif"
161
+ },
162
+ children: [
163
+ FILE_LETTERS.map((letter, idx) => {
164
+ const col = orientation === "white" ? idx : 7 - idx;
165
+ const bottomRank = orientation === "white" ? 0 : 7;
166
+ const isLightSquare = (col + bottomRank) % 2 === 1;
167
+ return /* @__PURE__ */ jsxRuntime.jsx(
168
+ "span",
169
+ {
170
+ style: {
171
+ position: "absolute",
172
+ left: `${col * 12.5 + 10}%`,
173
+ bottom: "1%",
174
+ color: `var(${isLightSquare ? chunkI4BQGFP5_cjs.CSS_VARS.COORDINATE_LIGHT : chunkI4BQGFP5_cjs.CSS_VARS.COORDINATE_DARK})`
175
+ },
176
+ children: letter
177
+ },
178
+ `file-${letter}`
179
+ );
180
+ }),
181
+ FILE_LETTERS.map((_, idx) => {
182
+ const rank = idx;
183
+ const row = orientation === "white" ? 7 - rank : rank;
184
+ const leftFile = orientation === "white" ? 0 : 7;
185
+ const isLightSquare = (leftFile + rank) % 2 === 1;
186
+ return /* @__PURE__ */ jsxRuntime.jsx(
187
+ "span",
188
+ {
189
+ style: {
190
+ position: "absolute",
191
+ top: `${row * 12.5 + 1}%`,
192
+ left: "1%",
193
+ color: `var(${isLightSquare ? chunkI4BQGFP5_cjs.CSS_VARS.COORDINATE_LIGHT : chunkI4BQGFP5_cjs.CSS_VARS.COORDINATE_DARK})`
194
+ },
195
+ children: rank + 1
196
+ },
197
+ `rank-${rank}`
198
+ );
199
+ })
200
+ ]
201
+ }
202
+ );
203
+ }
204
+
205
+ exports.StaticChessboard = StaticChessboard;
206
+ //# sourceMappingURL=server.cjs.map
207
+ //# sourceMappingURL=server.cjs.map