@rpg-engine/long-bow 0.8.29 → 0.8.30

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.
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useContext,
2
2
  import styled, { css, keyframes } from 'styled-components';
3
3
  import { BeatLoader } from 'react-spinners';
4
4
  import { v4 } from 'uuid';
5
- import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
5
+ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
6
6
  import dayjs from 'dayjs';
7
7
  import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
8
8
  import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaChevronUp, FaChevronDown, FaReddit } from 'react-icons/fa';
@@ -27518,175 +27518,6 @@ function useTouchTarget() {
27518
27518
  return getTouchTarget;
27519
27519
  }
27520
27520
 
27521
- var rarityColor = function rarityColor(item) {
27522
- switch (item == null ? void 0 : item.rarity) {
27523
- case ItemRarities.Uncommon:
27524
- return 'rgba(13, 193, 13, 0.6)';
27525
- case ItemRarities.Rare:
27526
- return 'rgba(8, 104, 187, 0.6)';
27527
- case ItemRarities.Epic:
27528
- return 'rgba(191, 0, 255, 0.6)';
27529
- case ItemRarities.Legendary:
27530
- return 'rgba(255, 191, 0,0.6)';
27531
- default:
27532
- return null;
27533
- }
27534
- };
27535
-
27536
- var gemColors = {
27537
- 'emerald-gem': '#50C878',
27538
- 'topaz-radiance': '#FFC87C',
27539
- 'sapphire-gem': '#0F52BA',
27540
- 'ruby-gem': '#E0115F',
27541
- 'misty-quartz-gem': '#D9D9F3',
27542
- 'coral-reef-gem': '#FF7F50',
27543
- 'jasper-gem': '#D73B3E',
27544
- 'earthstone-gem': '#8B4513',
27545
- 'obsidian-gem': '#0B0C0E',
27546
- 'amethyst-gem': '#9966CC'
27547
- };
27548
- var defaultColor = '#FFFFFF'; // Default color (white)
27549
- var onRenderGems = function onRenderGems(item) {
27550
- var _item$attachedGems;
27551
- var gemQty = ((_item$attachedGems = item.attachedGems) == null ? void 0 : _item$attachedGems.length) || 0;
27552
- if (gemQty > 0) {
27553
- return React.createElement(ItemSlotQty, {
27554
- item: item
27555
- });
27556
- }
27557
- return undefined;
27558
- };
27559
- var ItemSlotQty = function ItemSlotQty(_ref) {
27560
- var _item$attachedGems2;
27561
- var item = _ref.item;
27562
- var itemId = item._id;
27563
- return React.createElement(ItemQtyContainer, {
27564
- key: "qty-" + itemId,
27565
- className: "item-slot-qty"
27566
- }, (_item$attachedGems2 = item.attachedGems) == null ? void 0 : _item$attachedGems2.map(function (gem, index) {
27567
- return React.createElement(Gem, {
27568
- key: itemId + "-gem-" + index,
27569
- color: gemColors[gem.key] || defaultColor
27570
- });
27571
- }));
27572
- };
27573
- var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
27574
- displayName: "ItemGem__ItemQtyContainer",
27575
- componentId: "sc-1ekseaq-0"
27576
- })(["position:relative;width:85%;height:16px;top:28px;left:0px;pointer-events:none;transform:scale(0.8);display:flex;align-items:center;justify-content:flex-start;opacity:0.8;"]);
27577
- var Gem = /*#__PURE__*/styled.div.withConfig({
27578
- displayName: "ItemGem__Gem",
27579
- componentId: "sc-1ekseaq-1"
27580
- })(["width:8px;height:8px;background:", ";border:1px solid black;transform:rotate(45deg);margin:0 2px;box-shadow:0 0 5px ", ";transition:transform 0.2s,box-shadow 0.2s;&:hover{transform:rotate(45deg) scale(1.2);box-shadow:0 0 10px ", ";}"], function (_ref2) {
27581
- var color = _ref2.color;
27582
- return "radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 30%), \n linear-gradient(45deg, " + color + ", " + color + " 50%, rgba(255, 255, 255, 0.2))";
27583
- }, function (_ref3) {
27584
- var color = _ref3.color;
27585
- return color;
27586
- }, function (_ref4) {
27587
- var color = _ref4.color;
27588
- return color;
27589
- });
27590
-
27591
- var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
27592
- var isFractionalStackQty = stackQty % 1 !== 0;
27593
- var isLargerThan999 = stackQty > 999;
27594
- var qtyClassName = 'regular';
27595
- if (isLargerThan999) qtyClassName = 'small';
27596
- if (isFractionalStackQty) qtyClassName = 'xsmall';
27597
- if (stackQty > 1) {
27598
- return React.createElement(ItemSlotQty$1, {
27599
- itemId: itemId,
27600
- stackQty: stackQty,
27601
- qtyClassName: qtyClassName
27602
- });
27603
- }
27604
- return undefined;
27605
- };
27606
- var ItemSlotQty$1 = function ItemSlotQty(_ref) {
27607
- var itemId = _ref.itemId,
27608
- stackQty = _ref.stackQty,
27609
- qtyClassName = _ref.qtyClassName;
27610
- return React.createElement(ItemQtyContainer$1, {
27611
- key: "qty-" + itemId,
27612
- className: "item-slot-qty"
27613
- }, React.createElement(Ellipsis, {
27614
- maxLines: 1,
27615
- maxWidth: "48px"
27616
- }, React.createElement(ItemQty, {
27617
- className: qtyClassName
27618
- }, Math.round(stackQty * 100) / 100, ' ')));
27619
- };
27620
- var ItemQtyContainer$1 = /*#__PURE__*/styled.div.withConfig({
27621
- displayName: "ItemSlotQty__ItemQtyContainer",
27622
- componentId: "sc-keb1s5-0"
27623
- })(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
27624
- var ItemQty = /*#__PURE__*/styled.span.withConfig({
27625
- displayName: "ItemSlotQty__ItemQty",
27626
- componentId: "sc-keb1s5-1"
27627
- })(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
27628
-
27629
- var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
27630
- var containerType = _ref.containerType,
27631
- atlasJSON = _ref.atlasJSON,
27632
- atlasIMG = _ref.atlasIMG,
27633
- slotSpriteMask = _ref.slotSpriteMask,
27634
- item = _ref.item;
27635
- var renderStackInfo = function renderStackInfo(item) {
27636
- return item.stackQty && item.stackQty > 1 && onRenderStackInfo(item._id, item.stackQty);
27637
- };
27638
- var renderGems = function renderGems(item) {
27639
- return item.attachedGems && onRenderGems(item);
27640
- };
27641
- var renderItem = function renderItem(item) {
27642
- if (!(item != null && item.texturePath)) {
27643
- return null;
27644
- }
27645
- return React.createElement(ErrorBoundary, {
27646
- key: item._id
27647
- }, React.createElement(SpriteFromAtlas, {
27648
- atlasIMG: atlasIMG,
27649
- atlasJSON: atlasJSON,
27650
- spriteKey: getItemTextureKeyPath({
27651
- key: item.texturePath,
27652
- texturePath: item.texturePath,
27653
- stackQty: item.stackQty || 1,
27654
- isStackable: item.isStackable
27655
- }, atlasJSON),
27656
- imgScale: 3,
27657
- imgClassname: "sprite-from-atlas-img--item",
27658
- tintColor: item.tintColor
27659
- }), renderStackInfo(item), renderGems(item));
27660
- };
27661
- var renderEquipment = function renderEquipment(itemToRender) {
27662
- var _itemToRender$allowed;
27663
- if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
27664
- return React.createElement(ErrorBoundary, {
27665
- key: v4()
27666
- }, React.createElement(SpriteFromAtlas, {
27667
- key: v4(),
27668
- atlasIMG: atlasIMG,
27669
- atlasJSON: atlasJSON,
27670
- spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
27671
- imgScale: 3,
27672
- grayScale: true,
27673
- opacity: 0.4,
27674
- imgClassname: "sprite-from-atlas-img--item"
27675
- }));
27676
- }
27677
- return renderItem(itemToRender);
27678
- };
27679
- var onRenderSlot = function onRenderSlot(itemToRender) {
27680
- switch (containerType) {
27681
- case ItemContainerType.Equipment:
27682
- return renderEquipment(itemToRender);
27683
- default:
27684
- return renderItem(itemToRender);
27685
- }
27686
- };
27687
- return React.createElement(React.Fragment, null, onRenderSlot(item));
27688
- };
27689
-
27690
27521
  var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
27691
27522
  var contextMenu = actionsByTypeList.map(function (action) {
27692
27523
  return {
@@ -27948,6 +27779,194 @@ var ItemSlotDraggingProvider = function ItemSlotDraggingProvider(_ref) {
27948
27779
  }, children);
27949
27780
  };
27950
27781
 
27782
+ var qualityColorHex = function qualityColorHex(item) {
27783
+ switch (item == null ? void 0 : item.quality) {
27784
+ case ItemQualityLevel.HighQuality:
27785
+ return '#00bfff';
27786
+ case ItemQualityLevel.Exceptional:
27787
+ return '#ff8c00';
27788
+ case ItemQualityLevel.Mastercrafted:
27789
+ return '#ff00ff';
27790
+ case ItemQualityLevel.Ancient:
27791
+ return '#ffd700';
27792
+ case ItemQualityLevel.Mythic:
27793
+ return '#ff0080';
27794
+ default:
27795
+ return 'transparent';
27796
+ }
27797
+ };
27798
+
27799
+ var rarityColor = function rarityColor(item) {
27800
+ switch (item == null ? void 0 : item.rarity) {
27801
+ case ItemRarities.Uncommon:
27802
+ return 'rgba(13, 193, 13, 0.6)';
27803
+ case ItemRarities.Rare:
27804
+ return 'rgba(8, 104, 187, 0.6)';
27805
+ case ItemRarities.Epic:
27806
+ return 'rgba(191, 0, 255, 0.6)';
27807
+ case ItemRarities.Legendary:
27808
+ return 'rgba(255, 191, 0,0.6)';
27809
+ default:
27810
+ return null;
27811
+ }
27812
+ };
27813
+
27814
+ var gemColors = {
27815
+ 'emerald-gem': '#50C878',
27816
+ 'topaz-radiance': '#FFC87C',
27817
+ 'sapphire-gem': '#0F52BA',
27818
+ 'ruby-gem': '#E0115F',
27819
+ 'misty-quartz-gem': '#D9D9F3',
27820
+ 'coral-reef-gem': '#FF7F50',
27821
+ 'jasper-gem': '#D73B3E',
27822
+ 'earthstone-gem': '#8B4513',
27823
+ 'obsidian-gem': '#0B0C0E',
27824
+ 'amethyst-gem': '#9966CC'
27825
+ };
27826
+ var defaultColor = '#FFFFFF'; // Default color (white)
27827
+ var onRenderGems = function onRenderGems(item) {
27828
+ var _item$attachedGems;
27829
+ var gemQty = ((_item$attachedGems = item.attachedGems) == null ? void 0 : _item$attachedGems.length) || 0;
27830
+ if (gemQty > 0) {
27831
+ return React.createElement(ItemSlotQty, {
27832
+ item: item
27833
+ });
27834
+ }
27835
+ return undefined;
27836
+ };
27837
+ var ItemSlotQty = function ItemSlotQty(_ref) {
27838
+ var _item$attachedGems2;
27839
+ var item = _ref.item;
27840
+ var itemId = item._id;
27841
+ return React.createElement(ItemQtyContainer, {
27842
+ key: "qty-" + itemId,
27843
+ className: "item-slot-qty"
27844
+ }, (_item$attachedGems2 = item.attachedGems) == null ? void 0 : _item$attachedGems2.map(function (gem, index) {
27845
+ return React.createElement(Gem, {
27846
+ key: itemId + "-gem-" + index,
27847
+ color: gemColors[gem.key] || defaultColor
27848
+ });
27849
+ }));
27850
+ };
27851
+ var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
27852
+ displayName: "ItemGem__ItemQtyContainer",
27853
+ componentId: "sc-1ekseaq-0"
27854
+ })(["position:relative;width:85%;height:16px;top:28px;left:0px;pointer-events:none;transform:scale(0.8);display:flex;align-items:center;justify-content:flex-start;opacity:0.8;"]);
27855
+ var Gem = /*#__PURE__*/styled.div.withConfig({
27856
+ displayName: "ItemGem__Gem",
27857
+ componentId: "sc-1ekseaq-1"
27858
+ })(["width:8px;height:8px;background:", ";border:1px solid black;transform:rotate(45deg);margin:0 2px;box-shadow:0 0 5px ", ";transition:transform 0.2s,box-shadow 0.2s;&:hover{transform:rotate(45deg) scale(1.2);box-shadow:0 0 10px ", ";}"], function (_ref2) {
27859
+ var color = _ref2.color;
27860
+ return "radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 30%), \n linear-gradient(45deg, " + color + ", " + color + " 50%, rgba(255, 255, 255, 0.2))";
27861
+ }, function (_ref3) {
27862
+ var color = _ref3.color;
27863
+ return color;
27864
+ }, function (_ref4) {
27865
+ var color = _ref4.color;
27866
+ return color;
27867
+ });
27868
+
27869
+ var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
27870
+ var isFractionalStackQty = stackQty % 1 !== 0;
27871
+ var isLargerThan999 = stackQty > 999;
27872
+ var qtyClassName = 'regular';
27873
+ if (isLargerThan999) qtyClassName = 'small';
27874
+ if (isFractionalStackQty) qtyClassName = 'xsmall';
27875
+ if (stackQty > 1) {
27876
+ return React.createElement(ItemSlotQty$1, {
27877
+ itemId: itemId,
27878
+ stackQty: stackQty,
27879
+ qtyClassName: qtyClassName
27880
+ });
27881
+ }
27882
+ return undefined;
27883
+ };
27884
+ var ItemSlotQty$1 = function ItemSlotQty(_ref) {
27885
+ var itemId = _ref.itemId,
27886
+ stackQty = _ref.stackQty,
27887
+ qtyClassName = _ref.qtyClassName;
27888
+ return React.createElement(ItemQtyContainer$1, {
27889
+ key: "qty-" + itemId,
27890
+ className: "item-slot-qty"
27891
+ }, React.createElement(Ellipsis, {
27892
+ maxLines: 1,
27893
+ maxWidth: "48px"
27894
+ }, React.createElement(ItemQty, {
27895
+ className: qtyClassName
27896
+ }, Math.round(stackQty * 100) / 100, ' ')));
27897
+ };
27898
+ var ItemQtyContainer$1 = /*#__PURE__*/styled.div.withConfig({
27899
+ displayName: "ItemSlotQty__ItemQtyContainer",
27900
+ componentId: "sc-keb1s5-0"
27901
+ })(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
27902
+ var ItemQty = /*#__PURE__*/styled.span.withConfig({
27903
+ displayName: "ItemSlotQty__ItemQty",
27904
+ componentId: "sc-keb1s5-1"
27905
+ })(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
27906
+
27907
+ var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
27908
+ var containerType = _ref.containerType,
27909
+ atlasJSON = _ref.atlasJSON,
27910
+ atlasIMG = _ref.atlasIMG,
27911
+ slotSpriteMask = _ref.slotSpriteMask,
27912
+ item = _ref.item;
27913
+ var renderStackInfo = function renderStackInfo(item) {
27914
+ return item.stackQty && item.stackQty > 1 && onRenderStackInfo(item._id, item.stackQty);
27915
+ };
27916
+ var renderGems = function renderGems(item) {
27917
+ return item.attachedGems && onRenderGems(item);
27918
+ };
27919
+ var renderItem = function renderItem(item) {
27920
+ if (!(item != null && item.texturePath)) {
27921
+ return null;
27922
+ }
27923
+ return React.createElement(ErrorBoundary, {
27924
+ key: item._id
27925
+ }, item.quality && item.quality !== ItemQualityLevel.Normal && React.createElement("div", {
27926
+ className: "quality-star"
27927
+ }, "\u2605"), React.createElement(SpriteFromAtlas, {
27928
+ atlasIMG: atlasIMG,
27929
+ atlasJSON: atlasJSON,
27930
+ spriteKey: getItemTextureKeyPath({
27931
+ key: item.texturePath,
27932
+ texturePath: item.texturePath,
27933
+ stackQty: item.stackQty || 1,
27934
+ isStackable: item.isStackable
27935
+ }, atlasJSON),
27936
+ imgScale: 3,
27937
+ imgClassname: "sprite-from-atlas-img--item",
27938
+ tintColor: item.tintColor
27939
+ }), renderStackInfo(item), renderGems(item));
27940
+ };
27941
+ var renderEquipment = function renderEquipment(itemToRender) {
27942
+ var _itemToRender$allowed;
27943
+ if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
27944
+ return React.createElement(ErrorBoundary, {
27945
+ key: v4()
27946
+ }, React.createElement(SpriteFromAtlas, {
27947
+ key: v4(),
27948
+ atlasIMG: atlasIMG,
27949
+ atlasJSON: atlasJSON,
27950
+ spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
27951
+ imgScale: 3,
27952
+ grayScale: true,
27953
+ opacity: 0.4,
27954
+ imgClassname: "sprite-from-atlas-img--item"
27955
+ }));
27956
+ }
27957
+ return renderItem(itemToRender);
27958
+ };
27959
+ var onRenderSlot = function onRenderSlot(itemToRender) {
27960
+ switch (containerType) {
27961
+ case ItemContainerType.Equipment:
27962
+ return renderEquipment(itemToRender);
27963
+ default:
27964
+ return renderItem(itemToRender);
27965
+ }
27966
+ };
27967
+ return onRenderSlot(item);
27968
+ };
27969
+
27951
27970
  var EquipmentSlotSpriteByType = {
27952
27971
  Neck: 'accessories/corruption-necklace.png',
27953
27972
  LeftHand: 'swords/broad-sword.png',
@@ -28264,7 +28283,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
28264
28283
  var Container$a = /*#__PURE__*/styled.div.withConfig({
28265
28284
  displayName: "ItemSlot__Container",
28266
28285
  componentId: "sc-l2j5ef-0"
28267
- })(["margin:0.1rem;.react-draggable-dragging{opacity:", ";}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
28286
+ })(["margin:0.1rem;.react-draggable-dragging{opacity:", ";}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}.quality-star{position:absolute;top:0.5rem;left:0.5rem;font-size:1.2rem;z-index:2;text-shadow:0 0 3px black;pointer-events:none;color:", ";}&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
28268
28287
  var isDraggingItem = _ref2.isDraggingItem;
28269
28288
  return isDraggingItem ? 0 : 1;
28270
28289
  }, function (_ref3) {
@@ -28277,7 +28296,10 @@ var Container$a = /*#__PURE__*/styled.div.withConfig({
28277
28296
  var item = _ref5.item;
28278
28297
  return "0 0 4px 3px " + rarityColor(item);
28279
28298
  }, function (_ref6) {
28280
- var isSelectingShortcut = _ref6.isSelectingShortcut;
28299
+ var item = _ref6.item;
28300
+ return qualityColorHex(item);
28301
+ }, function (_ref7) {
28302
+ var isSelectingShortcut = _ref7.isSelectingShortcut;
28281
28303
  return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
28282
28304
  });
28283
28305
  var ItemContainer = /*#__PURE__*/styled.div.withConfig({
@@ -28394,10 +28416,16 @@ var ItemInfo = function ItemInfo(_ref) {
28394
28416
  var Container$b = /*#__PURE__*/styled.div.withConfig({
28395
28417
  displayName: "ItemInfo__Container",
28396
28418
  componentId: "sc-1xm4q8k-0"
28397
- })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:18rem;@media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
28419
+ })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";box-shadow:", ";height:max-content;width:18rem;position:relative;", " @media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
28398
28420
  var _rarityColor;
28399
28421
  var item = _ref2.item;
28400
28422
  return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
28423
+ }, function (_ref3) {
28424
+ var item = _ref3.item;
28425
+ return "0 0 5px 2px " + rarityColor(item);
28426
+ }, function (_ref4) {
28427
+ var item = _ref4.item;
28428
+ return (item == null ? void 0 : item.quality) && item.quality !== ItemQualityLevel.Normal && "\n &::before {\n content: '\u2605';\n position: absolute;\n top: 0.2rem;\n left: 0.5rem;\n font-size: 1.2rem;\n color: " + qualityColorHex(item) + ";\n text-shadow: 0 0 3px black;\n }\n ";
28401
28429
  });
28402
28430
  var Title$1 = /*#__PURE__*/styled.div.withConfig({
28403
28431
  displayName: "ItemInfo__Title",
@@ -28406,8 +28434,8 @@ var Title$1 = /*#__PURE__*/styled.div.withConfig({
28406
28434
  var Rarity = /*#__PURE__*/styled.div.withConfig({
28407
28435
  displayName: "ItemInfo__Rarity",
28408
28436
  componentId: "sc-1xm4q8k-2"
28409
- })(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref3) {
28410
- var item = _ref3.item;
28437
+ })(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref5) {
28438
+ var item = _ref5.item;
28411
28439
  return rarityColor(item);
28412
28440
  });
28413
28441
  var Type = /*#__PURE__*/styled.div.withConfig({
@@ -28421,8 +28449,8 @@ var LevelRequirement = /*#__PURE__*/styled.div.withConfig({
28421
28449
  var Statistic = /*#__PURE__*/styled.div.withConfig({
28422
28450
  displayName: "ItemInfo__Statistic",
28423
28451
  componentId: "sc-1xm4q8k-5"
28424
- })(["margin-bottom:0.4rem;width:100%;color:", ";.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], function (_ref4) {
28425
- var $isSpecial = _ref4.$isSpecial;
28452
+ })(["margin-bottom:0.4rem;width:100%;color:", ";.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], function (_ref6) {
28453
+ var $isSpecial = _ref6.$isSpecial;
28426
28454
  return $isSpecial ? uiColors.darkYellow : 'inherit';
28427
28455
  }, uiColors.lightGreen, uiColors.cardinal);
28428
28456
  var Description = /*#__PURE__*/styled.div.withConfig({
@@ -31131,7 +31159,7 @@ var Icon$1 = /*#__PURE__*/styled.span.withConfig({
31131
31159
  var Content$1 = /*#__PURE__*/styled.div.withConfig({
31132
31160
  displayName: "Collapsible__Content",
31133
31161
  componentId: "sc-s4h8ey-4"
31134
- })(["padding:6px;"]);
31162
+ })(["padding:12px;"]);
31135
31163
 
31136
31164
  var BaseInformationDetails = function BaseInformationDetails(_ref) {
31137
31165
  var name = _ref.name,
@@ -31156,15 +31184,15 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
31156
31184
  var Container$p = /*#__PURE__*/styled.div.withConfig({
31157
31185
  displayName: "BaseInformationDetails__Container",
31158
31186
  componentId: "sc-1vguuz8-0"
31159
- })(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
31187
+ })(["position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:1000;"]);
31160
31188
  var Overlay = /*#__PURE__*/styled.div.withConfig({
31161
31189
  displayName: "BaseInformationDetails__Overlay",
31162
31190
  componentId: "sc-1vguuz8-1"
31163
- })(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
31191
+ })(["position:absolute;inset:0;background-color:rgba(0,0,0,0.8);"]);
31164
31192
  var Modal = /*#__PURE__*/styled.div.withConfig({
31165
31193
  displayName: "BaseInformationDetails__Modal",
31166
31194
  componentId: "sc-1vguuz8-2"
31167
- })(["position:fixed;background-color:rgba(0,0,0,0.95);border-radius:4px;padding:12px;overflow:hidden;z-index:1;font-family:'Press Start 2P',cursive;border:1px solid ", ";box-shadow:0 2px 4px rgba(0,0,0,0.2);width:90%;height:90%;top:5%;left:5%;max-width:800px;margin:0 auto;@media (max-width:768px){width:100%;height:100%;top:0;left:0;border-radius:0;padding:8px;}&::-webkit-scrollbar{width:2px;}&::-webkit-scrollbar-track{background:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:4px;opacity:0.5;&:hover{opacity:1;}}scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray, uiColors.yellow, uiColors.yellow);
31195
+ })(["position:relative;width:90%;height:90%;background-color:rgba(0,0,0,0.95);border-radius:4px;padding:16px;overflow-y:auto;z-index:1;font-family:'Press Start 2P',cursive;border:1px solid ", ";box-shadow:0 2px 4px rgba(0,0,0,0.2);&::-webkit-scrollbar{width:2px;}&::-webkit-scrollbar-track{background:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:4px;opacity:0.5;&:hover{opacity:1;}}scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray, uiColors.yellow, uiColors.yellow);
31168
31196
  var CloseButton$5 = /*#__PURE__*/styled.button.withConfig({
31169
31197
  displayName: "BaseInformationDetails__CloseButton",
31170
31198
  componentId: "sc-1vguuz8-3"
@@ -31176,7 +31204,7 @@ var Header$2 = /*#__PURE__*/styled.div.withConfig({
31176
31204
  var Content$2 = /*#__PURE__*/styled.div.withConfig({
31177
31205
  displayName: "BaseInformationDetails__Content",
31178
31206
  componentId: "sc-1vguuz8-5"
31179
- })(["display:flex;flex-direction:column;gap:12px;height:calc(100% - 80px);overflow-y:auto;overflow-x:hidden;padding-right:6px;margin-right:-6px;@media (max-width:768px){height:calc(100% - 64px);gap:8px;padding-right:4px;margin-right:-4px;}"]);
31207
+ })(["display:flex;flex-direction:column;gap:16px;height:100%;overflow:auto;"]);
31180
31208
  var Title$4 = /*#__PURE__*/styled.h2.withConfig({
31181
31209
  displayName: "BaseInformationDetails__Title",
31182
31210
  componentId: "sc-1vguuz8-6"
@@ -31422,7 +31450,6 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31422
31450
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31423
31451
  initialSearchQuery = _ref.initialSearchQuery,
31424
31452
  tabId = _ref.tabId;
31425
- var isMobile = isMobileOrTablet();
31426
31453
  var _useState = useState(initialSearchQuery),
31427
31454
  searchQuery = _useState[0],
31428
31455
  setSearchQuery = _useState[1];
@@ -31464,16 +31491,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31464
31491
  }) || [];
31465
31492
  };
31466
31493
  var handleMouseEnter = function handleMouseEnter(e, item) {
31467
- if (!isMobile) {
31468
- setTooltipPosition({
31469
- x: e.clientX + TOOLTIP_OFFSET,
31470
- y: e.clientY
31471
- });
31472
- setHoveredItem(item);
31473
- }
31494
+ setTooltipPosition({
31495
+ x: e.clientX + TOOLTIP_OFFSET,
31496
+ y: e.clientY
31497
+ });
31498
+ setHoveredItem(item);
31474
31499
  };
31475
31500
  var handleMouseMove = function handleMouseMove(e) {
31476
- if (!isMobile && hoveredItem) {
31501
+ if (hoveredItem) {
31477
31502
  setTooltipPosition({
31478
31503
  x: e.clientX + TOOLTIP_OFFSET,
31479
31504
  y: e.clientY
@@ -31481,13 +31506,15 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31481
31506
  }
31482
31507
  };
31483
31508
  var handleMouseLeave = function handleMouseLeave() {
31484
- if (!isMobile) {
31485
- setHoveredItem(null);
31486
- }
31509
+ setHoveredItem(null);
31487
31510
  };
31488
31511
  var handleTouchStart = function handleTouchStart(e, item) {
31489
- e.preventDefault();
31490
- setSelectedItem(item);
31512
+ var touch = e.touches[0];
31513
+ setTooltipPosition({
31514
+ x: touch.clientX + TOOLTIP_OFFSET,
31515
+ y: touch.clientY
31516
+ });
31517
+ setHoveredItem(item);
31491
31518
  };
31492
31519
  var handleItemClick = function handleItemClick(item) {
31493
31520
  setSelectedItem(item);
@@ -31537,14 +31564,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31537
31564
  tabId: tabId,
31538
31565
  layout: "grid",
31539
31566
  itemHeight: "180px"
31540
- }), !isMobile && hoveredItem && React.createElement(TooltipWrapper, {
31567
+ }), hoveredItem && React.createElement(TooltipWrapper, {
31541
31568
  style: {
31542
31569
  top: tooltipPosition.y,
31543
31570
  left: tooltipPosition.x
31544
31571
  }
31545
31572
  }, React.createElement(InformationCenterItemTooltip, {
31546
31573
  item: hoveredItem
31547
- })), selectedItem && React.createElement(Portal, null, React.createElement(InformationCenterItemDetails, {
31574
+ })), selectedItem && React.createElement(InformationCenterItemDetails, {
31548
31575
  item: selectedItem,
31549
31576
  itemsAtlasJSON: itemsAtlasJSON,
31550
31577
  itemsAtlasIMG: itemsAtlasIMG,
@@ -31552,7 +31579,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31552
31579
  onBack: function onBack() {
31553
31580
  return setSelectedItem(null);
31554
31581
  }
31555
- })));
31582
+ }));
31556
31583
  };
31557
31584
  var TooltipWrapper = /*#__PURE__*/styled.div.withConfig({
31558
31585
  displayName: "InformationCenterItemsSection__TooltipWrapper",
@@ -31688,7 +31715,7 @@ var Value$1 = /*#__PURE__*/styled.span.withConfig({
31688
31715
  var StyledCollapsible$1 = /*#__PURE__*/styled(Collapsible).withConfig({
31689
31716
  displayName: "InformationCenterNPCDetails__StyledCollapsible",
31690
31717
  componentId: "sc-fdu3xl-4"
31691
- })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:visible;scrollbar-width:thin;scrollbar-color:", " transparent;width:100%;box-sizing:border-box;"], uiColors.darkGray);
31718
+ })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:auto;scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray);
31692
31719
  var StatGrid$1 = /*#__PURE__*/styled.div.withConfig({
31693
31720
  displayName: "InformationCenterNPCDetails__StatGrid",
31694
31721
  componentId: "sc-fdu3xl-5"
@@ -31740,19 +31767,19 @@ var Separator = /*#__PURE__*/styled.span.withConfig({
31740
31767
  var LootSearchContainer = /*#__PURE__*/styled.div.withConfig({
31741
31768
  displayName: "InformationCenterNPCDetails__LootSearchContainer",
31742
31769
  componentId: "sc-fdu3xl-17"
31743
- })(["padding:8px;background:rgba(0,0,0,0.2);border-radius:4px;margin:8px 8px 4px;box-sizing:border-box;"]);
31770
+ })(["padding:12px 12px 0;"]);
31744
31771
  var StyledSearchBar$1 = /*#__PURE__*/styled(SearchBar).withConfig({
31745
31772
  displayName: "InformationCenterNPCDetails__StyledSearchBar",
31746
31773
  componentId: "sc-fdu3xl-18"
31747
- })(["width:100%;box-sizing:border-box;input{background:rgba(0,0,0,0.2) !important;border:1px solid rgba(255,255,255,0.1) !important;box-sizing:border-box;&:focus{border-color:", " !important;}}"], uiColors.yellow);
31774
+ })(["width:100%;"]);
31748
31775
  var LootGrid = /*#__PURE__*/styled.div.withConfig({
31749
31776
  displayName: "InformationCenterNPCDetails__LootGrid",
31750
31777
  componentId: "sc-fdu3xl-19"
31751
- })(["display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:4px;padding:4px 8px;width:100%;max-width:100%;box-sizing:border-box;@media (max-width:768px){grid-template-columns:1fr;padding:4px;}"]);
31778
+ })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
31752
31779
  var LootItem = /*#__PURE__*/styled.div.withConfig({
31753
31780
  displayName: "InformationCenterNPCDetails__LootItem",
31754
31781
  componentId: "sc-fdu3xl-20"
31755
- })(["display:flex;align-items:center;gap:4px;background:rgba(255,255,255,0.05);padding:4px;border-radius:4px;min-width:0;"]);
31782
+ })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31756
31783
  var LootDetails = /*#__PURE__*/styled.div.withConfig({
31757
31784
  displayName: "InformationCenterNPCDetails__LootDetails",
31758
31785
  componentId: "sc-fdu3xl-21"
@@ -31881,7 +31908,6 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31881
31908
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31882
31909
  initialSearchQuery = _ref.initialSearchQuery,
31883
31910
  tabId = _ref.tabId;
31884
- var isMobile = isMobileOrTablet();
31885
31911
  var _useState = useState(initialSearchQuery),
31886
31912
  searchQuery = _useState[0],
31887
31913
  setSearchQuery = _useState[1];
@@ -31891,8 +31917,10 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31891
31917
  var _useState3 = useState(null),
31892
31918
  selectedMonster = _useState3[0],
31893
31919
  setSelectedMonster = _useState3[1];
31920
+ var _useState4 = useState('ontouchstart' in window),
31921
+ isTouchDevice = _useState4[0];
31894
31922
  var handleMouseEnter = function handleMouseEnter(monster, event) {
31895
- if (!isMobile && !selectedMonster) {
31923
+ if (!isTouchDevice && !selectedMonster) {
31896
31924
  setTooltipData({
31897
31925
  npc: monster,
31898
31926
  position: {
@@ -31903,12 +31931,12 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31903
31931
  }
31904
31932
  };
31905
31933
  var handleMouseLeave = function handleMouseLeave() {
31906
- if (!isMobile) {
31934
+ if (!isTouchDevice) {
31907
31935
  setTooltipData(null);
31908
31936
  }
31909
31937
  };
31910
31938
  var handleMouseMove = function handleMouseMove(event) {
31911
- if (!isMobile && tooltipData) {
31939
+ if (!isTouchDevice && tooltipData) {
31912
31940
  setTooltipData(_extends({}, tooltipData, {
31913
31941
  position: {
31914
31942
  x: event.clientX,
@@ -31918,17 +31946,29 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31918
31946
  }
31919
31947
  };
31920
31948
  var handleTouchStart = function handleTouchStart(monster, event) {
31921
- event.preventDefault();
31922
- setSelectedMonster(monster);
31923
- setTooltipData(null);
31949
+ if (isTouchDevice) {
31950
+ event.preventDefault();
31951
+ var touch = event.touches[0];
31952
+ if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
31953
+ setTooltipData(null);
31954
+ } else {
31955
+ setTooltipData({
31956
+ npc: monster,
31957
+ position: {
31958
+ x: touch.clientX,
31959
+ y: touch.clientY
31960
+ }
31961
+ });
31962
+ }
31963
+ }
31924
31964
  };
31925
31965
  var handleMonsterClick = function handleMonsterClick(monster) {
31926
31966
  setSelectedMonster(monster);
31927
31967
  setTooltipData(null);
31928
31968
  };
31929
- var _useState4 = useState('all'),
31930
- selectedBestiaryCategory = _useState4[0],
31931
- setSelectedBestiaryCategory = _useState4[1];
31969
+ var _useState5 = useState('all'),
31970
+ selectedBestiaryCategory = _useState5[0],
31971
+ setSelectedBestiaryCategory = _useState5[1];
31932
31972
  var bestiaryCategoryOptions = [{
31933
31973
  id: 0,
31934
31974
  value: 'all',
@@ -32003,7 +32043,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32003
32043
  },
32004
32044
  dependencies: [selectedBestiaryCategory],
32005
32045
  itemHeight: "180px"
32006
- }), !isMobile && tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
32046
+ }), tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
32007
32047
  style: {
32008
32048
  position: 'fixed',
32009
32049
  left: tooltipData.position.x + 10,
@@ -32013,7 +32053,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32013
32053
  npc: tooltipData.npc,
32014
32054
  itemsAtlasJSON: itemsAtlasJSON,
32015
32055
  itemsAtlasIMG: itemsAtlasIMG
32016
- }))), selectedMonster && React.createElement(Portal, null, React.createElement(InformationCenterNPCDetails, {
32056
+ }))), selectedMonster && React.createElement(InformationCenterNPCDetails, {
32017
32057
  npc: selectedMonster,
32018
32058
  itemsAtlasJSON: itemsAtlasJSON,
32019
32059
  itemsAtlasIMG: itemsAtlasIMG,
@@ -32024,7 +32064,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32024
32064
  onBack: function onBack() {
32025
32065
  return setSelectedMonster(null);
32026
32066
  }
32027
- })));
32067
+ }));
32028
32068
  };
32029
32069
  var TooltipWrapper$1 = /*#__PURE__*/styled.div.withConfig({
32030
32070
  displayName: "InformationCenterBestiarySection__TooltipWrapper",
@@ -32235,6 +32275,9 @@ var InformationCenter = function InformationCenter(_ref) {
32235
32275
  var _useState = useState('bestiary'),
32236
32276
  activeTab = _useState[0],
32237
32277
  setActiveTab = _useState[1];
32278
+ var _useState2 = useState(null),
32279
+ selectedItem = _useState2[0],
32280
+ setSelectedItem = _useState2[1];
32238
32281
  if (loading) {
32239
32282
  return React.createElement(LoadingMessage, null, "Loading...");
32240
32283
  }
@@ -32284,8 +32327,7 @@ var InformationCenter = function InformationCenter(_ref) {
32284
32327
  })
32285
32328
  }];
32286
32329
  return React.createElement(DraggableContainer, {
32287
- title: "Information Center",
32288
- type: RPGUIContainerTypes.Framed
32330
+ title: "Information Center"
32289
32331
  }, React.createElement(Container$r, null, React.createElement(InternalTabs, {
32290
32332
  tabs: tabs,
32291
32333
  activeTextColor: "#000000",
@@ -32295,6 +32337,19 @@ var InformationCenter = function InformationCenter(_ref) {
32295
32337
  inactiveColor: "#6b7280",
32296
32338
  borderColor: "#f59e0b",
32297
32339
  hoverColor: "#fef3c7"
32340
+ }), selectedItem && React.createElement(InformationCenterItemDetails, {
32341
+ item: selectedItem,
32342
+ itemsAtlasJSON: itemsAtlasJSON,
32343
+ itemsAtlasIMG: itemsAtlasIMG,
32344
+ droppedBy: bestiaryItems.filter(function (npc) {
32345
+ var _npc$loots;
32346
+ return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
32347
+ return loot.itemBlueprintKey === selectedItem.key;
32348
+ });
32349
+ }),
32350
+ onBack: function onBack() {
32351
+ return setSelectedItem(null);
32352
+ }
32298
32353
  })));
32299
32354
  };
32300
32355
  var Container$r = /*#__PURE__*/styled.div.withConfig({