@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.
@@ -27525,175 +27525,6 @@ function useTouchTarget() {
27525
27525
  return getTouchTarget;
27526
27526
  }
27527
27527
 
27528
- var rarityColor = function rarityColor(item) {
27529
- switch (item == null ? void 0 : item.rarity) {
27530
- case shared.ItemRarities.Uncommon:
27531
- return 'rgba(13, 193, 13, 0.6)';
27532
- case shared.ItemRarities.Rare:
27533
- return 'rgba(8, 104, 187, 0.6)';
27534
- case shared.ItemRarities.Epic:
27535
- return 'rgba(191, 0, 255, 0.6)';
27536
- case shared.ItemRarities.Legendary:
27537
- return 'rgba(255, 191, 0,0.6)';
27538
- default:
27539
- return null;
27540
- }
27541
- };
27542
-
27543
- var gemColors = {
27544
- 'emerald-gem': '#50C878',
27545
- 'topaz-radiance': '#FFC87C',
27546
- 'sapphire-gem': '#0F52BA',
27547
- 'ruby-gem': '#E0115F',
27548
- 'misty-quartz-gem': '#D9D9F3',
27549
- 'coral-reef-gem': '#FF7F50',
27550
- 'jasper-gem': '#D73B3E',
27551
- 'earthstone-gem': '#8B4513',
27552
- 'obsidian-gem': '#0B0C0E',
27553
- 'amethyst-gem': '#9966CC'
27554
- };
27555
- var defaultColor = '#FFFFFF'; // Default color (white)
27556
- var onRenderGems = function onRenderGems(item) {
27557
- var _item$attachedGems;
27558
- var gemQty = ((_item$attachedGems = item.attachedGems) == null ? void 0 : _item$attachedGems.length) || 0;
27559
- if (gemQty > 0) {
27560
- return React__default.createElement(ItemSlotQty, {
27561
- item: item
27562
- });
27563
- }
27564
- return undefined;
27565
- };
27566
- var ItemSlotQty = function ItemSlotQty(_ref) {
27567
- var _item$attachedGems2;
27568
- var item = _ref.item;
27569
- var itemId = item._id;
27570
- return React__default.createElement(ItemQtyContainer, {
27571
- key: "qty-" + itemId,
27572
- className: "item-slot-qty"
27573
- }, (_item$attachedGems2 = item.attachedGems) == null ? void 0 : _item$attachedGems2.map(function (gem, index) {
27574
- return React__default.createElement(Gem, {
27575
- key: itemId + "-gem-" + index,
27576
- color: gemColors[gem.key] || defaultColor
27577
- });
27578
- }));
27579
- };
27580
- var ItemQtyContainer = /*#__PURE__*/styled__default.div.withConfig({
27581
- displayName: "ItemGem__ItemQtyContainer",
27582
- componentId: "sc-1ekseaq-0"
27583
- })(["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;"]);
27584
- var Gem = /*#__PURE__*/styled__default.div.withConfig({
27585
- displayName: "ItemGem__Gem",
27586
- componentId: "sc-1ekseaq-1"
27587
- })(["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) {
27588
- var color = _ref2.color;
27589
- 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))";
27590
- }, function (_ref3) {
27591
- var color = _ref3.color;
27592
- return color;
27593
- }, function (_ref4) {
27594
- var color = _ref4.color;
27595
- return color;
27596
- });
27597
-
27598
- var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
27599
- var isFractionalStackQty = stackQty % 1 !== 0;
27600
- var isLargerThan999 = stackQty > 999;
27601
- var qtyClassName = 'regular';
27602
- if (isLargerThan999) qtyClassName = 'small';
27603
- if (isFractionalStackQty) qtyClassName = 'xsmall';
27604
- if (stackQty > 1) {
27605
- return React__default.createElement(ItemSlotQty$1, {
27606
- itemId: itemId,
27607
- stackQty: stackQty,
27608
- qtyClassName: qtyClassName
27609
- });
27610
- }
27611
- return undefined;
27612
- };
27613
- var ItemSlotQty$1 = function ItemSlotQty(_ref) {
27614
- var itemId = _ref.itemId,
27615
- stackQty = _ref.stackQty,
27616
- qtyClassName = _ref.qtyClassName;
27617
- return React__default.createElement(ItemQtyContainer$1, {
27618
- key: "qty-" + itemId,
27619
- className: "item-slot-qty"
27620
- }, React__default.createElement(Ellipsis, {
27621
- maxLines: 1,
27622
- maxWidth: "48px"
27623
- }, React__default.createElement(ItemQty, {
27624
- className: qtyClassName
27625
- }, Math.round(stackQty * 100) / 100, ' ')));
27626
- };
27627
- var ItemQtyContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
27628
- displayName: "ItemSlotQty__ItemQtyContainer",
27629
- componentId: "sc-keb1s5-0"
27630
- })(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
27631
- var ItemQty = /*#__PURE__*/styled__default.span.withConfig({
27632
- displayName: "ItemSlotQty__ItemQty",
27633
- componentId: "sc-keb1s5-1"
27634
- })(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
27635
-
27636
- var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
27637
- var containerType = _ref.containerType,
27638
- atlasJSON = _ref.atlasJSON,
27639
- atlasIMG = _ref.atlasIMG,
27640
- slotSpriteMask = _ref.slotSpriteMask,
27641
- item = _ref.item;
27642
- var renderStackInfo = function renderStackInfo(item) {
27643
- return item.stackQty && item.stackQty > 1 && onRenderStackInfo(item._id, item.stackQty);
27644
- };
27645
- var renderGems = function renderGems(item) {
27646
- return item.attachedGems && onRenderGems(item);
27647
- };
27648
- var renderItem = function renderItem(item) {
27649
- if (!(item != null && item.texturePath)) {
27650
- return null;
27651
- }
27652
- return React__default.createElement(ErrorBoundary, {
27653
- key: item._id
27654
- }, React__default.createElement(SpriteFromAtlas, {
27655
- atlasIMG: atlasIMG,
27656
- atlasJSON: atlasJSON,
27657
- spriteKey: shared.getItemTextureKeyPath({
27658
- key: item.texturePath,
27659
- texturePath: item.texturePath,
27660
- stackQty: item.stackQty || 1,
27661
- isStackable: item.isStackable
27662
- }, atlasJSON),
27663
- imgScale: 3,
27664
- imgClassname: "sprite-from-atlas-img--item",
27665
- tintColor: item.tintColor
27666
- }), renderStackInfo(item), renderGems(item));
27667
- };
27668
- var renderEquipment = function renderEquipment(itemToRender) {
27669
- var _itemToRender$allowed;
27670
- if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
27671
- return React__default.createElement(ErrorBoundary, {
27672
- key: uuid.v4()
27673
- }, React__default.createElement(SpriteFromAtlas, {
27674
- key: uuid.v4(),
27675
- atlasIMG: atlasIMG,
27676
- atlasJSON: atlasJSON,
27677
- spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
27678
- imgScale: 3,
27679
- grayScale: true,
27680
- opacity: 0.4,
27681
- imgClassname: "sprite-from-atlas-img--item"
27682
- }));
27683
- }
27684
- return renderItem(itemToRender);
27685
- };
27686
- var onRenderSlot = function onRenderSlot(itemToRender) {
27687
- switch (containerType) {
27688
- case shared.ItemContainerType.Equipment:
27689
- return renderEquipment(itemToRender);
27690
- default:
27691
- return renderItem(itemToRender);
27692
- }
27693
- };
27694
- return React__default.createElement(React__default.Fragment, null, onRenderSlot(item));
27695
- };
27696
-
27697
27528
  var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
27698
27529
  var contextMenu = actionsByTypeList.map(function (action) {
27699
27530
  return {
@@ -27955,6 +27786,194 @@ var ItemSlotDraggingProvider = function ItemSlotDraggingProvider(_ref) {
27955
27786
  }, children);
27956
27787
  };
27957
27788
 
27789
+ var qualityColorHex = function qualityColorHex(item) {
27790
+ switch (item == null ? void 0 : item.quality) {
27791
+ case shared.ItemQualityLevel.HighQuality:
27792
+ return '#00bfff';
27793
+ case shared.ItemQualityLevel.Exceptional:
27794
+ return '#ff8c00';
27795
+ case shared.ItemQualityLevel.Mastercrafted:
27796
+ return '#ff00ff';
27797
+ case shared.ItemQualityLevel.Ancient:
27798
+ return '#ffd700';
27799
+ case shared.ItemQualityLevel.Mythic:
27800
+ return '#ff0080';
27801
+ default:
27802
+ return 'transparent';
27803
+ }
27804
+ };
27805
+
27806
+ var rarityColor = function rarityColor(item) {
27807
+ switch (item == null ? void 0 : item.rarity) {
27808
+ case shared.ItemRarities.Uncommon:
27809
+ return 'rgba(13, 193, 13, 0.6)';
27810
+ case shared.ItemRarities.Rare:
27811
+ return 'rgba(8, 104, 187, 0.6)';
27812
+ case shared.ItemRarities.Epic:
27813
+ return 'rgba(191, 0, 255, 0.6)';
27814
+ case shared.ItemRarities.Legendary:
27815
+ return 'rgba(255, 191, 0,0.6)';
27816
+ default:
27817
+ return null;
27818
+ }
27819
+ };
27820
+
27821
+ var gemColors = {
27822
+ 'emerald-gem': '#50C878',
27823
+ 'topaz-radiance': '#FFC87C',
27824
+ 'sapphire-gem': '#0F52BA',
27825
+ 'ruby-gem': '#E0115F',
27826
+ 'misty-quartz-gem': '#D9D9F3',
27827
+ 'coral-reef-gem': '#FF7F50',
27828
+ 'jasper-gem': '#D73B3E',
27829
+ 'earthstone-gem': '#8B4513',
27830
+ 'obsidian-gem': '#0B0C0E',
27831
+ 'amethyst-gem': '#9966CC'
27832
+ };
27833
+ var defaultColor = '#FFFFFF'; // Default color (white)
27834
+ var onRenderGems = function onRenderGems(item) {
27835
+ var _item$attachedGems;
27836
+ var gemQty = ((_item$attachedGems = item.attachedGems) == null ? void 0 : _item$attachedGems.length) || 0;
27837
+ if (gemQty > 0) {
27838
+ return React__default.createElement(ItemSlotQty, {
27839
+ item: item
27840
+ });
27841
+ }
27842
+ return undefined;
27843
+ };
27844
+ var ItemSlotQty = function ItemSlotQty(_ref) {
27845
+ var _item$attachedGems2;
27846
+ var item = _ref.item;
27847
+ var itemId = item._id;
27848
+ return React__default.createElement(ItemQtyContainer, {
27849
+ key: "qty-" + itemId,
27850
+ className: "item-slot-qty"
27851
+ }, (_item$attachedGems2 = item.attachedGems) == null ? void 0 : _item$attachedGems2.map(function (gem, index) {
27852
+ return React__default.createElement(Gem, {
27853
+ key: itemId + "-gem-" + index,
27854
+ color: gemColors[gem.key] || defaultColor
27855
+ });
27856
+ }));
27857
+ };
27858
+ var ItemQtyContainer = /*#__PURE__*/styled__default.div.withConfig({
27859
+ displayName: "ItemGem__ItemQtyContainer",
27860
+ componentId: "sc-1ekseaq-0"
27861
+ })(["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;"]);
27862
+ var Gem = /*#__PURE__*/styled__default.div.withConfig({
27863
+ displayName: "ItemGem__Gem",
27864
+ componentId: "sc-1ekseaq-1"
27865
+ })(["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) {
27866
+ var color = _ref2.color;
27867
+ 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))";
27868
+ }, function (_ref3) {
27869
+ var color = _ref3.color;
27870
+ return color;
27871
+ }, function (_ref4) {
27872
+ var color = _ref4.color;
27873
+ return color;
27874
+ });
27875
+
27876
+ var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
27877
+ var isFractionalStackQty = stackQty % 1 !== 0;
27878
+ var isLargerThan999 = stackQty > 999;
27879
+ var qtyClassName = 'regular';
27880
+ if (isLargerThan999) qtyClassName = 'small';
27881
+ if (isFractionalStackQty) qtyClassName = 'xsmall';
27882
+ if (stackQty > 1) {
27883
+ return React__default.createElement(ItemSlotQty$1, {
27884
+ itemId: itemId,
27885
+ stackQty: stackQty,
27886
+ qtyClassName: qtyClassName
27887
+ });
27888
+ }
27889
+ return undefined;
27890
+ };
27891
+ var ItemSlotQty$1 = function ItemSlotQty(_ref) {
27892
+ var itemId = _ref.itemId,
27893
+ stackQty = _ref.stackQty,
27894
+ qtyClassName = _ref.qtyClassName;
27895
+ return React__default.createElement(ItemQtyContainer$1, {
27896
+ key: "qty-" + itemId,
27897
+ className: "item-slot-qty"
27898
+ }, React__default.createElement(Ellipsis, {
27899
+ maxLines: 1,
27900
+ maxWidth: "48px"
27901
+ }, React__default.createElement(ItemQty, {
27902
+ className: qtyClassName
27903
+ }, Math.round(stackQty * 100) / 100, ' ')));
27904
+ };
27905
+ var ItemQtyContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
27906
+ displayName: "ItemSlotQty__ItemQtyContainer",
27907
+ componentId: "sc-keb1s5-0"
27908
+ })(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
27909
+ var ItemQty = /*#__PURE__*/styled__default.span.withConfig({
27910
+ displayName: "ItemSlotQty__ItemQty",
27911
+ componentId: "sc-keb1s5-1"
27912
+ })(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
27913
+
27914
+ var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
27915
+ var containerType = _ref.containerType,
27916
+ atlasJSON = _ref.atlasJSON,
27917
+ atlasIMG = _ref.atlasIMG,
27918
+ slotSpriteMask = _ref.slotSpriteMask,
27919
+ item = _ref.item;
27920
+ var renderStackInfo = function renderStackInfo(item) {
27921
+ return item.stackQty && item.stackQty > 1 && onRenderStackInfo(item._id, item.stackQty);
27922
+ };
27923
+ var renderGems = function renderGems(item) {
27924
+ return item.attachedGems && onRenderGems(item);
27925
+ };
27926
+ var renderItem = function renderItem(item) {
27927
+ if (!(item != null && item.texturePath)) {
27928
+ return null;
27929
+ }
27930
+ return React__default.createElement(ErrorBoundary, {
27931
+ key: item._id
27932
+ }, item.quality && item.quality !== shared.ItemQualityLevel.Normal && React__default.createElement("div", {
27933
+ className: "quality-star"
27934
+ }, "\u2605"), React__default.createElement(SpriteFromAtlas, {
27935
+ atlasIMG: atlasIMG,
27936
+ atlasJSON: atlasJSON,
27937
+ spriteKey: shared.getItemTextureKeyPath({
27938
+ key: item.texturePath,
27939
+ texturePath: item.texturePath,
27940
+ stackQty: item.stackQty || 1,
27941
+ isStackable: item.isStackable
27942
+ }, atlasJSON),
27943
+ imgScale: 3,
27944
+ imgClassname: "sprite-from-atlas-img--item",
27945
+ tintColor: item.tintColor
27946
+ }), renderStackInfo(item), renderGems(item));
27947
+ };
27948
+ var renderEquipment = function renderEquipment(itemToRender) {
27949
+ var _itemToRender$allowed;
27950
+ if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
27951
+ return React__default.createElement(ErrorBoundary, {
27952
+ key: uuid.v4()
27953
+ }, React__default.createElement(SpriteFromAtlas, {
27954
+ key: uuid.v4(),
27955
+ atlasIMG: atlasIMG,
27956
+ atlasJSON: atlasJSON,
27957
+ spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
27958
+ imgScale: 3,
27959
+ grayScale: true,
27960
+ opacity: 0.4,
27961
+ imgClassname: "sprite-from-atlas-img--item"
27962
+ }));
27963
+ }
27964
+ return renderItem(itemToRender);
27965
+ };
27966
+ var onRenderSlot = function onRenderSlot(itemToRender) {
27967
+ switch (containerType) {
27968
+ case shared.ItemContainerType.Equipment:
27969
+ return renderEquipment(itemToRender);
27970
+ default:
27971
+ return renderItem(itemToRender);
27972
+ }
27973
+ };
27974
+ return onRenderSlot(item);
27975
+ };
27976
+
27958
27977
  var EquipmentSlotSpriteByType = {
27959
27978
  Neck: 'accessories/corruption-necklace.png',
27960
27979
  LeftHand: 'swords/broad-sword.png',
@@ -28271,7 +28290,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
28271
28290
  var Container$a = /*#__PURE__*/styled__default.div.withConfig({
28272
28291
  displayName: "ItemSlot__Container",
28273
28292
  componentId: "sc-l2j5ef-0"
28274
- })(["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) {
28293
+ })(["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) {
28275
28294
  var isDraggingItem = _ref2.isDraggingItem;
28276
28295
  return isDraggingItem ? 0 : 1;
28277
28296
  }, function (_ref3) {
@@ -28284,7 +28303,10 @@ var Container$a = /*#__PURE__*/styled__default.div.withConfig({
28284
28303
  var item = _ref5.item;
28285
28304
  return "0 0 4px 3px " + rarityColor(item);
28286
28305
  }, function (_ref6) {
28287
- var isSelectingShortcut = _ref6.isSelectingShortcut;
28306
+ var item = _ref6.item;
28307
+ return qualityColorHex(item);
28308
+ }, function (_ref7) {
28309
+ var isSelectingShortcut = _ref7.isSelectingShortcut;
28288
28310
  return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
28289
28311
  });
28290
28312
  var ItemContainer = /*#__PURE__*/styled__default.div.withConfig({
@@ -28401,10 +28423,16 @@ var ItemInfo = function ItemInfo(_ref) {
28401
28423
  var Container$b = /*#__PURE__*/styled__default.div.withConfig({
28402
28424
  displayName: "ItemInfo__Container",
28403
28425
  componentId: "sc-1xm4q8k-0"
28404
- })(["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) {
28426
+ })(["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) {
28405
28427
  var _rarityColor;
28406
28428
  var item = _ref2.item;
28407
28429
  return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
28430
+ }, function (_ref3) {
28431
+ var item = _ref3.item;
28432
+ return "0 0 5px 2px " + rarityColor(item);
28433
+ }, function (_ref4) {
28434
+ var item = _ref4.item;
28435
+ return (item == null ? void 0 : item.quality) && item.quality !== shared.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 ";
28408
28436
  });
28409
28437
  var Title$1 = /*#__PURE__*/styled__default.div.withConfig({
28410
28438
  displayName: "ItemInfo__Title",
@@ -28413,8 +28441,8 @@ var Title$1 = /*#__PURE__*/styled__default.div.withConfig({
28413
28441
  var Rarity = /*#__PURE__*/styled__default.div.withConfig({
28414
28442
  displayName: "ItemInfo__Rarity",
28415
28443
  componentId: "sc-1xm4q8k-2"
28416
- })(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref3) {
28417
- var item = _ref3.item;
28444
+ })(["font-size:", ";font-weight:normal;margin-top:0.2rem;color:", ";filter:brightness(1.5);"], uiFonts.size.small, function (_ref5) {
28445
+ var item = _ref5.item;
28418
28446
  return rarityColor(item);
28419
28447
  });
28420
28448
  var Type = /*#__PURE__*/styled__default.div.withConfig({
@@ -28428,8 +28456,8 @@ var LevelRequirement = /*#__PURE__*/styled__default.div.withConfig({
28428
28456
  var Statistic = /*#__PURE__*/styled__default.div.withConfig({
28429
28457
  displayName: "ItemInfo__Statistic",
28430
28458
  componentId: "sc-1xm4q8k-5"
28431
- })(["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) {
28432
- var $isSpecial = _ref4.$isSpecial;
28459
+ })(["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) {
28460
+ var $isSpecial = _ref6.$isSpecial;
28433
28461
  return $isSpecial ? uiColors.darkYellow : 'inherit';
28434
28462
  }, uiColors.lightGreen, uiColors.cardinal);
28435
28463
  var Description = /*#__PURE__*/styled__default.div.withConfig({
@@ -31136,7 +31164,7 @@ var Icon$1 = /*#__PURE__*/styled__default.span.withConfig({
31136
31164
  var Content$1 = /*#__PURE__*/styled__default.div.withConfig({
31137
31165
  displayName: "Collapsible__Content",
31138
31166
  componentId: "sc-s4h8ey-4"
31139
- })(["padding:6px;"]);
31167
+ })(["padding:12px;"]);
31140
31168
 
31141
31169
  var BaseInformationDetails = function BaseInformationDetails(_ref) {
31142
31170
  var name = _ref.name,
@@ -31161,15 +31189,15 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
31161
31189
  var Container$p = /*#__PURE__*/styled__default.div.withConfig({
31162
31190
  displayName: "BaseInformationDetails__Container",
31163
31191
  componentId: "sc-1vguuz8-0"
31164
- })(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
31192
+ })(["position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:1000;"]);
31165
31193
  var Overlay = /*#__PURE__*/styled__default.div.withConfig({
31166
31194
  displayName: "BaseInformationDetails__Overlay",
31167
31195
  componentId: "sc-1vguuz8-1"
31168
- })(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
31196
+ })(["position:absolute;inset:0;background-color:rgba(0,0,0,0.8);"]);
31169
31197
  var Modal = /*#__PURE__*/styled__default.div.withConfig({
31170
31198
  displayName: "BaseInformationDetails__Modal",
31171
31199
  componentId: "sc-1vguuz8-2"
31172
- })(["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);
31200
+ })(["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);
31173
31201
  var CloseButton$5 = /*#__PURE__*/styled__default.button.withConfig({
31174
31202
  displayName: "BaseInformationDetails__CloseButton",
31175
31203
  componentId: "sc-1vguuz8-3"
@@ -31181,7 +31209,7 @@ var Header$2 = /*#__PURE__*/styled__default.div.withConfig({
31181
31209
  var Content$2 = /*#__PURE__*/styled__default.div.withConfig({
31182
31210
  displayName: "BaseInformationDetails__Content",
31183
31211
  componentId: "sc-1vguuz8-5"
31184
- })(["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;}"]);
31212
+ })(["display:flex;flex-direction:column;gap:16px;height:100%;overflow:auto;"]);
31185
31213
  var Title$4 = /*#__PURE__*/styled__default.h2.withConfig({
31186
31214
  displayName: "BaseInformationDetails__Title",
31187
31215
  componentId: "sc-1vguuz8-6"
@@ -31427,7 +31455,6 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31427
31455
  itemsAtlasIMG = _ref.itemsAtlasIMG,
31428
31456
  initialSearchQuery = _ref.initialSearchQuery,
31429
31457
  tabId = _ref.tabId;
31430
- var isMobile = shared.isMobileOrTablet();
31431
31458
  var _useState = React.useState(initialSearchQuery),
31432
31459
  searchQuery = _useState[0],
31433
31460
  setSearchQuery = _useState[1];
@@ -31469,16 +31496,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31469
31496
  }) || [];
31470
31497
  };
31471
31498
  var handleMouseEnter = function handleMouseEnter(e, item) {
31472
- if (!isMobile) {
31473
- setTooltipPosition({
31474
- x: e.clientX + TOOLTIP_OFFSET,
31475
- y: e.clientY
31476
- });
31477
- setHoveredItem(item);
31478
- }
31499
+ setTooltipPosition({
31500
+ x: e.clientX + TOOLTIP_OFFSET,
31501
+ y: e.clientY
31502
+ });
31503
+ setHoveredItem(item);
31479
31504
  };
31480
31505
  var handleMouseMove = function handleMouseMove(e) {
31481
- if (!isMobile && hoveredItem) {
31506
+ if (hoveredItem) {
31482
31507
  setTooltipPosition({
31483
31508
  x: e.clientX + TOOLTIP_OFFSET,
31484
31509
  y: e.clientY
@@ -31486,13 +31511,15 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31486
31511
  }
31487
31512
  };
31488
31513
  var handleMouseLeave = function handleMouseLeave() {
31489
- if (!isMobile) {
31490
- setHoveredItem(null);
31491
- }
31514
+ setHoveredItem(null);
31492
31515
  };
31493
31516
  var handleTouchStart = function handleTouchStart(e, item) {
31494
- e.preventDefault();
31495
- setSelectedItem(item);
31517
+ var touch = e.touches[0];
31518
+ setTooltipPosition({
31519
+ x: touch.clientX + TOOLTIP_OFFSET,
31520
+ y: touch.clientY
31521
+ });
31522
+ setHoveredItem(item);
31496
31523
  };
31497
31524
  var handleItemClick = function handleItemClick(item) {
31498
31525
  setSelectedItem(item);
@@ -31542,14 +31569,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31542
31569
  tabId: tabId,
31543
31570
  layout: "grid",
31544
31571
  itemHeight: "180px"
31545
- }), !isMobile && hoveredItem && React__default.createElement(TooltipWrapper, {
31572
+ }), hoveredItem && React__default.createElement(TooltipWrapper, {
31546
31573
  style: {
31547
31574
  top: tooltipPosition.y,
31548
31575
  left: tooltipPosition.x
31549
31576
  }
31550
31577
  }, React__default.createElement(InformationCenterItemTooltip, {
31551
31578
  item: hoveredItem
31552
- })), selectedItem && React__default.createElement(Portal, null, React__default.createElement(InformationCenterItemDetails, {
31579
+ })), selectedItem && React__default.createElement(InformationCenterItemDetails, {
31553
31580
  item: selectedItem,
31554
31581
  itemsAtlasJSON: itemsAtlasJSON,
31555
31582
  itemsAtlasIMG: itemsAtlasIMG,
@@ -31557,7 +31584,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
31557
31584
  onBack: function onBack() {
31558
31585
  return setSelectedItem(null);
31559
31586
  }
31560
- })));
31587
+ }));
31561
31588
  };
31562
31589
  var TooltipWrapper = /*#__PURE__*/styled__default.div.withConfig({
31563
31590
  displayName: "InformationCenterItemsSection__TooltipWrapper",
@@ -31693,7 +31720,7 @@ var Value$1 = /*#__PURE__*/styled__default.span.withConfig({
31693
31720
  var StyledCollapsible$1 = /*#__PURE__*/styled__default(Collapsible).withConfig({
31694
31721
  displayName: "InformationCenterNPCDetails__StyledCollapsible",
31695
31722
  componentId: "sc-fdu3xl-4"
31696
- })(["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);
31723
+ })(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:auto;scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray);
31697
31724
  var StatGrid$1 = /*#__PURE__*/styled__default.div.withConfig({
31698
31725
  displayName: "InformationCenterNPCDetails__StatGrid",
31699
31726
  componentId: "sc-fdu3xl-5"
@@ -31745,19 +31772,19 @@ var Separator = /*#__PURE__*/styled__default.span.withConfig({
31745
31772
  var LootSearchContainer = /*#__PURE__*/styled__default.div.withConfig({
31746
31773
  displayName: "InformationCenterNPCDetails__LootSearchContainer",
31747
31774
  componentId: "sc-fdu3xl-17"
31748
- })(["padding:8px;background:rgba(0,0,0,0.2);border-radius:4px;margin:8px 8px 4px;box-sizing:border-box;"]);
31775
+ })(["padding:12px 12px 0;"]);
31749
31776
  var StyledSearchBar$1 = /*#__PURE__*/styled__default(SearchBar).withConfig({
31750
31777
  displayName: "InformationCenterNPCDetails__StyledSearchBar",
31751
31778
  componentId: "sc-fdu3xl-18"
31752
- })(["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);
31779
+ })(["width:100%;"]);
31753
31780
  var LootGrid = /*#__PURE__*/styled__default.div.withConfig({
31754
31781
  displayName: "InformationCenterNPCDetails__LootGrid",
31755
31782
  componentId: "sc-fdu3xl-19"
31756
- })(["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;}"]);
31783
+ })(["display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;padding:12px;"]);
31757
31784
  var LootItem = /*#__PURE__*/styled__default.div.withConfig({
31758
31785
  displayName: "InformationCenterNPCDetails__LootItem",
31759
31786
  componentId: "sc-fdu3xl-20"
31760
- })(["display:flex;align-items:center;gap:4px;background:rgba(255,255,255,0.05);padding:4px;border-radius:4px;min-width:0;"]);
31787
+ })(["display:flex;align-items:center;gap:8px;background:rgba(255,255,255,0.05);padding:8px;border-radius:4px;"]);
31761
31788
  var LootDetails = /*#__PURE__*/styled__default.div.withConfig({
31762
31789
  displayName: "InformationCenterNPCDetails__LootDetails",
31763
31790
  componentId: "sc-fdu3xl-21"
@@ -31886,7 +31913,6 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31886
31913
  entitiesAtlasIMG = _ref.entitiesAtlasIMG,
31887
31914
  initialSearchQuery = _ref.initialSearchQuery,
31888
31915
  tabId = _ref.tabId;
31889
- var isMobile = shared.isMobileOrTablet();
31890
31916
  var _useState = React.useState(initialSearchQuery),
31891
31917
  searchQuery = _useState[0],
31892
31918
  setSearchQuery = _useState[1];
@@ -31896,8 +31922,10 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31896
31922
  var _useState3 = React.useState(null),
31897
31923
  selectedMonster = _useState3[0],
31898
31924
  setSelectedMonster = _useState3[1];
31925
+ var _useState4 = React.useState('ontouchstart' in window),
31926
+ isTouchDevice = _useState4[0];
31899
31927
  var handleMouseEnter = function handleMouseEnter(monster, event) {
31900
- if (!isMobile && !selectedMonster) {
31928
+ if (!isTouchDevice && !selectedMonster) {
31901
31929
  setTooltipData({
31902
31930
  npc: monster,
31903
31931
  position: {
@@ -31908,12 +31936,12 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31908
31936
  }
31909
31937
  };
31910
31938
  var handleMouseLeave = function handleMouseLeave() {
31911
- if (!isMobile) {
31939
+ if (!isTouchDevice) {
31912
31940
  setTooltipData(null);
31913
31941
  }
31914
31942
  };
31915
31943
  var handleMouseMove = function handleMouseMove(event) {
31916
- if (!isMobile && tooltipData) {
31944
+ if (!isTouchDevice && tooltipData) {
31917
31945
  setTooltipData(_extends({}, tooltipData, {
31918
31946
  position: {
31919
31947
  x: event.clientX,
@@ -31923,17 +31951,29 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
31923
31951
  }
31924
31952
  };
31925
31953
  var handleTouchStart = function handleTouchStart(monster, event) {
31926
- event.preventDefault();
31927
- setSelectedMonster(monster);
31928
- setTooltipData(null);
31954
+ if (isTouchDevice) {
31955
+ event.preventDefault();
31956
+ var touch = event.touches[0];
31957
+ if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
31958
+ setTooltipData(null);
31959
+ } else {
31960
+ setTooltipData({
31961
+ npc: monster,
31962
+ position: {
31963
+ x: touch.clientX,
31964
+ y: touch.clientY
31965
+ }
31966
+ });
31967
+ }
31968
+ }
31929
31969
  };
31930
31970
  var handleMonsterClick = function handleMonsterClick(monster) {
31931
31971
  setSelectedMonster(monster);
31932
31972
  setTooltipData(null);
31933
31973
  };
31934
- var _useState4 = React.useState('all'),
31935
- selectedBestiaryCategory = _useState4[0],
31936
- setSelectedBestiaryCategory = _useState4[1];
31974
+ var _useState5 = React.useState('all'),
31975
+ selectedBestiaryCategory = _useState5[0],
31976
+ setSelectedBestiaryCategory = _useState5[1];
31937
31977
  var bestiaryCategoryOptions = [{
31938
31978
  id: 0,
31939
31979
  value: 'all',
@@ -32008,7 +32048,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32008
32048
  },
32009
32049
  dependencies: [selectedBestiaryCategory],
32010
32050
  itemHeight: "180px"
32011
- }), !isMobile && tooltipData && React__default.createElement(Portal, null, React__default.createElement(TooltipWrapper$1, {
32051
+ }), tooltipData && React__default.createElement(Portal, null, React__default.createElement(TooltipWrapper$1, {
32012
32052
  style: {
32013
32053
  position: 'fixed',
32014
32054
  left: tooltipData.position.x + 10,
@@ -32018,7 +32058,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32018
32058
  npc: tooltipData.npc,
32019
32059
  itemsAtlasJSON: itemsAtlasJSON,
32020
32060
  itemsAtlasIMG: itemsAtlasIMG
32021
- }))), selectedMonster && React__default.createElement(Portal, null, React__default.createElement(InformationCenterNPCDetails, {
32061
+ }))), selectedMonster && React__default.createElement(InformationCenterNPCDetails, {
32022
32062
  npc: selectedMonster,
32023
32063
  itemsAtlasJSON: itemsAtlasJSON,
32024
32064
  itemsAtlasIMG: itemsAtlasIMG,
@@ -32029,7 +32069,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
32029
32069
  onBack: function onBack() {
32030
32070
  return setSelectedMonster(null);
32031
32071
  }
32032
- })));
32072
+ }));
32033
32073
  };
32034
32074
  var TooltipWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
32035
32075
  displayName: "InformationCenterBestiarySection__TooltipWrapper",
@@ -32240,6 +32280,9 @@ var InformationCenter = function InformationCenter(_ref) {
32240
32280
  var _useState = React.useState('bestiary'),
32241
32281
  activeTab = _useState[0],
32242
32282
  setActiveTab = _useState[1];
32283
+ var _useState2 = React.useState(null),
32284
+ selectedItem = _useState2[0],
32285
+ setSelectedItem = _useState2[1];
32243
32286
  if (loading) {
32244
32287
  return React__default.createElement(LoadingMessage, null, "Loading...");
32245
32288
  }
@@ -32289,8 +32332,7 @@ var InformationCenter = function InformationCenter(_ref) {
32289
32332
  })
32290
32333
  }];
32291
32334
  return React__default.createElement(DraggableContainer, {
32292
- title: "Information Center",
32293
- type: exports.RPGUIContainerTypes.Framed
32335
+ title: "Information Center"
32294
32336
  }, React__default.createElement(Container$r, null, React__default.createElement(InternalTabs, {
32295
32337
  tabs: tabs,
32296
32338
  activeTextColor: "#000000",
@@ -32300,6 +32342,19 @@ var InformationCenter = function InformationCenter(_ref) {
32300
32342
  inactiveColor: "#6b7280",
32301
32343
  borderColor: "#f59e0b",
32302
32344
  hoverColor: "#fef3c7"
32345
+ }), selectedItem && React__default.createElement(InformationCenterItemDetails, {
32346
+ item: selectedItem,
32347
+ itemsAtlasJSON: itemsAtlasJSON,
32348
+ itemsAtlasIMG: itemsAtlasIMG,
32349
+ droppedBy: bestiaryItems.filter(function (npc) {
32350
+ var _npc$loots;
32351
+ return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
32352
+ return loot.itemBlueprintKey === selectedItem.key;
32353
+ });
32354
+ }),
32355
+ onBack: function onBack() {
32356
+ return setSelectedItem(null);
32357
+ }
32303
32358
  })));
32304
32359
  };
32305
32360
  var Container$r = /*#__PURE__*/styled__default.div.withConfig({