@rpg-engine/long-bow 0.8.206 → 0.8.207

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.
@@ -13818,6 +13818,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13818
13818
  var isOpen = _ref.isOpen,
13819
13819
  onClose = _ref.onClose,
13820
13820
  accountCharacters = _ref.accountCharacters,
13821
+ activeCharacterId = _ref.activeCharacterId,
13821
13822
  atlasJSON = _ref.atlasJSON,
13822
13823
  atlasIMG = _ref.atlasIMG,
13823
13824
  characterAtlasJSON = _ref.characterAtlasJSON,
@@ -13841,7 +13842,10 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13841
13842
  var eligibleCharacters = accountCharacters.filter(function (c) {
13842
13843
  return !c.isListedForSale && !c.tradedAt;
13843
13844
  });
13844
- var canList = !!selectedId && Number(price) > 0;
13845
+ var isActiveCharacter = function isActiveCharacter(c) {
13846
+ return !!activeCharacterId && c._id === activeCharacterId;
13847
+ };
13848
+ var canList = !!selectedId && Number(price) > 0 && selectedId !== activeCharacterId;
13845
13849
  var handleClose = function handleClose() {
13846
13850
  setSelectedId(null);
13847
13851
  setPrice('');
@@ -13883,23 +13887,27 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13883
13887
  type: "button"
13884
13888
  }, React.createElement(FaTimes, null))), React.createElement(CharacterList$1, null, eligibleCharacters.length === 0 ? React.createElement(EmptyState$6, null, "No eligible characters to list.") : eligibleCharacters.map(function (character) {
13885
13889
  var isSelected = selectedId === character._id;
13890
+ var isActive = isActiveCharacter(character);
13886
13891
  return React.createElement(CharacterRow, {
13887
13892
  key: character._id,
13888
- "$selected": isSelected,
13893
+ "$selected": isSelected && !isActive,
13894
+ "$disabled": isActive,
13889
13895
  onPointerDown: function onPointerDown() {
13890
- return setSelectedId(character._id);
13896
+ return !isActive && setSelectedId(character._id);
13891
13897
  },
13892
13898
  role: "radio",
13893
- "aria-checked": isSelected,
13894
- tabIndex: 0,
13899
+ "aria-checked": isSelected && !isActive,
13900
+ "aria-disabled": isActive,
13901
+ tabIndex: isActive ? -1 : 0,
13895
13902
  onKeyDown: function onKeyDown(e) {
13896
- if (e.key === 'Enter' || e.key === ' ') {
13903
+ if (!isActive && (e.key === 'Enter' || e.key === ' ')) {
13897
13904
  e.preventDefault();
13898
13905
  setSelectedId(character._id);
13899
13906
  }
13900
13907
  }
13901
13908
  }, React.createElement(RadioCircle$1, {
13902
- "$selected": isSelected
13909
+ "$selected": isSelected && !isActive,
13910
+ "$disabled": isActive
13903
13911
  }), React.createElement(SpriteWrapper$3, null, React.createElement(SpriteFromAtlas, {
13904
13912
  atlasIMG: characterAtlasIMG,
13905
13913
  atlasJSON: characterAtlasJSON,
@@ -13907,7 +13915,7 @@ var CharacterListingModal = function CharacterListingModal(_ref) {
13907
13915
  imgScale: 2,
13908
13916
  height: 40,
13909
13917
  width: 40
13910
- })), React.createElement(CharacterInfo$1, null, React.createElement(CharacterName$3, null, character.name || 'Unknown'), React.createElement(CharacterMeta$1, null, "Level ", getLevel(character))));
13918
+ })), React.createElement(CharacterInfo$1, null, React.createElement(CharacterName$3, null, character.name || 'Unknown'), React.createElement(CharacterMeta$1, null, "Level ", getLevel(character))), isActive && React.createElement(ActiveTag, null, "In-game"));
13911
13919
  })), React.createElement(PriceSection$1, null, React.createElement(PriceLabel, null, "Set Price (DC)"), React.createElement(PriceRow$1, null, React.createElement(Input, {
13912
13920
  onChange: function onChange(e) {
13913
13921
  return setPrice(e.target.value);
@@ -13969,76 +13977,94 @@ var CharacterList$1 = /*#__PURE__*/styled.div.withConfig({
13969
13977
  var CharacterRow = /*#__PURE__*/styled.div.withConfig({
13970
13978
  displayName: "CharacterListingModal__CharacterRow",
13971
13979
  componentId: "sc-1uxkx35-7"
13972
- })(["display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid ", ";border-radius:6px;background:", ";cursor:pointer;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) {
13973
- var $selected = _ref2.$selected;
13974
- return $selected ? '#f59e0b' : 'rgba(255,255,255,0.08)';
13980
+ })(["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) {
13981
+ var $selected = _ref2.$selected,
13982
+ $disabled = _ref2.$disabled;
13983
+ return $disabled ? 'rgba(255,255,255,0.04)' : $selected ? '#f59e0b' : 'rgba(255,255,255,0.08)';
13975
13984
  }, function (_ref3) {
13976
- var $selected = _ref3.$selected;
13977
- return $selected ? 'rgba(245,158,11,0.1)' : 'rgba(255,255,255,0.02)';
13985
+ var $selected = _ref3.$selected,
13986
+ $disabled = _ref3.$disabled;
13987
+ return $disabled ? 'rgba(0,0,0,0.15)' : $selected ? 'rgba(245,158,11,0.1)' : 'rgba(255,255,255,0.02)';
13978
13988
  }, function (_ref4) {
13979
- var $selected = _ref4.$selected;
13980
- return $selected ? '#f59e0b' : 'rgba(245,158,11,0.4)';
13989
+ var $disabled = _ref4.$disabled;
13990
+ return $disabled ? 'not-allowed' : 'pointer';
13981
13991
  }, function (_ref5) {
13982
- var $selected = _ref5.$selected;
13983
- return $selected ? 'rgba(245,158,11,0.1)' : 'rgba(245,158,11,0.05)';
13992
+ var $disabled = _ref5.$disabled;
13993
+ return $disabled ? 0.5 : 1;
13994
+ }, function (_ref6) {
13995
+ var $selected = _ref6.$selected,
13996
+ $disabled = _ref6.$disabled;
13997
+ return $disabled ? 'rgba(255,255,255,0.04)' : $selected ? '#f59e0b' : 'rgba(245,158,11,0.4)';
13998
+ }, function (_ref7) {
13999
+ var $selected = _ref7.$selected,
14000
+ $disabled = _ref7.$disabled;
14001
+ return $disabled ? 'rgba(0,0,0,0.15)' : $selected ? 'rgba(245,158,11,0.1)' : 'rgba(245,158,11,0.05)';
13984
14002
  });
13985
14003
  var RadioCircle$1 = /*#__PURE__*/styled.div.withConfig({
13986
14004
  displayName: "CharacterListingModal__RadioCircle",
13987
14005
  componentId: "sc-1uxkx35-8"
13988
- })(["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:#f59e0b;opacity:", ";transition:opacity 0.15s;}"], function (_ref6) {
13989
- var $selected = _ref6.$selected;
13990
- return $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
13991
- }, function (_ref7) {
13992
- var $selected = _ref7.$selected;
14006
+ })(["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) {
14007
+ var $selected = _ref8.$selected,
14008
+ $disabled = _ref8.$disabled;
14009
+ return $disabled ? 'rgba(255,255,255,0.15)' : $selected ? '#f59e0b' : 'rgba(255,255,255,0.4)';
14010
+ }, function (_ref9) {
14011
+ var $disabled = _ref9.$disabled;
14012
+ return $disabled ? 'rgba(255,255,255,0.15)' : '#f59e0b';
14013
+ }, function (_ref10) {
14014
+ var $selected = _ref10.$selected;
13993
14015
  return $selected ? 1 : 0;
13994
14016
  });
14017
+ var ActiveTag = /*#__PURE__*/styled.span.withConfig({
14018
+ displayName: "CharacterListingModal__ActiveTag",
14019
+ componentId: "sc-1uxkx35-9"
14020
+ })(["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;"]);
13995
14021
  var SpriteWrapper$3 = /*#__PURE__*/styled.div.withConfig({
13996
14022
  displayName: "CharacterListingModal__SpriteWrapper",
13997
- componentId: "sc-1uxkx35-9"
14023
+ componentId: "sc-1uxkx35-10"
13998
14024
  })(["display:flex;align-items:center;justify-content:center;image-rendering:pixelated;flex-shrink:0;width:40px;height:40px;"]);
13999
14025
  var CharacterInfo$1 = /*#__PURE__*/styled.div.withConfig({
14000
14026
  displayName: "CharacterListingModal__CharacterInfo",
14001
- componentId: "sc-1uxkx35-10"
14027
+ componentId: "sc-1uxkx35-11"
14002
14028
  })(["display:flex;flex-direction:column;gap:4px;flex:1;"]);
14003
14029
  var CharacterName$3 = /*#__PURE__*/styled.span.withConfig({
14004
14030
  displayName: "CharacterListingModal__CharacterName",
14005
- componentId: "sc-1uxkx35-11"
14031
+ componentId: "sc-1uxkx35-12"
14006
14032
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.5rem !important;color:#f3f4f6 !important;"]);
14007
14033
  var CharacterMeta$1 = /*#__PURE__*/styled.span.withConfig({
14008
14034
  displayName: "CharacterListingModal__CharacterMeta",
14009
- componentId: "sc-1uxkx35-12"
14035
+ componentId: "sc-1uxkx35-13"
14010
14036
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.4rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
14011
14037
  var PricePreview = /*#__PURE__*/styled.div.withConfig({
14012
14038
  displayName: "CharacterListingModal__PricePreview",
14013
- componentId: "sc-1uxkx35-13"
14039
+ componentId: "sc-1uxkx35-14"
14014
14040
  })(["display:flex;align-items:center;gap:6px;"]);
14015
14041
  var DCCoinWrapper$4 = /*#__PURE__*/styled.span.withConfig({
14016
14042
  displayName: "CharacterListingModal__DCCoinWrapper",
14017
- componentId: "sc-1uxkx35-14"
14043
+ componentId: "sc-1uxkx35-15"
14018
14044
  })(["display:flex;align-items:center;justify-content:center;flex-shrink:0;"]);
14019
14045
  var PricePreviewAmount = /*#__PURE__*/styled.span.withConfig({
14020
14046
  displayName: "CharacterListingModal__PricePreviewAmount",
14021
- componentId: "sc-1uxkx35-15"
14047
+ componentId: "sc-1uxkx35-16"
14022
14048
  })(["font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#fef08a !important;"]);
14023
14049
  var PriceSection$1 = /*#__PURE__*/styled.div.withConfig({
14024
14050
  displayName: "CharacterListingModal__PriceSection",
14025
- componentId: "sc-1uxkx35-16"
14051
+ componentId: "sc-1uxkx35-17"
14026
14052
  })(["display:flex;flex-direction:column;gap:8px;border-top:1px solid rgba(255,255,255,0.06);padding-top:12px;"]);
14027
14053
  var PriceLabel = /*#__PURE__*/styled.p.withConfig({
14028
14054
  displayName: "CharacterListingModal__PriceLabel",
14029
- componentId: "sc-1uxkx35-17"
14055
+ componentId: "sc-1uxkx35-18"
14030
14056
  })(["margin:0;font-family:'Press Start 2P',cursive !important;font-size:0.55rem !important;color:#888 !important;text-transform:uppercase;letter-spacing:0.5px;"]);
14031
14057
  var PriceRow$1 = /*#__PURE__*/styled.div.withConfig({
14032
14058
  displayName: "CharacterListingModal__PriceRow",
14033
- componentId: "sc-1uxkx35-18"
14059
+ componentId: "sc-1uxkx35-19"
14034
14060
  })(["display:flex;gap:8px;align-items:center;.price-input{flex:1;height:12px;}"]);
14035
14061
  var ListBtn = /*#__PURE__*/styled(CTAButton).withConfig({
14036
14062
  displayName: "CharacterListingModal__ListBtn",
14037
- componentId: "sc-1uxkx35-19"
14063
+ componentId: "sc-1uxkx35-20"
14038
14064
  })(["flex-shrink:0;padding:10px 16px;height:32px;span{font-size:0.6rem;}svg{font-size:1.1rem;}"]);
14039
14065
  var EmptyState$6 = /*#__PURE__*/styled.div.withConfig({
14040
14066
  displayName: "CharacterListingModal__EmptyState",
14041
- componentId: "sc-1uxkx35-20"
14067
+ componentId: "sc-1uxkx35-21"
14042
14068
  })(["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;"]);
14043
14069
 
14044
14070
  var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
@@ -14050,6 +14076,7 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14050
14076
  onCharacterDelist = _ref.onCharacterDelist,
14051
14077
  accountCharacters = _ref.accountCharacters,
14052
14078
  _onCharacterList = _ref.onCharacterList,
14079
+ activeCharacterId = _ref.activeCharacterId,
14053
14080
  atlasJSON = _ref.atlasJSON,
14054
14081
  atlasIMG = _ref.atlasIMG,
14055
14082
  characterAtlasJSON = _ref.characterAtlasJSON,
@@ -14090,6 +14117,7 @@ var MyCharacterListingsPanel = function MyCharacterListingsPanel(_ref) {
14090
14117
  return setIsListingModalOpen(false);
14091
14118
  },
14092
14119
  accountCharacters: accountCharacters,
14120
+ activeCharacterId: activeCharacterId,
14093
14121
  atlasJSON: atlasJSON,
14094
14122
  atlasIMG: atlasIMG,
14095
14123
  characterAtlasJSON: characterAtlasJSON,
@@ -14441,6 +14469,7 @@ var Marketplace = function Marketplace(props) {
14441
14469
  onCharacterDelist: onCharacterDelist != null ? onCharacterDelist : function () {},
14442
14470
  accountCharacters: accountCharacters != null ? accountCharacters : [],
14443
14471
  onCharacterList: onCharacterList != null ? onCharacterList : function () {},
14472
+ activeCharacterId: props.characterId,
14444
14473
  atlasJSON: props.atlasJSON,
14445
14474
  atlasIMG: props.atlasIMG,
14446
14475
  characterAtlasJSON: characterAtlasJSON != null ? characterAtlasJSON : props.atlasJSON,