@rpg-engine/long-bow 0.3.37 → 0.3.39
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 +46 -15
- 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 +46 -15
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Item/Inventory/ItemSlot.tsx +8 -3
- package/src/components/TradingMenu/TradingItemRow.tsx +35 -5
- package/src/components/TradingMenu/TradingMenu.tsx +1 -1
|
@@ -33856,9 +33856,11 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
33856
33856
|
onDragStart(item, slotIndex, containerType);
|
|
33857
33857
|
}
|
|
33858
33858
|
},
|
|
33859
|
-
onDrag: function onDrag() {
|
|
33860
|
-
|
|
33861
|
-
|
|
33859
|
+
onDrag: function onDrag(_e, data) {
|
|
33860
|
+
if (Math.abs(data.x - dragPosition.x) > 5 || Math.abs(data.y - dragPosition.y) > 5) {
|
|
33861
|
+
setWasDragged(true);
|
|
33862
|
+
setIsFocused(true);
|
|
33863
|
+
}
|
|
33862
33864
|
},
|
|
33863
33865
|
position: dragPosition,
|
|
33864
33866
|
cancel: ".empty-slot"
|
|
@@ -35757,6 +35759,19 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35757
35759
|
onQuantityChange(traderItem, newQuantity);
|
|
35758
35760
|
}
|
|
35759
35761
|
};
|
|
35762
|
+
var onLeftOutClick = function onLeftOutClick() {
|
|
35763
|
+
if (selectedQty >= 10) {
|
|
35764
|
+
var newQuantity = selectedQty - 10;
|
|
35765
|
+
onQuantityChange(traderItem, newQuantity);
|
|
35766
|
+
}
|
|
35767
|
+
};
|
|
35768
|
+
var onRightOutClick = function onRightOutClick() {
|
|
35769
|
+
var _traderItem$qty2;
|
|
35770
|
+
if (selectedQty < ((_traderItem$qty2 = traderItem.qty) != null ? _traderItem$qty2 : 999)) {
|
|
35771
|
+
var newQuantity = selectedQty + 10;
|
|
35772
|
+
onQuantityChange(traderItem, newQuantity);
|
|
35773
|
+
}
|
|
35774
|
+
};
|
|
35760
35775
|
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
35761
35776
|
atlasIMG: atlasIMG,
|
|
35762
35777
|
atlasJSON: atlasJSON,
|
|
@@ -35770,54 +35785,70 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
35770
35785
|
maxLines: 1,
|
|
35771
35786
|
maxWidth: "250px"
|
|
35772
35787
|
}, capitalize(traderItem.name))), React__default.createElement("p", null, "$", traderItem.price))), React__default.createElement(QuantityContainer, null, React__default.createElement(SelectArrow, {
|
|
35788
|
+
size: 32,
|
|
35789
|
+
className: "arrow-selector",
|
|
35790
|
+
direction: "left",
|
|
35791
|
+
onClick: onLeftOutClick,
|
|
35792
|
+
onTouchStart: onLeftOutClick
|
|
35793
|
+
}), React__default.createElement(StyledArrow, {
|
|
35773
35794
|
size: 32,
|
|
35774
35795
|
className: "arrow-selector",
|
|
35775
35796
|
direction: "left",
|
|
35776
35797
|
onClick: onLeftClick,
|
|
35777
35798
|
onTouchStart: onLeftClick
|
|
35778
|
-
}), React__default.createElement(QuantityDisplay, null, React__default.createElement(TextOverlay$2, null, React__default.createElement(Item$1, null, selectedQty))), React__default.createElement(
|
|
35799
|
+
}), React__default.createElement(QuantityDisplay, null, React__default.createElement(TextOverlay$2, null, React__default.createElement(Item$1, null, selectedQty))), React__default.createElement(StyledArrow, {
|
|
35779
35800
|
size: 32,
|
|
35780
35801
|
className: "arrow-selector",
|
|
35781
35802
|
direction: "right",
|
|
35782
35803
|
onClick: onRightClick,
|
|
35783
35804
|
onTouchStart: onRightClick
|
|
35805
|
+
}), React__default.createElement(SelectArrow, {
|
|
35806
|
+
size: 32,
|
|
35807
|
+
className: "arrow-selector",
|
|
35808
|
+
direction: "right",
|
|
35809
|
+
onClick: onRightOutClick,
|
|
35810
|
+
onTouchStart: onRightOutClick
|
|
35784
35811
|
})));
|
|
35785
35812
|
};
|
|
35813
|
+
var StyledArrow = /*#__PURE__*/styled(SelectArrow).withConfig({
|
|
35814
|
+
displayName: "TradingItemRow__StyledArrow",
|
|
35815
|
+
componentId: "sc-mja0b5-0"
|
|
35816
|
+
})(["margin:40px;"]);
|
|
35786
35817
|
var ItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
35787
35818
|
displayName: "TradingItemRow__ItemWrapper",
|
|
35788
|
-
componentId: "sc-mja0b5-
|
|
35819
|
+
componentId: "sc-mja0b5-1"
|
|
35789
35820
|
})(["width:100%;margin:auto;display:flex;justify-content:space-between;margin-bottom:1rem;&:hover{background-color:", ";}padding:0.5rem;"], uiColors.darkGray);
|
|
35790
35821
|
var ItemNameContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35791
35822
|
displayName: "TradingItemRow__ItemNameContainer",
|
|
35792
|
-
componentId: "sc-mja0b5-
|
|
35823
|
+
componentId: "sc-mja0b5-2"
|
|
35793
35824
|
})(["flex:60%;"]);
|
|
35794
35825
|
var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35795
35826
|
displayName: "TradingItemRow__ItemIconContainer",
|
|
35796
|
-
componentId: "sc-mja0b5-
|
|
35827
|
+
componentId: "sc-mja0b5-3"
|
|
35797
35828
|
})(["display:flex;justify-content:flex-start;align-items:center;flex:0 0 58px;"]);
|
|
35798
35829
|
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35799
35830
|
displayName: "TradingItemRow__SpriteContainer",
|
|
35800
|
-
componentId: "sc-mja0b5-
|
|
35831
|
+
componentId: "sc-mja0b5-4"
|
|
35801
35832
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
35802
35833
|
var NameValue = /*#__PURE__*/styled.div.withConfig({
|
|
35803
35834
|
displayName: "TradingItemRow__NameValue",
|
|
35804
|
-
componentId: "sc-mja0b5-
|
|
35835
|
+
componentId: "sc-mja0b5-5"
|
|
35805
35836
|
})(["p{font-size:0.75rem;margin:0;}"]);
|
|
35806
35837
|
var Item$1 = /*#__PURE__*/styled.span.withConfig({
|
|
35807
35838
|
displayName: "TradingItemRow__Item",
|
|
35808
|
-
componentId: "sc-mja0b5-
|
|
35839
|
+
componentId: "sc-mja0b5-6"
|
|
35809
35840
|
})(["color:white;text-align:center;z-index:1;width:100%;"]);
|
|
35810
35841
|
var TextOverlay$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35811
35842
|
displayName: "TradingItemRow__TextOverlay",
|
|
35812
|
-
componentId: "sc-mja0b5-
|
|
35843
|
+
componentId: "sc-mja0b5-7"
|
|
35813
35844
|
})(["width:100%;position:relative;"]);
|
|
35814
35845
|
var QuantityContainer = /*#__PURE__*/styled.div.withConfig({
|
|
35815
35846
|
displayName: "TradingItemRow__QuantityContainer",
|
|
35816
|
-
componentId: "sc-mja0b5-
|
|
35817
|
-
})(["position:relative;display:flex;min-width:100px;width:40%;justify-content:center;align-items:center;flex:
|
|
35847
|
+
componentId: "sc-mja0b5-8"
|
|
35848
|
+
})(["position:relative;display:flex;min-width:100px;width:40%;justify-content:center;align-items:center;flex:40%;"]);
|
|
35818
35849
|
var QuantityDisplay = /*#__PURE__*/styled.div.withConfig({
|
|
35819
35850
|
displayName: "TradingItemRow__QuantityDisplay",
|
|
35820
|
-
componentId: "sc-mja0b5-
|
|
35851
|
+
componentId: "sc-mja0b5-9"
|
|
35821
35852
|
})(["font-size:", ";"], uiFonts.size.small);
|
|
35822
35853
|
|
|
35823
35854
|
var TradingMenu = function TradingMenu(_ref) {
|
|
@@ -35879,7 +35910,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35879
35910
|
onCloseButton: function onCloseButton() {
|
|
35880
35911
|
if (onClose) onClose();
|
|
35881
35912
|
},
|
|
35882
|
-
width: "
|
|
35913
|
+
width: "600px",
|
|
35883
35914
|
cancelDrag: ".equipment-container-body .arrow-selector"
|
|
35884
35915
|
}, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
35885
35916
|
style: {
|