@rpg-engine/long-bow 0.8.136 → 0.8.137

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,4 +1,8 @@
1
1
  import React from 'react';
2
+ export interface IDCTransferCharacterResult {
3
+ _id: string;
4
+ name: string;
5
+ }
2
6
  export interface IDCTransferPanelProps {
3
7
  dcBalance: number;
4
8
  transferLoading: boolean;
@@ -11,5 +15,7 @@ export interface IDCTransferPanelProps {
11
15
  characterName?: string;
12
16
  onInputFocus?: () => void;
13
17
  onInputBlur?: () => void;
18
+ onSearchCharacter?: (name: string) => void;
19
+ searchResults?: IDCTransferCharacterResult[];
14
20
  }
15
21
  export declare const DCTransferPanel: React.FC<IDCTransferPanelProps>;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IDCTransaction } from './DCHistoryPanel';
3
+ import { IDCTransferCharacterResult } from './DCTransferPanel';
3
4
  export interface IDCWalletModalProps {
4
5
  dcBalance: number;
5
6
  onClose: () => void;
@@ -20,5 +21,8 @@ export interface IDCWalletModalProps {
20
21
  characterName?: string;
21
22
  onInputFocus?: () => void;
22
23
  onInputBlur?: () => void;
24
+ onBuyDC?: () => void;
25
+ onSearchCharacter?: (name: string) => void;
26
+ searchResults?: IDCTransferCharacterResult[];
23
27
  }
24
28
  export declare const DCWalletModal: React.FC<IDCWalletModalProps>;
@@ -30309,49 +30309,40 @@ var PageInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
30309
30309
  var TRANSACTION_TYPE_LABELS = {
30310
30310
  Purchase: 'Purchase',
30311
30311
  Transfer: 'Transfer',
30312
- MarketplaceSale: 'Marketplace Sale',
30313
- MarketplacePurchase: 'Marketplace Buy',
30314
- StorePurchase: 'Store Purchase',
30312
+ MarketplaceSale: 'Mkt Sale',
30313
+ MarketplacePurchase: 'Mkt Buy',
30314
+ StorePurchase: 'Store',
30315
30315
  Fee: 'Fee',
30316
30316
  Refund: 'Refund',
30317
- AdminAdjustment: 'Admin Adjustment'
30317
+ AdminAdjustment: 'Admin'
30318
30318
  };
30319
30319
  var TRANSACTION_TYPE_OPTIONS = [{
30320
- id: 0,
30321
30320
  value: '',
30322
- option: 'All Types'
30321
+ label: 'All Types'
30323
30322
  }, {
30324
- id: 1,
30325
30323
  value: 'Purchase',
30326
- option: 'Purchase'
30324
+ label: 'Purchase'
30327
30325
  }, {
30328
- id: 2,
30329
30326
  value: 'Transfer',
30330
- option: 'Transfer'
30327
+ label: 'Transfer'
30331
30328
  }, {
30332
- id: 3,
30333
30329
  value: 'MarketplaceSale',
30334
- option: 'Marketplace Sale'
30330
+ label: 'Marketplace Sale'
30335
30331
  }, {
30336
- id: 4,
30337
30332
  value: 'MarketplacePurchase',
30338
- option: 'Marketplace Buy'
30333
+ label: 'Marketplace Buy'
30339
30334
  }, {
30340
- id: 5,
30341
30335
  value: 'StorePurchase',
30342
- option: 'Store Purchase'
30336
+ label: 'Store Purchase'
30343
30337
  }, {
30344
- id: 6,
30345
30338
  value: 'Fee',
30346
- option: 'Fee'
30339
+ label: 'Fee'
30347
30340
  }, {
30348
- id: 7,
30349
30341
  value: 'Refund',
30350
- option: 'Refund'
30342
+ label: 'Refund'
30351
30343
  }, {
30352
- id: 8,
30353
30344
  value: 'AdminAdjustment',
30354
- option: 'Admin Adjustment'
30345
+ label: 'Admin Adjustment'
30355
30346
  }];
30356
30347
  var DCHistoryPanel = function DCHistoryPanel(_ref) {
30357
30348
  var transactions = _ref.transactions,
@@ -30362,7 +30353,13 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
30362
30353
  var _React$useState = React__default.useState(''),
30363
30354
  selectedType = _React$useState[0],
30364
30355
  setSelectedType = _React$useState[1];
30365
- var handleTypeChange = function handleTypeChange(value) {
30356
+ // Auto-load on first mount (when History tab is opened)
30357
+ React__default.useEffect(function () {
30358
+ onRequestHistory(1);
30359
+ // eslint-disable-next-line react-hooks/exhaustive-deps
30360
+ }, []);
30361
+ var handleTypeChange = function handleTypeChange(e) {
30362
+ var value = e.target.value;
30366
30363
  setSelectedType(value);
30367
30364
  onRequestHistory(1, value || undefined);
30368
30365
  };
@@ -30371,22 +30368,26 @@ var DCHistoryPanel = function DCHistoryPanel(_ref) {
30371
30368
  };
30372
30369
  var formatDate = function formatDate(dateStr) {
30373
30370
  var d = new Date(dateStr);
30374
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
30375
- return months[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
30371
+ return d.getMonth() + 1 + "/" + d.getDate() + "/" + String(d.getFullYear()).slice(-2);
30376
30372
  };
30377
- return React__default.createElement(PanelContainer, null, React__default.createElement(FilterRow, null, React__default.createElement(FilterLabel, null, "Filter:"), React__default.createElement(Dropdown, {
30378
- options: TRANSACTION_TYPE_OPTIONS,
30379
- onChange: handleTypeChange,
30380
- width: "200px"
30381
- })), loading && React__default.createElement(LoadingRow, null, React__default.createElement(Spinner, null), React__default.createElement("span", null, "Loading...")), !loading && transactions.length === 0 && React__default.createElement(EmptyMessage, null, "No transactions found."), !loading && transactions.length > 0 && React__default.createElement(TransactionList, null, transactions.map(function (tx) {
30373
+ return React__default.createElement(PanelContainer, null, React__default.createElement(FilterRow, null, React__default.createElement(FilterLabel, null, "Filter:"), React__default.createElement(TypeSelect, {
30374
+ value: selectedType,
30375
+ onChange: handleTypeChange
30376
+ }, TRANSACTION_TYPE_OPTIONS.map(function (opt) {
30377
+ return React__default.createElement("option", {
30378
+ key: opt.value,
30379
+ value: opt.value
30380
+ }, opt.label);
30381
+ }))), loading && React__default.createElement(LoadingRow, null, React__default.createElement(Spinner, null), React__default.createElement("span", null, "Loading...")), !loading && transactions.length === 0 && React__default.createElement(EmptyMessage, null, "No transactions found."), !loading && transactions.length > 0 && React__default.createElement(TransactionList, null, transactions.map(function (tx) {
30382
30382
  var _TRANSACTION_TYPE_LAB, _tx$note;
30383
30383
  var isCredit = tx.amount > 0;
30384
30384
  var label = (_TRANSACTION_TYPE_LAB = TRANSACTION_TYPE_LABELS[tx.type]) != null ? _TRANSACTION_TYPE_LAB : tx.type;
30385
+ var subtitle = (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? tx.relatedCharacterName : '';
30385
30386
  return React__default.createElement(TransactionRow, {
30386
30387
  key: tx._id
30387
- }, React__default.createElement(TxType, null, label), React__default.createElement(TxAmount, {
30388
+ }, React__default.createElement(TxLeft, null, React__default.createElement(TxType, null, label), subtitle ? React__default.createElement(TxNote, null, subtitle) : null), React__default.createElement(TxRight, null, React__default.createElement(TxAmount, {
30388
30389
  "$credit": isCredit
30389
- }, isCredit ? '+' : '', tx.amount, " DC"), React__default.createElement(TxNote, null, (_tx$note = tx.note) != null ? _tx$note : tx.relatedCharacterName ? "With: " + tx.relatedCharacterName : ''), React__default.createElement(TxDate, null, formatDate(tx.createdAt)), React__default.createElement(TxBalance, null, "Balance: ", tx.balanceAfter, " DC"));
30390
+ }, isCredit ? '+' : '', tx.amount, " DC"), React__default.createElement(TxDate, null, formatDate(tx.createdAt))));
30390
30391
  })), totalPages > 1 && React__default.createElement(Pagination, {
30391
30392
  currentPage: currentPage,
30392
30393
  totalPages: totalPages,
@@ -30400,54 +30401,62 @@ var PanelContainer = /*#__PURE__*/styled__default.div.withConfig({
30400
30401
  var FilterRow = /*#__PURE__*/styled__default.div.withConfig({
30401
30402
  displayName: "DCHistoryPanel__FilterRow",
30402
30403
  componentId: "sc-debjdj-1"
30403
- })(["display:flex;align-items:center;gap:8px;margin-bottom:4px;"]);
30404
+ })(["display:flex;align-items:center;gap:8px;margin-bottom:2px;"]);
30404
30405
  var FilterLabel = /*#__PURE__*/styled__default.span.withConfig({
30405
30406
  displayName: "DCHistoryPanel__FilterLabel",
30406
30407
  componentId: "sc-debjdj-2"
30407
- })(["font-size:8px;color:#f59e0b;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30408
+ })(["font-size:7px;color:#f59e0b;font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30409
+ var TypeSelect = /*#__PURE__*/styled__default.select.withConfig({
30410
+ displayName: "DCHistoryPanel__TypeSelect",
30411
+ componentId: "sc-debjdj-3"
30412
+ })(["background:rgba(0,0,0,0.7);border:1px solid rgba(245,158,11,0.4);border-radius:3px;color:#f59e0b;font-size:7px;font-family:'Press Start 2P',cursive;padding:3px 5px;cursor:pointer;outline:none;flex:1;option{background:#1a1a2e;color:#f59e0b;}&:hover{border-color:#f59e0b;}&:focus{border-color:#f59e0b;box-shadow:0 0 0 1px rgba(245,158,11,0.3);}"]);
30408
30413
  var TransactionList = /*#__PURE__*/styled__default.div.withConfig({
30409
30414
  displayName: "DCHistoryPanel__TransactionList",
30410
- componentId: "sc-debjdj-3"
30411
- })(["display:flex;flex-direction:column;gap:4px;max-height:280px;overflow-y:auto;"]);
30415
+ componentId: "sc-debjdj-4"
30416
+ })(["display:flex;flex-direction:column;gap:3px;max-height:260px;overflow-y:auto;&::-webkit-scrollbar{width:4px;}&::-webkit-scrollbar-track{background:rgba(0,0,0,0.3);}&::-webkit-scrollbar-thumb{background:rgba(245,158,11,0.4);border-radius:2px;}"]);
30412
30417
  var TransactionRow = /*#__PURE__*/styled__default.div.withConfig({
30413
30418
  displayName: "DCHistoryPanel__TransactionRow",
30414
- componentId: "sc-debjdj-4"
30415
- })(["background:rgba(0,0,0,0.4);border:1px solid rgba(255,215,0,0.2);padding:8px;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto auto;gap:2px;"]);
30419
+ componentId: "sc-debjdj-5"
30420
+ })(["background:rgba(0,0,0,0.35);border:1px solid rgba(245,158,11,0.15);border-radius:2px;padding:5px 7px;display:flex;align-items:center;gap:8px;"]);
30421
+ var TxLeft = /*#__PURE__*/styled__default.div.withConfig({
30422
+ displayName: "DCHistoryPanel__TxLeft",
30423
+ componentId: "sc-debjdj-6"
30424
+ })(["flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;"]);
30425
+ var TxRight = /*#__PURE__*/styled__default.div.withConfig({
30426
+ displayName: "DCHistoryPanel__TxRight",
30427
+ componentId: "sc-debjdj-7"
30428
+ })(["display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex-shrink:0;"]);
30416
30429
  var TxType = /*#__PURE__*/styled__default.span.withConfig({
30417
30430
  displayName: "DCHistoryPanel__TxType",
30418
- componentId: "sc-debjdj-5"
30419
- })(["font-size:8px;color:#f59e0b;font-family:'Press Start 2P',cursive;grid-column:1;grid-row:1;"]);
30431
+ componentId: "sc-debjdj-8"
30432
+ })(["font-size:7px;color:#f59e0b;font-family:'Press Start 2P',cursive;"]);
30420
30433
  var TxAmount = /*#__PURE__*/styled__default.span.withConfig({
30421
30434
  displayName: "DCHistoryPanel__TxAmount",
30422
- componentId: "sc-debjdj-6"
30423
- })(["font-size:10px;font-family:'Press Start 2P',cursive;color:", ";font-weight:bold;grid-column:2;grid-row:1;text-align:right;"], function (_ref2) {
30435
+ componentId: "sc-debjdj-9"
30436
+ })(["font-size:8px;font-family:'Press Start 2P',cursive;color:", ";white-space:nowrap;"], function (_ref2) {
30424
30437
  var $credit = _ref2.$credit;
30425
30438
  return $credit ? uiColors.green : uiColors.red;
30426
30439
  });
30427
30440
  var TxNote = /*#__PURE__*/styled__default.span.withConfig({
30428
30441
  displayName: "DCHistoryPanel__TxNote",
30429
- componentId: "sc-debjdj-7"
30430
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:1;grid-row:2;"], uiColors.lightGray);
30442
+ componentId: "sc-debjdj-10"
30443
+ })(["font-size:6px;color:", ";font-family:'Press Start 2P',cursive;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"], uiColors.lightGray);
30431
30444
  var TxDate = /*#__PURE__*/styled__default.span.withConfig({
30432
30445
  displayName: "DCHistoryPanel__TxDate",
30433
- componentId: "sc-debjdj-8"
30434
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:2;grid-row:2;text-align:right;"], uiColors.lightGray);
30435
- var TxBalance = /*#__PURE__*/styled__default.span.withConfig({
30436
- displayName: "DCHistoryPanel__TxBalance",
30437
- componentId: "sc-debjdj-9"
30438
- })(["font-size:7px;color:", ";font-family:'Press Start 2P',cursive;grid-column:1 / 3;grid-row:3;opacity:0.7;"], uiColors.white);
30446
+ componentId: "sc-debjdj-11"
30447
+ })(["font-size:6px;color:rgba(255,255,255,0.4);font-family:'Press Start 2P',cursive;white-space:nowrap;"]);
30439
30448
  var LoadingRow = /*#__PURE__*/styled__default.div.withConfig({
30440
30449
  displayName: "DCHistoryPanel__LoadingRow",
30441
- componentId: "sc-debjdj-10"
30450
+ componentId: "sc-debjdj-12"
30442
30451
  })(["display:flex;align-items:center;gap:8px;justify-content:center;padding:16px;color:", ";font-size:9px;font-family:'Press Start 2P',cursive;"], uiColors.white);
30443
30452
  var Spinner = /*#__PURE__*/styled__default.div.withConfig({
30444
30453
  displayName: "DCHistoryPanel__Spinner",
30445
- componentId: "sc-debjdj-11"
30446
- })(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:20px;height:20px;animation:spin 0.8s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}"]);
30454
+ componentId: "sc-debjdj-13"
30455
+ })(["border:3px solid rgba(255,255,255,0.2);border-radius:50%;border-top:3px solid #f59e0b;width:16px;height:16px;animation:spin 0.8s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}"]);
30447
30456
  var EmptyMessage = /*#__PURE__*/styled__default.div.withConfig({
30448
30457
  displayName: "DCHistoryPanel__EmptyMessage",
30449
- componentId: "sc-debjdj-12"
30450
- })(["font-size:9px;color:", ";font-family:'Press Start 2P',cursive;text-align:center;padding:20px;"], uiColors.lightGray);
30458
+ componentId: "sc-debjdj-14"
30459
+ })(["font-size:8px;color:", ";font-family:'Press Start 2P',cursive;text-align:center;padding:20px;"], uiColors.lightGray);
30451
30460
 
30452
30461
  // Global style to prevent body scrolling when modal is open
30453
30462
  var GlobalStyle = /*#__PURE__*/styled.createGlobalStyle(["body{overflow:hidden;width:100%;height:100%;}"]);
@@ -30599,7 +30608,9 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30599
30608
  onClearTransferResult = _ref.onClearTransferResult,
30600
30609
  characterName = _ref.characterName,
30601
30610
  onInputFocus = _ref.onInputFocus,
30602
- onInputBlur = _ref.onInputBlur;
30611
+ onInputBlur = _ref.onInputBlur,
30612
+ onSearchCharacter = _ref.onSearchCharacter,
30613
+ searchResults = _ref.searchResults;
30603
30614
  var _useState = React.useState(''),
30604
30615
  recipientName = _useState[0],
30605
30616
  setRecipientName = _useState[1];
@@ -30612,7 +30623,23 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30612
30623
  var _useState4 = React.useState(false),
30613
30624
  showConfirm = _useState4[0],
30614
30625
  setShowConfirm = _useState4[1];
30626
+ var _useState5 = React.useState(false),
30627
+ showDropdown = _useState5[0],
30628
+ setShowDropdown = _useState5[1];
30629
+ var dropdownRef = React.useRef(null);
30615
30630
  var clearResultTimerRef = React.useRef(null);
30631
+ var debouncedSearch = React.useMemo(function () {
30632
+ return lodash.debounce(function (name) {
30633
+ if (name.trim().length >= 2) {
30634
+ onSearchCharacter == null ? void 0 : onSearchCharacter(name.trim());
30635
+ }
30636
+ }, 300);
30637
+ }, [onSearchCharacter]);
30638
+ React.useEffect(function () {
30639
+ return function () {
30640
+ debouncedSearch.cancel();
30641
+ };
30642
+ }, [debouncedSearch]);
30616
30643
  React.useEffect(function () {
30617
30644
  if (transferResult) {
30618
30645
  if (clearResultTimerRef.current) {
@@ -30660,17 +30687,41 @@ var DCTransferPanel = function DCTransferPanel(_ref) {
30660
30687
  setRecipientName('');
30661
30688
  setAmount('');
30662
30689
  }, [recipientName, amount, onSendTransfer]);
30663
- return React__default.createElement(PanelContainer$1, null, React__default.createElement(FieldLabel, null, "Recipient Character Name"), React__default.createElement(StyledInput, {
30690
+ return React__default.createElement(PanelContainer$1, null, React__default.createElement(FieldLabel, null, "Recipient Character Name"), React__default.createElement(AutocompleteWrapper, {
30691
+ ref: dropdownRef
30692
+ }, React__default.createElement(StyledInput, {
30664
30693
  type: "text",
30665
30694
  value: recipientName,
30666
30695
  onChange: function onChange(e) {
30667
- return setRecipientName(e.target.value);
30696
+ setRecipientName(e.target.value);
30697
+ debouncedSearch(e.target.value);
30698
+ setShowDropdown(true);
30699
+ },
30700
+ onFocus: function onFocus() {
30701
+ onInputFocus == null ? void 0 : onInputFocus();
30702
+ if (recipientName.trim().length >= 2 && searchResults && searchResults.length > 0) {
30703
+ setShowDropdown(true);
30704
+ }
30705
+ },
30706
+ onBlur: function onBlur() {
30707
+ // Delay to allow dropdown click to register
30708
+ setTimeout(function () {
30709
+ return setShowDropdown(false);
30710
+ }, 150);
30711
+ onInputBlur == null ? void 0 : onInputBlur();
30668
30712
  },
30669
- onFocus: onInputFocus,
30670
- onBlur: onInputBlur,
30671
30713
  placeholder: "Enter character name",
30672
- disabled: transferLoading
30673
- }), React__default.createElement(FieldLabel, null, "Amount (DC)"), React__default.createElement(StyledInput, {
30714
+ disabled: transferLoading,
30715
+ autoComplete: "off"
30716
+ }), showDropdown && searchResults && searchResults.length > 0 && React__default.createElement(DropdownList, null, searchResults.map(function (_char) {
30717
+ return React__default.createElement(DropdownItem, {
30718
+ key: _char._id,
30719
+ onPointerDown: function onPointerDown() {
30720
+ setRecipientName(_char.name);
30721
+ setShowDropdown(false);
30722
+ }
30723
+ }, _char.name);
30724
+ }))), React__default.createElement(FieldLabel, null, "Amount (DC)"), React__default.createElement(StyledInput, {
30674
30725
  type: "number",
30675
30726
  min: 1,
30676
30727
  value: amount,
@@ -30731,6 +30782,18 @@ var ErrorMessage = /*#__PURE__*/styled__default.div.withConfig({
30731
30782
  displayName: "DCTransferPanel__ErrorMessage",
30732
30783
  componentId: "sc-k1vvb1-6"
30733
30784
  })(["font-size:9px;color:", ";font-family:'Press Start 2P',cursive;"], uiColors.red);
30785
+ var AutocompleteWrapper = /*#__PURE__*/styled__default.div.withConfig({
30786
+ displayName: "DCTransferPanel__AutocompleteWrapper",
30787
+ componentId: "sc-k1vvb1-7"
30788
+ })(["position:relative;width:100%;"]);
30789
+ var DropdownList = /*#__PURE__*/styled__default.ul.withConfig({
30790
+ displayName: "DCTransferPanel__DropdownList",
30791
+ componentId: "sc-k1vvb1-8"
30792
+ })(["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;"]);
30793
+ var DropdownItem = /*#__PURE__*/styled__default.li.withConfig({
30794
+ displayName: "DCTransferPanel__DropdownItem",
30795
+ componentId: "sc-k1vvb1-9"
30796
+ })(["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);
30734
30797
 
30735
30798
  var DCWalletModal = function DCWalletModal(_ref) {
30736
30799
  var _historyData$transact, _historyData$totalPag, _historyData$currentP;
@@ -30745,7 +30808,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30745
30808
  onClearTransferResult = _ref.onClearTransferResult,
30746
30809
  characterName = _ref.characterName,
30747
30810
  onInputFocus = _ref.onInputFocus,
30748
- onInputBlur = _ref.onInputBlur;
30811
+ onInputBlur = _ref.onInputBlur,
30812
+ onBuyDC = _ref.onBuyDC,
30813
+ onSearchCharacter = _ref.onSearchCharacter,
30814
+ searchResults = _ref.searchResults;
30749
30815
  var _useState = React.useState('balance'),
30750
30816
  activeTab = _useState[0],
30751
30817
  setActiveTab = _useState[1];
@@ -30755,7 +30821,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30755
30821
  var tabs = [{
30756
30822
  id: 'balance',
30757
30823
  title: 'Balance',
30758
- content: React__default.createElement(BalanceContent, null, React__default.createElement(BalanceLabel, null, "Your DC Balance"), React__default.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), React__default.createElement(BalanceHint, null, "Buy DC packs from the Store > Packs tab."))
30824
+ content: React__default.createElement(BalanceContent, null, React__default.createElement(BalanceLabel, null, "Your DC Balance"), React__default.createElement(BalanceAmount, null, dcBalance.toLocaleString(), " DC"), onBuyDC && React__default.createElement(BuyButton, {
30825
+ onPointerDown: onBuyDC,
30826
+ title: "Buy Definya Coins"
30827
+ }, React__default.createElement(fa.FaShoppingCart, null), React__default.createElement(BuyButtonLabel, null, "Buy DC")))
30759
30828
  }, {
30760
30829
  id: 'transfer',
30761
30830
  title: 'Transfer',
@@ -30767,7 +30836,9 @@ var DCWalletModal = function DCWalletModal(_ref) {
30767
30836
  onClearTransferResult: onClearTransferResult,
30768
30837
  characterName: characterName,
30769
30838
  onInputFocus: onInputFocus,
30770
- onInputBlur: onInputBlur
30839
+ onInputBlur: onInputBlur,
30840
+ onSearchCharacter: onSearchCharacter,
30841
+ searchResults: searchResults
30771
30842
  })
30772
30843
  }, {
30773
30844
  id: 'history',
@@ -30793,7 +30864,10 @@ var DCWalletModal = function DCWalletModal(_ref) {
30793
30864
  tabs: tabs,
30794
30865
  activeTab: activeTab,
30795
30866
  onTabChange: function onTabChange(tabId) {
30796
- return setActiveTab(tabId);
30867
+ setActiveTab(tabId);
30868
+ if (tabId === 'history') {
30869
+ onRequestHistory(1);
30870
+ }
30797
30871
  },
30798
30872
  activeTextColor: "#000000",
30799
30873
  activeColor: "#fef08a",
@@ -30842,10 +30916,14 @@ var BalanceAmount = /*#__PURE__*/styled__default.div.withConfig({
30842
30916
  displayName: "DCWalletModal__BalanceAmount",
30843
30917
  componentId: "sc-12xy88y-9"
30844
30918
  })(["font-family:'Press Start 2P',cursive;font-size:28px;color:#fef08a;text-shadow:2px 2px 0 #000;letter-spacing:2px;"]);
30845
- var BalanceHint = /*#__PURE__*/styled__default.span.withConfig({
30846
- displayName: "DCWalletModal__BalanceHint",
30919
+ var BuyButton = /*#__PURE__*/styled__default.button.withConfig({
30920
+ displayName: "DCWalletModal__BuyButton",
30847
30921
  componentId: "sc-12xy88y-10"
30848
- })(["font-family:'Press Start 2P',cursive;font-size:7px;color:", ";"], uiColors.lightGray);
30922
+ })(["display:flex;align-items:center;gap:8px;margin-top:8px;padding:10px 20px;background:#f59e0b;border:none;border-radius:6px;color:#000;cursor:pointer;font-size:1rem;&:hover{background:#fbbf24;}&:active{background:#d97706;}"]);
30923
+ var BuyButtonLabel = /*#__PURE__*/styled__default.span.withConfig({
30924
+ displayName: "DCWalletModal__BuyButtonLabel",
30925
+ componentId: "sc-12xy88y-11"
30926
+ })(["font-family:'Press Start 2P',cursive;font-size:8px;"]);
30849
30927
 
30850
30928
  var SimpleProgressBar = function SimpleProgressBar(_ref) {
30851
30929
  var value = _ref.value,