@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
package/dist/long-bow.esm.js
CHANGED
|
@@ -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,
|
|
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';
|
|
@@ -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(
|
|
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)),
|
|
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,
|
|
@@ -37723,49 +37714,53 @@ 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-
|
|
37729
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;
|
|
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;"]);
|
|
37730
37729
|
var EmptyCart = /*#__PURE__*/styled.div.withConfig({
|
|
37731
37730
|
displayName: "CartView__EmptyCart",
|
|
37732
|
-
componentId: "sc-ydtyl1-
|
|
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-
|
|
37735
|
+
componentId: "sc-ydtyl1-8"
|
|
37737
37736
|
})(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.75rem;background:rgba(0,0,0,0.2);border-radius:4px;"]);
|
|
37738
37737
|
var ItemIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
37739
37738
|
displayName: "CartView__ItemIconContainer",
|
|
37740
|
-
componentId: "sc-ydtyl1-
|
|
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-
|
|
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-
|
|
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-
|
|
37751
|
+
componentId: "sc-ydtyl1-12"
|
|
37753
37752
|
})(["display:flex;align-items:center;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-
|
|
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-
|
|
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-
|
|
37763
|
+
componentId: "sc-ydtyl1-15"
|
|
37769
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;}"], function (p) {
|
|
37770
37765
|
return p.$isTotal ? '1rem' : '0.75rem';
|
|
37771
37766
|
}, function (p) {
|
|
@@ -37775,35 +37770,27 @@ var TotalRow = /*#__PURE__*/styled.div.withConfig({
|
|
|
37775
37770
|
});
|
|
37776
37771
|
var PaymentMethodRow = /*#__PURE__*/styled.div.withConfig({
|
|
37777
37772
|
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
37773
|
componentId: "sc-ydtyl1-16"
|
|
37783
|
-
})(["display:flex;align-items:center;
|
|
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;"]);
|
|
37774
|
+
})(["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
37775
|
var ErrorMessage$2 = /*#__PURE__*/styled.div.withConfig({
|
|
37789
37776
|
displayName: "CartView__ErrorMessage",
|
|
37790
|
-
componentId: "sc-ydtyl1-
|
|
37777
|
+
componentId: "sc-ydtyl1-17"
|
|
37791
37778
|
})(["color:#ef4444;font-size:0.875rem;font-family:'Press Start 2P',cursive;text-align:center;"]);
|
|
37792
37779
|
var MetadataInfo = /*#__PURE__*/styled.div.withConfig({
|
|
37793
37780
|
displayName: "CartView__MetadataInfo",
|
|
37794
|
-
componentId: "sc-ydtyl1-
|
|
37781
|
+
componentId: "sc-ydtyl1-18"
|
|
37795
37782
|
})(["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
37783
|
var MetadataLabel = /*#__PURE__*/styled.div.withConfig({
|
|
37797
37784
|
displayName: "CartView__MetadataLabel",
|
|
37798
|
-
componentId: "sc-ydtyl1-
|
|
37785
|
+
componentId: "sc-ydtyl1-19"
|
|
37799
37786
|
})(["display:flex;align-items:center;gap:0.25rem;font-weight:bold;color:#d9f99d;"]);
|
|
37800
37787
|
var MetadataValue = /*#__PURE__*/styled.div.withConfig({
|
|
37801
37788
|
displayName: "CartView__MetadataValue",
|
|
37802
|
-
componentId: "sc-ydtyl1-
|
|
37789
|
+
componentId: "sc-ydtyl1-20"
|
|
37803
37790
|
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
37804
37791
|
var CartMeta = /*#__PURE__*/styled.div.withConfig({
|
|
37805
37792
|
displayName: "CartView__CartMeta",
|
|
37806
|
-
componentId: "sc-ydtyl1-
|
|
37793
|
+
componentId: "sc-ydtyl1-21"
|
|
37807
37794
|
})(["font-family:'Press Start 2P',cursive;font-size:0.55rem;color:#ffffff;opacity:0.8;margin-top:0.25rem;"]);
|
|
37808
37795
|
|
|
37809
37796
|
function calcTimeLeft(endsAt) {
|
|
@@ -39892,7 +39879,6 @@ var Store = function Store(_ref) {
|
|
|
39892
39879
|
onCheckoutStart = _ref.onCheckoutStart,
|
|
39893
39880
|
onPurchaseSuccess = _ref.onPurchaseSuccess,
|
|
39894
39881
|
onPurchaseError = _ref.onPurchaseError,
|
|
39895
|
-
onBuyDC = _ref.onBuyDC,
|
|
39896
39882
|
_ref$currencySymbol = _ref.currencySymbol,
|
|
39897
39883
|
currencySymbol = _ref$currencySymbol === void 0 ? '$' : _ref$currencySymbol,
|
|
39898
39884
|
onRedeem = _ref.onRedeem,
|
|
@@ -40132,7 +40118,6 @@ var Store = function Store(_ref) {
|
|
|
40132
40118
|
onCheckoutStart: onCheckoutStart,
|
|
40133
40119
|
onPurchaseSuccess: onPurchaseSuccess,
|
|
40134
40120
|
onPurchaseError: onPurchaseError,
|
|
40135
|
-
onBuyDC: onBuyDC,
|
|
40136
40121
|
currencySymbol: currencySymbol
|
|
40137
40122
|
}) : selectedPack ? React.createElement(StoreItemDetails, {
|
|
40138
40123
|
item: _extends({}, selectedPack, {
|
|
@@ -40172,7 +40157,7 @@ var Store = function Store(_ref) {
|
|
|
40172
40157
|
if (pack) onQuickBuy(packToBlueprint(pack), 1);
|
|
40173
40158
|
}
|
|
40174
40159
|
} : undefined
|
|
40175
|
-
}), React.createElement(MainContent$
|
|
40160
|
+
}), React.createElement(MainContent$2, null, React.createElement(StoreHeader, {
|
|
40176
40161
|
tabs: availableTabIds.map(function (id) {
|
|
40177
40162
|
var _tabsMap$id, _tabsMap$id2;
|
|
40178
40163
|
return {
|
|
@@ -40196,7 +40181,7 @@ var Container$Q = /*#__PURE__*/styled.div.withConfig({
|
|
|
40196
40181
|
displayName: "Store__Container",
|
|
40197
40182
|
componentId: "sc-64dj00-0"
|
|
40198
40183
|
})(["display:flex;flex-direction:column;width:100%;height:100%;gap:0.5rem;position:relative;overflow:hidden;"]);
|
|
40199
|
-
var MainContent$
|
|
40184
|
+
var MainContent$2 = /*#__PURE__*/styled.div.withConfig({
|
|
40200
40185
|
displayName: "Store__MainContent",
|
|
40201
40186
|
componentId: "sc-64dj00-1"
|
|
40202
40187
|
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);
|