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