@rpg-engine/long-bow 0.5.23 → 0.5.24

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.
@@ -13474,6 +13474,8 @@ var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
13474
13474
  return renderEquipment(itemToRender);
13475
13475
  case ItemContainerType.Inventory:
13476
13476
  return renderItem(itemToRender);
13477
+ case ItemContainerType.Depot:
13478
+ return renderItem(itemToRender);
13477
13479
  default:
13478
13480
  return null;
13479
13481
  }
@@ -14755,44 +14757,30 @@ var useCursorPosition = function useCursorPosition() {
14755
14757
  x: 0,
14756
14758
  y: 0
14757
14759
  }),
14758
- cursorPosition = _useState[0],
14759
- setCursorPosition = _useState[1];
14760
- useEffect(function () {
14761
- var animationFrameId;
14762
- var updateCursorPosition = function updateCursorPosition(x, y) {
14763
- // Cancel the previous frame request
14764
- cancelAnimationFrame(animationFrameId);
14765
- // Request a new frame
14766
- animationFrameId = requestAnimationFrame(function () {
14767
- setCursorPosition({
14768
- x: x,
14769
- y: y
14770
- });
14760
+ position = _useState[0],
14761
+ setPosition = _useState[1];
14762
+ var setFromEvent = function setFromEvent(e) {
14763
+ if ('touches' in e) {
14764
+ setPosition({
14765
+ x: e.touches[0].clientX,
14766
+ y: e.touches[0].clientY
14771
14767
  });
14772
- };
14773
- var handleMouseMove = function handleMouseMove(event) {
14774
- updateCursorPosition(event.clientX, event.clientY);
14775
- };
14776
- var handleTouchMove = function handleTouchMove(event) {
14777
- // Prevent default touch behavior (like scrolling)
14778
- event.preventDefault();
14779
- if (event.touches.length > 0) {
14780
- var touch = event.touches[0];
14781
- updateCursorPosition(touch.clientX, touch.clientY);
14782
- }
14783
- };
14784
- window.addEventListener('mousemove', handleMouseMove);
14785
- window.addEventListener('touchmove', handleTouchMove, {
14786
- passive: false
14787
- });
14788
- // Cleanup function
14768
+ } else {
14769
+ setPosition({
14770
+ x: e.clientX,
14771
+ y: e.clientY
14772
+ });
14773
+ }
14774
+ };
14775
+ useEffect(function () {
14776
+ window.addEventListener('mousemove', setFromEvent);
14777
+ window.addEventListener('touchmove', setFromEvent);
14789
14778
  return function () {
14790
- window.removeEventListener('mousemove', handleMouseMove);
14791
- window.removeEventListener('touchmove', handleTouchMove);
14792
- cancelAnimationFrame(animationFrameId);
14779
+ window.removeEventListener('mousemove', setFromEvent);
14780
+ window.removeEventListener('touchmove', setFromEvent);
14793
14781
  };
14794
14782
  }, []);
14795
- return cursorPosition;
14783
+ return position;
14796
14784
  };
14797
14785
 
14798
14786
  var CONTAINER_SIZE = 32;