@rpg-engine/long-bow 0.8.138 → 0.8.140

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.
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useMemo, me
2
2
  import styled, { css, keyframes, createGlobalStyle } from 'styled-components';
3
3
  import { BeatLoader } from 'react-spinners';
4
4
  import { v4 } from 'uuid';
5
- import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
5
+ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, formatDCAmount, goldToDC, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
6
6
  import dayjs from 'dayjs';
7
7
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
8
8
  import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet } from 'react-icons/fa';
@@ -30388,11 +30388,18 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
30388
30388
  var color = (_TRANSACTION_TYPE_COL = TRANSACTION_TYPE_COLORS[tx.type]) != null ? _TRANSACTION_TYPE_COL : '#f59e0b';
30389
30389
  var subtitle = (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? tx.relatedCharacterName : '';
30390
30390
  return React.createElement(TransactionRow, {
30391
- key: tx._id
30391
+ key: tx._id,
30392
+ style: {
30393
+ borderLeft: "3px solid " + color
30394
+ }
30392
30395
  }, React.createElement(TxLeft, null, React.createElement(TxType, {
30393
- "$color": color
30396
+ style: {
30397
+ color: color
30398
+ }
30394
30399
  }, label), subtitle ? React.createElement(TxNote, null, subtitle) : null), React.createElement(TxRight, null, React.createElement(TxAmount, {
30395
- "$credit": isCredit
30400
+ style: {
30401
+ color: isCredit ? '#4CAF50' : '#D04648'
30402
+ }
30396
30403
  }, isCredit ? '+' : '', tx.amount, " DC"), React.createElement(TxDate, null, formatDate(tx.createdAt))));
30397
30404
  })), totalPages > 1 && React.createElement(Pagination, {
30398
30405
  currentPage: currentPage,
@@ -30435,17 +30442,11 @@ var TxRight = /*#__PURE__*/styled.div.withConfig({
30435
30442
  var TxType = /*#__PURE__*/styled.span.withConfig({
30436
30443
  displayName: "DCHistoryPanel__TxType",
30437
30444
  componentId: "sc-debjdj-8"
30438
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;"], function (_ref2) {
30439
- var $color = _ref2.$color;
30440
- return $color;
30441
- });
30445
+ })(["font-size:7px;font-family:'Press Start 2P',cursive;"]);
30442
30446
  var TxAmount = /*#__PURE__*/styled.span.withConfig({
30443
30447
  displayName: "DCHistoryPanel__TxAmount",
30444
30448
  componentId: "sc-debjdj-9"
30445
- })(["font-size:8px;font-family:'Press Start 2P',cursive;color:", ";white-space:nowrap;"], function (_ref3) {
30446
- var $credit = _ref3.$credit;
30447
- return $credit ? uiColors.green : uiColors.red;
30448
- });
30449
+ })(["font-size:8px;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30449
30450
  var TxNote = /*#__PURE__*/styled.span.withConfig({
30450
30451
  displayName: "DCHistoryPanel__TxNote",
30451
30452
  componentId: "sc-debjdj-10"
@@ -30833,7 +30834,7 @@ var DCWalletModal = function DCWalletModal(_ref) {
30833
30834
  content: React.createElement(BalanceContent, null, React.createElement(BalanceLabel, null, "Your DC Balance"), React.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), onBuyDC && React.createElement(BuyButton, {
30834
30835
  onPointerDown: onBuyDC,
30835
30836
  title: "Buy Definya Coins"
30836
- }, React.createElement(FaShoppingCart, null), React.createElement(BuyButtonLabel, null, "Buy DC")))
30837
+ }, React.createElement(FaShoppingCart, null), React.createElement(BuyButtonLabel, null, "Buy More DC")))
30837
30838
  }, {
30838
30839
  id: 'transfer',
30839
30840
  title: 'Transfer',
@@ -35641,9 +35642,9 @@ var MarketplaceBuyModal = function MarketplaceBuyModal(_ref) {
35641
35642
  "$selected": selected === 'dc'
35642
35643
  }), React.createElement(OptionText, null, React.createElement(OptionLabel, {
35643
35644
  "$disabled": !hasSufficientDC
35644
- }, "Definya Coin"), React.createElement(OptionSub, null, dcEquivalentPrice.toLocaleString(), " DC", ' ', React.createElement(BalanceHint, {
35645
+ }, "Definya Coin"), React.createElement(OptionSub, null, formatDCAmount(dcEquivalentPrice), " DC", ' ', React.createElement(BalanceHint, {
35645
35646
  "$insufficient": !hasSufficientDC
35646
- }, "(", dcBalance.toLocaleString(), " available)"))))), React.createElement(ConfirmRow, null, React.createElement(Button, {
35647
+ }, "(", formatDCAmount(dcBalance), " available)"))))), React.createElement(ConfirmRow, null, React.createElement(Button, {
35647
35648
  buttonType: ButtonTypes.RPGUIButton,
35648
35649
  onPointerDown: handleConfirm
35649
35650
  }, "Confirm")))));
@@ -35769,7 +35770,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
35769
35770
  maxLines: 1,
35770
35771
  maxWidth: "200px",
35771
35772
  fontSize: "10px"
35772
- }, item.name)))), React.createElement(Flex$1, null, React.createElement(PriceContainer, null, React.createElement(ItemIconContainer, null, React.createElement(GoldContainer, null, React.createElement(SpriteFromAtlas, {
35773
+ }, item.name)))), React.createElement(Flex$1, null, React.createElement(ItemIconContainer, null, React.createElement(GoldContainer, null, React.createElement(SpriteFromAtlas, {
35773
35774
  atlasIMG: atlasIMG,
35774
35775
  atlasJSON: atlasJSON,
35775
35776
  spriteKey: "others/gold-coin-qty-5.png",
@@ -35778,11 +35779,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
35778
35779
  maxLines: 1,
35779
35780
  maxWidth: "120px",
35780
35781
  fontSize: "10px"
35781
- }, "$", itemPrice)))), dcEquivalentPrice !== undefined && React.createElement(DCPriceLabel, null, React.createElement(Ellipsis, {
35782
- maxLines: 1,
35783
- maxWidth: "80px",
35784
- fontSize: "9px"
35785
- }, dcEquivalentPrice, " DC"))), React.createElement(ButtonContainer$3, null, React.createElement(Button, {
35782
+ }, "$", itemPrice))), dcEquivalentPrice !== undefined && React.createElement(DCPriceLabel, null, formatDCAmount(dcEquivalentPrice), " DC")), React.createElement(ButtonContainer$3, null, React.createElement(Button, {
35786
35783
  buttonType: ButtonTypes.RPGUIButton,
35787
35784
  disabled: disabled,
35788
35785
  onPointerDown: function onPointerDown() {
@@ -35820,25 +35817,21 @@ var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
35820
35817
  displayName: "MarketplaceRows__SpriteContainer",
35821
35818
  componentId: "sc-wmpr1o-6"
35822
35819
  })(["position:relative;left:0.5rem;"]);
35823
- var PriceContainer = /*#__PURE__*/styled.div.withConfig({
35824
- displayName: "MarketplaceRows__PriceContainer",
35825
- componentId: "sc-wmpr1o-7"
35826
- })(["display:flex;flex-direction:column;align-items:flex-start;gap:2px;"]);
35827
- var DCPriceLabel = /*#__PURE__*/styled.p.withConfig({
35820
+ var DCPriceLabel = /*#__PURE__*/styled.span.withConfig({
35828
35821
  displayName: "MarketplaceRows__DCPriceLabel",
35829
- componentId: "sc-wmpr1o-8"
35830
- })(["margin:0;margin-left:40px;color:#fef08a;font-size:0.7rem;"]);
35822
+ componentId: "sc-wmpr1o-7"
35823
+ })(["margin-left:8px;color:#fef08a;font-size:0.65rem;white-space:nowrap;"]);
35831
35824
  var PriceValue = /*#__PURE__*/styled.div.withConfig({
35832
35825
  displayName: "MarketplaceRows__PriceValue",
35833
- componentId: "sc-wmpr1o-9"
35826
+ componentId: "sc-wmpr1o-8"
35834
35827
  })(["margin-left:40px;"]);
35835
35828
  var ButtonContainer$3 = /*#__PURE__*/styled.div.withConfig({
35836
35829
  displayName: "MarketplaceRows__ButtonContainer",
35837
- componentId: "sc-wmpr1o-10"
35830
+ componentId: "sc-wmpr1o-9"
35838
35831
  })(["margin:auto;"]);
35839
35832
  var RarityContainer = /*#__PURE__*/styled.div.withConfig({
35840
35833
  displayName: "MarketplaceRows__RarityContainer",
35841
- componentId: "sc-wmpr1o-11"
35834
+ componentId: "sc-wmpr1o-10"
35842
35835
  })(["border-color:", ";box-shadow:", " inset,", ";width:32px;height:32px;"], function (_ref2) {
35843
35836
  var item = _ref2.item;
35844
35837
  return rarityColor(item);
@@ -35939,7 +35932,7 @@ var BuyPanel = function BuyPanel(_ref) {
35939
35932
  }) : null;
35940
35933
  var hasDCBalance = dcBalance > 0 && dcToGoldSwapRate > 0;
35941
35934
  var getDCEquivalentPrice = function getDCEquivalentPrice(goldPrice) {
35942
- return dcToGoldSwapRate > 0 ? Math.ceil(goldPrice / dcToGoldSwapRate) : 0;
35935
+ return dcToGoldSwapRate > 0 ? goldToDC(goldPrice) : 0;
35943
35936
  };
35944
35937
  return React.createElement(React.Fragment, null, buyingItemId && buyingItem && hasDCBalance && React.createElement(MarketplaceBuyModal, {
35945
35938
  goldPrice: buyingItem.price,
@@ -35960,7 +35953,7 @@ var BuyPanel = function BuyPanel(_ref) {
35960
35953
  setBuyingItemId(null);
35961
35954
  enableHotkeys == null ? void 0 : enableHotkeys();
35962
35955
  },
35963
- message: "Are you sure to buy this item?"
35956
+ message: "Are you sure you want to buy this item?"
35964
35957
  }), React.createElement(InputWrapper, null, React.createElement("p", null, "Search By Name"), React.createElement(Input, {
35965
35958
  onChange: function onChange(e) {
35966
35959
  setName(e.target.value);
@@ -59920,7 +59913,6 @@ var Store = function Store(_ref) {
59920
59913
  }
59921
59914
  }) : React.createElement(Container$N, null, React.createElement(TopBar$1, null, React.createElement(LeftButtons, null, onShowHistory && React.createElement(CTAButton, {
59922
59915
  icon: React.createElement(FaHistory, null),
59923
- label: "History",
59924
59916
  onClick: onShowHistory
59925
59917
  }), onShowWallet && React.createElement(CTAButton, {
59926
59918
  icon: React.createElement(FaWallet, null),