@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.
- package/dist/long-bow.cjs.development.js +20 -3
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +20 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Equipment/EquipmentSet.tsx +4 -0
- package/src/components/Item/Inventory/ItemQuantitySelector.tsx +6 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +72 -68
package/dist/long-bow.esm.js
CHANGED
|
@@ -33630,8 +33630,12 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33630
33630
|
});
|
|
33631
33631
|
(_document$elementFrom = document.elementFromPoint(clientX, clientY)) == null ? void 0 : _document$elementFrom.dispatchEvent(simulatedEvent);
|
|
33632
33632
|
}
|
|
33633
|
-
},
|
|
33633
|
+
}, React.createElement(Draggable, {
|
|
33634
|
+
defaultClassName: item ? 'draggable' : 'empty-slot',
|
|
33634
33635
|
onStop: function onStop() {
|
|
33636
|
+
if (!item) {
|
|
33637
|
+
return;
|
|
33638
|
+
}
|
|
33635
33639
|
if (wasDragged) {
|
|
33636
33640
|
setWasDragged(false);
|
|
33637
33641
|
var target = dragContainer.current;
|
|
@@ -33661,13 +33665,19 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33661
33665
|
}
|
|
33662
33666
|
},
|
|
33663
33667
|
onStart: function onStart() {
|
|
33664
|
-
if (
|
|
33668
|
+
if (!item) {
|
|
33669
|
+
return;
|
|
33670
|
+
}
|
|
33671
|
+
if (onDragStart) {
|
|
33672
|
+
onDragStart(item, slotIndex, containerType);
|
|
33673
|
+
}
|
|
33665
33674
|
},
|
|
33666
33675
|
onDrag: function onDrag() {
|
|
33667
33676
|
setWasDragged(true);
|
|
33668
33677
|
setIsFocused(true);
|
|
33669
33678
|
},
|
|
33670
|
-
position: dragPosition
|
|
33679
|
+
position: dragPosition,
|
|
33680
|
+
cancel: ".empty-slot"
|
|
33671
33681
|
}, React.createElement(ItemContainer, {
|
|
33672
33682
|
ref: dragContainer,
|
|
33673
33683
|
isFocused: isFocused,
|
|
@@ -33765,6 +33775,9 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
33765
33775
|
if (_onSelected) _onSelected(optionId);
|
|
33766
33776
|
},
|
|
33767
33777
|
onDragStart: function onDragStart(item, slotIndex, itemContainerType) {
|
|
33778
|
+
if (!item) {
|
|
33779
|
+
return;
|
|
33780
|
+
}
|
|
33768
33781
|
if (onItemDragStart) onItemDragStart(item, slotIndex, itemContainerType);
|
|
33769
33782
|
},
|
|
33770
33783
|
onDragEnd: function onDragEnd(quantity) {
|
|
@@ -34491,6 +34504,10 @@ var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
|
|
|
34491
34504
|
max: quantity,
|
|
34492
34505
|
value: value,
|
|
34493
34506
|
onChange: function onChange(e) {
|
|
34507
|
+
if (Number(e.target.value) >= quantity) {
|
|
34508
|
+
setValue(quantity);
|
|
34509
|
+
return;
|
|
34510
|
+
}
|
|
34494
34511
|
setValue(e.target.value);
|
|
34495
34512
|
},
|
|
34496
34513
|
onBlur: function onBlur(e) {
|