@rpg-engine/long-bow 0.7.99 → 0.8.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.
@@ -27938,15 +27938,14 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
27938
27938
  },
27939
27939
  isFocused: false
27940
27940
  });
27941
- }, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled]);
27942
- useEffect(function () {
27943
- // Reset drag position and focus when item changes
27944
27941
  clearDraggingState();
27945
27942
  // Clear context actions when component unmounts or dependencies change
27946
27943
  return function () {
27944
+ clearDraggingState();
27945
+ clearDetailsState();
27947
27946
  clearContextActions();
27948
27947
  };
27949
- }, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled, updateDraggingState]);
27948
+ }, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled, clearDraggingState, clearDetailsState, updateDraggingState]);
27950
27949
  var resetItem = function resetItem() {
27951
27950
  clearDraggingState();
27952
27951
  clearDetailsState();
@@ -29150,6 +29149,7 @@ var DPadContainer = /*#__PURE__*/memo( /*#__PURE__*/styled.div.withConfig({
29150
29149
  }));
29151
29150
  var JoystickDPad = /*#__PURE__*/memo(function (_ref) {
29152
29151
  var onDirectionPress = _ref.onDirectionPress,
29152
+ onDirectionRelease = _ref.onDirectionRelease,
29153
29153
  _ref$disabled = _ref.disabled,
29154
29154
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
29155
29155
  _ref$options = _ref.options,
@@ -29178,11 +29178,14 @@ var JoystickDPad = /*#__PURE__*/memo(function (_ref) {
29178
29178
  activeDirectionRef.current = null;
29179
29179
  }, []);
29180
29180
  var clearAllPresses = useCallback(function () {
29181
+ if (activeDirectionRef.current && onDirectionRelease) {
29182
+ onDirectionRelease(activeDirectionRef.current);
29183
+ }
29181
29184
  clearPressInterval();
29182
29185
  setPressedButtons(new Set());
29183
29186
  activeDirectionRef.current = null;
29184
29187
  isPressedRef.current = false;
29185
- }, [clearPressInterval]);
29188
+ }, [clearPressInterval, onDirectionRelease]);
29186
29189
  var handleDirectionPress = useCallback(function (direction) {
29187
29190
  if (disabled) return;
29188
29191
  // Clear any existing presses first