@rpg-engine/long-bow 0.2.87 → 0.2.89

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.
@@ -33635,8 +33635,12 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33635
33635
  });
33636
33636
  (_document$elementFrom = document.elementFromPoint(clientX, clientY)) == null ? void 0 : _document$elementFrom.dispatchEvent(simulatedEvent);
33637
33637
  }
33638
- }, item && React__default.createElement(Draggable, {
33638
+ }, React__default.createElement(Draggable, {
33639
+ defaultClassName: item ? 'draggable' : 'empty-slot',
33639
33640
  onStop: function onStop() {
33641
+ if (!item) {
33642
+ return;
33643
+ }
33640
33644
  if (wasDragged) {
33641
33645
  setWasDragged(false);
33642
33646
  var target = dragContainer.current;
@@ -33666,13 +33670,19 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33666
33670
  }
33667
33671
  },
33668
33672
  onStart: function onStart() {
33669
- if (onDragStart) onDragStart(item, slotIndex, containerType);
33673
+ if (!item) {
33674
+ return;
33675
+ }
33676
+ if (onDragStart) {
33677
+ onDragStart(item, slotIndex, containerType);
33678
+ }
33670
33679
  },
33671
33680
  onDrag: function onDrag() {
33672
33681
  setWasDragged(true);
33673
33682
  setIsFocused(true);
33674
33683
  },
33675
- position: dragPosition
33684
+ position: dragPosition,
33685
+ cancel: ".empty-slot"
33676
33686
  }, React__default.createElement(ItemContainer, {
33677
33687
  ref: dragContainer,
33678
33688
  isFocused: isFocused,
@@ -33770,6 +33780,9 @@ var EquipmentSet = function EquipmentSet(_ref) {
33770
33780
  if (_onSelected) _onSelected(optionId);
33771
33781
  },
33772
33782
  onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
33783
+ if (!item) {
33784
+ return;
33785
+ }
33773
33786
  if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
33774
33787
  },
33775
33788
  onDragEnd: function onDragEnd(quantity) {
@@ -34493,6 +34506,10 @@ var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
34493
34506
  max: quantity,
34494
34507
  value: value,
34495
34508
  onChange: function onChange(e) {
34509
+ if (Number(e.target.value) >= quantity) {
34510
+ setValue(quantity);
34511
+ return;
34512
+ }
34496
34513
  setValue(e.target.value);
34497
34514
  },
34498
34515
  onBlur: function onBlur(e) {