react-native-chess-kit 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/board-annotations.js +131 -0
- package/lib/commonjs/board-annotations.js.map +1 -0
- package/lib/commonjs/board-arrows.js +164 -0
- package/lib/commonjs/board-arrows.js.map +1 -0
- package/lib/commonjs/board-highlights.js +212 -0
- package/lib/commonjs/board-highlights.js.map +1 -0
- package/lib/commonjs/board-piece.js +71 -25
- package/lib/commonjs/board-piece.js.map +1 -1
- package/lib/commonjs/board-pieces.js +2 -0
- package/lib/commonjs/board-pieces.js.map +1 -1
- package/lib/commonjs/board.js +392 -42
- package/lib/commonjs/board.js.map +1 -1
- package/lib/commonjs/constants.js +104 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.js +128 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pieces/default-pieces.js +536 -0
- package/lib/commonjs/pieces/default-pieces.js.map +1 -0
- package/lib/commonjs/pieces/index.js +13 -0
- package/lib/commonjs/pieces/index.js.map +1 -0
- package/lib/commonjs/promotion-picker.js +129 -0
- package/lib/commonjs/promotion-picker.js.map +1 -0
- package/lib/commonjs/static-board.js +150 -0
- package/lib/commonjs/static-board.js.map +1 -0
- package/lib/commonjs/themes.js +175 -0
- package/lib/commonjs/themes.js.map +1 -0
- package/lib/commonjs/use-board-gesture.js +184 -11
- package/lib/commonjs/use-board-gesture.js.map +1 -1
- package/lib/commonjs/use-premove.js +44 -0
- package/lib/commonjs/use-premove.js.map +1 -0
- package/lib/module/board-annotations.js +126 -0
- package/lib/module/board-annotations.js.map +1 -0
- package/lib/module/board-arrows.js +161 -0
- package/lib/module/board-arrows.js.map +1 -0
- package/lib/module/board-highlights.js +206 -0
- package/lib/module/board-highlights.js.map +1 -0
- package/lib/module/board-piece.js +72 -26
- package/lib/module/board-piece.js.map +1 -1
- package/lib/module/board-pieces.js +2 -0
- package/lib/module/board-pieces.js.map +1 -1
- package/lib/module/board.js +395 -44
- package/lib/module/board.js.map +1 -1
- package/lib/module/constants.js +100 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.js +29 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pieces/default-pieces.js +530 -0
- package/lib/module/pieces/default-pieces.js.map +1 -0
- package/lib/module/pieces/index.js +4 -0
- package/lib/module/pieces/index.js.map +1 -0
- package/lib/module/promotion-picker.js +124 -0
- package/lib/module/promotion-picker.js.map +1 -0
- package/lib/module/static-board.js +146 -0
- package/lib/module/static-board.js.map +1 -0
- package/lib/module/themes.js +171 -0
- package/lib/module/themes.js.map +1 -0
- package/lib/module/use-board-gesture.js +185 -11
- package/lib/module/use-board-gesture.js.map +1 -1
- package/lib/module/use-premove.js +40 -0
- package/lib/module/use-premove.js.map +1 -0
- package/lib/typescript/board-annotations.d.ts +30 -0
- package/lib/typescript/board-annotations.d.ts.map +1 -0
- package/lib/typescript/board-arrows.d.ts +27 -0
- package/lib/typescript/board-arrows.d.ts.map +1 -0
- package/lib/typescript/board-highlights.d.ts +65 -0
- package/lib/typescript/board-highlights.d.ts.map +1 -0
- package/lib/typescript/board-piece.d.ts +19 -9
- package/lib/typescript/board-piece.d.ts.map +1 -1
- package/lib/typescript/board-pieces.d.ts +2 -1
- package/lib/typescript/board-pieces.d.ts.map +1 -1
- package/lib/typescript/board.d.ts +11 -2
- package/lib/typescript/board.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +54 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +9 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pieces/default-pieces.d.ts +3 -0
- package/lib/typescript/pieces/default-pieces.d.ts.map +1 -0
- package/lib/typescript/pieces/index.d.ts +2 -0
- package/lib/typescript/pieces/index.d.ts.map +1 -0
- package/lib/typescript/promotion-picker.d.ts +30 -0
- package/lib/typescript/promotion-picker.d.ts.map +1 -0
- package/lib/typescript/static-board.d.ts +12 -0
- package/lib/typescript/static-board.d.ts.map +1 -0
- package/lib/typescript/themes.d.ts +15 -0
- package/lib/typescript/themes.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +194 -24
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/use-board-gesture.d.ts +28 -2
- package/lib/typescript/use-board-gesture.d.ts.map +1 -1
- package/lib/typescript/use-premove.d.ts +31 -0
- package/lib/typescript/use-premove.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/board-annotations.tsx +147 -0
- package/src/board-arrows.tsx +197 -0
- package/src/board-highlights.tsx +226 -0
- package/src/board-piece.tsx +77 -29
- package/src/board-pieces.tsx +4 -1
- package/src/board.tsx +462 -46
- package/src/constants.ts +100 -0
- package/src/index.ts +62 -1
- package/src/pieces/default-pieces.tsx +383 -0
- package/src/pieces/index.ts +1 -0
- package/src/promotion-picker.tsx +147 -0
- package/src/static-board.tsx +150 -0
- package/src/themes.ts +129 -0
- package/src/types.ts +251 -25
- package/src/use-board-gesture.ts +219 -8
- package/src/use-premove.ts +59 -0
|
@@ -6,27 +6,61 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.BoardPieceView = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
|
+
var _constants = require("./constants");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
/**
|
|
13
|
+
* Animate a shared value using the provided AnimationConfig.
|
|
14
|
+
* Falls back to withTiming with moveDuration for backwards compatibility.
|
|
15
|
+
*/
|
|
16
|
+
function animateValue(target, config, moveDuration) {
|
|
17
|
+
if (config) {
|
|
18
|
+
if (config.type === 'spring') {
|
|
19
|
+
return (0, _reactNativeReanimated.withSpring)(target, {
|
|
20
|
+
damping: config.damping ?? 15,
|
|
21
|
+
stiffness: config.stiffness ?? 200,
|
|
22
|
+
mass: config.mass ?? 1
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// timing
|
|
26
|
+
return (0, _reactNativeReanimated.withTiming)(target, {
|
|
27
|
+
duration: config.duration ?? _constants.DEFAULT_MOVE_DURATION
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const duration = moveDuration ?? _constants.DEFAULT_MOVE_DURATION;
|
|
31
|
+
if (duration <= 0) return target;
|
|
32
|
+
return (0, _reactNativeReanimated.withTiming)(target, {
|
|
33
|
+
duration
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
11
37
|
/**
|
|
12
38
|
* A single animated chess piece.
|
|
13
39
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
40
|
+
* Uses two nested Animated.Views to avoid the Reanimated warning
|
|
41
|
+
* "Property opacity may be overwritten by a layout animation":
|
|
42
|
+
*
|
|
43
|
+
* Outer view: position (transform) + exiting layout animation (FadeOut)
|
|
44
|
+
* Inner view: drag-hide opacity
|
|
45
|
+
*
|
|
46
|
+
* Only `transform` and `opacity` are animated — Reanimated's fast path
|
|
47
|
+
* on Android. No layout properties (top/left/width/height), avoiding
|
|
48
|
+
* costly layout recalculations on low-end devices.
|
|
17
49
|
*
|
|
18
50
|
* During drag:
|
|
19
|
-
* -
|
|
20
|
-
* - No position changes on the original piece during drag
|
|
51
|
+
* - Inner view hides (opacity: 0) — the drag ghost shows instead
|
|
21
52
|
*
|
|
22
53
|
* After a move:
|
|
23
|
-
* -
|
|
24
|
-
*
|
|
54
|
+
* - Outer view snaps to new position via withTiming/withSpring
|
|
55
|
+
*
|
|
56
|
+
* On capture (unmount):
|
|
57
|
+
* - Outer view fades out via exiting FadeOut (no conflict with inner opacity)
|
|
25
58
|
*/
|
|
26
59
|
const BoardPieceView = exports.BoardPieceView = /*#__PURE__*/_react.default.memo(function BoardPieceView({
|
|
27
60
|
targetX,
|
|
28
61
|
targetY,
|
|
29
62
|
squareSize,
|
|
63
|
+
animationConfig,
|
|
30
64
|
moveDuration,
|
|
31
65
|
children,
|
|
32
66
|
activeSquare,
|
|
@@ -41,22 +75,24 @@ const BoardPieceView = exports.BoardPieceView = /*#__PURE__*/_react.default.memo
|
|
|
41
75
|
// useEffect is the correct pattern for reacting to JS prop changes —
|
|
42
76
|
// useDerivedValue is meant for shared-value-to-shared-value derivation.
|
|
43
77
|
(0, _react.useEffect)(() => {
|
|
44
|
-
currentX.value =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
78
|
+
currentX.value = animateValue(targetX, animationConfig, moveDuration);
|
|
79
|
+
currentY.value = animateValue(targetY, animationConfig, moveDuration);
|
|
80
|
+
}, [targetX, targetY, animationConfig, moveDuration, currentX, currentY]);
|
|
81
|
+
|
|
82
|
+
// Position style on outer view — no opacity here to avoid conflict
|
|
83
|
+
// with the FadeOut exiting layout animation
|
|
84
|
+
const positionStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
85
|
+
transform: [{
|
|
86
|
+
translateX: currentX.value
|
|
87
|
+
}, {
|
|
88
|
+
translateY: currentY.value
|
|
89
|
+
}]
|
|
90
|
+
}));
|
|
91
|
+
|
|
92
|
+
// Drag-hide opacity on inner view — separate from the exiting animation
|
|
93
|
+
const opacityStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
52
94
|
const isBeingDragged = isDragging.value && activeSquare.value === square;
|
|
53
95
|
return {
|
|
54
|
-
transform: [{
|
|
55
|
-
translateX: currentX.value
|
|
56
|
-
}, {
|
|
57
|
-
translateY: currentY.value
|
|
58
|
-
}],
|
|
59
|
-
// Hide original piece during drag — drag ghost renders on top
|
|
60
96
|
opacity: isBeingDragged ? 0 : 1
|
|
61
97
|
};
|
|
62
98
|
});
|
|
@@ -65,10 +101,20 @@ const BoardPieceView = exports.BoardPieceView = /*#__PURE__*/_react.default.memo
|
|
|
65
101
|
position: 'absolute',
|
|
66
102
|
width: squareSize,
|
|
67
103
|
height: squareSize
|
|
68
|
-
},
|
|
69
|
-
|
|
104
|
+
}, positionStyle]
|
|
105
|
+
// Fade out when this piece is captured (removed from the piece list).
|
|
106
|
+
// Lives on the outer view so it doesn't conflict with the
|
|
107
|
+
// drag-hide opacity on the inner view.
|
|
108
|
+
,
|
|
109
|
+
exiting: _reactNativeReanimated.FadeOut.duration(_constants.CAPTURE_FADE_DURATION),
|
|
110
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
111
|
+
style: [{
|
|
112
|
+
flex: 1
|
|
113
|
+
}, opacityStyle],
|
|
114
|
+
children: children
|
|
115
|
+
})
|
|
70
116
|
});
|
|
71
117
|
},
|
|
72
|
-
// Custom comparator: only re-render when position or
|
|
73
|
-
(prev, next) => prev.targetX === next.targetX && prev.targetY === next.targetY && prev.square === next.square && prev.squareSize === next.squareSize && prev.moveDuration === next.moveDuration && prev.children === next.children);
|
|
118
|
+
// Custom comparator: only re-render when position, square, or animation config changes
|
|
119
|
+
(prev, next) => prev.targetX === next.targetX && prev.targetY === next.targetY && prev.square === next.square && prev.squareSize === next.squareSize && prev.moveDuration === next.moveDuration && prev.animationConfig === next.animationConfig && prev.children === next.children);
|
|
74
120
|
//# sourceMappingURL=board-piece.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeReanimated","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","BoardPieceView","exports","React","memo","targetX","targetY","squareSize","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeReanimated","_constants","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","animateValue","target","config","moveDuration","type","withSpring","damping","stiffness","mass","withTiming","duration","DEFAULT_MOVE_DURATION","BoardPieceView","exports","React","memo","targetX","targetY","squareSize","animationConfig","children","activeSquare","isDragging","square","currentX","useSharedValue","currentY","useEffect","value","positionStyle","useAnimatedStyle","transform","translateX","translateY","opacityStyle","isBeingDragged","opacity","jsx","View","style","position","width","height","exiting","FadeOut","CAPTURE_FADE_DURATION","flex","prev","next"],"sourceRoot":"..\\..\\src","sources":["board-piece.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,uBAAA,CAAAC,OAAA;AAUA,IAAAE,UAAA,GAAAF,OAAA;AAA2E,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UA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,OAAQ,CAAC+C,IAAI;IACZC,KAAK,EAAE,CACL;MACEC,QAAQ,EAAE,UAAU;MACpBC,KAAK,EAAEvB,UAAU;MACjBwB,MAAM,EAAExB;IACV,CAAC,EACDW,aAAa;IAEf;IACA;IACA;IAAA;IACAc,OAAO,EAAEC,8BAAO,CAAClC,QAAQ,CAACmC,gCAAqB,CAAE;IAAAzB,QAAA,eAEjD,IAAAxC,WAAA,CAAAyD,GAAA,EAAC3D,sBAAA,CAAAa,OAAQ,CAAC+C,IAAI;MAACC,KAAK,EAAE,CAAC;QAAEO,IAAI,EAAE;MAAE,CAAC,EAAEZ,YAAY,CAAE;MAAAd,QAAA,EAC/CA;IAAQ,CACI;EAAC,CACH,CAAC;AAEpB,CAAC;AACD;AACA,CAAC2B,IAAI,EAAEC,IAAI,KACTD,IAAI,CAAC/B,OAAO,KAAKgC,IAAI,CAAChC,OAAO,IAC7B+B,IAAI,CAAC9B,OAAO,KAAK+B,IAAI,CAAC/B,OAAO,IAC7B8B,IAAI,CAACxB,MAAM,KAAKyB,IAAI,CAACzB,MAAM,IAC3BwB,IAAI,CAAC7B,UAAU,KAAK8B,IAAI,CAAC9B,UAAU,IACnC6B,IAAI,CAAC5C,YAAY,KAAK6C,IAAI,CAAC7C,YAAY,IACvC4C,IAAI,CAAC5B,eAAe,KAAK6B,IAAI,CAAC7B,eAAe,IAC7C4B,IAAI,CAAC3B,QAAQ,KAAK4B,IAAI,CAAC5B,QAC3B,CAAC","ignoreList":[]}
|
|
@@ -21,6 +21,7 @@ const BoardPiecesLayer = exports.BoardPiecesLayer = /*#__PURE__*/_react.default.
|
|
|
21
21
|
squareSize,
|
|
22
22
|
orientation,
|
|
23
23
|
moveDuration,
|
|
24
|
+
animationConfig,
|
|
24
25
|
renderPiece,
|
|
25
26
|
activeSquare,
|
|
26
27
|
isDragging
|
|
@@ -36,6 +37,7 @@ const BoardPiecesLayer = exports.BoardPiecesLayer = /*#__PURE__*/_react.default.
|
|
|
36
37
|
targetY: y,
|
|
37
38
|
squareSize: squareSize,
|
|
38
39
|
moveDuration: moveDuration,
|
|
40
|
+
animationConfig: animationConfig,
|
|
39
41
|
activeSquare: activeSquare,
|
|
40
42
|
isDragging: isDragging,
|
|
41
43
|
square: piece.square,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_boardPiece","_useBoardPieces","_jsxRuntime","e","__esModule","default","BoardPiecesLayer","exports","React","memo","pieces","squareSize","orientation","moveDuration","renderPiece","activeSquare","isDragging","jsx","Fragment","children","map","piece","x","y","squareToXY","square","BoardPieceView","targetX","targetY","code","id"],"sourceRoot":"..\\..\\src","sources":["board-pieces.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAgD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_boardPiece","_useBoardPieces","_jsxRuntime","e","__esModule","default","BoardPiecesLayer","exports","React","memo","pieces","squareSize","orientation","moveDuration","animationConfig","renderPiece","activeSquare","isDragging","jsx","Fragment","children","map","piece","x","y","squareToXY","square","BoardPieceView","targetX","targetY","code","id"],"sourceRoot":"..\\..\\src","sources":["board-pieces.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAAgD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAahD;AACA;AACA;AACA;A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