@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.
@@ -16,8 +16,6 @@ export interface ICartViewProps {
16
16
  paymentMethodLabel?: string;
17
17
  trustSignals?: ITrustSignal[];
18
18
  onCloseStore?: () => void;
19
- /** Called when user taps the "Buy DC" nudge — open wallet/DC purchase flow */
20
- onBuyDC?: () => void;
21
19
  /** Fires when user taps the pay button — before the purchase resolves */
22
20
  onCheckoutStart?: (items: Array<{
23
21
  key: string;
@@ -60,7 +60,6 @@ export interface IStoreProps {
60
60
  quantity: number;
61
61
  }>, total: number) => void;
62
62
  onPurchaseError?: (error: string) => void;
63
- onBuyDC?: () => void;
64
63
  currencySymbol?: string;
65
64
  onRedeem?: (code: string) => Promise<{
66
65
  success: boolean;
@@ -2566,7 +2566,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
2566
2566
  var Container$a = /*#__PURE__*/styled__default.div.withConfig({
2567
2567
  displayName: "DraggableContainer__Container",
2568
2568
  componentId: "sc-184mpyl-0"
2569
- })(["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) {
2569
+ })(["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) {
2570
2570
  return props.height;
2571
2571
  }, function (_ref2) {
2572
2572
  var width = _ref2.width;
@@ -37559,7 +37559,6 @@ var CartView = function CartView(_ref2) {
37559
37559
  paymentMethodLabel = _ref2.paymentMethodLabel,
37560
37560
  trustSignals = _ref2.trustSignals,
37561
37561
  onCloseStore = _ref2.onCloseStore,
37562
- onBuyDC = _ref2.onBuyDC,
37563
37562
  onCheckoutStart = _ref2.onCheckoutStart,
37564
37563
  onPurchaseSuccess = _ref2.onPurchaseSuccess,
37565
37564
  onPurchaseError = _ref2.onPurchaseError,
@@ -37638,11 +37637,6 @@ var CartView = function CartView(_ref2) {
37638
37637
  return _ref3.apply(this, arguments);
37639
37638
  };
37640
37639
  }();
37641
- // Show DC discount nudge when items have DC pricing and user might benefit
37642
- var hasDCItems = cartItems.some(function (ci) {
37643
- return ci.item.dcPrice;
37644
- });
37645
- var showDCNudge = hasDCItems && onBuyDC;
37646
37640
  if (purchasedItems) {
37647
37641
  return React__default.createElement(PurchaseSuccess, {
37648
37642
  items: purchasedItems.map(function (ci) {
@@ -37667,9 +37661,8 @@ var CartView = function CartView(_ref2) {
37667
37661
  return s + ci.quantity;
37668
37662
  }, 0), ")"), React__default.createElement(CloseButton$h, {
37669
37663
  onPointerDown: onClose
37670
- }, React__default.createElement(fa.FaTimes, null))), React__default.createElement(CartItems, null, cartItems.length === 0 ? React__default.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
37664
+ }, React__default.createElement(fa.FaTimes, null))), React__default.createElement(MainContent$1, null, React__default.createElement(CartItems, null, cartItems.length === 0 ? React__default.createElement(EmptyCart, null, "Your cart is empty") : cartItems.map(function (cartItem) {
37671
37665
  var _cartItem$metadata, _cartItem$metadata2, _cartItem$item$region2, _cartItem$item$region3;
37672
- console.log('Item metadataType: , texturePath:', cartItem.item.metadataType, cartItem.item.texturePath);
37673
37666
  var getSpriteKey = function getSpriteKey(textureKey) {
37674
37667
  return textureKey + '/down/standing/0.png';
37675
37668
  };
@@ -37693,15 +37686,13 @@ var CartView = function CartView(_ref2) {
37693
37686
  onRemoveFromCart(cartItem.item.key);
37694
37687
  }
37695
37688
  }));
37696
- })), React__default.createElement(Footer$2, null, showDCNudge && React__default.createElement(DCNudge, {
37697
- onPointerDown: onBuyDC
37698
- }, React__default.createElement(fa.FaCoins, null), React__default.createElement("span", null, "Save more with DC \u2014 volume discounts available"), React__default.createElement(DCNudgeLink, null, "Buy DC \u2192")), React__default.createElement(TrustBar, {
37699
- signals: trustSignals
37700
- }), React__default.createElement(TotalInfo, null, React__default.createElement(OrderSummaryLabel, null, "Order Summary"), React__default.createElement(TotalRow, null, React__default.createElement("span", null, "Subtotal:"), React__default.createElement("span", null, currencySymbol, formatPrice(total))), dcTotal > 0 && React__default.createElement(TotalRow, null, React__default.createElement("span", null, "DC:"), React__default.createElement("span", null, React__default.createElement(MMORPGNumber, {
37689
+ })), cartItems.length > 0 && React__default.createElement(OrderSummaryPanel, null, React__default.createElement(OrderSummaryLabel, null, "Order Summary"), React__default.createElement(TotalRow, null, React__default.createElement("span", null, "Subtotal:"), React__default.createElement("span", null, currencySymbol, formatPrice(total))), dcTotal > 0 && React__default.createElement(TotalRow, null, React__default.createElement("span", null, "DC:"), React__default.createElement("span", null, React__default.createElement(MMORPGNumber, {
37701
37690
  value: dcTotal
37702
37691
  }), " DC")), React__default.createElement(TotalRow, {
37703
37692
  "$isTotal": true
37704
- }, React__default.createElement("span", null, "Total:"), React__default.createElement("span", null, currencySymbol, formatPrice(total))), paymentMethodLabel && React__default.createElement(PaymentMethodRow, null, React__default.createElement("span", null, "Paying with:"), React__default.createElement("span", null, paymentMethodLabel)), error && React__default.createElement(ErrorMessage$2, null, error)), React__default.createElement(CTAButton, {
37693
+ }, React__default.createElement("span", null, "Total:"), React__default.createElement("span", null, currencySymbol, formatPrice(total))), paymentMethodLabel && React__default.createElement(PaymentMethodRow, null, React__default.createElement("span", null, "Paying with:"), React__default.createElement("span", null, paymentMethodLabel)))), React__default.createElement(Footer$2, null, React__default.createElement(TrustBar, {
37694
+ signals: trustSignals
37695
+ }), error && React__default.createElement(ErrorMessage$2, null, error), React__default.createElement(CTAButton, {
37705
37696
  icon: React__default.createElement(fa.FaShoppingBag, null),
37706
37697
  label: isLoading ? 'Processing...' : "Pay " + currencySymbol + formatPrice(total),
37707
37698
  onClick: handlePurchase,
@@ -37712,7 +37703,7 @@ var CartView = function CartView(_ref2) {
37712
37703
  var Container$M = /*#__PURE__*/styled__default.div.withConfig({
37713
37704
  displayName: "CartView__Container",
37714
37705
  componentId: "sc-ydtyl1-0"
37715
- })(["display:flex;flex-direction:column;width:100%;height:100%;padding:1rem;overflow:hidden;box-sizing:border-box;"]);
37706
+ })(["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;}"]);
37716
37707
  var Header$g = /*#__PURE__*/styled__default.div.withConfig({
37717
37708
  displayName: "CartView__Header",
37718
37709
  componentId: "sc-ydtyl1-1"
@@ -37725,87 +37716,85 @@ var CloseButton$h = /*#__PURE__*/styled__default.div.withConfig({
37725
37716
  displayName: "CartView__CloseButton",
37726
37717
  componentId: "sc-ydtyl1-3"
37727
37718
  })(["padding:0.5rem;min-width:unset;width:42px;height:42px;display:flex;font-size:1.5rem;align-items:center;color:white;justify-content:center;"]);
37719
+ var MainContent$1 = /*#__PURE__*/styled__default.div.withConfig({
37720
+ displayName: "CartView__MainContent",
37721
+ componentId: "sc-ydtyl1-4"
37722
+ })(["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;}"]);
37728
37723
  var CartItems = /*#__PURE__*/styled__default.div.withConfig({
37729
37724
  displayName: "CartView__CartItems",
37730
- componentId: "sc-ydtyl1-4"
37731
- })(["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;}}"]);
37725
+ componentId: "sc-ydtyl1-5"
37726
+ })(["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;}}"]);
37727
+ var OrderSummaryPanel = /*#__PURE__*/styled__default.div.withConfig({
37728
+ displayName: "CartView__OrderSummaryPanel",
37729
+ componentId: "sc-ydtyl1-6"
37730
+ })(["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;}"]);
37732
37731
  var EmptyCart = /*#__PURE__*/styled__default.div.withConfig({
37733
37732
  displayName: "CartView__EmptyCart",
37734
- componentId: "sc-ydtyl1-5"
37733
+ componentId: "sc-ydtyl1-7"
37735
37734
  })(["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;"]);
37736
37735
  var CartItemRow = /*#__PURE__*/styled__default.div.withConfig({
37737
37736
  displayName: "CartView__CartItemRow",
37738
- componentId: "sc-ydtyl1-6"
37739
- })(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem;background:rgba(0,0,0,0.2);border-radius:4px;"]);
37737
+ componentId: "sc-ydtyl1-8"
37738
+ })(["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;}"]);
37740
37739
  var ItemIconContainer = /*#__PURE__*/styled__default.div.withConfig({
37741
37740
  displayName: "CartView__ItemIconContainer",
37742
- componentId: "sc-ydtyl1-7"
37741
+ componentId: "sc-ydtyl1-9"
37743
37742
  })(["width:24px;height:24px;display:flex;align-items:center;justify-content:center;border-radius:4px;padding:2px;"]);
37744
37743
  var ItemDetails$4 = /*#__PURE__*/styled__default.div.withConfig({
37745
37744
  displayName: "CartView__ItemDetails",
37746
- componentId: "sc-ydtyl1-8"
37745
+ componentId: "sc-ydtyl1-10"
37747
37746
  })(["flex:1;display:flex;flex-direction:column;gap:0.5rem;"]);
37748
37747
  var ItemName$6 = /*#__PURE__*/styled__default.div.withConfig({
37749
37748
  displayName: "CartView__ItemName",
37750
- componentId: "sc-ydtyl1-9"
37749
+ componentId: "sc-ydtyl1-11"
37751
37750
  })(["font-family:'Press Start 2P',cursive;font-size:0.65rem;color:#ffffff;"]);
37752
37751
  var ItemInfo$2 = /*#__PURE__*/styled__default.div.withConfig({
37753
37752
  displayName: "CartView__ItemInfo",
37754
- componentId: "sc-ydtyl1-10"
37755
- })(["display:flex;align-items:center;gap:0.4rem;font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#fef08a;"]);
37753
+ componentId: "sc-ydtyl1-12"
37754
+ })(["display:flex;align-items:center;flex-wrap:wrap;gap:0.4rem;font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#fef08a;"]);
37756
37755
  var Footer$2 = /*#__PURE__*/styled__default.div.withConfig({
37757
37756
  displayName: "CartView__Footer",
37758
- componentId: "sc-ydtyl1-11"
37757
+ componentId: "sc-ydtyl1-13"
37759
37758
  })(["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;}"]);
37760
- var TotalInfo = /*#__PURE__*/styled__default.div.withConfig({
37761
- displayName: "CartView__TotalInfo",
37762
- componentId: "sc-ydtyl1-12"
37763
- })(["display:flex;flex-direction:column;gap:0.5rem;"]);
37764
37759
  var OrderSummaryLabel = /*#__PURE__*/styled__default.div.withConfig({
37765
37760
  displayName: "CartView__OrderSummaryLabel",
37766
- componentId: "sc-ydtyl1-13"
37761
+ componentId: "sc-ydtyl1-14"
37767
37762
  })(["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;"]);
37768
37763
  var TotalRow = /*#__PURE__*/styled__default.div.withConfig({
37769
37764
  displayName: "CartView__TotalRow",
37770
- componentId: "sc-ydtyl1-14"
37771
- })(["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) {
37765
+ componentId: "sc-ydtyl1-15"
37766
+ })(["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) {
37772
37767
  return p.$isTotal ? '1rem' : '0.75rem';
37773
37768
  }, function (p) {
37774
37769
  return p.$isTotal ? '#ffffff' : 'rgba(255,255,255,0.7)';
37775
37770
  }, function (p) {
37776
37771
  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 ";
37772
+ }, function (p) {
37773
+ return p.$isTotal ? '0.7rem' : '0.55rem';
37777
37774
  });
37778
37775
  var PaymentMethodRow = /*#__PURE__*/styled__default.div.withConfig({
37779
37776
  displayName: "CartView__PaymentMethodRow",
37780
- componentId: "sc-ydtyl1-15"
37781
- })(["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);}"]);
37782
- var DCNudge = /*#__PURE__*/styled__default.div.withConfig({
37783
- displayName: "CartView__DCNudge",
37784
37777
  componentId: "sc-ydtyl1-16"
37785
- })(["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;}"]);
37786
- var DCNudgeLink = /*#__PURE__*/styled__default.span.withConfig({
37787
- displayName: "CartView__DCNudgeLink",
37788
- componentId: "sc-ydtyl1-17"
37789
- })(["color:#f59e0b;white-space:nowrap;text-decoration:underline;flex:0 0 auto !important;"]);
37778
+ })(["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);}"]);
37790
37779
  var ErrorMessage$2 = /*#__PURE__*/styled__default.div.withConfig({
37791
37780
  displayName: "CartView__ErrorMessage",
37792
- componentId: "sc-ydtyl1-18"
37781
+ componentId: "sc-ydtyl1-17"
37793
37782
  })(["color:#ef4444;font-size:0.875rem;font-family:'Press Start 2P',cursive;text-align:center;"]);
37794
37783
  var MetadataInfo = /*#__PURE__*/styled__default.div.withConfig({
37795
37784
  displayName: "CartView__MetadataInfo",
37796
- componentId: "sc-ydtyl1-19"
37785
+ componentId: "sc-ydtyl1-18"
37797
37786
  })(["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;"]);
37798
37787
  var MetadataLabel = /*#__PURE__*/styled__default.div.withConfig({
37799
37788
  displayName: "CartView__MetadataLabel",
37800
- componentId: "sc-ydtyl1-20"
37789
+ componentId: "sc-ydtyl1-19"
37801
37790
  })(["display:flex;align-items:center;gap:0.25rem;font-weight:bold;color:#d9f99d;"]);
37802
37791
  var MetadataValue = /*#__PURE__*/styled__default.div.withConfig({
37803
37792
  displayName: "CartView__MetadataValue",
37804
- componentId: "sc-ydtyl1-21"
37793
+ componentId: "sc-ydtyl1-20"
37805
37794
  })(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
37806
37795
  var CartMeta = /*#__PURE__*/styled__default.div.withConfig({
37807
37796
  displayName: "CartView__CartMeta",
37808
- componentId: "sc-ydtyl1-22"
37797
+ componentId: "sc-ydtyl1-21"
37809
37798
  })(["font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#ffffff;opacity:0.8;margin-top:0.25rem;"]);
37810
37799
 
37811
37800
  function calcTimeLeft(endsAt) {
@@ -39894,7 +39883,6 @@ var Store = function Store(_ref) {
39894
39883
  onCheckoutStart = _ref.onCheckoutStart,
39895
39884
  onPurchaseSuccess = _ref.onPurchaseSuccess,
39896
39885
  onPurchaseError = _ref.onPurchaseError,
39897
- onBuyDC = _ref.onBuyDC,
39898
39886
  _ref$currencySymbol = _ref.currencySymbol,
39899
39887
  currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
39900
39888
  onRedeem = _ref.onRedeem,
@@ -40134,7 +40122,6 @@ var Store = function Store(_ref) {
40134
40122
  onCheckoutStart: onCheckoutStart,
40135
40123
  onPurchaseSuccess: onPurchaseSuccess,
40136
40124
  onPurchaseError: onPurchaseError,
40137
- onBuyDC: onBuyDC,
40138
40125
  currencySymbol: currencySymbol
40139
40126
  }) : selectedPack ? React__default.createElement(StoreItemDetails, {
40140
40127
  item: _extends({}, selectedPack, {
@@ -40174,7 +40161,7 @@ var Store = function Store(_ref) {
40174
40161
  if (pack) onQuickBuy(packToBlueprint(pack), 1);
40175
40162
  }
40176
40163
  } : undefined
40177
- }), React__default.createElement(MainContent$1, null, React__default.createElement(StoreHeader, {
40164
+ }), React__default.createElement(MainContent$2, null, React__default.createElement(StoreHeader, {
40178
40165
  tabs: availableTabIds.map(function (id) {
40179
40166
  var _tabsMap$id, _tabsMap$id2;
40180
40167
  return {
@@ -40198,7 +40185,7 @@ var Container$Q = /*#__PURE__*/styled__default.div.withConfig({
40198
40185
  displayName: "Store__Container",
40199
40186
  componentId: "sc-64dj00-0"
40200
40187
  })(["display:flex;flex-direction:column;width:100%;height:100%;gap:0.5rem;position:relative;overflow:hidden;"]);
40201
- var MainContent$1 = /*#__PURE__*/styled__default.div.withConfig({
40188
+ var MainContent$2 = /*#__PURE__*/styled__default.div.withConfig({
40202
40189
  displayName: "Store__MainContent",
40203
40190
  componentId: "sc-64dj00-1"
40204
40191
  })(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);