@rpg-engine/long-bow 0.8.25 → 0.8.28
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 +36 -63
- 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 +36 -63
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CraftBook/CraftBook.tsx +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/items/InformationCenterItemsSection.tsx +26 -21
- package/src/components/InformationCenter/shared/BaseInformationDetails.tsx +17 -6
|
@@ -29144,7 +29144,7 @@ var SearchContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29144
29144
|
var ContentContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29145
29145
|
displayName: "CraftBook__ContentContainer",
|
|
29146
29146
|
componentId: "sc-19q95ue-7"
|
|
29147
|
-
})(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:
|
|
29147
|
+
})(["flex:1;display:flex;flex-direction:column;padding:16px;padding-right:0;padding-bottom:0;width:100%;position:relative;min-height:250px;overflow:hidden;"]);
|
|
29148
29148
|
var RadioInputScroller = /*#__PURE__*/styled__default.div.withConfig({
|
|
29149
29149
|
displayName: "CraftBook__RadioInputScroller",
|
|
29150
29150
|
componentId: "sc-19q95ue-8"
|
|
@@ -31161,15 +31161,15 @@ var BaseInformationDetails = function BaseInformationDetails(_ref) {
|
|
|
31161
31161
|
var Container$p = /*#__PURE__*/styled__default.div.withConfig({
|
|
31162
31162
|
displayName: "BaseInformationDetails__Container",
|
|
31163
31163
|
componentId: "sc-1vguuz8-0"
|
|
31164
|
-
})(["position:
|
|
31164
|
+
})(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
|
|
31165
31165
|
var Overlay = /*#__PURE__*/styled__default.div.withConfig({
|
|
31166
31166
|
displayName: "BaseInformationDetails__Overlay",
|
|
31167
31167
|
componentId: "sc-1vguuz8-1"
|
|
31168
|
-
})(["position:
|
|
31168
|
+
})(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
|
|
31169
31169
|
var Modal = /*#__PURE__*/styled__default.div.withConfig({
|
|
31170
31170
|
displayName: "BaseInformationDetails__Modal",
|
|
31171
31171
|
componentId: "sc-1vguuz8-2"
|
|
31172
|
-
})(["position:
|
|
31172
|
+
})(["position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;max-width:90%;max-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);@media (max-width:768px){max-width:100%;max-height:100%;border-radius:0;}&::-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
31173
|
var CloseButton$5 = /*#__PURE__*/styled__default.button.withConfig({
|
|
31174
31174
|
displayName: "BaseInformationDetails__CloseButton",
|
|
31175
31175
|
componentId: "sc-1vguuz8-3"
|
|
@@ -31427,6 +31427,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31427
31427
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
31428
31428
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31429
31429
|
tabId = _ref.tabId;
|
|
31430
|
+
var isMobile = shared.isMobileOrTablet();
|
|
31430
31431
|
var _useState = React.useState(initialSearchQuery),
|
|
31431
31432
|
searchQuery = _useState[0],
|
|
31432
31433
|
setSearchQuery = _useState[1];
|
|
@@ -31468,14 +31469,16 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31468
31469
|
}) || [];
|
|
31469
31470
|
};
|
|
31470
31471
|
var handleMouseEnter = function handleMouseEnter(e, item) {
|
|
31471
|
-
|
|
31472
|
-
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31472
|
+
if (!isMobile) {
|
|
31473
|
+
setTooltipPosition({
|
|
31474
|
+
x: e.clientX + TOOLTIP_OFFSET,
|
|
31475
|
+
y: e.clientY
|
|
31476
|
+
});
|
|
31477
|
+
setHoveredItem(item);
|
|
31478
|
+
}
|
|
31476
31479
|
};
|
|
31477
31480
|
var handleMouseMove = function handleMouseMove(e) {
|
|
31478
|
-
if (hoveredItem) {
|
|
31481
|
+
if (!isMobile && hoveredItem) {
|
|
31479
31482
|
setTooltipPosition({
|
|
31480
31483
|
x: e.clientX + TOOLTIP_OFFSET,
|
|
31481
31484
|
y: e.clientY
|
|
@@ -31483,15 +31486,13 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31483
31486
|
}
|
|
31484
31487
|
};
|
|
31485
31488
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31486
|
-
|
|
31489
|
+
if (!isMobile) {
|
|
31490
|
+
setHoveredItem(null);
|
|
31491
|
+
}
|
|
31487
31492
|
};
|
|
31488
31493
|
var handleTouchStart = function handleTouchStart(e, item) {
|
|
31489
|
-
|
|
31490
|
-
|
|
31491
|
-
x: touch.clientX + TOOLTIP_OFFSET,
|
|
31492
|
-
y: touch.clientY
|
|
31493
|
-
});
|
|
31494
|
-
setHoveredItem(item);
|
|
31494
|
+
e.preventDefault();
|
|
31495
|
+
setSelectedItem(item);
|
|
31495
31496
|
};
|
|
31496
31497
|
var handleItemClick = function handleItemClick(item) {
|
|
31497
31498
|
setSelectedItem(item);
|
|
@@ -31541,14 +31542,14 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31541
31542
|
tabId: tabId,
|
|
31542
31543
|
layout: "grid",
|
|
31543
31544
|
itemHeight: "180px"
|
|
31544
|
-
}), hoveredItem && React__default.createElement(TooltipWrapper, {
|
|
31545
|
+
}), !isMobile && hoveredItem && React__default.createElement(TooltipWrapper, {
|
|
31545
31546
|
style: {
|
|
31546
31547
|
top: tooltipPosition.y,
|
|
31547
31548
|
left: tooltipPosition.x
|
|
31548
31549
|
}
|
|
31549
31550
|
}, React__default.createElement(InformationCenterItemTooltip, {
|
|
31550
31551
|
item: hoveredItem
|
|
31551
|
-
})), selectedItem && React__default.createElement(InformationCenterItemDetails, {
|
|
31552
|
+
})), selectedItem && React__default.createElement(Portal, null, React__default.createElement(InformationCenterItemDetails, {
|
|
31552
31553
|
item: selectedItem,
|
|
31553
31554
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
31554
31555
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
@@ -31556,7 +31557,7 @@ var InformationCenterItemsSection = function InformationCenterItemsSection(_ref)
|
|
|
31556
31557
|
onBack: function onBack() {
|
|
31557
31558
|
return setSelectedItem(null);
|
|
31558
31559
|
}
|
|
31559
|
-
}));
|
|
31560
|
+
})));
|
|
31560
31561
|
};
|
|
31561
31562
|
var TooltipWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
31562
31563
|
displayName: "InformationCenterItemsSection__TooltipWrapper",
|
|
@@ -31885,6 +31886,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31885
31886
|
entitiesAtlasIMG = _ref.entitiesAtlasIMG,
|
|
31886
31887
|
initialSearchQuery = _ref.initialSearchQuery,
|
|
31887
31888
|
tabId = _ref.tabId;
|
|
31889
|
+
var isMobile = shared.isMobileOrTablet();
|
|
31888
31890
|
var _useState = React.useState(initialSearchQuery),
|
|
31889
31891
|
searchQuery = _useState[0],
|
|
31890
31892
|
setSearchQuery = _useState[1];
|
|
@@ -31894,10 +31896,8 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31894
31896
|
var _useState3 = React.useState(null),
|
|
31895
31897
|
selectedMonster = _useState3[0],
|
|
31896
31898
|
setSelectedMonster = _useState3[1];
|
|
31897
|
-
var _useState4 = React.useState('ontouchstart' in window),
|
|
31898
|
-
isTouchDevice = _useState4[0];
|
|
31899
31899
|
var handleMouseEnter = function handleMouseEnter(monster, event) {
|
|
31900
|
-
if (!
|
|
31900
|
+
if (!isMobile && !selectedMonster) {
|
|
31901
31901
|
setTooltipData({
|
|
31902
31902
|
npc: monster,
|
|
31903
31903
|
position: {
|
|
@@ -31908,12 +31908,12 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31908
31908
|
}
|
|
31909
31909
|
};
|
|
31910
31910
|
var handleMouseLeave = function handleMouseLeave() {
|
|
31911
|
-
if (!
|
|
31911
|
+
if (!isMobile) {
|
|
31912
31912
|
setTooltipData(null);
|
|
31913
31913
|
}
|
|
31914
31914
|
};
|
|
31915
31915
|
var handleMouseMove = function handleMouseMove(event) {
|
|
31916
|
-
if (!
|
|
31916
|
+
if (!isMobile && tooltipData) {
|
|
31917
31917
|
setTooltipData(_extends({}, tooltipData, {
|
|
31918
31918
|
position: {
|
|
31919
31919
|
x: event.clientX,
|
|
@@ -31923,29 +31923,17 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
31923
31923
|
}
|
|
31924
31924
|
};
|
|
31925
31925
|
var handleTouchStart = function handleTouchStart(monster, event) {
|
|
31926
|
-
|
|
31927
|
-
|
|
31928
|
-
|
|
31929
|
-
if ((tooltipData == null ? void 0 : tooltipData.npc.id) === monster.id) {
|
|
31930
|
-
setTooltipData(null);
|
|
31931
|
-
} else {
|
|
31932
|
-
setTooltipData({
|
|
31933
|
-
npc: monster,
|
|
31934
|
-
position: {
|
|
31935
|
-
x: touch.clientX,
|
|
31936
|
-
y: touch.clientY
|
|
31937
|
-
}
|
|
31938
|
-
});
|
|
31939
|
-
}
|
|
31940
|
-
}
|
|
31926
|
+
event.preventDefault();
|
|
31927
|
+
setSelectedMonster(monster);
|
|
31928
|
+
setTooltipData(null);
|
|
31941
31929
|
};
|
|
31942
31930
|
var handleMonsterClick = function handleMonsterClick(monster) {
|
|
31943
31931
|
setSelectedMonster(monster);
|
|
31944
31932
|
setTooltipData(null);
|
|
31945
31933
|
};
|
|
31946
|
-
var
|
|
31947
|
-
selectedBestiaryCategory =
|
|
31948
|
-
setSelectedBestiaryCategory =
|
|
31934
|
+
var _useState4 = React.useState('all'),
|
|
31935
|
+
selectedBestiaryCategory = _useState4[0],
|
|
31936
|
+
setSelectedBestiaryCategory = _useState4[1];
|
|
31949
31937
|
var bestiaryCategoryOptions = [{
|
|
31950
31938
|
id: 0,
|
|
31951
31939
|
value: 'all',
|
|
@@ -32020,7 +32008,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32020
32008
|
},
|
|
32021
32009
|
dependencies: [selectedBestiaryCategory],
|
|
32022
32010
|
itemHeight: "180px"
|
|
32023
|
-
}), tooltipData && React__default.createElement(Portal, null, React__default.createElement(TooltipWrapper$1, {
|
|
32011
|
+
}), !isMobile && tooltipData && React__default.createElement(Portal, null, React__default.createElement(TooltipWrapper$1, {
|
|
32024
32012
|
style: {
|
|
32025
32013
|
position: 'fixed',
|
|
32026
32014
|
left: tooltipData.position.x + 10,
|
|
@@ -32030,7 +32018,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32030
32018
|
npc: tooltipData.npc,
|
|
32031
32019
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
32032
32020
|
itemsAtlasIMG: itemsAtlasIMG
|
|
32033
|
-
}))), selectedMonster && React__default.createElement(InformationCenterNPCDetails, {
|
|
32021
|
+
}))), selectedMonster && React__default.createElement(Portal, null, React__default.createElement(InformationCenterNPCDetails, {
|
|
32034
32022
|
npc: selectedMonster,
|
|
32035
32023
|
itemsAtlasJSON: itemsAtlasJSON,
|
|
32036
32024
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
@@ -32041,7 +32029,7 @@ var InformationCenterBestiarySection = function InformationCenterBestiarySection
|
|
|
32041
32029
|
onBack: function onBack() {
|
|
32042
32030
|
return setSelectedMonster(null);
|
|
32043
32031
|
}
|
|
32044
|
-
}));
|
|
32032
|
+
})));
|
|
32045
32033
|
};
|
|
32046
32034
|
var TooltipWrapper$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
32047
32035
|
displayName: "InformationCenterBestiarySection__TooltipWrapper",
|
|
@@ -32252,9 +32240,6 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32252
32240
|
var _useState = React.useState('bestiary'),
|
|
32253
32241
|
activeTab = _useState[0],
|
|
32254
32242
|
setActiveTab = _useState[1];
|
|
32255
|
-
var _useState2 = React.useState(null),
|
|
32256
|
-
selectedItem = _useState2[0],
|
|
32257
|
-
setSelectedItem = _useState2[1];
|
|
32258
32243
|
if (loading) {
|
|
32259
32244
|
return React__default.createElement(LoadingMessage, null, "Loading...");
|
|
32260
32245
|
}
|
|
@@ -32304,7 +32289,8 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32304
32289
|
})
|
|
32305
32290
|
}];
|
|
32306
32291
|
return React__default.createElement(DraggableContainer, {
|
|
32307
|
-
title: "Information Center"
|
|
32292
|
+
title: "Information Center",
|
|
32293
|
+
type: exports.RPGUIContainerTypes.Framed
|
|
32308
32294
|
}, React__default.createElement(Container$r, null, React__default.createElement(InternalTabs, {
|
|
32309
32295
|
tabs: tabs,
|
|
32310
32296
|
activeTextColor: "#000000",
|
|
@@ -32314,19 +32300,6 @@ var InformationCenter = function InformationCenter(_ref) {
|
|
|
32314
32300
|
inactiveColor: "#6b7280",
|
|
32315
32301
|
borderColor: "#f59e0b",
|
|
32316
32302
|
hoverColor: "#fef3c7"
|
|
32317
|
-
}), selectedItem && React__default.createElement(InformationCenterItemDetails, {
|
|
32318
|
-
item: selectedItem,
|
|
32319
|
-
itemsAtlasJSON: itemsAtlasJSON,
|
|
32320
|
-
itemsAtlasIMG: itemsAtlasIMG,
|
|
32321
|
-
droppedBy: bestiaryItems.filter(function (npc) {
|
|
32322
|
-
var _npc$loots;
|
|
32323
|
-
return (_npc$loots = npc.loots) == null ? void 0 : _npc$loots.some(function (loot) {
|
|
32324
|
-
return loot.itemBlueprintKey === selectedItem.key;
|
|
32325
|
-
});
|
|
32326
|
-
}),
|
|
32327
|
-
onBack: function onBack() {
|
|
32328
|
-
return setSelectedItem(null);
|
|
32329
|
-
}
|
|
32330
32303
|
})));
|
|
32331
32304
|
};
|
|
32332
32305
|
var Container$r = /*#__PURE__*/styled__default.div.withConfig({
|