@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.
@@ -1,6 +1,6 @@
1
1
  import { IItemPack, IPurchase, IProductBlueprint, UserAccountTypes } from '@rpg-engine/shared';
2
2
  import React from 'react';
3
- declare type TabId = 'premium' | 'packs' | 'items';
3
+ declare type TabId = 'premium' | 'packs' | 'items' | 'wallet';
4
4
  export interface IStoreProps {
5
5
  items: IProductBlueprint[];
6
6
  packs?: IItemPack[];
@@ -17,6 +17,7 @@ export interface IStoreProps {
17
17
  defaultActiveTab?: TabId;
18
18
  textInputItemKeys?: string[];
19
19
  customPacksContent?: React.ReactNode;
20
+ customWalletContent?: React.ReactNode;
20
21
  }
21
22
  export declare const Store: React.FC<IStoreProps>;
22
23
  export {};
@@ -58850,69 +58850,6 @@ var DropdownContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
58850
58850
  componentId: "sc-l6f466-3"
58851
58851
  })(["flex:0.25;min-width:140px;"]);
58852
58852
 
58853
- var ShoppingCardHorizontal = function ShoppingCardHorizontal(_ref) {
58854
- var title = _ref.title,
58855
- description = _ref.description,
58856
- imageUrl = _ref.imageUrl,
58857
- onClick = _ref.onClick,
58858
- footer = _ref.footer,
58859
- className = _ref.className;
58860
- var getImageSrc = function getImageSrc() {
58861
- if (!imageUrl) return '/placeholder-thumbnail.png';
58862
- if (typeof imageUrl === 'string') return imageUrl;
58863
- return imageUrl["default"] || imageUrl.src;
58864
- };
58865
- return React__default.createElement(CardContainer, {
58866
- onClick: onClick,
58867
- className: className
58868
- }, React__default.createElement(LeftSection, null, imageUrl && React__default.createElement(CardThumbnail, null, React__default.createElement("img", {
58869
- src: getImageSrc(),
58870
- alt: title
58871
- }))), React__default.createElement(RightSection, null, React__default.createElement(CardTitle, null, React__default.createElement(Ellipsis, {
58872
- maxLines: 1,
58873
- maxWidth: "100%"
58874
- }, title)), React__default.createElement(CardDescription, null, React__default.createElement(Ellipsis, {
58875
- maxLines: 3,
58876
- maxWidth: "100%"
58877
- }, description)), footer && React__default.createElement(CardFooter, {
58878
- onClick: function onClick(e) {
58879
- return e.stopPropagation();
58880
- }
58881
- }, footer)));
58882
- };
58883
- var CardContainer = /*#__PURE__*/styled__default.div.withConfig({
58884
- displayName: "CartCardHorizontal__CardContainer",
58885
- componentId: "sc-ngkh06-0"
58886
- })(["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) {
58887
- return props.onClick ? 'pointer' : 'default';
58888
- }, function (props) {
58889
- return props.onClick ? 'translateY(-2px)' : 'none';
58890
- });
58891
- var LeftSection = /*#__PURE__*/styled__default.div.withConfig({
58892
- displayName: "CartCardHorizontal__LeftSection",
58893
- componentId: "sc-ngkh06-1"
58894
- })(["width:120px;flex-shrink:0;"]);
58895
- var RightSection = /*#__PURE__*/styled__default.div.withConfig({
58896
- displayName: "CartCardHorizontal__RightSection",
58897
- componentId: "sc-ngkh06-2"
58898
- })(["flex:1;display:flex;flex-direction:column;padding:12px;min-width:0;max-width:100%;"]);
58899
- var CardThumbnail = /*#__PURE__*/styled__default.div.withConfig({
58900
- displayName: "CartCardHorizontal__CardThumbnail",
58901
- componentId: "sc-ngkh06-3"
58902
- })(["width:100%;height:100%;background:rgba(0,0,0,0.2);overflow:hidden;img{width:100%;height:100%;object-fit:cover;}"]);
58903
- var CardTitle = /*#__PURE__*/styled__default.h3.withConfig({
58904
- displayName: "CartCardHorizontal__CardTitle",
58905
- componentId: "sc-ngkh06-4"
58906
- })(["margin:0;font-size:0.6rem;color:", ";font-family:'Press Start 2P',cursive;margin-bottom:8px;"], uiColors.yellow);
58907
- var CardDescription = /*#__PURE__*/styled__default.p.withConfig({
58908
- displayName: "CartCardHorizontal__CardDescription",
58909
- componentId: "sc-ngkh06-5"
58910
- })(["margin:0;font-size:0.55rem;color:", ";font-family:'Press Start 2P',cursive;line-height:1.4;margin-bottom:8px;"], uiColors.lightGray);
58911
- var CardFooter = /*#__PURE__*/styled__default.div.withConfig({
58912
- displayName: "CartCardHorizontal__CardFooter",
58913
- componentId: "sc-ngkh06-6"
58914
- })(["margin-top:auto;padding-top:8px;border-top:1px solid rgba(255,255,255,0.1);"]);
58915
-
58916
58853
  var usePackFiltering = function usePackFiltering(packs) {
58917
58854
  var _useState = React.useState(''),
58918
58855
  searchQuery = _useState[0],
@@ -58937,28 +58874,28 @@ var StorePacksSection = function StorePacksSection(_ref) {
58937
58874
  searchQuery = _usePackFiltering.searchQuery,
58938
58875
  setSearchQuery = _usePackFiltering.setSearchQuery,
58939
58876
  filteredPacks = _usePackFiltering.filteredPacks;
58940
- var renderPackFooter = React.useCallback(function (pack) {
58941
- return React__default.createElement(FooterContainer, null, React__default.createElement(Price, null, "$", pack.priceUSD), React__default.createElement(CTAButton, {
58877
+ var getImageSrc = function getImageSrc(imageUrl) {
58878
+ if (typeof imageUrl === 'string') return imageUrl;
58879
+ return imageUrl["default"] || imageUrl.src;
58880
+ };
58881
+ var renderPack = React.useCallback(function (pack) {
58882
+ return React__default.createElement(PackRow, {
58883
+ key: pack.key,
58884
+ onClick: function onClick() {
58885
+ return onSelectPack == null ? void 0 : onSelectPack(pack);
58886
+ }
58887
+ }, React__default.createElement(PackIconContainer, null, React__default.createElement("img", {
58888
+ src: getImageSrc(pack.image),
58889
+ alt: pack.title
58890
+ })), React__default.createElement(PackDetails, null, React__default.createElement(PackName, null, pack.title), React__default.createElement(PackPrice, null, "$", pack.priceUSD), pack.description && React__default.createElement(PackDescription, null, pack.description)), React__default.createElement(Controls$2, null, React__default.createElement(CTAButton, {
58942
58891
  icon: React__default.createElement(fa.FaCartPlus, null),
58943
58892
  label: "Add",
58944
58893
  onClick: function onClick(e) {
58945
58894
  e.stopPropagation();
58946
58895
  onAddToCart(pack);
58947
58896
  }
58948
- }));
58949
- }, [onAddToCart]);
58950
- var renderPack = React.useCallback(function (pack) {
58951
- return React__default.createElement(ShoppingCardHorizontal, {
58952
- key: pack.key,
58953
- title: pack.title,
58954
- description: pack.description,
58955
- imageUrl: pack.image,
58956
- footer: renderPackFooter(pack),
58957
- onClick: function onClick() {
58958
- return onSelectPack == null ? void 0 : onSelectPack(pack);
58959
- }
58960
- });
58961
- }, [onSelectPack, renderPackFooter]);
58897
+ })));
58898
+ }, [onSelectPack, onAddToCart]);
58962
58899
  return React__default.createElement(ScrollableContent, {
58963
58900
  items: filteredPacks,
58964
58901
  renderItem: renderPack,
@@ -58968,19 +58905,38 @@ var StorePacksSection = function StorePacksSection(_ref) {
58968
58905
  onChange: setSearchQuery,
58969
58906
  placeholder: 'Search packs...'
58970
58907
  },
58971
- layout: "grid",
58972
- gridColumns: 2,
58908
+ layout: "list",
58973
58909
  maxHeight: "420px"
58974
58910
  });
58975
58911
  };
58976
- var FooterContainer = /*#__PURE__*/styled__default.div.withConfig({
58977
- displayName: "StorePacksSection__FooterContainer",
58912
+ var PackRow = /*#__PURE__*/styled__default.div.withConfig({
58913
+ displayName: "StorePacksSection__PackRow",
58978
58914
  componentId: "sc-ulazq3-0"
58979
- })(["display:flex;align-items:center;justify-content:space-between;gap:8px;"]);
58980
- var Price = /*#__PURE__*/styled__default.span.withConfig({
58981
- displayName: "StorePacksSection__Price",
58915
+ })(["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);}"]);
58916
+ var PackIconContainer = /*#__PURE__*/styled__default.div.withConfig({
58917
+ displayName: "StorePacksSection__PackIconContainer",
58982
58918
  componentId: "sc-ulazq3-1"
58983
- })(["font-family:'Press Start 2P',cursive;font-size:0.6rem;color:#fef08a;"]);
58919
+ })(["width:40px;height:40px;flex-shrink:0;display:flex;align-items:center;justify-content:center;img{width:100%;height:100%;object-fit:cover;}"]);
58920
+ var PackDetails = /*#__PURE__*/styled__default.div.withConfig({
58921
+ displayName: "StorePacksSection__PackDetails",
58922
+ componentId: "sc-ulazq3-2"
58923
+ })(["flex:1;display:flex;flex-direction:column;gap:0.25rem;min-width:0;"]);
58924
+ var PackName = /*#__PURE__*/styled__default.div.withConfig({
58925
+ displayName: "StorePacksSection__PackName",
58926
+ componentId: "sc-ulazq3-3"
58927
+ })(["font-family:'Press Start 2P',cursive;font-size:0.75rem;color:#ffffff;"]);
58928
+ var PackPrice = /*#__PURE__*/styled__default.div.withConfig({
58929
+ displayName: "StorePacksSection__PackPrice",
58930
+ componentId: "sc-ulazq3-4"
58931
+ })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:#fef08a;"]);
58932
+ var PackDescription = /*#__PURE__*/styled__default.div.withConfig({
58933
+ displayName: "StorePacksSection__PackDescription",
58934
+ componentId: "sc-ulazq3-5"
58935
+ })(["font-family:'Press Start 2P',cursive;font-size:0.625rem;color:rgba(255,255,255,0.7);line-height:1.4;"]);
58936
+ var Controls$2 = /*#__PURE__*/styled__default.div.withConfig({
58937
+ displayName: "StorePacksSection__Controls",
58938
+ componentId: "sc-ulazq3-6"
58939
+ })(["display:flex;align-items:center;flex-shrink:0;"]);
58984
58940
 
58985
58941
  var StoreItemDetails = function StoreItemDetails(_ref) {
58986
58942
  var item = _ref.item,
@@ -59070,7 +59026,8 @@ var Store = function Store(_ref) {
59070
59026
  defaultActiveTab = _ref.defaultActiveTab,
59071
59027
  _ref$textInputItemKey = _ref.textInputItemKeys,
59072
59028
  textInputItemKeys = _ref$textInputItemKey === void 0 ? [] : _ref$textInputItemKey,
59073
- customPacksContent = _ref.customPacksContent;
59029
+ customPacksContent = _ref.customPacksContent,
59030
+ customWalletContent = _ref.customWalletContent;
59074
59031
  var _useState = React.useState(null),
59075
59032
  selectedPack = _useState[0],
59076
59033
  setSelectedPack = _useState[1];
@@ -59214,6 +59171,11 @@ var Store = function Store(_ref) {
59214
59171
  userAccountType: userAccountType,
59215
59172
  textInputItemKeys: textInputItemKeys
59216
59173
  })
59174
+ },
59175
+ wallet: {
59176
+ id: 'wallet',
59177
+ title: 'Wallet',
59178
+ content: customWalletContent != null ? customWalletContent : null
59217
59179
  }
59218
59180
  };
59219
59181
  var tabs = availableTabIds.map(function (id) {