@rpg-engine/long-bow 0.8.27 → 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.
@@ -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:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:1000;"]);
31159
+ })(["position:fixed;inset:0;display:flex;justify-content:center;align-items:center;z-index:9999;"]);
31160
31160
  var Overlay = /*#__PURE__*/styled.div.withConfig({
31161
31161
  displayName: "BaseInformationDetails__Overlay",
31162
31162
  componentId: "sc-1vguuz8-1"
31163
- })(["position:absolute;inset:0;background-color:rgba(0,0,0,0.8);"]);
31163
+ })(["position:fixed;inset:0;background-color:rgba(0,0,0,0.8);"]);
31164
31164
  var Modal = /*#__PURE__*/styled.div.withConfig({
31165
31165
  displayName: "BaseInformationDetails__Modal",
31166
31166
  componentId: "sc-1vguuz8-2"
31167
- })(["position:relative;width:90%;height:90%;background-color:rgba(0,0,0,0.95);border-radius:4px;padding:16px;overflow-y:auto;z-index:1;font-family:'Press Start 2P',cursive;border:1px solid ", ";box-shadow:0 2px 4px rgba(0,0,0,0.2);&::-webkit-scrollbar{width:2px;}&::-webkit-scrollbar-track{background:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:4px;opacity:0.5;&:hover{opacity:1;}}scrollbar-width:thin;scrollbar-color:", " transparent;"], uiColors.darkGray, uiColors.yellow, uiColors.yellow);
31167
+ })(["position:fixed;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);
31168
31168
  var CloseButton$5 = /*#__PURE__*/styled.button.withConfig({
31169
31169
  displayName: "BaseInformationDetails__CloseButton",
31170
31170
  componentId: "sc-1vguuz8-3"
@@ -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
- setTooltipPosition({
31467
- x: e.clientX + TOOLTIP_OFFSET,
31468
- y: e.clientY
31469
- });
31470
- setHoveredItem(item);
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
- setHoveredItem(null);
31484
+ if (!isMobile) {
31485
+ setHoveredItem(null);
31486
+ }
31482
31487
  };
31483
31488
  var handleTouchStart = function handleTouchStart(e, item) {
31484
- var touch = e.touches[0];
31485
- setTooltipPosition({
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",
@@ -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 (!isTouchDevice && !selectedMonster) {
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 (!isTouchDevice) {
31906
+ if (!isMobile) {
31907
31907
  setTooltipData(null);
31908
31908
  }
31909
31909
  };
31910
31910
  var handleMouseMove = function handleMouseMove(event) {
31911
- if (!isTouchDevice && tooltipData) {
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
- if (isTouchDevice) {
31922
- event.preventDefault();
31923
- var touch = event.touches[0];
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 _useState5 = useState('all'),
31942
- selectedBestiaryCategory = _useState5[0],
31943
- setSelectedBestiaryCategory = _useState5[1];
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({