@rpg-engine/long-bow 0.8.220 → 0.8.222

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.
@@ -6,7 +6,7 @@ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemConta
6
6
  export { MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
7
7
  import dayjs from 'dayjs';
8
8
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
9
- import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaLock, FaRocket, FaHeadset, FaStar, FaShoppingBag, FaTrash, FaCoins, FaInfoCircle, FaBolt, FaCartPlus, FaCheckCircle, FaTicketAlt, FaExclamationCircle, FaArrowLeft, FaUsers, FaWallet, FaHistory } from 'react-icons/fa';
9
+ import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaPaperPlane, FaShoppingCart, FaChevronUp, FaChevronDown, FaReddit, FaLock, FaRocket, FaHeadset, FaStar, FaShoppingBag, FaTrash, FaInfoCircle, FaBolt, FaCartPlus, FaCheckCircle, FaTicketAlt, FaExclamationCircle, FaArrowLeft, FaUsers, FaWallet, FaHistory } from 'react-icons/fa';
10
10
  import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
11
11
  import { IoMdContract, IoMdExpand } from 'react-icons/io';
12
12
  import ReactDOM, { createPortal } from 'react-dom';
@@ -2560,7 +2560,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
2560
2560
  var Container$a = /*#__PURE__*/styled.div.withConfig({
2561
2561
  displayName: "DraggableContainer__Container",
2562
2562
  componentId: "sc-184mpyl-0"
2563
- })(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
2563
+ })(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}@media (max-width:600px){width:100vw !important;min-width:unset !important;height:100dvh !important;}"], function (props) {
2564
2564
  return props.height;
2565
2565
  }, function (_ref2) {
2566
2566
  var width = _ref2.width;
@@ -37557,7 +37557,6 @@ var CartView = function CartView(_ref2) {
37557
37557
  paymentMethodLabel = _ref2.paymentMethodLabel,
37558
37558
  trustSignals = _ref2.trustSignals,
37559
37559
  onCloseStore = _ref2.onCloseStore,
37560
- onBuyDC = _ref2.onBuyDC,
37561
37560
  onCheckoutStart = _ref2.onCheckoutStart,
37562
37561
  onPurchaseSuccess = _ref2.onPurchaseSuccess,
37563
37562
  onPurchaseError = _ref2.onPurchaseError,
@@ -37636,11 +37635,6 @@ var CartView = function CartView(_ref2) {
37636
37635
  return _ref3.apply(this, arguments);
37637
37636
  };
37638
37637
  }();
37639
- // Show DC discount nudge when items have DC pricing and user might benefit
37640
- var hasDCItems = cartItems.some(function (ci) {
37641
- return ci.item.dcPrice;
37642
- });
37643
- var showDCNudge = hasDCItems && onBuyDC;
37644
37638
  if (purchasedItems) {
37645
37639
  return React.createElement(PurchaseSuccess, {
37646
37640
  items: purchasedItems.map(function (ci) {
@@ -37665,9 +37659,8 @@ var CartView = function CartView(_ref2) {
37665
37659
  return s + ci.quantity;
37666
37660
  }, 0), ")"), React.createElement(CloseButton$h, {
37667
37661
  onPointerDown: onClose
37668
- }, React.createElement(FaTimes, null))), React.createElement(CartItems, null, cartItems.length === 0 ? React.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
37662
+ }, React.createElement(FaTimes, null))), React.createElement(MainContent$1, null, React.createElement(CartItems, null, cartItems.length === 0 ? React.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
37669
37663
  var _cartItem$metadata, _cartItem$metadata2, _cartItem$item$region2, _cartItem$item$region3;
37670
- console.log('Item metadataType: , texturePath:', cartItem.item.metadataType, cartItem.item.texturePath);
37671
37664
  var getSpriteKey = function getSpriteKey(textureKey) {
37672
37665
  return textureKey + '/down/standing/0.png';
37673
37666
  };
@@ -37691,15 +37684,13 @@ var CartView = function CartView(_ref2) {
37691
37684
  onRemoveFromCart(cartItem.item.key);
37692
37685
  }
37693
37686
  }));
37694
- })), React.createElement(Footer$2, null, showDCNudge && React.createElement(DCNudge, {
37695
- onPointerDown: onBuyDC
37696
- }, React.createElement(FaCoins, null), React.createElement("span", null, "Save more with DC \u2014 volume discounts available"), React.createElement(DCNudgeLink, null, "Buy DC \u2192")), React.createElement(TrustBar, {
37697
- signals: trustSignals
37698
- }), React.createElement(TotalInfo, null, React.createElement(OrderSummaryLabel, null, "Order Summary"), React.createElement(TotalRow, null, React.createElement("span", null, "Subtotal:"), React.createElement("span", null, currencySymbol, formatPrice(total))), dcTotal > 0 && React.createElement(TotalRow, null, React.createElement("span", null, "DC:"), React.createElement("span", null, React.createElement(MMORPGNumber, {
37687
+ })), cartItems.length > 0 && React.createElement(OrderSummaryPanel, null, React.createElement(OrderSummaryLabel, null, "Order Summary"), React.createElement(TotalRow, null, React.createElement("span", null, "Subtotal:"), React.createElement("span", null, currencySymbol, formatPrice(total))), dcTotal > 0 && React.createElement(TotalRow, null, React.createElement("span", null, "DC:"), React.createElement("span", null, React.createElement(MMORPGNumber, {
37699
37688
  value: dcTotal
37700
37689
  }), " DC")), React.createElement(TotalRow, {
37701
37690
  "$isTotal": true
37702
- }, React.createElement("span", null, "Total:"), React.createElement("span", null, currencySymbol, formatPrice(total))), paymentMethodLabel && React.createElement(PaymentMethodRow, null, React.createElement("span", null, "Paying with:"), React.createElement("span", null, paymentMethodLabel)), error && React.createElement(ErrorMessage$2, null, error)), React.createElement(CTAButton, {
37691
+ }, React.createElement("span", null, "Total:"), React.createElement("span", null, currencySymbol, formatPrice(total))), paymentMethodLabel && React.createElement(PaymentMethodRow, null, React.createElement("span", null, "Paying with:"), React.createElement("span", null, paymentMethodLabel)))), React.createElement(Footer$2, null, React.createElement(TrustBar, {
37692
+ signals: trustSignals
37693
+ }), error && React.createElement(ErrorMessage$2, null, error), React.createElement(CTAButton, {
37703
37694
  icon: React.createElement(FaShoppingBag, null),
37704
37695
  label: isLoading ? 'Processing...' : "Pay " + currencySymbol + formatPrice(total),
37705
37696
  onClick: handlePurchase,
@@ -37710,7 +37701,7 @@ var CartView = function CartView(_ref2) {
37710
37701
  var Container$M = /*#__PURE__*/styled.div.withConfig({
37711
37702
  displayName: "CartView__Container",
37712
37703
  componentId: "sc-ydtyl1-0"
37713
- })(["display:flex;flex-direction:column;width:100%;height:100%;padding:1rem;overflow:hidden;box-sizing:border-box;"]);
37704
+ })(["display:flex;flex-direction:column;width:100%;height:100%;padding:1rem;overflow:hidden;box-sizing:border-box;@media (max-width:480px){padding:0.75rem 0.5rem;}"]);
37714
37705
  var Header$g = /*#__PURE__*/styled.div.withConfig({
37715
37706
  displayName: "CartView__Header",
37716
37707
  componentId: "sc-ydtyl1-1"
@@ -37723,87 +37714,85 @@ var CloseButton$h = /*#__PURE__*/styled.div.withConfig({
37723
37714
  displayName: "CartView__CloseButton",
37724
37715
  componentId: "sc-ydtyl1-3"
37725
37716
  })(["padding:0.5rem;min-width:unset;width:42px;height:42px;display:flex;font-size:1.5rem;align-items:center;color:white;justify-content:center;"]);
37717
+ var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
37718
+ displayName: "CartView__MainContent",
37719
+ componentId: "sc-ydtyl1-4"
37720
+ })(["display:grid;grid-template-columns:1fr 260px;gap:1rem;flex:1;min-height:0;margin:1rem 0;@media (max-width:700px){grid-template-columns:1fr;gap:0.75rem;}"]);
37726
37721
  var CartItems = /*#__PURE__*/styled.div.withConfig({
37727
37722
  displayName: "CartView__CartItems",
37728
- componentId: "sc-ydtyl1-4"
37729
- })(["display:flex;flex-direction:column;gap:0.5rem;flex:1;min-height:0;overflow-y:auto;margin:1rem 0;padding-right:0.5rem;&::-webkit-scrollbar{width:6px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:4px;}&::-webkit-scrollbar-thumb{background:#f59e0b;border-radius:4px;&:hover{background:#fbbf24;}}"]);
37723
+ componentId: "sc-ydtyl1-5"
37724
+ })(["display:flex;flex-direction:column;gap:0.5rem;min-height:0;overflow-y:auto;padding-right:0.5rem;&::-webkit-scrollbar{width:6px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:4px;}&::-webkit-scrollbar-thumb{background:#f59e0b;border-radius:4px;&:hover{background:#fbbf24;}}"]);
37725
+ var OrderSummaryPanel = /*#__PURE__*/styled.div.withConfig({
37726
+ displayName: "CartView__OrderSummaryPanel",
37727
+ componentId: "sc-ydtyl1-6"
37728
+ })(["display:flex;flex-direction:column;gap:0.5rem;padding:1rem;background:rgba(0,0,0,0.25);border:1px solid rgba(255,255,255,0.08);border-radius:6px;align-self:start;@media (max-width:480px){padding:0.75rem;}"]);
37730
37729
  var EmptyCart = /*#__PURE__*/styled.div.withConfig({
37731
37730
  displayName: "CartView__EmptyCart",
37732
- componentId: "sc-ydtyl1-5"
37731
+ componentId: "sc-ydtyl1-7"
37733
37732
  })(["display:flex;align-items:center;justify-content:center;height:100%;color:#ffffff;font-family:'Press Start 2P',cursive;font-size:0.875rem;opacity:0.7;"]);
37734
37733
  var CartItemRow = /*#__PURE__*/styled.div.withConfig({
37735
37734
  displayName: "CartView__CartItemRow",
37736
- componentId: "sc-ydtyl1-6"
37737
- })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem;background:rgba(0,0,0,0.2);border-radius:4px;"]);
37735
+ componentId: "sc-ydtyl1-8"
37736
+ })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem;background:rgba(0,0,0,0.2);border-radius:4px;@media (max-width:480px){gap:0.5rem;padding:0.4rem 0.5rem;}"]);
37738
37737
  var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
37739
37738
  displayName: "CartView__ItemIconContainer",
37740
- componentId: "sc-ydtyl1-7"
37739
+ componentId: "sc-ydtyl1-9"
37741
37740
  })(["width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:2px;"]);
37742
37741
  var ItemDetails$4 = /*#__PURE__*/styled.div.withConfig({
37743
37742
  displayName: "CartView__ItemDetails",
37744
- componentId: "sc-ydtyl1-8"
37743
+ componentId: "sc-ydtyl1-10"
37745
37744
  })(["flex:1;display:flex;flex-direction:column;gap:0.5rem;"]);
37746
37745
  var ItemName$6 = /*#__PURE__*/styled.div.withConfig({
37747
37746
  displayName: "CartView__ItemName",
37748
- componentId: "sc-ydtyl1-9"
37747
+ componentId: "sc-ydtyl1-11"
37749
37748
  })(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
37750
37749
  var ItemInfo$2 = /*#__PURE__*/styled.div.withConfig({
37751
37750
  displayName: "CartView__ItemInfo",
37752
- componentId: "sc-ydtyl1-10"
37753
- })(["display:flex;align-items:center;gap:0.4rem;font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#fef08a;"]);
37751
+ componentId: "sc-ydtyl1-12"
37752
+ })(["display:flex;align-items:center;flex-wrap:wrap;gap:0.4rem;font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#fef08a;"]);
37754
37753
  var Footer$2 = /*#__PURE__*/styled.div.withConfig({
37755
37754
  displayName: "CartView__Footer",
37756
- componentId: "sc-ydtyl1-11"
37755
+ componentId: "sc-ydtyl1-13"
37757
37756
  })(["display:flex;flex-direction:column;gap:1rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,0.1);flex-shrink:0;@media (max-width:600px){gap:0.75rem;padding-top:0.75rem;}"]);
37758
- var TotalInfo = /*#__PURE__*/styled.div.withConfig({
37759
- displayName: "CartView__TotalInfo",
37760
- componentId: "sc-ydtyl1-12"
37761
- })(["display:flex;flex-direction:column;gap:0.5rem;"]);
37762
37757
  var OrderSummaryLabel = /*#__PURE__*/styled.div.withConfig({
37763
37758
  displayName: "CartView__OrderSummaryLabel",
37764
- componentId: "sc-ydtyl1-13"
37759
+ componentId: "sc-ydtyl1-14"
37765
37760
  })(["font-family:'Press Start 2P',cursive;font-size:0.55rem;color:rgba(255,255,255,0.5);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:0.25rem;"]);
37766
37761
  var TotalRow = /*#__PURE__*/styled.div.withConfig({
37767
37762
  displayName: "CartView__TotalRow",
37768
- componentId: "sc-ydtyl1-14"
37769
- })(["display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:'Press Start 2P',cursive;font-size:", ";color:", ";", " span:last-child{color:#fef08a;}"], function (p) {
37763
+ componentId: "sc-ydtyl1-15"
37764
+ })(["display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:'Press Start 2P',cursive;font-size:", ";color:", ";", " span:last-child{color:#fef08a;}@media (max-width:480px){font-size:", ";gap:0.5rem;}"], function (p) {
37770
37765
  return p.$isTotal ? '1rem' : '0.75rem';
37771
37766
  }, function (p) {
37772
37767
  return p.$isTotal ? '#ffffff' : 'rgba(255,255,255,0.7)';
37773
37768
  }, function (p) {
37774
37769
  return p.$isTotal && "\n padding-top: 0.5rem;\n border-top: 1px solid rgba(255,255,255,0.15);\n margin-top: 0.25rem;\n ";
37770
+ }, function (p) {
37771
+ return p.$isTotal ? '0.7rem' : '0.55rem';
37775
37772
  });
37776
37773
  var PaymentMethodRow = /*#__PURE__*/styled.div.withConfig({
37777
37774
  displayName: "CartView__PaymentMethodRow",
37778
- componentId: "sc-ydtyl1-15"
37779
- })(["display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);margin-top:0.25rem;span:last-child{color:rgba(255,255,255,0.8);}"]);
37780
- var DCNudge = /*#__PURE__*/styled.div.withConfig({
37781
- displayName: "CartView__DCNudge",
37782
37775
  componentId: "sc-ydtyl1-16"
37783
- })(["display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.75rem;background:rgba(245,158,11,0.1);border:1px solid rgba(245,158,11,0.3);border-radius:4px;cursor:pointer;font-family:'Press Start 2P',cursive;font-size:0.45rem;color:#fbbf24;transition:background 0.15s;line-height:1.4;flex-wrap:wrap;&:hover{background:rgba(245,158,11,0.18);}svg{flex-shrink:0;font-size:0.7rem;}span{flex:1;min-width:140px;}"]);
37784
- var DCNudgeLink = /*#__PURE__*/styled.span.withConfig({
37785
- displayName: "CartView__DCNudgeLink",
37786
- componentId: "sc-ydtyl1-17"
37787
- })(["color:#f59e0b;white-space:nowrap;text-decoration:underline;flex:0 0 auto !important;"]);
37776
+ })(["display:flex;align-items:center;justify-content:space-between;gap:1rem;font-family:'Press Start 2P',cursive;font-size:0.5rem;color:rgba(255,255,255,0.5);margin-top:0.25rem;span:last-child{color:rgba(255,255,255,0.8);}"]);
37788
37777
  var ErrorMessage$2 = /*#__PURE__*/styled.div.withConfig({
37789
37778
  displayName: "CartView__ErrorMessage",
37790
- componentId: "sc-ydtyl1-18"
37779
+ componentId: "sc-ydtyl1-17"
37791
37780
  })(["color:#ef4444;font-size:0.875rem;font-family:'Press Start 2P',cursive;text-align:center;"]);
37792
37781
  var MetadataInfo = /*#__PURE__*/styled.div.withConfig({
37793
37782
  displayName: "CartView__MetadataInfo",
37794
- componentId: "sc-ydtyl1-19"
37783
+ componentId: "sc-ydtyl1-18"
37795
37784
  })(["display:flex;align-items:center;margin-top:0.25rem;gap:0.4rem;font-size:0.55rem;color:#a3e635;background:rgba(163,230,53,0.1);padding:0.2rem 0.4rem;border-radius:4px;"]);
37796
37785
  var MetadataLabel = /*#__PURE__*/styled.div.withConfig({
37797
37786
  displayName: "CartView__MetadataLabel",
37798
- componentId: "sc-ydtyl1-20"
37787
+ componentId: "sc-ydtyl1-19"
37799
37788
  })(["display:flex;align-items:center;gap:0.25rem;font-weight:bold;color:#d9f99d;"]);
37800
37789
  var MetadataValue = /*#__PURE__*/styled.div.withConfig({
37801
37790
  displayName: "CartView__MetadataValue",
37802
- componentId: "sc-ydtyl1-21"
37791
+ componentId: "sc-ydtyl1-20"
37803
37792
  })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
37804
37793
  var CartMeta = /*#__PURE__*/styled.div.withConfig({
37805
37794
  displayName: "CartView__CartMeta",
37806
- componentId: "sc-ydtyl1-22"
37795
+ componentId: "sc-ydtyl1-21"
37807
37796
  })(["font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#ffffff;opacity:0.8;margin-top:0.25rem;"]);
37808
37797
 
37809
37798
  function calcTimeLeft(endsAt) {
@@ -39892,7 +39881,6 @@ var Store = function Store(_ref) {
39892
39881
  onCheckoutStart = _ref.onCheckoutStart,
39893
39882
  onPurchaseSuccess = _ref.onPurchaseSuccess,
39894
39883
  onPurchaseError = _ref.onPurchaseError,
39895
- onBuyDC = _ref.onBuyDC,
39896
39884
  _ref$currencySymbol = _ref.currencySymbol,
39897
39885
  currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
39898
39886
  onRedeem = _ref.onRedeem,
@@ -40132,7 +40120,6 @@ var Store = function Store(_ref) {
40132
40120
  onCheckoutStart: onCheckoutStart,
40133
40121
  onPurchaseSuccess: onPurchaseSuccess,
40134
40122
  onPurchaseError: onPurchaseError,
40135
- onBuyDC: onBuyDC,
40136
40123
  currencySymbol: currencySymbol
40137
40124
  }) : selectedPack ? React.createElement(StoreItemDetails, {
40138
40125
  item: _extends({}, selectedPack, {
@@ -40172,7 +40159,7 @@ var Store = function Store(_ref) {
40172
40159
  if (pack) onQuickBuy(packToBlueprint(pack), 1);
40173
40160
  }
40174
40161
  } : undefined
40175
- }), React.createElement(MainContent$1, null, React.createElement(StoreHeader, {
40162
+ }), React.createElement(MainContent$2, null, React.createElement(StoreHeader, {
40176
40163
  tabs: availableTabIds.map(function (id) {
40177
40164
  var _tabsMap$id, _tabsMap$id2;
40178
40165
  return {
@@ -40196,7 +40183,7 @@ var Container$Q = /*#__PURE__*/styled.div.withConfig({
40196
40183
  displayName: "Store__Container",
40197
40184
  componentId: "sc-64dj00-0"
40198
40185
  })(["display:flex;flex-direction:column;width:100%;height:100%;gap:0.5rem;position:relative;overflow:hidden;"]);
40199
- var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
40186
+ var MainContent$2 = /*#__PURE__*/styled.div.withConfig({
40200
40187
  displayName: "Store__MainContent",
40201
40188
  componentId: "sc-64dj00-1"
40202
40189
  })(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);