@rpg-engine/long-bow 0.8.129 → 0.8.131

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.
@@ -5,7 +5,7 @@ import { v4 } from 'uuid';
5
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';
6
6
  import dayjs from 'dayjs';
7
7
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
8
- import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaShoppingCart } from 'react-icons/fa';
8
+ import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaWallet, FaShoppingCart } from 'react-icons/fa';
9
9
  import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
10
10
  import { IoMdContract, IoMdExpand } from 'react-icons/io';
11
11
  import Draggable from 'react-draggable';
@@ -58847,69 +58847,6 @@ var DropdownContainer$2 = /*#__PURE__*/styled.div.withConfig({
58847
58847
  componentId: "sc-l6f466-3"
58848
58848
  })(["flex:0.25;min-width:140px;"]);
58849
58849
 
58850
- var ShoppingCardHorizontal = function ShoppingCardHorizontal(_ref) {
58851
- var title = _ref.title,
58852
- description = _ref.description,
58853
- imageUrl = _ref.imageUrl,
58854
- onClick = _ref.onClick,
58855
- footer = _ref.footer,
58856
- className = _ref.className;
58857
- var getImageSrc = function getImageSrc() {
58858
- if (!imageUrl) return '/placeholder-thumbnail.png';
58859
- if (typeof imageUrl === 'string') return imageUrl;
58860
- return imageUrl["default"] || imageUrl.src;
58861
- };
58862
- return React.createElement(CardContainer, {
58863
- onClick: onClick,
58864
- className: className
58865
- }, React.createElement(LeftSection, null, imageUrl && React.createElement(CardThumbnail, null, React.createElement("img", {
58866
- src: getImageSrc(),
58867
- alt: title
58868
- }))), React.createElement(RightSection, null, React.createElement(CardTitle, null, React.createElement(Ellipsis, {
58869
- maxLines: 1,
58870
- maxWidth: "100%"
58871
- }, title)), React.createElement(CardDescription, null, React.createElement(Ellipsis, {
58872
- maxLines: 3,
58873
- maxWidth: "100%"
58874
- }, description)), footer && React.createElement(CardFooter, {
58875
- onClick: function onClick(e) {
58876
- return e.stopPropagation();
58877
- }
58878
- }, footer)));
58879
- };
58880
- var CardContainer = /*#__PURE__*/styled.div.withConfig({
58881
- displayName: "CartCardHorizontal__CardContainer",
58882
- componentId: "sc-ngkh06-0"
58883
- })(["display:flex;background:rgba(0,0,0,0.3);border-radius:4px;border:1px solid ", ";cursor:", ";transition:transform 0.2s ease;&:hover{transform:", ";}max-width:380px;"], uiColors.darkGray, function (props) {
58884
- return props.onClick ? 'pointer' : 'default';
58885
- }, function (props) {
58886
- return props.onClick ? 'translateY(-2px)' : 'none';
58887
- });
58888
- var LeftSection = /*#__PURE__*/styled.div.withConfig({
58889
- displayName: "CartCardHorizontal__LeftSection",
58890
- componentId: "sc-ngkh06-1"
58891
- })(["width:120px;flex-shrink:0;"]);
58892
- var RightSection = /*#__PURE__*/styled.div.withConfig({
58893
- displayName: "CartCardHorizontal__RightSection",
58894
- componentId: "sc-ngkh06-2"
58895
- })(["flex:1;display:flex;flex-direction:column;padding:12px;min-width:0;max-width:100%;"]);
58896
- var CardThumbnail = /*#__PURE__*/styled.div.withConfig({
58897
- displayName: "CartCardHorizontal__CardThumbnail",
58898
- componentId: "sc-ngkh06-3"
58899
- })(["width:100%;height:100%;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
58900
- var CardTitle = /*#__PURE__*/styled.h3.withConfig({
58901
- displayName: "CartCardHorizontal__CardTitle",
58902
- componentId: "sc-ngkh06-4"
58903
- })(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;"], uiColors.yellow);
58904
- var CardDescription = /*#__PURE__*/styled.p.withConfig({
58905
- displayName: "CartCardHorizontal__CardDescription",
58906
- componentId: "sc-ngkh06-5"
58907
- })(["margin:0;font-size:0.55rem;color:", ";font-family:'Press Start 2P',cursive;line-height:1.4;margin-bottom:8px;"], uiColors.lightGray);
58908
- var CardFooter = /*#__PURE__*/styled.div.withConfig({
58909
- displayName: "CartCardHorizontal__CardFooter",
58910
- componentId: "sc-ngkh06-6"
58911
- })(["margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.1);"]);
58912
-
58913
58850
  var usePackFiltering = function usePackFiltering(packs) {
58914
58851
  var _useState = useState(''),
58915
58852
  searchQuery = _useState[0],
@@ -58934,28 +58871,28 @@ var StorePacksSection = function StorePacksSection(_ref) {
58934
58871
  searchQuery = _usePackFiltering.searchQuery,
58935
58872
  setSearchQuery = _usePackFiltering.setSearchQuery,
58936
58873
  filteredPacks = _usePackFiltering.filteredPacks;
58937
- var renderPackFooter = useCallback(function (pack) {
58938
- return React.createElement(FooterContainer, null, React.createElement(Price, null, "$", pack.priceUSD), React.createElement(CTAButton, {
58874
+ var getImageSrc = function getImageSrc(imageUrl) {
58875
+ if (typeof imageUrl === 'string') return imageUrl;
58876
+ return imageUrl["default"] || imageUrl.src;
58877
+ };
58878
+ var renderPack = useCallback(function (pack) {
58879
+ return React.createElement(PackRow, {
58880
+ key: pack.key,
58881
+ onClick: function onClick() {
58882
+ return onSelectPack == null ? void 0 : onSelectPack(pack);
58883
+ }
58884
+ }, React.createElement(PackIconContainer, null, React.createElement("img", {
58885
+ src: getImageSrc(pack.image),
58886
+ alt: pack.title
58887
+ })), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description)), React.createElement(Controls$2, null, React.createElement(CTAButton, {
58939
58888
  icon: React.createElement(FaCartPlus, null),
58940
58889
  label: "Add",
58941
58890
  onClick: function onClick(e) {
58942
58891
  e.stopPropagation();
58943
58892
  onAddToCart(pack);
58944
58893
  }
58945
- }));
58946
- }, [onAddToCart]);
58947
- var renderPack = useCallback(function (pack) {
58948
- return React.createElement(ShoppingCardHorizontal, {
58949
- key: pack.key,
58950
- title: pack.title,
58951
- description: pack.description,
58952
- imageUrl: pack.image,
58953
- footer: renderPackFooter(pack),
58954
- onClick: function onClick() {
58955
- return onSelectPack == null ? void 0 : onSelectPack(pack);
58956
- }
58957
- });
58958
- }, [onSelectPack, renderPackFooter]);
58894
+ })));
58895
+ }, [onSelectPack, onAddToCart]);
58959
58896
  return React.createElement(ScrollableContent, {
58960
58897
  items: filteredPacks,
58961
58898
  renderItem: renderPack,
@@ -58965,19 +58902,38 @@ var StorePacksSection = function StorePacksSection(_ref) {
58965
58902
  onChange: setSearchQuery,
58966
58903
  placeholder: 'Search packs...'
58967
58904
  },
58968
- layout: "grid",
58969
- gridColumns: 2,
58905
+ layout: "list",
58970
58906
  maxHeight: "420px"
58971
58907
  });
58972
58908
  };
58973
- var FooterContainer = /*#__PURE__*/styled.div.withConfig({
58974
- displayName: "StorePacksSection__FooterContainer",
58909
+ var PackRow = /*#__PURE__*/styled.div.withConfig({
58910
+ displayName: "StorePacksSection__PackRow",
58975
58911
  componentId: "sc-ulazq3-0"
58976
- })(["display:flex;align-items:center;justify-content:space-between;gap:8px;"]);
58977
- var Price = /*#__PURE__*/styled.span.withConfig({
58978
- displayName: "StorePacksSection__Price",
58912
+ })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);cursor:pointer;&:last-child{border-bottom:none;}&:hover{background:rgba(255,255,255,0.04);}"]);
58913
+ var PackIconContainer = /*#__PURE__*/styled.div.withConfig({
58914
+ displayName: "StorePacksSection__PackIconContainer",
58979
58915
  componentId: "sc-ulazq3-1"
58980
- })(["font-family:'Press Start 2P',cursive;font-size:0.6rem;color:#fef08a;"]);
58916
+ })(["width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;img{width:100%;height:100%;object-fit:cover;}"]);
58917
+ var PackDetails = /*#__PURE__*/styled.div.withConfig({
58918
+ displayName: "StorePacksSection__PackDetails",
58919
+ componentId: "sc-ulazq3-2"
58920
+ })(["flex:1;display:flex;flex-direction:column;gap:0.25rem;min-width:0;"]);
58921
+ var PackName = /*#__PURE__*/styled.div.withConfig({
58922
+ displayName: "StorePacksSection__PackName",
58923
+ componentId: "sc-ulazq3-3"
58924
+ })(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
58925
+ var PackPrice = /*#__PURE__*/styled.div.withConfig({
58926
+ displayName: "StorePacksSection__PackPrice",
58927
+ componentId: "sc-ulazq3-4"
58928
+ })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
58929
+ var PackDescription = /*#__PURE__*/styled.div.withConfig({
58930
+ displayName: "StorePacksSection__PackDescription",
58931
+ componentId: "sc-ulazq3-5"
58932
+ })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:rgba(255,255,255,0.7);line-height:1.4;"]);
58933
+ var Controls$2 = /*#__PURE__*/styled.div.withConfig({
58934
+ displayName: "StorePacksSection__Controls",
58935
+ componentId: "sc-ulazq3-6"
58936
+ })(["display:flex;align-items:center;flex-shrink:0;"]);
58981
58937
 
58982
58938
  var StoreItemDetails = function StoreItemDetails(_ref) {
58983
58939
  var item = _ref.item,
@@ -59056,6 +59012,8 @@ var Store = function Store(_ref) {
59056
59012
  atlasIMG = _ref.atlasIMG,
59057
59013
  _onPurchase2 = _ref.onPurchase,
59058
59014
  onShowHistory = _ref.onShowHistory,
59015
+ onShowWallet = _ref.onShowWallet,
59016
+ walletLabel = _ref.walletLabel,
59059
59017
  userAccountType = _ref.userAccountType,
59060
59018
  _ref$loading = _ref.loading,
59061
59019
  loading = _ref$loading === void 0 ? false : _ref$loading,
@@ -59067,7 +59025,8 @@ var Store = function Store(_ref) {
59067
59025
  defaultActiveTab = _ref.defaultActiveTab,
59068
59026
  _ref$textInputItemKey = _ref.textInputItemKeys,
59069
59027
  textInputItemKeys = _ref$textInputItemKey === void 0 ? [] : _ref$textInputItemKey,
59070
- customPacksContent = _ref.customPacksContent;
59028
+ customPacksContent = _ref.customPacksContent,
59029
+ customWalletContent = _ref.customWalletContent;
59071
59030
  var _useState = useState(null),
59072
59031
  selectedPack = _useState[0],
59073
59032
  setSelectedPack = _useState[1];
@@ -59211,6 +59170,11 @@ var Store = function Store(_ref) {
59211
59170
  userAccountType: userAccountType,
59212
59171
  textInputItemKeys: textInputItemKeys
59213
59172
  })
59173
+ },
59174
+ wallet: {
59175
+ id: 'wallet',
59176
+ title: 'Wallet',
59177
+ content: customWalletContent != null ? customWalletContent : null
59214
59178
  }
59215
59179
  };
59216
59180
  var tabs = availableTabIds.map(function (id) {
@@ -59267,10 +59231,14 @@ var Store = function Store(_ref) {
59267
59231
  onAddToCart: function onAddToCart() {
59268
59232
  return handleAddPackToCart(selectedPack);
59269
59233
  }
59270
- }) : React.createElement(Container$N, null, React.createElement(TopBar$1, null, React.createElement(HistoryButton, null, onShowHistory && React.createElement(CTAButton, {
59234
+ }) : React.createElement(Container$N, null, React.createElement(TopBar$1, null, React.createElement(LeftButtons, null, onShowHistory && React.createElement(CTAButton, {
59271
59235
  icon: React.createElement(FaHistory, null),
59272
59236
  label: "History",
59273
59237
  onClick: onShowHistory
59238
+ }), onShowWallet && React.createElement(CTAButton, {
59239
+ icon: React.createElement(FaWallet, null),
59240
+ label: walletLabel != null ? walletLabel : 'DC Wallet',
59241
+ onClick: onShowWallet
59274
59242
  })), React.createElement(CartButton, null, React.createElement(CTAButton, {
59275
59243
  icon: React.createElement(FaShoppingCart, null),
59276
59244
  label: getTotalItems() + " items ($" + getTotalPrice().toFixed(2) + ")",
@@ -59301,10 +59269,10 @@ var TopBar$1 = /*#__PURE__*/styled.div.withConfig({
59301
59269
  displayName: "Store__TopBar",
59302
59270
  componentId: "sc-64dj00-1"
59303
59271
  })(["display:flex;align-items:center;justify-content:flex-end;gap:1rem;padding:0 1rem;flex-shrink:0;margin-top:0.5rem;"]);
59304
- var HistoryButton = /*#__PURE__*/styled.div.withConfig({
59305
- displayName: "Store__HistoryButton",
59272
+ var LeftButtons = /*#__PURE__*/styled.div.withConfig({
59273
+ displayName: "Store__LeftButtons",
59306
59274
  componentId: "sc-64dj00-2"
59307
- })(["min-width:fit-content;margin-right:auto;"]);
59275
+ })(["display:flex;gap:0.5rem;min-width:fit-content;margin-right:auto;"]);
59308
59276
  var CartButton = /*#__PURE__*/styled.div.withConfig({
59309
59277
  displayName: "Store__CartButton",
59310
59278
  componentId: "sc-64dj00-3"