@rpg-engine/long-bow 0.8.154 → 0.8.156

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.
@@ -45701,6 +45701,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
45701
45701
  scale = _ref.scale,
45702
45702
  onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
45703
45703
  onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
45704
+ onDCCoinClick = _ref.onDCCoinClick,
45704
45705
  disabled = _ref.disabled;
45705
45706
  var renderGems = function renderGems(item) {
45706
45707
  return item.attachedGems && onRenderGems(item);
@@ -45736,8 +45737,11 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
45736
45737
  atlasJSON: atlasJSON,
45737
45738
  spriteKey: "others/gold-coin-qty-5.png",
45738
45739
  imgScale: 1
45739
- }))), React.createElement(GoldPrice$1, null, itemPrice)), dcEquivalentPrice !== undefined && React.createElement(DCPriceRow, null, React.createElement(DCCoinWrapper, null, React.createElement(SimpleTooltip, {
45740
- content: "Definya Coin",
45740
+ }))), React.createElement(GoldPrice$1, null, itemPrice)), dcEquivalentPrice !== undefined && React.createElement(DCPriceRow, {
45741
+ "$clickable": !!onDCCoinClick,
45742
+ onPointerDown: onDCCoinClick
45743
+ }, React.createElement(DCCoinWrapper, null, React.createElement(SimpleTooltip, {
45744
+ content: onDCCoinClick ? 'Buy Definya Coin' : 'Definya Coin',
45741
45745
  direction: "top"
45742
45746
  }, React.createElement(SpriteFromAtlas, {
45743
45747
  atlasIMG: atlasIMG,
@@ -45772,7 +45776,8 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
45772
45776
  dcToGoldSwapRate = _ref2$dcToGoldSwapRat === void 0 ? 0 : _ref2$dcToGoldSwapRat,
45773
45777
  getDCEquivalentPrice = _ref2.getDCEquivalentPrice,
45774
45778
  characterId = _ref2.characterId,
45775
- onBuy = _ref2.onBuy;
45779
+ onBuy = _ref2.onBuy,
45780
+ onDCCoinClick = _ref2.onDCCoinClick;
45776
45781
  var _useState = useState(false),
45777
45782
  expanded = _useState[0],
45778
45783
  setExpanded = _useState[1];
@@ -45793,6 +45798,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
45793
45798
  onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
45794
45799
  return onBuy(bestListing._id);
45795
45800
  },
45801
+ onDCCoinClick: onDCCoinClick,
45796
45802
  disabled: bestListing.owner === characterId
45797
45803
  }), hasMultiple && React.createElement(GroupMeta, null, React.createElement(OfferBadge, null, totalOffers, " offers"), React.createElement(Chevron, {
45798
45804
  expanded: expanded
@@ -45808,6 +45814,7 @@ var GroupedMarketplaceRow = function GroupedMarketplaceRow(_ref2) {
45808
45814
  onMarketPlaceItemBuy: function onMarketPlaceItemBuy() {
45809
45815
  return onBuy(listing._id);
45810
45816
  },
45817
+ onDCCoinClick: onDCCoinClick,
45811
45818
  disabled: listing.owner === characterId
45812
45819
  });
45813
45820
  })));
@@ -45881,7 +45888,13 @@ var GoldPrice$1 = /*#__PURE__*/styled.span.withConfig({
45881
45888
  var DCPriceRow = /*#__PURE__*/styled.div.withConfig({
45882
45889
  displayName: "MarketplaceRows__DCPriceRow",
45883
45890
  componentId: "sc-wmpr1o-15"
45884
- })(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;"]);
45891
+ })(["display:flex;align-items:center;gap:0.3rem;margin-left:0.5rem;cursor:", ";border-radius:4px;transition:opacity 0.15s;&:hover{opacity:", ";}"], function (_ref5) {
45892
+ var $clickable = _ref5.$clickable;
45893
+ return $clickable ? 'pointer' : 'default';
45894
+ }, function (_ref6) {
45895
+ var $clickable = _ref6.$clickable;
45896
+ return $clickable ? '0.75' : '1';
45897
+ });
45885
45898
  var DCCoinWrapper = /*#__PURE__*/styled.span.withConfig({
45886
45899
  displayName: "MarketplaceRows__DCCoinWrapper",
45887
45900
  componentId: "sc-wmpr1o-16"
@@ -45905,14 +45918,14 @@ var GemContainer = /*#__PURE__*/styled.p.withConfig({
45905
45918
  var RarityContainer$1 = /*#__PURE__*/styled.div.withConfig({
45906
45919
  displayName: "MarketplaceRows__RarityContainer",
45907
45920
  componentId: "sc-wmpr1o-21"
45908
- })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref5) {
45909
- var item = _ref5.item;
45921
+ })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref7) {
45922
+ var item = _ref7.item;
45910
45923
  return rarityColor(item);
45911
- }, function (_ref6) {
45912
- var item = _ref6.item;
45924
+ }, function (_ref8) {
45925
+ var item = _ref8.item;
45913
45926
  return "0 0 5px 8px " + rarityColor(item);
45914
- }, function (_ref7) {
45915
- var item = _ref7.item;
45927
+ }, function (_ref9) {
45928
+ var item = _ref9.item;
45916
45929
  return "0 0 8px 6px " + rarityColor(item);
45917
45930
  });
45918
45931
 
@@ -45980,6 +45993,7 @@ var BuyPanel = function BuyPanel(_ref) {
45980
45993
  equipmentSet = _ref.equipmentSet,
45981
45994
  onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
45982
45995
  onFulfillBuyOrder = _ref.onFulfillBuyOrder,
45996
+ onDCCoinClick = _ref.onDCCoinClick,
45983
45997
  characterId = _ref.characterId,
45984
45998
  enableHotkeys = _ref.enableHotkeys,
45985
45999
  disableHotkeys = _ref.disableHotkeys,
@@ -45997,14 +46011,16 @@ var BuyPanel = function BuyPanel(_ref) {
45997
46011
  openBuyOrdersTotal = _ref$openBuyOrdersTot === void 0 ? 0 : _ref$openBuyOrdersTot,
45998
46012
  _ref$openBuyOrdersPag = _ref.openBuyOrdersPage,
45999
46013
  openBuyOrdersPage = _ref$openBuyOrdersPag === void 0 ? 1 : _ref$openBuyOrdersPag,
46000
- onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange;
46014
+ onOpenBuyOrdersPageChange = _ref.onOpenBuyOrdersPageChange,
46015
+ _ref$isLoading = _ref.isLoading,
46016
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
46001
46017
  var _useState = useState(''),
46002
46018
  name = _useState[0],
46003
46019
  setName = _useState[1];
46004
46020
  var _useState2 = useState(false),
46005
46021
  showFilters = _useState2[0],
46006
46022
  setShowFilters = _useState2[1];
46007
- var _useState3 = useState('all'),
46023
+ var _useState3 = useState('sell'),
46008
46024
  browseMode = _useState3[0],
46009
46025
  setBrowseMode = _useState3[1];
46010
46026
  var _useState4 = useState(''),
@@ -46078,8 +46094,8 @@ var BuyPanel = function BuyPanel(_ref) {
46078
46094
  return true;
46079
46095
  });
46080
46096
  }, [name, openBuyOrders, price, selectedRarity]);
46081
- var showSellSection = browseMode === 'all' || browseMode === 'sell';
46082
- var showBuySection = browseMode === 'all' || browseMode === 'buy';
46097
+ var showSellSection = browseMode === 'sell';
46098
+ var showBuySection = browseMode === 'buy';
46083
46099
  var hasVisibleContent = showSellSection && groupedItems.length > 0 || showBuySection && visibleBuyOrders.length > 0;
46084
46100
  return React.createElement(React.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React.createElement(MarketplaceBuyModal, {
46085
46101
  goldPrice: buyingItem.price,
@@ -46115,9 +46131,6 @@ var BuyPanel = function BuyPanel(_ref) {
46115
46131
  return setBrowseMode(value);
46116
46132
  },
46117
46133
  options: [{
46118
- id: 'all',
46119
- label: 'All'
46120
- }, {
46121
46134
  id: 'sell',
46122
46135
  label: 'Sell Offers'
46123
46136
  }, {
@@ -46236,7 +46249,7 @@ var BuyPanel = function BuyPanel(_ref) {
46236
46249
  }))))), React.createElement(ItemComponentScrollWrapper$1, {
46237
46250
  id: "MarketContainer",
46238
46251
  ref: itemsContainer
46239
- }, !hasVisibleContent ? React.createElement(LoadingState, null, React.createElement(Spinner$2, null), React.createElement(LoadingText$1, null, "Loading marketplace...")) : React.createElement(React.Fragment, null, showSellSection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Sell Offers"), React.createElement(SectionMeta, null, groupedItems.length, " groups")), groupedItems.length === 0 ? React.createElement(SectionEmpty, null, "No sell offers found.") : groupedItems.map(function (_ref2) {
46252
+ }, isLoading ? React.createElement(LoadingState, null, React.createElement(Spinner$2, null), React.createElement(LoadingText$1, null, "Loading marketplace...")) : !hasVisibleContent ? React.createElement(LoadingState, null, React.createElement(LoadingText$1, null, "No items listed.")) : React.createElement(React.Fragment, null, showSellSection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Sell Offers"), React.createElement(SectionMeta, null, groupedItems.length, " groups")), groupedItems.length === 0 ? React.createElement(SectionEmpty, null, "No sell offers found.") : groupedItems.map(function (_ref2) {
46240
46253
  var bestListing = _ref2.bestListing,
46241
46254
  otherListings = _ref2.otherListings;
46242
46255
  return React.createElement(GroupedMarketplaceRow, {
@@ -46249,14 +46262,10 @@ var BuyPanel = function BuyPanel(_ref) {
46249
46262
  dcToGoldSwapRate: dcToGoldSwapRate,
46250
46263
  getDCEquivalentPrice: getDCEquivalentPrice,
46251
46264
  characterId: characterId,
46252
- onBuy: setBuyingItemId
46265
+ onBuy: setBuyingItemId,
46266
+ onDCCoinClick: onDCCoinClick
46253
46267
  });
46254
- }), totalItems > itemsPerPage && React.createElement(SectionPager, null, React.createElement(Pager, {
46255
- totalItems: totalItems,
46256
- currentPage: currentPage,
46257
- itemsPerPage: itemsPerPage,
46258
- onPageChange: onPageChange
46259
- }))), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, visibleBuyOrders.length, " visible")), visibleBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : visibleBuyOrders.map(function (order) {
46268
+ })), showBuySection && React.createElement(MarketSection, null, React.createElement(SectionHeader, null, React.createElement(SectionTitle$2, null, "Buy Requests"), React.createElement(SectionMeta, null, visibleBuyOrders.length, " visible")), visibleBuyOrders.length === 0 ? React.createElement(SectionEmpty, null, "No public buy requests found.") : visibleBuyOrders.map(function (order) {
46260
46269
  return React.createElement(BuyOrderRow, {
46261
46270
  key: order._id,
46262
46271
  buyOrder: order,
@@ -46265,12 +46274,17 @@ var BuyPanel = function BuyPanel(_ref) {
46265
46274
  onFulfill: setFulfillingBuyOrderId,
46266
46275
  showRequestTag: true
46267
46276
  });
46268
- }), openBuyOrdersTotal > BUY_REQUESTS_PER_PAGE && React.createElement(SectionPager, null, React.createElement(Pager, {
46277
+ })))), React.createElement(PagerFooter, null, showSellSection && totalItems > itemsPerPage && React.createElement(Pager, {
46278
+ totalItems: totalItems,
46279
+ currentPage: currentPage,
46280
+ itemsPerPage: itemsPerPage,
46281
+ onPageChange: onPageChange
46282
+ }), showBuySection && openBuyOrdersTotal > BUY_REQUESTS_PER_PAGE && React.createElement(Pager, {
46269
46283
  totalItems: openBuyOrdersTotal,
46270
46284
  currentPage: openBuyOrdersPage,
46271
46285
  itemsPerPage: BUY_REQUESTS_PER_PAGE,
46272
46286
  onPageChange: onOpenBuyOrdersPageChange != null ? onOpenBuyOrdersPageChange : function () {}
46273
- }))))));
46287
+ })));
46274
46288
  };
46275
46289
  var ToolbarRow = /*#__PURE__*/styled.div.withConfig({
46276
46290
  displayName: "BuyPanel__ToolbarRow",
@@ -46336,10 +46350,10 @@ var SectionEmpty = /*#__PURE__*/styled.div.withConfig({
46336
46350
  displayName: "BuyPanel__SectionEmpty",
46337
46351
  componentId: "sc-1si8t7i-12"
46338
46352
  })(["min-height:56px;display:flex;align-items:center;justify-content:center;color:#71717a;font-size:0.48rem;text-transform:uppercase;letter-spacing:1px;background:rgba(255,255,255,0.03);border:1px dashed rgba(255,255,255,0.08);border-radius:6px;"]);
46339
- var SectionPager = /*#__PURE__*/styled.div.withConfig({
46340
- displayName: "BuyPanel__SectionPager",
46353
+ var PagerFooter = /*#__PURE__*/styled.div.withConfig({
46354
+ displayName: "BuyPanel__PagerFooter",
46341
46355
  componentId: "sc-1si8t7i-13"
46342
- })(["display:flex;justify-content:center;margin-top:10px;"]);
46356
+ })(["display:flex;justify-content:center;align-items:center;padding:8px 0 4px;min-height:36px;width:95%;margin:0 auto;"]);
46343
46357
  var StyledDropdown$4 = /*#__PURE__*/styled(Dropdown).withConfig({
46344
46358
  displayName: "BuyPanel__StyledDropdown",
46345
46359
  componentId: "sc-1si8t7i-14"