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 @@
1
+ {"version":3,"sources":["../src/server.tsx"],"names":["defaultT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A,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-light={isLight ? \"true\" : \"false\"}\n style={{\n background: `var(${isLight ? CSS_VARS.SQ_LIGHT : CSS_VARS.SQ_DARK})`,\n userSelect: \"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 }}\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"]}
@@ -0,0 +1,60 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { O as Orientation, T as Theme, P as PieceRenderer } from './types-Bg2xiUHE.cjs';
3
+ import './board-model-BvJOtwQ3.cjs';
4
+ import 'web-haptics';
5
+
6
+ /**
7
+ * `gigaboard/server` — server-only static board.
8
+ *
9
+ * Ships **zero** client JavaScript. No hooks, no state, no event handlers,
10
+ * no imports of any client module. Imports only:
11
+ *
12
+ * - `default-theme.ts`
13
+ * - `default-pieces.tsx`
14
+ * - `types.ts` (types only)
15
+ *
16
+ * Perfect for PGN viewers, position diagrams in blog posts, shareable
17
+ * board URLs, and anywhere a board doesn't need interaction. Renders
18
+ * produce identical markup between Node and the browser so they hydrate
19
+ * cleanly under an interactive `<Chessboard/>` if you later attach one.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * import { StaticChessboard } from "gigaboard/server";
24
+ *
25
+ * export default function Page() {
26
+ * return (
27
+ * <StaticChessboard fen="rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1" />
28
+ * );
29
+ * }
30
+ * ```
31
+ */
32
+
33
+ /** Props for {@link StaticChessboard}. */
34
+ interface StaticChessboardProps {
35
+ /** Piece-placement FEN (first whitespace-delimited field is enough). */
36
+ readonly fen: string;
37
+ /** Board orientation. Defaults to `"white"`. */
38
+ readonly orientation?: Orientation;
39
+ /** Theme — defaults to the green palette from `gigaboard/themes`. */
40
+ readonly theme?: Theme;
41
+ /** Piece renderer — defaults to the `neo` set from `gigaboard/pieces`. */
42
+ readonly pieces?: PieceRenderer;
43
+ /** Show algebraic coordinate labels on the edges. Default `true`. */
44
+ readonly showCoordinates?: boolean;
45
+ /** Optional container style overrides. */
46
+ readonly style?: CSSProperties;
47
+ /** Optional class name on the outer container. */
48
+ readonly className?: string;
49
+ /** Accessible label. Default `"Chess position"`. */
50
+ readonly ariaLabel?: string;
51
+ }
52
+ /**
53
+ * Static board for server rendering. No interactivity; no client JS
54
+ * shipped. Exactly the same visual layout as the interactive
55
+ * `<Chessboard/>`, so a static SSR board can be swapped for an
56
+ * interactive one on hydration without the markup shifting.
57
+ */
58
+ declare function StaticChessboard(props: StaticChessboardProps): ReactNode;
59
+
60
+ export { StaticChessboard, type StaticChessboardProps };
@@ -0,0 +1,60 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { O as Orientation, T as Theme, P as PieceRenderer } from './types-D5eBJGzj.js';
3
+ import './board-model-BvJOtwQ3.js';
4
+ import 'web-haptics';
5
+
6
+ /**
7
+ * `gigaboard/server` — server-only static board.
8
+ *
9
+ * Ships **zero** client JavaScript. No hooks, no state, no event handlers,
10
+ * no imports of any client module. Imports only:
11
+ *
12
+ * - `default-theme.ts`
13
+ * - `default-pieces.tsx`
14
+ * - `types.ts` (types only)
15
+ *
16
+ * Perfect for PGN viewers, position diagrams in blog posts, shareable
17
+ * board URLs, and anywhere a board doesn't need interaction. Renders
18
+ * produce identical markup between Node and the browser so they hydrate
19
+ * cleanly under an interactive `<Chessboard/>` if you later attach one.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * import { StaticChessboard } from "gigaboard/server";
24
+ *
25
+ * export default function Page() {
26
+ * return (
27
+ * <StaticChessboard fen="rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1" />
28
+ * );
29
+ * }
30
+ * ```
31
+ */
32
+
33
+ /** Props for {@link StaticChessboard}. */
34
+ interface StaticChessboardProps {
35
+ /** Piece-placement FEN (first whitespace-delimited field is enough). */
36
+ readonly fen: string;
37
+ /** Board orientation. Defaults to `"white"`. */
38
+ readonly orientation?: Orientation;
39
+ /** Theme — defaults to the green palette from `gigaboard/themes`. */
40
+ readonly theme?: Theme;
41
+ /** Piece renderer — defaults to the `neo` set from `gigaboard/pieces`. */
42
+ readonly pieces?: PieceRenderer;
43
+ /** Show algebraic coordinate labels on the edges. Default `true`. */
44
+ readonly showCoordinates?: boolean;
45
+ /** Optional container style overrides. */
46
+ readonly style?: CSSProperties;
47
+ /** Optional class name on the outer container. */
48
+ readonly className?: string;
49
+ /** Accessible label. Default `"Chess position"`. */
50
+ readonly ariaLabel?: string;
51
+ }
52
+ /**
53
+ * Static board for server rendering. No interactivity; no client JS
54
+ * shipped. Exactly the same visual layout as the interactive
55
+ * `<Chessboard/>`, so a static SSR board can be swapped for an
56
+ * interactive one on hydration without the markup shifting.
57
+ */
58
+ declare function StaticChessboard(props: StaticChessboardProps): ReactNode;
59
+
60
+ export { StaticChessboard, type StaticChessboardProps };
package/dist/server.js ADDED
@@ -0,0 +1,205 @@
1
+ import { defaultTheme, defaultPieces, parseFenPlacement, CSS_VARS } from './chunk-CXDGJMYL.js';
2
+ import './chunk-OQLY5GJF.js';
3
+ import './chunk-U6WAD322.js';
4
+ import './chunk-44YKPXXT.js';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ function algebraicOf(index) {
8
+ const file = index & 7;
9
+ const rank = index >> 3;
10
+ return `${String.fromCharCode(97 + file)}${rank + 1}`;
11
+ }
12
+ function positionOf(index, orientation) {
13
+ const file = index & 7;
14
+ const rank = index >> 3;
15
+ const col = orientation === "white" ? file : 7 - file;
16
+ const row = orientation === "white" ? 7 - rank : rank;
17
+ return { x: col * 12.5, y: row * 12.5 };
18
+ }
19
+ function StaticChessboard(props) {
20
+ const {
21
+ fen,
22
+ orientation = "white",
23
+ theme = defaultTheme,
24
+ pieces = defaultPieces,
25
+ showCoordinates = true,
26
+ style,
27
+ className,
28
+ ariaLabel = "Chess position"
29
+ } = props;
30
+ const board = parseFenPlacement(fen);
31
+ const squares = buildSquareOrder(orientation);
32
+ const containerStyle = {
33
+ position: "relative",
34
+ aspectRatio: "1 / 1",
35
+ width: "100%",
36
+ ...theme,
37
+ ...style
38
+ };
39
+ return /* @__PURE__ */ jsxs(
40
+ "div",
41
+ {
42
+ className,
43
+ style: containerStyle,
44
+ "data-gb-orientation": orientation,
45
+ "data-gb-static": "true",
46
+ children: [
47
+ /* @__PURE__ */ jsx(
48
+ "div",
49
+ {
50
+ role: "grid",
51
+ "aria-label": ariaLabel,
52
+ "aria-rowcount": 8,
53
+ "aria-colcount": 8,
54
+ "aria-readonly": "true",
55
+ style: {
56
+ position: "absolute",
57
+ inset: 0,
58
+ display: "grid",
59
+ gridTemplateColumns: "repeat(8, 1fr)",
60
+ gridTemplateRows: "repeat(8, 1fr)"
61
+ },
62
+ children: squares.map((index) => {
63
+ const file = index & 7;
64
+ const rank = index >> 3;
65
+ const isLight = (file + rank) % 2 === 1;
66
+ return /* @__PURE__ */ jsx(
67
+ "div",
68
+ {
69
+ role: "gridcell",
70
+ "aria-label": algebraicOf(index),
71
+ "aria-rowindex": rank + 1,
72
+ "aria-colindex": file + 1,
73
+ "data-square": algebraicOf(index),
74
+ "data-light": isLight ? "true" : "false",
75
+ style: {
76
+ background: `var(${isLight ? CSS_VARS.SQ_LIGHT : CSS_VARS.SQ_DARK})`,
77
+ userSelect: "none",
78
+ containerType: "size"
79
+ }
80
+ },
81
+ index
82
+ );
83
+ })
84
+ }
85
+ ),
86
+ /* @__PURE__ */ jsx(
87
+ "div",
88
+ {
89
+ "aria-hidden": "true",
90
+ style: {
91
+ position: "absolute",
92
+ inset: 0,
93
+ pointerEvents: "none"
94
+ },
95
+ children: Array.from({ length: 64 }, (_, i) => {
96
+ const cell = board[i];
97
+ if (cell === 0) return null;
98
+ const idx = i;
99
+ const square = algebraicOf(idx);
100
+ const { x, y } = positionOf(idx, orientation);
101
+ return /* @__PURE__ */ jsx(
102
+ "div",
103
+ {
104
+ "data-piece-square": square,
105
+ "data-piece-cell": cell,
106
+ style: {
107
+ position: "absolute",
108
+ left: `${x}%`,
109
+ top: `${y}%`,
110
+ width: "12.5%",
111
+ height: "12.5%",
112
+ display: "flex",
113
+ alignItems: "center",
114
+ justifyContent: "center",
115
+ containerType: "size"
116
+ },
117
+ children: pieces({ cell, square: idx })
118
+ },
119
+ square
120
+ );
121
+ })
122
+ }
123
+ ),
124
+ showCoordinates ? /* @__PURE__ */ jsx(StaticCoordinates, { orientation }) : null
125
+ ]
126
+ }
127
+ );
128
+ }
129
+ function buildSquareOrder(orientation) {
130
+ const squares = [];
131
+ if (orientation === "white") {
132
+ for (let rank = 7; rank >= 0; rank--) {
133
+ for (let file = 0; file < 8; file++) {
134
+ squares.push(rank * 8 + file);
135
+ }
136
+ }
137
+ } else {
138
+ for (let rank = 0; rank < 8; rank++) {
139
+ for (let file = 7; file >= 0; file--) {
140
+ squares.push(rank * 8 + file);
141
+ }
142
+ }
143
+ }
144
+ return squares;
145
+ }
146
+ var FILE_LETTERS = ["a", "b", "c", "d", "e", "f", "g", "h"];
147
+ function StaticCoordinates({ orientation }) {
148
+ return /* @__PURE__ */ jsxs(
149
+ "div",
150
+ {
151
+ "aria-hidden": "true",
152
+ style: {
153
+ position: "absolute",
154
+ inset: 0,
155
+ pointerEvents: "none",
156
+ fontSize: "min(1.6vmin, 11px)",
157
+ fontWeight: 600,
158
+ fontFamily: "system-ui, -apple-system, sans-serif"
159
+ },
160
+ children: [
161
+ FILE_LETTERS.map((letter, idx) => {
162
+ const col = orientation === "white" ? idx : 7 - idx;
163
+ const bottomRank = orientation === "white" ? 0 : 7;
164
+ const isLightSquare = (col + bottomRank) % 2 === 1;
165
+ return /* @__PURE__ */ jsx(
166
+ "span",
167
+ {
168
+ style: {
169
+ position: "absolute",
170
+ left: `${col * 12.5 + 10}%`,
171
+ bottom: "1%",
172
+ color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`
173
+ },
174
+ children: letter
175
+ },
176
+ `file-${letter}`
177
+ );
178
+ }),
179
+ FILE_LETTERS.map((_, idx) => {
180
+ const rank = idx;
181
+ const row = orientation === "white" ? 7 - rank : rank;
182
+ const leftFile = orientation === "white" ? 0 : 7;
183
+ const isLightSquare = (leftFile + rank) % 2 === 1;
184
+ return /* @__PURE__ */ jsx(
185
+ "span",
186
+ {
187
+ style: {
188
+ position: "absolute",
189
+ top: `${row * 12.5 + 1}%`,
190
+ left: "1%",
191
+ color: `var(${isLightSquare ? CSS_VARS.COORDINATE_LIGHT : CSS_VARS.COORDINATE_DARK})`
192
+ },
193
+ children: rank + 1
194
+ },
195
+ `rank-${rank}`
196
+ );
197
+ })
198
+ ]
199
+ }
200
+ );
201
+ }
202
+
203
+ export { StaticChessboard };
204
+ //# sourceMappingURL=server.js.map
205
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/server.tsx"],"names":[],"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,EAAA,MAAM;AAAA,IACJ,GAAA;AAAA,IACA,WAAA,GAAc,OAAA;AAAA,IACd,KAAA,GAAQ,YAAA;AAAA,IACR,MAAA,GAAS,aAAA;AAAA,IACT,eAAA,GAAkB,IAAA;AAAA,IAClB,KAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA,GAAY;AAAA,GACd,GAAI,KAAA;AAEJ,EAAA,MAAM,KAAA,GAAQ,kBAAkB,GAAG,CAAA;AACnC,EAAA,MAAM,OAAA,GAAU,iBAAiB,WAAW,CAAA;AAE5C,EAAA,MAAM,cAAA,GAAgC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,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,uBACE,GAAA;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,GAAgB,QAAA,CAAS,gBAAA,GAAmB,SAAS,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.js","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-light={isLight ? \"true\" : \"false\"}\n style={{\n background: `var(${isLight ? CSS_VARS.SQ_LIGHT : CSS_VARS.SQ_DARK})`,\n userSelect: \"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 }}\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"]}
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkB26QLI2K_cjs = require('../chunk-B26QLI2K.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "blue", {
8
+ enumerable: true,
9
+ get: function () { return chunkB26QLI2K_cjs.blue; }
10
+ });
11
+ //# sourceMappingURL=blue.cjs.map
12
+ //# sourceMappingURL=blue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"blue.cjs"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Blue theme — chess.com's "Blue" board.
3
+ *
4
+ * Calm, high-contrast palette that reads well on bright monitors and
5
+ * projector setups. Light square is near-white; dark square is a muted
6
+ * steel blue.
7
+ *
8
+ * ```tsx
9
+ * import { blue } from "gigaboard/themes/blue";
10
+ * <Chessboard game={game} theme={blue} />
11
+ * ```
12
+ */
13
+
14
+ declare const blue: Theme;
15
+
16
+ /**
17
+ * Brown theme — the classic lichess-inspired wood-tone board.
18
+ *
19
+ * CSS-variable-only. Import this theme and pass it as the `theme` prop on
20
+ * `<Chessboard/>`:
21
+ *
22
+ * ```tsx
23
+ * import { brown } from "gigaboard/themes/brown";
24
+ * <Chessboard game={game} theme={brown} />
25
+ * ```
26
+ */
27
+
28
+ declare const brown: Theme;
29
+
30
+ /**
31
+ * Green theme — chess.com's default green/cream board.
32
+ *
33
+ * CSS-variable-only. Import this theme and pass it as the `theme` prop on
34
+ * `<Chessboard/>`:
35
+ *
36
+ * ```tsx
37
+ * import { green } from "gigaboard/themes/green";
38
+ * <Chessboard game={game} theme={green} />
39
+ * ```
40
+ *
41
+ * Palette tuned to visually match chess.com's board at a glance — the light
42
+ * square is a warm off-white and the dark square is the recognisable
43
+ * olive-green used across their web and mobile clients.
44
+ */
45
+
46
+ declare const green: Theme;
47
+
48
+ /**
49
+ * Wood theme — a deep, rich wood-grain palette.
50
+ *
51
+ * Darker and warmer than the default "brown" theme — reads as a real
52
+ * tournament board. Pair with a lighter piece set (`cburnett` or `alpha`)
53
+ * for maximum contrast.
54
+ *
55
+ * ```tsx
56
+ * import { wood } from "gigaboard/themes/wood";
57
+ * <Chessboard game={game} theme={wood} />
58
+ * ```
59
+ */
60
+
61
+ declare const wood: Theme;
62
+
63
+ /**
64
+ * `gigaboard/themes` — CSS-variable-only board themes.
65
+ *
66
+ * Each theme ships as a frozen record of CSS custom-property pairs that the
67
+ * React layer writes inline on the board container at first paint. Themes
68
+ * are CSS-only and carry zero runtime cost beyond the one-time variable
69
+ * assignment.
70
+ *
71
+ * Import sub-paths to keep bundles minimal:
72
+ *
73
+ * ```tsx
74
+ * import { brown } from "gigaboard/themes/brown";
75
+ * import { green } from "gigaboard/themes/green"; // chess.com default
76
+ * import { blue } from "gigaboard/themes/blue";
77
+ * import { wood } from "gigaboard/themes/wood";
78
+ * ```
79
+ *
80
+ * Or pull the full set from the package root (convenient for theme pickers,
81
+ * at a marginally larger bundle cost):
82
+ *
83
+ * ```tsx
84
+ * import { brown, green, blue, wood } from "gigaboard/themes";
85
+ * ```
86
+ */
87
+
88
+ /** Shape of a board theme: CSS custom-property pairs. */
89
+ type Theme = Readonly<Record<string, string>>;
90
+
91
+ /** Registry mapping a theme name to its theme object. */
92
+ declare const themes: Readonly<{
93
+ brown: Readonly<Record<string, string>>;
94
+ blue: Readonly<Record<string, string>>;
95
+ green: Readonly<Record<string, string>>;
96
+ wood: Readonly<Record<string, string>>;
97
+ }>;
98
+ /** Union of the built-in theme names. */
99
+ type ThemeName = keyof typeof themes;
100
+ declare const PACKAGE_VERSION = "0.1.0-alpha";
101
+
102
+ export { PACKAGE_VERSION as P, type Theme as T, type ThemeName as a, brown as b, blue, green as g, themes as t, wood as w };
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Blue theme — chess.com's "Blue" board.
3
+ *
4
+ * Calm, high-contrast palette that reads well on bright monitors and
5
+ * projector setups. Light square is near-white; dark square is a muted
6
+ * steel blue.
7
+ *
8
+ * ```tsx
9
+ * import { blue } from "gigaboard/themes/blue";
10
+ * <Chessboard game={game} theme={blue} />
11
+ * ```
12
+ */
13
+
14
+ declare const blue: Theme;
15
+
16
+ /**
17
+ * Brown theme — the classic lichess-inspired wood-tone board.
18
+ *
19
+ * CSS-variable-only. Import this theme and pass it as the `theme` prop on
20
+ * `<Chessboard/>`:
21
+ *
22
+ * ```tsx
23
+ * import { brown } from "gigaboard/themes/brown";
24
+ * <Chessboard game={game} theme={brown} />
25
+ * ```
26
+ */
27
+
28
+ declare const brown: Theme;
29
+
30
+ /**
31
+ * Green theme — chess.com's default green/cream board.
32
+ *
33
+ * CSS-variable-only. Import this theme and pass it as the `theme` prop on
34
+ * `<Chessboard/>`:
35
+ *
36
+ * ```tsx
37
+ * import { green } from "gigaboard/themes/green";
38
+ * <Chessboard game={game} theme={green} />
39
+ * ```
40
+ *
41
+ * Palette tuned to visually match chess.com's board at a glance — the light
42
+ * square is a warm off-white and the dark square is the recognisable
43
+ * olive-green used across their web and mobile clients.
44
+ */
45
+
46
+ declare const green: Theme;
47
+
48
+ /**
49
+ * Wood theme — a deep, rich wood-grain palette.
50
+ *
51
+ * Darker and warmer than the default "brown" theme — reads as a real
52
+ * tournament board. Pair with a lighter piece set (`cburnett` or `alpha`)
53
+ * for maximum contrast.
54
+ *
55
+ * ```tsx
56
+ * import { wood } from "gigaboard/themes/wood";
57
+ * <Chessboard game={game} theme={wood} />
58
+ * ```
59
+ */
60
+
61
+ declare const wood: Theme;
62
+
63
+ /**
64
+ * `gigaboard/themes` — CSS-variable-only board themes.
65
+ *
66
+ * Each theme ships as a frozen record of CSS custom-property pairs that the
67
+ * React layer writes inline on the board container at first paint. Themes
68
+ * are CSS-only and carry zero runtime cost beyond the one-time variable
69
+ * assignment.
70
+ *
71
+ * Import sub-paths to keep bundles minimal:
72
+ *
73
+ * ```tsx
74
+ * import { brown } from "gigaboard/themes/brown";
75
+ * import { green } from "gigaboard/themes/green"; // chess.com default
76
+ * import { blue } from "gigaboard/themes/blue";
77
+ * import { wood } from "gigaboard/themes/wood";
78
+ * ```
79
+ *
80
+ * Or pull the full set from the package root (convenient for theme pickers,
81
+ * at a marginally larger bundle cost):
82
+ *
83
+ * ```tsx
84
+ * import { brown, green, blue, wood } from "gigaboard/themes";
85
+ * ```
86
+ */
87
+
88
+ /** Shape of a board theme: CSS custom-property pairs. */
89
+ type Theme = Readonly<Record<string, string>>;
90
+
91
+ /** Registry mapping a theme name to its theme object. */
92
+ declare const themes: Readonly<{
93
+ brown: Readonly<Record<string, string>>;
94
+ blue: Readonly<Record<string, string>>;
95
+ green: Readonly<Record<string, string>>;
96
+ wood: Readonly<Record<string, string>>;
97
+ }>;
98
+ /** Union of the built-in theme names. */
99
+ type ThemeName = keyof typeof themes;
100
+ declare const PACKAGE_VERSION = "0.1.0-alpha";
101
+
102
+ export { PACKAGE_VERSION as P, type Theme as T, type ThemeName as a, brown as b, blue, green as g, themes as t, wood as w };
@@ -0,0 +1,3 @@
1
+ export { blue } from '../chunk-P72B3YTG.js';
2
+ //# sourceMappingURL=blue.js.map
3
+ //# sourceMappingURL=blue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"blue.js"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var chunkHSMILJKQ_cjs = require('../chunk-HSMILJKQ.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "brown", {
8
+ enumerable: true,
9
+ get: function () { return chunkHSMILJKQ_cjs.brown; }
10
+ });
11
+ //# sourceMappingURL=brown.cjs.map
12
+ //# sourceMappingURL=brown.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"brown.cjs"}
@@ -0,0 +1 @@
1
+ export { b as brown } from './blue.cjs';
@@ -0,0 +1 @@
1
+ export { b as brown } from './blue.js';