@rpg-engine/long-bow 0.8.233 → 0.8.234

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 +90 -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 +90 -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 +38 -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 +125 -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
+ })), commissionPercent > 0 && React.createElement(FeeDisclosure$1, null, commissionPercent * 100, "% marketplace commission is deducted from seller proceeds."), 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,56 @@ 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;"]);
13263
+ var FeeDisclosure$1 = /*#__PURE__*/styled.p.withConfig({
13264
+ displayName: "ManagmentPanel__FeeDisclosure",
13265
+ componentId: "sc-1yyi6jn-7"
13266
+ })(["margin:6px 0 0;color:rgba(254,240,138,0.65);font-size:7px !important;line-height:1.4 !important;"]);
13240
13267
  var GoldIcon$3 = /*#__PURE__*/styled.div.withConfig({
13241
13268
  displayName: "ManagmentPanel__GoldIcon",
13242
- componentId: "sc-1yyi6jn-6"
13269
+ componentId: "sc-1yyi6jn-8"
13243
13270
  })(["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
13271
  var WealthWrapper = /*#__PURE__*/styled.div.withConfig({
13245
13272
  displayName: "ManagmentPanel__WealthWrapper",
13246
- componentId: "sc-1yyi6jn-7"
13273
+ componentId: "sc-1yyi6jn-9"
13247
13274
  })(["display:flex;flex-direction:column;gap:8px;flex-grow:1;& > :last-child{margin-top:auto;}"]);
13248
13275
  var BalanceRow = /*#__PURE__*/styled.div.withConfig({
13249
13276
  displayName: "ManagmentPanel__BalanceRow",
13250
- componentId: "sc-1yyi6jn-8"
13277
+ componentId: "sc-1yyi6jn-10"
13251
13278
  })(["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
13279
  var BalanceAmount$1 = /*#__PURE__*/styled.span.withConfig({
13253
13280
  displayName: "ManagmentPanel__BalanceAmount",
13254
- componentId: "sc-1yyi6jn-9"
13281
+ componentId: "sc-1yyi6jn-11"
13255
13282
  })(["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
13283
  return props.$disabled ? uiColors.lightGray : '#fef08a';
13257
13284
  });
13258
13285
  var BalanceCurrencyLabel = /*#__PURE__*/styled.span.withConfig({
13259
13286
  displayName: "ManagmentPanel__BalanceCurrencyLabel",
13260
- componentId: "sc-1yyi6jn-10"
13287
+ componentId: "sc-1yyi6jn-12"
13261
13288
  })(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;min-width:45px;text-align:right;"]);
13262
13289
  var ItemComponentScrollWrapper$2 = /*#__PURE__*/styled.div.withConfig({
13263
13290
  displayName: "ManagmentPanel__ItemComponentScrollWrapper",
13264
- componentId: "sc-1yyi6jn-11"
13291
+ componentId: "sc-1yyi6jn-13"
13265
13292
  })(["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
13293
  var SmallCTAButton = /*#__PURE__*/styled(CTAButton).withConfig({
13267
13294
  displayName: "ManagmentPanel__SmallCTAButton",
13268
- componentId: "sc-1yyi6jn-12"
13295
+ componentId: "sc-1yyi6jn-14"
13269
13296
  })(["padding:8px 12px;height:32px;span{font-size:0.65rem;}svg{font-size:1.1rem;}"]);
13270
13297
  var CurrencyToggleRow = /*#__PURE__*/styled.div.withConfig({
13271
13298
  displayName: "ManagmentPanel__CurrencyToggleRow",
13272
- componentId: "sc-1yyi6jn-13"
13299
+ componentId: "sc-1yyi6jn-15"
13273
13300
  })(["display:flex;align-items:center;gap:6px;margin-top:8px;"]);
13274
13301
  var CurrencyToggleLabel = /*#__PURE__*/styled.span.withConfig({
13275
13302
  displayName: "ManagmentPanel__CurrencyToggleLabel",
13276
- componentId: "sc-1yyi6jn-14"
13303
+ componentId: "sc-1yyi6jn-16"
13277
13304
  })(["font-size:0.5rem;color:#888;text-transform:uppercase;letter-spacing:0.5px;white-space:nowrap;"]);
13278
13305
  var CurrencyToggleButton = /*#__PURE__*/styled.button.withConfig({
13279
13306
  displayName: "ManagmentPanel__CurrencyToggleButton",
13280
- componentId: "sc-1yyi6jn-15"
13307
+ componentId: "sc-1yyi6jn-17"
13281
13308
  })(["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
13309
  var $active = _ref3.$active;
13283
13310
  return $active ? '#f59e0b' : 'rgba(255,255,255,0.15)';
@@ -13296,7 +13323,7 @@ var CurrencyToggleButton = /*#__PURE__*/styled.button.withConfig({
13296
13323
  });
13297
13324
  var DCPreview = /*#__PURE__*/styled.span.withConfig({
13298
13325
  displayName: "ManagmentPanel__DCPreview",
13299
- componentId: "sc-1yyi6jn-16"
13326
+ componentId: "sc-1yyi6jn-18"
13300
13327
  })(["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
13328
 
13302
13329
  var CURRENCY_OPTIONS = [{
@@ -13939,7 +13966,9 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13939
13966
  characterAtlasIMG = _ref.characterAtlasIMG,
13940
13967
  onCharacterList = _ref.onCharacterList,
13941
13968
  enableHotkeys = _ref.enableHotkeys,
13942
- disableHotkeys = _ref.disableHotkeys;
13969
+ disableHotkeys = _ref.disableHotkeys,
13970
+ _ref$commissionPercen = _ref.commissionPercent,
13971
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
13943
13972
  var _useState = useState(null),
13944
13973
  selectedId = _useState[0],
13945
13974
  setSelectedId = _useState[1];
@@ -14057,7 +14086,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
14057
14086
  centered: true
14058
14087
  })), React.createElement(PricePreviewAmount, null, React.createElement(MMORPGNumber, {
14059
14088
  value: Number(price)
14060
- }), " DC")), React.createElement(DCRateStrip, null)))));
14089
+ }), " 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
14090
  };
14062
14091
  var scaleIn$3 = /*#__PURE__*/keyframes(["from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}"]);
14063
14092
  var Overlay$8 = /*#__PURE__*/styled.div.withConfig({
@@ -14072,25 +14101,29 @@ var ModalContent$6 = /*#__PURE__*/styled.div.withConfig({
14072
14101
  displayName: "CharacterListingModal__ModalContent",
14073
14102
  componentId: "sc-1uxkx35-2"
14074
14103
  })(["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);
14104
+ var NetProceeds$1 = /*#__PURE__*/styled.p.withConfig({
14105
+ displayName: "CharacterListingModal__NetProceeds",
14106
+ componentId: "sc-1uxkx35-3"
14107
+ })(["margin:0;color:#fef08a;font-size:8px !important;line-height:1.5 !important;"]);
14075
14108
  var Header$c = /*#__PURE__*/styled.div.withConfig({
14076
14109
  displayName: "CharacterListingModal__Header",
14077
- componentId: "sc-1uxkx35-3"
14110
+ componentId: "sc-1uxkx35-4"
14078
14111
  })(["display:flex;align-items:center;justify-content:space-between;"]);
14079
14112
  var Title$d = /*#__PURE__*/styled.h3.withConfig({
14080
14113
  displayName: "CharacterListingModal__Title",
14081
- componentId: "sc-1uxkx35-4"
14114
+ componentId: "sc-1uxkx35-5"
14082
14115
  })(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.65rem !important;color:#fef08a !important;"]);
14083
14116
  var CloseButton$f = /*#__PURE__*/styled.button.withConfig({
14084
14117
  displayName: "CharacterListingModal__CloseButton",
14085
- componentId: "sc-1uxkx35-5"
14118
+ componentId: "sc-1uxkx35-6"
14086
14119
  })(["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
14120
  var CharacterList$1 = /*#__PURE__*/styled.div.withConfig({
14088
14121
  displayName: "CharacterListingModal__CharacterList",
14089
- componentId: "sc-1uxkx35-6"
14122
+ componentId: "sc-1uxkx35-7"
14090
14123
  })(["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
14124
  var CharacterRow = /*#__PURE__*/styled.div.withConfig({
14092
14125
  displayName: "CharacterListingModal__CharacterRow",
14093
- componentId: "sc-1uxkx35-7"
14126
+ componentId: "sc-1uxkx35-8"
14094
14127
  })(["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
14128
  var $selected = _ref2.$selected,
14096
14129
  $disabled = _ref2.$disabled;
@@ -14116,7 +14149,7 @@ var CharacterRow = /*#__PURE__*/styled.div.withConfig({
14116
14149
  });
14117
14150
  var RadioCircle$1 = /*#__PURE__*/styled.div.withConfig({
14118
14151
  displayName: "CharacterListingModal__RadioCircle",
14119
- componentId: "sc-1uxkx35-8"
14152
+ componentId: "sc-1uxkx35-9"
14120
14153
  })(["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
14154
  var $selected = _ref8.$selected,
14122
14155
  $disabled = _ref8.$disabled;
@@ -14130,55 +14163,55 @@ var RadioCircle$1 = /*#__PURE__*/styled.div.withConfig({
14130
14163
  });
14131
14164
  var ActiveTag = /*#__PURE__*/styled.span.withConfig({
14132
14165
  displayName: "CharacterListingModal__ActiveTag",
14133
- componentId: "sc-1uxkx35-9"
14166
+ componentId: "sc-1uxkx35-10"
14134
14167
  })(["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
14168
  var SpriteWrapper$3 = /*#__PURE__*/styled.div.withConfig({
14136
14169
  displayName: "CharacterListingModal__SpriteWrapper",
14137
- componentId: "sc-1uxkx35-10"
14170
+ componentId: "sc-1uxkx35-11"
14138
14171
  })(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
14139
14172
  var CharacterInfo$1 = /*#__PURE__*/styled.div.withConfig({
14140
14173
  displayName: "CharacterListingModal__CharacterInfo",
14141
- componentId: "sc-1uxkx35-11"
14174
+ componentId: "sc-1uxkx35-12"
14142
14175
  })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
14143
14176
  var CharacterName$3 = /*#__PURE__*/styled.span.withConfig({
14144
14177
  displayName: "CharacterListingModal__CharacterName",
14145
- componentId: "sc-1uxkx35-12"
14178
+ componentId: "sc-1uxkx35-13"
14146
14179
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
14147
14180
  var CharacterMeta$1 = /*#__PURE__*/styled.span.withConfig({
14148
14181
  displayName: "CharacterListingModal__CharacterMeta",
14149
- componentId: "sc-1uxkx35-13"
14182
+ componentId: "sc-1uxkx35-14"
14150
14183
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
14151
14184
  var PricePreview = /*#__PURE__*/styled.div.withConfig({
14152
14185
  displayName: "CharacterListingModal__PricePreview",
14153
- componentId: "sc-1uxkx35-14"
14186
+ componentId: "sc-1uxkx35-15"
14154
14187
  })(["display:flex;align-items:center;gap:6px;"]);
14155
14188
  var DCCoinWrapper$4 = /*#__PURE__*/styled.span.withConfig({
14156
14189
  displayName: "CharacterListingModal__DCCoinWrapper",
14157
- componentId: "sc-1uxkx35-15"
14190
+ componentId: "sc-1uxkx35-16"
14158
14191
  })(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
14159
14192
  var PricePreviewAmount = /*#__PURE__*/styled.span.withConfig({
14160
14193
  displayName: "CharacterListingModal__PricePreviewAmount",
14161
- componentId: "sc-1uxkx35-16"
14194
+ componentId: "sc-1uxkx35-17"
14162
14195
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
14163
14196
  var PriceSection$1 = /*#__PURE__*/styled.div.withConfig({
14164
14197
  displayName: "CharacterListingModal__PriceSection",
14165
- componentId: "sc-1uxkx35-17"
14198
+ componentId: "sc-1uxkx35-18"
14166
14199
  })(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
14167
14200
  var PriceLabel = /*#__PURE__*/styled.p.withConfig({
14168
14201
  displayName: "CharacterListingModal__PriceLabel",
14169
- componentId: "sc-1uxkx35-18"
14202
+ componentId: "sc-1uxkx35-19"
14170
14203
  })(["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
14204
  var PriceRow$1 = /*#__PURE__*/styled.div.withConfig({
14172
14205
  displayName: "CharacterListingModal__PriceRow",
14173
- componentId: "sc-1uxkx35-19"
14206
+ componentId: "sc-1uxkx35-20"
14174
14207
  })(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
14175
14208
  var ListBtn = /*#__PURE__*/styled(CTAButton).withConfig({
14176
14209
  displayName: "CharacterListingModal__ListBtn",
14177
- componentId: "sc-1uxkx35-20"
14210
+ componentId: "sc-1uxkx35-21"
14178
14211
  })(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
14179
14212
  var EmptyState$6 = /*#__PURE__*/styled.div.withConfig({
14180
14213
  displayName: "CharacterListingModal__EmptyState",
14181
- componentId: "sc-1uxkx35-21"
14214
+ componentId: "sc-1uxkx35-22"
14182
14215
  })(["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
14216
 
14184
14217
  var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
@@ -14196,7 +14229,9 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14196
14229
  characterAtlasJSON = _ref.characterAtlasJSON,
14197
14230
  characterAtlasIMG = _ref.characterAtlasIMG,
14198
14231
  enableHotkeys = _ref.enableHotkeys,
14199
- disableHotkeys = _ref.disableHotkeys;
14232
+ disableHotkeys = _ref.disableHotkeys,
14233
+ _ref$commissionPercen = _ref.commissionPercent,
14234
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
14200
14235
  var _useState = useState(null),
14201
14236
  delistingId = _useState[0],
14202
14237
  setDelistingId = _useState[1];
@@ -14239,7 +14274,8 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14239
14274
  setIsListingModalOpen(false);
14240
14275
  },
14241
14276
  enableHotkeys: enableHotkeys,
14242
- disableHotkeys: disableHotkeys
14277
+ disableHotkeys: disableHotkeys,
14278
+ commissionPercent: commissionPercent
14243
14279
  }), React.createElement(Toolbar, null, React.createElement(ListCharacterBtn, {
14244
14280
  icon: React.createElement(ShoppingBag, {
14245
14281
  width: 16,
@@ -14398,7 +14434,9 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
14398
14434
  characterAtlasJSON = _ref.characterAtlasJSON,
14399
14435
  characterAtlasIMG = _ref.characterAtlasIMG,
14400
14436
  enableHotkeys = _ref.enableHotkeys,
14401
- disableHotkeys = _ref.disableHotkeys;
14437
+ disableHotkeys = _ref.disableHotkeys,
14438
+ _ref$commissionPercen = _ref.commissionPercent,
14439
+ commissionPercent = _ref$commissionPercen === void 0 ? 0 : _ref$commissionPercen;
14402
14440
  var _useState = useState('browse'),
14403
14441
  subTab = _useState[0],
14404
14442
  setSubTab = _useState[1];
@@ -14445,7 +14483,8 @@ var CharacterTradePanel = function CharacterTradePanel(_ref) {
14445
14483
  characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : atlasJSON,
14446
14484
  characterAtlasIMG: characterAtlasIMG != null ? characterAtlasIMG : atlasIMG,
14447
14485
  enableHotkeys: enableHotkeys,
14448
- disableHotkeys: disableHotkeys
14486
+ disableHotkeys: disableHotkeys,
14487
+ commissionPercent: commissionPercent
14449
14488
  }));
14450
14489
  };
14451
14490
  var CharacterSubTabs = /*#__PURE__*/styled.div.withConfig({
@@ -14665,7 +14704,8 @@ var Marketplace = function Marketplace(props) {
14665
14704
  characterAtlasJSON: characterAtlasJSON,
14666
14705
  characterAtlasIMG: characterAtlasIMG,
14667
14706
  enableHotkeys: props.enableHotkeys,
14668
- disableHotkeys: props.disableHotkeys
14707
+ disableHotkeys: props.disableHotkeys,
14708
+ commissionPercent: props.commissionPercent
14669
14709
  }), activeTab === 'sell' && React.createElement(ManagmentPanel, Object.assign({}, props, {
14670
14710
  acceptedCurrency: acceptedCurrency
14671
14711
  })), activeTab === 'buy-orders' && React.createElement(React.Fragment, null, React.createElement(BuyOrderPanel, {