@rpg-engine/long-bow 0.8.233 → 0.8.235

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.
Files changed (25) hide show
  1. package/dist/components/DCWallet/DCTransferPanel.d.ts +3 -0
  2. package/dist/components/DCWallet/DCWalletContent.d.ts +3 -0
  3. package/dist/components/Marketplace/CharacterListingModal.d.ts +1 -0
  4. package/dist/components/Marketplace/CharacterTradePanel.d.ts +1 -0
  5. package/dist/components/Marketplace/ManagmentPanel.d.ts +1 -0
  6. package/dist/components/Marketplace/Marketplace.d.ts +1 -0
  7. package/dist/components/Marketplace/MyCharacterListingsPanel.d.ts +1 -0
  8. package/dist/long-bow.cjs.development.js +86 -50
  9. package/dist/long-bow.cjs.development.js.map +1 -1
  10. package/dist/long-bow.cjs.production.min.js +1 -1
  11. package/dist/long-bow.cjs.production.min.js.map +1 -1
  12. package/dist/long-bow.esm.js +86 -50
  13. package/dist/long-bow.esm.js.map +1 -1
  14. package/package.json +1 -1
  15. package/src/components/DCWallet/DCTransferPanel.tsx +34 -4
  16. package/src/components/DCWallet/DCWalletContent.tsx +9 -1
  17. package/src/components/DCWallet/__test__/DCTransferPanel.spec.tsx +115 -0
  18. package/src/components/Marketplace/CharacterListingModal.tsx +16 -0
  19. package/src/components/Marketplace/CharacterTradePanel.tsx +3 -0
  20. package/src/components/Marketplace/ManagmentPanel.tsx +26 -1
  21. package/src/components/Marketplace/Marketplace.tsx +2 -1
  22. package/src/components/Marketplace/MyCharacterListingsPanel.tsx +3 -0
  23. package/src/components/Marketplace/__test__/CharacterListingModal.spec.tsx +114 -0
  24. package/src/components/Marketplace/__test__/ManagmentPanel.spec.tsx +119 -0
  25. package/src/stories/Features/trading/Marketplace.stories.tsx +2 -1
@@ -5843,7 +5843,9 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
5843
5843
  onInputFocus = _ref.onInputFocus,
5844
5844
  onInputBlur = _ref.onInputBlur,
5845
5845
  onSearchCharacter = _ref.onSearchCharacter,
5846
- searchResults = _ref.searchResults;
5846
+ searchResults = _ref.searchResults,
5847
+ _ref$feePercent = _ref.feePercent,
5848
+ feePercent = _ref$feePercent === void 0 ? 0 : _ref$feePercent;
5847
5849
  var _useState = useState(''),
5848
5850
  recipientName = _useState[0],
5849
5851
  setRecipientName = _useState[1];
@@ -5903,7 +5905,8 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
5903
5905
  setValidationError('Amount must be a positive integer.');
5904
5906
  return false;
5905
5907
  }
5906
- if (parsedAmount > dcBalance) {
5908
+ var fee = Math.floor(parsedAmount * feePercent);
5909
+ if (parsedAmount + fee > dcBalance) {
5907
5910
  setValidationError('Insufficient DC balance.');
5908
5911
  return false;
5909
5912
  }
@@ -5913,13 +5916,16 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
5913
5916
  var handleSendClick = useCallback(function () {
5914
5917
  if (!validate()) return;
5915
5918
  setShowConfirm(true);
5916
- }, [recipientName, amount, dcBalance, characterName]);
5919
+ }, [recipientName, amount, dcBalance, characterName, feePercent]);
5917
5920
  var handleConfirmTransfer = useCallback(function () {
5918
5921
  setShowConfirm(false);
5919
5922
  onSendTransfer(recipientName.trim(), parseInt(amount, 10));
5920
5923
  setRecipientName('');
5921
5924
  setAmount('');
5922
5925
  }, [recipientName, amount, onSendTransfer]);
5926
+ var transferAmount = parseInt(amount, 10);
5927
+ var transferFee = Math.floor(transferAmount * feePercent);
5928
+ var transferTotal = transferAmount + transferFee;
5923
5929
  return React.createElement(PanelContainer$1, null, React.createElement(FieldLabel, null, "Recipient Character Name"), React.createElement(AutocompleteWrapper, {
5924
5930
  ref: dropdownRef
5925
5931
  }, React.createElement(StyledInput, {
@@ -5965,7 +5971,7 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
5965
5971
  onBlur: onInputBlur,
5966
5972
  placeholder: "0",
5967
5973
  disabled: transferLoading
5968
- }), validationError && React.createElement(ErrorMessage, null, validationError), React.createElement(ButtonRow, null, React.createElement(CTAButton, {
5974
+ }), feePercent > 0 && React.createElement(FeeDisclosure, null, feePercent * 100, "% transfer fee is added to the sender debit."), validationError && React.createElement(ErrorMessage, null, validationError), React.createElement(ButtonRow, null, React.createElement(CTAButton, {
5969
5975
  icon: React.createElement(FaPaperPlane, null),
5970
5976
  label: transferLoading ? 'Sending...' : 'Send',
5971
5977
  onClick: handleSendClick,
@@ -5973,8 +5979,8 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
5973
5979
  fullWidth: true
5974
5980
  })), transferLoading && React.createElement(Spinner$1, null), transferResult && React.createElement(ResultMessage, {
5975
5981
  "$success": transferResult.success
5976
- }, transferResult.message), showConfirm && React.createElement(ConfirmModal, {
5977
- message: "Transfer " + parseInt(amount, 10) + " DC to \"" + recipientName.trim() + "\"?",
5982
+ }, transferResult.message, !!transferResult.fee && " \xB7 " + transferResult.fee.toLocaleString() + " DC fee"), showConfirm && React.createElement(ConfirmModal, {
5983
+ message: feePercent > 0 ? "Transfer " + transferAmount.toLocaleString() + " DC to \"" + recipientName.trim() + "\"? Fee: " + transferFee.toLocaleString() + " DC \xB7 Total: " + transferTotal.toLocaleString() + " DC" : "Transfer " + transferAmount.toLocaleString() + " DC to \"" + recipientName.trim() + "\"?",
5978
5984
  onConfirm: handleConfirmTransfer,
5979
5985
  onClose: function onClose() {
5980
5986
  return setShowConfirm(false);
@@ -6015,17 +6021,21 @@ var ErrorMessage = /*#__PURE__*/styled.div.withConfig({
6015
6021
  displayName: "DCTransferPanel__ErrorMessage",
6016
6022
  componentId: "sc-k1vvb1-6"
6017
6023
  })(["font-size:9px !important;color:", " !important;font-family:'Press Start 2P',cursive !important;"], uiColors.red);
6024
+ var FeeDisclosure = /*#__PURE__*/styled.p.withConfig({
6025
+ displayName: "DCTransferPanel__FeeDisclosure",
6026
+ componentId: "sc-k1vvb1-7"
6027
+ })(["margin:0;color:rgba(254,240,138,0.65);font-size:7px !important;line-height:1.4 !important;"]);
6018
6028
  var AutocompleteWrapper = /*#__PURE__*/styled.div.withConfig({
6019
6029
  displayName: "DCTransferPanel__AutocompleteWrapper",
6020
- componentId: "sc-k1vvb1-7"
6030
+ componentId: "sc-k1vvb1-8"
6021
6031
  })(["position:relative;width:100%;"]);
6022
6032
  var DropdownList = /*#__PURE__*/styled.ul.withConfig({
6023
6033
  displayName: "DCTransferPanel__DropdownList",
6024
- componentId: "sc-k1vvb1-8"
6034
+ componentId: "sc-k1vvb1-9"
6025
6035
  })(["position:absolute;top:100%;left:0;right:0;background:rgba(10,10,30,0.95);border:1px solid #f59e0b;border-top:none;list-style:none;padding:0;margin:0;max-height:120px;overflow-y:auto;z-index:10;"]);
6026
6036
  var DropdownItem = /*#__PURE__*/styled.li.withConfig({
6027
6037
  displayName: "DCTransferPanel__DropdownItem",
6028
- componentId: "sc-k1vvb1-9"
6038
+ componentId: "sc-k1vvb1-10"
6029
6039
  })(["padding:6px 8px;font-size:11px;font-family:'Press Start 2P',cursive;color:", ";cursor:pointer;&:hover{background:rgba(245,158,11,0.3);}"], uiColors.white);
6030
6040
 
6031
6041
  var DC_TO_USD$1 = 100;
@@ -6044,7 +6054,9 @@ var DCWalletContent = function DCWalletContent(_ref) {
6044
6054
  onInputBlur = _ref.onInputBlur,
6045
6055
  onBuyDC = _ref.onBuyDC,
6046
6056
  onSearchCharacter = _ref.onSearchCharacter,
6047
- searchResults = _ref.searchResults;
6057
+ searchResults = _ref.searchResults,
6058
+ _ref$feePercent = _ref.feePercent,
6059
+ feePercent = _ref$feePercent === void 0 ? 0 : _ref$feePercent;
6048
6060
  var usdValue = (dcBalance / DC_TO_USD$1).toFixed(2);
6049
6061
  var tabs = [{
6050
6062
  id: 'transfer',
@@ -6053,6 +6065,7 @@ var DCWalletContent = function DCWalletContent(_ref) {
6053
6065
  dcBalance: dcBalance,
6054
6066
  transferLoading: transferLoading,
6055
6067
  transferResult: transferResult,
6068
+ feePercent: feePercent,
6056
6069
  onSendTransfer: onSendTransfer,
6057
6070
  onClearTransferResult: onClearTransferResult,
6058
6071
  characterName: characterName,
@@ -13060,7 +13073,9 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
13060
13073
  onMoneyWithdraw = _ref.onMoneyWithdraw,
13061
13074
  currentPage = _ref.currentPage,
13062
13075
  _ref$dcToGoldSwapRate = _ref.dcToGoldSwapRate,
13063
- dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate;
13076
+ dcToGoldSwapRate = _ref$dcToGoldSwapRate === void 0 ? 0 : _ref$dcToGoldSwapRate,
13077
+ _ref$commissionPercen = _ref.commissionPercent,
13078
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
13064
13079
  var _useState = useState(''),
13065
13080
  price = _useState[0],
13066
13081
  setPrice = _useState[1];
@@ -13078,6 +13093,10 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
13078
13093
  var _itemsContainer$curre;
13079
13094
  (_itemsContainer$curre = itemsContainer.current) == null ? void 0 : _itemsContainer$curre.scrollTo(0, 0);
13080
13095
  }, [currentPage]);
13096
+ var parsedPrice = Number(price);
13097
+ var netGoldProceeds = parsedPrice - Math.floor(parsedPrice * commissionPercent);
13098
+ var netDCProceeds = goldToDC(netGoldProceeds);
13099
+ var netProceedsLabel = listingCurrency === MarketplaceAcceptedCurrency.Gold ? netGoldProceeds.toLocaleString() + " gold" : listingCurrency === MarketplaceAcceptedCurrency.Dc ? formatDCAmount(netDCProceeds) + " DC" : netGoldProceeds.toLocaleString() + " gold or " + formatDCAmount(netDCProceeds) + " DC";
13081
13100
  return React.createElement(React.Fragment, null, isCreatingOffer && React.createElement(ConfirmModal, {
13082
13101
  onClose: setIsCreatingOffer.bind(null, false),
13083
13102
  onConfirm: function onConfirm() {
@@ -13151,7 +13170,7 @@ var ManagmentPanel = function ManagmentPanel(_ref) {
13151
13170
  setIsCreatingOffer(true);
13152
13171
  }
13153
13172
  }
13154
- })), React.createElement(CurrencyToggleRow, null, React.createElement(CurrencyToggleLabel, null, "Accept:"), LISTING_CURRENCY_OPTIONS.map(function (opt) {
13173
+ })), price && Number(price) > 0 && commissionPercent > 0 && React.createElement(NetProceeds, null, "You'll receive: ", netProceedsLabel, ' ', "(after ", commissionPercent * 100, "% commission)"), React.createElement(CurrencyToggleRow, null, React.createElement(CurrencyToggleLabel, null, "Accept:"), LISTING_CURRENCY_OPTIONS.map(function (opt) {
13155
13174
  return React.createElement(CurrencyToggleButton, {
13156
13175
  key: opt.value,
13157
13176
  "$active": listingCurrency === opt.value,
@@ -13236,48 +13255,52 @@ var SellDescription = /*#__PURE__*/styled.p.withConfig({
13236
13255
  var PriceInputWrapper = /*#__PURE__*/styled.div.withConfig({
13237
13256
  displayName: "ManagmentPanel__PriceInputWrapper",
13238
13257
  componentId: "sc-1yyi6jn-5"
13239
- })(["display:flex;flex-direction:column;flex-grow:1;p{margin:0 0 8px 0;font-size:0.6rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;}.price-input{width:60px;height:32px;flex-grow:1;font-size:0.7rem;}.offer-btn{padding:10px 14px;height:32px;}"]);
13258
+ })(["display:flex;flex-direction:column;flex-grow:1;> p:first-child{margin:0 0 8px 0;font-size:0.6rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;}.price-input{width:60px;height:32px;flex-grow:1;font-size:0.7rem;}.offer-btn{padding:10px 14px;height:32px;}"]);
13259
+ var NetProceeds = /*#__PURE__*/styled.p.withConfig({
13260
+ displayName: "ManagmentPanel__NetProceeds",
13261
+ componentId: "sc-1yyi6jn-6"
13262
+ })(["margin:8px 0 0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
13240
13263
  var GoldIcon$3 = /*#__PURE__*/styled.div.withConfig({
13241
13264
  displayName: "ManagmentPanel__GoldIcon",
13242
- componentId: "sc-1yyi6jn-6"
13265
+ componentId: "sc-1yyi6jn-7"
13243
13266
  })(["position:relative;display:flex;align-items:center;justify-content:center;width:20px;height:20px;margin-right:4px;flex-shrink:0;top:-0.5rem;left:-0.5rem;"]);
13244
13267
  var WealthWrapper = /*#__PURE__*/styled.div.withConfig({
13245
13268
  displayName: "ManagmentPanel__WealthWrapper",
13246
- componentId: "sc-1yyi6jn-7"
13269
+ componentId: "sc-1yyi6jn-8"
13247
13270
  })(["display:flex;flex-direction:column;gap:8px;flex-grow:1;& > :last-child{margin-top:auto;}"]);
13248
13271
  var BalanceRow = /*#__PURE__*/styled.div.withConfig({
13249
13272
  displayName: "ManagmentPanel__BalanceRow",
13250
- componentId: "sc-1yyi6jn-8"
13273
+ componentId: "sc-1yyi6jn-9"
13251
13274
  })(["display:flex;align-items:center;justify-content:flex-end;gap:10px;background:rgba(0,0,0,0.3);border-radius:4px;border:1px solid rgba(255,255,255,0.05);padding:8px 12px;"]);
13252
13275
  var BalanceAmount$1 = /*#__PURE__*/styled.span.withConfig({
13253
13276
  displayName: "ManagmentPanel__BalanceAmount",
13254
- componentId: "sc-1yyi6jn-9"
13277
+ componentId: "sc-1yyi6jn-10"
13255
13278
  })(["font-family:'Press Start 2P',cursive;font-size:0.8rem;color:", ";text-shadow:0 2px 4px rgba(0,0,0,0.5);margin-left:auto;"], function (props) {
13256
13279
  return props.$disabled ? uiColors.lightGray : '#fef08a';
13257
13280
  });
13258
13281
  var BalanceCurrencyLabel = /*#__PURE__*/styled.span.withConfig({
13259
13282
  displayName: "ManagmentPanel__BalanceCurrencyLabel",
13260
- componentId: "sc-1yyi6jn-10"
13283
+ componentId: "sc-1yyi6jn-11"
13261
13284
  })(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;min-width:45px;text-align:right;"]);
13262
13285
  var ItemComponentScrollWrapper$2 = /*#__PURE__*/styled.div.withConfig({
13263
13286
  displayName: "ManagmentPanel__ItemComponentScrollWrapper",
13264
- componentId: "sc-1yyi6jn-11"
13287
+ componentId: "sc-1yyi6jn-12"
13265
13288
  })(["overflow-y:scroll;overflow-x:hidden;height:335px;width:95%;margin:1rem auto 0 auto;background:rgba(0,0,0,0.2);border:1px solid rgba(255,255,255,0.05);border-radius:4px;@media (max-width:950px){height:195px;}"]);
13266
13289
  var SmallCTAButton = /*#__PURE__*/styled(CTAButton).withConfig({
13267
13290
  displayName: "ManagmentPanel__SmallCTAButton",
13268
- componentId: "sc-1yyi6jn-12"
13291
+ componentId: "sc-1yyi6jn-13"
13269
13292
  })(["padding:8px 12px;height:32px;span{font-size:0.65rem;}svg{font-size:1.1rem;}"]);
13270
13293
  var CurrencyToggleRow = /*#__PURE__*/styled.div.withConfig({
13271
13294
  displayName: "ManagmentPanel__CurrencyToggleRow",
13272
- componentId: "sc-1yyi6jn-13"
13295
+ componentId: "sc-1yyi6jn-14"
13273
13296
  })(["display:flex;align-items:center;gap:6px;margin-top:8px;"]);
13274
13297
  var CurrencyToggleLabel = /*#__PURE__*/styled.span.withConfig({
13275
13298
  displayName: "ManagmentPanel__CurrencyToggleLabel",
13276
- componentId: "sc-1yyi6jn-14"
13299
+ componentId: "sc-1yyi6jn-15"
13277
13300
  })(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
13278
13301
  var CurrencyToggleButton = /*#__PURE__*/styled.button.withConfig({
13279
13302
  displayName: "ManagmentPanel__CurrencyToggleButton",
13280
- componentId: "sc-1yyi6jn-15"
13303
+ componentId: "sc-1yyi6jn-16"
13281
13304
  })(["padding:3px 8px;font-family:'Press Start 2P',cursive !important;font-size:0.45rem !important;border-radius:4px;border:1px solid ", " !important;background:", " !important;color:", " !important;cursor:pointer;transition:border-color 0.15s,background 0.15s,color 0.15s;&:hover{border-color:", " !important;color:", " !important;}"], function (_ref3) {
13282
13305
  var $active = _ref3.$active;
13283
13306
  return $active ? '#f59e0b' : 'rgba(255,255,255,0.15)';
@@ -13296,7 +13319,7 @@ var CurrencyToggleButton = /*#__PURE__*/styled.button.withConfig({
13296
13319
  });
13297
13320
  var DCPreview = /*#__PURE__*/styled.span.withConfig({
13298
13321
  displayName: "ManagmentPanel__DCPreview",
13299
- componentId: "sc-1yyi6jn-16"
13322
+ componentId: "sc-1yyi6jn-17"
13300
13323
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:rgba(167,139,250,0.8) !important;white-space:nowrap;margin-left:auto;"]);
13301
13324
 
13302
13325
  var CURRENCY_OPTIONS = [{
@@ -13939,7 +13962,9 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13939
13962
  characterAtlasIMG = _ref.characterAtlasIMG,
13940
13963
  onCharacterList = _ref.onCharacterList,
13941
13964
  enableHotkeys = _ref.enableHotkeys,
13942
- disableHotkeys = _ref.disableHotkeys;
13965
+ disableHotkeys = _ref.disableHotkeys,
13966
+ _ref$commissionPercen = _ref.commissionPercent,
13967
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
13943
13968
  var _useState = useState(null),
13944
13969
  selectedId = _useState[0],
13945
13970
  setSelectedId = _useState[1];
@@ -14057,7 +14082,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
14057
14082
  centered: true
14058
14083
  })), React.createElement(PricePreviewAmount, null, React.createElement(MMORPGNumber, {
14059
14084
  value: Number(price)
14060
- }), " DC")), React.createElement(DCRateStrip, null)))));
14085
+ }), " DC")), price && Number(price) > 0 && commissionPercent > 0 && React.createElement(NetProceeds$1, null, "You'll receive:", ' ', (Number(price) - Math.floor(Number(price) * commissionPercent)).toLocaleString(), " DC", ' ', "(after ", commissionPercent * 100, "% commission)"), React.createElement(DCRateStrip, null)))));
14061
14086
  };
14062
14087
  var scaleIn$3 = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
14063
14088
  var Overlay$8 = /*#__PURE__*/styled.div.withConfig({
@@ -14072,25 +14097,29 @@ var ModalContent$6 = /*#__PURE__*/styled.div.withConfig({
14072
14097
  displayName: "CharacterListingModal__ModalContent",
14073
14098
  componentId: "sc-1uxkx35-2"
14074
14099
  })(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:440px;max-width:92%;max-height:80dvh;display:flex;flex-direction:column;gap:16px;overflow:hidden;pointer-events:auto;animation:", " 0.15s ease-out;"], scaleIn$3);
14100
+ var NetProceeds$1 = /*#__PURE__*/styled.p.withConfig({
14101
+ displayName: "CharacterListingModal__NetProceeds",
14102
+ componentId: "sc-1uxkx35-3"
14103
+ })(["margin:0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
14075
14104
  var Header$c = /*#__PURE__*/styled.div.withConfig({
14076
14105
  displayName: "CharacterListingModal__Header",
14077
- componentId: "sc-1uxkx35-3"
14106
+ componentId: "sc-1uxkx35-4"
14078
14107
  })(["display:flex;align-items:center;justify-content:space-between;"]);
14079
14108
  var Title$d = /*#__PURE__*/styled.h3.withConfig({
14080
14109
  displayName: "CharacterListingModal__Title",
14081
- componentId: "sc-1uxkx35-4"
14110
+ componentId: "sc-1uxkx35-5"
14082
14111
  })(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.65rem !important;color:#fef08a !important;"]);
14083
14112
  var CloseButton$f = /*#__PURE__*/styled.button.withConfig({
14084
14113
  displayName: "CharacterListingModal__CloseButton",
14085
- componentId: "sc-1uxkx35-5"
14114
+ componentId: "sc-1uxkx35-6"
14086
14115
  })(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;pointer-events:auto;&:hover{color:#ffffff;}"]);
14087
14116
  var CharacterList$1 = /*#__PURE__*/styled.div.withConfig({
14088
14117
  displayName: "CharacterListingModal__CharacterList",
14089
- componentId: "sc-1uxkx35-6"
14118
+ componentId: "sc-1uxkx35-7"
14090
14119
  })(["display:flex;flex-direction:column;gap:6px;overflow-y:auto;max-height:260px;padding:2px;&::-webkit-scrollbar{width:6px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.2);border-radius:4px;}&::-webkit-scrollbar-thumb{background:rgba(245,158,11,0.3);border-radius:4px;}"]);
14091
14120
  var CharacterRow = /*#__PURE__*/styled.div.withConfig({
14092
14121
  displayName: "CharacterListingModal__CharacterRow",
14093
- componentId: "sc-1uxkx35-7"
14122
+ componentId: "sc-1uxkx35-8"
14094
14123
  })(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:", ";opacity:", ";transition:border-color 0.15s,background 0.15s;&:hover{border-color:", ";background:", ";}&:focus-visible{outline:2px solid rgba(245,158,11,0.6);outline-offset:2px;}"], function (_ref2) {
14095
14124
  var $selected = _ref2.$selected,
14096
14125
  $disabled = _ref2.$disabled;
@@ -14116,7 +14145,7 @@ var CharacterRow = /*#__PURE__*/styled.div.withConfig({
14116
14145
  });
14117
14146
  var RadioCircle$1 = /*#__PURE__*/styled.div.withConfig({
14118
14147
  displayName: "CharacterListingModal__RadioCircle",
14119
- componentId: "sc-1uxkx35-8"
14148
+ componentId: "sc-1uxkx35-9"
14120
14149
  })(["width:14px;height:14px;border-radius:50%;border:2px solid ", ";flex-shrink:0;display:flex;align-items:center;justify-content:center;&::after{content:'';width:6px;height:6px;border-radius:50%;background:", ";opacity:", ";transition:opacity 0.15s;}"], function (_ref8) {
14121
14150
  var $selected = _ref8.$selected,
14122
14151
  $disabled = _ref8.$disabled;
@@ -14130,55 +14159,55 @@ var RadioCircle$1 = /*#__PURE__*/styled.div.withConfig({
14130
14159
  });
14131
14160
  var ActiveTag = /*#__PURE__*/styled.span.withConfig({
14132
14161
  displayName: "CharacterListingModal__ActiveTag",
14133
- componentId: "sc-1uxkx35-9"
14162
+ componentId: "sc-1uxkx35-10"
14134
14163
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.35rem !important;color:#666 !important;background:rgba(255,255,255,0.06);padding:3px 6px;border-radius:3px;white-space:nowrap;margin-left:auto;"]);
14135
14164
  var SpriteWrapper$3 = /*#__PURE__*/styled.div.withConfig({
14136
14165
  displayName: "CharacterListingModal__SpriteWrapper",
14137
- componentId: "sc-1uxkx35-10"
14166
+ componentId: "sc-1uxkx35-11"
14138
14167
  })(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
14139
14168
  var CharacterInfo$1 = /*#__PURE__*/styled.div.withConfig({
14140
14169
  displayName: "CharacterListingModal__CharacterInfo",
14141
- componentId: "sc-1uxkx35-11"
14170
+ componentId: "sc-1uxkx35-12"
14142
14171
  })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
14143
14172
  var CharacterName$3 = /*#__PURE__*/styled.span.withConfig({
14144
14173
  displayName: "CharacterListingModal__CharacterName",
14145
- componentId: "sc-1uxkx35-12"
14174
+ componentId: "sc-1uxkx35-13"
14146
14175
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
14147
14176
  var CharacterMeta$1 = /*#__PURE__*/styled.span.withConfig({
14148
14177
  displayName: "CharacterListingModal__CharacterMeta",
14149
- componentId: "sc-1uxkx35-13"
14178
+ componentId: "sc-1uxkx35-14"
14150
14179
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
14151
14180
  var PricePreview = /*#__PURE__*/styled.div.withConfig({
14152
14181
  displayName: "CharacterListingModal__PricePreview",
14153
- componentId: "sc-1uxkx35-14"
14182
+ componentId: "sc-1uxkx35-15"
14154
14183
  })(["display:flex;align-items:center;gap:6px;"]);
14155
14184
  var DCCoinWrapper$4 = /*#__PURE__*/styled.span.withConfig({
14156
14185
  displayName: "CharacterListingModal__DCCoinWrapper",
14157
- componentId: "sc-1uxkx35-15"
14186
+ componentId: "sc-1uxkx35-16"
14158
14187
  })(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
14159
14188
  var PricePreviewAmount = /*#__PURE__*/styled.span.withConfig({
14160
14189
  displayName: "CharacterListingModal__PricePreviewAmount",
14161
- componentId: "sc-1uxkx35-16"
14190
+ componentId: "sc-1uxkx35-17"
14162
14191
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
14163
14192
  var PriceSection$1 = /*#__PURE__*/styled.div.withConfig({
14164
14193
  displayName: "CharacterListingModal__PriceSection",
14165
- componentId: "sc-1uxkx35-17"
14194
+ componentId: "sc-1uxkx35-18"
14166
14195
  })(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
14167
14196
  var PriceLabel = /*#__PURE__*/styled.p.withConfig({
14168
14197
  displayName: "CharacterListingModal__PriceLabel",
14169
- componentId: "sc-1uxkx35-18"
14198
+ componentId: "sc-1uxkx35-19"
14170
14199
  })(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
14171
14200
  var PriceRow$1 = /*#__PURE__*/styled.div.withConfig({
14172
14201
  displayName: "CharacterListingModal__PriceRow",
14173
- componentId: "sc-1uxkx35-19"
14202
+ componentId: "sc-1uxkx35-20"
14174
14203
  })(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
14175
14204
  var ListBtn = /*#__PURE__*/styled(CTAButton).withConfig({
14176
14205
  displayName: "CharacterListingModal__ListBtn",
14177
- componentId: "sc-1uxkx35-20"
14206
+ componentId: "sc-1uxkx35-21"
14178
14207
  })(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
14179
14208
  var EmptyState$6 = /*#__PURE__*/styled.div.withConfig({
14180
14209
  displayName: "CharacterListingModal__EmptyState",
14181
- componentId: "sc-1uxkx35-21"
14210
+ componentId: "sc-1uxkx35-22"
14182
14211
  })(["display:flex;align-items:center;justify-content:center;padding:32px 16px;font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#666 !important;text-transform:uppercase;letter-spacing:1px;"]);
14183
14212
 
14184
14213
  var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
@@ -14196,7 +14225,9 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14196
14225
  characterAtlasJSON = _ref.characterAtlasJSON,
14197
14226
  characterAtlasIMG = _ref.characterAtlasIMG,
14198
14227
  enableHotkeys = _ref.enableHotkeys,
14199
- disableHotkeys = _ref.disableHotkeys;
14228
+ disableHotkeys = _ref.disableHotkeys,
14229
+ _ref$commissionPercen = _ref.commissionPercent,
14230
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
14200
14231
  var _useState = useState(null),
14201
14232
  delistingId = _useState[0],
14202
14233
  setDelistingId = _useState[1];
@@ -14239,7 +14270,8 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14239
14270
  setIsListingModalOpen(false);
14240
14271
  },
14241
14272
  enableHotkeys: enableHotkeys,
14242
- disableHotkeys: disableHotkeys
14273
+ disableHotkeys: disableHotkeys,
14274
+ commissionPercent: commissionPercent
14243
14275
  }), React.createElement(Toolbar, null, React.createElement(ListCharacterBtn, {
14244
14276
  icon: React.createElement(ShoppingBag, {
14245
14277
  width: 16,
@@ -14398,7 +14430,9 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
14398
14430
  characterAtlasJSON = _ref.characterAtlasJSON,
14399
14431
  characterAtlasIMG = _ref.characterAtlasIMG,
14400
14432
  enableHotkeys = _ref.enableHotkeys,
14401
- disableHotkeys = _ref.disableHotkeys;
14433
+ disableHotkeys = _ref.disableHotkeys,
14434
+ _ref$commissionPercen = _ref.commissionPercent,
14435
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
14402
14436
  var _useState = useState('browse'),
14403
14437
  subTab = _useState[0],
14404
14438
  setSubTab = _useState[1];
@@ -14445,7 +14479,8 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
14445
14479
  characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : atlasJSON,
14446
14480
  characterAtlasIMG: characterAtlasIMG != null ? characterAtlasIMG : atlasIMG,
14447
14481
  enableHotkeys: enableHotkeys,
14448
- disableHotkeys: disableHotkeys
14482
+ disableHotkeys: disableHotkeys,
14483
+ commissionPercent: commissionPercent
14449
14484
  }));
14450
14485
  };
14451
14486
  var CharacterSubTabs = /*#__PURE__*/styled.div.withConfig({
@@ -14665,7 +14700,8 @@ var Marketplace = function Marketplace(props) {
14665
14700
  characterAtlasJSON: characterAtlasJSON,
14666
14701
  characterAtlasIMG: characterAtlasIMG,
14667
14702
  enableHotkeys: props.enableHotkeys,
14668
- disableHotkeys: props.disableHotkeys
14703
+ disableHotkeys: props.disableHotkeys,
14704
+ commissionPercent: props.commissionPercent
14669
14705
  }), activeTab === 'sell' && React.createElement(ManagmentPanel, Object.assign({}, props, {
14670
14706
  acceptedCurrency: acceptedCurrency
14671
14707
  })), activeTab === 'buy-orders' && React.createElement(React.Fragment, null, React.createElement(BuyOrderPanel, {