@rpg-engine/long-bow 0.8.212 → 0.8.213
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/long-bow.cjs.development.js +33 -29
- 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 -29
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/Marketplace.tsx +2 -1
- package/src/components/Store/Store.tsx +38 -23
- package/src/components/shared/Tabs/Tabs.tsx +5 -0
- package/src/stories/Features/store/Store.stories.tsx +43 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -10871,7 +10871,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
10871
10871
|
var TabsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
10872
10872
|
displayName: "Tabs__TabsContainer",
|
|
10873
10873
|
componentId: "sc-n35er2-0"
|
|
10874
|
-
})(["display:flex;gap:10px;width:95%;margin:0 auto 15px auto;border-bottom:2px solid rgba(255,255,255,0.1);padding-bottom:10px;"]);
|
|
10874
|
+
})(["display:flex;gap:10px;width:95%;margin:0 auto 15px auto;border-bottom:2px solid rgba(255,255,255,0.1);padding-bottom:10px;overflow-x:auto;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"]);
|
|
10875
10875
|
var TabButton$1 = /*#__PURE__*/styled.button.withConfig({
|
|
10876
10876
|
displayName: "Tabs__TabButton",
|
|
10877
10877
|
componentId: "sc-n35er2-1"
|
|
@@ -14439,7 +14439,8 @@ var Marketplace = function Marketplace(props) {
|
|
|
14439
14439
|
if (onClose) onClose();
|
|
14440
14440
|
},
|
|
14441
14441
|
isFullScreen: fullScreen,
|
|
14442
|
-
width: "
|
|
14442
|
+
width: "1050px",
|
|
14443
|
+
minWidth: "750px",
|
|
14443
14444
|
cancelDrag: "#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button",
|
|
14444
14445
|
scale: scale
|
|
14445
14446
|
}, React.createElement(Tabs, {
|
|
@@ -39735,14 +39736,15 @@ var Store = function Store(_ref) {
|
|
|
39735
39736
|
selectedPack = _useState[0],
|
|
39736
39737
|
setSelectedPack = _useState[1];
|
|
39737
39738
|
var _useState2 = useState(function () {
|
|
39738
|
-
var
|
|
39739
|
-
var
|
|
39739
|
+
var _validTabs$;
|
|
39740
|
+
var allTabIds = [].concat(tabOrder != null ? tabOrder : defaultTabOrder, customCharactersContent ? ['characters'] : [], onRedeem ? ['redeem'] : [], onShowWallet || customWalletContent ? ['wallet'] : [], onShowHistory || customHistoryContent ? ['history'] : []);
|
|
39741
|
+
var validTabs = Array.from(new Set(allTabIds.filter(function (id) {
|
|
39740
39742
|
return !(hidePremiumTab && id === 'premium');
|
|
39741
|
-
});
|
|
39742
|
-
if (defaultActiveTab &&
|
|
39743
|
+
})));
|
|
39744
|
+
if (defaultActiveTab && validTabs.includes(defaultActiveTab)) {
|
|
39743
39745
|
return defaultActiveTab;
|
|
39744
39746
|
}
|
|
39745
|
-
return (
|
|
39747
|
+
return (_validTabs$ = validTabs[0]) != null ? _validTabs$ : hidePremiumTab ? 'items' : 'premium';
|
|
39746
39748
|
}),
|
|
39747
39749
|
activeTab = _useState2[0],
|
|
39748
39750
|
setActiveTab = _useState2[1];
|
|
@@ -39995,7 +39997,7 @@ var Store = function Store(_ref) {
|
|
|
39995
39997
|
},
|
|
39996
39998
|
characters: {
|
|
39997
39999
|
id: 'characters',
|
|
39998
|
-
title: '
|
|
40000
|
+
title: 'Char Trade',
|
|
39999
40001
|
icon: React.createElement(FaUsers, {
|
|
40000
40002
|
size: 16
|
|
40001
40003
|
}),
|
|
@@ -40043,8 +40045,8 @@ var Store = function Store(_ref) {
|
|
|
40043
40045
|
return React.createElement(DraggableContainer, {
|
|
40044
40046
|
title: "Store",
|
|
40045
40047
|
onCloseButton: onClose,
|
|
40046
|
-
width: "
|
|
40047
|
-
minWidth: "
|
|
40048
|
+
width: "1000px",
|
|
40049
|
+
minWidth: "700px",
|
|
40048
40050
|
height: "auto",
|
|
40049
40051
|
type: RPGUIContainerTypes.Framed,
|
|
40050
40052
|
cancelDrag: "[class*='Store__Container'], [class*='CartView'], [class*='StoreItemDetails'], .close-button",
|
|
@@ -40063,11 +40065,9 @@ var Store = function Store(_ref) {
|
|
|
40063
40065
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
40064
40066
|
while (1) switch (_context4.prev = _context4.next) {
|
|
40065
40067
|
case 0:
|
|
40066
|
-
|
|
40067
|
-
return handleCartPurchase(_onPurchase4);
|
|
40068
|
-
case 2:
|
|
40068
|
+
handleCartPurchase(_onPurchase4);
|
|
40069
40069
|
return _context4.abrupt("return", true);
|
|
40070
|
-
case
|
|
40070
|
+
case 2:
|
|
40071
40071
|
case "end":
|
|
40072
40072
|
return _context4.stop();
|
|
40073
40073
|
}
|
|
@@ -40152,7 +40152,7 @@ var Store = function Store(_ref) {
|
|
|
40152
40152
|
}
|
|
40153
40153
|
}
|
|
40154
40154
|
} : undefined
|
|
40155
|
-
}), React.createElement(MainContent$1, null, React.createElement(HeaderRow, null, React.createElement(Tabs, {
|
|
40155
|
+
}), React.createElement(MainContent$1, null, React.createElement(HeaderRow, null, React.createElement(TabsFlexWrapper, null, React.createElement(Tabs, {
|
|
40156
40156
|
options: availableTabIds.map(function (id) {
|
|
40157
40157
|
var _tabsMap$id, _tabsMap$id2;
|
|
40158
40158
|
return {
|
|
@@ -40170,7 +40170,7 @@ var Store = function Store(_ref) {
|
|
|
40170
40170
|
_onTabChange(nextTab, itemCount);
|
|
40171
40171
|
}
|
|
40172
40172
|
}
|
|
40173
|
-
}), React.createElement(CartButtonWrapper, null, React.createElement(CTAButton, {
|
|
40173
|
+
})), React.createElement(CartButtonWrapper, null, React.createElement(CTAButton, {
|
|
40174
40174
|
icon: React.createElement(FaShoppingCart, null),
|
|
40175
40175
|
onClick: handleOpenCart
|
|
40176
40176
|
}), getTotalItems() > 0 && React.createElement(CartBadge, null, getTotalItems()))), React.createElement(TabContent, null, (_tabsMap$activeTab = tabsMap[activeTab]) == null ? void 0 : _tabsMap$activeTab.content)), cartItems.length > 0 && React.createElement(Footer$3, null, React.createElement(CartSummary, null, React.createElement(CartInfo, null, React.createElement("span", null, "Items in cart:"), React.createElement("span", null, getTotalItems())), React.createElement(CartInfo, null, React.createElement("span", null, "Total:"), React.createElement("span", null, currencySymbol, getTotalPrice().toFixed(2)))), React.createElement(CTAButton, {
|
|
@@ -40187,50 +40187,54 @@ var Container$Q = /*#__PURE__*/styled.div.withConfig({
|
|
|
40187
40187
|
var HeaderRow = /*#__PURE__*/styled.div.withConfig({
|
|
40188
40188
|
displayName: "Store__HeaderRow",
|
|
40189
40189
|
componentId: "sc-64dj00-1"
|
|
40190
|
-
})(["display:flex;align-items:
|
|
40190
|
+
})(["display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:0.25rem;padding-top:10px;padding-right:12px;"]);
|
|
40191
|
+
var TabsFlexWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
40192
|
+
displayName: "Store__TabsFlexWrapper",
|
|
40193
|
+
componentId: "sc-64dj00-2"
|
|
40194
|
+
})(["flex:1;min-width:0;"]);
|
|
40191
40195
|
var CartButtonWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
40192
40196
|
displayName: "Store__CartButtonWrapper",
|
|
40193
|
-
componentId: "sc-64dj00-
|
|
40194
|
-
})(["position:relative;"]);
|
|
40197
|
+
componentId: "sc-64dj00-3"
|
|
40198
|
+
})(["position:relative;flex-shrink:0;"]);
|
|
40195
40199
|
var CartBadge = /*#__PURE__*/styled.div.withConfig({
|
|
40196
40200
|
displayName: "Store__CartBadge",
|
|
40197
|
-
componentId: "sc-64dj00-
|
|
40201
|
+
componentId: "sc-64dj00-4"
|
|
40198
40202
|
})(["position:absolute;top:-8px;right:-8px;background:#ef4444;color:white;font-family:'Press Start 2P',cursive;font-size:0.5rem;padding:4px;border-radius:50%;border:2px solid #000;display:flex;align-items:center;justify-content:center;min-width:16px;min-height:16px;box-sizing:content-box;"]);
|
|
40199
40203
|
var MainContent$1 = /*#__PURE__*/styled.div.withConfig({
|
|
40200
40204
|
displayName: "Store__MainContent",
|
|
40201
|
-
componentId: "sc-64dj00-
|
|
40205
|
+
componentId: "sc-64dj00-5"
|
|
40202
40206
|
})(["flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;"]);
|
|
40203
40207
|
var TabContent = /*#__PURE__*/styled.div.withConfig({
|
|
40204
40208
|
displayName: "Store__TabContent",
|
|
40205
|
-
componentId: "sc-64dj00-
|
|
40209
|
+
componentId: "sc-64dj00-6"
|
|
40206
40210
|
})(["flex:1;overflow-y:auto;"]);
|
|
40207
40211
|
var Footer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
40208
40212
|
displayName: "Store__Footer",
|
|
40209
|
-
componentId: "sc-64dj00-
|
|
40213
|
+
componentId: "sc-64dj00-7"
|
|
40210
40214
|
})(["display:flex;flex-direction:column;gap:1rem;padding:1rem;border-top:2px solid #f59e0b;background:rgba(0,0,0,0.2);flex-shrink:0;"]);
|
|
40211
40215
|
var CartSummary = /*#__PURE__*/styled.div.withConfig({
|
|
40212
40216
|
displayName: "Store__CartSummary",
|
|
40213
|
-
componentId: "sc-64dj00-
|
|
40217
|
+
componentId: "sc-64dj00-8"
|
|
40214
40218
|
})(["display:flex;flex-direction:column;gap:0.5rem;"]);
|
|
40215
40219
|
var CartInfo = /*#__PURE__*/styled.div.withConfig({
|
|
40216
40220
|
displayName: "Store__CartInfo",
|
|
40217
|
-
componentId: "sc-64dj00-
|
|
40221
|
+
componentId: "sc-64dj00-9"
|
|
40218
40222
|
})(["display:flex;align-items:center;gap:0.75rem;font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;span:last-child{color:#fef08a;}"]);
|
|
40219
40223
|
var TabLabelWithBadge = /*#__PURE__*/styled.span.withConfig({
|
|
40220
40224
|
displayName: "Store__TabLabelWithBadge",
|
|
40221
|
-
componentId: "sc-64dj00-
|
|
40225
|
+
componentId: "sc-64dj00-10"
|
|
40222
40226
|
})(["display:inline-flex;align-items:center;gap:5px;"]);
|
|
40223
40227
|
var LoadingMessage$1 = /*#__PURE__*/styled.div.withConfig({
|
|
40224
40228
|
displayName: "Store__LoadingMessage",
|
|
40225
|
-
componentId: "sc-64dj00-
|
|
40229
|
+
componentId: "sc-64dj00-11"
|
|
40226
40230
|
})(["text-align:center;color:", ";padding:2rem;"], uiColors.white);
|
|
40227
40231
|
var ErrorMessage$3 = /*#__PURE__*/styled.div.withConfig({
|
|
40228
40232
|
displayName: "Store__ErrorMessage",
|
|
40229
|
-
componentId: "sc-64dj00-
|
|
40233
|
+
componentId: "sc-64dj00-12"
|
|
40230
40234
|
})(["text-align:center;color:", ";padding:2rem;"], uiColors.red);
|
|
40231
40235
|
var CenteredContent = /*#__PURE__*/styled.div.withConfig({
|
|
40232
40236
|
displayName: "Store__CenteredContent",
|
|
40233
|
-
componentId: "sc-64dj00-
|
|
40237
|
+
componentId: "sc-64dj00-13"
|
|
40234
40238
|
})(["display:flex;align-items:center;justify-content:center;height:100%;padding:2rem;"]);
|
|
40235
40239
|
|
|
40236
40240
|
var TextArea = function TextArea(_ref) {
|