@rpg-engine/long-bow 0.8.206 → 0.8.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Marketplace/CharacterListingModal.d.ts +2 -0
- package/dist/components/Marketplace/MyCharacterListingsPanel.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +150 -69
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +150 -69
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Marketplace/CharacterDetailModal.tsx +185 -96
- package/src/components/Marketplace/CharacterListingModal.tsx +37 -16
- package/src/components/Marketplace/Marketplace.tsx +1 -0
- package/src/components/Marketplace/MyCharacterListingsPanel.tsx +4 -0
|
@@ -4,6 +4,8 @@ export interface ICharacterListingModalProps {
|
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
onClose: () => void;
|
|
6
6
|
accountCharacters: ICharacter[];
|
|
7
|
+
/** ID of the currently active/playing character — cannot be listed */
|
|
8
|
+
activeCharacterId?: string;
|
|
7
9
|
/** Items atlas — for UI sprites like the DC coin */
|
|
8
10
|
atlasJSON: any;
|
|
9
11
|
atlasIMG: any;
|
|
@@ -10,6 +10,8 @@ export interface IMyCharacterListingsPanelProps {
|
|
|
10
10
|
/** Characters that can be listed (used for the List a Character modal) */
|
|
11
11
|
accountCharacters: ICharacter[];
|
|
12
12
|
onCharacterList: (characterId: string, price: number) => void;
|
|
13
|
+
/** ID of the currently active character */
|
|
14
|
+
activeCharacterId?: string;
|
|
13
15
|
/** Items atlas — for UI sprites like the DC coin */
|
|
14
16
|
atlasJSON: any;
|
|
15
17
|
atlasIMG: any;
|
|
@@ -13350,6 +13350,12 @@ var rarityColor$1 = function rarityColor(rarity) {
|
|
|
13350
13350
|
var _RARITY_COLORS$toLowe;
|
|
13351
13351
|
return (_RARITY_COLORS$toLowe = RARITY_COLORS$1[(rarity != null ? rarity : '').toLowerCase()]) != null ? _RARITY_COLORS$toLowe : RARITY_COLORS$1.common;
|
|
13352
13352
|
};
|
|
13353
|
+
var rarityGlowColor = function rarityGlowColor(rarity) {
|
|
13354
|
+
var _RARITY_COLORS$key;
|
|
13355
|
+
var key = (rarity != null ? rarity : '').toLowerCase();
|
|
13356
|
+
if (!key || key === 'common') return null;
|
|
13357
|
+
return (_RARITY_COLORS$key = RARITY_COLORS$1[key]) != null ? _RARITY_COLORS$key : null;
|
|
13358
|
+
};
|
|
13353
13359
|
var formatEquipmentSlot = function formatEquipmentSlot(slot) {
|
|
13354
13360
|
if (!slot) return 'Unknown';
|
|
13355
13361
|
return slot.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/[_-]+/g, ' ').replace(/\b\w/g, function (_char) {
|
|
@@ -13396,7 +13402,7 @@ var CharacterDetailModal = function CharacterDetailModal(_ref) {
|
|
|
13396
13402
|
var a = _ref2[1];
|
|
13397
13403
|
var b = _ref3[1];
|
|
13398
13404
|
return b - a;
|
|
13399
|
-
})
|
|
13405
|
+
});
|
|
13400
13406
|
return React__default.createElement(ModalPortal, null, isConfirming && React__default.createElement(ConfirmModal, {
|
|
13401
13407
|
onConfirm: handleConfirm,
|
|
13402
13408
|
onClose: function onClose() {
|
|
@@ -13414,7 +13420,7 @@ var CharacterDetailModal = function CharacterDetailModal(_ref) {
|
|
|
13414
13420
|
onPointerDown: handleClose,
|
|
13415
13421
|
"aria-label": "Close",
|
|
13416
13422
|
type: "button"
|
|
13417
|
-
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(HeroSection, null, React__default.createElement(SpriteContainer$5, null, React__default.createElement(SpriteFromAtlas, {
|
|
13423
|
+
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(ScrollableBody, null, React__default.createElement(HeroSection, null, React__default.createElement(SpriteContainer$5, null, React__default.createElement(SpriteFromAtlas, {
|
|
13418
13424
|
atlasIMG: characterAtlasIMG,
|
|
13419
13425
|
atlasJSON: characterAtlasJSON,
|
|
13420
13426
|
spriteKey: snap.textureKey + "/down/standing/0.png",
|
|
@@ -13424,7 +13430,7 @@ var CharacterDetailModal = function CharacterDetailModal(_ref) {
|
|
|
13424
13430
|
centered: true
|
|
13425
13431
|
})), React__default.createElement(HeroInfo, null, React__default.createElement(CharacterName$1, null, snap.name || 'Unknown'), React__default.createElement(CharacterClass, null, "Lv.", snap.level, " \xB7 ", snap["class"]), React__default.createElement(CharacterOrigin, null, snap.race, " \xB7 ", snap.faction), React__default.createElement(ModeBadge, {
|
|
13426
13432
|
"$hardcore": ((_snap$mode = snap.mode) == null ? void 0 : _snap$mode.toLowerCase()) === 'hardcore'
|
|
13427
|
-
}, snap.mode || 'Standard'))), React__default.createElement(Divider, null), React__default.createElement(MetaColumns, null, topSkills.length > 0 && React__default.createElement(Section$3, null, React__default.createElement(SectionTitle$3, null, "Skills"), React__default.createElement(SkillsList, null, topSkills.map(function (_ref4) {
|
|
13433
|
+
}, snap.mode || 'Standard'), snap.gold != null && snap.gold > 0 && React__default.createElement(GoldRow, null, React__default.createElement(GoldLabel, null, "GOLD"), React__default.createElement(GoldAmount$1, null, snap.gold.toLocaleString())))), React__default.createElement(Divider, null), React__default.createElement(MetaColumns, null, topSkills.length > 0 && React__default.createElement(Section$3, null, React__default.createElement(SectionTitle$3, null, "Skills"), React__default.createElement(SkillsList, null, topSkills.map(function (_ref4) {
|
|
13428
13434
|
var name = _ref4[0],
|
|
13429
13435
|
value = _ref4[1];
|
|
13430
13436
|
return React__default.createElement(SkillRow, {
|
|
@@ -13433,7 +13439,9 @@ var CharacterDetailModal = function CharacterDetailModal(_ref) {
|
|
|
13433
13439
|
}))), ((_snap$equipment = snap.equipment) == null ? void 0 : _snap$equipment.length) > 0 && React__default.createElement(Section$3, null, React__default.createElement(SectionTitle$3, null, "Equipment"), React__default.createElement(EquipmentList, null, snap.equipment.map(function (eq, i) {
|
|
13434
13440
|
return React__default.createElement(EquipmentRow, {
|
|
13435
13441
|
key: i
|
|
13436
|
-
}, React__default.createElement(EquipmentSprite,
|
|
13442
|
+
}, React__default.createElement(EquipmentSprite, {
|
|
13443
|
+
"$rarity": eq.rarity
|
|
13444
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
13437
13445
|
atlasIMG: atlasIMG,
|
|
13438
13446
|
atlasJSON: atlasJSON,
|
|
13439
13447
|
spriteKey: eq.itemKey,
|
|
@@ -13441,10 +13449,16 @@ var CharacterDetailModal = function CharacterDetailModal(_ref) {
|
|
|
13441
13449
|
width: 32,
|
|
13442
13450
|
height: 32,
|
|
13443
13451
|
centered: true
|
|
13444
|
-
})
|
|
13452
|
+
}), eq.attachedGems && eq.attachedGems.length > 0 && React__default.createElement(GemRow, null, eq.attachedGems.map(function (gem, gi) {
|
|
13453
|
+
var _gemColors$gem$key;
|
|
13454
|
+
return React__default.createElement(GemDot, {
|
|
13455
|
+
key: gi,
|
|
13456
|
+
"$color": (_gemColors$gem$key = gemColors[gem.key]) != null ? _gemColors$gem$key : '#fff'
|
|
13457
|
+
});
|
|
13458
|
+
}))), React__default.createElement(EquipMeta, null, React__default.createElement(EquipName, null, eq.itemName), React__default.createElement(EquipDetails, null, React__default.createElement(EquipSlot, null, formatEquipmentSlot(eq.slot)), React__default.createElement(RarityBadge, {
|
|
13445
13459
|
"$rarity": eq.rarity
|
|
13446
13460
|
}, eq.rarity || 'Common'))));
|
|
13447
|
-
})))), React__default.createElement(
|
|
13461
|
+
}))))), React__default.createElement(FooterDivider, null), React__default.createElement(Footer$1, null, React__default.createElement(SellerInfo, null, "Listed by ", listing.listedByCharacterName), React__default.createElement(FooterActions, null, React__default.createElement(PriceDisplay, null, React__default.createElement(DCCoinWrapper$2, null, React__default.createElement(SpriteFromAtlas, {
|
|
13448
13462
|
atlasIMG: atlasIMG,
|
|
13449
13463
|
atlasJSON: atlasJSON,
|
|
13450
13464
|
spriteKey: "others/definya-coin.png",
|
|
@@ -13472,7 +13486,7 @@ var ModalContainer$5 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
13472
13486
|
var ModalContent$5 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13473
13487
|
displayName: "CharacterDetailModal__ModalContent",
|
|
13474
13488
|
componentId: "sc-1kdn1l6-2"
|
|
13475
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px;width:580px;max-width:96%;max-height:85dvh;display:flex;flex-direction:column;gap:14px;overflow
|
|
13489
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 16px;width:580px;max-width:96%;max-height:85dvh;display:flex;flex-direction:column;gap:14px;overflow:hidden;pointer-events:auto;animation:", " 0.15s ease-out;"], scaleIn$2);
|
|
13476
13490
|
var Header$b = /*#__PURE__*/styled__default.div.withConfig({
|
|
13477
13491
|
displayName: "CharacterDetailModal__Header",
|
|
13478
13492
|
componentId: "sc-1kdn1l6-3"
|
|
@@ -13523,103 +13537,141 @@ var Divider = /*#__PURE__*/styled__default.hr.withConfig({
|
|
|
13523
13537
|
displayName: "CharacterDetailModal__Divider",
|
|
13524
13538
|
componentId: "sc-1kdn1l6-13"
|
|
13525
13539
|
})(["border:none;border-top:1px solid rgba(255,255,255,0.06);margin:0;flex-shrink:0;"]);
|
|
13540
|
+
var FooterDivider = /*#__PURE__*/styled__default(Divider).withConfig({
|
|
13541
|
+
displayName: "CharacterDetailModal__FooterDivider",
|
|
13542
|
+
componentId: "sc-1kdn1l6-14"
|
|
13543
|
+
})([""]);
|
|
13544
|
+
var ScrollableBody = /*#__PURE__*/styled__default.div.withConfig({
|
|
13545
|
+
displayName: "CharacterDetailModal__ScrollableBody",
|
|
13546
|
+
componentId: "sc-1kdn1l6-15"
|
|
13547
|
+
})(["flex:1;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:14px;min-height:0;&::-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;}"]);
|
|
13526
13548
|
var Section$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13527
13549
|
displayName: "CharacterDetailModal__Section",
|
|
13528
|
-
componentId: "sc-1kdn1l6-
|
|
13550
|
+
componentId: "sc-1kdn1l6-16"
|
|
13529
13551
|
})(["display:flex;flex-direction:column;gap:8px;"]);
|
|
13530
13552
|
var SectionTitle$3 = /*#__PURE__*/styled__default.span.withConfig({
|
|
13531
13553
|
displayName: "CharacterDetailModal__SectionTitle",
|
|
13532
|
-
componentId: "sc-1kdn1l6-
|
|
13554
|
+
componentId: "sc-1kdn1l6-17"
|
|
13533
13555
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.45rem !important;color:#f59e0b !important;text-transform:uppercase;letter-spacing:1px;"]);
|
|
13534
13556
|
var MetaColumns = /*#__PURE__*/styled__default.div.withConfig({
|
|
13535
13557
|
displayName: "CharacterDetailModal__MetaColumns",
|
|
13536
|
-
componentId: "sc-1kdn1l6-
|
|
13558
|
+
componentId: "sc-1kdn1l6-18"
|
|
13537
13559
|
})(["display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;@media (max-width:640px){grid-template-columns:1fr;}"]);
|
|
13538
13560
|
var SkillsList = /*#__PURE__*/styled__default.div.withConfig({
|
|
13539
13561
|
displayName: "CharacterDetailModal__SkillsList",
|
|
13540
|
-
componentId: "sc-1kdn1l6-
|
|
13562
|
+
componentId: "sc-1kdn1l6-19"
|
|
13541
13563
|
})(["display:flex;flex-direction:column;gap:4px;"]);
|
|
13542
13564
|
var SkillRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13543
13565
|
displayName: "CharacterDetailModal__SkillRow",
|
|
13544
|
-
componentId: "sc-1kdn1l6-
|
|
13566
|
+
componentId: "sc-1kdn1l6-20"
|
|
13545
13567
|
})(["display:flex;justify-content:space-between;align-items:center;gap:8px;"]);
|
|
13546
13568
|
var SkillName = /*#__PURE__*/styled__default.span.withConfig({
|
|
13547
13569
|
displayName: "CharacterDetailModal__SkillName",
|
|
13548
|
-
componentId: "sc-1kdn1l6-
|
|
13570
|
+
componentId: "sc-1kdn1l6-21"
|
|
13549
13571
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.38rem !important;color:#9ca3af !important;text-transform:capitalize;"]);
|
|
13550
13572
|
var SkillValue = /*#__PURE__*/styled__default.span.withConfig({
|
|
13551
13573
|
displayName: "CharacterDetailModal__SkillValue",
|
|
13552
|
-
componentId: "sc-1kdn1l6-
|
|
13574
|
+
componentId: "sc-1kdn1l6-22"
|
|
13553
13575
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.38rem !important;color:#fef08a !important;"]);
|
|
13554
13576
|
var EquipmentList = /*#__PURE__*/styled__default.div.withConfig({
|
|
13555
13577
|
displayName: "CharacterDetailModal__EquipmentList",
|
|
13556
|
-
componentId: "sc-1kdn1l6-
|
|
13578
|
+
componentId: "sc-1kdn1l6-23"
|
|
13557
13579
|
})(["display:flex;flex-direction:column;gap:5px;"]);
|
|
13558
13580
|
var EquipmentRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13559
13581
|
displayName: "CharacterDetailModal__EquipmentRow",
|
|
13560
|
-
componentId: "sc-1kdn1l6-
|
|
13582
|
+
componentId: "sc-1kdn1l6-24"
|
|
13561
13583
|
})(["display:flex;align-items:center;gap:8px;padding:5px 8px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.05);border-radius:4px;min-width:0;"]);
|
|
13562
13584
|
var EquipmentSprite = /*#__PURE__*/styled__default.div.withConfig({
|
|
13563
13585
|
displayName: "CharacterDetailModal__EquipmentSprite",
|
|
13564
|
-
componentId: "sc-1kdn1l6-
|
|
13565
|
-
})(["display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;"])
|
|
13586
|
+
componentId: "sc-1kdn1l6-25"
|
|
13587
|
+
})(["position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:3px;", ""], function (_ref7) {
|
|
13588
|
+
var $rarity = _ref7.$rarity;
|
|
13589
|
+
var color = rarityGlowColor($rarity);
|
|
13590
|
+
return color ? "box-shadow: 0 0 4px 3px " + color + " inset, 0 0 6px 2px " + color + ";" : '';
|
|
13591
|
+
});
|
|
13592
|
+
var GemRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13593
|
+
displayName: "CharacterDetailModal__GemRow",
|
|
13594
|
+
componentId: "sc-1kdn1l6-26"
|
|
13595
|
+
})(["position:absolute;bottom:-1px;left:0;display:flex;gap:1px;pointer-events:none;"]);
|
|
13596
|
+
var GemDot = /*#__PURE__*/styled__default.div.withConfig({
|
|
13597
|
+
displayName: "CharacterDetailModal__GemDot",
|
|
13598
|
+
componentId: "sc-1kdn1l6-27"
|
|
13599
|
+
})(["width:5px;height:5px;border-radius:1px;transform:rotate(45deg);background:radial-gradient( circle at 30% 30%,rgba(255,255,255,0.8),transparent 40% ),linear-gradient(45deg,", ",rgba(255,255,255,0.2));border:1px solid rgba(0,0,0,0.6);box-shadow:0 0 3px ", ";"], function (_ref8) {
|
|
13600
|
+
var $color = _ref8.$color;
|
|
13601
|
+
return $color;
|
|
13602
|
+
}, function (_ref9) {
|
|
13603
|
+
var $color = _ref9.$color;
|
|
13604
|
+
return $color;
|
|
13605
|
+
});
|
|
13606
|
+
var GoldRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13607
|
+
displayName: "CharacterDetailModal__GoldRow",
|
|
13608
|
+
componentId: "sc-1kdn1l6-28"
|
|
13609
|
+
})(["display:flex;align-items:center;gap:4px;margin-top:2px;"]);
|
|
13610
|
+
var GoldLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
13611
|
+
displayName: "CharacterDetailModal__GoldLabel",
|
|
13612
|
+
componentId: "sc-1kdn1l6-29"
|
|
13613
|
+
})(["font-family:'Press Start 2P',cursive !important;font-size:0.35rem !important;color:#6b7280 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
13614
|
+
var GoldAmount$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
13615
|
+
displayName: "CharacterDetailModal__GoldAmount",
|
|
13616
|
+
componentId: "sc-1kdn1l6-30"
|
|
13617
|
+
})(["font-family:'Press Start 2P',cursive !important;font-size:0.38rem !important;color:#fde68a !important;"]);
|
|
13566
13618
|
var EquipMeta = /*#__PURE__*/styled__default.div.withConfig({
|
|
13567
13619
|
displayName: "CharacterDetailModal__EquipMeta",
|
|
13568
|
-
componentId: "sc-1kdn1l6-
|
|
13620
|
+
componentId: "sc-1kdn1l6-31"
|
|
13569
13621
|
})(["display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;"]);
|
|
13570
13622
|
var EquipDetails = /*#__PURE__*/styled__default.div.withConfig({
|
|
13571
13623
|
displayName: "CharacterDetailModal__EquipDetails",
|
|
13572
|
-
componentId: "sc-1kdn1l6-
|
|
13624
|
+
componentId: "sc-1kdn1l6-32"
|
|
13573
13625
|
})(["display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;"]);
|
|
13574
13626
|
var EquipSlot = /*#__PURE__*/styled__default.span.withConfig({
|
|
13575
13627
|
displayName: "CharacterDetailModal__EquipSlot",
|
|
13576
|
-
componentId: "sc-1kdn1l6-
|
|
13628
|
+
componentId: "sc-1kdn1l6-33"
|
|
13577
13629
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.34rem !important;color:#6b7280 !important;text-transform:capitalize;min-width:0;"]);
|
|
13578
13630
|
var EquipName = /*#__PURE__*/styled__default.span.withConfig({
|
|
13579
13631
|
displayName: "CharacterDetailModal__EquipName",
|
|
13580
|
-
componentId: "sc-1kdn1l6-
|
|
13632
|
+
componentId: "sc-1kdn1l6-34"
|
|
13581
13633
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.38rem !important;color:#d1d5db !important;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]);
|
|
13582
13634
|
var RarityBadge = /*#__PURE__*/styled__default.span.withConfig({
|
|
13583
13635
|
displayName: "CharacterDetailModal__RarityBadge",
|
|
13584
|
-
componentId: "sc-1kdn1l6-
|
|
13585
|
-
})(["font-family:'Press Start 2P',cursive !important;font-size:0.32rem !important;color:", " !important;border:1px solid ", "44;border-radius:2px;padding:1px 4px;text-transform:uppercase;flex-shrink:0;"], function (
|
|
13586
|
-
var $rarity =
|
|
13636
|
+
componentId: "sc-1kdn1l6-35"
|
|
13637
|
+
})(["font-family:'Press Start 2P',cursive !important;font-size:0.32rem !important;color:", " !important;border:1px solid ", "44;border-radius:2px;padding:1px 4px;text-transform:uppercase;flex-shrink:0;"], function (_ref10) {
|
|
13638
|
+
var $rarity = _ref10.$rarity;
|
|
13587
13639
|
return rarityColor$1($rarity);
|
|
13588
|
-
}, function (
|
|
13589
|
-
var $rarity =
|
|
13640
|
+
}, function (_ref11) {
|
|
13641
|
+
var $rarity = _ref11.$rarity;
|
|
13590
13642
|
return rarityColor$1($rarity);
|
|
13591
13643
|
});
|
|
13592
13644
|
var Footer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13593
13645
|
displayName: "CharacterDetailModal__Footer",
|
|
13594
|
-
componentId: "sc-1kdn1l6-
|
|
13646
|
+
componentId: "sc-1kdn1l6-36"
|
|
13595
13647
|
})(["display:flex;flex-direction:column;gap:8px;flex-shrink:0;"]);
|
|
13596
13648
|
var SellerInfo = /*#__PURE__*/styled__default.span.withConfig({
|
|
13597
13649
|
displayName: "CharacterDetailModal__SellerInfo",
|
|
13598
|
-
componentId: "sc-1kdn1l6-
|
|
13650
|
+
componentId: "sc-1kdn1l6-37"
|
|
13599
13651
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.38rem !important;color:#6b7280 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
13600
13652
|
var FooterActions = /*#__PURE__*/styled__default.div.withConfig({
|
|
13601
13653
|
displayName: "CharacterDetailModal__FooterActions",
|
|
13602
|
-
componentId: "sc-1kdn1l6-
|
|
13654
|
+
componentId: "sc-1kdn1l6-38"
|
|
13603
13655
|
})(["display:flex;align-items:center;justify-content:space-between;gap:12px;@media (max-width:640px){flex-direction:column;align-items:stretch;}"]);
|
|
13604
13656
|
var PriceDisplay = /*#__PURE__*/styled__default.div.withConfig({
|
|
13605
13657
|
displayName: "CharacterDetailModal__PriceDisplay",
|
|
13606
|
-
componentId: "sc-1kdn1l6-
|
|
13658
|
+
componentId: "sc-1kdn1l6-39"
|
|
13607
13659
|
})(["display:flex;align-items:center;gap:6px;line-height:1;"]);
|
|
13608
13660
|
var DCCoinWrapper$2 = /*#__PURE__*/styled__default.span.withConfig({
|
|
13609
13661
|
displayName: "CharacterDetailModal__DCCoinWrapper",
|
|
13610
|
-
componentId: "sc-1kdn1l6-
|
|
13662
|
+
componentId: "sc-1kdn1l6-40"
|
|
13611
13663
|
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:0;"]);
|
|
13612
13664
|
var PriceAmount = /*#__PURE__*/styled__default.span.withConfig({
|
|
13613
13665
|
displayName: "CharacterDetailModal__PriceAmount",
|
|
13614
|
-
componentId: "sc-1kdn1l6-
|
|
13666
|
+
componentId: "sc-1kdn1l6-41"
|
|
13615
13667
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.7rem !important;color:#fef08a !important;"]);
|
|
13616
13668
|
var BuyBtn = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
13617
13669
|
displayName: "CharacterDetailModal__BuyBtn",
|
|
13618
|
-
componentId: "sc-1kdn1l6-
|
|
13670
|
+
componentId: "sc-1kdn1l6-42"
|
|
13619
13671
|
})(["flex-shrink:0;padding:10px 18px;height:34px;span{font-size:0.6rem;}"]);
|
|
13620
13672
|
var PendingNotice = /*#__PURE__*/styled__default.span.withConfig({
|
|
13621
13673
|
displayName: "CharacterDetailModal__PendingNotice",
|
|
13622
|
-
componentId: "sc-1kdn1l6-
|
|
13674
|
+
componentId: "sc-1kdn1l6-43"
|
|
13623
13675
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.35rem !important;color:#ef4444 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
13624
13676
|
|
|
13625
13677
|
var CharacterMarketplacePanel = function CharacterMarketplacePanel(_ref) {
|
|
@@ -13821,6 +13873,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13821
13873
|
var isOpen = _ref.isOpen,
|
|
13822
13874
|
onClose = _ref.onClose,
|
|
13823
13875
|
accountCharacters = _ref.accountCharacters,
|
|
13876
|
+
activeCharacterId = _ref.activeCharacterId,
|
|
13824
13877
|
atlasJSON = _ref.atlasJSON,
|
|
13825
13878
|
atlasIMG = _ref.atlasIMG,
|
|
13826
13879
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
@@ -13844,7 +13897,10 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13844
13897
|
var eligibleCharacters = accountCharacters.filter(function (c) {
|
|
13845
13898
|
return !c.isListedForSale && !c.tradedAt;
|
|
13846
13899
|
});
|
|
13847
|
-
var
|
|
13900
|
+
var isActiveCharacter = function isActiveCharacter(c) {
|
|
13901
|
+
return !!activeCharacterId && c._id === activeCharacterId;
|
|
13902
|
+
};
|
|
13903
|
+
var canList = !!selectedId && Number(price) > 0 && selectedId !== activeCharacterId;
|
|
13848
13904
|
var handleClose = function handleClose() {
|
|
13849
13905
|
setSelectedId(null);
|
|
13850
13906
|
setPrice('');
|
|
@@ -13886,23 +13942,27 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13886
13942
|
type: "button"
|
|
13887
13943
|
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(CharacterList$1, null, eligibleCharacters.length === 0 ? React__default.createElement(EmptyState$6, null, "No eligible characters to list.") : eligibleCharacters.map(function (character) {
|
|
13888
13944
|
var isSelected = selectedId === character._id;
|
|
13945
|
+
var isActive = isActiveCharacter(character);
|
|
13889
13946
|
return React__default.createElement(CharacterRow, {
|
|
13890
13947
|
key: character._id,
|
|
13891
|
-
"$selected": isSelected,
|
|
13948
|
+
"$selected": isSelected && !isActive,
|
|
13949
|
+
"$disabled": isActive,
|
|
13892
13950
|
onPointerDown: function onPointerDown() {
|
|
13893
|
-
return setSelectedId(character._id);
|
|
13951
|
+
return !isActive && setSelectedId(character._id);
|
|
13894
13952
|
},
|
|
13895
13953
|
role: "radio",
|
|
13896
|
-
"aria-checked": isSelected,
|
|
13897
|
-
|
|
13954
|
+
"aria-checked": isSelected && !isActive,
|
|
13955
|
+
"aria-disabled": isActive,
|
|
13956
|
+
tabIndex: isActive ? -1 : 0,
|
|
13898
13957
|
onKeyDown: function onKeyDown(e) {
|
|
13899
|
-
if (e.key === 'Enter' || e.key === ' ') {
|
|
13958
|
+
if (!isActive && (e.key === 'Enter' || e.key === ' ')) {
|
|
13900
13959
|
e.preventDefault();
|
|
13901
13960
|
setSelectedId(character._id);
|
|
13902
13961
|
}
|
|
13903
13962
|
}
|
|
13904
13963
|
}, React__default.createElement(RadioCircle$1, {
|
|
13905
|
-
"$selected": isSelected
|
|
13964
|
+
"$selected": isSelected && !isActive,
|
|
13965
|
+
"$disabled": isActive
|
|
13906
13966
|
}), React__default.createElement(SpriteWrapper$3, null, React__default.createElement(SpriteFromAtlas, {
|
|
13907
13967
|
atlasIMG: characterAtlasIMG,
|
|
13908
13968
|
atlasJSON: characterAtlasJSON,
|
|
@@ -13910,7 +13970,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
|
|
|
13910
13970
|
imgScale: 2,
|
|
13911
13971
|
height: 40,
|
|
13912
13972
|
width: 40
|
|
13913
|
-
})), React__default.createElement(CharacterInfo$1, null, React__default.createElement(CharacterName$3, null, character.name || 'Unknown'), React__default.createElement(CharacterMeta$1, null, "Level ", getLevel(character))));
|
|
13973
|
+
})), React__default.createElement(CharacterInfo$1, null, React__default.createElement(CharacterName$3, null, character.name || 'Unknown'), React__default.createElement(CharacterMeta$1, null, "Level ", getLevel(character))), isActive && React__default.createElement(ActiveTag, null, "In-game"));
|
|
13914
13974
|
})), React__default.createElement(PriceSection$1, null, React__default.createElement(PriceLabel, null, "Set Price (DC)"), React__default.createElement(PriceRow$1, null, React__default.createElement(Input, {
|
|
13915
13975
|
onChange: function onChange(e) {
|
|
13916
13976
|
return setPrice(e.target.value);
|
|
@@ -13972,76 +14032,94 @@ var CharacterList$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
13972
14032
|
var CharacterRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
13973
14033
|
displayName: "CharacterListingModal__CharacterRow",
|
|
13974
14034
|
componentId: "sc-1uxkx35-7"
|
|
13975
|
-
})(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:
|
|
13976
|
-
var $selected = _ref2.$selected
|
|
13977
|
-
|
|
14035
|
+
})(["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) {
|
|
14036
|
+
var $selected = _ref2.$selected,
|
|
14037
|
+
$disabled = _ref2.$disabled;
|
|
14038
|
+
return $disabled ? 'rgba(255,255,255,0.04)' : $selected ? '#f59e0b' : 'rgba(255,255,255,0.08)';
|
|
13978
14039
|
}, function (_ref3) {
|
|
13979
|
-
var $selected = _ref3.$selected
|
|
13980
|
-
|
|
14040
|
+
var $selected = _ref3.$selected,
|
|
14041
|
+
$disabled = _ref3.$disabled;
|
|
14042
|
+
return $disabled ? 'rgba(0,0,0,0.15)' : $selected ? 'rgba(245,158,11,0.1)' : 'rgba(255,255,255,0.02)';
|
|
13981
14043
|
}, function (_ref4) {
|
|
13982
|
-
var $
|
|
13983
|
-
return $
|
|
14044
|
+
var $disabled = _ref4.$disabled;
|
|
14045
|
+
return $disabled ? 'not-allowed' : 'pointer';
|
|
13984
14046
|
}, function (_ref5) {
|
|
13985
|
-
var $
|
|
13986
|
-
return $
|
|
14047
|
+
var $disabled = _ref5.$disabled;
|
|
14048
|
+
return $disabled ? 0.5 : 1;
|
|
14049
|
+
}, function (_ref6) {
|
|
14050
|
+
var $selected = _ref6.$selected,
|
|
14051
|
+
$disabled = _ref6.$disabled;
|
|
14052
|
+
return $disabled ? 'rgba(255,255,255,0.04)' : $selected ? '#f59e0b' : 'rgba(245,158,11,0.4)';
|
|
14053
|
+
}, function (_ref7) {
|
|
14054
|
+
var $selected = _ref7.$selected,
|
|
14055
|
+
$disabled = _ref7.$disabled;
|
|
14056
|
+
return $disabled ? 'rgba(0,0,0,0.15)' : $selected ? 'rgba(245,158,11,0.1)' : 'rgba(245,158,11,0.05)';
|
|
13987
14057
|
});
|
|
13988
14058
|
var RadioCircle$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13989
14059
|
displayName: "CharacterListingModal__RadioCircle",
|
|
13990
14060
|
componentId: "sc-1uxkx35-8"
|
|
13991
|
-
})(["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
|
|
13992
|
-
var $selected =
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
14061
|
+
})(["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) {
|
|
14062
|
+
var $selected = _ref8.$selected,
|
|
14063
|
+
$disabled = _ref8.$disabled;
|
|
14064
|
+
return $disabled ? 'rgba(255,255,255,0.15)' : $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
|
|
14065
|
+
}, function (_ref9) {
|
|
14066
|
+
var $disabled = _ref9.$disabled;
|
|
14067
|
+
return $disabled ? 'rgba(255,255,255,0.15)' : '#f59e0b';
|
|
14068
|
+
}, function (_ref10) {
|
|
14069
|
+
var $selected = _ref10.$selected;
|
|
13996
14070
|
return $selected ? 1 : 0;
|
|
13997
14071
|
});
|
|
14072
|
+
var ActiveTag = /*#__PURE__*/styled__default.span.withConfig({
|
|
14073
|
+
displayName: "CharacterListingModal__ActiveTag",
|
|
14074
|
+
componentId: "sc-1uxkx35-9"
|
|
14075
|
+
})(["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;"]);
|
|
13998
14076
|
var SpriteWrapper$3 = /*#__PURE__*/styled__default.div.withConfig({
|
|
13999
14077
|
displayName: "CharacterListingModal__SpriteWrapper",
|
|
14000
|
-
componentId: "sc-1uxkx35-
|
|
14078
|
+
componentId: "sc-1uxkx35-10"
|
|
14001
14079
|
})(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
|
|
14002
14080
|
var CharacterInfo$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14003
14081
|
displayName: "CharacterListingModal__CharacterInfo",
|
|
14004
|
-
componentId: "sc-1uxkx35-
|
|
14082
|
+
componentId: "sc-1uxkx35-11"
|
|
14005
14083
|
})(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
|
|
14006
14084
|
var CharacterName$3 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14007
14085
|
displayName: "CharacterListingModal__CharacterName",
|
|
14008
|
-
componentId: "sc-1uxkx35-
|
|
14086
|
+
componentId: "sc-1uxkx35-12"
|
|
14009
14087
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
|
|
14010
14088
|
var CharacterMeta$1 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14011
14089
|
displayName: "CharacterListingModal__CharacterMeta",
|
|
14012
|
-
componentId: "sc-1uxkx35-
|
|
14090
|
+
componentId: "sc-1uxkx35-13"
|
|
14013
14091
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
14014
14092
|
var PricePreview = /*#__PURE__*/styled__default.div.withConfig({
|
|
14015
14093
|
displayName: "CharacterListingModal__PricePreview",
|
|
14016
|
-
componentId: "sc-1uxkx35-
|
|
14094
|
+
componentId: "sc-1uxkx35-14"
|
|
14017
14095
|
})(["display:flex;align-items:center;gap:6px;"]);
|
|
14018
14096
|
var DCCoinWrapper$4 = /*#__PURE__*/styled__default.span.withConfig({
|
|
14019
14097
|
displayName: "CharacterListingModal__DCCoinWrapper",
|
|
14020
|
-
componentId: "sc-1uxkx35-
|
|
14098
|
+
componentId: "sc-1uxkx35-15"
|
|
14021
14099
|
})(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
|
|
14022
14100
|
var PricePreviewAmount = /*#__PURE__*/styled__default.span.withConfig({
|
|
14023
14101
|
displayName: "CharacterListingModal__PricePreviewAmount",
|
|
14024
|
-
componentId: "sc-1uxkx35-
|
|
14102
|
+
componentId: "sc-1uxkx35-16"
|
|
14025
14103
|
})(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
|
|
14026
14104
|
var PriceSection$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14027
14105
|
displayName: "CharacterListingModal__PriceSection",
|
|
14028
|
-
componentId: "sc-1uxkx35-
|
|
14106
|
+
componentId: "sc-1uxkx35-17"
|
|
14029
14107
|
})(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
|
|
14030
14108
|
var PriceLabel = /*#__PURE__*/styled__default.p.withConfig({
|
|
14031
14109
|
displayName: "CharacterListingModal__PriceLabel",
|
|
14032
|
-
componentId: "sc-1uxkx35-
|
|
14110
|
+
componentId: "sc-1uxkx35-18"
|
|
14033
14111
|
})(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
|
|
14034
14112
|
var PriceRow$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14035
14113
|
displayName: "CharacterListingModal__PriceRow",
|
|
14036
|
-
componentId: "sc-1uxkx35-
|
|
14114
|
+
componentId: "sc-1uxkx35-19"
|
|
14037
14115
|
})(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
|
|
14038
14116
|
var ListBtn = /*#__PURE__*/styled__default(CTAButton).withConfig({
|
|
14039
14117
|
displayName: "CharacterListingModal__ListBtn",
|
|
14040
|
-
componentId: "sc-1uxkx35-
|
|
14118
|
+
componentId: "sc-1uxkx35-20"
|
|
14041
14119
|
})(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
|
|
14042
14120
|
var EmptyState$6 = /*#__PURE__*/styled__default.div.withConfig({
|
|
14043
14121
|
displayName: "CharacterListingModal__EmptyState",
|
|
14044
|
-
componentId: "sc-1uxkx35-
|
|
14122
|
+
componentId: "sc-1uxkx35-21"
|
|
14045
14123
|
})(["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;"]);
|
|
14046
14124
|
|
|
14047
14125
|
var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
@@ -14053,6 +14131,7 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14053
14131
|
onCharacterDelist = _ref.onCharacterDelist,
|
|
14054
14132
|
accountCharacters = _ref.accountCharacters,
|
|
14055
14133
|
_onCharacterList = _ref.onCharacterList,
|
|
14134
|
+
activeCharacterId = _ref.activeCharacterId,
|
|
14056
14135
|
atlasJSON = _ref.atlasJSON,
|
|
14057
14136
|
atlasIMG = _ref.atlasIMG,
|
|
14058
14137
|
characterAtlasJSON = _ref.characterAtlasJSON,
|
|
@@ -14093,6 +14172,7 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
|
|
|
14093
14172
|
return setIsListingModalOpen(false);
|
|
14094
14173
|
},
|
|
14095
14174
|
accountCharacters: accountCharacters,
|
|
14175
|
+
activeCharacterId: activeCharacterId,
|
|
14096
14176
|
atlasJSON: atlasJSON,
|
|
14097
14177
|
atlasIMG: atlasIMG,
|
|
14098
14178
|
characterAtlasJSON: characterAtlasJSON,
|
|
@@ -14444,6 +14524,7 @@ var Marketplace = function Marketplace(props) {
|
|
|
14444
14524
|
onCharacterDelist: onCharacterDelist != null ? onCharacterDelist : function () {},
|
|
14445
14525
|
accountCharacters: accountCharacters != null ? accountCharacters : [],
|
|
14446
14526
|
onCharacterList: onCharacterList != null ? onCharacterList : function () {},
|
|
14527
|
+
activeCharacterId: props.characterId,
|
|
14447
14528
|
atlasJSON: props.atlasJSON,
|
|
14448
14529
|
atlasIMG: props.atlasIMG,
|
|
14449
14530
|
characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : props.atlasJSON,
|