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