@rpg-engine/long-bow 0.8.58 → 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.
@@ -34041,33 +34041,40 @@ var ConfirmModal = function ConfirmModal(_ref) {
34041
34041
  onClose = _ref.onClose,
34042
34042
  _ref$message = _ref.message,
34043
34043
  message = _ref$message === void 0 ? 'Are you sure?' : _ref$message;
34044
- // Add a small delay to prevent accidental closes
34045
- var handleConfirm = function handleConfirm(e) {
34044
+ var handleConfirm = useCallback(function (e) {
34046
34045
  e.preventDefault();
34047
34046
  e.stopPropagation();
34048
34047
  onConfirm();
34049
- };
34050
- var handleClose = function handleClose(e) {
34048
+ }, [onConfirm]);
34049
+ var handleClose = useCallback(function (e) {
34051
34050
  e.preventDefault();
34052
34051
  e.stopPropagation();
34053
34052
  onClose();
34054
- };
34055
- var stopPropagation = function stopPropagation(e) {
34053
+ }, [onClose]);
34054
+ // Fix type issues by separating event handlers for different event types
34055
+ var stopPropagationClick = useCallback(function (e) {
34056
34056
  e.stopPropagation();
34057
- };
34057
+ }, []);
34058
+ var stopPropagationTouch = useCallback(function (e) {
34059
+ e.stopPropagation();
34060
+ }, []);
34061
+ var stopPropagationPointer = useCallback(function (e) {
34062
+ e.stopPropagation();
34063
+ }, []);
34058
34064
  return React.createElement(ModalPortal, null, React.createElement(GlobalStyle, null), React.createElement(Overlay$2, {
34059
- onClick: handleClose
34065
+ onPointerDown: handleClose
34060
34066
  }), React.createElement(ModalContainer, null, React.createElement(ModalContent, {
34061
- onClick: stopPropagation,
34062
- onTouchStart: stopPropagation,
34063
- onTouchEnd: stopPropagation,
34064
- onTouchMove: stopPropagation
34067
+ onClick: stopPropagationClick,
34068
+ onTouchStart: stopPropagationTouch,
34069
+ onTouchEnd: stopPropagationTouch,
34070
+ onTouchMove: stopPropagationTouch,
34071
+ onPointerDown: stopPropagationPointer
34065
34072
  }, React.createElement(MessageContainer, null, typeof message === 'string' ? React.createElement(Message$1, null, message) : message), React.createElement(ButtonsContainer$2, null, React.createElement(CancelButtonWrapper, null, React.createElement(Button, {
34066
34073
  buttonType: ButtonTypes.RPGUIButton,
34067
- onClick: handleClose
34074
+ onPointerDown: handleClose
34068
34075
  }, "No")), React.createElement(Button, {
34069
34076
  buttonType: ButtonTypes.RPGUIButton,
34070
- onClick: handleConfirm
34077
+ onPointerDown: handleConfirm
34071
34078
  }, "Yes")))));
34072
34079
  };
34073
34080
  var Overlay$2 = /*#__PURE__*/styled.div.withConfig({