@rpg-engine/long-bow 0.4.8 → 0.4.9

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.
@@ -15216,13 +15216,15 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
15216
15216
  onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
15217
15217
  onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
15218
15218
  disabled = _ref.disabled;
15219
- return React.createElement(MarketplaceWrapper, null, React.createElement(ItemInfoWrapper, {
15219
+ return React.createElement(MarketplaceWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(ItemInfoWrapper, {
15220
15220
  item: item,
15221
15221
  atlasIMG: atlasIMG,
15222
15222
  atlasJSON: atlasJSON,
15223
15223
  equipmentSet: equipmentSet,
15224
15224
  scale: scale
15225
- }, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
15225
+ }, React.createElement(RarityContainer, {
15226
+ item: item
15227
+ }, React.createElement(SpriteFromAtlas, {
15226
15228
  atlasIMG: atlasIMG,
15227
15229
  atlasJSON: atlasJSON,
15228
15230
  spriteKey: getItemTextureKeyPath({
@@ -15232,11 +15234,11 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
15232
15234
  isStackable: item.isStackable
15233
15235
  }, atlasJSON),
15234
15236
  imgScale: 2
15235
- }), React.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10)), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15237
+ })), React.createElement(QuantityContainer, null, item.stackQty && item.stackQty > 1 && "x" + Math.round(item.stackQty * 10) / 10))), React.createElement(PriceValue, null, React.createElement("p", null, React.createElement(Ellipsis, {
15236
15238
  maxLines: 1,
15237
15239
  maxWidth: "200px",
15238
15240
  fontSize: "10px"
15239
- }, item.name))))), React.createElement(Flex$1, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(SpriteFromAtlas, {
15241
+ }, item.name)))), React.createElement(Flex$1, null, React.createElement(ItemIconContainer, null, React.createElement(GoldContainer, null, React.createElement(SpriteFromAtlas, {
15240
15242
  atlasIMG: atlasIMG,
15241
15243
  atlasJSON: atlasJSON,
15242
15244
  spriteKey: "others/gold-coin-qty-5.png",
@@ -15271,18 +15273,35 @@ var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
15271
15273
  displayName: "MarketplaceRows__ItemIconContainer",
15272
15274
  componentId: "sc-wmpr1o-3"
15273
15275
  })(["display:flex;justify-content:flex-start;align-items:center;"]);
15274
- var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
15275
- displayName: "MarketplaceRows__SpriteContainer",
15276
+ var GoldContainer = /*#__PURE__*/styled.div.withConfig({
15277
+ displayName: "MarketplaceRows__GoldContainer",
15276
15278
  componentId: "sc-wmpr1o-4"
15277
15279
  })(["position:relative;top:-0.5rem;left:0.5rem;"]);
15280
+ var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
15281
+ displayName: "MarketplaceRows__SpriteContainer",
15282
+ componentId: "sc-wmpr1o-5"
15283
+ })(["position:relative;left:0.5rem;"]);
15278
15284
  var PriceValue = /*#__PURE__*/styled.div.withConfig({
15279
15285
  displayName: "MarketplaceRows__PriceValue",
15280
- componentId: "sc-wmpr1o-5"
15286
+ componentId: "sc-wmpr1o-6"
15281
15287
  })(["margin-left:40px;"]);
15282
15288
  var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
15283
15289
  displayName: "MarketplaceRows__ButtonContainer",
15284
- componentId: "sc-wmpr1o-6"
15290
+ componentId: "sc-wmpr1o-7"
15285
15291
  })(["margin:auto;"]);
15292
+ var RarityContainer = /*#__PURE__*/styled.div.withConfig({
15293
+ displayName: "MarketplaceRows__RarityContainer",
15294
+ componentId: "sc-wmpr1o-8"
15295
+ })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref2) {
15296
+ var item = _ref2.item;
15297
+ return rarityColor(item);
15298
+ }, function (_ref3) {
15299
+ var item = _ref3.item;
15300
+ return "0 0 5px 8px " + rarityColor(item);
15301
+ }, function (_ref4) {
15302
+ var item = _ref4.item;
15303
+ return "0 0 8px 6px " + rarityColor(item);
15304
+ });
15286
15305
 
15287
15306
  var OrderByType;
15288
15307
  (function (OrderByType) {
@@ -15342,7 +15361,8 @@ var BuyPanel = function BuyPanel(_ref) {
15342
15361
  onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
15343
15362
  characterId = _ref.characterId,
15344
15363
  enableHotkeys = _ref.enableHotkeys,
15345
- disableHotkeys = _ref.disableHotkeys;
15364
+ disableHotkeys = _ref.disableHotkeys,
15365
+ currentPage = _ref.currentPage;
15346
15366
  var _useState = useState(''),
15347
15367
  name = _useState[0],
15348
15368
  setName = _useState[1];
@@ -15358,6 +15378,11 @@ var BuyPanel = function BuyPanel(_ref) {
15358
15378
  var _useState5 = useState(null),
15359
15379
  buyingItemId = _useState5[0],
15360
15380
  setBuyingItemId = _useState5[1];
15381
+ var itemsContainer = useRef(null);
15382
+ useEffect(function () {
15383
+ var _itemsContainer$curre;
15384
+ (_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
15385
+ }, [currentPage]);
15361
15386
  return React.createElement(React.Fragment, null, buyingItemId && React.createElement(ConfirmModal, {
15362
15387
  onClose: setBuyingItemId.bind(null, null),
15363
15388
  onConfirm: function onConfirm() {
@@ -15450,7 +15475,8 @@ var BuyPanel = function BuyPanel(_ref) {
15450
15475
  onChange: onChangeOrder,
15451
15476
  width: "100%"
15452
15477
  }))), React.createElement(ItemComponentScrollWrapper, {
15453
- id: "MarketContainer"
15478
+ id: "MarketContainer",
15479
+ ref: itemsContainer
15454
15480
  }, items == null ? void 0 : items.map(function (_ref2, index) {
15455
15481
  var item = _ref2.item,
15456
15482
  price = _ref2.price,
@@ -15506,7 +15532,8 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
15506
15532
  onAddItemToMarketplace = _ref.onAddItemToMarketplace,
15507
15533
  enableHotkeys = _ref.enableHotkeys,
15508
15534
  disableHotkeys = _ref.disableHotkeys,
15509
- onMoneyWithdraw = _ref.onMoneyWithdraw;
15535
+ onMoneyWithdraw = _ref.onMoneyWithdraw,
15536
+ currentPage = _ref.currentPage;
15510
15537
  var _useState = useState(''),
15511
15538
  name = _useState[0],
15512
15539
  setName = _useState[1];
@@ -15519,6 +15546,11 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
15519
15546
  var _useState4 = useState(null),
15520
15547
  removingItemId = _useState4[0],
15521
15548
  setRemovingItemId = _useState4[1];
15549
+ var itemsContainer = useRef(null);
15550
+ useEffect(function () {
15551
+ var _itemsContainer$curre;
15552
+ (_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
15553
+ }, [currentPage]);
15522
15554
  return React.createElement(React.Fragment, null, isCreatingOffer && React.createElement(ConfirmModal, {
15523
15555
  onClose: setIsCreatingOffer.bind(null, false),
15524
15556
  onConfirm: function onConfirm() {
@@ -15585,7 +15617,8 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
15585
15617
  return availableGold > 0 && onMoneyWithdraw();
15586
15618
  }
15587
15619
  }, "Withdraw")))), React.createElement(ItemComponentScrollWrapper$1, {
15588
- id: "MarketContainer"
15620
+ id: "MarketContainer",
15621
+ ref: itemsContainer
15589
15622
  }, items == null ? void 0 : items.map(function (_ref2, index) {
15590
15623
  var item = _ref2.item,
15591
15624
  price = _ref2.price,