@rpg-engine/long-bow 0.8.27 → 0.8.29
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/long-bow.cjs.development.js +42 -69
- 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 +42 -69
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InformationCenter/InformationCenter.tsx +5 -19
- package/src/components/InformationCenter/sections/bestiary/InformationCenterBestiarySection.tsx +26 -28
- package/src/components/InformationCenter/sections/bestiary/InformationCenterNPCDetails.tsx +31 -7
- package/src/components/InformationCenter/sections/items/InformationCenterItemsSection.tsx +26 -21
- package/src/components/InformationCenter/shared/BaseInformationDetails.tsx +34 -11
- package/src/components/shared/Collapsible/Collapsible.tsx +1 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -31131,7 +31131,7 @@ var Icon$1 = /*#__PURE__*/styled.span.withConfig({
|
|
|
31131
31131
|
var Content$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31132
31132
|
displayName: "Collapsible__Content",
|
|
31133
31133
|
componentId: "sc-s4h8ey-4"
|
|
31134
|
-
})(["padding:
|
|
31134
|
+
})(["padding:6px;"]);
|
|
31135
31135
|
|
|
31136
31136
|
var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
31137
31137
|
var name = _ref.name,
|
|
@@ -31156,15 +31156,15 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
|
31156
31156
|
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
31157
31157
|
displayName: "BaseInformationDetails__Container",
|
|
31158
31158
|
componentId: "sc-1vguuz8-0"
|
|
31159
|
-
})(["position:
|
|
31159
|
+
})(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
|
|
31160
31160
|
var Overlay = /*#__PURE__*/styled.div.withConfig({
|
|
31161
31161
|
displayName: "BaseInformationDetails__Overlay",
|
|
31162
31162
|
componentId: "sc-1vguuz8-1"
|
|
31163
|
-
})(["position:
|
|
31163
|
+
})(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
|
|
31164
31164
|
var Modal = /*#__PURE__*/styled.div.withConfig({
|
|
31165
31165
|
displayName: "BaseInformationDetails__Modal",
|
|
31166
31166
|
componentId: "sc-1vguuz8-2"
|
|
31167
|
-
})(["position:
|
|
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);
|
|
31168
31168
|
var CloseButton$5 = /*#__PURE__*/styled.button.withConfig({
|
|
31169
31169
|
displayName: "BaseInformationDetails__CloseButton",
|
|
31170
31170
|
componentId: "sc-1vguuz8-3"
|
|
@@ -31176,7 +31176,7 @@ var Header$2 = /*#__PURE__*/styled.div.withConfig({
|
|
|
31176
31176
|
var Content$2 = /*#__PURE__*/styled.div.withConfig({
|
|
31177
31177
|
displayName: "BaseInformationDetails__Content",
|
|
31178
31178
|
componentId: "sc-1vguuz8-5"
|
|
31179
|
-
})(["display:flex;flex-direction:column;gap:
|
|
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;}"]);
|
|
31180
31180
|
var Title$4 = /*#__PURE__*/styled.h2.withConfig({
|
|
31181
31181
|
displayName: "BaseInformationDetails__Title",
|
|
31182
31182
|
componentId: "sc-1vguuz8-6"
|
|
@@ -31422,6 +31422,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31422
31422
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31423
31423
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31424
31424
|
tabId = _ref.tabId;
|
|
31425
|
+
var isMobile = isMobileOrTablet();
|
|
31425
31426
|
var _useState = useState(initialSearchQuery),
|
|
31426
31427
|
searchQuery = _useState[0],
|
|
31427
31428
|
setSearchQuery = _useState[1];
|
|
@@ -31463,14 +31464,16 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31463
31464
|
}) || [];
|
|
31464
31465
|
};
|
|
31465
31466
|
var handleMouseEnter = function handleMouseEnter(e, item) {
|
|
31466
|
-
|
|
31467
|
-
|
|
31468
|
-
|
|
31469
|
-
|
|
31470
|
-
|
|
31467
|
+
if (!isMobile) {
|
|
31468
|
+
setTooltipPosition({
|
|
31469
|
+
x: e.clientX + TOOLTIP_OFFSET,
|
|
31470
|
+
y: e.clientY
|
|
31471
|
+
});
|
|
31472
|
+
setHoveredItem(item);
|
|
31473
|
+
}
|
|
31471
31474
|
};
|
|
31472
31475
|
var handleMouseMove = function handleMouseMove(e) {
|
|
31473
|
-
if (hoveredItem) {
|
|
31476
|
+
if (!isMobile && hoveredItem) {
|
|
31474
31477
|
setTooltipPosition({
|
|
31475
31478
|
x: e.clientX + TOOLTIP_OFFSET,
|
|
31476
31479
|
y: e.clientY
|
|
@@ -31478,15 +31481,13 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31478
31481
|
}
|
|
31479
31482
|
};
|
|
31480
31483
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31481
|
-
|
|
31484
|
+
if (!isMobile) {
|
|
31485
|
+
setHoveredItem(null);
|
|
31486
|
+
}
|
|
31482
31487
|
};
|
|
31483
31488
|
var handleTouchStart = function handleTouchStart(e, item) {
|
|
31484
|
-
|
|
31485
|
-
|
|
31486
|
-
x: touch.clientX + TOOLTIP_OFFSET,
|
|
31487
|
-
y: touch.clientY
|
|
31488
|
-
});
|
|
31489
|
-
setHoveredItem(item);
|
|
31489
|
+
e.preventDefault();
|
|
31490
|
+
setSelectedItem(item);
|
|
31490
31491
|
};
|
|
31491
31492
|
var handleItemClick = function handleItemClick(item) {
|
|
31492
31493
|
setSelectedItem(item);
|
|
@@ -31536,14 +31537,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31536
31537
|
tabId: tabId,
|
|
31537
31538
|
layout: "grid",
|
|
31538
31539
|
itemHeight: "180px"
|
|
31539
|
-
}), hoveredItem && React.createElement(TooltipWrapper, {
|
|
31540
|
+
}), !isMobile && hoveredItem && React.createElement(TooltipWrapper, {
|
|
31540
31541
|
style: {
|
|
31541
31542
|
top: tooltipPosition.y,
|
|
31542
31543
|
left: tooltipPosition.x
|
|
31543
31544
|
}
|
|
31544
31545
|
}, React.createElement(InformationCenterItemTooltip, {
|
|
31545
31546
|
item: hoveredItem
|
|
31546
|
-
})), selectedItem && React.createElement(InformationCenterItemDetails, {
|
|
31547
|
+
})), selectedItem && React.createElement(Portal, null, React.createElement(InformationCenterItemDetails, {
|
|
31547
31548
|
item: selectedItem,
|
|
31548
31549
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
31549
31550
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
@@ -31551,7 +31552,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31551
31552
|
onBack: function onBack() {
|
|
31552
31553
|
return setSelectedItem(null);
|
|
31553
31554
|
}
|
|
31554
|
-
}));
|
|
31555
|
+
})));
|
|
31555
31556
|
};
|
|
31556
31557
|
var TooltipWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
31557
31558
|
displayName: "InformationCenterItemsSection__TooltipWrapper",
|
|
@@ -31687,7 +31688,7 @@ var Value$1 = /*#__PURE__*/styled.span.withConfig({
|
|
|
31687
31688
|
var StyledCollapsible$1 = /*#__PURE__*/styled(Collapsible).withConfig({
|
|
31688
31689
|
displayName: "InformationCenterNPCDetails__StyledCollapsible",
|
|
31689
31690
|
componentId: "sc-fdu3xl-4"
|
|
31690
|
-
})(["background:rgba(255,255,255,0.05);border-radius:4px;overflow:
|
|
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);
|
|
31691
31692
|
var StatGrid$1 = /*#__PURE__*/styled.div.withConfig({
|
|
31692
31693
|
displayName: "InformationCenterNPCDetails__StatGrid",
|
|
31693
31694
|
componentId: "sc-fdu3xl-5"
|
|
@@ -31739,19 +31740,19 @@ var Separator = /*#__PURE__*/styled.span.withConfig({
|
|
|
31739
31740
|
var LootSearchContainer = /*#__PURE__*/styled.div.withConfig({
|
|
31740
31741
|
displayName: "InformationCenterNPCDetails__LootSearchContainer",
|
|
31741
31742
|
componentId: "sc-fdu3xl-17"
|
|
31742
|
-
})(["padding:
|
|
31743
|
+
})(["padding:8px;background:rgba(0,0,0,0.2);border-radius:4px;margin:8px 8px 4px;box-sizing:border-box;"]);
|
|
31743
31744
|
var StyledSearchBar$1 = /*#__PURE__*/styled(SearchBar).withConfig({
|
|
31744
31745
|
displayName: "InformationCenterNPCDetails__StyledSearchBar",
|
|
31745
31746
|
componentId: "sc-fdu3xl-18"
|
|
31746
|
-
})(["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);
|
|
31747
31748
|
var LootGrid = /*#__PURE__*/styled.div.withConfig({
|
|
31748
31749
|
displayName: "InformationCenterNPCDetails__LootGrid",
|
|
31749
31750
|
componentId: "sc-fdu3xl-19"
|
|
31750
|
-
})(["display:grid;grid-template-columns:repeat(auto-
|
|
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;}"]);
|
|
31751
31752
|
var LootItem = /*#__PURE__*/styled.div.withConfig({
|
|
31752
31753
|
displayName: "InformationCenterNPCDetails__LootItem",
|
|
31753
31754
|
componentId: "sc-fdu3xl-20"
|
|
31754
|
-
})(["display:flex;align-items:center;gap:
|
|
31755
|
+
})(["display:flex;align-items:center;gap:4px;background:rgba(255,255,255,0.05);padding:4px;border-radius:4px;min-width:0;"]);
|
|
31755
31756
|
var LootDetails = /*#__PURE__*/styled.div.withConfig({
|
|
31756
31757
|
displayName: "InformationCenterNPCDetails__LootDetails",
|
|
31757
31758
|
componentId: "sc-fdu3xl-21"
|
|
@@ -31880,6 +31881,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31880
31881
|
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31881
31882
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31882
31883
|
tabId = _ref.tabId;
|
|
31884
|
+
var isMobile = isMobileOrTablet();
|
|
31883
31885
|
var _useState = useState(initialSearchQuery),
|
|
31884
31886
|
searchQuery = _useState[0],
|
|
31885
31887
|
setSearchQuery = _useState[1];
|
|
@@ -31889,10 +31891,8 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31889
31891
|
var _useState3 = useState(null),
|
|
31890
31892
|
selectedMonster = _useState3[0],
|
|
31891
31893
|
setSelectedMonster = _useState3[1];
|
|
31892
|
-
var _useState4 = useState('ontouchstart' in window),
|
|
31893
|
-
isTouchDevice = _useState4[0];
|
|
31894
31894
|
var handleMouseEnter = function handleMouseEnter(monster, event) {
|
|
31895
|
-
if (!
|
|
31895
|
+
if (!isMobile && !selectedMonster) {
|
|
31896
31896
|
setTooltipData({
|
|
31897
31897
|
npc: monster,
|
|
31898
31898
|
position: {
|
|
@@ -31903,12 +31903,12 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31903
31903
|
}
|
|
31904
31904
|
};
|
|
31905
31905
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31906
|
-
if (!
|
|
31906
|
+
if (!isMobile) {
|
|
31907
31907
|
setTooltipData(null);
|
|
31908
31908
|
}
|
|
31909
31909
|
};
|
|
31910
31910
|
var handleMouseMove = function handleMouseMove(event) {
|
|
31911
|
-
if (!
|
|
31911
|
+
if (!isMobile && tooltipData) {
|
|
31912
31912
|
setTooltipData(_extends({}, tooltipData, {
|
|
31913
31913
|
position: {
|
|
31914
31914
|
x: event.clientX,
|
|
@@ -31918,29 +31918,17 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31918
31918
|
}
|
|
31919
31919
|
};
|
|
31920
31920
|
var handleTouchStart = function handleTouchStart(monster, event) {
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31924
|
-
if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
|
|
31925
|
-
setTooltipData(null);
|
|
31926
|
-
} else {
|
|
31927
|
-
setTooltipData({
|
|
31928
|
-
npc: monster,
|
|
31929
|
-
position: {
|
|
31930
|
-
x: touch.clientX,
|
|
31931
|
-
y: touch.clientY
|
|
31932
|
-
}
|
|
31933
|
-
});
|
|
31934
|
-
}
|
|
31935
|
-
}
|
|
31921
|
+
event.preventDefault();
|
|
31922
|
+
setSelectedMonster(monster);
|
|
31923
|
+
setTooltipData(null);
|
|
31936
31924
|
};
|
|
31937
31925
|
var handleMonsterClick = function handleMonsterClick(monster) {
|
|
31938
31926
|
setSelectedMonster(monster);
|
|
31939
31927
|
setTooltipData(null);
|
|
31940
31928
|
};
|
|
31941
|
-
var
|
|
31942
|
-
selectedBestiaryCategory =
|
|
31943
|
-
setSelectedBestiaryCategory =
|
|
31929
|
+
var _useState4 = useState('all'),
|
|
31930
|
+
selectedBestiaryCategory = _useState4[0],
|
|
31931
|
+
setSelectedBestiaryCategory = _useState4[1];
|
|
31944
31932
|
var bestiaryCategoryOptions = [{
|
|
31945
31933
|
id: 0,
|
|
31946
31934
|
value: 'all',
|
|
@@ -32015,7 +32003,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32015
32003
|
},
|
|
32016
32004
|
dependencies: [selectedBestiaryCategory],
|
|
32017
32005
|
itemHeight: "180px"
|
|
32018
|
-
}), tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
|
|
32006
|
+
}), !isMobile && tooltipData && React.createElement(Portal, null, React.createElement(TooltipWrapper$1, {
|
|
32019
32007
|
style: {
|
|
32020
32008
|
position: 'fixed',
|
|
32021
32009
|
left: tooltipData.position.x + 10,
|
|
@@ -32025,7 +32013,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32025
32013
|
npc: tooltipData.npc,
|
|
32026
32014
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
32027
32015
|
itemsAtlasIMG: itemsAtlasIMG
|
|
32028
|
-
}))), selectedMonster && React.createElement(InformationCenterNPCDetails, {
|
|
32016
|
+
}))), selectedMonster && React.createElement(Portal, null, React.createElement(InformationCenterNPCDetails, {
|
|
32029
32017
|
npc: selectedMonster,
|
|
32030
32018
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
32031
32019
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
@@ -32036,7 +32024,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32036
32024
|
onBack: function onBack() {
|
|
32037
32025
|
return setSelectedMonster(null);
|
|
32038
32026
|
}
|
|
32039
|
-
}));
|
|
32027
|
+
})));
|
|
32040
32028
|
};
|
|
32041
32029
|
var TooltipWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
32042
32030
|
displayName: "InformationCenterBestiarySection__TooltipWrapper",
|
|
@@ -32247,9 +32235,6 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32247
32235
|
var _useState = useState('bestiary'),
|
|
32248
32236
|
activeTab = _useState[0],
|
|
32249
32237
|
setActiveTab = _useState[1];
|
|
32250
|
-
var _useState2 = useState(null),
|
|
32251
|
-
selectedItem = _useState2[0],
|
|
32252
|
-
setSelectedItem = _useState2[1];
|
|
32253
32238
|
if (loading) {
|
|
32254
32239
|
return React.createElement(LoadingMessage, null, "Loading...");
|
|
32255
32240
|
}
|
|
@@ -32299,7 +32284,8 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32299
32284
|
})
|
|
32300
32285
|
}];
|
|
32301
32286
|
return React.createElement(DraggableContainer, {
|
|
32302
|
-
title: "Information Center"
|
|
32287
|
+
title: "Information Center",
|
|
32288
|
+
type: RPGUIContainerTypes.Framed
|
|
32303
32289
|
}, React.createElement(Container$r, null, React.createElement(InternalTabs, {
|
|
32304
32290
|
tabs: tabs,
|
|
32305
32291
|
activeTextColor: "#000000",
|
|
@@ -32309,19 +32295,6 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32309
32295
|
inactiveColor: "#6b7280",
|
|
32310
32296
|
borderColor: "#f59e0b",
|
|
32311
32297
|
hoverColor: "#fef3c7"
|
|
32312
|
-
}), selectedItem && React.createElement(InformationCenterItemDetails, {
|
|
32313
|
-
item: selectedItem,
|
|
32314
|
-
itemsAtlasJSON: itemsAtlasJSON,
|
|
32315
|
-
itemsAtlasIMG: itemsAtlasIMG,
|
|
32316
|
-
droppedBy: bestiaryItems.filter(function (npc) {
|
|
32317
|
-
var _npc$loots;
|
|
32318
|
-
return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
|
|
32319
|
-
return loot.itemBlueprintKey === selectedItem.key;
|
|
32320
|
-
});
|
|
32321
|
-
}),
|
|
32322
|
-
onBack: function onBack() {
|
|
32323
|
-
return setSelectedItem(null);
|
|
32324
|
-
}
|
|
32325
32298
|
})));
|
|
32326
32299
|
};
|
|
32327
32300
|
var Container$r = /*#__PURE__*/styled.div.withConfig({
|