@dxos/plugin-chess 0.7.5-main.9d2a38b → 0.7.5-main.e9bb01b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/ChessContainer-LPMACR6Y.mjs +106 -0
- package/dist/lib/browser/ChessContainer-LPMACR6Y.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VHSLLEH3.mjs → chunk-SINRYD72.mjs} +6 -3
- package/dist/lib/browser/{chunk-VHSLLEH3.mjs.map → chunk-SINRYD72.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +8 -8
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-FUAOSHHX.mjs → intent-resolver-F36MGVEQ.mjs} +12 -9
- package/dist/lib/browser/{intent-resolver-FUAOSHHX.mjs.map → intent-resolver-F36MGVEQ.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-63EO2PZO.mjs → react-surface-ADVIWGEE.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs +131 -0
- package/dist/lib/node/ChessContainer-ZFOCAXZL.cjs.map +7 -0
- package/dist/lib/node/{chunk-3BLH7NRV.cjs → chunk-NALFH4J4.cjs} +9 -6
- package/dist/lib/node/{chunk-3BLH7NRV.cjs.map → chunk-NALFH4J4.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +21 -21
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VTB6P3IL.cjs → intent-resolver-QLRGQQ2C.cjs} +15 -12
- package/dist/lib/node/{intent-resolver-VTB6P3IL.cjs.map → intent-resolver-QLRGQQ2C.cjs.map} +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-PO42G64E.cjs → react-surface-FRGCWHDU.cjs} +8 -8
- package/dist/lib/node/types/index.cjs +5 -5
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs +108 -0
- package/dist/lib/node-esm/ChessContainer-DF6IFM2R.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-M2CRYWX5.mjs → chunk-R2ZZTB5A.mjs} +6 -3
- package/dist/lib/node-esm/{chunk-M2CRYWX5.mjs.map → chunk-R2ZZTB5A.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +8 -8
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-MKEQFVZO.mjs → intent-resolver-OGWCQJZ2.mjs} +12 -9
- package/dist/lib/node-esm/{intent-resolver-MKEQFVZO.mjs.map → intent-resolver-OGWCQJZ2.mjs.map} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-CXEBEDLT.mjs → react-surface-SFBGDWJD.mjs} +3 -3
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/components/ChessContainer.d.ts +4 -3
- package/dist/types/src/components/ChessContainer.d.ts.map +1 -1
- package/dist/types/src/components/ChessPanel.d.ts +11 -0
- package/dist/types/src/components/ChessPanel.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard.stories.d.ts +8 -0
- package/dist/types/src/components/Chessboard.stories.d.ts.map +1 -0
- package/dist/types/src/components/{Chess.d.ts → PlayerSelector.d.ts} +4 -5
- package/dist/types/src/components/PlayerSelector.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -0
- package/dist/types/src/meta.d.ts.map +1 -1
- package/package.json +19 -20
- package/src/ChessPlugin.tsx +5 -13
- package/src/capabilities/intent-resolver.ts +8 -5
- package/src/components/ChessContainer.tsx +41 -4
- package/src/components/ChessPanel.tsx +67 -0
- package/src/components/Chessboard.stories.tsx +39 -0
- package/src/components/{Chess.tsx → PlayerSelector.tsx} +2 -49
- package/src/meta.ts +2 -1
- package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs +0 -505
- package/dist/lib/browser/ChessContainer-JYXOZIDK.mjs.map +0 -7
- package/dist/lib/node/ChessContainer-XRP7D63X.cjs +0 -518
- package/dist/lib/node/ChessContainer-XRP7D63X.cjs.map +0 -7
- package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs +0 -507
- package/dist/lib/node-esm/ChessContainer-37QUCUTD.mjs.map +0 -7
- package/dist/types/src/components/Chess.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/Chessboard.d.ts +0 -37
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +0 -13
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/index.d.ts +0 -2
- package/dist/types/src/components/Chessboard/index.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/custom.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/custom.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/index.d.ts +0 -4
- package/dist/types/src/components/Chessboard/pieces/index.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/phosphor.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts +0 -3
- package/dist/types/src/components/Chessboard/pieces/riohacha.d.ts.map +0 -1
- package/src/components/Chessboard/Chessboard.stories.tsx +0 -43
- package/src/components/Chessboard/Chessboard.tsx +0 -170
- package/src/components/Chessboard/index.ts +0 -5
- package/src/components/Chessboard/pieces/custom.tsx +0 -82
- package/src/components/Chessboard/pieces/index.ts +0 -7
- package/src/components/Chessboard/pieces/phosphor.tsx +0 -71
- package/src/components/Chessboard/pieces/riohacha.tsx +0 -166
- /package/dist/lib/browser/{react-surface-63EO2PZO.mjs.map → react-surface-ADVIWGEE.mjs.map} +0 -0
- /package/dist/lib/node/{react-surface-PO42G64E.cjs.map → react-surface-FRGCWHDU.cjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-CXEBEDLT.mjs.map → react-surface-SFBGDWJD.mjs.map} +0 -0
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
// packages/plugins/plugin-chess/src/components/ChessContainer.tsx
|
|
2
|
-
import React6 from "react";
|
|
3
|
-
import { getSpace } from "@dxos/react-client/echo";
|
|
4
|
-
import { StackItem } from "@dxos/react-ui-stack";
|
|
5
|
-
|
|
6
|
-
// packages/plugins/plugin-chess/src/components/Chess.tsx
|
|
7
|
-
import { CrownCross } from "@phosphor-icons/react";
|
|
8
|
-
import { Chess as ChessJs } from "chess.js";
|
|
9
|
-
import React5, { useEffect, useState } from "react";
|
|
10
|
-
import { generateName } from "@dxos/display-name";
|
|
11
|
-
import { invariant } from "@dxos/invariant";
|
|
12
|
-
import { useMembers } from "@dxos/react-client/echo";
|
|
13
|
-
import { Input, Select, useThemeContext } from "@dxos/react-ui";
|
|
14
|
-
import { getSize as getSize2, mx as mx2 } from "@dxos/react-ui-theme";
|
|
15
|
-
|
|
16
|
-
// packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx
|
|
17
|
-
import { ArrowURightDown, Circle } from "@phosphor-icons/react";
|
|
18
|
-
import { Chess } from "chess.js";
|
|
19
|
-
import React4 from "react";
|
|
20
|
-
import { Chessboard as ReactChessboard } from "react-chessboard";
|
|
21
|
-
import { useResizeDetector } from "react-resize-detector";
|
|
22
|
-
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
23
|
-
|
|
24
|
-
// packages/plugins/plugin-chess/src/components/Chessboard/pieces/custom.tsx
|
|
25
|
-
import React from "react";
|
|
26
|
-
var style = {
|
|
27
|
-
white: {
|
|
28
|
-
fill: "#999"
|
|
29
|
-
},
|
|
30
|
-
black: {
|
|
31
|
-
fill: "#000"
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
var pieces = {
|
|
35
|
-
p: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
36
|
-
fill: "#000000",
|
|
37
|
-
width: "45px",
|
|
38
|
-
height: "45px",
|
|
39
|
-
viewBox: "0 0 32 32",
|
|
40
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
41
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
42
|
-
style: style4,
|
|
43
|
-
d: "M 16 9 C 13.800781 9 12 10.800781 12 13 C 12 14.199219 12.558594 15.265625 13.40625 16 L 12 16 C 11.96875 16 11.9375 16 11.90625 16 C 11.355469 16.027344 10.925781 16.496094 10.953125 17.046875 C 10.980469 17.597656 11.449219 18.027344 12 18 L 12.5 18 L 11.09375 21.5625 L 10.375 23 L 9 23 C 8.96875 23 8.9375 23 8.90625 23 C 8.433594 23.03125 8.050781 23.386719 7.980469 23.855469 C 7.914063 24.320313 8.183594 24.773438 8.625 24.9375 L 7.28125 26.28125 L 7 26.59375 L 7 29 L 25 29 L 25 26.59375 L 24.71875 26.28125 L 23.375 24.9375 C 23.832031 24.765625 24.101563 24.289063 24.007813 23.808594 C 23.917969 23.328125 23.488281 22.988281 23 23 L 21.625 23 L 20.90625 21.5625 L 19.5 18 L 20 18 C 20.359375 18.003906 20.695313 17.816406 20.878906 17.503906 C 21.058594 17.191406 21.058594 16.808594 20.878906 16.496094 C 20.695313 16.183594 20.359375 15.996094 20 16 L 18.59375 16 C 19.441406 15.265625 20 14.199219 20 13 C 20 10.800781 18.199219 9 16 9 Z M 16 11 C 17.117188 11 18 11.882813 18 13 C 18 14.117188 17.117188 15 16 15 C 14.882813 15 14 14.117188 14 13 C 14 11.882813 14.882813 11 16 11 Z M 14.6875 18 L 17.3125 18 L 19.0625 22.375 L 19.09375 22.40625 L 19.09375 22.4375 L 19.375 23 L 12.625 23 L 12.90625 22.4375 L 12.90625 22.40625 L 12.9375 22.375 Z M 11.4375 25 L 20.5625 25 L 22.5625 27 L 9.4375 27 Z"
|
|
44
|
-
})),
|
|
45
|
-
r: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
46
|
-
fill: "#000000",
|
|
47
|
-
width: "45px",
|
|
48
|
-
height: "45px",
|
|
49
|
-
viewBox: "0 0 32 32",
|
|
50
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
51
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
52
|
-
style: style4,
|
|
53
|
-
d: "M 9 4 L 9 13 L 12.75 13 L 12.53125 14 L 12 14 C 11.96875 14 11.9375 14 11.90625 14 C 11.355469 14.027344 10.925781 14.496094 10.953125 15.046875 C 10.980469 15.597656 11.449219 16.027344 12 16 L 12.09375 16 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.90625 16 L 20 16 C 20.359375 16.003906 20.695313 15.816406 20.878906 15.503906 C 21.058594 15.191406 21.058594 14.808594 20.878906 14.496094 C 20.695313 14.183594 20.359375 13.996094 20 14 L 19.46875 14 L 19.25 13 L 23 13 L 23 4 Z M 11 6 L 13 6 L 13 9 L 15 9 L 15 6 L 17 6 L 17 9 L 19 9 L 19 6 L 21 6 L 21 11 L 11 11 Z M 14.78125 13 L 17.21875 13 L 17.4375 14 L 14.5625 14 Z M 14.125 16 L 17.875 16 L 19.03125 21.21875 L 19.0625 21.34375 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.9375 21.34375 L 12.96875 21.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z"
|
|
54
|
-
})),
|
|
55
|
-
n: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
56
|
-
fill: "#000000",
|
|
57
|
-
width: "45px",
|
|
58
|
-
height: "45px",
|
|
59
|
-
viewBox: "0 0 32 32",
|
|
60
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
61
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
62
|
-
style: style4,
|
|
63
|
-
d: "M 16 3 C 14.230469 3 13.058594 3.984375 12.59375 5 C 12.242188 5.769531 12.285156 6.304688 12.28125 6.75 C 11.535156 7.257813 10.75 7.90625 10.125 8.53125 C 8.726563 9.929688 7.960938 11.921875 8 14.03125 C 8.019531 15.003906 8.21875 15.980469 8.59375 16.96875 C 8.78125 17.464844 9.125 18.324219 9.4375 19.28125 C 9.75 20.238281 10 21.292969 10 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.367188 22.035156 7.953125 22.492188 7.972656 23.03125 C 7.988281 23.570313 8.429688 23.996094 8.96875 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 22 22 C 22 19.738281 20.59375 17.664063 19.28125 16.0625 C 18.53125 15.144531 18.285156 14.984375 17.78125 14.5 C 17.960938 14.394531 18.183594 14.269531 18.3125 14.1875 C 18.472656 14.085938 18.558594 14.023438 18.59375 14 C 18.875 14 18.894531 14.046875 19.1875 14.28125 C 19.480469 14.515625 20.078125 15 20.90625 15 C 21.632813 15 22.164063 14.53125 22.4375 14.1875 C 22.6875 13.871094 22.824219 13.632813 22.84375 13.59375 C 22.933594 13.550781 23.128906 13.488281 23.375 13.3125 C 23.621094 13.136719 23.941406 12.746094 24 12.3125 C 24.058594 11.878906 23.921875 11.5 23.75 11.125 C 23.496094 10.570313 23.023438 9.933594 22.28125 9.15625 C 21.539063 8.378906 20.566406 7.554688 19.375 7.0625 C 19.285156 7.023438 19.359375 7.082031 19.3125 7.03125 C 19.265625 6.980469 19.125 6.769531 18.84375 6.5625 C 18.476563 6.292969 17.679688 6.261719 17 6.1875 L 17 3 Z M 15 5.21875 L 15 8 L 16 8 C 17.363281 8 17.664063 8.164063 17.65625 8.15625 C 17.652344 8.152344 17.660156 8.171875 17.8125 8.34375 C 17.964844 8.515625 18.261719 8.785156 18.625 8.9375 C 19.425781 9.269531 20.226563 9.917969 20.84375 10.5625 C 21.421875 11.164063 21.808594 11.761719 21.875 11.875 C 21.714844 11.953125 21.546875 12.007813 21.34375 12.25 C 21.070313 12.582031 20.972656 12.8125 20.875 12.9375 C 20.84375 12.976563 20.847656 12.988281 20.84375 13 C 20.757813 12.988281 20.699219 12.933594 20.4375 12.71875 C 20.109375 12.453125 19.457031 12 18.59375 12 C 17.9375 12 17.566406 12.300781 17.25 12.5 C 16.933594 12.699219 16.679688 12.84375 16.59375 12.875 L 16.5625 12.90625 L 16.53125 12.90625 C 16.347656 12.984375 16.03125 13 16.03125 13 L 15 12.96875 L 15 14.5625 L 15.34375 14.84375 C 15.34375 14.84375 16.53125 15.890625 17.71875 17.34375 C 18.90625 18.796875 20 20.667969 20 22 L 12 22 C 12 20.878906 11.6875 19.703125 11.34375 18.65625 C 11 17.609375 10.59375 16.695313 10.4375 16.28125 C 10.144531 15.507813 10.015625 14.707031 10 13.96875 C 9.96875 12.363281 10.542969 10.925781 11.53125 9.9375 C 12.183594 9.285156 13.15625 8.46875 13.6875 8.15625 L 14.1875 7.875 L 14.1875 7.3125 C 14.1875 6.941406 14.1875 6.320313 14.40625 5.84375 C 14.53125 5.574219 14.703125 5.367188 15 5.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z"
|
|
64
|
-
})),
|
|
65
|
-
b: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
66
|
-
fill: "#000000",
|
|
67
|
-
width: "45px",
|
|
68
|
-
height: "45px",
|
|
69
|
-
viewBox: "0 0 32 32",
|
|
70
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
71
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
72
|
-
style: style4,
|
|
73
|
-
d: "M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.441406 14.15625 5.855469 14.40625 6.1875 C 14.050781 6.5625 13.644531 7.011719 13.21875 7.53125 C 12.171875 8.8125 11 10.292969 11 12 C 11 13.136719 11.414063 14.160156 12.0625 15 L 12 15 C 11.96875 15 11.9375 15 11.90625 15 C 11.355469 15.027344 10.925781 15.496094 10.953125 16.046875 C 10.980469 16.597656 11.449219 17.027344 12 17 L 12.5 17 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.5 17 L 20 17 C 20.359375 17.003906 20.695313 16.816406 20.878906 16.503906 C 21.058594 16.191406 21.058594 15.808594 20.878906 15.496094 C 20.695313 15.183594 20.359375 14.996094 20 15 C 20.628906 14.160156 21 13.121094 21 12 C 21 10.292969 19.828125 8.8125 18.78125 7.53125 C 18.355469 7.011719 17.949219 6.5625 17.59375 6.1875 C 17.84375 5.855469 18 5.441406 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 7.46875 C 16.363281 7.835938 16.609375 8.066406 17.21875 8.8125 C 18.171875 9.980469 19 11.5 19 12 C 19 13.679688 17.699219 15 16.03125 15 C 14.363281 15 13 13.660156 13 12 C 13 11.5 13.828125 9.980469 14.78125 8.8125 C 15.390625 8.066406 15.636719 7.835938 16 7.46875 Z M 14.6875 17 L 17.3125 17 L 19.0625 21.375 L 19.09375 21.40625 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.90625 21.40625 L 12.9375 21.375 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z"
|
|
74
|
-
})),
|
|
75
|
-
q: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
76
|
-
fill: "#000000",
|
|
77
|
-
width: "45px",
|
|
78
|
-
height: "45px",
|
|
79
|
-
viewBox: "0 0 32 32",
|
|
80
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
81
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
82
|
-
style: style4,
|
|
83
|
-
d: "M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.730469 14.402344 6.371094 15 6.71875 L 15 8.25 C 15 8.675781 14.675781 9 14.25 9 L 11.90625 9 C 11.59375 9 11.316406 8.851563 11.15625 8.625 C 11.667969 8.261719 12 7.667969 12 7 C 12 5.90625 11.09375 5 10 5 C 8.90625 5 8 5.90625 8 7 C 8 7.730469 8.402344 8.371094 9 8.71875 L 9 10.40625 L 9.28125 10.71875 L 11.625 13.0625 C 11.167969 13.234375 10.902344 13.710938 10.996094 14.1875 C 11.089844 14.667969 11.511719 15.011719 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.488281 15.011719 20.917969 14.671875 21.007813 14.191406 C 21.101563 13.710938 20.832031 13.234375 20.375 13.0625 L 22.71875 10.71875 L 23 10.40625 L 23 8.71875 C 23.597656 8.371094 24 7.730469 24 7 C 24 5.90625 23.09375 5 22 5 C 20.90625 5 20 5.90625 20 7 C 20 7.667969 20.332031 8.261719 20.84375 8.625 C 20.683594 8.851563 20.40625 9 20.09375 9 L 17.75 9 C 17.324219 9 17 8.675781 17 8.25 L 17 6.71875 C 17.597656 6.371094 18 5.730469 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 10.34375 C 16.480469 10.746094 17.082031 11 17.75 11 L 19.5625 11 L 17.5625 13 L 14.4375 13 L 12.4375 11 L 14.25 11 C 14.917969 11 15.519531 10.746094 16 10.34375 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z"
|
|
84
|
-
})),
|
|
85
|
-
k: (style4) => /* @__PURE__ */ React.createElement("svg", {
|
|
86
|
-
fill: "#000000",
|
|
87
|
-
width: "45px",
|
|
88
|
-
height: "45px",
|
|
89
|
-
viewBox: "0 0 32 32",
|
|
90
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
91
|
-
}, /* @__PURE__ */ React.createElement("path", {
|
|
92
|
-
style: style4,
|
|
93
|
-
d: "M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.359375 14.109375 5.707031 14.28125 6 L 8 6 L 8 8.375 L 8.21875 8.625 L 11.875 13 C 11.324219 13.035156 10.902344 13.511719 10.9375 14.0625 C 10.972656 14.613281 11.449219 15.035156 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.550781 15.042969 21.035156 14.628906 21.078125 14.078125 C 21.121094 13.527344 20.707031 13.042969 20.15625 13 L 23.78125 8.625 L 24 8.375 L 24 6 L 17.71875 6 C 17.890625 5.707031 18 5.359375 18 5 C 18 3.90625 17.09375 3 16 3 Z M 10.3125 8 L 21.6875 8 L 17.53125 13 L 14.46875 13 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z"
|
|
94
|
-
}))
|
|
95
|
-
};
|
|
96
|
-
var customPieces = {
|
|
97
|
-
wP: pieces.p(style.white),
|
|
98
|
-
wR: pieces.r(style.white),
|
|
99
|
-
wN: pieces.n(style.white),
|
|
100
|
-
wB: pieces.b(style.white),
|
|
101
|
-
wQ: pieces.q(style.white),
|
|
102
|
-
wK: pieces.k(style.white),
|
|
103
|
-
bP: pieces.p(style.black),
|
|
104
|
-
bR: pieces.r(style.black),
|
|
105
|
-
bN: pieces.n(style.black),
|
|
106
|
-
bB: pieces.b(style.black),
|
|
107
|
-
bQ: pieces.q(style.black),
|
|
108
|
-
bK: pieces.k(style.black)
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
// packages/plugins/plugin-chess/src/components/Chessboard/pieces/phosphor.tsx
|
|
112
|
-
import { Flame, Crown, ShieldStar, Plus, Asterisk, User } from "@phosphor-icons/react";
|
|
113
|
-
import React2 from "react";
|
|
114
|
-
var style2 = {
|
|
115
|
-
white: {
|
|
116
|
-
width: void 0,
|
|
117
|
-
height: void 0,
|
|
118
|
-
color: "darkred"
|
|
119
|
-
},
|
|
120
|
-
black: {
|
|
121
|
-
width: void 0,
|
|
122
|
-
height: void 0,
|
|
123
|
-
color: "black"
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
var Wrapper = ({ children }) => /* @__PURE__ */ React2.createElement("svg", {
|
|
127
|
-
viewBox: "-1, -1, 42, 42",
|
|
128
|
-
className: "logo"
|
|
129
|
-
}, /* @__PURE__ */ React2.createElement("g", {
|
|
130
|
-
transform: "translate(5 5) scale(0.75 0.75)"
|
|
131
|
-
}, children));
|
|
132
|
-
var pieces2 = {
|
|
133
|
-
p: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(User, style4)),
|
|
134
|
-
r: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(Plus, style4)),
|
|
135
|
-
n: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(ShieldStar, style4)),
|
|
136
|
-
b: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(Flame, style4)),
|
|
137
|
-
q: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(Asterisk, style4)),
|
|
138
|
-
k: (style4) => /* @__PURE__ */ React2.createElement(Wrapper, null, /* @__PURE__ */ React2.createElement(Crown, style4))
|
|
139
|
-
};
|
|
140
|
-
var phosphorPieces = {
|
|
141
|
-
wP: pieces2.p(style2.white),
|
|
142
|
-
wR: pieces2.r(style2.white),
|
|
143
|
-
wN: pieces2.n(style2.white),
|
|
144
|
-
wB: pieces2.b(style2.white),
|
|
145
|
-
wQ: pieces2.q(style2.white),
|
|
146
|
-
wK: pieces2.k(style2.white),
|
|
147
|
-
bP: pieces2.p(style2.black),
|
|
148
|
-
bR: pieces2.r(style2.black),
|
|
149
|
-
bN: pieces2.n(style2.black),
|
|
150
|
-
bB: pieces2.b(style2.black),
|
|
151
|
-
bQ: pieces2.q(style2.black),
|
|
152
|
-
bK: pieces2.k(style2.black)
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// packages/plugins/plugin-chess/src/components/Chessboard/pieces/riohacha.tsx
|
|
156
|
-
import React3 from "react";
|
|
157
|
-
var style3 = {
|
|
158
|
-
white: {
|
|
159
|
-
c1: "#f8f8f8",
|
|
160
|
-
c2: "#d3d3d3"
|
|
161
|
-
},
|
|
162
|
-
black: {
|
|
163
|
-
c1: "#565252",
|
|
164
|
-
c2: "#444242"
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
var pieces3 = {
|
|
168
|
-
p: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
169
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
170
|
-
viewBox: "535 1350 1333 1333"
|
|
171
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
172
|
-
d: "M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z",
|
|
173
|
-
fill: style4.c1
|
|
174
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
175
|
-
d: "M1590 2500v-99l-82-3-82-3-58-181-58-182 39-39c38-38 61-91 61-144 0-30-19-89-29-89-3 0-65 59-136 130-84 84-135 128-145 125-17-6-22-10 77 68l60 48 12 117c16 154 15 152 57 152h34v200h250z",
|
|
176
|
-
fill: style4.c2
|
|
177
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
178
|
-
d: "M1340 2500v-100h-34c-42 0-41 2-57-152l-12-117-64-51-63-51-10 26c-6 15-10 31-10 38 0 11-24 87-75 237l-23 65-86 3-86 3v199h520zm-91-614l133-134-41-40c-55-53-117-68-190-47-113 34-170 176-115 287 13 25 59 68 73 68 3 0 66-60 140-134z",
|
|
179
|
-
fill: style4.c1
|
|
180
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
181
|
-
d: "M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z",
|
|
182
|
-
fill: "none",
|
|
183
|
-
stroke: "#000",
|
|
184
|
-
strokeWidth: "24"
|
|
185
|
-
})),
|
|
186
|
-
r: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
187
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
188
|
-
viewBox: "1670 1350 1333 1333"
|
|
189
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
190
|
-
d: "M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z",
|
|
191
|
-
fill: style4.c1
|
|
192
|
-
}), /* @__PURE__ */ React3.createElement("g", {
|
|
193
|
-
fill: style4.c2
|
|
194
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
195
|
-
d: "M2710 2500v-100h-129l-5-32c-3-18-15-125-26-238-17-176-18-206-6-215 8-5 35-22 60-37l46-28-2-162-3-163-58-3-57-3v51c0 49-1 50-30 50h-30v230h-238l-237 1 54 34c30 19 57 38 60 42 3 5 12 9 18 10 7 2 65 35 128 74l115 71 1 51c1 29 4 99 8 157l6 105 37 3 38 3v199h250z"
|
|
196
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
197
|
-
d: "M2418 1573l-3-48-50-3-50-3 3 51 4 50h99z"
|
|
198
|
-
})), /* @__PURE__ */ React3.createElement("path", {
|
|
199
|
-
d: "M2460 2501v-100l-38-3-37-3-6-105c-4-58-7-128-8-157l-1-51-122-76c-68-41-126-72-130-68-3 4-9 39-13 77-4 39-8 86-10 105-7 68-14 146-19 203-3 32-8 63-11 68-4 5-33 9-66 9h-59v200h520zm10-766v-115h-149l-3-47-3-48h-90l-3 48-3 47h-109v-101l-58 3-57 3-3 163-2 162h480z",
|
|
200
|
-
fill: style4.c1
|
|
201
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
202
|
-
d: "M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z",
|
|
203
|
-
fill: "none",
|
|
204
|
-
stroke: "#000",
|
|
205
|
-
strokeWidth: "24"
|
|
206
|
-
})),
|
|
207
|
-
n: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
208
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
209
|
-
viewBox: "2780 1350 1333 1333"
|
|
210
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
211
|
-
d: "M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z",
|
|
212
|
-
fill: style4.c1
|
|
213
|
-
}), /* @__PURE__ */ React3.createElement("g", {
|
|
214
|
-
fill: style4.c2
|
|
215
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
216
|
-
d: "M3830 2500v-99l-106-3-106-3 81-69 82-69-45-46-45-46 21-25c12-14 35-54 51-89 55-116 47-264-19-377-31-52-108-126-162-153-53-27-62-27-26 2 46 35 73 68 103 127 124 239-6 525-267 591-35 8-63 17-64 20-1 2 9 34 21 72l23 67h158v200h300z"
|
|
217
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
218
|
-
d: "M3540 1923v-97l-48 47c-40 39-50 45-62 35-13-11-13-11-2 2 10 12 4 22-35 62l-47 48h194z"
|
|
219
|
-
})), /* @__PURE__ */ React3.createElement("path", {
|
|
220
|
-
d: "M3530 2500v-100h-158l-21-62c-12-35-21-67-21-72-1-5 27-17 62-25 261-66 390-350 268-591-27-52-103-140-122-140-12 0-428 279-428 287 0 6 74 106 101 137 5 5 16 0 26-11 37-43 126-55 178-23l30 18 47-46 48-46v194h-195l-115 115-114 114 20 23c10 13 25 27 33 32 7 4 30 24 49 42 20 19 40 34 44 34s8 5 8 10c0 6-42 10-105 10h-105v200h470z",
|
|
221
|
-
fill: style4.c1
|
|
222
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
223
|
-
d: "M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z",
|
|
224
|
-
fill: "none",
|
|
225
|
-
stroke: "#000",
|
|
226
|
-
strokeWidth: "24"
|
|
227
|
-
})),
|
|
228
|
-
b: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
229
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
230
|
-
viewBox: "3890 1350 1330 1330"
|
|
231
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
232
|
-
d: "M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z",
|
|
233
|
-
fill: style4.c1
|
|
234
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
235
|
-
d: "M4950 2500v-100h-179l-10-37c-6-21-25-100-43-175l-32-137 77-100c42-55 77-101 77-103s-54-1-119 2l-119 5-72 93c-39 50-74 92-78 92s-8 11-8 25c-1 14 2 25 6 25 5 0 38 18 74 41l64 40 7 97c9 134 8 132 61 132h44v200h250zm-422-699c18-22 32-43 32-48 0-4-10-21-23-37l-23-29-36 49-36 48 21 28c11 15 24 28 27 28 4 0 21-18 38-39z",
|
|
236
|
-
fill: style4.c2
|
|
237
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
238
|
-
d: "M4700 2500v-100h-44c-53 0-52 2-61-132l-7-97-64-40c-36-23-69-41-73-41-7 0-20 46-63 223l-21 87h-187v200h520zm-168-555l73-95h112c62 0 113-3 112-7 0-9-31-50-157-208-50-64-92-121-92-126 0-20-18-5-63 56l-48 64 45 58c25 32 46 62 46 66 0 11-61 87-70 87-4 0-26-27-50-60-24-32-46-57-51-55-4 3-26 33-49 66l-41 61 47 61c27 34 60 77 74 94 14 18 28 33 32 33s40-43 80-95z",
|
|
239
|
-
fill: style4.c1
|
|
240
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
241
|
-
d: "M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z",
|
|
242
|
-
fill: "none",
|
|
243
|
-
stroke: "#000",
|
|
244
|
-
strokeWidth: "24"
|
|
245
|
-
})),
|
|
246
|
-
q: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
247
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
248
|
-
viewBox: "5010 1350 1333 1333"
|
|
249
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
250
|
-
d: "M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z",
|
|
251
|
-
fill: style4.c1
|
|
252
|
-
}), /* @__PURE__ */ React3.createElement("g", {
|
|
253
|
-
fill: style4.c2
|
|
254
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
255
|
-
d: "M6060 2500v-100h-178l-10-47c-6-27-18-86-27-133l-16-85 110-238 110-238-32 7c-71 15-77 20-77 67 0 38-6 50-60 110l-60 68v-99c0-92 2-100 25-122 14-13 25-29 25-35 0-22-42-115-52-115-5 0-7 4-4 8 3 5-22 134-54 288-33 153-60 282-60 286 0 5-38 8-85 8-67 0-85 3-85 14 0 8-3 23-6 33-4 12-3 14 3 5 7-9 30 1 94 40l84 53 3 63 3 62h109v200h240z"
|
|
256
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
257
|
-
d: "M5640 1992c0-7 11-35 25-64 14-28 21-54 16-57-4-3-24-43-44-89-35-80-35-84-21-119l15-36-42-43c-24-24-46-44-49-44-8 0 83 447 93 456 4 4 7 2 7-4z"
|
|
258
|
-
})), /* @__PURE__ */ React3.createElement("path", {
|
|
259
|
-
d: "M5820 2500v-100h-109l-3-62-3-63-84-53c-61-38-87-49-92-40-3 7-12 42-18 78-7 36-17 82-23 103l-11 37h-177v200h520zm-120-378c0-4 27-133 60-287 33-153 57-281 54-284-2-3-23 13-45 35l-40 40 16 39c14 31 14 43 4 64-12 26-29 65-47 111-5 14-22 51-36 83s-26 63-26 70c-1 40-23-44-60-230-24-117-47-210-51-207-5 3-9 13-9 23 0 9-4 21-9 27-22 24-21 61 4 84 23 22 25 30 25 117 0 51-4 93-8 93-5 0-24-19-42-42-19-24-42-49-52-56-13-9-18-26-18-57 0-24-6-47-13-52-19-12-81-33-85-28-3 2 8 30 23 62 83 177 126 272 159 346l25 57h85c48 0 86-3 86-8z",
|
|
260
|
-
fill: style4.c1
|
|
261
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
262
|
-
d: "M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z",
|
|
263
|
-
fill: "none",
|
|
264
|
-
stroke: "#000",
|
|
265
|
-
strokeWidth: "24"
|
|
266
|
-
})),
|
|
267
|
-
k: (style4) => /* @__PURE__ */ React3.createElement("svg", {
|
|
268
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
269
|
-
viewBox: "6150 1350 1333 1333"
|
|
270
|
-
}, /* @__PURE__ */ React3.createElement("path", {
|
|
271
|
-
d: "M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z",
|
|
272
|
-
fill: style4.c1
|
|
273
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
274
|
-
d: "M7200 2500v-99l-117-3-117-3-15-57-15-57 72-150c40-83 72-151 72-153s-45-2-99 0c-65 2-101 7-104 15-2 7-17 74-32 150l-28 137h-58c-43 0-58 4-63 16-8 21-8 24 4 24 5 0 39 18 75 40 55 34 74 40 120 40h55v200h250zm-324-692c-4-18-9-50-13-71l-6-38 42 7 41 7v-106l-40 7-40 6 7-45c6-44 5-45-23-45h-29v310h34c32 0 33-1 27-32zm-179-148c0-30-2-43-4-27-2 15-2 39 0 55 2 15 4 2 4-28z",
|
|
275
|
-
fill: style4.c2
|
|
276
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
277
|
-
d: "M6950 2500v-100h-55c-46 0-65-6-120-40-36-22-69-40-74-40-4 0-14 18-21 40l-13 40h-237v200h520zm-105-357c15-76 30-144 33-150 3-9 33-13 101-13 89-1 94-2 76-16-22-17-81-44-131-61-46-15-191-9-249 11-47 16-115 55-115 66 0 3 31 70 68 150l67 145 61 3 61 3zm-29-316c2-7 3-76 2-152l-3-140-29-3c-26-3-28-1-22 22 3 14 9 37 12 51 5 19 3 24-7 21-8-2-26-7-42-10-27-6-27-6-27 44v50l42-6 41-7-6 39c-4 21-9 54-13 72-6 30-5 32 20 32 15 0 29-6 32-13z",
|
|
278
|
-
fill: style4.c1
|
|
279
|
-
}), /* @__PURE__ */ React3.createElement("path", {
|
|
280
|
-
d: "M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z",
|
|
281
|
-
fill: "none",
|
|
282
|
-
stroke: "#000",
|
|
283
|
-
strokeWidth: "24"
|
|
284
|
-
}))
|
|
285
|
-
};
|
|
286
|
-
var riohachaPieces = {
|
|
287
|
-
wP: pieces3.p(style3.white),
|
|
288
|
-
wR: pieces3.r(style3.white),
|
|
289
|
-
wN: pieces3.n(style3.white),
|
|
290
|
-
wB: pieces3.b(style3.white),
|
|
291
|
-
wQ: pieces3.q(style3.white),
|
|
292
|
-
wK: pieces3.k(style3.white),
|
|
293
|
-
bP: pieces3.p(style3.black),
|
|
294
|
-
bR: pieces3.r(style3.black),
|
|
295
|
-
bN: pieces3.n(style3.black),
|
|
296
|
-
bB: pieces3.b(style3.black),
|
|
297
|
-
bQ: pieces3.q(style3.black),
|
|
298
|
-
bK: pieces3.k(style3.black)
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
// packages/plugins/plugin-chess/src/components/Chessboard/Chessboard.tsx
|
|
302
|
-
var ChessPieces;
|
|
303
|
-
(function(ChessPieces2) {
|
|
304
|
-
ChessPieces2[ChessPieces2["STANDARD"] = 0] = "STANDARD";
|
|
305
|
-
ChessPieces2[ChessPieces2["CUSTOM"] = 1] = "CUSTOM";
|
|
306
|
-
ChessPieces2[ChessPieces2["FUTURE"] = 2] = "FUTURE";
|
|
307
|
-
ChessPieces2[ChessPieces2["RIOHACHA"] = 3] = "RIOHACHA";
|
|
308
|
-
})(ChessPieces || (ChessPieces = {}));
|
|
309
|
-
var chessPieces = {
|
|
310
|
-
[0]: void 0,
|
|
311
|
-
[1]: customPieces,
|
|
312
|
-
[2]: phosphorPieces,
|
|
313
|
-
[3]: riohachaPieces
|
|
314
|
-
};
|
|
315
|
-
var props = {
|
|
316
|
-
customDropSquareStyle: {
|
|
317
|
-
boxShadow: "inset 0 0 1px 2px black"
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
var boardStyles = {
|
|
321
|
-
default: {
|
|
322
|
-
customDarkSquareStyle: {
|
|
323
|
-
backgroundColor: "#AE8A68"
|
|
324
|
-
},
|
|
325
|
-
customLightSquareStyle: {
|
|
326
|
-
backgroundColor: "#f0d9b5"
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
blue: {
|
|
330
|
-
customDarkSquareStyle: {
|
|
331
|
-
backgroundColor: "#CCD3DB"
|
|
332
|
-
},
|
|
333
|
-
customLightSquareStyle: {
|
|
334
|
-
backgroundColor: "#6C95B9"
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
dark: {
|
|
338
|
-
customDarkSquareStyle: {
|
|
339
|
-
backgroundColor: "#555"
|
|
340
|
-
},
|
|
341
|
-
customLightSquareStyle: {
|
|
342
|
-
backgroundColor: "#888"
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
var Chessboard = ({ model: { chess }, orientation = "w", readonly = false, boardStyle = "blue", pieces: pieces4 = 0, onUpdate }) => {
|
|
347
|
-
const { ref, width } = useResizeDetector();
|
|
348
|
-
const style4 = boardStyles[boardStyle];
|
|
349
|
-
const handleDrop = (source, target, piece) => {
|
|
350
|
-
try {
|
|
351
|
-
const move = {
|
|
352
|
-
from: source,
|
|
353
|
-
to: target,
|
|
354
|
-
promotion: piece.toLowerCase()[1]
|
|
355
|
-
};
|
|
356
|
-
const state = new Chess(chess.fen());
|
|
357
|
-
const result = state.move(move);
|
|
358
|
-
if (result) {
|
|
359
|
-
onUpdate?.(move);
|
|
360
|
-
return true;
|
|
361
|
-
} else {
|
|
362
|
-
return false;
|
|
363
|
-
}
|
|
364
|
-
} catch (err) {
|
|
365
|
-
return false;
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
369
|
-
ref,
|
|
370
|
-
className: "flex grow aspect-square overflow-hidden"
|
|
371
|
-
}, /* @__PURE__ */ React4.createElement(ReactChessboard, {
|
|
372
|
-
boardWidth: width,
|
|
373
|
-
position: chess.fen(),
|
|
374
|
-
boardOrientation: orientation === "w" ? "white" : "black",
|
|
375
|
-
arePiecesDraggable: !readonly,
|
|
376
|
-
onPieceDrop: handleDrop,
|
|
377
|
-
customPieces: chessPieces[pieces4],
|
|
378
|
-
...style4,
|
|
379
|
-
...props
|
|
380
|
-
}));
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
// packages/plugins/plugin-chess/src/components/Chess.tsx
|
|
384
|
-
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/components/Chess.tsx";
|
|
385
|
-
var useChessModel = (game) => {
|
|
386
|
-
const [model, setModel] = useState();
|
|
387
|
-
useEffect(() => {
|
|
388
|
-
if (!model || game.pgn !== model?.chess.pgn()) {
|
|
389
|
-
const chess = new ChessJs();
|
|
390
|
-
if (game.pgn) {
|
|
391
|
-
chess.loadPgn(game.pgn);
|
|
392
|
-
}
|
|
393
|
-
setModel({
|
|
394
|
-
chess
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
}, [
|
|
398
|
-
game.pgn
|
|
399
|
-
]);
|
|
400
|
-
const handleUpdate = (move) => {
|
|
401
|
-
invariant(model, void 0, {
|
|
402
|
-
F: __dxlog_file,
|
|
403
|
-
L: 33,
|
|
404
|
-
S: void 0,
|
|
405
|
-
A: [
|
|
406
|
-
"model",
|
|
407
|
-
""
|
|
408
|
-
]
|
|
409
|
-
});
|
|
410
|
-
if (model.chess.move(move)) {
|
|
411
|
-
game.pgn = model.chess.pgn();
|
|
412
|
-
setModel({
|
|
413
|
-
...model
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
};
|
|
417
|
-
return {
|
|
418
|
-
model,
|
|
419
|
-
handleUpdate
|
|
420
|
-
};
|
|
421
|
-
};
|
|
422
|
-
var Chess2 = ({ space, game, playerSelector }) => {
|
|
423
|
-
const { model, handleUpdate } = useChessModel(game);
|
|
424
|
-
if (!model) {
|
|
425
|
-
return null;
|
|
426
|
-
}
|
|
427
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
|
428
|
-
role: "none",
|
|
429
|
-
className: "grid grid-rows-[60px_1fr_60px] grow overflow-hidden"
|
|
430
|
-
}, /* @__PURE__ */ React5.createElement("div", null), /* @__PURE__ */ React5.createElement("div", {
|
|
431
|
-
className: "flex grow justify-center overflow-hidden"
|
|
432
|
-
}, /* @__PURE__ */ React5.createElement("div", {
|
|
433
|
-
className: "flex grow max-w-[600px] items-center overflow-hidden"
|
|
434
|
-
}, /* @__PURE__ */ React5.createElement(Chessboard, {
|
|
435
|
-
model,
|
|
436
|
-
onUpdate: handleUpdate
|
|
437
|
-
}))), playerSelector && /* @__PURE__ */ React5.createElement(PlayerSelector, {
|
|
438
|
-
game,
|
|
439
|
-
space
|
|
440
|
-
}));
|
|
441
|
-
};
|
|
442
|
-
var PlayerSelector = ({ game, space }) => {
|
|
443
|
-
const members = useMembers(space.key);
|
|
444
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
|
445
|
-
role: "none",
|
|
446
|
-
className: "grid grid-cols-2 gap-8"
|
|
447
|
-
}, /* @__PURE__ */ React5.createElement("div", {
|
|
448
|
-
role: "none",
|
|
449
|
-
className: "flex flex-row-reverse items-center gap-2"
|
|
450
|
-
}, /* @__PURE__ */ React5.createElement(PlayerSelect, {
|
|
451
|
-
side: "white",
|
|
452
|
-
value: game.playerWhite,
|
|
453
|
-
onValueChange: (player) => game.playerWhite = player,
|
|
454
|
-
members
|
|
455
|
-
})), /* @__PURE__ */ React5.createElement("div", {
|
|
456
|
-
role: "none",
|
|
457
|
-
className: "flex flex-row items-center gap-2"
|
|
458
|
-
}, /* @__PURE__ */ React5.createElement(PlayerSelect, {
|
|
459
|
-
side: "black",
|
|
460
|
-
value: game.playerBlack,
|
|
461
|
-
onValueChange: (player) => game.playerBlack = player,
|
|
462
|
-
members
|
|
463
|
-
})));
|
|
464
|
-
};
|
|
465
|
-
var PlayerSelect = ({ side, value, onValueChange, members }) => {
|
|
466
|
-
const { themeMode } = useThemeContext();
|
|
467
|
-
const iconFillMode = side === "black" && themeMode === "light" || side === "white" && themeMode === "dark" ? "fill" : void 0;
|
|
468
|
-
return /* @__PURE__ */ React5.createElement(Input.Root, null, /* @__PURE__ */ React5.createElement(Input.Label, null, /* @__PURE__ */ React5.createElement(CrownCross, {
|
|
469
|
-
className: mx2(getSize2(6)),
|
|
470
|
-
weight: iconFillMode,
|
|
471
|
-
"aria-label": `Chess icon for side ${side}`
|
|
472
|
-
})), /* @__PURE__ */ React5.createElement(Select.Root, {
|
|
473
|
-
value,
|
|
474
|
-
onValueChange
|
|
475
|
-
}, /* @__PURE__ */ React5.createElement(Select.TriggerButton, {
|
|
476
|
-
placeholder: "Select player"
|
|
477
|
-
}), /* @__PURE__ */ React5.createElement(Select.Portal, null, /* @__PURE__ */ React5.createElement(Select.Content, null, /* @__PURE__ */ React5.createElement(Select.Viewport, null, members.map((member) => {
|
|
478
|
-
const memberKey = member.identity.identityKey.toHex();
|
|
479
|
-
const displayName = member.identity?.profile?.displayName || generateName(memberKey);
|
|
480
|
-
return /* @__PURE__ */ React5.createElement(Select.Option, {
|
|
481
|
-
key: memberKey,
|
|
482
|
-
value: memberKey
|
|
483
|
-
}, displayName);
|
|
484
|
-
}))))));
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
// packages/plugins/plugin-chess/src/components/ChessContainer.tsx
|
|
488
|
-
var ChessContainer = ({ game, role }) => {
|
|
489
|
-
const space = getSpace(game);
|
|
490
|
-
if (!space) {
|
|
491
|
-
return null;
|
|
492
|
-
}
|
|
493
|
-
return /* @__PURE__ */ React6.createElement(StackItem.Content, {
|
|
494
|
-
toolbar: false
|
|
495
|
-
}, /* @__PURE__ */ React6.createElement(Chess2, {
|
|
496
|
-
game,
|
|
497
|
-
space,
|
|
498
|
-
playerSelector: role === "article"
|
|
499
|
-
}));
|
|
500
|
-
};
|
|
501
|
-
var ChessContainer_default = ChessContainer;
|
|
502
|
-
export {
|
|
503
|
-
ChessContainer_default as default
|
|
504
|
-
};
|
|
505
|
-
//# sourceMappingURL=ChessContainer-JYXOZIDK.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/ChessContainer.tsx", "../../../src/components/Chess.tsx", "../../../src/components/Chessboard/Chessboard.tsx", "../../../src/components/Chessboard/pieces/custom.tsx", "../../../src/components/Chessboard/pieces/phosphor.tsx", "../../../src/components/Chessboard/pieces/riohacha.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { type ComponentProps } from 'react';\n\nimport { getSpace } from '@dxos/react-client/echo';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { Chess } from './Chess';\n\nconst ChessContainer = ({ game, role }: Pick<ComponentProps<typeof Chess>, 'game'> & { role?: string }) => {\n const space = getSpace(game);\n if (!space) {\n return null;\n }\n\n return (\n <StackItem.Content toolbar={false}>\n <Chess game={game} space={space} playerSelector={role === 'article'} />\n </StackItem.Content>\n );\n};\n\nexport default ChessContainer;\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { CrownCross } from '@phosphor-icons/react';\nimport { Chess as ChessJs } from 'chess.js';\nimport React, { useEffect, useState } from 'react';\n\nimport { generateName } from '@dxos/display-name';\nimport { invariant } from '@dxos/invariant';\nimport { useMembers, type Space, type SpaceMember } from '@dxos/react-client/echo';\nimport { Input, Select, useThemeContext } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { Chessboard, type ChessModel, type ChessMove } from './Chessboard';\nimport { type GameType } from '../types';\n\nconst useChessModel = (game: GameType) => {\n const [model, setModel] = useState<ChessModel>();\n\n useEffect(() => {\n if (!model || game.pgn !== model?.chess.pgn()) {\n const chess = new ChessJs();\n if (game.pgn) {\n chess.loadPgn(game.pgn);\n }\n\n setModel({ chess });\n }\n }, [game.pgn]);\n\n const handleUpdate = (move: ChessMove) => {\n invariant(model);\n if (model.chess.move(move)) {\n game!.pgn = model.chess.pgn();\n setModel({ ...model });\n }\n };\n\n return { model, handleUpdate };\n};\n\nexport const Chess = ({ space, game, playerSelector }: { space: Space; game: GameType; playerSelector?: boolean }) => {\n const { model, handleUpdate } = useChessModel(game);\n if (!model) {\n return null;\n }\n\n return (\n <div role='none' className='grid grid-rows-[60px_1fr_60px] grow overflow-hidden'>\n <div />\n <div className='flex grow justify-center overflow-hidden'>\n <div className='flex grow max-w-[600px] items-center overflow-hidden'>\n <Chessboard model={model} onUpdate={handleUpdate} />\n </div>\n </div>\n {playerSelector && <PlayerSelector game={game} space={space} />}\n </div>\n );\n};\n\nconst PlayerSelector = ({ game, space }: { game: GameType; space: Space }) => {\n const members = useMembers(space.key);\n\n return (\n <div role='none' className='grid grid-cols-2 gap-8'>\n <div role='none' className='flex flex-row-reverse items-center gap-2'>\n <PlayerSelect\n side='white'\n value={game.playerWhite}\n onValueChange={(player) => (game.playerWhite = player)}\n members={members}\n />\n </div>\n <div role='none' className='flex flex-row items-center gap-2'>\n <PlayerSelect\n side='black'\n value={game.playerBlack}\n onValueChange={(player) => (game.playerBlack = player)}\n members={members}\n />\n </div>\n </div>\n );\n};\n\nconst PlayerSelect = ({\n side,\n value,\n onValueChange,\n members,\n}: {\n side: 'white' | 'black';\n value: string | undefined;\n onValueChange: (player: string) => void;\n members: SpaceMember[];\n}) => {\n const { themeMode } = useThemeContext();\n const iconFillMode =\n (side === 'black' && themeMode === 'light') || (side === 'white' && themeMode === 'dark') ? 'fill' : undefined;\n\n return (\n <Input.Root>\n <Input.Label>\n <CrownCross className={mx(getSize(6))} weight={iconFillMode} aria-label={`Chess icon for side ${side}`} />\n </Input.Label>\n <Select.Root value={value} onValueChange={onValueChange}>\n <Select.TriggerButton placeholder={'Select player'} />\n <Select.Portal>\n <Select.Content>\n <Select.Viewport>\n {members.map((member) => {\n const memberKey = member.identity.identityKey.toHex();\n const displayName = member.identity?.profile?.displayName || generateName(memberKey);\n return (\n <Select.Option key={memberKey} value={memberKey}>\n {displayName}\n </Select.Option>\n );\n })}\n </Select.Viewport>\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n </Input.Root>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { ArrowURightDown, Circle } from '@phosphor-icons/react';\nimport { Chess, type Color } from 'chess.js';\nimport React, { type FC } from 'react';\nimport { Chessboard as ReactChessboard } from 'react-chessboard';\nimport { useResizeDetector } from 'react-resize-detector';\n\nimport { getSize, mx } from '@dxos/react-ui-theme';\n\nimport { customPieces, phosphorPieces, riohachaPieces } from './pieces';\n\nexport enum ChessPieces {\n STANDARD = 0,\n CUSTOM = 1,\n FUTURE = 2,\n RIOHACHA = 3,\n}\n\nconst chessPieces = {\n [ChessPieces.STANDARD]: undefined,\n [ChessPieces.CUSTOM]: customPieces,\n [ChessPieces.FUTURE]: phosphorPieces,\n [ChessPieces.RIOHACHA]: riohachaPieces,\n};\n\n// TODO(burdon): Replace with classes.\nconst props = {\n customDropSquareStyle: { boxShadow: 'inset 0 0 1px 2px black' },\n};\n\nexport type BoardStyle = 'default' | 'blue' | 'dark';\n\nexport const boardStyles: Record<BoardStyle, any> = {\n default: {\n customDarkSquareStyle: { backgroundColor: '#AE8A68' },\n customLightSquareStyle: { backgroundColor: '#f0d9b5' },\n },\n blue: {\n customDarkSquareStyle: { backgroundColor: '#CCD3DB' },\n customLightSquareStyle: { backgroundColor: '#6C95B9' },\n },\n dark: {\n customDarkSquareStyle: { backgroundColor: '#555' },\n customLightSquareStyle: { backgroundColor: '#888' },\n },\n};\n\nexport type ChessModel = {\n chess: Chess;\n};\n\nexport type ChessMove = {\n from: string;\n to: string;\n promotion?: string;\n};\n\nexport type ChessboardProps = {\n model: ChessModel;\n orientation?: Color;\n readonly?: boolean;\n boardStyle?: BoardStyle;\n pieces?: ChessPieces;\n onUpdate?: (move: ChessMove) => void;\n};\n\n/**\n * https://www.npmjs.com/package/chess.js\n * https://www.npmjs.com/package/react-chessboard\n */\nexport const Chessboard = ({\n model: { chess },\n orientation = 'w',\n readonly = false,\n boardStyle = 'blue',\n pieces = ChessPieces.STANDARD,\n onUpdate,\n}: ChessboardProps) => {\n const { ref, width } = useResizeDetector();\n const style = boardStyles[boardStyle];\n\n const handleDrop = (source: any, target: any, piece: any) => {\n try {\n // Promotion piece will be selected by popup.\n const move = { from: source, to: target, promotion: piece.toLowerCase()[1] };\n const state = new Chess(chess.fen());\n const result = state.move(move);\n if (result) {\n onUpdate?.(move);\n return true;\n } else {\n return false;\n }\n } catch (err) {\n return false;\n }\n };\n\n // https://react-chessboard.com/?path=/story/example-chessboard--configurable-board\n return (\n <div ref={ref} className='flex grow aspect-square overflow-hidden'>\n <ReactChessboard\n boardWidth={width}\n position={chess.fen()}\n boardOrientation={orientation === 'w' ? 'white' : 'black'}\n arePiecesDraggable={!readonly}\n onPieceDrop={handleDrop}\n customPieces={chessPieces[pieces]}\n {...style}\n {...props}\n />\n </div>\n );\n};\n\nexport const ChessPanel: FC<{\n model: ChessModel;\n orientation?: Color;\n onFlip?: () => void;\n}> = ({ model: { chess }, orientation = 'w', onFlip }) => {\n const history = chess.history();\n const label = chess.isGameOver()\n ? chess.isCheckmate()\n ? 'CHECKMATE'\n : chess.isStalemate()\n ? 'STALEMATE'\n : 'DRAW'\n : chess.isCheck()\n ? 'CHECK'\n : history.length\n ? `Move ${history.length}`\n : '';\n\n const Player = ({ color }: { color: Color }) => {\n const turn = color === chess.turn();\n\n return (\n <div className='flex items-center'>\n <Circle\n className={mx(getSize(4), turn && (chess.isCheckmate() ? 'text-red-500' : 'text-green-500'))}\n weight={turn ? 'fill' : 'thin'}\n />\n </div>\n );\n };\n\n return (\n <div className='flex flex-col'>\n <div className='flex items-center justify-between pl-2 pr-2 border-b' style={{ height: 32 }}>\n <Player color={orientation === 'w' ? 'b' : 'w'} />\n {onFlip && (\n <button onClick={onFlip}>\n <ArrowURightDown weight='thin' className={getSize(6)} />\n </button>\n )}\n </div>\n\n <div className='flex flex-col justify-center pl-2 font-thin' style={{ height: 40 }}>\n {label}\n </div>\n\n <div className='flex items-center justify-between pl-2 pr-2 border-t' style={{ height: 32 }}>\n <Player color={orientation} />\n </div>\n </div>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { fill: '#999' },\n black: { fill: '#000' },\n};\n\n/**\n * https://www.svgrepo.com/collection/line-awesome/\n * https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces\n * By Cburnett\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 9 C 13.800781 9 12 10.800781 12 13 C 12 14.199219 12.558594 15.265625 13.40625 16 L 12 16 C 11.96875 16 11.9375 16 11.90625 16 C 11.355469 16.027344 10.925781 16.496094 10.953125 17.046875 C 10.980469 17.597656 11.449219 18.027344 12 18 L 12.5 18 L 11.09375 21.5625 L 10.375 23 L 9 23 C 8.96875 23 8.9375 23 8.90625 23 C 8.433594 23.03125 8.050781 23.386719 7.980469 23.855469 C 7.914063 24.320313 8.183594 24.773438 8.625 24.9375 L 7.28125 26.28125 L 7 26.59375 L 7 29 L 25 29 L 25 26.59375 L 24.71875 26.28125 L 23.375 24.9375 C 23.832031 24.765625 24.101563 24.289063 24.007813 23.808594 C 23.917969 23.328125 23.488281 22.988281 23 23 L 21.625 23 L 20.90625 21.5625 L 19.5 18 L 20 18 C 20.359375 18.003906 20.695313 17.816406 20.878906 17.503906 C 21.058594 17.191406 21.058594 16.808594 20.878906 16.496094 C 20.695313 16.183594 20.359375 15.996094 20 16 L 18.59375 16 C 19.441406 15.265625 20 14.199219 20 13 C 20 10.800781 18.199219 9 16 9 Z M 16 11 C 17.117188 11 18 11.882813 18 13 C 18 14.117188 17.117188 15 16 15 C 14.882813 15 14 14.117188 14 13 C 14 11.882813 14.882813 11 16 11 Z M 14.6875 18 L 17.3125 18 L 19.0625 22.375 L 19.09375 22.40625 L 19.09375 22.4375 L 19.375 23 L 12.625 23 L 12.90625 22.4375 L 12.90625 22.40625 L 12.9375 22.375 Z M 11.4375 25 L 20.5625 25 L 22.5625 27 L 9.4375 27 Z'\n />\n </svg>\n ),\n r: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 9 4 L 9 13 L 12.75 13 L 12.53125 14 L 12 14 C 11.96875 14 11.9375 14 11.90625 14 C 11.355469 14.027344 10.925781 14.496094 10.953125 15.046875 C 10.980469 15.597656 11.449219 16.027344 12 16 L 12.09375 16 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.90625 16 L 20 16 C 20.359375 16.003906 20.695313 15.816406 20.878906 15.503906 C 21.058594 15.191406 21.058594 14.808594 20.878906 14.496094 C 20.695313 14.183594 20.359375 13.996094 20 14 L 19.46875 14 L 19.25 13 L 23 13 L 23 4 Z M 11 6 L 13 6 L 13 9 L 15 9 L 15 6 L 17 6 L 17 9 L 19 9 L 19 6 L 21 6 L 21 11 L 11 11 Z M 14.78125 13 L 17.21875 13 L 17.4375 14 L 14.5625 14 Z M 14.125 16 L 17.875 16 L 19.03125 21.21875 L 19.0625 21.34375 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.9375 21.34375 L 12.96875 21.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n n: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.230469 3 13.058594 3.984375 12.59375 5 C 12.242188 5.769531 12.285156 6.304688 12.28125 6.75 C 11.535156 7.257813 10.75 7.90625 10.125 8.53125 C 8.726563 9.929688 7.960938 11.921875 8 14.03125 C 8.019531 15.003906 8.21875 15.980469 8.59375 16.96875 C 8.78125 17.464844 9.125 18.324219 9.4375 19.28125 C 9.75 20.238281 10 21.292969 10 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.367188 22.035156 7.953125 22.492188 7.972656 23.03125 C 7.988281 23.570313 8.429688 23.996094 8.96875 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 22 22 C 22 19.738281 20.59375 17.664063 19.28125 16.0625 C 18.53125 15.144531 18.285156 14.984375 17.78125 14.5 C 17.960938 14.394531 18.183594 14.269531 18.3125 14.1875 C 18.472656 14.085938 18.558594 14.023438 18.59375 14 C 18.875 14 18.894531 14.046875 19.1875 14.28125 C 19.480469 14.515625 20.078125 15 20.90625 15 C 21.632813 15 22.164063 14.53125 22.4375 14.1875 C 22.6875 13.871094 22.824219 13.632813 22.84375 13.59375 C 22.933594 13.550781 23.128906 13.488281 23.375 13.3125 C 23.621094 13.136719 23.941406 12.746094 24 12.3125 C 24.058594 11.878906 23.921875 11.5 23.75 11.125 C 23.496094 10.570313 23.023438 9.933594 22.28125 9.15625 C 21.539063 8.378906 20.566406 7.554688 19.375 7.0625 C 19.285156 7.023438 19.359375 7.082031 19.3125 7.03125 C 19.265625 6.980469 19.125 6.769531 18.84375 6.5625 C 18.476563 6.292969 17.679688 6.261719 17 6.1875 L 17 3 Z M 15 5.21875 L 15 8 L 16 8 C 17.363281 8 17.664063 8.164063 17.65625 8.15625 C 17.652344 8.152344 17.660156 8.171875 17.8125 8.34375 C 17.964844 8.515625 18.261719 8.785156 18.625 8.9375 C 19.425781 9.269531 20.226563 9.917969 20.84375 10.5625 C 21.421875 11.164063 21.808594 11.761719 21.875 11.875 C 21.714844 11.953125 21.546875 12.007813 21.34375 12.25 C 21.070313 12.582031 20.972656 12.8125 20.875 12.9375 C 20.84375 12.976563 20.847656 12.988281 20.84375 13 C 20.757813 12.988281 20.699219 12.933594 20.4375 12.71875 C 20.109375 12.453125 19.457031 12 18.59375 12 C 17.9375 12 17.566406 12.300781 17.25 12.5 C 16.933594 12.699219 16.679688 12.84375 16.59375 12.875 L 16.5625 12.90625 L 16.53125 12.90625 C 16.347656 12.984375 16.03125 13 16.03125 13 L 15 12.96875 L 15 14.5625 L 15.34375 14.84375 C 15.34375 14.84375 16.53125 15.890625 17.71875 17.34375 C 18.90625 18.796875 20 20.667969 20 22 L 12 22 C 12 20.878906 11.6875 19.703125 11.34375 18.65625 C 11 17.609375 10.59375 16.695313 10.4375 16.28125 C 10.144531 15.507813 10.015625 14.707031 10 13.96875 C 9.96875 12.363281 10.542969 10.925781 11.53125 9.9375 C 12.183594 9.285156 13.15625 8.46875 13.6875 8.15625 L 14.1875 7.875 L 14.1875 7.3125 C 14.1875 6.941406 14.1875 6.320313 14.40625 5.84375 C 14.53125 5.574219 14.703125 5.367188 15 5.21875 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n b: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.441406 14.15625 5.855469 14.40625 6.1875 C 14.050781 6.5625 13.644531 7.011719 13.21875 7.53125 C 12.171875 8.8125 11 10.292969 11 12 C 11 13.136719 11.414063 14.160156 12.0625 15 L 12 15 C 11.96875 15 11.9375 15 11.90625 15 C 11.355469 15.027344 10.925781 15.496094 10.953125 16.046875 C 10.980469 16.597656 11.449219 17.027344 12 17 L 12.5 17 L 11.09375 20.5625 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.90625 20.5625 L 19.5 17 L 20 17 C 20.359375 17.003906 20.695313 16.816406 20.878906 16.503906 C 21.058594 16.191406 21.058594 15.808594 20.878906 15.496094 C 20.695313 15.183594 20.359375 14.996094 20 15 C 20.628906 14.160156 21 13.121094 21 12 C 21 10.292969 19.828125 8.8125 18.78125 7.53125 C 18.355469 7.011719 17.949219 6.5625 17.59375 6.1875 C 17.84375 5.855469 18 5.441406 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 7.46875 C 16.363281 7.835938 16.609375 8.066406 17.21875 8.8125 C 18.171875 9.980469 19 11.5 19 12 C 19 13.679688 17.699219 15 16.03125 15 C 14.363281 15 13 13.660156 13 12 C 13 11.5 13.828125 9.980469 14.78125 8.8125 C 15.390625 8.066406 15.636719 7.835938 16 7.46875 Z M 14.6875 17 L 17.3125 17 L 19.0625 21.375 L 19.09375 21.40625 L 19.09375 21.4375 L 19.375 22 L 12.625 22 L 12.90625 21.4375 L 12.90625 21.40625 L 12.9375 21.375 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n q: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.730469 14.402344 6.371094 15 6.71875 L 15 8.25 C 15 8.675781 14.675781 9 14.25 9 L 11.90625 9 C 11.59375 9 11.316406 8.851563 11.15625 8.625 C 11.667969 8.261719 12 7.667969 12 7 C 12 5.90625 11.09375 5 10 5 C 8.90625 5 8 5.90625 8 7 C 8 7.730469 8.402344 8.371094 9 8.71875 L 9 10.40625 L 9.28125 10.71875 L 11.625 13.0625 C 11.167969 13.234375 10.902344 13.710938 10.996094 14.1875 C 11.089844 14.667969 11.511719 15.011719 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.488281 15.011719 20.917969 14.671875 21.007813 14.191406 C 21.101563 13.710938 20.832031 13.234375 20.375 13.0625 L 22.71875 10.71875 L 23 10.40625 L 23 8.71875 C 23.597656 8.371094 24 7.730469 24 7 C 24 5.90625 23.09375 5 22 5 C 20.90625 5 20 5.90625 20 7 C 20 7.667969 20.332031 8.261719 20.84375 8.625 C 20.683594 8.851563 20.40625 9 20.09375 9 L 17.75 9 C 17.324219 9 17 8.675781 17 8.25 L 17 6.71875 C 17.597656 6.371094 18 5.730469 18 5 C 18 3.90625 17.09375 3 16 3 Z M 16 10.34375 C 16.480469 10.746094 17.082031 11 17.75 11 L 19.5625 11 L 17.5625 13 L 14.4375 13 L 12.4375 11 L 14.25 11 C 14.917969 11 15.519531 10.746094 16 10.34375 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n k: (style) => (\n <svg fill='#000000' width='45px' height='45px' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path\n style={style}\n d='M 16 3 C 14.90625 3 14 3.90625 14 5 C 14 5.359375 14.109375 5.707031 14.28125 6 L 8 6 L 8 8.375 L 8.21875 8.625 L 11.875 13 C 11.324219 13.035156 10.902344 13.511719 10.9375 14.0625 C 10.972656 14.613281 11.449219 15.035156 12 15 L 12.65625 15 L 11.09375 20.5625 L 11.03125 20.71875 L 10.375 22 L 9 22 C 8.96875 22 8.9375 22 8.90625 22 C 8.355469 22.027344 7.925781 22.496094 7.953125 23.046875 C 7.980469 23.597656 8.449219 24.027344 9 24 L 7.1875 26.40625 L 7 26.65625 L 7 29 L 25 29 L 25 26.65625 L 24.8125 26.40625 L 23 24 C 23.359375 24.003906 23.695313 23.816406 23.878906 23.503906 C 24.058594 23.191406 24.058594 22.808594 23.878906 22.496094 C 23.695313 22.183594 23.359375 21.996094 23 22 L 21.625 22 L 20.96875 20.71875 L 20.9375 20.65625 L 20.90625 20.5625 L 19.34375 15 L 20 15 C 20.550781 15.042969 21.035156 14.628906 21.078125 14.078125 C 21.121094 13.527344 20.707031 13.042969 20.15625 13 L 23.78125 8.625 L 24 8.375 L 24 6 L 17.71875 6 C 17.890625 5.707031 18 5.359375 18 5 C 18 3.90625 17.09375 3 16 3 Z M 10.3125 8 L 21.6875 8 L 17.53125 13 L 14.46875 13 Z M 14.75 15 L 17.25 15 L 19.03125 21.28125 L 19.0625 21.375 L 19.375 22 L 12.625 22 L 12.9375 21.375 L 12.96875 21.28125 Z M 11.5 24 L 20.5 24 L 22.75 27 L 9.25 27 Z'\n />\n </svg>\n ),\n};\n\nexport const customPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Flame, Crown, ShieldStar, Plus, Asterisk, User } from '@phosphor-icons/react';\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { width: undefined, height: undefined, color: 'darkred' },\n black: { width: undefined, height: undefined, color: 'black' },\n};\n\nconst Wrapper = ({ children }: { children: ReactNode }) => (\n <svg viewBox='-1, -1, 42, 42' className='logo'>\n <g transform='translate(5 5) scale(0.75 0.75)'>{children}</g>\n </svg>\n);\n\n/**\n * From lichess.\n * Select pieces from settings.\n * Inspect pieces; hover over background-image CSS (data URL); open image in new tab; inspect image and copy SVG HTML.\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <Wrapper>\n <User {...style} />\n </Wrapper>\n ),\n r: (style) => (\n <Wrapper>\n <Plus {...style} />\n </Wrapper>\n ),\n n: (style) => (\n <Wrapper>\n <ShieldStar {...style} />\n </Wrapper>\n ),\n b: (style) => (\n <Wrapper>\n <Flame {...style} />\n </Wrapper>\n ),\n q: (style) => (\n <Wrapper>\n <Asterisk {...style} />\n </Wrapper>\n ),\n k: (style) => (\n <Wrapper>\n <Crown {...style} />\n </Wrapper>\n ),\n};\n\nexport const phosphorPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type ReactNode } from 'react';\n\nconst style = {\n white: { c1: '#f8f8f8', c2: '#d3d3d3' },\n black: { c1: '#565252', c2: '#444242' },\n};\n\n/**\n * From lichess.\n * Select pieces from settings.\n * Inspect pieces; hover over background-image CSS (data URL); open image in new tab; inspect image and copy SVG HTML.\n */\nconst pieces: Record<string, (style: any) => ReactNode> = {\n p: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='535 1350 1333 1333'>\n <path\n d='M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z'\n fill={style.c1}\n />\n <path\n d='M1590 2500v-99l-82-3-82-3-58-181-58-182 39-39c38-38 61-91 61-144 0-30-19-89-29-89-3 0-65 59-136 130-84 84-135 128-145 125-17-6-22-10 77 68l60 48 12 117c16 154 15 152 57 152h34v200h250z'\n fill={style.c2}\n />\n <path\n d='M1340 2500v-100h-34c-42 0-41 2-57-152l-12-117-64-51-63-51-10 26c-6 15-10 31-10 38 0 11-24 87-75 237l-23 65-86 3-86 3v199h520zm-91-614l133-134-41-40c-55-53-117-68-190-47-113 34-170 176-115 287 13 25 59 68 73 68 3 0 66-60 140-134z'\n fill={style.c1}\n />\n <path\n d='M820 2500v-99l87-3 87-3 56-182 57-182-30-28c-62-58-82-147-51-221 52-126 211-166 311-79 91 80 96 207 12 290l-39 39 58 182 58 181 82 3 82 3v199H820z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n r: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='1670 1350 1333 1333'>\n <path\n d='M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M2710 2500v-100h-129l-5-32c-3-18-15-125-26-238-17-176-18-206-6-215 8-5 35-22 60-37l46-28-2-162-3-163-58-3-57-3v51c0 49-1 50-30 50h-30v230h-238l-237 1 54 34c30 19 57 38 60 42 3 5 12 9 18 10 7 2 65 35 128 74l115 71 1 51c1 29 4 99 8 157l6 105 37 3 38 3v199h250z' />\n <path d='M2418 1573l-3-48-50-3-50-3 3 51 4 50h99z' />\n </g>\n <path\n d='M2460 2501v-100l-38-3-37-3-6-105c-4-58-7-128-8-157l-1-51-122-76c-68-41-126-72-130-68-3 4-9 39-13 77-4 39-8 86-10 105-7 68-14 146-19 203-3 32-8 63-11 68-4 5-33 9-66 9h-59v200h520zm10-766v-115h-149l-3-47-3-48h-90l-3 48-3 47h-109v-101l-58 3-57 3-3 163-2 162h480z'\n fill={style.c1}\n />\n <path\n d='M1940 2500v-99l62-3 63-3 22-210c30-287 33-256-37-299l-60-38 2-161 3-162 57-3 58-3v101h109l3-47 3-48h190l3 48 3 47h109v-101l57 3 58 3 3 163 2 162-46 28c-25 15-52 32-60 37-12 9-11 39 6 215 11 113 23 220 26 238l5 32h129v200h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n n: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='2780 1350 1333 1333'>\n <path\n d='M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M3830 2500v-99l-106-3-106-3 81-69 82-69-45-46-45-46 21-25c12-14 35-54 51-89 55-116 47-264-19-377-31-52-108-126-162-153-53-27-62-27-26 2 46 35 73 68 103 127 124 239-6 525-267 591-35 8-63 17-64 20-1 2 9 34 21 72l23 67h158v200h300z' />\n <path d='M3540 1923v-97l-48 47c-40 39-50 45-62 35-13-11-13-11-2 2 10 12 4 22-35 62l-47 48h194z' />\n </g>\n <path\n d='M3530 2500v-100h-158l-21-62c-12-35-21-67-21-72-1-5 27-17 62-25 261-66 390-350 268-591-27-52-103-140-122-140-12 0-428 279-428 287 0 6 74 106 101 137 5 5 16 0 26-11 37-43 126-55 178-23l30 18 47-46 48-46v194h-195l-115 115-114 114 20 23c10 13 25 27 33 32 7 4 30 24 49 42 20 19 40 34 44 34s8 5 8 10c0 6-42 10-105 10h-105v200h470z'\n fill={style.c1}\n />\n <path\n d='M3060 2500v-99l106-3 106-3-82-69-82-69 168-168 167-167-26-16c-43-29-91-31-141-6-25 12-46 26-46 31 0 22-22 5-67-53-28-35-53-68-57-75-4-8 66-61 212-159l220-146 42 22c190 97 273 340 183 531-16 35-39 75-51 89l-21 25 45 46 45 46-82 69-81 69 106 3 106 3v199h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n b: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='3890 1350 1330 1330'>\n <path\n d='M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z'\n fill={style.c1}\n />\n <path\n d='M4950 2500v-100h-179l-10-37c-6-21-25-100-43-175l-32-137 77-100c42-55 77-101 77-103s-54-1-119 2l-119 5-72 93c-39 50-74 92-78 92s-8 11-8 25c-1 14 2 25 6 25 5 0 38 18 74 41l64 40 7 97c9 134 8 132 61 132h44v200h250zm-422-699c18-22 32-43 32-48 0-4-10-21-23-37l-23-29-36 49-36 48 21 28c11 15 24 28 27 28 4 0 21-18 38-39z'\n fill={style.c2}\n />\n <path\n d='M4700 2500v-100h-44c-53 0-52 2-61-132l-7-97-64-40c-36-23-69-41-73-41-7 0-20 46-63 223l-21 87h-187v200h520zm-168-555l73-95h112c62 0 113-3 112-7 0-9-31-50-157-208-50-64-92-121-92-126 0-20-18-5-63 56l-48 64 45 58c25 32 46 62 46 66 0 11-61 87-70 87-4 0-26-27-50-60-24-32-46-57-51-55-4 3-26 33-49 66l-41 61 47 61c27 34 60 77 74 94 14 18 28 33 32 33s40-43 80-95z'\n fill={style.c1}\n />\n <path\n d='M4180 2500v-100h186l38-162c21-90 40-168 43-174 2-6-30-54-72-107-41-54-75-102-75-108s21-38 47-71l47-61 26 31 27 32 32-45 32-45-20-29c-12-16-21-32-21-36 0-10 92-125 99-125 3 1 37 42 76 93 38 50 99 128 133 174l64 82-78 101-78 101 32 137c18 75 37 154 43 175l10 37h179v200h-770z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n q: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='5010 1350 1333 1333'>\n <path\n d='M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z'\n fill={style.c1}\n />\n <g fill={style.c2}>\n <path d='M6060 2500v-100h-178l-10-47c-6-27-18-86-27-133l-16-85 110-238 110-238-32 7c-71 15-77 20-77 67 0 38-6 50-60 110l-60 68v-99c0-92 2-100 25-122 14-13 25-29 25-35 0-22-42-115-52-115-5 0-7 4-4 8 3 5-22 134-54 288-33 153-60 282-60 286 0 5-38 8-85 8-67 0-85 3-85 14 0 8-3 23-6 33-4 12-3 14 3 5 7-9 30 1 94 40l84 53 3 63 3 62h109v200h240z' />\n <path d='M5640 1992c0-7 11-35 25-64 14-28 21-54 16-57-4-3-24-43-44-89-35-80-35-84-21-119l15-36-42-43c-24-24-46-44-49-44-8 0 83 447 93 456 4 4 7 2 7-4z' />\n </g>\n <path\n d='M5820 2500v-100h-109l-3-62-3-63-84-53c-61-38-87-49-92-40-3 7-12 42-18 78-7 36-17 82-23 103l-11 37h-177v200h520zm-120-378c0-4 27-133 60-287 33-153 57-281 54-284-2-3-23 13-45 35l-40 40 16 39c14 31 14 43 4 64-12 26-29 65-47 111-5 14-22 51-36 83s-26 63-26 70c-1 40-23-44-60-230-24-117-47-210-51-207-5 3-9 13-9 23 0 9-4 21-9 27-22 24-21 61 4 84 23 22 25 30 25 117 0 51-4 93-8 93-5 0-24-19-42-42-19-24-42-49-52-56-13-9-18-26-18-57 0-24-6-47-13-52-19-12-81-33-85-28-3 2 8 30 23 62 83 177 126 272 159 346l25 57h85c48 0 86-3 86-8z'\n fill={style.c1}\n />\n <path\n d='M5300 2500v-100h178l10-47c6-27 18-86 27-133l17-85-107-233c-59-128-105-235-103-237 2-3 24 1 49 8 43 12 44 14 47 58 3 40 10 54 62 110l59 64 1-94c0-89-2-97-26-122l-27-28 23-61c12-33 25-60 29-60s26 20 50 44l42 43-15 36c-14 35-13 39 22 121 20 48 39 86 43 86 3 0 22-39 42-86 35-83 36-87 22-122l-16-36 43-43c23-24 45-43 49-43 7 0 49 97 49 115 0 6-11 22-25 35-23 22-25 30-25 122v99l60-68c54-60 60-72 60-110 0-47 6-52 77-67l32-7-110 238-110 238 16 85c9 47 21 106 27 133l10 47h178v200h-760z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n k: (style) => (\n <svg xmlns='http://www.w3.org/2000/svg' viewBox='6150 1350 1333 1333'>\n <path\n d='M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z'\n fill={style.c1}\n />\n <path\n d='M7200 2500v-99l-117-3-117-3-15-57-15-57 72-150c40-83 72-151 72-153s-45-2-99 0c-65 2-101 7-104 15-2 7-17 74-32 150l-28 137h-58c-43 0-58 4-63 16-8 21-8 24 4 24 5 0 39 18 75 40 55 34 74 40 120 40h55v200h250zm-324-692c-4-18-9-50-13-71l-6-38 42 7 41 7v-106l-40 7-40 6 7-45c6-44 5-45-23-45h-29v310h34c32 0 33-1 27-32zm-179-148c0-30-2-43-4-27-2 15-2 39 0 55 2 15 4 2 4-28z'\n fill={style.c2}\n />\n <path\n d='M6950 2500v-100h-55c-46 0-65-6-120-40-36-22-69-40-74-40-4 0-14 18-21 40l-13 40h-237v200h520zm-105-357c15-76 30-144 33-150 3-9 33-13 101-13 89-1 94-2 76-16-22-17-81-44-131-61-46-15-191-9-249 11-47 16-115 55-115 66 0 3 31 70 68 150l67 145 61 3 61 3zm-29-316c2-7 3-76 2-152l-3-140-29-3c-26-3-28-1-22 22 3 14 9 37 12 51 5 19 3 24-7 21-8-2-26-7-42-10-27-6-27-6-27 44v50l42-6 41-7-6 39c-4 21-9 54-13 72-6 30-5 32 20 32 15 0 29-6 32-13z'\n fill={style.c1}\n />\n <path\n d='M6430 2500v-100h237l17-57 16-58-72-153-72-154 24-19c58-44 130-63 240-64 98 0 109 2 170 32 36 17 71 36 78 41 11 7-1 41-59 161l-73 152 15 57 15 57 117 3 117 3v199h-770zm333-705c4-25 9-56 13-70 6-24 5-25-40-19l-46 7v-105l46 7c41 6 45 5 40-12-3-10-8-30-12-45l-6-28h115l-6 45-7 45 40-6 40-7v106l-41-7-42-7 6 38c4 21 9 53 13 71l6 32h-125z'\n fill='none'\n stroke='#000'\n strokeWidth='24'\n />\n </svg>\n ),\n};\n\nexport const riohachaPieces: Record<string, ReactNode> = {\n wP: pieces.p(style.white),\n wR: pieces.r(style.white),\n wN: pieces.n(style.white),\n wB: pieces.b(style.white),\n wQ: pieces.q(style.white),\n wK: pieces.k(style.white),\n\n bP: pieces.p(style.black),\n bR: pieces.r(style.black),\n bN: pieces.n(style.black),\n bB: pieces.b(style.black),\n bQ: pieces.q(style.black),\n bK: pieces.k(style.black),\n};\n"],
|
|
5
|
-
"mappings": ";AAIA,OAAOA,YAAoC;AAE3C,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;;;ACH1B,SAASC,kBAAkB;AAC3B,SAASC,SAASC,eAAe;AACjC,OAAOC,UAASC,WAAWC,gBAAgB;AAE3C,SAASC,oBAAoB;AAC7B,SAASC,iBAAiB;AAC1B,SAASC,kBAAgD;AACzD,SAASC,OAAOC,QAAQC,uBAAuB;AAC/C,SAASC,WAAAA,UAASC,MAAAA,WAAU;;;ACR5B,SAASC,iBAAiBC,cAAc;AACxC,SAASC,aAAyB;AAClC,OAAOC,YAAwB;AAC/B,SAASC,cAAcC,uBAAuB;AAC9C,SAASC,yBAAyB;AAElC,SAASC,SAASC,UAAU;;;ACN5B,OAAOC,WAA+B;AAEtC,IAAMC,QAAQ;EACZC,OAAO;IAAEC,MAAM;EAAO;EACtBC,OAAO;IAAED,MAAM;EAAO;AACxB;AAOA,IAAME,SAAoD;EACxDC,GAAG,CAACL,WACF,sBAAA,cAACM,OAAAA;IAAIJ,MAAK;IAAUK,OAAM;IAAOC,QAAO;IAAOC,SAAQ;IAAYC,OAAM;KACvE,sBAAA,cAACC,QAAAA;IACCX,OAAOA;IACPY,GAAE;;EAIRC,GAAG,CAACb,WACF,sBAAA,cAACM,OAAAA;IAAIJ,MAAK;IAAUK,OAAM;IAAOC,QAAO;IAAOC,SAAQ;IAAYC,OAAM;KACvE,sBAAA,cAACC,QAAAA;IACCX,OAAOA;IACPY,GA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AAC6B,OAAOe,QAAM;MAACnC,KAAK4B;MAAWzB,OAAOyB;OACnCI,WAAAA;EAGP,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAOd;;;ADnHA,IAAMI,iBAAiB,CAAC,EAAEC,MAAMC,KAAI,MAAkE;AACpG,QAAMC,QAAQC,SAASH,IAAAA;AACvB,MAAI,CAACE,OAAO;AACV,WAAO;EACT;AAEA,SACE,gBAAAE,OAAA,cAACC,UAAUC,SAAO;IAACC,SAAS;KAC1B,gBAAAH,OAAA,cAACI,QAAAA;IAAMR;IAAYE;IAAcO,gBAAgBR,SAAS;;AAGhE;AAEA,IAAA,yBAAeF;",
|
|
6
|
-
"names": ["React", "getSpace", "StackItem", "CrownCross", "Chess", "ChessJs", "React", "useEffect", "useState", "generateName", "invariant", "useMembers", "Input", "Select", "useThemeContext", "getSize", "mx", "ArrowURightDown", "Circle", "Chess", "React", "Chessboard", "ReactChessboard", "useResizeDetector", "getSize", "mx", "React", "style", "white", "fill", "black", "pieces", "p", "svg", "width", "height", "viewBox", "xmlns", "path", "d", "r", "n", "b", "q", "k", "customPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "Flame", "Crown", "ShieldStar", "Plus", "Asterisk", "User", "React", "style", "white", "width", "undefined", "height", "color", "black", "Wrapper", "children", "React", "svg", "viewBox", "className", "g", "transform", "pieces", "p", "User", "r", "Plus", "n", "ShieldStar", "b", "Flame", "q", "Asterisk", "k", "Crown", "phosphorPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "React", "style", "white", "c1", "c2", "black", "pieces", "p", "React", "svg", "xmlns", "viewBox", "path", "d", "fill", "stroke", "strokeWidth", "r", "g", "n", "b", "q", "k", "riohachaPieces", "wP", "wR", "wN", "wB", "wQ", "wK", "bP", "bR", "bN", "bB", "bQ", "bK", "ChessPieces", "chessPieces", "undefined", "customPieces", "phosphorPieces", "riohachaPieces", "props", "customDropSquareStyle", "boxShadow", "boardStyles", "default", "customDarkSquareStyle", "backgroundColor", "customLightSquareStyle", "blue", "dark", "Chessboard", "model", "chess", "orientation", "readonly", "boardStyle", "pieces", "onUpdate", "ref", "width", "useResizeDetector", "style", "handleDrop", "source", "target", "piece", "move", "from", "to", "promotion", "toLowerCase", "state", "Chess", "fen", "result", "err", "React", "div", "className", "ReactChessboard", "boardWidth", "position", "boardOrientation", "arePiecesDraggable", "onPieceDrop", "useChessModel", "game", "model", "setModel", "useState", "useEffect", "pgn", "chess", "ChessJs", "loadPgn", "handleUpdate", "move", "invariant", "Chess", "space", "playerSelector", "React", "div", "role", "className", "Chessboard", "onUpdate", "PlayerSelector", "members", "useMembers", "key", "PlayerSelect", "side", "value", "playerWhite", "onValueChange", "player", "playerBlack", "themeMode", "useThemeContext", "iconFillMode", "undefined", "Input", "Root", "Label", "CrownCross", "mx", "getSize", "weight", "aria-label", "Select", "TriggerButton", "placeholder", "Portal", "Content", "Viewport", "map", "member", "memberKey", "identity", "identityKey", "toHex", "displayName", "profile", "generateName", "Option", "ChessContainer", "game", "role", "space", "getSpace", "React", "StackItem", "Content", "toolbar", "Chess", "playerSelector"]
|
|
7
|
-
}
|