@rpg-engine/long-bow 0.8.220 → 0.8.221
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.
- package/dist/components/Store/CartView.d.ts +0 -2
- package/dist/components/Store/Store.d.ts +0 -1
- package/dist/long-bow.cjs.development.js +32 -47
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +33 -48
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/CartView.tsx +111 -137
- package/src/components/Store/Store.tsx +0 -3
|
@@ -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;
|
|
@@ -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(
|
|
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)),
|
|
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,
|
|
@@ -37725,49 +37716,53 @@ 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-
|
|
37731
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;
|
|
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;"]);
|
|
37732
37731
|
var EmptyCart = /*#__PURE__*/styled__default.div.withConfig({
|
|
37733
37732
|
displayName: "CartView__EmptyCart",
|
|
37734
|
-
componentId: "sc-ydtyl1-
|
|
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-
|
|
37737
|
+
componentId: "sc-ydtyl1-8"
|
|
37739
37738
|
})(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem;background:rgba(0,0,0,0.2);border-radius:4px;"]);
|
|
37740
37739
|
var ItemIconContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
37741
37740
|
displayName: "CartView__ItemIconContainer",
|
|
37742
|
-
componentId: "sc-ydtyl1-
|
|
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-
|
|
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-
|
|
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-
|
|
37753
|
+
componentId: "sc-ydtyl1-12"
|
|
37755
37754
|
})(["display:flex;align-items:center;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-
|
|
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-
|
|
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-
|
|
37765
|
+
componentId: "sc-ydtyl1-15"
|
|
37771
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;}"], function (p) {
|
|
37772
37767
|
return p.$isTotal ? '1rem' : '0.75rem';
|
|
37773
37768
|
}, function (p) {
|
|
@@ -37777,35 +37772,27 @@ var TotalRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37777
37772
|
});
|
|
37778
37773
|
var PaymentMethodRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
37779
37774
|
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
37775
|
componentId: "sc-ydtyl1-16"
|
|
37785
|
-
})(["display:flex;align-items:center;
|
|
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;"]);
|
|
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);}"]);
|
|
37790
37777
|
var ErrorMessage$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
37791
37778
|
displayName: "CartView__ErrorMessage",
|
|
37792
|
-
componentId: "sc-ydtyl1-
|
|
37779
|
+
componentId: "sc-ydtyl1-17"
|
|
37793
37780
|
})(["color:#ef4444;font-size:0.875rem;font-family:'Press Start 2P',cursive;text-align:center;"]);
|
|
37794
37781
|
var MetadataInfo = /*#__PURE__*/styled__default.div.withConfig({
|
|
37795
37782
|
displayName: "CartView__MetadataInfo",
|
|
37796
|
-
componentId: "sc-ydtyl1-
|
|
37783
|
+
componentId: "sc-ydtyl1-18"
|
|
37797
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;"]);
|
|
37798
37785
|
var MetadataLabel = /*#__PURE__*/styled__default.div.withConfig({
|
|
37799
37786
|
displayName: "CartView__MetadataLabel",
|
|
37800
|
-
componentId: "sc-ydtyl1-
|
|
37787
|
+
componentId: "sc-ydtyl1-19"
|
|
37801
37788
|
})(["display:flex;align-items:center;gap:0.25rem;font-weight:bold;color:#d9f99d;"]);
|
|
37802
37789
|
var MetadataValue = /*#__PURE__*/styled__default.div.withConfig({
|
|
37803
37790
|
displayName: "CartView__MetadataValue",
|
|
37804
|
-
componentId: "sc-ydtyl1-
|
|
37791
|
+
componentId: "sc-ydtyl1-20"
|
|
37805
37792
|
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
37806
37793
|
var CartMeta = /*#__PURE__*/styled__default.div.withConfig({
|
|
37807
37794
|
displayName: "CartView__CartMeta",
|
|
37808
|
-
componentId: "sc-ydtyl1-
|
|
37795
|
+
componentId: "sc-ydtyl1-21"
|
|
37809
37796
|
})(["font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#ffffff;opacity:0.8;margin-top:0.25rem;"]);
|
|
37810
37797
|
|
|
37811
37798
|
function calcTimeLeft(endsAt) {
|
|
@@ -39894,7 +39881,6 @@ var Store = function Store(_ref) {
|
|
|
39894
39881
|
onCheckoutStart = _ref.onCheckoutStart,
|
|
39895
39882
|
onPurchaseSuccess = _ref.onPurchaseSuccess,
|
|
39896
39883
|
onPurchaseError = _ref.onPurchaseError,
|
|
39897
|
-
onBuyDC = _ref.onBuyDC,
|
|
39898
39884
|
_ref$currencySymbol = _ref.currencySymbol,
|
|
39899
39885
|
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
|
|
39900
39886
|
onRedeem = _ref.onRedeem,
|
|
@@ -40134,7 +40120,6 @@ var Store = function Store(_ref) {
|
|
|
40134
40120
|
onCheckoutStart: onCheckoutStart,
|
|
40135
40121
|
onPurchaseSuccess: onPurchaseSuccess,
|
|
40136
40122
|
onPurchaseError: onPurchaseError,
|
|
40137
|
-
onBuyDC: onBuyDC,
|
|
40138
40123
|
currencySymbol: currencySymbol
|
|
40139
40124
|
}) : selectedPack ? React__default.createElement(StoreItemDetails, {
|
|
40140
40125
|
item: _extends({}, selectedPack, {
|
|
@@ -40174,7 +40159,7 @@ var Store = function Store(_ref) {
|
|
|
40174
40159
|
if (pack) onQuickBuy(packToBlueprint(pack), 1);
|
|
40175
40160
|
}
|
|
40176
40161
|
} : undefined
|
|
40177
|
-
}), React__default.createElement(MainContent$
|
|
40162
|
+
}), React__default.createElement(MainContent$2, null, React__default.createElement(StoreHeader, {
|
|
40178
40163
|
tabs: availableTabIds.map(function (id) {
|
|
40179
40164
|
var _tabsMap$id, _tabsMap$id2;
|
|
40180
40165
|
return {
|
|
@@ -40198,7 +40183,7 @@ var Container$Q = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
40198
40183
|
displayName: "Store__Container",
|
|
40199
40184
|
componentId: "sc-64dj00-0"
|
|
40200
40185
|
})(["display:flex;flex-direction:column;width:100%;height:100%;gap:0.5rem;position:relative;overflow:hidden;"]);
|
|
40201
|
-
var MainContent$
|
|
40186
|
+
var MainContent$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
40202
40187
|
displayName: "Store__MainContent",
|
|
40203
40188
|
componentId: "sc-64dj00-1"
|
|
40204
40189
|
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);
|