@rpg-engine/long-bow 0.8.59 → 0.8.60

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.59",
3
+ "version": "0.8.60",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -41,12 +41,18 @@ export const ConfirmModal: React.FC<IConfirmModalProps> = ({
41
41
  [onClose]
42
42
  );
43
43
 
44
- const stopPropagation = useCallback(
45
- (e: React.PointerEvent | React.TouchEvent) => {
46
- e.stopPropagation();
47
- },
48
- []
49
- );
44
+ // Fix type issues by separating event handlers for different event types
45
+ const stopPropagationClick = useCallback((e: React.MouseEvent) => {
46
+ e.stopPropagation();
47
+ }, []);
48
+
49
+ const stopPropagationTouch = useCallback((e: React.TouchEvent) => {
50
+ e.stopPropagation();
51
+ }, []);
52
+
53
+ const stopPropagationPointer = useCallback((e: React.PointerEvent) => {
54
+ e.stopPropagation();
55
+ }, []);
50
56
 
51
57
  return (
52
58
  <ModalPortal>
@@ -54,11 +60,11 @@ export const ConfirmModal: React.FC<IConfirmModalProps> = ({
54
60
  <Overlay onPointerDown={handleClose} />
55
61
  <ModalContainer>
56
62
  <ModalContent
57
- onClick={stopPropagation}
58
- onTouchStart={stopPropagation}
59
- onTouchEnd={stopPropagation}
60
- onTouchMove={stopPropagation}
61
- onPointerDown={stopPropagation}
63
+ onClick={stopPropagationClick}
64
+ onTouchStart={stopPropagationTouch}
65
+ onTouchEnd={stopPropagationTouch}
66
+ onTouchMove={stopPropagationTouch}
67
+ onPointerDown={stopPropagationPointer}
62
68
  >
63
69
  <MessageContainer>
64
70
  {typeof message === 'string' ? (