@rpg-engine/long-bow 0.2.96 → 0.2.98

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.
@@ -33479,7 +33479,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33479
33479
  onPlaceDrop = _ref.onPlaceDrop,
33480
33480
  onDrop = _ref.onOutsideDrop,
33481
33481
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33482
- openQuantitySelector = _ref.openQuantitySelector;
33482
+ openQuantitySelector = _ref.openQuantitySelector,
33483
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33483
33484
  var _useState = useState(false),
33484
33485
  isTooltipVisible = _useState[0],
33485
33486
  setTooltipVisible = _useState[1];
@@ -33510,6 +33511,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33510
33511
  x: 0,
33511
33512
  y: 0
33512
33513
  });
33514
+ setIsFocused(false);
33513
33515
  if (item) {
33514
33516
  setContextActions(generateContextMenu(item, containerType));
33515
33517
  }
@@ -33610,7 +33612,6 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33610
33612
  };
33611
33613
  var resetItem = function resetItem() {
33612
33614
  setTooltipVisible(false);
33613
- setIsFocused(false);
33614
33615
  setWasDragged(false);
33615
33616
  };
33616
33617
  var onSuccesfulDrag = function onSuccesfulDrag(quantity) {
@@ -33670,9 +33671,11 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33670
33671
  });
33671
33672
  setTimeout(function () {
33672
33673
  if (checkIfItemCanBeMoved()) {
33674
+ if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;
33673
33675
  if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccesfulDrag);else onSuccesfulDrag(item.stackQty);
33674
33676
  } else {
33675
33677
  resetItem();
33678
+ setIsFocused(false);
33676
33679
  setDragPosition({
33677
33680
  x: 0,
33678
33681
  y: 0
@@ -33713,7 +33716,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33713
33716
  onMouseLeave: function onMouseLeave() {
33714
33717
  setTooltipVisible(false);
33715
33718
  }
33716
- }, onRenderSlot(item))), isTooltipVisible && item && React.createElement(ItemTooltip, {
33719
+ }, onRenderSlot(item))), isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
33717
33720
  label: item.name
33718
33721
  }), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
33719
33722
  options: contextActions,
@@ -33759,7 +33762,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
33759
33762
  onItemDragStart = _ref.onItemDragStart,
33760
33763
  onItemPlaceDrop = _ref.onItemPlaceDrop,
33761
33764
  onItemOutsideDrop = _ref.onItemOutsideDrop,
33762
- checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved;
33765
+ checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33766
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33763
33767
  var neck = equipmentSet.neck,
33764
33768
  leftHand = equipmentSet.leftHand,
33765
33769
  ring = equipmentSet.ring,
@@ -33805,6 +33809,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
33805
33809
  if (onItemDragEnd) onItemDragEnd(quantity);
33806
33810
  },
33807
33811
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
33812
+ checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
33808
33813
  onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
33809
33814
  if (onItemPlaceDrop) onItemPlaceDrop(item, slotIndex, itemContainerType);
33810
33815
  },
@@ -34583,7 +34588,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34583
34588
  onItemPlaceDrop = _ref.onItemPlaceDrop,
34584
34589
  _onOutsideDrop = _ref.onOutsideDrop,
34585
34590
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34586
- initialPosition = _ref.initialPosition;
34591
+ initialPosition = _ref.initialPosition,
34592
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
34587
34593
  var _useState = useState({
34588
34594
  isOpen: false,
34589
34595
  maxQuantity: 1,
@@ -34617,6 +34623,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34617
34623
  if (onItemDragEnd) onItemDragEnd(quantity);
34618
34624
  },
34619
34625
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34626
+ checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34620
34627
  openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {
34621
34628
  setQuantitySelect({
34622
34629
  isOpen: true,