@rpg-engine/long-bow 0.8.30 → 0.8.31

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, 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';
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';
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,6 +27518,175 @@ 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
+
27521
27690
  var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
27522
27691
  var contextMenu = actionsByTypeList.map(function (action) {
27523
27692
  return {
@@ -27779,194 +27948,6 @@ var ItemSlotDraggingProvider = function ItemSlotDraggingProvider(_ref) {
27779
27948
  }, children);
27780
27949
  };
27781
27950
 
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
-
27970
27951
  var EquipmentSlotSpriteByType = {
27971
27952
  Neck: 'accessories/corruption-necklace.png',
27972
27953
  LeftHand: 'swords/broad-sword.png',
@@ -28283,7 +28264,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
28283
28264
  var Container$a = /*#__PURE__*/styled.div.withConfig({
28284
28265
  displayName: "ItemSlot__Container",
28285
28266
  componentId: "sc-l2j5ef-0"
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) {
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) {
28287
28268
  var isDraggingItem = _ref2.isDraggingItem;
28288
28269
  return isDraggingItem ? 0 : 1;
28289
28270
  }, function (_ref3) {
@@ -28296,10 +28277,7 @@ var Container$a = /*#__PURE__*/styled.div.withConfig({
28296
28277
  var item = _ref5.item;
28297
28278
  return "0 0 4px 3px " + rarityColor(item);
28298
28279
  }, function (_ref6) {
28299
- var item = _ref6.item;
28300
- return qualityColorHex(item);
28301
- }, function (_ref7) {
28302
- var isSelectingShortcut = _ref7.isSelectingShortcut;
28280
+ var isSelectingShortcut = _ref6.isSelectingShortcut;
28303
28281
  return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
28304
28282
  });
28305
28283
  var ItemContainer = /*#__PURE__*/styled.div.withConfig({
@@ -28416,16 +28394,10 @@ var ItemInfo = function ItemInfo(_ref) {
28416
28394
  var Container$b = /*#__PURE__*/styled.div.withConfig({
28417
28395
  displayName: "ItemInfo__Container",
28418
28396
  componentId: "sc-1xm4q8k-0"
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) {
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) {
28420
28398
  var _rarityColor;
28421
28399
  var item = _ref2.item;
28422
28400
  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 ";
28429
28401
  });
28430
28402
  var Title$1 = /*#__PURE__*/styled.div.withConfig({
28431
28403
  displayName: "ItemInfo__Title",
@@ -28434,8 +28406,8 @@ var Title$1 = /*#__PURE__*/styled.div.withConfig({
28434
28406
  var Rarity = /*#__PURE__*/styled.div.withConfig({
28435
28407
  displayName: "ItemInfo__Rarity",
28436
28408
  componentId: "sc-1xm4q8k-2"
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;
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;
28439
28411
  return rarityColor(item);
28440
28412
  });
28441
28413
  var Type = /*#__PURE__*/styled.div.withConfig({
@@ -28449,8 +28421,8 @@ var LevelRequirement = /*#__PURE__*/styled.div.withConfig({
28449
28421
  var Statistic = /*#__PURE__*/styled.div.withConfig({
28450
28422
  displayName: "ItemInfo__Statistic",
28451
28423
  componentId: "sc-1xm4q8k-5"
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;
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;
28454
28426
  return $isSpecial ? uiColors.darkYellow : 'inherit';
28455
28427
  }, uiColors.lightGreen, uiColors.cardinal);
28456
28428
  var Description = /*#__PURE__*/styled.div.withConfig({
@@ -31159,7 +31131,7 @@ var Icon$1 = /*#__PURE__*/styled.span.withConfig({
31159
31131
  var Content$1 = /*#__PURE__*/styled.div.withConfig({
31160
31132
  displayName: "Collapsible__Content",
31161
31133
  componentId: "sc-s4h8ey-4"
31162
- })(["padding:12px;"]);
31134
+ })(["padding:6px;"]);
31163
31135
 
31164
31136
  var BaseInformationDetails = function BaseInformationDetails(_ref) {
31165
31137
  var name = _ref.name,
@@ -31184,15 +31156,15 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
31184
31156
  var Container$p = /*#__PURE__*/styled.div.withConfig({
31185
31157
  displayName: "BaseInformationDetails__Container",
31186
31158
  componentId: "sc-1vguuz8-0"
31187
- })(["position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:1000;"]);
31159
+ })(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
31188
31160
  var Overlay = /*#__PURE__*/styled.div.withConfig({
31189
31161
  displayName: "BaseInformationDetails__Overlay",
31190
31162
  componentId: "sc-1vguuz8-1"
31191
- })(["position:absolute;inset:0;background-color:rgba(0,0,0,0.8);"]);
31163
+ })(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
31192
31164
  var Modal = /*#__PURE__*/styled.div.withConfig({
31193
31165
  displayName: "BaseInformationDetails__Modal",
31194
31166
  componentId: "sc-1vguuz8-2"
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);
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);
31196
31168
  var CloseButton$5 = /*#__PURE__*/styled.button.withConfig({
31197
31169
  displayName: "BaseInformationDetails__CloseButton",
31198
31170
  componentId: "sc-1vguuz8-3"
@@ -31204,7 +31176,7 @@ var Header$2 = /*#__PURE__*/styled.div.withConfig({
31204
31176
  var Content$2 = /*#__PURE__*/styled.div.withConfig({
31205
31177
  displayName: "BaseInformationDetails__Content",
31206
31178
  componentId: "sc-1vguuz8-5"
31207
- })(["display:flex;flex-direction:column;gap:16px;height:100%;overflow:auto;"]);
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;}"]);
31208
31180
  var Title$4 = /*#__PURE__*/styled.h2.withConfig({
31209
31181
  displayName: "BaseInformationDetails__Title",
31210
31182
  componentId: "sc-1vguuz8-6"
@@ -31450,6 +31422,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31450
31422
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31451
31423
  initialSearchQuery = _ref.initialSearchQuery,
31452
31424
  tabId = _ref.tabId;
31425
+ var isMobile = isMobileOrTablet();
31453
31426
  var _useState = useState(initialSearchQuery),
31454
31427
  searchQuery = _useState[0],
31455
31428
  setSearchQuery = _useState[1];
@@ -31491,14 +31464,16 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31491
31464
  }) || [];
31492
31465
  };
31493
31466
  var handleMouseEnter = function handleMouseEnter(e, item) {
31494
- setTooltipPosition({
31495
- x: e.clientX + TOOLTIP_OFFSET,
31496
- y: e.clientY
31497
- });
31498
- setHoveredItem(item);
31467
+ if (!isMobile) {
31468
+ setTooltipPosition({
31469
+ x: e.clientX + TOOLTIP_OFFSET,
31470
+ y: e.clientY
31471
+ });
31472
+ setHoveredItem(item);
31473
+ }
31499
31474
  };
31500
31475
  var handleMouseMove = function handleMouseMove(e) {
31501
- if (hoveredItem) {
31476
+ if (!isMobile && hoveredItem) {
31502
31477
  setTooltipPosition({
31503
31478
  x: e.clientX + TOOLTIP_OFFSET,
31504
31479
  y: e.clientY
@@ -31506,15 +31481,13 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31506
31481
  }
31507
31482
  };
31508
31483
  var handleMouseLeave = function handleMouseLeave() {
31509
- setHoveredItem(null);
31484
+ if (!isMobile) {
31485
+ setHoveredItem(null);
31486
+ }
31510
31487
  };
31511
31488
  var handleTouchStart = function handleTouchStart(e, item) {
31512
- var touch = e.touches[0];
31513
- setTooltipPosition({
31514
- x: touch.clientX + TOOLTIP_OFFSET,
31515
- y: touch.clientY
31516
- });
31517
- setHoveredItem(item);
31489
+ e.preventDefault();
31490
+ setSelectedItem(item);
31518
31491
  };
31519
31492
  var handleItemClick = function handleItemClick(item) {
31520
31493
  setSelectedItem(item);
@@ -31564,14 +31537,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31564
31537
  tabId: tabId,
31565
31538
  layout: "grid",
31566
31539
  itemHeight: "180px"
31567
- }), hoveredItem && React.createElement(TooltipWrapper, {
31540
+ }), !isMobile && hoveredItem && React.createElement(TooltipWrapper, {
31568
31541
  style: {
31569
31542
  top: tooltipPosition.y,
31570
31543
  left: tooltipPosition.x
31571
31544
  }
31572
31545
  }, React.createElement(InformationCenterItemTooltip, {
31573
31546
  item: hoveredItem
31574
- })), selectedItem && React.createElement(InformationCenterItemDetails, {
31547
+ })), selectedItem && React.createElement(Portal, null, React.createElement(InformationCenterItemDetails, {
31575
31548
  item: selectedItem,
31576
31549
  itemsAtlasJSON: itemsAtlasJSON,
31577
31550
  itemsAtlasIMG: itemsAtlasIMG,
@@ -31579,7 +31552,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31579
31552
  onBack: function onBack() {
31580
31553
  return setSelectedItem(null);
31581
31554
  }
31582
- }));
31555
+ })));
31583
31556
  };
31584
31557
  var TooltipWrapper = /*#__PURE__*/styled.div.withConfig({
31585
31558
  displayName: "InformationCenterItemsSection__TooltipWrapper",
@@ -31715,7 +31688,7 @@ var Value$1 = /*#__PURE__*/styled.span.withConfig({
31715
31688
  var StyledCollapsible$1 = /*#__PURE__*/styled(Collapsible).withConfig({
31716
31689
  displayName: "InformationCenterNPCDetails__StyledCollapsible",
31717
31690
  componentId: "sc-fdu3xl-4"
31718
- })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:auto;scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray);
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);
31719
31692
  var StatGrid$1 = /*#__PURE__*/styled.div.withConfig({
31720
31693
  displayName: "InformationCenterNPCDetails__StatGrid",
31721
31694
  componentId: "sc-fdu3xl-5"
@@ -31767,19 +31740,19 @@ var Separator = /*#__PURE__*/styled.span.withConfig({
31767
31740
  var LootSearchContainer = /*#__PURE__*/styled.div.withConfig({
31768
31741
  displayName: "InformationCenterNPCDetails__LootSearchContainer",
31769
31742
  componentId: "sc-fdu3xl-17"
31770
- })(["padding:12px 12px 0;"]);
31743
+ })(["padding:8px;background:rgba(0,0,0,0.2);border-radius:4px;margin:8px 8px 4px;box-sizing:border-box;"]);
31771
31744
  var StyledSearchBar$1 = /*#__PURE__*/styled(SearchBar).withConfig({
31772
31745
  displayName: "InformationCenterNPCDetails__StyledSearchBar",
31773
31746
  componentId: "sc-fdu3xl-18"
31774
- })(["width:100%;"]);
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);
31775
31748
  var LootGrid = /*#__PURE__*/styled.div.withConfig({
31776
31749
  displayName: "InformationCenterNPCDetails__LootGrid",
31777
31750
  componentId: "sc-fdu3xl-19"
31778
- })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
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;}"]);
31779
31752
  var LootItem = /*#__PURE__*/styled.div.withConfig({
31780
31753
  displayName: "InformationCenterNPCDetails__LootItem",
31781
31754
  componentId: "sc-fdu3xl-20"
31782
- })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31755
+ })(["display:flex;align-items:center;gap:4px;background:rgba(255,255,255,0.05);padding:4px;border-radius:4px;min-width:0;"]);
31783
31756
  var LootDetails = /*#__PURE__*/styled.div.withConfig({
31784
31757
  displayName: "InformationCenterNPCDetails__LootDetails",
31785
31758
  componentId: "sc-fdu3xl-21"
@@ -31908,6 +31881,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31908
31881
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31909
31882
  initialSearchQuery = _ref.initialSearchQuery,
31910
31883
  tabId = _ref.tabId;
31884
+ var isMobile = isMobileOrTablet();
31911
31885
  var _useState = useState(initialSearchQuery),
31912
31886
  searchQuery = _useState[0],
31913
31887
  setSearchQuery = _useState[1];
@@ -31917,10 +31891,8 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31917
31891
  var _useState3 = useState(null),
31918
31892
  selectedMonster = _useState3[0],
31919
31893
  setSelectedMonster = _useState3[1];
31920
- var _useState4 = useState('ontouchstart' in window),
31921
- isTouchDevice = _useState4[0];
31922
31894
  var handleMouseEnter = function handleMouseEnter(monster, event) {
31923
- if (!isTouchDevice && !selectedMonster) {
31895
+ if (!isMobile && !selectedMonster) {
31924
31896
  setTooltipData({
31925
31897
  npc: monster,
31926
31898
  position: {
@@ -31931,12 +31903,12 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31931
31903
  }
31932
31904
  };
31933
31905
  var handleMouseLeave = function handleMouseLeave() {
31934
- if (!isTouchDevice) {
31906
+ if (!isMobile) {
31935
31907
  setTooltipData(null);
31936
31908
  }
31937
31909
  };
31938
31910
  var handleMouseMove = function handleMouseMove(event) {
31939
- if (!isTouchDevice && tooltipData) {
31911
+ if (!isMobile && tooltipData) {
31940
31912
  setTooltipData(_extends({}, tooltipData, {
31941
31913
  position: {
31942
31914
  x: event.clientX,
@@ -31946,29 +31918,17 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31946
31918
  }
31947
31919
  };
31948
31920
  var handleTouchStart = function handleTouchStart(monster, event) {
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
- }
31921
+ event.preventDefault();
31922
+ setSelectedMonster(monster);
31923
+ setTooltipData(null);
31964
31924
  };
31965
31925
  var handleMonsterClick = function handleMonsterClick(monster) {
31966
31926
  setSelectedMonster(monster);
31967
31927
  setTooltipData(null);
31968
31928
  };
31969
- var _useState5 = useState('all'),
31970
- selectedBestiaryCategory = _useState5[0],
31971
- setSelectedBestiaryCategory = _useState5[1];
31929
+ var _useState4 = useState('all'),
31930
+ selectedBestiaryCategory = _useState4[0],
31931
+ setSelectedBestiaryCategory = _useState4[1];
31972
31932
  var bestiaryCategoryOptions = [{
31973
31933
  id: 0,
31974
31934
  value: 'all',
@@ -32043,7 +32003,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32043
32003
  },
32044
32004
  dependencies: [selectedBestiaryCategory],
32045
32005
  itemHeight: "180px"
32046
- }), tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
32006
+ }), !isMobile && tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
32047
32007
  style: {
32048
32008
  position: 'fixed',
32049
32009
  left: tooltipData.position.x + 10,
@@ -32053,7 +32013,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32053
32013
  npc: tooltipData.npc,
32054
32014
  itemsAtlasJSON: itemsAtlasJSON,
32055
32015
  itemsAtlasIMG: itemsAtlasIMG
32056
- }))), selectedMonster && React.createElement(InformationCenterNPCDetails, {
32016
+ }))), selectedMonster && React.createElement(Portal, null, React.createElement(InformationCenterNPCDetails, {
32057
32017
  npc: selectedMonster,
32058
32018
  itemsAtlasJSON: itemsAtlasJSON,
32059
32019
  itemsAtlasIMG: itemsAtlasIMG,
@@ -32064,7 +32024,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32064
32024
  onBack: function onBack() {
32065
32025
  return setSelectedMonster(null);
32066
32026
  }
32067
- }));
32027
+ })));
32068
32028
  };
32069
32029
  var TooltipWrapper$1 = /*#__PURE__*/styled.div.withConfig({
32070
32030
  displayName: "InformationCenterBestiarySection__TooltipWrapper",
@@ -32275,9 +32235,6 @@ var InformationCenter = function InformationCenter(_ref) {
32275
32235
  var _useState = useState('bestiary'),
32276
32236
  activeTab = _useState[0],
32277
32237
  setActiveTab = _useState[1];
32278
- var _useState2 = useState(null),
32279
- selectedItem = _useState2[0],
32280
- setSelectedItem = _useState2[1];
32281
32238
  if (loading) {
32282
32239
  return React.createElement(LoadingMessage, null, "Loading...");
32283
32240
  }
@@ -32327,7 +32284,8 @@ var InformationCenter = function InformationCenter(_ref) {
32327
32284
  })
32328
32285
  }];
32329
32286
  return React.createElement(DraggableContainer, {
32330
- title: "Information Center"
32287
+ title: "Information Center",
32288
+ type: RPGUIContainerTypes.Framed
32331
32289
  }, React.createElement(Container$r, null, React.createElement(InternalTabs, {
32332
32290
  tabs: tabs,
32333
32291
  activeTextColor: "#000000",
@@ -32337,19 +32295,6 @@ var InformationCenter = function InformationCenter(_ref) {
32337
32295
  inactiveColor: "#6b7280",
32338
32296
  borderColor: "#f59e0b",
32339
32297
  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
- }
32353
32298
  })));
32354
32299
  };
32355
32300
  var Container$r = /*#__PURE__*/styled.div.withConfig({