@rpg-engine/long-bow 0.8.35 → 0.8.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Item/Inventory/ItemSlotQuality.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +342 -216
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +343 -217
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/InformationCenter/InformationCenter.tsx +33 -2
- package/src/components/InformationCenter/InformationCenterCell.tsx +70 -9
- package/src/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.tsx +1 -1
- package/src/components/InformationCenter/sections/items/InformationCenterItemsSection.tsx +1 -1
- package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx +5 -3
- package/src/components/InternalTabs/InternalTabs.tsx +19 -3
- package/src/components/Item/Cards/ItemInfo.tsx +18 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +15 -3
- package/src/components/Item/Inventory/ItemSlotQuality.ts +18 -0
- package/src/components/Item/Inventory/ItemSlotRenderer.tsx +6 -2
- package/src/components/shared/AdvancedFilters/AdvancedFilters.tsx +158 -33
- package/src/components/shared/PaginatedContent/PaginatedContent.tsx +61 -8
- package/src/hooks/useTooltipPosition.ts +24 -5
- package/src/mocks/itemContainer.mocks.ts +7 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -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,
|
|
5
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, NPCSubtype, EntityAttackType, 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
|
|
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
|
|
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 (
|
|
28410
|
-
var 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 (
|
|
28425
|
-
var $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({
|
|
@@ -30765,6 +30793,9 @@ var FadeInCarouselImg = /*#__PURE__*/styled(CarouselImg).withConfig({
|
|
|
30765
30793
|
componentId: "sc-gdvbly-5"
|
|
30766
30794
|
})(["animation:", " 0.5s;"], fadeIn);
|
|
30767
30795
|
|
|
30796
|
+
var UI_BREAKPOINT_MOBILE = '950px';
|
|
30797
|
+
var UI_BREAKPOINT_SMALL_LAPTOP = '1400px';
|
|
30798
|
+
|
|
30768
30799
|
var InternalTabs = function InternalTabs(_ref) {
|
|
30769
30800
|
var _tabs$find;
|
|
30770
30801
|
var tabs = _ref.tabs,
|
|
@@ -30813,39 +30844,56 @@ var TabHeader = /*#__PURE__*/styled.div.withConfig({
|
|
|
30813
30844
|
var TabButton = /*#__PURE__*/styled.button.withConfig({
|
|
30814
30845
|
displayName: "InternalTabs__TabButton",
|
|
30815
30846
|
componentId: "sc-ldufv0-2"
|
|
30816
|
-
})(["flex:1;padding:0.5rem
|
|
30847
|
+
})(["flex:1;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;border-right:1px solid ", ";background-color:", ";color:", ";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;@media (min-width:480px){padding:0.375rem 0.75rem;font-size:0.8125rem;}@media (min-width:", "){padding:0.5rem 1rem;font-size:0.875rem;}&:last-child{border-right:none;}&:hover{background-color:", ";}"], function (props) {
|
|
30817
30848
|
return props.borderColor;
|
|
30818
30849
|
}, function (props) {
|
|
30819
30850
|
return props.active ? props.activeColor : 'transparent';
|
|
30820
30851
|
}, function (props) {
|
|
30821
30852
|
return props.active ? props.activeTextColor : props.inactiveColor;
|
|
30822
|
-
}, function (props) {
|
|
30853
|
+
}, UI_BREAKPOINT_MOBILE, function (props) {
|
|
30823
30854
|
return props.active ? props.activeColor : props.hoverColor;
|
|
30824
30855
|
});
|
|
30825
30856
|
var ContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
30826
30857
|
displayName: "InternalTabs__ContentWrapper",
|
|
30827
30858
|
componentId: "sc-ldufv0-3"
|
|
30828
|
-
})([""]);
|
|
30859
|
+
})(["width:100%;"]);
|
|
30829
30860
|
|
|
30830
|
-
var TOOLTIP_WIDTH = 300;
|
|
30831
30861
|
var TOOLTIP_OFFSET = 10;
|
|
30832
30862
|
var MIN_VISIBLE_HEIGHT = 100;
|
|
30833
30863
|
var useTooltipPosition = function useTooltipPosition() {
|
|
30864
|
+
// Dynamically calculate tooltip width based on screen size
|
|
30865
|
+
var getTooltipWidth = function getTooltipWidth() {
|
|
30866
|
+
var viewportWidth = window.innerWidth;
|
|
30867
|
+
if (viewportWidth < 360) {
|
|
30868
|
+
return Math.min(280, viewportWidth - 20);
|
|
30869
|
+
}
|
|
30870
|
+
if (viewportWidth < 480) {
|
|
30871
|
+
return 300;
|
|
30872
|
+
}
|
|
30873
|
+
return 320;
|
|
30874
|
+
};
|
|
30875
|
+
var TOOLTIP_WIDTH = getTooltipWidth();
|
|
30834
30876
|
var _useState = useState(null),
|
|
30835
30877
|
tooltipState = _useState[0],
|
|
30836
30878
|
setTooltipState = _useState[1];
|
|
30837
30879
|
var calculateTooltipPosition = function calculateTooltipPosition(rect) {
|
|
30838
30880
|
var viewportWidth = window.innerWidth;
|
|
30839
30881
|
var viewportHeight = window.innerHeight;
|
|
30882
|
+
var tooltipWidth = getTooltipWidth();
|
|
30840
30883
|
// Try to position to the right first
|
|
30841
30884
|
var x = rect.right + TOOLTIP_OFFSET;
|
|
30842
30885
|
// If it would overflow right, try positioning to the left
|
|
30843
|
-
if (x +
|
|
30844
|
-
x = rect.left -
|
|
30886
|
+
if (x + tooltipWidth > viewportWidth - TOOLTIP_OFFSET) {
|
|
30887
|
+
x = rect.left - tooltipWidth - TOOLTIP_OFFSET;
|
|
30845
30888
|
}
|
|
30846
|
-
// If left positioning would go off screen, position relative to viewport
|
|
30889
|
+
// If left positioning would go off screen, center it or position relative to viewport
|
|
30847
30890
|
if (x < TOOLTIP_OFFSET) {
|
|
30848
|
-
|
|
30891
|
+
if (viewportWidth < 400) {
|
|
30892
|
+
// For very small screens, center the tooltip
|
|
30893
|
+
x = Math.max(TOOLTIP_OFFSET, (viewportWidth - tooltipWidth) / 2);
|
|
30894
|
+
} else {
|
|
30895
|
+
x = TOOLTIP_OFFSET;
|
|
30896
|
+
}
|
|
30849
30897
|
}
|
|
30850
30898
|
// Position vertically aligned with the top of the element
|
|
30851
30899
|
var y = rect.top;
|
|
@@ -31078,15 +31126,17 @@ var PaginatedContent = function PaginatedContent(_ref) {
|
|
|
31078
31126
|
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
31079
31127
|
displayName: "PaginatedContent__Container",
|
|
31080
31128
|
componentId: "sc-lzp9hn-0"
|
|
31081
|
-
})(["display:flex;flex-direction:column;gap:
|
|
31129
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;min-height:400px;width:100%;"]);
|
|
31082
31130
|
var Content = /*#__PURE__*/styled.div.withConfig({
|
|
31083
31131
|
displayName: "PaginatedContent__Content",
|
|
31084
31132
|
componentId: "sc-lzp9hn-1"
|
|
31085
|
-
})(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:
|
|
31133
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex:1;padding:0.25rem;min-height:200px;max-height:", ";overflow-y:", ";box-sizing:border-box;@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:1rem;}&.grid{display:grid;grid-template-columns:1fr;gap:0.5rem;align-items:start;justify-content:center;width:100%;overflow-x:hidden;@media (min-width:320px){grid-template-columns:repeat(auto-fit,minmax(120px,1fr));}@media (min-width:400px){grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:0.75rem;}@media (min-width:480px){grid-template-columns:repeat(2,minmax(135px,1fr));gap:1rem;}@media (min-width:768px){grid-template-columns:repeat(3,minmax(135px,1fr));}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(135px,1fr) );}@media (min-width:", "){grid-template-columns:repeat( ", ",minmax(135px,1fr) );}.PaginatedContent-item{display:flex;align-items:flex-start;justify-content:center;height:", ";width:100%;box-sizing:border-box;min-height:135px;}}&.list{display:flex;flex-direction:column;gap:0.5rem;}"], function (props) {
|
|
31086
31134
|
return props.$maxHeight;
|
|
31087
31135
|
}, function (props) {
|
|
31088
31136
|
return props.$maxHeight ? 'auto' : 'visible';
|
|
31089
|
-
}, function (props) {
|
|
31137
|
+
}, UI_BREAKPOINT_MOBILE, function (props) {
|
|
31138
|
+
return Math.min(props.$gridColumns, 4);
|
|
31139
|
+
}, UI_BREAKPOINT_SMALL_LAPTOP, function (props) {
|
|
31090
31140
|
return props.$gridColumns;
|
|
31091
31141
|
}, function (props) {
|
|
31092
31142
|
var _props$$itemHeight;
|
|
@@ -31095,7 +31145,7 @@ var Content = /*#__PURE__*/styled.div.withConfig({
|
|
|
31095
31145
|
var PaginationContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31096
31146
|
displayName: "PaginatedContent__PaginationContainer",
|
|
31097
31147
|
componentId: "sc-lzp9hn-2"
|
|
31098
|
-
})(["display:flex;justify-content:center;padding:1rem;"]);
|
|
31148
|
+
})(["display:flex;justify-content:center;padding:0.5rem;@media (min-width:480px){padding:1rem;}"]);
|
|
31099
31149
|
var EmptyMessage = /*#__PURE__*/styled.div.withConfig({
|
|
31100
31150
|
displayName: "PaginatedContent__EmptyMessage",
|
|
31101
31151
|
componentId: "sc-lzp9hn-3"
|
|
@@ -31139,20 +31189,24 @@ var InformationCenterCell = function InformationCenterCell(_ref) {
|
|
|
31139
31189
|
width: 32,
|
|
31140
31190
|
height: 32,
|
|
31141
31191
|
imgScale: 1
|
|
31142
|
-
})), React.createElement(CellName, null, name));
|
|
31192
|
+
})), React.createElement(CellNameContainer, null, React.createElement(CellName, null, name)));
|
|
31143
31193
|
};
|
|
31144
31194
|
var CellContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31145
31195
|
displayName: "InformationCenterCell__CellContainer",
|
|
31146
31196
|
componentId: "sc-w48fdf-0"
|
|
31147
|
-
})(["position:relative;background:rgba(0,0,0,0.2);padding:0.
|
|
31197
|
+
})(["position:relative;background:rgba(0,0,0,0.2);padding:0.25rem;border-radius:4px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;cursor:pointer;transition:background-color 0.2s ease;width:100%;height:100%;min-height:135px;box-sizing:border-box;gap:0.25rem;margin:0;@media (min-width:360px){padding:0.75rem;gap:0.75rem;margin:2px;width:calc(100% - 4px);}@media (min-width:", "){min-height:150px;}&:hover{background:rgba(0,0,0,0.3);}"], UI_BREAKPOINT_MOBILE);
|
|
31148
31198
|
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31149
31199
|
displayName: "InformationCenterCell__SpriteContainer",
|
|
31150
31200
|
componentId: "sc-w48fdf-1"
|
|
31151
|
-
})(["margin-bottom:0
|
|
31201
|
+
})(["margin-bottom:0;display:flex;justify-content:center;align-items:center;width:40px;height:40px;position:relative;background:rgba(0,0,0,0.3);border-radius:4px;flex-shrink:0;@media (min-width:360px){width:48px;height:48px;}@media (min-width:480px){width:64px;height:64px;}@media (min-width:", "){width:72px;height:72px;}.sprite-from-atlas-img{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) scale(2);image-rendering:pixelated;}"], UI_BREAKPOINT_MOBILE);
|
|
31202
|
+
var CellNameContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31203
|
+
displayName: "InformationCenterCell__CellNameContainer",
|
|
31204
|
+
componentId: "sc-w48fdf-2"
|
|
31205
|
+
})(["display:flex;flex-direction:column;align-items:center;justify-content:flex-start;flex:1;width:100%;padding-top:0.25rem;"]);
|
|
31152
31206
|
var CellName = /*#__PURE__*/styled.h3.withConfig({
|
|
31153
31207
|
displayName: "InformationCenterCell__CellName",
|
|
31154
|
-
componentId: "sc-w48fdf-
|
|
31155
|
-
})(["font-size:0.
|
|
31208
|
+
componentId: "sc-w48fdf-3"
|
|
31209
|
+
})(["font-size:0.55rem;color:#fef08a;margin:0;text-align:center;font-family:'Press Start 2P',cursive;line-height:1.2;word-break:break-word;max-width:100%;overflow-wrap:break-word;hyphens:auto;width:100%;padding:0 0.125rem;box-sizing:border-box;@media (min-width:320px){padding:0 0.25rem;}@media (min-width:360px){font-size:0.6rem;}@media (min-width:480px){font-size:0.7rem;}@media (min-width:", "){font-size:0.8rem;}"], UI_BREAKPOINT_MOBILE);
|
|
31156
31210
|
|
|
31157
31211
|
var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
31158
31212
|
var name = _ref.name,
|
|
@@ -31493,18 +31547,64 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31493
31547
|
case 'dropdown':
|
|
31494
31548
|
return React.createElement(FilterSection, {
|
|
31495
31549
|
key: section.key
|
|
31496
|
-
}, React.createElement(Label$1, null, section.label), React.createElement(Dropdown, {
|
|
31550
|
+
}, React.createElement(Label$1, null, section.label), React.createElement(StyledDropdownWrapper, null, React.createElement(Dropdown, {
|
|
31497
31551
|
options: section.options || [],
|
|
31498
31552
|
onChange: section.onChange,
|
|
31499
31553
|
width: "100%"
|
|
31500
|
-
}));
|
|
31554
|
+
})));
|
|
31501
31555
|
default:
|
|
31502
31556
|
return null;
|
|
31503
31557
|
}
|
|
31504
31558
|
};
|
|
31559
|
+
// Calculate button position for the portal
|
|
31560
|
+
var _React$useState = React.useState({
|
|
31561
|
+
top: 0,
|
|
31562
|
+
left: 0,
|
|
31563
|
+
isMobile: false
|
|
31564
|
+
}),
|
|
31565
|
+
buttonPosition = _React$useState[0],
|
|
31566
|
+
setButtonPosition = _React$useState[1];
|
|
31567
|
+
var buttonRef = useRef(null);
|
|
31568
|
+
var panelRef = useRef(null);
|
|
31569
|
+
useEffect(function () {
|
|
31570
|
+
if (isOpen && buttonRef.current) {
|
|
31571
|
+
var rect = buttonRef.current.getBoundingClientRect();
|
|
31572
|
+
var isMobileView = window.innerWidth < 480;
|
|
31573
|
+
if (isMobileView) {
|
|
31574
|
+
// Center in the screen for mobile
|
|
31575
|
+
setButtonPosition({
|
|
31576
|
+
top: Math.max(50, window.innerHeight / 2 - 150),
|
|
31577
|
+
left: window.innerWidth / 2,
|
|
31578
|
+
isMobile: true
|
|
31579
|
+
});
|
|
31580
|
+
} else {
|
|
31581
|
+
// Position below the button for larger screens
|
|
31582
|
+
setButtonPosition({
|
|
31583
|
+
top: rect.bottom + window.scrollY,
|
|
31584
|
+
left: rect.left + rect.width / 2 + window.scrollX,
|
|
31585
|
+
isMobile: false
|
|
31586
|
+
});
|
|
31587
|
+
}
|
|
31588
|
+
}
|
|
31589
|
+
}, [isOpen]);
|
|
31590
|
+
// Handle click outside to close the panel
|
|
31591
|
+
useEffect(function () {
|
|
31592
|
+
var handleClickOutside = function handleClickOutside(event) {
|
|
31593
|
+
if (isOpen && panelRef.current && !panelRef.current.contains(event.target) && buttonRef.current && !buttonRef.current.contains(event.target)) {
|
|
31594
|
+
onToggle();
|
|
31595
|
+
}
|
|
31596
|
+
};
|
|
31597
|
+
if (isOpen) {
|
|
31598
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
31599
|
+
}
|
|
31600
|
+
return function () {
|
|
31601
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
31602
|
+
};
|
|
31603
|
+
}, [isOpen, onToggle]);
|
|
31505
31604
|
return React.createElement(Container$q, null, React.createElement(FilterButton, {
|
|
31506
31605
|
onClick: onToggle,
|
|
31507
|
-
"$hasActiveFilters": hasActiveFilters
|
|
31606
|
+
"$hasActiveFilters": hasActiveFilters,
|
|
31607
|
+
ref: buttonRef
|
|
31508
31608
|
}, hasActiveFilters ? React.createElement(AiFillFilter, {
|
|
31509
31609
|
size: 20
|
|
31510
31610
|
}) : React.createElement(AiOutlineFilter, {
|
|
@@ -31517,9 +31617,21 @@ var AdvancedFilters = function AdvancedFilters(_ref) {
|
|
|
31517
31617
|
return rangeValue[0] !== undefined || rangeValue[1] !== undefined;
|
|
31518
31618
|
}
|
|
31519
31619
|
return section.value !== 'all';
|
|
31520
|
-
}).length)), isOpen && React.createElement(
|
|
31620
|
+
}).length)), isOpen && React.createElement(Portal, null, React.createElement(FiltersPanel, {
|
|
31621
|
+
ref: panelRef,
|
|
31622
|
+
style: {
|
|
31623
|
+
position: 'fixed',
|
|
31624
|
+
top: buttonPosition.top + "px",
|
|
31625
|
+
left: buttonPosition.left + "px",
|
|
31626
|
+
transform: 'translateX(-50%)',
|
|
31627
|
+
zIndex: 9999
|
|
31628
|
+
},
|
|
31629
|
+
"$isMobile": buttonPosition.isMobile
|
|
31630
|
+
}, React.createElement(FilterHeader, null, React.createElement(FilterTitle, null, "Advanced Filters"), buttonPosition.isMobile && React.createElement(CloseButton$6, {
|
|
31631
|
+
onClick: onToggle
|
|
31632
|
+
}, "\xD7")), sections.map(renderFilterSection), hasActiveFilters && React.createElement(ClearFiltersButton, {
|
|
31521
31633
|
onClick: onClearAll
|
|
31522
|
-
}, "Clear All Filters")));
|
|
31634
|
+
}, "Clear All Filters"))));
|
|
31523
31635
|
};
|
|
31524
31636
|
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
31525
31637
|
displayName: "AdvancedFilters__Container",
|
|
@@ -31548,7 +31660,9 @@ var FilterCount = /*#__PURE__*/styled.div.withConfig({
|
|
|
31548
31660
|
var FiltersPanel = /*#__PURE__*/styled.div.withConfig({
|
|
31549
31661
|
displayName: "AdvancedFilters__FiltersPanel",
|
|
31550
31662
|
componentId: "sc-1xj6ldr-3"
|
|
31551
|
-
})(["
|
|
31663
|
+
})(["background:#1a1a1a;border:1px solid #333;border-radius:6px;padding:1rem;width:280px;max-width:calc(100vw - 20px);display:flex;flex-direction:column;gap:1rem;box-shadow:0 4px 12px rgba(0,0,0,0.3);font-family:'Press Start 2P',cursive;@media (max-width:320px){width:250px;padding:0.75rem;gap:0.75rem;}&:before{content:'';position:absolute;top:-6px;left:50%;transform:translateX(-50%) rotate(45deg);width:12px;height:12px;background:#1a1a1a;border-left:1px solid #333;border-top:1px solid #333;display:", ";}"], function (props) {
|
|
31664
|
+
return props.$isMobile ? 'none' : 'block';
|
|
31665
|
+
});
|
|
31552
31666
|
var FilterHeader = /*#__PURE__*/styled.div.withConfig({
|
|
31553
31667
|
displayName: "AdvancedFilters__FilterHeader",
|
|
31554
31668
|
componentId: "sc-1xj6ldr-4"
|
|
@@ -31556,7 +31670,7 @@ var FilterHeader = /*#__PURE__*/styled.div.withConfig({
|
|
|
31556
31670
|
var FilterTitle = /*#__PURE__*/styled.div.withConfig({
|
|
31557
31671
|
displayName: "AdvancedFilters__FilterTitle",
|
|
31558
31672
|
componentId: "sc-1xj6ldr-5"
|
|
31559
|
-
})(["font-weight:600;color:#ffd700;font-size:0.
|
|
31673
|
+
})(["font-weight:600;color:#ffd700;font-size:0.75rem;"]);
|
|
31560
31674
|
var FilterSection = /*#__PURE__*/styled.div.withConfig({
|
|
31561
31675
|
displayName: "AdvancedFilters__FilterSection",
|
|
31562
31676
|
componentId: "sc-1xj6ldr-6"
|
|
@@ -31564,15 +31678,23 @@ var FilterSection = /*#__PURE__*/styled.div.withConfig({
|
|
|
31564
31678
|
var Label$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31565
31679
|
displayName: "AdvancedFilters__Label",
|
|
31566
31680
|
componentId: "sc-1xj6ldr-7"
|
|
31567
|
-
})(["color:#999;font-size:0.
|
|
31681
|
+
})(["color:#999;font-size:0.65rem;text-transform:uppercase;letter-spacing:0.05em;"]);
|
|
31568
31682
|
var RangeInputs = /*#__PURE__*/styled.div.withConfig({
|
|
31569
31683
|
displayName: "AdvancedFilters__RangeInputs",
|
|
31570
31684
|
componentId: "sc-1xj6ldr-8"
|
|
31571
|
-
})(["display:flex;align-items:center;gap:0.5rem;input{width:80px;background:#262626 !important;border:1px solid #
|
|
31685
|
+
})(["display:flex;align-items:center;gap:0.5rem;input{width:80px;background:#262626 !important;border:1px solid #444 !important;border-radius:4px !important;color:#ddd !important;font-size:0.65rem !important;padding:0.5rem !important;height:auto !important;box-shadow:inset 0 1px 3px rgba(0,0,0,0.2) !important;&::placeholder{color:#666 !important;}&:focus{border-color:#f59e0b !important;outline:none !important;}}svg{color:#666;font-size:0.875rem;}"]);
|
|
31572
31686
|
var ClearFiltersButton = /*#__PURE__*/styled.button.withConfig({
|
|
31573
31687
|
displayName: "AdvancedFilters__ClearFiltersButton",
|
|
31574
31688
|
componentId: "sc-1xj6ldr-9"
|
|
31575
|
-
})(["width:100%;background:transparent;color:#666;border:none;padding:0.75rem 0;margin-top:0.5rem;cursor:pointer;font-size:0.
|
|
31689
|
+
})(["width:100%;background:transparent;color:#666;border:none;padding:0.75rem 0;margin-top:0.5rem;cursor:pointer;font-size:0.65rem;transition:all 0.2s;border-top:1px solid #333;text-transform:uppercase;letter-spacing:0.05em;font-family:'Press Start 2P',cursive;&:hover{color:#ffd700;}"]);
|
|
31690
|
+
var CloseButton$6 = /*#__PURE__*/styled.button.withConfig({
|
|
31691
|
+
displayName: "AdvancedFilters__CloseButton",
|
|
31692
|
+
componentId: "sc-1xj6ldr-10"
|
|
31693
|
+
})(["background:transparent;border:none;color:#999;font-size:1.5rem;line-height:1;cursor:pointer;padding:0;margin:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;&:hover{color:#ffd700;}"]);
|
|
31694
|
+
var StyledDropdownWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
31695
|
+
displayName: "AdvancedFilters__StyledDropdownWrapper",
|
|
31696
|
+
componentId: "sc-1xj6ldr-11"
|
|
31697
|
+
})([".rpgui-dropdown-imp{font-size:0.8rem;min-height:unset;padding-top:0.3rem;}"]);
|
|
31576
31698
|
|
|
31577
31699
|
var ItemsAdvancedFilters = function ItemsAdvancedFilters(_ref) {
|
|
31578
31700
|
var isOpen = _ref.isOpen,
|
|
@@ -31746,7 +31868,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31746
31868
|
dependencies: [selectedItemCategory, selectedTier],
|
|
31747
31869
|
tabId: tabId,
|
|
31748
31870
|
layout: "grid",
|
|
31749
|
-
itemHeight:
|
|
31871
|
+
itemHeight: isMobile ? '150px' : '180px'
|
|
31750
31872
|
}), !isMobile && tooltipState && tooltipState.item && React.createElement(Portal, null, React.createElement(TooltipWrapper, {
|
|
31751
31873
|
width: TOOLTIP_WIDTH,
|
|
31752
31874
|
style: {
|
|
@@ -32346,7 +32468,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32346
32468
|
rightElement: SearchBarRightElement
|
|
32347
32469
|
},
|
|
32348
32470
|
dependencies: [selectedBestiaryCategory, levelRange, selectedSubtype, selectedAttackType],
|
|
32349
|
-
itemHeight:
|
|
32471
|
+
itemHeight: isMobile ? '150px' : '180px'
|
|
32350
32472
|
}), !isMobile && tooltipState && tooltipState.item && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
|
|
32351
32473
|
width: TOOLTIP_WIDTH,
|
|
32352
32474
|
style: {
|
|
@@ -32396,6 +32518,7 @@ var InformationCenterTutorialsSection = function InformationCenterTutorialsSecti
|
|
|
32396
32518
|
var videoGuides = _ref.videoGuides,
|
|
32397
32519
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
32398
32520
|
tabId = _ref.tabId;
|
|
32521
|
+
var isMobile = isMobileOrTablet();
|
|
32399
32522
|
var _useState = useState(initialSearchQuery),
|
|
32400
32523
|
searchQuery = _useState[0],
|
|
32401
32524
|
setSearchQuery = _useState[1];
|
|
@@ -32446,7 +32569,7 @@ var InformationCenterTutorialsSection = function InformationCenterTutorialsSecti
|
|
|
32446
32569
|
maxLines: 2
|
|
32447
32570
|
}, guide.title)), React.createElement(GuideDescription, null, React.createElement(Ellipsis, {
|
|
32448
32571
|
maxWidth: "100%",
|
|
32449
|
-
maxLines: 5
|
|
32572
|
+
maxLines: isMobile ? 3 : 5
|
|
32450
32573
|
}, guide.description)), React.createElement(GuideLabelsContainer, null, React.createElement(GuideCategory, null, guide.category), React.createElement(GuideLanguage, null, guide.language))));
|
|
32451
32574
|
};
|
|
32452
32575
|
var filteredGuides = useMemo(function () {
|
|
@@ -32484,9 +32607,9 @@ var InformationCenterTutorialsSection = function InformationCenterTutorialsSecti
|
|
|
32484
32607
|
dependencies: [selectedCategory],
|
|
32485
32608
|
tabId: tabId,
|
|
32486
32609
|
layout: "grid",
|
|
32487
|
-
gridColumns: GRID_COLUMNS,
|
|
32610
|
+
gridColumns: isMobile ? 1 : GRID_COLUMNS,
|
|
32488
32611
|
itemsPerPage: ITEMS_PER_PAGE$2,
|
|
32489
|
-
itemHeight:
|
|
32612
|
+
itemHeight: isMobile ? '280px' : '320px'
|
|
32490
32613
|
});
|
|
32491
32614
|
};
|
|
32492
32615
|
var GuideItem = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -32543,6 +32666,7 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32543
32666
|
var _useState = useState('bestiary'),
|
|
32544
32667
|
activeTab = _useState[0],
|
|
32545
32668
|
setActiveTab = _useState[1];
|
|
32669
|
+
var isMobile = isMobileOrTablet();
|
|
32546
32670
|
if (loading) {
|
|
32547
32671
|
return React.createElement(LoadingMessage, null, "Loading...");
|
|
32548
32672
|
}
|
|
@@ -32585,7 +32709,9 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32585
32709
|
}];
|
|
32586
32710
|
return React.createElement(DraggableContainer, {
|
|
32587
32711
|
title: "Information Center",
|
|
32588
|
-
type: RPGUIContainerTypes.Framed
|
|
32712
|
+
type: RPGUIContainerTypes.Framed,
|
|
32713
|
+
width: isMobile ? '95%' : '80%',
|
|
32714
|
+
minWidth: "300px"
|
|
32589
32715
|
}, React.createElement(Container$r, null, React.createElement(InternalTabs, {
|
|
32590
32716
|
tabs: tabs,
|
|
32591
32717
|
activeTextColor: "#000000",
|
|
@@ -32600,7 +32726,7 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32600
32726
|
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
32601
32727
|
displayName: "InformationCenter__Container",
|
|
32602
32728
|
componentId: "sc-1ttl62e-0"
|
|
32603
|
-
})(["width:100%;max-width:
|
|
32729
|
+
})(["width:100%;max-width:100%;margin:0 auto;padding:0.125rem;overflow:hidden;box-sizing:border-box;@media (min-width:320px){padding:0.25rem;}@media (min-width:360px){padding:0.5rem;}@media (min-width:480px){padding:0.75rem;}@media (min-width:", "){max-width:900px;padding:1rem;}@media (min-width:", "){max-width:1200px;}"], UI_BREAKPOINT_MOBILE, UI_BREAKPOINT_SMALL_LAPTOP);
|
|
32604
32730
|
var LoadingMessage = /*#__PURE__*/styled.div.withConfig({
|
|
32605
32731
|
displayName: "InformationCenter__LoadingMessage",
|
|
32606
32732
|
componentId: "sc-1ttl62e-1"
|
|
@@ -32900,7 +33026,7 @@ var QuantitySelector = function QuantitySelector(_ref) {
|
|
|
32900
33026
|
return React.createElement(StyledContainer, {
|
|
32901
33027
|
type: RPGUIContainerTypes.Framed,
|
|
32902
33028
|
width: "25rem"
|
|
32903
|
-
}, React.createElement(CloseButton$
|
|
33029
|
+
}, React.createElement(CloseButton$7, {
|
|
32904
33030
|
className: "container-close",
|
|
32905
33031
|
onPointerDown: onClose
|
|
32906
33032
|
}, "X"), React.createElement("h2", null, title), React.createElement(StyledForm, {
|
|
@@ -32945,7 +33071,7 @@ var StyledContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
|
32945
33071
|
displayName: "QuantitySelector__StyledContainer",
|
|
32946
33072
|
componentId: "sc-z4ut57-0"
|
|
32947
33073
|
})(["position:relative;display:flex;flex-direction:column;align-items:center;padding:1rem;h2{margin:0;margin-bottom:1rem;font-size:1rem;}"]);
|
|
32948
|
-
var CloseButton$
|
|
33074
|
+
var CloseButton$7 = /*#__PURE__*/styled.div.withConfig({
|
|
32949
33075
|
displayName: "QuantitySelector__CloseButton",
|
|
32950
33076
|
componentId: "sc-z4ut57-1"
|
|
32951
33077
|
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:1.5rem;cursor:pointer;"]);
|
|
@@ -35575,7 +35701,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
35575
35701
|
cancelDrag: "#skillsDiv",
|
|
35576
35702
|
scale: scale,
|
|
35577
35703
|
width: "100%"
|
|
35578
|
-
}, onCloseButton && React.createElement(CloseButton$
|
|
35704
|
+
}, onCloseButton && React.createElement(CloseButton$8, {
|
|
35579
35705
|
onPointerDown: onCloseButton
|
|
35580
35706
|
}, "X"), React.createElement(SkillsContainerDiv, {
|
|
35581
35707
|
id: "skillsDiv"
|
|
@@ -35610,7 +35736,7 @@ var SkillSplitDiv = /*#__PURE__*/styled.div.withConfig({
|
|
|
35610
35736
|
displayName: "SkillsContainer__SkillSplitDiv",
|
|
35611
35737
|
componentId: "sc-1g0c67q-2"
|
|
35612
35738
|
})(["width:100%;font-size:11px;hr{margin:0;margin-bottom:1rem;padding:0px;}p{margin-bottom:0px;}"]);
|
|
35613
|
-
var CloseButton$
|
|
35739
|
+
var CloseButton$8 = /*#__PURE__*/styled.div.withConfig({
|
|
35614
35740
|
displayName: "SkillsContainer__CloseButton",
|
|
35615
35741
|
componentId: "sc-1g0c67q-3"
|
|
35616
35742
|
})(["position:absolute;top:2px;right:2px;color:white;z-index:22;font-size:1.1rem;"]);
|
|
@@ -36291,7 +36417,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
36291
36417
|
return React.createElement(Draggable, {
|
|
36292
36418
|
scale: scale,
|
|
36293
36419
|
cancel: ".time-widget-close,.time-widget-container,.time-widget-container *"
|
|
36294
|
-
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$
|
|
36420
|
+
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$9, {
|
|
36295
36421
|
onPointerDown: onClose,
|
|
36296
36422
|
className: "time-widget-close"
|
|
36297
36423
|
}, "X"), React.createElement(DayNightContainer, {
|
|
@@ -36308,7 +36434,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
|
|
|
36308
36434
|
displayName: "TimeWidget__Time",
|
|
36309
36435
|
componentId: "sc-1ja236h-1"
|
|
36310
36436
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
36311
|
-
var CloseButton$
|
|
36437
|
+
var CloseButton$9 = /*#__PURE__*/styled.p.withConfig({
|
|
36312
36438
|
displayName: "TimeWidget__CloseButton",
|
|
36313
36439
|
componentId: "sc-1ja236h-2"
|
|
36314
36440
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|