gigaboard 1.5.3 → 1.6.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.
Files changed (40) hide show
  1. package/README.md +18 -0
  2. package/dist/chunk-GL2OZMOW.js +79 -0
  3. package/dist/chunk-GL2OZMOW.js.map +1 -0
  4. package/dist/chunk-KTL53IC3.cjs +82 -0
  5. package/dist/chunk-KTL53IC3.cjs.map +1 -0
  6. package/dist/index.cjs +2 -0
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/pieces/giga-diagram.cjs +17 -0
  11. package/dist/pieces/giga-diagram.cjs.map +1 -0
  12. package/dist/pieces/giga-diagram.d.cts +11 -0
  13. package/dist/pieces/giga-diagram.d.ts +11 -0
  14. package/dist/pieces/giga-diagram.js +4 -0
  15. package/dist/pieces/giga-diagram.js.map +1 -0
  16. package/dist/pieces-svg/giga-diagram/bB.svg +23 -0
  17. package/dist/pieces-svg/giga-diagram/bK.svg +23 -0
  18. package/dist/pieces-svg/giga-diagram/bN.svg +20 -0
  19. package/dist/pieces-svg/giga-diagram/bP.svg +23 -0
  20. package/dist/pieces-svg/giga-diagram/bQ.svg +35 -0
  21. package/dist/pieces-svg/giga-diagram/bR.svg +20 -0
  22. package/dist/pieces-svg/giga-diagram/wB.svg +23 -0
  23. package/dist/pieces-svg/giga-diagram/wK.svg +23 -0
  24. package/dist/pieces-svg/giga-diagram/wN.svg +20 -0
  25. package/dist/pieces-svg/giga-diagram/wP.svg +23 -0
  26. package/dist/pieces-svg/giga-diagram/wQ.svg +35 -0
  27. package/dist/pieces-svg/giga-diagram/wR.svg +20 -0
  28. package/dist/pieces.cjs +7 -1
  29. package/dist/pieces.cjs.map +1 -1
  30. package/dist/pieces.d.cts +2 -0
  31. package/dist/pieces.d.ts +2 -0
  32. package/dist/pieces.js +4 -1
  33. package/dist/pieces.js.map +1 -1
  34. package/dist/server.cjs +1 -0
  35. package/dist/server.cjs.map +1 -1
  36. package/dist/server.js +1 -0
  37. package/dist/server.js.map +1 -1
  38. package/dist/themes.cjs +13 -13
  39. package/dist/themes.js +6 -6
  40. package/package.json +2 -2
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunkKTL53IC3_cjs = require('../chunk-KTL53IC3.cjs');
4
+ require('../chunk-FNRS6YJI.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "gigaDiagram", {
9
+ enumerable: true,
10
+ get: function () { return chunkKTL53IC3_cjs.gigaDiagram; }
11
+ });
12
+ Object.defineProperty(exports, "gigaDiagramSvg", {
13
+ enumerable: true,
14
+ get: function () { return chunkKTL53IC3_cjs.gigaDiagramSvg; }
15
+ });
16
+ //# sourceMappingURL=giga-diagram.cjs.map
17
+ //# sourceMappingURL=giga-diagram.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"giga-diagram.cjs"}
@@ -0,0 +1,11 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.cjs';
2
+ import 'react';
3
+
4
+ type GigaDiagramRole = "P" | "N" | "B" | "R" | "Q" | "K";
5
+ type GigaDiagramSide = "w" | "b";
6
+ /** The actual source SVG for a piece. No external artwork dependencies. */
7
+ declare function gigaDiagramSvg(role: GigaDiagramRole, side: GigaDiagramSide): string;
8
+ /** Select with <Chessboard pieces={gigaDiagram} />. */
9
+ declare const gigaDiagram: PieceRenderer;
10
+
11
+ export { type GigaDiagramRole, type GigaDiagramSide, gigaDiagram, gigaDiagramSvg };
@@ -0,0 +1,11 @@
1
+ import { P as PieceRenderer } from '../create-image-piece-set-BcmRKGql.js';
2
+ import 'react';
3
+
4
+ type GigaDiagramRole = "P" | "N" | "B" | "R" | "Q" | "K";
5
+ type GigaDiagramSide = "w" | "b";
6
+ /** The actual source SVG for a piece. No external artwork dependencies. */
7
+ declare function gigaDiagramSvg(role: GigaDiagramRole, side: GigaDiagramSide): string;
8
+ /** Select with <Chessboard pieces={gigaDiagram} />. */
9
+ declare const gigaDiagram: PieceRenderer;
10
+
11
+ export { type GigaDiagramRole, type GigaDiagramSide, gigaDiagram, gigaDiagramSvg };
@@ -0,0 +1,4 @@
1
+ export { gigaDiagram, gigaDiagramSvg } from '../chunk-GL2OZMOW.js';
2
+ import '../chunk-44YKPXXT.js';
3
+ //# sourceMappingURL=giga-diagram.js.map
4
+ //# sourceMappingURL=giga-diagram.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"giga-diagram.js"}
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black Bishop">
2
+ <title>Black Bishop — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.893617) translate(-50 -94)"><defs><clipPath id="body"><path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z"/></clipPath></defs>
14
+ <path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M52 20 C63 32 74 41 71 55 C69 70 67 75 68 81 H46 C55 59 60 40 52 20Z" class="shade"/><path d="M43 27 C35 36 32 46 34 52 C35 56 38 48 40 41Z" class="highlight"/></g>
16
+ <path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z" class="edge"/><circle cx="50" cy="10" r="8.8" class="main"/>
17
+ <path d="M50 1.1999999999999993 A8.8 8.8 0 0 1 50 18.8 Q51.32 16.336 54.224000000000004 11.936 A8.8 8.8 0 0 0 50 1.1999999999999993Z" class="shade"/>
18
+ <ellipse cx="47.184" cy="6.656" rx="2.9920000000000004" ry="1.6720000000000002" transform="rotate(-29 47.184 6.656)" class="highlight"/>
19
+ <circle cx="50" cy="10" r="8.8" class="edge"/><path d="M54 26 L45 51" class="slash"/><defs><clipPath id="foot"><path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z"/></clipPath></defs>
20
+ <path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M52.5 79 H75 V92 H62.5Z" class="shade"/><path d="M31 82 H53 L46.5 84 H31Z" class="highlight"/></g>
22
+ <path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black King">
2
+ <title>Black King — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(0.910000 0.912088) translate(-50 -94)"><defs><clipPath id="body"><path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z"/></clipPath></defs>
14
+ <path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M54 33 C70 23 88 32 91 45 C92 60 83 70 80 79 H39 C61 66 77 49 80 34 C70 37 60 43 54 51Z" class="shade"/><path d="M16 43 C18 30 28 27 36 31 C29 32 21 40 19 50 C15 53 14 49 16 43Z" class="highlight"/></g>
16
+ <path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z" class="edge"/><circle cx="50" cy="16" r="11" class="main"/>
17
+ <path d="M50 5 A11 11 0 0 1 50 27 Q51.65 23.92 55.28 18.42 A11 11 0 0 0 50 5Z" class="shade"/>
18
+ <ellipse cx="46.48" cy="11.82" rx="3.74" ry="2.09" transform="rotate(-29 46.48 11.82)" class="highlight"/>
19
+ <circle cx="50" cy="16" r="11" class="edge"/><defs><clipPath id="foot"><path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z"/></clipPath></defs>
20
+ <path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M53.7 78 H87 V92 H68.5Z" class="shade"/><path d="M19 81 H54.440000000000005 L44.82 83 H19Z" class="highlight"/></g>
22
+ <path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black Knight">
2
+ <title>Black Knight — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.929412) translate(-50 -94)"><defs><clipPath id="body"><path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z"/></clipPath></defs>
14
+ <path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M46 15 C66 21 77 35 79 48 C80 63 78 73 82 80 H50 C60 67 64 46 59 32 C54 23 47 21 46 15Z" class="shade"/><path d="M22 44 L38 24 L38 18 Q31 25 23 33 L16 44 Q15 50 22 44Z" class="highlight"/></g>
16
+ <path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z" class="edge"/><path d="M40 30 Q45 28 48 31 Q45 35 39 34Z" class="detail-fill"/><circle cx="18.2" cy="47" r="1.7" class="detail-fill"/><path d="M23 53 C31 53 41 49 49 43" class="detail-line"/><defs><clipPath id="foot"><path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z"/></clipPath></defs>
17
+ <path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="main"/>
18
+ <g clip-path="url(#foot)"><path d="M54.2 79 H83 V92 H67Z" class="shade"/><path d="M25 82 H54.84 L46.519999999999996 84 H25Z" class="highlight"/></g>
19
+ <path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="edge"/></g>
20
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black Pawn">
2
+ <title>Black Pawn — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.130000 1.161616) translate(-50 -94)"><defs><clipPath id="body"><path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z"/></clipPath></defs>
14
+ <path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M51 58 H57 C57 69 63 77 70 87 H50 Q59 75 55 66Z" class="shade"/><path d="M43 65 C41 70 39 73 35 78 L35 83 L40 78Z" class="highlight"/></g>
16
+ <path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z" class="edge"/><circle cx="50" cy="48" r="11.5" class="main"/>
17
+ <path d="M50 36.5 A11.5 11.5 0 0 1 50 59.5 Q51.725 56.28 55.519999999999996 50.53 A11.5 11.5 0 0 0 50 36.5Z" class="shade"/>
18
+ <ellipse cx="46.32" cy="43.63" rx="3.91" ry="2.185" transform="rotate(-29 46.32 43.63)" class="highlight"/>
19
+ <circle cx="50" cy="48" r="11.5" class="edge"/><defs><clipPath id="foot"><path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z"/></clipPath></defs>
20
+ <path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M52.1 84 H71 V92 H60.5Z" class="shade"/><path d="M34 87 H52.52 L47.06 89 H34Z" class="highlight"/></g>
22
+ <path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,35 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black Queen">
2
+ <title>Black Queen — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.891304) translate(-50 -94)"><defs><clipPath id="body"><path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z"/></clipPath></defs>
14
+ <path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M48 17 L58 52 L72 25 L73 55 L85 35 L78 80 H44 L74 45 L59 65Z" class="shade"/><path d="M22 42 L29 54 L28 32 L41 58 L35 65Z" class="highlight"/></g>
16
+ <path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z" class="edge"/><circle cx="14" cy="33" r="6" class="main"/>
17
+ <path d="M14 27 A6 6 0 0 1 14 39 Q14.9 37.32 16.88 34.32 A6 6 0 0 0 14 27Z" class="shade"/>
18
+ <ellipse cx="12.08" cy="30.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 12.08 30.72)" class="highlight"/>
19
+ <circle cx="14" cy="33" r="6" class="edge"/><circle cx="30" cy="21" r="6" class="main"/>
20
+ <path d="M30 15 A6 6 0 0 1 30 27 Q30.9 25.32 32.88 22.32 A6 6 0 0 0 30 15Z" class="shade"/>
21
+ <ellipse cx="28.08" cy="18.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 28.08 18.72)" class="highlight"/>
22
+ <circle cx="30" cy="21" r="6" class="edge"/><circle cx="50" cy="10" r="6" class="main"/>
23
+ <path d="M50 4 A6 6 0 0 1 50 16 Q50.9 14.32 52.88 11.32 A6 6 0 0 0 50 4Z" class="shade"/>
24
+ <ellipse cx="48.08" cy="7.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 48.08 7.72)" class="highlight"/>
25
+ <circle cx="50" cy="10" r="6" class="edge"/><circle cx="70" cy="21" r="6" class="main"/>
26
+ <path d="M70 15 A6 6 0 0 1 70 27 Q70.9 25.32 72.88 22.32 A6 6 0 0 0 70 15Z" class="shade"/>
27
+ <ellipse cx="68.08" cy="18.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 68.08 18.72)" class="highlight"/>
28
+ <circle cx="70" cy="21" r="6" class="edge"/><circle cx="86" cy="33" r="6" class="main"/>
29
+ <path d="M86 27 A6 6 0 0 1 86 39 Q86.9 37.32 88.88 34.32 A6 6 0 0 0 86 27Z" class="shade"/>
30
+ <ellipse cx="84.08" cy="30.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 84.08 30.72)" class="highlight"/>
31
+ <circle cx="86" cy="33" r="6" class="edge"/><defs><clipPath id="foot"><path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z"/></clipPath></defs>
32
+ <path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="main"/>
33
+ <g clip-path="url(#foot)"><path d="M53.1 79 H81 V92 H65.5Z" class="shade"/><path d="M25 82 H53.720000000000006 L45.66 84 H25Z" class="highlight"/></g>
34
+ <path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="edge"/></g>
35
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="Black Rook">
2
+ <title>Black Rook — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#4e5053;stroke:none}
5
+ .edge{fill:none;stroke:#090b0c;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#2d2f31}
7
+ .highlight{fill:#898b8f}
8
+ .medium{fill:#616367}
9
+ .detail-fill{fill:#0b0d0e}
10
+ .detail-line{fill:none;stroke:#0b0d0e;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#0b0d0e;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.040000 1.164179) translate(-50 -94)"><defs><clipPath id="body"><path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z"/></clipPath></defs>
14
+ <path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M58 30 H75 V50 L69 56 L72 80 H54 L60 52Z" class="shade"/><path d="M29 35 H33 V43 H29Z M33 58 L31 73 H36 L38 58Z" class="highlight"/></g>
16
+ <path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z" class="edge"/><defs><clipPath id="foot"><path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z"/></clipPath></defs>
17
+ <path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z" class="main"/>
18
+ <g clip-path="url(#foot)"><path d="M53 79 H80 V92 H65Z" class="shade"/><path d="M26 82 H53.6 L45.8 84 H26Z" class="highlight"/></g>
19
+ <path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z" class="edge"/></g>
20
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White Bishop">
2
+ <title>White Bishop — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.893617) translate(-50 -94)"><defs><clipPath id="body"><path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z"/></clipPath></defs>
14
+ <path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M52 20 C63 32 74 41 71 55 C69 70 67 75 68 81 H46 C55 59 60 40 52 20Z" class="shade"/><path d="M43 27 C35 36 32 46 34 52 C35 56 38 48 40 41Z" class="highlight"/></g>
16
+ <path d="M50 18 C58 23 72 38 72 52 C72 63 66 69 68 79 H32 C34 69 28 63 28 52 C28 38 42 23 50 18Z" class="edge"/><circle cx="50" cy="10" r="8.8" class="main"/>
17
+ <path d="M50 1.1999999999999993 A8.8 8.8 0 0 1 50 18.8 Q51.32 16.336 54.224000000000004 11.936 A8.8 8.8 0 0 0 50 1.1999999999999993Z" class="shade"/>
18
+ <ellipse cx="47.184" cy="6.656" rx="2.9920000000000004" ry="1.6720000000000002" transform="rotate(-29 47.184 6.656)" class="highlight"/>
19
+ <circle cx="50" cy="10" r="8.8" class="edge"/><path d="M54 26 L45 51" class="slash"/><defs><clipPath id="foot"><path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z"/></clipPath></defs>
20
+ <path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M52.5 79 H75 V92 H62.5Z" class="shade"/><path d="M31 82 H53 L46.5 84 H31Z" class="highlight"/></g>
22
+ <path d="M30 79 H70 Q75 79 75 84 V87 Q75 92 70 92 H30 Q25 92 25 87 V84 Q25 79 30 79Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White King">
2
+ <title>White King — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(0.910000 0.912088) translate(-50 -94)"><defs><clipPath id="body"><path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z"/></clipPath></defs>
14
+ <path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M54 33 C70 23 88 32 91 45 C92 60 83 70 80 79 H39 C61 66 77 49 80 34 C70 37 60 43 54 51Z" class="shade"/><path d="M16 43 C18 30 28 27 36 31 C29 32 21 40 19 50 C15 53 14 49 16 43Z" class="highlight"/></g>
16
+ <path d="M20 78 C12 68 6 57 9 43 C11 29 21 24 32 25 C40 25 46 30 50 37 C54 30 60 25 68 25 C79 24 89 29 91 43 C94 57 88 68 80 78Z" class="edge"/><circle cx="50" cy="16" r="11" class="main"/>
17
+ <path d="M50 5 A11 11 0 0 1 50 27 Q51.65 23.92 55.28 18.42 A11 11 0 0 0 50 5Z" class="shade"/>
18
+ <ellipse cx="46.48" cy="11.82" rx="3.74" ry="2.09" transform="rotate(-29 46.48 11.82)" class="highlight"/>
19
+ <circle cx="50" cy="16" r="11" class="edge"/><defs><clipPath id="foot"><path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z"/></clipPath></defs>
20
+ <path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M53.7 78 H87 V92 H68.5Z" class="shade"/><path d="M19 81 H54.440000000000005 L44.82 83 H19Z" class="highlight"/></g>
22
+ <path d="M18 78 H82 Q87 78 87 83 V87 Q87 92 82 92 H18 Q13 92 13 87 V83 Q13 78 18 78Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White Knight">
2
+ <title>White Knight — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.929412) translate(-50 -94)"><defs><clipPath id="body"><path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z"/></clipPath></defs>
14
+ <path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M46 15 C66 21 77 35 79 48 C80 63 78 73 82 80 H50 C60 67 64 46 59 32 C54 23 47 21 46 15Z" class="shade"/><path d="M22 44 L38 24 L38 18 Q31 25 23 33 L16 44 Q15 50 22 44Z" class="highlight"/></g>
16
+ <path d="M20 79 C22 70 30 61 43 53 C35 57 24 60 18 56 C11 53 10 48 15 42 L32 23 L34 11 L44 14 C65 18 77 29 79 47 C82 62 77 71 81 79Z" class="edge"/><path d="M40 30 Q45 28 48 31 Q45 35 39 34Z" class="detail-fill"/><circle cx="18.2" cy="47" r="1.7" class="detail-fill"/><path d="M23 53 C31 53 41 49 49 43" class="detail-line"/><defs><clipPath id="foot"><path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z"/></clipPath></defs>
17
+ <path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="main"/>
18
+ <g clip-path="url(#foot)"><path d="M54.2 79 H83 V92 H67Z" class="shade"/><path d="M25 82 H54.84 L46.519999999999996 84 H25Z" class="highlight"/></g>
19
+ <path d="M24 79 H78 Q83 79 83 84 V87 Q83 92 78 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="edge"/></g>
20
+ </svg>
@@ -0,0 +1,23 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White Pawn">
2
+ <title>White Pawn — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.130000 1.161616) translate(-50 -94)"><defs><clipPath id="body"><path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z"/></clipPath></defs>
14
+ <path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M51 58 H57 C57 69 63 77 70 87 H50 Q59 75 55 66Z" class="shade"/><path d="M43 65 C41 70 39 73 35 78 L35 83 L40 78Z" class="highlight"/></g>
16
+ <path d="M44 58 H56 C56 68 61 75 68 82 L70 86 H30 L32 82 C39 75 44 68 44 58Z" class="edge"/><circle cx="50" cy="48" r="11.5" class="main"/>
17
+ <path d="M50 36.5 A11.5 11.5 0 0 1 50 59.5 Q51.725 56.28 55.519999999999996 50.53 A11.5 11.5 0 0 0 50 36.5Z" class="shade"/>
18
+ <ellipse cx="46.32" cy="43.63" rx="3.91" ry="2.185" transform="rotate(-29 46.32 43.63)" class="highlight"/>
19
+ <circle cx="50" cy="48" r="11.5" class="edge"/><defs><clipPath id="foot"><path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z"/></clipPath></defs>
20
+ <path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z" class="main"/>
21
+ <g clip-path="url(#foot)"><path d="M52.1 84 H71 V92 H60.5Z" class="shade"/><path d="M34 87 H52.52 L47.06 89 H34Z" class="highlight"/></g>
22
+ <path d="M33 84 H67 Q71 84 71 88 V88 Q71 92 67 92 H33 Q29 92 29 88 V88 Q29 84 33 84Z" class="edge"/></g>
23
+ </svg>
@@ -0,0 +1,35 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White Queen">
2
+ <title>White Queen — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.000000 0.891304) translate(-50 -94)"><defs><clipPath id="body"><path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z"/></clipPath></defs>
14
+ <path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M48 17 L58 52 L72 25 L73 55 L85 35 L78 80 H44 L74 45 L59 65Z" class="shade"/><path d="M22 42 L29 54 L28 32 L41 58 L35 65Z" class="highlight"/></g>
16
+ <path d="M14 34 L27 54 L28 24 L42 52 L50 14 L58 52 L72 24 L73 54 L86 34 L78 79 H22Z" class="edge"/><circle cx="14" cy="33" r="6" class="main"/>
17
+ <path d="M14 27 A6 6 0 0 1 14 39 Q14.9 37.32 16.88 34.32 A6 6 0 0 0 14 27Z" class="shade"/>
18
+ <ellipse cx="12.08" cy="30.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 12.08 30.72)" class="highlight"/>
19
+ <circle cx="14" cy="33" r="6" class="edge"/><circle cx="30" cy="21" r="6" class="main"/>
20
+ <path d="M30 15 A6 6 0 0 1 30 27 Q30.9 25.32 32.88 22.32 A6 6 0 0 0 30 15Z" class="shade"/>
21
+ <ellipse cx="28.08" cy="18.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 28.08 18.72)" class="highlight"/>
22
+ <circle cx="30" cy="21" r="6" class="edge"/><circle cx="50" cy="10" r="6" class="main"/>
23
+ <path d="M50 4 A6 6 0 0 1 50 16 Q50.9 14.32 52.88 11.32 A6 6 0 0 0 50 4Z" class="shade"/>
24
+ <ellipse cx="48.08" cy="7.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 48.08 7.72)" class="highlight"/>
25
+ <circle cx="50" cy="10" r="6" class="edge"/><circle cx="70" cy="21" r="6" class="main"/>
26
+ <path d="M70 15 A6 6 0 0 1 70 27 Q70.9 25.32 72.88 22.32 A6 6 0 0 0 70 15Z" class="shade"/>
27
+ <ellipse cx="68.08" cy="18.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 68.08 18.72)" class="highlight"/>
28
+ <circle cx="70" cy="21" r="6" class="edge"/><circle cx="86" cy="33" r="6" class="main"/>
29
+ <path d="M86 27 A6 6 0 0 1 86 39 Q86.9 37.32 88.88 34.32 A6 6 0 0 0 86 27Z" class="shade"/>
30
+ <ellipse cx="84.08" cy="30.72" rx="2.04" ry="1.1400000000000001" transform="rotate(-29 84.08 30.72)" class="highlight"/>
31
+ <circle cx="86" cy="33" r="6" class="edge"/><defs><clipPath id="foot"><path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z"/></clipPath></defs>
32
+ <path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="main"/>
33
+ <g clip-path="url(#foot)"><path d="M53.1 79 H81 V92 H65.5Z" class="shade"/><path d="M25 82 H53.720000000000006 L45.66 84 H25Z" class="highlight"/></g>
34
+ <path d="M24 79 H76 Q81 79 81 84 V87 Q81 92 76 92 H24 Q19 92 19 87 V84 Q19 79 24 79Z" class="edge"/></g>
35
+ </svg>
@@ -0,0 +1,20 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" aria-label="White Rook">
2
+ <title>White Rook — Giga Diagram</title>
3
+ <style>
4
+ .main{fill:#faf8f2;stroke:none}
5
+ .edge{fill:none;stroke:#121416;stroke-width:3.8;stroke-linejoin:round;stroke-linecap:round}
6
+ .shade{fill:#cecac2}
7
+ .highlight{fill:#ffffff}
8
+ .medium{fill:#e8e5de}
9
+ .detail-fill{fill:#191b1d}
10
+ .detail-line{fill:none;stroke:#191b1d;stroke-width:2.1;stroke-linecap:round}
11
+ .slash{fill:none;stroke:#191b1d;stroke-width:6;stroke-linecap:round}
12
+ </style>
13
+ <g transform="translate(50 94) scale(1.040000 1.164179) translate(-50 -94)"><defs><clipPath id="body"><path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z"/></clipPath></defs>
14
+ <path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z" class="main"/>
15
+ <g clip-path="url(#body)"><path d="M58 30 H75 V50 L69 56 L72 80 H54 L60 52Z" class="shade"/><path d="M29 35 H33 V43 H29Z M33 58 L31 73 H36 L38 58Z" class="highlight"/></g>
16
+ <path d="M25 29 H35 V39 H44 V29 H56 V39 H65 V29 H75 V48 L69 55 L72 79 H28 L31 55 L25 48Z" class="edge"/><defs><clipPath id="foot"><path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z"/></clipPath></defs>
17
+ <path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z" class="main"/>
18
+ <g clip-path="url(#foot)"><path d="M53 79 H80 V92 H65Z" class="shade"/><path d="M26 82 H53.6 L45.8 84 H26Z" class="highlight"/></g>
19
+ <path d="M25 79 H75 Q80 79 80 84 V87 Q80 92 75 92 H25 Q20 92 20 87 V84 Q20 79 25 79Z" class="edge"/></g>
20
+ </svg>
package/dist/pieces.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var chunkB2TBDDJN_cjs = require('./chunk-B2TBDDJN.cjs');
4
4
  require('./chunk-JQSBAWIZ.cjs');
5
+ var chunkKTL53IC3_cjs = require('./chunk-KTL53IC3.cjs');
5
6
  var chunkAYVQCHSG_cjs = require('./chunk-AYVQCHSG.cjs');
6
7
  var chunkN7ED2MZS_cjs = require('./chunk-N7ED2MZS.cjs');
7
8
  var chunkBWNBPN3P_cjs = require('./chunk-BWNBPN3P.cjs');
@@ -13,7 +14,8 @@ var pieceSets = Object.freeze({
13
14
  cburnett: chunkN7ED2MZS_cjs.cburnett,
14
15
  chesscom: chunkAYVQCHSG_cjs.neo,
15
16
  merida: chunkBWNBPN3P_cjs.merida,
16
- neo: chunkAYVQCHSG_cjs.neo
17
+ neo: chunkAYVQCHSG_cjs.neo,
18
+ gigaDiagram: chunkKTL53IC3_cjs.gigaDiagram
17
19
  });
18
20
  var PACKAGE_VERSION = "1.3.3";
19
21
 
@@ -21,6 +23,10 @@ Object.defineProperty(exports, "alpha", {
21
23
  enumerable: true,
22
24
  get: function () { return chunkB2TBDDJN_cjs.alpha; }
23
25
  });
26
+ Object.defineProperty(exports, "gigaDiagram", {
27
+ enumerable: true,
28
+ get: function () { return chunkKTL53IC3_cjs.gigaDiagram; }
29
+ });
24
30
  Object.defineProperty(exports, "chesscom", {
25
31
  enumerable: true,
26
32
  get: function () { return chunkAYVQCHSG_cjs.neo; }
@@ -1 +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 = \"1.3.3\";\n"]}
1
+ {"version":3,"sources":["../src/pieces/index.ts"],"names":["alpha","cburnett","neo","merida","gigaDiagram"],"mappings":";;;;;;;;;;;AA2DO,IAAM,SAAA,GAAY,OAAO,MAAA,CAAO;AAAA,SACrCA,uBAAA;AAAA,YACAC,0BAAA;AAAA,EACA,QAAA,EAAAC,qBAAA;AAAA,UACAC,wBAAA;AAAA,OACAD,qBAAA;AAAA,eACAE;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 * import { gigaDiagram } from \"gigaboard/pieces/giga-diagram\";\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 { gigaDiagram } from \"./sets/giga-diagram.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, gigaDiagram, 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 gigaDiagram,\n});\n\n/** Union of built-in piece-set names. */\nexport type PieceSetName = keyof typeof pieceSets;\n\nexport const PACKAGE_VERSION = \"1.3.3\";\n"]}
package/dist/pieces.d.cts CHANGED
@@ -3,6 +3,7 @@ export { B as BOARD_CELL_KEY, a as PieceUrlTable, c as chesscomPieceUrls, b as c
3
3
  export { alpha } from './pieces/alpha.cjs';
4
4
  export { cburnett } from './pieces/cburnett.cjs';
5
5
  export { neo as chesscom, neo } from './pieces/neo.cjs';
6
+ export { gigaDiagram } from './pieces/giga-diagram.cjs';
6
7
  export { merida } from './pieces/merida.cjs';
7
8
  import 'react';
8
9
 
@@ -13,6 +14,7 @@ declare const pieceSets: Readonly<{
13
14
  chesscom: PieceRenderer;
14
15
  merida: PieceRenderer;
15
16
  neo: PieceRenderer;
17
+ gigaDiagram: PieceRenderer;
16
18
  }>;
17
19
  /** Union of built-in piece-set names. */
18
20
  type PieceSetName = keyof typeof pieceSets;
package/dist/pieces.d.ts CHANGED
@@ -3,6 +3,7 @@ export { B as BOARD_CELL_KEY, a as PieceUrlTable, c as chesscomPieceUrls, b as c
3
3
  export { alpha } from './pieces/alpha.js';
4
4
  export { cburnett } from './pieces/cburnett.js';
5
5
  export { neo as chesscom, neo } from './pieces/neo.js';
6
+ export { gigaDiagram } from './pieces/giga-diagram.js';
6
7
  export { merida } from './pieces/merida.js';
7
8
  import 'react';
8
9
 
@@ -13,6 +14,7 @@ declare const pieceSets: Readonly<{
13
14
  chesscom: PieceRenderer;
14
15
  merida: PieceRenderer;
15
16
  neo: PieceRenderer;
17
+ gigaDiagram: PieceRenderer;
16
18
  }>;
17
19
  /** Union of built-in piece-set names. */
18
20
  type PieceSetName = keyof typeof pieceSets;
package/dist/pieces.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { alpha } from './chunk-BFN5JI3T.js';
2
2
  export { alpha } from './chunk-BFN5JI3T.js';
3
3
  import './chunk-3HNIF4ZE.js';
4
+ import { gigaDiagram } from './chunk-GL2OZMOW.js';
5
+ export { gigaDiagram } from './chunk-GL2OZMOW.js';
4
6
  import { neo } from './chunk-U6WAD322.js';
5
7
  export { neo as chesscom, neo } from './chunk-U6WAD322.js';
6
8
  import { cburnett } from './chunk-KW56FEBY.js';
@@ -15,7 +17,8 @@ var pieceSets = Object.freeze({
15
17
  cburnett,
16
18
  chesscom: neo,
17
19
  merida,
18
- neo
20
+ neo,
21
+ gigaDiagram
19
22
  });
20
23
  var PACKAGE_VERSION = "1.3.3";
21
24
 
@@ -1 +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 = \"1.3.3\";\n"]}
1
+ {"version":3,"sources":["../src/pieces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AA2DO,IAAM,SAAA,GAAY,OAAO,MAAA,CAAO;AAAA,EACrC,KAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA,EAAA,GAAA;AAAA,EACA,MAAA;AAAA,EACA,GAAA;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 * import { gigaDiagram } from \"gigaboard/pieces/giga-diagram\";\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 { gigaDiagram } from \"./sets/giga-diagram.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, gigaDiagram, 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 gigaDiagram,\n});\n\n/** Union of built-in piece-set names. */\nexport type PieceSetName = keyof typeof pieceSets;\n\nexport const PACKAGE_VERSION = \"1.3.3\";\n"]}
package/dist/server.cjs CHANGED
@@ -45,6 +45,7 @@ function StaticChessboard(props) {
45
45
  style: containerStyle,
46
46
  "data-gb-orientation": orientation,
47
47
  "data-gb-static": "true",
48
+ dir: "ltr",
48
49
  children: [
49
50
  /* @__PURE__ */ jsxRuntime.jsx(
50
51
  "div",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.tsx"],"names":["defaultTheme","defaultPieces","parseFenPlacement","jsxs","jsx","CSS_VARS"],"mappings":";;;;;;;;AAoCA,SAAS,YAAY,KAAA,EAA4B;AAC/C,EAAA,MAAM,OAAO,KAAA,GAAQ,CAAA;AACrB,EAAA,MAAM,OAAO,KAAA,IAAS,CAAA;AACtB,EAAA,OAAO,CAAA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AAA,QAEJ,CAAC,CAAA;AAAA,QACA,YAAA,CAAa,GAAA,CAAI,CAAC,CAAA,EAAG,GAAA,KAAQ;AAC5B,UAAA,MAAM,IAAA,GAAO,GAAA;AACb,UAAA,MAAM,GAAA,GAAM,WAAA,KAAgB,OAAA,GAAU,CAAA,GAAI,IAAA,GAAO,IAAA;AACjD,UAAA,MAAM,QAAA,GAAW,WAAA,KAAgB,OAAA,GAAU,CAAA,GAAI,CAAA;AAC/C,UAAA,MAAM,aAAA,GAAA,CAAiB,QAAA,GAAW,IAAA,IAAQ,CAAA,KAAM,CAAA;AAChD,UAAA,uBACED,cAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cAEC,KAAA,EAAO;AAAA,gBACL,QAAA,EAAU,UAAA;AAAA,gBACV,GAAA,EAAK,CAAA,EAAG,GAAA,GAAM,IAAA,GAAO,CAAC,CAAA,CAAA,CAAA;AAAA,gBACtB,IAAA,EAAM,IAAA;AAAA,gBACN,OAAO,CAAA,IAAA,EAAO,aAAA,GAAgBC,0BAAA,CAAS,gBAAA,GAAmBA,2BAAS,eAAe,CAAA,CAAA;AAAA,eACpF;AAAA,cAEC,QAAA,EAAA,IAAA,GAAO;AAAA,aAAA;AAAA,YARH,QAAQ,IAAI,CAAA;AAAA,WASnB;AAAA,QAEJ,CAAC;AAAA;AAAA;AAAA,GACH;AAEJ","file":"server.cjs","sourcesContent":["/**\n * `gigaboard/server` — server-only static board.\n *\n * Ships **zero** client JavaScript. No hooks, no state, no event handlers,\n * no imports of any client module. Imports only:\n *\n * - `default-theme.ts`\n * - `default-pieces.tsx`\n * - `types.ts` (types only)\n *\n * Perfect for PGN viewers, position diagrams in blog posts, shareable\n * board URLs, and anywhere a board doesn't need interaction. Renders\n * produce identical markup between Node and the browser so they hydrate\n * cleanly under an interactive `<Chessboard/>` if you later attach one.\n *\n * @example\n * ```tsx\n * import { StaticChessboard } from \"gigaboard/server\";\n *\n * export default function Page() {\n * return (\n * <StaticChessboard fen=\"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1\" />\n * );\n * }\n * ```\n */\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport type { BoardCell, SquareIndex } from \"./core/index.js\";\nimport { CSS_VARS, defaultTheme } from \"./default-theme.js\";\nimport { parseFenPlacement } from \"./fen.js\";\nimport { defaultPieces } from \"./pieces/default-pieces.js\";\nimport type { Orientation, PieceRenderer, Theme } from \"./types.js\";\n\n/* ============================================================ geometry */\n\nfunction algebraicOf(index: SquareIndex): string {\n const file = index & 7;\n const rank = index >> 3;\n return `${String.fromCharCode(0x61 + file)}${rank + 1}`;\n}\n\nfunction positionOf(index: SquareIndex, orientation: Orientation): { x: number; y: number } {\n const file = index & 7;\n const rank = index >> 3;\n const col = orientation === \"white\" ? file : 7 - file;\n const row = orientation === \"white\" ? 7 - rank : rank;\n return { x: col * 12.5, y: row * 12.5 };\n}\n\n/* ============================================================ component */\n\n/** Props for {@link StaticChessboard}. */\nexport interface StaticChessboardProps {\n /** Piece-placement FEN (first whitespace-delimited field is enough). */\n readonly fen: string;\n\n /** Board orientation. Defaults to `\"white\"`. */\n readonly orientation?: Orientation;\n\n /** Theme — defaults to the green palette from `gigaboard/themes`. */\n readonly theme?: Theme;\n\n /** Piece renderer — defaults to the `neo` set from `gigaboard/pieces`. */\n readonly pieces?: PieceRenderer;\n\n /** Show algebraic coordinate labels on the edges. Default `true`. */\n readonly showCoordinates?: boolean;\n\n /** Optional container style overrides. */\n readonly style?: CSSProperties;\n\n /** Optional class name on the outer container. */\n readonly className?: string;\n\n /** Accessible label. Default `\"Chess position\"`. */\n readonly ariaLabel?: string;\n}\n\n/**\n * Static board for server rendering. No interactivity; no client JS\n * shipped. Exactly the same visual layout as the interactive\n * `<Chessboard/>`, so a static SSR board can be swapped for an\n * interactive one on hydration without the markup shifting.\n */\nexport function StaticChessboard(props: StaticChessboardProps): ReactNode {\n const {\n fen,\n orientation = \"white\",\n theme = defaultTheme,\n pieces = defaultPieces,\n showCoordinates = true,\n style,\n className,\n ariaLabel = \"Chess position\",\n } = props;\n\n const board = parseFenPlacement(fen);\n const squares = buildSquareOrder(orientation);\n\n const containerStyle: CSSProperties = {\n position: \"relative\",\n aspectRatio: \"1 / 1\",\n width: \"100%\",\n ...(theme as CSSProperties),\n ...style,\n };\n\n return (\n <div\n className={className}\n style={containerStyle}\n data-gb-orientation={orientation}\n data-gb-static=\"true\"\n >\n {/* 8×8 grid of static squares — no event handlers, no tabindex. */}\n <div\n role=\"grid\"\n aria-label={ariaLabel}\n aria-rowcount={8}\n aria-colcount={8}\n aria-readonly=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"grid\",\n gridTemplateColumns: \"repeat(8, 1fr)\",\n gridTemplateRows: \"repeat(8, 1fr)\",\n }}\n >\n {squares.map((index) => {\n const file = index & 7;\n const rank = index >> 3;\n const isLight = (file + rank) % 2 === 1;\n return (\n <div\n key={index}\n role=\"gridcell\"\n aria-label={algebraicOf(index)}\n aria-rowindex={rank + 1}\n aria-colindex={file + 1}\n data-square={algebraicOf(index)}\n data-gb-square=\"\"\n data-light={isLight ? \"true\" : \"false\"}\n style={{\n position: \"relative\",\n backgroundColor: `var(${isLight ? CSS_VARS.SQ_LIGHT : CSS_VARS.SQ_DARK})`,\n backgroundImage: `var(${isLight ? CSS_VARS.SQ_LIGHT_IMAGE : CSS_VARS.SQ_DARK_IMAGE},none)`,\n backgroundSize: `var(${CSS_VARS.SQ_IMAGE_SIZE},cover)`,\n backgroundBlendMode: `var(${CSS_VARS.SQ_BLEND_MODE},normal)`,\n userSelect: \"none\",\n outline: \"none\",\n containerType: \"size\",\n }}\n />\n );\n })}\n </div>\n\n {/* Piece overlay — one div per occupied square. */}\n <div\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n }}\n >\n {Array.from({ length: 64 }, (_, i) => {\n const cell = board[i] as BoardCell;\n if (cell === 0) return null;\n const idx = i as SquareIndex;\n const square = algebraicOf(idx);\n const { x, y } = positionOf(idx, orientation);\n return (\n <div\n key={square}\n data-piece-square={square}\n data-piece-cell={cell}\n style={{\n position: \"absolute\",\n left: `${x}%`,\n top: `${y}%`,\n width: \"12.5%\",\n height: \"12.5%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n containerType: \"size\",\n filter: `var(${cell <= 6 ? CSS_VARS.PIECE_FILTER_WHITE : CSS_VARS.PIECE_FILTER_BLACK}, none)`,\n }}\n >\n {pieces({ cell, square: idx })}\n </div>\n );\n })}\n </div>\n\n {showCoordinates ? <StaticCoordinates orientation={orientation} /> : null}\n </div>\n );\n}\n\n/* ======================================================== subsidiary helpers */\n\n/** Same rank-first ordering used by the interactive BoardGrid. */\nfunction buildSquareOrder(orientation: Orientation): SquareIndex[] {\n const squares: SquareIndex[] = [];\n if (orientation === \"white\") {\n for (let rank = 7; rank >= 0; rank--) {\n for (let file = 0; file < 8; file++) {\n squares.push((rank * 8 + file) as SquareIndex);\n }\n }\n } else {\n for (let rank = 0; rank < 8; rank++) {\n for (let file = 7; file >= 0; file--) {\n squares.push((rank * 8 + file) as SquareIndex);\n }\n }\n }\n return squares;\n}\n\nconst FILE_LETTERS = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"] as const;\n\n/** Pure coordinate overlay — identical output to the interactive version. */\nfunction StaticCoordinates({ orientation }: { orientation: Orientation }): ReactNode {\n return (\n <div\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n fontSize: \"min(1.6vmin, 11px)\",\n fontWeight: 600,\n fontFamily: \"system-ui, -apple-system, sans-serif\",\n }}\n >\n {FILE_LETTERS.map((letter, idx) => {\n const col = orientation === \"white\" ? idx : 7 - idx;\n const bottomRank = orientation === \"white\" ? 0 : 7;\n const isLightSquare = (col + bottomRank) % 2 === 1;\n return (\n <span\n key={`file-${letter}`}\n style={{\n position: \"absolute\",\n left: `${col * 12.5 + 10}%`,\n bottom: \"1%\",\n color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`,\n }}\n >\n {letter}\n </span>\n );\n })}\n {FILE_LETTERS.map((_, idx) => {\n const rank = idx;\n const row = orientation === \"white\" ? 7 - rank : rank;\n const leftFile = orientation === \"white\" ? 0 : 7;\n const isLightSquare = (leftFile + rank) % 2 === 1;\n return (\n <span\n key={`rank-${rank}`}\n style={{\n position: \"absolute\",\n top: `${row * 12.5 + 1}%`,\n left: \"1%\",\n color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`,\n }}\n >\n {rank + 1}\n </span>\n );\n })}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/server.tsx"],"names":["defaultTheme","defaultPieces","parseFenPlacement","jsxs","jsx","CSS_VARS"],"mappings":";;;;;;;;AAoCA,SAAS,YAAY,KAAA,EAA4B;AAC/C,EAAA,MAAM,OAAO,KAAA,GAAQ,CAAA;AACrB,EAAA,MAAM,OAAO,KAAA,IAAS,CAAA;AACtB,EAAA,OAAO,CAAA,EAAG,OAAO,YAAA,CAAa,EAAA,GAAO,IAAI,CAAC,CAAA,EAAG,OAAO,CAAC,CAAA,CAAA;AACvD;AAEA,SAAS,UAAA,CAAW,OAAoB,WAAA,EAAoD;AAC1F,EAAA,MAAM,OAAO,KAAA,GAAQ,CAAA;AACrB,EAAA,MAAM,OAAO,KAAA,IAAS,CAAA;AACtB,EAAA,MAAM,GAAA,GAAM,WAAA,KAAgB,OAAA,GAAU,IAAA,GAAO,CAAA,GAAI,IAAA;AACjD,EAAA,MAAM,GAAA,GAAM,WAAA,KAAgB,OAAA,GAAU,CAAA,GAAI,IAAA,GAAO,IAAA;AACjD,EAAA,OAAO,EAAE,CAAA,EAAG,GAAA,GAAM,IAAA,EAAM,CAAA,EAAG,MAAM,IAAA,EAAK;AACxC;AAqCO,SAAS,iBAAiB,KAAA,EAAyC;AACxE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CAAA,EAAG,GAAA,GAAM,IAAA,GAAO,CAAC,CAAA,CAAA,CAAA;AAAA,gBACtB,IAAA,EAAM,IAAA;AAAA,gBACN,OAAO,CAAA,IAAA,EAAO,aAAA,GAAgBC,0BAAA,CAAS,gBAAA,GAAmBA,2BAAS,eAAe,CAAA,CAAA;AAAA,eACpF;AAAA,cAEC,QAAA,EAAA,IAAA,GAAO;AAAA,aAAA;AAAA,YARH,QAAQ,IAAI,CAAA;AAAA,WASnB;AAAA,QAEJ,CAAC;AAAA;AAAA;AAAA,GACH;AAEJ","file":"server.cjs","sourcesContent":["/**\n * `gigaboard/server` — server-only static board.\n *\n * Ships **zero** client JavaScript. No hooks, no state, no event handlers,\n * no imports of any client module. Imports only:\n *\n * - `default-theme.ts`\n * - `default-pieces.tsx`\n * - `types.ts` (types only)\n *\n * Perfect for PGN viewers, position diagrams in blog posts, shareable\n * board URLs, and anywhere a board doesn't need interaction. Renders\n * produce identical markup between Node and the browser so they hydrate\n * cleanly under an interactive `<Chessboard/>` if you later attach one.\n *\n * @example\n * ```tsx\n * import { StaticChessboard } from \"gigaboard/server\";\n *\n * export default function Page() {\n * return (\n * <StaticChessboard fen=\"rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1\" />\n * );\n * }\n * ```\n */\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport type { BoardCell, SquareIndex } from \"./core/index.js\";\nimport { CSS_VARS, defaultTheme } from \"./default-theme.js\";\nimport { parseFenPlacement } from \"./fen.js\";\nimport { defaultPieces } from \"./pieces/default-pieces.js\";\nimport type { Orientation, PieceRenderer, Theme } from \"./types.js\";\n\n/* ============================================================ geometry */\n\nfunction algebraicOf(index: SquareIndex): string {\n const file = index & 7;\n const rank = index >> 3;\n return `${String.fromCharCode(0x61 + file)}${rank + 1}`;\n}\n\nfunction positionOf(index: SquareIndex, orientation: Orientation): { x: number; y: number } {\n const file = index & 7;\n const rank = index >> 3;\n const col = orientation === \"white\" ? file : 7 - file;\n const row = orientation === \"white\" ? 7 - rank : rank;\n return { x: col * 12.5, y: row * 12.5 };\n}\n\n/* ============================================================ component */\n\n/** Props for {@link StaticChessboard}. */\nexport interface StaticChessboardProps {\n /** Piece-placement FEN (first whitespace-delimited field is enough). */\n readonly fen: string;\n\n /** Board orientation. Defaults to `\"white\"`. */\n readonly orientation?: Orientation;\n\n /** Theme — defaults to the green palette from `gigaboard/themes`. */\n readonly theme?: Theme;\n\n /** Piece renderer — defaults to the `neo` set from `gigaboard/pieces`. */\n readonly pieces?: PieceRenderer;\n\n /** Show algebraic coordinate labels on the edges. Default `true`. */\n readonly showCoordinates?: boolean;\n\n /** Optional container style overrides. */\n readonly style?: CSSProperties;\n\n /** Optional class name on the outer container. */\n readonly className?: string;\n\n /** Accessible label. Default `\"Chess position\"`. */\n readonly ariaLabel?: string;\n}\n\n/**\n * Static board for server rendering. No interactivity; no client JS\n * shipped. Exactly the same visual layout as the interactive\n * `<Chessboard/>`, so a static SSR board can be swapped for an\n * interactive one on hydration without the markup shifting.\n */\nexport function StaticChessboard(props: StaticChessboardProps): ReactNode {\n const {\n fen,\n orientation = \"white\",\n theme = defaultTheme,\n pieces = defaultPieces,\n showCoordinates = true,\n style,\n className,\n ariaLabel = \"Chess position\",\n } = props;\n\n const board = parseFenPlacement(fen);\n const squares = buildSquareOrder(orientation);\n\n const containerStyle: CSSProperties = {\n position: \"relative\",\n aspectRatio: \"1 / 1\",\n width: \"100%\",\n ...(theme as CSSProperties),\n ...style,\n };\n\n return (\n <div\n className={className}\n style={containerStyle}\n data-gb-orientation={orientation}\n data-gb-static=\"true\"\n dir=\"ltr\"\n >\n {/* 8×8 grid of static squares — no event handlers, no tabindex. */}\n <div\n role=\"grid\"\n aria-label={ariaLabel}\n aria-rowcount={8}\n aria-colcount={8}\n aria-readonly=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"grid\",\n gridTemplateColumns: \"repeat(8, 1fr)\",\n gridTemplateRows: \"repeat(8, 1fr)\",\n }}\n >\n {squares.map((index) => {\n const file = index & 7;\n const rank = index >> 3;\n const isLight = (file + rank) % 2 === 1;\n return (\n <div\n key={index}\n role=\"gridcell\"\n aria-label={algebraicOf(index)}\n aria-rowindex={rank + 1}\n aria-colindex={file + 1}\n data-square={algebraicOf(index)}\n data-gb-square=\"\"\n data-light={isLight ? \"true\" : \"false\"}\n style={{\n position: \"relative\",\n backgroundColor: `var(${isLight ? CSS_VARS.SQ_LIGHT : CSS_VARS.SQ_DARK})`,\n backgroundImage: `var(${isLight ? CSS_VARS.SQ_LIGHT_IMAGE : CSS_VARS.SQ_DARK_IMAGE},none)`,\n backgroundSize: `var(${CSS_VARS.SQ_IMAGE_SIZE},cover)`,\n backgroundBlendMode: `var(${CSS_VARS.SQ_BLEND_MODE},normal)`,\n userSelect: \"none\",\n outline: \"none\",\n containerType: \"size\",\n }}\n />\n );\n })}\n </div>\n\n {/* Piece overlay — one div per occupied square. */}\n <div\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n }}\n >\n {Array.from({ length: 64 }, (_, i) => {\n const cell = board[i] as BoardCell;\n if (cell === 0) return null;\n const idx = i as SquareIndex;\n const square = algebraicOf(idx);\n const { x, y } = positionOf(idx, orientation);\n return (\n <div\n key={square}\n data-piece-square={square}\n data-piece-cell={cell}\n style={{\n position: \"absolute\",\n left: `${x}%`,\n top: `${y}%`,\n width: \"12.5%\",\n height: \"12.5%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n containerType: \"size\",\n filter: `var(${cell <= 6 ? CSS_VARS.PIECE_FILTER_WHITE : CSS_VARS.PIECE_FILTER_BLACK}, none)`,\n }}\n >\n {pieces({ cell, square: idx })}\n </div>\n );\n })}\n </div>\n\n {showCoordinates ? <StaticCoordinates orientation={orientation} /> : null}\n </div>\n );\n}\n\n/* ======================================================== subsidiary helpers */\n\n/** Same rank-first ordering used by the interactive BoardGrid. */\nfunction buildSquareOrder(orientation: Orientation): SquareIndex[] {\n const squares: SquareIndex[] = [];\n if (orientation === \"white\") {\n for (let rank = 7; rank >= 0; rank--) {\n for (let file = 0; file < 8; file++) {\n squares.push((rank * 8 + file) as SquareIndex);\n }\n }\n } else {\n for (let rank = 0; rank < 8; rank++) {\n for (let file = 7; file >= 0; file--) {\n squares.push((rank * 8 + file) as SquareIndex);\n }\n }\n }\n return squares;\n}\n\nconst FILE_LETTERS = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\"] as const;\n\n/** Pure coordinate overlay — identical output to the interactive version. */\nfunction StaticCoordinates({ orientation }: { orientation: Orientation }): ReactNode {\n return (\n <div\n aria-hidden=\"true\"\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n fontSize: \"min(1.6vmin, 11px)\",\n fontWeight: 600,\n fontFamily: \"system-ui, -apple-system, sans-serif\",\n }}\n >\n {FILE_LETTERS.map((letter, idx) => {\n const col = orientation === \"white\" ? idx : 7 - idx;\n const bottomRank = orientation === \"white\" ? 0 : 7;\n const isLightSquare = (col + bottomRank) % 2 === 1;\n return (\n <span\n key={`file-${letter}`}\n style={{\n position: \"absolute\",\n left: `${col * 12.5 + 10}%`,\n bottom: \"1%\",\n color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`,\n }}\n >\n {letter}\n </span>\n );\n })}\n {FILE_LETTERS.map((_, idx) => {\n const rank = idx;\n const row = orientation === \"white\" ? 7 - rank : rank;\n const leftFile = orientation === \"white\" ? 0 : 7;\n const isLightSquare = (leftFile + rank) % 2 === 1;\n return (\n <span\n key={`rank-${rank}`}\n style={{\n position: \"absolute\",\n top: `${row * 12.5 + 1}%`,\n left: \"1%\",\n color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`,\n }}\n >\n {rank + 1}\n </span>\n );\n })}\n </div>\n );\n}\n"]}
package/dist/server.js CHANGED
@@ -43,6 +43,7 @@ function StaticChessboard(props) {
43
43
  style: containerStyle,
44
44
  "data-gb-orientation": orientation,
45
45
  "data-gb-static": "true",
46
+ dir: "ltr",
46
47
  children: [
47
48
  /* @__PURE__ */ jsx(
48
49
  "div",