@rpg-engine/long-bow 0.8.129 → 0.8.130
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/Store.d.ts +2 -1
- package/dist/long-bow.cjs.development.js +50 -88
- 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 +50 -88
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Store/Store.tsx +9 -2
- package/src/components/Store/sections/StorePacksSection.tsx +86 -36
package/dist/long-bow.esm.js
CHANGED
|
@@ -58847,69 +58847,6 @@ var DropdownContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
58847
58847
|
componentId: "sc-l6f466-3"
|
|
58848
58848
|
})(["flex:0.25;min-width:140px;"]);
|
|
58849
58849
|
|
|
58850
|
-
var ShoppingCardHorizontal = function ShoppingCardHorizontal(_ref) {
|
|
58851
|
-
var title = _ref.title,
|
|
58852
|
-
description = _ref.description,
|
|
58853
|
-
imageUrl = _ref.imageUrl,
|
|
58854
|
-
onClick = _ref.onClick,
|
|
58855
|
-
footer = _ref.footer,
|
|
58856
|
-
className = _ref.className;
|
|
58857
|
-
var getImageSrc = function getImageSrc() {
|
|
58858
|
-
if (!imageUrl) return '/placeholder-thumbnail.png';
|
|
58859
|
-
if (typeof imageUrl === 'string') return imageUrl;
|
|
58860
|
-
return imageUrl["default"] || imageUrl.src;
|
|
58861
|
-
};
|
|
58862
|
-
return React.createElement(CardContainer, {
|
|
58863
|
-
onClick: onClick,
|
|
58864
|
-
className: className
|
|
58865
|
-
}, React.createElement(LeftSection, null, imageUrl && React.createElement(CardThumbnail, null, React.createElement("img", {
|
|
58866
|
-
src: getImageSrc(),
|
|
58867
|
-
alt: title
|
|
58868
|
-
}))), React.createElement(RightSection, null, React.createElement(CardTitle, null, React.createElement(Ellipsis, {
|
|
58869
|
-
maxLines: 1,
|
|
58870
|
-
maxWidth: "100%"
|
|
58871
|
-
}, title)), React.createElement(CardDescription, null, React.createElement(Ellipsis, {
|
|
58872
|
-
maxLines: 3,
|
|
58873
|
-
maxWidth: "100%"
|
|
58874
|
-
}, description)), footer && React.createElement(CardFooter, {
|
|
58875
|
-
onClick: function onClick(e) {
|
|
58876
|
-
return e.stopPropagation();
|
|
58877
|
-
}
|
|
58878
|
-
}, footer)));
|
|
58879
|
-
};
|
|
58880
|
-
var CardContainer = /*#__PURE__*/styled.div.withConfig({
|
|
58881
|
-
displayName: "CartCardHorizontal__CardContainer",
|
|
58882
|
-
componentId: "sc-ngkh06-0"
|
|
58883
|
-
})(["display:flex;background:rgba(0,0,0,0.3);border-radius:4px;border:1px solid ", ";cursor:", ";transition:transform 0.2s ease;&:hover{transform:", ";}max-width:380px;"], uiColors.darkGray, function (props) {
|
|
58884
|
-
return props.onClick ? 'pointer' : 'default';
|
|
58885
|
-
}, function (props) {
|
|
58886
|
-
return props.onClick ? 'translateY(-2px)' : 'none';
|
|
58887
|
-
});
|
|
58888
|
-
var LeftSection = /*#__PURE__*/styled.div.withConfig({
|
|
58889
|
-
displayName: "CartCardHorizontal__LeftSection",
|
|
58890
|
-
componentId: "sc-ngkh06-1"
|
|
58891
|
-
})(["width:120px;flex-shrink:0;"]);
|
|
58892
|
-
var RightSection = /*#__PURE__*/styled.div.withConfig({
|
|
58893
|
-
displayName: "CartCardHorizontal__RightSection",
|
|
58894
|
-
componentId: "sc-ngkh06-2"
|
|
58895
|
-
})(["flex:1;display:flex;flex-direction:column;padding:12px;min-width:0;max-width:100%;"]);
|
|
58896
|
-
var CardThumbnail = /*#__PURE__*/styled.div.withConfig({
|
|
58897
|
-
displayName: "CartCardHorizontal__CardThumbnail",
|
|
58898
|
-
componentId: "sc-ngkh06-3"
|
|
58899
|
-
})(["width:100%;height:100%;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
58900
|
-
var CardTitle = /*#__PURE__*/styled.h3.withConfig({
|
|
58901
|
-
displayName: "CartCardHorizontal__CardTitle",
|
|
58902
|
-
componentId: "sc-ngkh06-4"
|
|
58903
|
-
})(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;"], uiColors.yellow);
|
|
58904
|
-
var CardDescription = /*#__PURE__*/styled.p.withConfig({
|
|
58905
|
-
displayName: "CartCardHorizontal__CardDescription",
|
|
58906
|
-
componentId: "sc-ngkh06-5"
|
|
58907
|
-
})(["margin:0;font-size:0.55rem;color:", ";font-family:'Press Start 2P',cursive;line-height:1.4;margin-bottom:8px;"], uiColors.lightGray);
|
|
58908
|
-
var CardFooter = /*#__PURE__*/styled.div.withConfig({
|
|
58909
|
-
displayName: "CartCardHorizontal__CardFooter",
|
|
58910
|
-
componentId: "sc-ngkh06-6"
|
|
58911
|
-
})(["margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.1);"]);
|
|
58912
|
-
|
|
58913
58850
|
var usePackFiltering = function usePackFiltering(packs) {
|
|
58914
58851
|
var _useState = useState(''),
|
|
58915
58852
|
searchQuery = _useState[0],
|
|
@@ -58934,28 +58871,28 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
58934
58871
|
searchQuery = _usePackFiltering.searchQuery,
|
|
58935
58872
|
setSearchQuery = _usePackFiltering.setSearchQuery,
|
|
58936
58873
|
filteredPacks = _usePackFiltering.filteredPacks;
|
|
58937
|
-
var
|
|
58938
|
-
|
|
58874
|
+
var getImageSrc = function getImageSrc(imageUrl) {
|
|
58875
|
+
if (typeof imageUrl === 'string') return imageUrl;
|
|
58876
|
+
return imageUrl["default"] || imageUrl.src;
|
|
58877
|
+
};
|
|
58878
|
+
var renderPack = useCallback(function (pack) {
|
|
58879
|
+
return React.createElement(PackRow, {
|
|
58880
|
+
key: pack.key,
|
|
58881
|
+
onClick: function onClick() {
|
|
58882
|
+
return onSelectPack == null ? void 0 : onSelectPack(pack);
|
|
58883
|
+
}
|
|
58884
|
+
}, React.createElement(PackIconContainer, null, React.createElement("img", {
|
|
58885
|
+
src: getImageSrc(pack.image),
|
|
58886
|
+
alt: pack.title
|
|
58887
|
+
})), React.createElement(PackDetails, null, React.createElement(PackName, null, pack.title), React.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React.createElement(PackDescription, null, pack.description)), React.createElement(Controls$2, null, React.createElement(CTAButton, {
|
|
58939
58888
|
icon: React.createElement(FaCartPlus, null),
|
|
58940
58889
|
label: "Add",
|
|
58941
58890
|
onClick: function onClick(e) {
|
|
58942
58891
|
e.stopPropagation();
|
|
58943
58892
|
onAddToCart(pack);
|
|
58944
58893
|
}
|
|
58945
|
-
}));
|
|
58946
|
-
}, [onAddToCart]);
|
|
58947
|
-
var renderPack = useCallback(function (pack) {
|
|
58948
|
-
return React.createElement(ShoppingCardHorizontal, {
|
|
58949
|
-
key: pack.key,
|
|
58950
|
-
title: pack.title,
|
|
58951
|
-
description: pack.description,
|
|
58952
|
-
imageUrl: pack.image,
|
|
58953
|
-
footer: renderPackFooter(pack),
|
|
58954
|
-
onClick: function onClick() {
|
|
58955
|
-
return onSelectPack == null ? void 0 : onSelectPack(pack);
|
|
58956
|
-
}
|
|
58957
|
-
});
|
|
58958
|
-
}, [onSelectPack, renderPackFooter]);
|
|
58894
|
+
})));
|
|
58895
|
+
}, [onSelectPack, onAddToCart]);
|
|
58959
58896
|
return React.createElement(ScrollableContent, {
|
|
58960
58897
|
items: filteredPacks,
|
|
58961
58898
|
renderItem: renderPack,
|
|
@@ -58965,19 +58902,38 @@ var StorePacksSection = function StorePacksSection(_ref) {
|
|
|
58965
58902
|
onChange: setSearchQuery,
|
|
58966
58903
|
placeholder: 'Search packs...'
|
|
58967
58904
|
},
|
|
58968
|
-
layout: "
|
|
58969
|
-
gridColumns: 2,
|
|
58905
|
+
layout: "list",
|
|
58970
58906
|
maxHeight: "420px"
|
|
58971
58907
|
});
|
|
58972
58908
|
};
|
|
58973
|
-
var
|
|
58974
|
-
displayName: "
|
|
58909
|
+
var PackRow = /*#__PURE__*/styled.div.withConfig({
|
|
58910
|
+
displayName: "StorePacksSection__PackRow",
|
|
58975
58911
|
componentId: "sc-ulazq3-0"
|
|
58976
|
-
})(["display:flex;align-items:center;
|
|
58977
|
-
var
|
|
58978
|
-
displayName: "
|
|
58912
|
+
})(["display:flex;align-items:center;gap:0.75rem;padding:0.5rem 1rem;border-bottom:1px solid rgba(255,255,255,0.1);cursor:pointer;&:last-child{border-bottom:none;}&:hover{background:rgba(255,255,255,0.04);}"]);
|
|
58913
|
+
var PackIconContainer = /*#__PURE__*/styled.div.withConfig({
|
|
58914
|
+
displayName: "StorePacksSection__PackIconContainer",
|
|
58979
58915
|
componentId: "sc-ulazq3-1"
|
|
58980
|
-
})(["
|
|
58916
|
+
})(["width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;img{width:100%;height:100%;object-fit:cover;}"]);
|
|
58917
|
+
var PackDetails = /*#__PURE__*/styled.div.withConfig({
|
|
58918
|
+
displayName: "StorePacksSection__PackDetails",
|
|
58919
|
+
componentId: "sc-ulazq3-2"
|
|
58920
|
+
})(["flex:1;display:flex;flex-direction:column;gap:0.25rem;min-width:0;"]);
|
|
58921
|
+
var PackName = /*#__PURE__*/styled.div.withConfig({
|
|
58922
|
+
displayName: "StorePacksSection__PackName",
|
|
58923
|
+
componentId: "sc-ulazq3-3"
|
|
58924
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
|
|
58925
|
+
var PackPrice = /*#__PURE__*/styled.div.withConfig({
|
|
58926
|
+
displayName: "StorePacksSection__PackPrice",
|
|
58927
|
+
componentId: "sc-ulazq3-4"
|
|
58928
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
|
|
58929
|
+
var PackDescription = /*#__PURE__*/styled.div.withConfig({
|
|
58930
|
+
displayName: "StorePacksSection__PackDescription",
|
|
58931
|
+
componentId: "sc-ulazq3-5"
|
|
58932
|
+
})(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:rgba(255,255,255,0.7);line-height:1.4;"]);
|
|
58933
|
+
var Controls$2 = /*#__PURE__*/styled.div.withConfig({
|
|
58934
|
+
displayName: "StorePacksSection__Controls",
|
|
58935
|
+
componentId: "sc-ulazq3-6"
|
|
58936
|
+
})(["display:flex;align-items:center;flex-shrink:0;"]);
|
|
58981
58937
|
|
|
58982
58938
|
var StoreItemDetails = function StoreItemDetails(_ref) {
|
|
58983
58939
|
var item = _ref.item,
|
|
@@ -59067,7 +59023,8 @@ var Store = function Store(_ref) {
|
|
|
59067
59023
|
defaultActiveTab = _ref.defaultActiveTab,
|
|
59068
59024
|
_ref$textInputItemKey = _ref.textInputItemKeys,
|
|
59069
59025
|
textInputItemKeys = _ref$textInputItemKey === void 0 ? [] : _ref$textInputItemKey,
|
|
59070
|
-
customPacksContent = _ref.customPacksContent
|
|
59026
|
+
customPacksContent = _ref.customPacksContent,
|
|
59027
|
+
customWalletContent = _ref.customWalletContent;
|
|
59071
59028
|
var _useState = useState(null),
|
|
59072
59029
|
selectedPack = _useState[0],
|
|
59073
59030
|
setSelectedPack = _useState[1];
|
|
@@ -59211,6 +59168,11 @@ var Store = function Store(_ref) {
|
|
|
59211
59168
|
userAccountType: userAccountType,
|
|
59212
59169
|
textInputItemKeys: textInputItemKeys
|
|
59213
59170
|
})
|
|
59171
|
+
},
|
|
59172
|
+
wallet: {
|
|
59173
|
+
id: 'wallet',
|
|
59174
|
+
title: 'Wallet',
|
|
59175
|
+
content: customWalletContent != null ? customWalletContent : null
|
|
59214
59176
|
}
|
|
59215
59177
|
};
|
|
59216
59178
|
var tabs = availableTabIds.map(function (id) {
|