@rpg-engine/long-bow 0.6.69 → 0.6.71

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.
@@ -2,15 +2,16 @@ import React, { useState, useEffect, Component, useRef, useContext, createContex
2
2
  import { BeatLoader } from 'react-spinners';
3
3
  import styled, { css, keyframes } from 'styled-components';
4
4
  import { v4 } from 'uuid';
5
- import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, ItemSlotType, isMobileOrTablet, CharacterClass, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
5
+ import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, ItemSlotType, isMobileOrTablet, 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 { RxPaperPlane, RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
9
9
  import Draggable from 'react-draggable';
10
10
  import ReactDOM from 'react-dom';
11
- import { camelCase } from 'lodash-es';
11
+ import { camelCase, debounce } from 'lodash-es';
12
12
  import { observer } from 'mobx-react-lite';
13
13
  import { AiFillCaretRight } from 'react-icons/ai';
14
+ import 'react-tippy/dist/tippy.css';
14
15
  import 'rpgui/rpgui.css';
15
16
  import 'rpgui/rpgui.min.js';
16
17
  import capitalize from 'lodash-es/capitalize';
@@ -25940,7 +25941,8 @@ var RightArrow = /*#__PURE__*/styled.span.withConfig({
25940
25941
 
25941
25942
  var Ellipsis = function Ellipsis(_ref) {
25942
25943
  var children = _ref.children,
25943
- maxLines = _ref.maxLines,
25944
+ _ref$maxLines = _ref.maxLines,
25945
+ maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
25944
25946
  maxWidth = _ref.maxWidth,
25945
25947
  fontSize = _ref.fontSize,
25946
25948
  center = _ref.center;
@@ -28788,109 +28790,156 @@ var Table = /*#__PURE__*/styled.table.withConfig({
28788
28790
  var TableRow = /*#__PURE__*/styled.tr.withConfig({
28789
28791
  displayName: "Table__TableRow",
28790
28792
  componentId: "sc-1c24pcj-1"
28791
- })(["&:nth-child(even){background-color:rgba(255,255,255,0.05) !important;}"]);
28793
+ })(["&:nth-child(even){background-color:rgba(255,255,255,0.05) !important;}&:hover{background-color:rgba(255,255,255,0.1) !important;}"]);
28792
28794
  var TableHeader = /*#__PURE__*/styled.th.withConfig({
28793
28795
  displayName: "Table__TableHeader",
28794
28796
  componentId: "sc-1c24pcj-2"
28795
- })(["text-align:left;padding:0.5rem;color:", " !important;border-bottom:1px solid ", ";"], uiColors.yellow, uiColors.lightGray);
28797
+ })(["text-align:left;padding:0.5rem;color:", " !important;border-bottom:1px solid ", ";text-shadow:-2px 0 black,0 2px black,2px 0 black,0 -2px black;"], uiColors.yellow, uiColors.lightGray);
28796
28798
  var TableCell = /*#__PURE__*/styled.td.withConfig({
28797
28799
  displayName: "Table__TableCell",
28798
28800
  componentId: "sc-1c24pcj-3"
28799
- })(["padding:0.5rem;color:", ";border-bottom:1px solid ", ";"], uiColors.white, uiColors.lightGray);
28801
+ })(["padding:0.5rem;color:", ";border-bottom:1px solid ", ";text-shadow:-2px 0 black,0 2px black,2px 0 black,0 -2px black;"], uiColors.white, uiColors.lightGray);
28800
28802
  var ActionButtons = /*#__PURE__*/styled.div.withConfig({
28801
28803
  displayName: "Table__ActionButtons",
28802
28804
  componentId: "sc-1c24pcj-4"
28803
28805
  })(["display:flex;gap:10px;align-items:center;"]);
28806
+ var UserActionLink = /*#__PURE__*/styled.span.withConfig({
28807
+ displayName: "Table__UserActionLink",
28808
+ componentId: "sc-1c24pcj-5"
28809
+ })(["color:", " !important;cursor:pointer;margin-right:0.5rem;&:hover{text-decoration:underline;}"], function (_ref) {
28810
+ var color = _ref.color;
28811
+ return color;
28812
+ });
28804
28813
 
28805
- var SearchFriend = function SearchFriend(props) {
28806
- var searchedCharacters = props.searchedCharacters,
28807
- friendRequests = props.friendRequests,
28808
- onBlur = props.onBlur,
28809
- onFocus = props.onFocus,
28810
- onSearch = props.onSearch,
28811
- onSendFriendRequest = props.onSendFriendRequest,
28812
- onAcceptRequest = props.onAcceptRequest,
28813
- onRejectRequest = props.onRejectRequest;
28814
+ var SearchFriend = function SearchFriend(_ref) {
28815
+ var searchedCharacters = _ref.searchedCharacters,
28816
+ friendRequests = _ref.friendRequests,
28817
+ onBlur = _ref.onBlur,
28818
+ onFocus = _ref.onFocus,
28819
+ onSearch = _ref.onSearch,
28820
+ onSendFriendRequest = _ref.onSendFriendRequest,
28821
+ onAcceptRequest = _ref.onAcceptRequest,
28822
+ onRejectRequest = _ref.onRejectRequest;
28814
28823
  var _useState = useState(''),
28815
28824
  characterName = _useState[0],
28816
28825
  setCharacterName = _useState[1];
28826
+ var debouncedSearch = useCallback(debounce(function (name) {
28827
+ onSearch(name);
28828
+ }, 300), []);
28829
+ var handleInputChange = function handleInputChange(e) {
28830
+ var name = e.target.value;
28831
+ setCharacterName(name);
28832
+ debouncedSearch(name);
28833
+ };
28817
28834
  var handleSubmit = function handleSubmit(event) {
28818
28835
  event.preventDefault();
28819
- if (!characterName || characterName.trim() === '') return;
28820
- onSearch(characterName);
28836
+ if (characterName.trim()) {
28837
+ onSearch(characterName);
28838
+ }
28821
28839
  };
28822
- return React.createElement(React.Fragment, null, React.createElement(Form$3, {
28840
+ var searchTabContent = React.createElement(ListContainer$1, null, React.createElement(SearchForm, {
28823
28841
  onSubmit: handleSubmit
28824
- }, React.createElement(Column, {
28825
- flex: 70
28826
- }, React.createElement(TextField$2, {
28842
+ }, React.createElement(SearchInput, {
28827
28843
  value: characterName,
28828
28844
  id: "characterName",
28829
28845
  name: "characterName",
28830
- onChange: function onChange(e) {
28831
- setCharacterName(e.target.value);
28832
- },
28833
- height: 20,
28846
+ onChange: handleInputChange,
28834
28847
  type: "text",
28835
28848
  autoComplete: "off",
28836
28849
  onFocus: onFocus,
28837
28850
  onBlur: onBlur,
28838
28851
  onPointerDown: onFocus,
28839
- autoFocus: true
28840
- })), React.createElement(Column, {
28841
- justifyContent: "flex-end"
28842
- }, React.createElement(Button, {
28843
- type: "submit",
28844
- buttonType: ButtonTypes.RPGUIButton
28845
- }, "Search"))), React.createElement(ListContainer$1, null, searchedCharacters.map(function (character) {
28846
- return React.createElement(ListElement$3, {
28852
+ autoFocus: true,
28853
+ placeholder: "Search for a character..."
28854
+ })), React.createElement(CharacterList, {
28855
+ characters: searchedCharacters,
28856
+ onAction: onSendFriendRequest,
28857
+ actionLabel: "Add Friend"
28858
+ }));
28859
+ var requestsTabContent = React.createElement(ListContainer$1, null, React.createElement(FriendRequestSection, {
28860
+ friendRequests: friendRequests,
28861
+ onAccept: onAcceptRequest,
28862
+ onReject: onRejectRequest
28863
+ }));
28864
+ var tabs = [{
28865
+ id: 'search',
28866
+ title: 'Search',
28867
+ content: searchTabContent
28868
+ }, {
28869
+ id: 'requests',
28870
+ title: "Requests (" + friendRequests.length + ")",
28871
+ content: requestsTabContent
28872
+ }];
28873
+ return React.createElement(Container$g, null, React.createElement(TableTab, {
28874
+ tabs: tabs,
28875
+ activeTextColor: "#000",
28876
+ inactiveColor: "#777",
28877
+ borderColor: "#f59e0b"
28878
+ }));
28879
+ };
28880
+ var CharacterList = function CharacterList(_ref2) {
28881
+ var characters = _ref2.characters,
28882
+ onAction = _ref2.onAction,
28883
+ actionLabel = _ref2.actionLabel;
28884
+ return React.createElement(ListContainer$1, null, characters.map(function (character) {
28885
+ return React.createElement(ListItem, {
28847
28886
  key: character._id
28848
- }, React.createElement("p", null, character.name), React.createElement(Button, {
28849
- buttonType: ButtonTypes.RPGUIButton,
28850
- onPointerDown: function onPointerDown() {
28851
- return onSendFriendRequest(character);
28887
+ }, React.createElement(CharacterName, null, character.name), React.createElement(UserActionLink, {
28888
+ color: uiColors.lightGreen,
28889
+ onClick: function onClick() {
28890
+ return onAction(character);
28852
28891
  }
28853
- }, "Add Friend"));
28854
- })), React.createElement(FriendRequestTitle, null, "Friend Requests ", React.createElement("span", null, "(", friendRequests.length, ")")), friendRequests.length > 0 && React.createElement(ListContainer$1, null, friendRequests.map(function (character) {
28855
- return React.createElement(ListElement$3, {
28892
+ }, actionLabel));
28893
+ }));
28894
+ };
28895
+ var FriendRequestSection = function FriendRequestSection(_ref3) {
28896
+ var friendRequests = _ref3.friendRequests,
28897
+ onAccept = _ref3.onAccept,
28898
+ onReject = _ref3.onReject;
28899
+ return React.createElement(React.Fragment, null, friendRequests.length > 0 && React.createElement(ListContainer$1, null, friendRequests.map(function (character) {
28900
+ return React.createElement(ListItem, {
28856
28901
  key: character._id
28857
- }, React.createElement("p", null, character.name), React.createElement(AcceptRejectButtonContainer, null, React.createElement(Button, {
28858
- buttonType: ButtonTypes.RPGUIButton,
28859
- onPointerDown: function onPointerDown() {
28860
- return onAcceptRequest(character);
28902
+ }, React.createElement(CharacterName, null, character.name), React.createElement(AcceptRejectActions, null, React.createElement(UserActionLink, {
28903
+ color: uiColors.lightGreen,
28904
+ onClick: function onClick() {
28905
+ return onAccept(character);
28861
28906
  }
28862
- }, "Accept"), React.createElement(Button, {
28863
- buttonType: ButtonTypes.RPGUIButton,
28864
- onPointerDown: function onPointerDown() {
28865
- return onRejectRequest(character);
28907
+ }, "Accept"), React.createElement(UserActionLink, {
28908
+ color: uiColors.red,
28909
+ onClick: function onClick() {
28910
+ return onReject(character);
28866
28911
  }
28867
28912
  }, "Reject")));
28868
28913
  })));
28869
28914
  };
28870
- var Form$3 = /*#__PURE__*/styled.form.withConfig({
28871
- displayName: "SearchFriend__Form",
28915
+ var Container$g = /*#__PURE__*/styled.div.withConfig({
28916
+ displayName: "SearchFriend__Container",
28872
28917
  componentId: "sc-1lt1ols-0"
28873
- })(["display:flex;width:100%;justify-content:center;align-items:center;margin-top:1rem;"]);
28874
- var TextField$2 = /*#__PURE__*/styled.input.withConfig({
28875
- displayName: "SearchFriend__TextField",
28918
+ })(["display:flex;flex-direction:column;gap:1rem;"]);
28919
+ var SearchForm = /*#__PURE__*/styled.form.withConfig({
28920
+ displayName: "SearchFriend__SearchForm",
28876
28921
  componentId: "sc-1lt1ols-1"
28877
- })(["width:100%;background-color:rgba(0,0,0,0.25) !important;border:none !important;max-height:28px !important;"]);
28922
+ })(["display:flex;align-items:center;width:100%;margin-top:1rem;"]);
28923
+ var SearchInput = /*#__PURE__*/styled.input.withConfig({
28924
+ displayName: "SearchFriend__SearchInput",
28925
+ componentId: "sc-1lt1ols-2"
28926
+ })(["width:100%;background-color:rgba(0,0,0,0.25);border:none;padding:0.5rem;font-size:", ";"], uiFonts.size.small);
28878
28927
  var ListContainer$1 = /*#__PURE__*/styled.ul.withConfig({
28879
28928
  displayName: "SearchFriend__ListContainer",
28880
- componentId: "sc-1lt1ols-2"
28881
- })(["width:100%;c4height:50vh;border:none;overflow-y:scroll;list-style:none;padding:0;@media (max-width:768px){max-height:90wh;}"]);
28882
- var ListElement$3 = /*#__PURE__*/styled.li.withConfig({
28883
- displayName: "SearchFriend__ListElement",
28884
28929
  componentId: "sc-1lt1ols-3"
28885
- })(["margin:0.5rem 0 !important;font-size:", ";padding:0.5rem 2px;display:flex;align-items:center;justify-content:space-between;"], uiFonts.size.small);
28886
- var FriendRequestTitle = /*#__PURE__*/styled.h3.withConfig({
28887
- displayName: "SearchFriend__FriendRequestTitle",
28930
+ })(["list-style:none;padding:0;margin:0;width:100%;max-height:50vh;overflow-y:auto;@media (max-width:768px){max-height:90vh;}"]);
28931
+ var ListItem = /*#__PURE__*/styled.li.withConfig({
28932
+ displayName: "SearchFriend__ListItem",
28888
28933
  componentId: "sc-1lt1ols-4"
28889
- })(["font-size:", " !important;margin-top:0.5rem !important;text-align:center;gap:0.5rem;"], uiFonts.size.small);
28890
- var AcceptRejectButtonContainer = /*#__PURE__*/styled.div.withConfig({
28891
- displayName: "SearchFriend__AcceptRejectButtonContainer",
28934
+ })(["display:flex;align-items:center;justify-content:space-between;padding:0.5rem;border-bottom:1px solid rgba(255,255,255,0.1);"]);
28935
+ var CharacterName = /*#__PURE__*/styled.p.withConfig({
28936
+ displayName: "SearchFriend__CharacterName",
28892
28937
  componentId: "sc-1lt1ols-5"
28893
- })(["display:flex;justify-content:space-between;gap:0.5rem;"]);
28938
+ })(["font-size:", ";margin:0;"], uiFonts.size.small);
28939
+ var AcceptRejectActions = /*#__PURE__*/styled.div.withConfig({
28940
+ displayName: "SearchFriend__AcceptRejectActions",
28941
+ componentId: "sc-1lt1ols-6"
28942
+ })(["display:flex;gap:0.5rem;"]);
28894
28943
 
28895
28944
  var FriendList = function FriendList(_ref) {
28896
28945
  var friends = _ref.friends,
@@ -28930,12 +28979,12 @@ var FriendList = function FriendList(_ref) {
28930
28979
  key: friend._id
28931
28980
  }, React.createElement(TableCell, null, React.createElement(IsOnlineBadge, {
28932
28981
  "$isOnline": friend.isOnline
28933
- })), React.createElement(TableCell, null, friend.name), React.createElement(TableCell, null, React.createElement(ActionButtons, null, React.createElement(UserAction, {
28934
- color: uiColors.yellow,
28982
+ })), React.createElement(TableCell, null, friend.name), React.createElement(TableCell, null, React.createElement(ActionButtons, null, React.createElement(UserActionLink, {
28983
+ color: uiColors.white,
28935
28984
  onClick: function onClick() {
28936
28985
  return onOpenPrivateMessage(friend);
28937
28986
  }
28938
- }, "Chat"), React.createElement(UserAction, {
28987
+ }, "Chat"), React.createElement(UserActionLink, {
28939
28988
  color: uiColors.red,
28940
28989
  onClick: function onClick() {
28941
28990
  return onRemoveFriend(friend);
@@ -28970,13 +29019,6 @@ var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
28970
29019
  displayName: "FriendList__ButtonContainer",
28971
29020
  componentId: "sc-3jf9vt-3"
28972
29021
  })(["display:flex;justify-content:center;align-items:center;width:100%;margin-top:1rem;"]);
28973
- var UserAction = /*#__PURE__*/styled.span.withConfig({
28974
- displayName: "FriendList__UserAction",
28975
- componentId: "sc-3jf9vt-4"
28976
- })(["color:", " !important;cursor:pointer;margin-right:0.5rem;&:hover{text-decoration:underline;}"], function (_ref3) {
28977
- var color = _ref3.color;
28978
- return color;
28979
- });
28980
29022
 
28981
29023
  var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
28982
29024
 
@@ -29073,7 +29115,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
29073
29115
  var _useState2 = useState(false),
29074
29116
  showGoNextIndicator = _useState2[0],
29075
29117
  setShowGoNextIndicator = _useState2[1];
29076
- return React.createElement(Container$g, null, React.createElement(DynamicText, {
29118
+ return React.createElement(Container$h, null, React.createElement(DynamicText, {
29077
29119
  text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
29078
29120
  onFinish: function onFinish() {
29079
29121
  setShowGoNextIndicator(true);
@@ -29091,7 +29133,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
29091
29133
  }
29092
29134
  }));
29093
29135
  };
29094
- var Container$g = /*#__PURE__*/styled.div.withConfig({
29136
+ var Container$h = /*#__PURE__*/styled.div.withConfig({
29095
29137
  displayName: "NPCDialogText__Container",
29096
29138
  componentId: "sc-1cxkdh9-0"
29097
29139
  })([""]);
@@ -29243,7 +29285,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
29243
29285
  return null;
29244
29286
  });
29245
29287
  };
29246
- return React.createElement(Container$h, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
29288
+ return React.createElement(Container$i, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
29247
29289
  text: currentQuestion.text,
29248
29290
  onStart: function onStart() {
29249
29291
  return setCanShowAnswers(false);
@@ -29253,7 +29295,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
29253
29295
  }
29254
29296
  })), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
29255
29297
  };
29256
- var Container$h = /*#__PURE__*/styled.div.withConfig({
29298
+ var Container$i = /*#__PURE__*/styled.div.withConfig({
29257
29299
  displayName: "QuestionDialog__Container",
29258
29300
  componentId: "sc-bxc5u0-0"
29259
29301
  })(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
@@ -29314,7 +29356,7 @@ var NPCDialog = function NPCDialog(_ref) {
29314
29356
  }
29315
29357
  })), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
29316
29358
  src: imagePath || img$7
29317
- }))) : React.createElement(React.Fragment, null, React.createElement(Container$i, null, React.createElement(CloseIcon, {
29359
+ }))) : React.createElement(React.Fragment, null, React.createElement(Container$j, null, React.createElement(CloseIcon, {
29318
29360
  onPointerDown: _onClose
29319
29361
  }, "X"), React.createElement(TextContainer$1, {
29320
29362
  flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
@@ -29330,7 +29372,7 @@ var NPCDialog = function NPCDialog(_ref) {
29330
29372
  src: imagePath || img$7
29331
29373
  })))));
29332
29374
  };
29333
- var Container$i = /*#__PURE__*/styled.div.withConfig({
29375
+ var Container$j = /*#__PURE__*/styled.div.withConfig({
29334
29376
  displayName: "NPCDialog__Container",
29335
29377
  componentId: "sc-1b4aw74-0"
29336
29378
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -29391,7 +29433,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
29391
29433
  type: RPGUIContainerTypes.FramedGold,
29392
29434
  width: '50%',
29393
29435
  height: '180px'
29394
- }, React.createElement(React.Fragment, null, React.createElement(Container$j, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
29436
+ }, React.createElement(React.Fragment, null, React.createElement(Container$k, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
29395
29437
  flex: '70%'
29396
29438
  }, React.createElement(NPCDialogText, {
29397
29439
  onStartStep: function onStartStep() {
@@ -29433,7 +29475,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
29433
29475
  src: img$6
29434
29476
  }))), ")"));
29435
29477
  };
29436
- var Container$j = /*#__PURE__*/styled.div.withConfig({
29478
+ var Container$k = /*#__PURE__*/styled.div.withConfig({
29437
29479
  displayName: "NPCMultiDialog__Container",
29438
29480
  componentId: "sc-rvu5wg-0"
29439
29481
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -29862,7 +29904,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
29862
29904
  }
29863
29905
  return null;
29864
29906
  };
29865
- return React.createElement(Container$k, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
29907
+ return React.createElement(Container$l, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
29866
29908
  id: "shortcuts_list"
29867
29909
  }, Array.from({
29868
29910
  length: 12
@@ -29880,7 +29922,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
29880
29922
  }, getContent(i));
29881
29923
  })));
29882
29924
  };
29883
- var Container$k = /*#__PURE__*/styled.div.withConfig({
29925
+ var Container$l = /*#__PURE__*/styled.div.withConfig({
29884
29926
  displayName: "ShortcutsSetter__Container",
29885
29927
  componentId: "sc-xuouuf-0"
29886
29928
  })(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
@@ -30483,7 +30525,7 @@ var ListMenu = function ListMenu(_ref) {
30483
30525
  onSelected = _ref.onSelected,
30484
30526
  x = _ref.x,
30485
30527
  y = _ref.y;
30486
- return React.createElement(Container$l, {
30528
+ return React.createElement(Container$m, {
30487
30529
  x: x,
30488
30530
  y: y
30489
30531
  }, React.createElement("ul", {
@@ -30492,7 +30534,7 @@ var ListMenu = function ListMenu(_ref) {
30492
30534
  overflow: 'hidden'
30493
30535
  }
30494
30536
  }, options.map(function (params, index) {
30495
- return React.createElement(ListElement$4, {
30537
+ return React.createElement(ListElement$3, {
30496
30538
  key: (params == null ? void 0 : params.id) || index,
30497
30539
  onPointerDown: function onPointerDown() {
30498
30540
  onSelected(params == null ? void 0 : params.id);
@@ -30500,7 +30542,7 @@ var ListMenu = function ListMenu(_ref) {
30500
30542
  }, (params == null ? void 0 : params.text) || 'No text');
30501
30543
  })));
30502
30544
  };
30503
- var Container$l = /*#__PURE__*/styled.div.withConfig({
30545
+ var Container$m = /*#__PURE__*/styled.div.withConfig({
30504
30546
  displayName: "ListMenu__Container",
30505
30547
  componentId: "sc-i9097t-0"
30506
30548
  })(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", ";}"], function (props) {
@@ -30508,7 +30550,7 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
30508
30550
  }, function (props) {
30509
30551
  return props.x || 0;
30510
30552
  }, uiFonts.size.xsmall);
30511
- var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
30553
+ var ListElement$3 = /*#__PURE__*/styled.li.withConfig({
30512
30554
  displayName: "ListMenu__ListElement",
30513
30555
  componentId: "sc-i9097t-1"
30514
30556
  })(["margin-right:0.5rem;"]);
@@ -30519,7 +30561,7 @@ var Pager = function Pager(_ref) {
30519
30561
  itemsPerPage = _ref.itemsPerPage,
30520
30562
  onPageChange = _ref.onPageChange;
30521
30563
  var totalPages = Math.ceil(totalItems / itemsPerPage);
30522
- return React.createElement(Container$m, null, React.createElement("p", null, "Total items: ", totalItems), React.createElement(PagerContainer, null, React.createElement("button", {
30564
+ return React.createElement(Container$n, null, React.createElement("p", null, "Total items: ", totalItems), React.createElement(PagerContainer, null, React.createElement("button", {
30523
30565
  disabled: currentPage === 1,
30524
30566
  onPointerDown: function onPointerDown() {
30525
30567
  return onPageChange(Math.max(currentPage - 1, 1));
@@ -30533,7 +30575,7 @@ var Pager = function Pager(_ref) {
30533
30575
  }
30534
30576
  }, '>')));
30535
30577
  };
30536
- var Container$m = /*#__PURE__*/styled.div.withConfig({
30578
+ var Container$n = /*#__PURE__*/styled.div.withConfig({
30537
30579
  displayName: "Pager__Container",
30538
30580
  componentId: "sc-1ekmf50-0"
30539
30581
  })(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
@@ -30546,7 +30588,7 @@ var ConfirmModal = function ConfirmModal(_ref) {
30546
30588
  var onConfirm = _ref.onConfirm,
30547
30589
  onClose = _ref.onClose,
30548
30590
  message = _ref.message;
30549
- return React.createElement(ModalPortal, null, React.createElement(Background, null), React.createElement(Container$n, {
30591
+ return React.createElement(ModalPortal, null, React.createElement(Background, null), React.createElement(Container$o, {
30550
30592
  onPointerDown: onClose
30551
30593
  }, React.createElement(DraggableContainer, {
30552
30594
  width: "auto",
@@ -30569,7 +30611,7 @@ var Background = /*#__PURE__*/styled.div.withConfig({
30569
30611
  displayName: "ConfirmModal__Background",
30570
30612
  componentId: "sc-11qkyu1-0"
30571
30613
  })(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
30572
- var Container$n = /*#__PURE__*/styled.div.withConfig({
30614
+ var Container$o = /*#__PURE__*/styled.div.withConfig({
30573
30615
  displayName: "ConfirmModal__Container",
30574
30616
  componentId: "sc-11qkyu1-1"
30575
30617
  })(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
@@ -31085,12 +31127,12 @@ var TabBody = function TabBody(_ref) {
31085
31127
  var id = _ref.id,
31086
31128
  children = _ref.children,
31087
31129
  styles = _ref.styles;
31088
- return React.createElement(Container$o, {
31130
+ return React.createElement(Container$p, {
31089
31131
  styles: styles,
31090
31132
  "data-tab-id": id
31091
31133
  }, children);
31092
31134
  };
31093
- var Container$o = /*#__PURE__*/styled.div.withConfig({
31135
+ var Container$p = /*#__PURE__*/styled.div.withConfig({
31094
31136
  displayName: "TabBody__Container",
31095
31137
  componentId: "sc-196oof2-0"
31096
31138
  })(["width:100%;height:", ";overflow-y:auto;"], function (props) {
@@ -31708,7 +31750,7 @@ var ProgressBar = function ProgressBar(_ref) {
31708
31750
  }
31709
31751
  return value * 100 / max;
31710
31752
  };
31711
- return React.createElement(Container$p, {
31753
+ return React.createElement(Container$q, {
31712
31754
  className: "rpgui-progress",
31713
31755
  "data-value": calculatePercentageValue(max, value) / 100,
31714
31756
  "data-rpguitype": "progress",
@@ -31738,7 +31780,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
31738
31780
  displayName: "ProgressBar__TextOverlay",
31739
31781
  componentId: "sc-qa6fzh-1"
31740
31782
  })(["width:100%;position:relative;"]);
31741
- var Container$p = /*#__PURE__*/styled.div.withConfig({
31783
+ var Container$q = /*#__PURE__*/styled.div.withConfig({
31742
31784
  displayName: "ProgressBar__Container",
31743
31785
  componentId: "sc-qa6fzh-2"
31744
31786
  })(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
@@ -31869,54 +31911,256 @@ var Thumbnail = /*#__PURE__*/styled.img.withConfig({
31869
31911
  componentId: "sc-15s2boc-8"
31870
31912
  })(["color:white;z-index:22;width:32px * 1.5;margin-right:0.5rem;position:relative;top:-4px;"]);
31871
31913
 
31872
- var QuestList = function QuestList(_ref) {
31873
- var quests = _ref.quests,
31874
- onClose = _ref.onClose,
31875
- scale = _ref.scale;
31876
- return React.createElement(QuestDraggableContainer$1, {
31877
- type: RPGUIContainerTypes.Framed,
31878
- onCloseButton: function onCloseButton() {
31879
- if (onClose) onClose();
31880
- },
31881
- width: "520px",
31882
- scale: scale
31883
- }, React.createElement("div", {
31914
+ var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
31915
+ var children = _ref.children;
31916
+ return React.createElement(Container$r, null, children);
31917
+ };
31918
+ var Container$r = /*#__PURE__*/styled.div.withConfig({
31919
+ displayName: "RPGUIScrollbar__Container",
31920
+ componentId: "sc-p3msmb-0"
31921
+ })([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
31922
+
31923
+ var RPGUIOverrides = function RPGUIOverrides(_ref) {
31924
+ var children = _ref.children;
31925
+ return React.createElement(RPGUIScrollbar, null, children);
31926
+ };
31927
+
31928
+ //@ts-ignore
31929
+ var _RPGUI = RPGUI;
31930
+ var RPGUIRoot = function RPGUIRoot(_ref) {
31931
+ var children = _ref.children;
31932
+ return React.createElement(RPGUIOverrides, null, React.createElement("div", {
31933
+ className: "rpgui-content"
31934
+ }, children));
31935
+ };
31936
+
31937
+ var SimpleTooltip = function SimpleTooltip(_ref) {
31938
+ var content = _ref.content,
31939
+ _ref$direction = _ref.direction,
31940
+ direction = _ref$direction === void 0 ? 'top' : _ref$direction,
31941
+ _ref$backgroundColor = _ref.backgroundColor,
31942
+ backgroundColor = _ref$backgroundColor === void 0 ? uiColors.raisinBlack : _ref$backgroundColor,
31943
+ _ref$textColor = _ref.textColor,
31944
+ textColor = _ref$textColor === void 0 ? uiColors.white : _ref$textColor,
31945
+ children = _ref.children,
31946
+ _ref$showDelay = _ref.showDelay,
31947
+ showDelay = _ref$showDelay === void 0 ? 200 : _ref$showDelay,
31948
+ _ref$hideDelay = _ref.hideDelay,
31949
+ hideDelay = _ref$hideDelay === void 0 ? 200 : _ref$hideDelay;
31950
+ var _useState = useState(false),
31951
+ visible = _useState[0],
31952
+ setVisible = _useState[1];
31953
+ var _useState2 = useState({
31954
+ top: 0,
31955
+ left: 0
31956
+ }),
31957
+ tooltipPosition = _useState2[0],
31958
+ setTooltipPosition = _useState2[1];
31959
+ var tooltipRef = useRef(null);
31960
+ var triggerRef = useRef(null);
31961
+ var timeoutRef = useRef();
31962
+ var calculatePosition = function calculatePosition() {
31963
+ if (!triggerRef.current || !tooltipRef.current) return;
31964
+ var triggerRect = triggerRef.current.getBoundingClientRect();
31965
+ var tooltipRect = tooltipRef.current.getBoundingClientRect();
31966
+ var top, left;
31967
+ switch (direction) {
31968
+ case 'top':
31969
+ top = triggerRect.top - tooltipRect.height - 8;
31970
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
31971
+ break;
31972
+ case 'bottom':
31973
+ top = triggerRect.bottom + 8;
31974
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
31975
+ break;
31976
+ case 'left':
31977
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
31978
+ left = triggerRect.left - tooltipRect.width - 8;
31979
+ break;
31980
+ case 'right':
31981
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;
31982
+ left = triggerRect.right + 8;
31983
+ break;
31984
+ default:
31985
+ top = triggerRect.top - tooltipRect.height - 8;
31986
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;
31987
+ }
31988
+ // Ensure the tooltip stays within the viewport
31989
+ if (left < 8) left = 8;
31990
+ if (left + tooltipRect.width > window.innerWidth) left = window.innerWidth - tooltipRect.width - 8;
31991
+ if (top < 8) top = 8;
31992
+ if (top + tooltipRect.height > window.innerHeight) top = window.innerHeight - tooltipRect.height - 8;
31993
+ setTooltipPosition({
31994
+ top: Math.round(top),
31995
+ left: Math.round(left)
31996
+ });
31997
+ };
31998
+ var showTooltip = function showTooltip() {
31999
+ clearTimeout(timeoutRef.current);
32000
+ timeoutRef.current = setTimeout(function () {
32001
+ setVisible(true);
32002
+ calculatePosition();
32003
+ }, showDelay);
32004
+ };
32005
+ var hideTooltip = function hideTooltip() {
32006
+ clearTimeout(timeoutRef.current);
32007
+ timeoutRef.current = setTimeout(function () {
32008
+ setVisible(false);
32009
+ }, hideDelay);
32010
+ };
32011
+ useEffect(function () {
32012
+ var handleMouseMove = function handleMouseMove(event) {
32013
+ if (visible && tooltipRef.current && triggerRef.current) {
32014
+ var tooltipRect = tooltipRef.current.getBoundingClientRect();
32015
+ var triggerRect = triggerRef.current.getBoundingClientRect();
32016
+ var isOutsideTooltip = event.clientX < tooltipRect.left || event.clientX > tooltipRect.right || event.clientY < tooltipRect.top || event.clientY > tooltipRect.bottom;
32017
+ var isOutsideTrigger = event.clientX < triggerRect.left || event.clientX > triggerRect.right || event.clientY < triggerRect.top || event.clientY > triggerRect.bottom;
32018
+ if (isOutsideTooltip && isOutsideTrigger) {
32019
+ hideTooltip();
32020
+ }
32021
+ }
32022
+ };
32023
+ var handleScroll = function handleScroll() {
32024
+ if (visible) {
32025
+ hideTooltip();
32026
+ }
32027
+ };
32028
+ var handleResize = function handleResize() {
32029
+ if (visible) {
32030
+ calculatePosition();
32031
+ }
32032
+ };
32033
+ document.addEventListener('mousemove', handleMouseMove);
32034
+ window.addEventListener('scroll', handleScroll);
32035
+ window.addEventListener('resize', handleResize);
32036
+ return function () {
32037
+ document.removeEventListener('mousemove', handleMouseMove);
32038
+ window.removeEventListener('scroll', handleScroll);
32039
+ window.removeEventListener('resize', handleResize);
32040
+ clearTimeout(timeoutRef.current);
32041
+ };
32042
+ }, [visible]);
32043
+ return React.createElement(TooltipContainer, {
32044
+ ref: triggerRef,
32045
+ onMouseEnter: showTooltip,
32046
+ onMouseLeave: hideTooltip,
32047
+ onFocus: showTooltip,
32048
+ onBlur: hideTooltip
32049
+ }, children, visible && ReactDOM.createPortal(React.createElement(RPGUIRoot, null, React.createElement(TooltipBox, {
32050
+ ref: tooltipRef,
32051
+ direction: direction,
32052
+ backgroundColor: backgroundColor,
32053
+ textColor: textColor,
31884
32054
  style: {
31885
- width: '100%'
32055
+ top: tooltipPosition.top,
32056
+ left: tooltipPosition.left
31886
32057
  }
31887
- }, React.createElement(Title$8, null, "Quests"), React.createElement("hr", {
31888
- className: "golden"
31889
- }), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
31890
- return React.createElement("div", {
31891
- className: "quest-item",
32058
+ }, content)), document.body));
32059
+ };
32060
+ var TooltipContainer = /*#__PURE__*/styled.div.withConfig({
32061
+ displayName: "SimpleTooltip__TooltipContainer",
32062
+ componentId: "sc-l46vpo-0"
32063
+ })(["display:inline-block;cursor:inherit;"]);
32064
+ var fadeIn$1 = /*#__PURE__*/keyframes(["from{opacity:0;transform:scale(0.95);}to{opacity:1;transform:scale(1);}"]);
32065
+ var TooltipBox = /*#__PURE__*/styled.div.withConfig({
32066
+ displayName: "SimpleTooltip__TooltipBox",
32067
+ componentId: "sc-l46vpo-1"
32068
+ })(["position:fixed;z-index:1000;background-color:", ";color:", ";padding:8px;border-radius:4px;font-size:0.65rem;max-width:250px;box-shadow:0px 4px 8px rgba(0,0,0,0.1);animation:", " 0.2s ease-out;line-height:1.3;"], function (_ref2) {
32069
+ var backgroundColor = _ref2.backgroundColor;
32070
+ return backgroundColor;
32071
+ }, function (_ref3) {
32072
+ var textColor = _ref3.textColor;
32073
+ return textColor;
32074
+ }, fadeIn$1);
32075
+
32076
+ var QuestList = function QuestList(_ref) {
32077
+ var quests = _ref.quests;
32078
+ return React.createElement(QuestListContainer, null, quests && quests.length > 0 ? React.createElement(React.Fragment, null, React.createElement(Table, null, React.createElement("thead", null, React.createElement(TableRow, null, React.createElement(TableHeader, null, "Status"), React.createElement(TableHeader, null, "Title"), React.createElement(TableHeader, null, "Description"), React.createElement(TableHeader, null, "Objectives"), React.createElement(TableHeader, null, "Rewards"))), React.createElement("tbody", null, quests.map(function (quest, i) {
32079
+ var _quest$status;
32080
+ return React.createElement(TableRow, {
31892
32081
  key: i
31893
- }, React.createElement("span", {
31894
- className: "quest-number"
31895
- }, i + 1), React.createElement("div", {
31896
- className: "quest-detail"
31897
- }, React.createElement("p", {
31898
- className: "quest-detail__title"
31899
- }, quest.title), React.createElement("p", {
31900
- className: "quest-detail__description"
31901
- }, quest.description)));
31902
- }) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")))));
32082
+ }, React.createElement(TableCell, {
32083
+ style: {
32084
+ color: getStatusColor(quest.status)
32085
+ }
32086
+ }, (_quest$status = quest.status) != null ? _quest$status : 'Unknown'), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
32087
+ content: formatText(quest.title),
32088
+ direction: "bottom"
32089
+ }, React.createElement(Ellipsis, {
32090
+ maxWidth: "300px"
32091
+ }, formatText(quest.title)))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
32092
+ content: quest.description,
32093
+ direction: "bottom"
32094
+ }, React.createElement(Ellipsis, {
32095
+ maxWidth: "300px"
32096
+ }, quest.description))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
32097
+ content: formatObjectives(quest.objectives),
32098
+ direction: "bottom"
32099
+ }, React.createElement(Ellipsis, {
32100
+ maxWidth: "300px"
32101
+ }, formatObjectives(quest.objectives)))), React.createElement(TableCell, null, React.createElement(SimpleTooltip, {
32102
+ content: formatRewards(quest.rewards),
32103
+ direction: "bottom"
32104
+ }, React.createElement(Ellipsis, {
32105
+ maxWidth: "200px"
32106
+ }, formatRewards(quest.rewards)))));
32107
+ })))) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
31903
32108
  };
31904
- var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConfig({
31905
- displayName: "QuestList__QuestDraggableContainer",
31906
- componentId: "sc-1a2vx6q-0"
31907
- })([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
31908
- var Title$8 = /*#__PURE__*/styled.h1.withConfig({
31909
- displayName: "QuestList__Title",
31910
- componentId: "sc-1a2vx6q-1"
31911
- })(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
32109
+ // Updated helper function to format objectives
32110
+ var formatObjectives = function formatObjectives(objectives) {
32111
+ return objectives.map(function (objective) {
32112
+ if ('killCountTarget' in objective) {
32113
+ // This is an IQuestObjectiveKill
32114
+ var killObjective = objective;
32115
+ return "Kill " + formatText(killObjective.creatureKeys.join(', ')) + ": " + killObjective.killCount + "/" + killObjective.killCountTarget;
32116
+ } else if ('targetNPCkey' in objective) {
32117
+ var _interactionObjective;
32118
+ // This is an IQuestObjectiveInteraction
32119
+ var interactionObjective = objective;
32120
+ return "Interact with NPC: " + formatText((_interactionObjective = interactionObjective.targetNPCkey) != null ? _interactionObjective : 'Unknown');
32121
+ } else {
32122
+ return 'Unknown objective';
32123
+ }
32124
+ }).join('; ');
32125
+ };
32126
+ // Other helper functions remain the same
32127
+ var formatRewards = function formatRewards(rewards) {
32128
+ return rewards.map(function (reward) {
32129
+ return "" + formatText(reward.itemKeys.map(function (itemKey) {
32130
+ return itemKey + ' x' + reward.qty;
32131
+ }).join(', ')) + (reward.spellKeys ? ", Spells: " + formatText(reward.spellKeys.join(', ')) : '');
32132
+ }).join('; ');
32133
+ };
32134
+ var formatText = function formatText(text) {
32135
+ return text.split('-').map(function (word) {
32136
+ return word.charAt(0).toUpperCase() + word.slice(1);
32137
+ }).join(' ');
32138
+ };
32139
+ var getStatusColor = function getStatusColor(status) {
32140
+ switch (status) {
32141
+ case QuestStatus.Pending:
32142
+ return uiColors.orange;
32143
+ // Orange
32144
+ case QuestStatus.InProgress:
32145
+ return uiColors.blue;
32146
+ // Deep Sky Blue
32147
+ case QuestStatus.Completed:
32148
+ return uiColors.lightGreen;
32149
+ // Lime Green
32150
+ default:
32151
+ return uiColors.white;
32152
+ // Default to white
32153
+ }
32154
+ };
32155
+ // Styled components
31912
32156
  var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
31913
32157
  displayName: "QuestList__QuestListContainer",
31914
- componentId: "sc-1a2vx6q-2"
31915
- })(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;.quest-item{display:flex;align-items:flex-start;margin-bottom:12px;}.quest-number{border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;margin-right:16px;background-color:brown;flex-shrink:0;}.quest-number.completed{background-color:yellow;}p{margin:0;}.quest-detail__title{color:yellow;}.quest-detail__description{margin-top:5px;}.Noquest-detail__description{margin-top:5px;margin:auto;}"]);
32158
+ componentId: "sc-1a2vx6q-0"
32159
+ })(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;background-color:", ";padding:20px;border-radius:10px;border:1px solid ", ";font-size:0.7rem;"], uiColors.darkGray, uiColors.gray);
31916
32160
  var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
31917
32161
  displayName: "QuestList__NoQuestContainer",
31918
- componentId: "sc-1a2vx6q-3"
31919
- })(["text-align:center;p{margin-top:5px;}"]);
32162
+ componentId: "sc-1a2vx6q-1"
32163
+ })(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
31920
32164
 
31921
32165
  var InputRadio$1 = function InputRadio(_ref) {
31922
32166
  var name = _ref.name,
@@ -31950,29 +32194,6 @@ var InputRadio$1 = function InputRadio(_ref) {
31950
32194
  }));
31951
32195
  };
31952
32196
 
31953
- var RPGUIScrollbar = function RPGUIScrollbar(_ref) {
31954
- var children = _ref.children;
31955
- return React.createElement(Container$q, null, children);
31956
- };
31957
- var Container$q = /*#__PURE__*/styled.div.withConfig({
31958
- displayName: "RPGUIScrollbar__Container",
31959
- componentId: "sc-p3msmb-0"
31960
- })([".rpgui-content ::-webkit-scrollbar,.rpgui-content::-webkit-scrollbar{width:25px !important;}.rpgui-content ::-webkit-scrollbar-track,.rpgui-content::-webkit-scrollbar-track{background-size:25px 60px !important;}"]);
31961
-
31962
- var RPGUIOverrides = function RPGUIOverrides(_ref) {
31963
- var children = _ref.children;
31964
- return React.createElement(RPGUIScrollbar, null, children);
31965
- };
31966
-
31967
- //@ts-ignore
31968
- var _RPGUI = RPGUI;
31969
- var RPGUIRoot = function RPGUIRoot(_ref) {
31970
- var children = _ref.children;
31971
- return React.createElement(RPGUIOverrides, null, React.createElement("div", {
31972
- className: "rpgui-content"
31973
- }, children));
31974
- };
31975
-
31976
32197
  var Shortcuts = function Shortcuts(_ref) {
31977
32198
  var shortcuts = _ref.shortcuts,
31978
32199
  onShortcutCast = _ref.onShortcutCast,
@@ -32110,7 +32331,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
32110
32331
  margin = _ref$margin === void 0 ? 20 : _ref$margin;
32111
32332
  // Ensure the width is at least 1% if value is greater than 0
32112
32333
  var width = value > 0 ? Math.max(1, Math.min(100, value)) : 0;
32113
- return React.createElement(Container$r, {
32334
+ return React.createElement(Container$s, {
32114
32335
  className: "simple-progress-bar"
32115
32336
  }, React.createElement(ProgressBarContainer, {
32116
32337
  margin: margin
@@ -32119,7 +32340,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
32119
32340
  bgColor: bgColor
32120
32341
  }))));
32121
32342
  };
32122
- var Container$r = /*#__PURE__*/styled.div.withConfig({
32343
+ var Container$s = /*#__PURE__*/styled.div.withConfig({
32123
32344
  displayName: "SimpleProgressBar__Container",
32124
32345
  componentId: "sc-mbeil3-0"
32125
32346
  })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
@@ -32399,7 +32620,7 @@ var SpellInfo = function SpellInfo(_ref) {
32399
32620
  castingType = spell.castingType,
32400
32621
  cooldown = spell.cooldown,
32401
32622
  maxDistanceGrid = spell.maxDistanceGrid;
32402
- return React.createElement(Container$s, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$9, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
32623
+ return React.createElement(Container$t, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$8, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
32403
32624
  className: "label"
32404
32625
  }, "Casting Type:"), React.createElement("div", {
32405
32626
  className: "value"
@@ -32425,11 +32646,11 @@ var SpellInfo = function SpellInfo(_ref) {
32425
32646
  className: "value"
32426
32647
  }, requiredItem))), React.createElement(Description$2, null, description));
32427
32648
  };
32428
- var Container$s = /*#__PURE__*/styled.div.withConfig({
32649
+ var Container$t = /*#__PURE__*/styled.div.withConfig({
32429
32650
  displayName: "SpellInfo__Container",
32430
32651
  componentId: "sc-4hbw3q-0"
32431
32652
  })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
32432
- var Title$9 = /*#__PURE__*/styled.div.withConfig({
32653
+ var Title$8 = /*#__PURE__*/styled.div.withConfig({
32433
32654
  displayName: "SpellInfo__Title",
32434
32655
  componentId: "sc-4hbw3q-1"
32435
32656
  })(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
@@ -32479,7 +32700,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
32479
32700
  var _ref$current;
32480
32701
  (_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
32481
32702
  };
32482
- return React.createElement(ModalPortal, null, React.createElement(Container$t, {
32703
+ return React.createElement(ModalPortal, null, React.createElement(Container$u, {
32483
32704
  ref: ref,
32484
32705
  onTouchEnd: function onTouchEnd() {
32485
32706
  handleFadeOut();
@@ -32504,7 +32725,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
32504
32725
  }, option.text);
32505
32726
  }))));
32506
32727
  };
32507
- var Container$t = /*#__PURE__*/styled.div.withConfig({
32728
+ var Container$u = /*#__PURE__*/styled.div.withConfig({
32508
32729
  displayName: "MobileSpellTooltip__Container",
32509
32730
  componentId: "sc-6p7uvr-0"
32510
32731
  })(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
@@ -32545,13 +32766,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
32545
32766
  }
32546
32767
  return;
32547
32768
  }, []);
32548
- return React.createElement(ModalPortal, null, React.createElement(Container$u, {
32769
+ return React.createElement(ModalPortal, null, React.createElement(Container$v, {
32549
32770
  ref: ref
32550
32771
  }, React.createElement(SpellInfoDisplay, {
32551
32772
  spell: spell
32552
32773
  })));
32553
32774
  };
32554
- var Container$u = /*#__PURE__*/styled.div.withConfig({
32775
+ var Container$v = /*#__PURE__*/styled.div.withConfig({
32555
32776
  displayName: "SpellTooltip__Container",
32556
32777
  componentId: "sc-1go0gwg-0"
32557
32778
  })(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
@@ -32611,7 +32832,7 @@ var Spell = function Spell(_ref) {
32611
32832
  var IMAGE_SCALE = 2;
32612
32833
  return React.createElement(SpellInfoWrapper, {
32613
32834
  spell: spell
32614
- }, React.createElement(Container$v, {
32835
+ }, React.createElement(Container$w, {
32615
32836
  onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
32616
32837
  isSettingShortcut: isSettingShortcut && !disabled,
32617
32838
  className: "spell"
@@ -32624,13 +32845,13 @@ var Spell = function Spell(_ref) {
32624
32845
  imgScale: IMAGE_SCALE,
32625
32846
  containerStyle: CONTAINER_STYLE,
32626
32847
  centered: true
32627
- })), React.createElement(Info, null, React.createElement(Title$a, null, React.createElement("span", null, name), React.createElement("span", {
32848
+ })), React.createElement(Info, null, React.createElement(Title$9, null, React.createElement("span", null, name), React.createElement("span", {
32628
32849
  className: "spell"
32629
32850
  }, "(", magicWords, ")")), React.createElement(Description$3, null, description)), React.createElement(Divider, null), React.createElement(Cost, null, React.createElement("span", null, "Mana cost:"), React.createElement("span", {
32630
32851
  className: "mana"
32631
32852
  }, manaCost))));
32632
32853
  };
32633
- var Container$v = /*#__PURE__*/styled.button.withConfig({
32854
+ var Container$w = /*#__PURE__*/styled.button.withConfig({
32634
32855
  displayName: "Spell__Container",
32635
32856
  componentId: "sc-j96fa2-0"
32636
32857
  })(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
@@ -32645,7 +32866,7 @@ var Info = /*#__PURE__*/styled.span.withConfig({
32645
32866
  displayName: "Spell__Info",
32646
32867
  componentId: "sc-j96fa2-2"
32647
32868
  })(["width:0;flex:1;@media (orientation:portrait){display:none;}"]);
32648
- var Title$a = /*#__PURE__*/styled.p.withConfig({
32869
+ var Title$9 = /*#__PURE__*/styled.p.withConfig({
32649
32870
  displayName: "Spell__Title",
32650
32871
  componentId: "sc-j96fa2-3"
32651
32872
  })(["display:flex;flex-wrap:wrap;align-items:center;margin-bottom:5px;margin:0;span{font-size:", " !important;font-weight:bold !important;color:", " !important;margin-right:0.5rem;}.spell{font-size:", " !important;font-weight:normal !important;color:", " !important;}"], uiFonts.size.medium, uiColors.yellow, uiFonts.size.small, uiColors.lightGray);
@@ -32709,7 +32930,7 @@ var Spellbook = function Spellbook(_ref) {
32709
32930
  height: "inherit",
32710
32931
  cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
32711
32932
  scale: scale
32712
- }, React.createElement(Container$w, null, React.createElement(Title$b, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
32933
+ }, React.createElement(Container$x, null, React.createElement(Title$a, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
32713
32934
  setSettingShortcutIndex: setSettingShortcutIndex,
32714
32935
  settingShortcutIndex: settingShortcutIndex,
32715
32936
  shortcuts: shortcuts,
@@ -32741,11 +32962,11 @@ var Spellbook = function Spellbook(_ref) {
32741
32962
  }, spell)));
32742
32963
  }))));
32743
32964
  };
32744
- var Title$b = /*#__PURE__*/styled.h1.withConfig({
32965
+ var Title$a = /*#__PURE__*/styled.h1.withConfig({
32745
32966
  displayName: "Spellbook__Title",
32746
32967
  componentId: "sc-r02nfq-0"
32747
32968
  })(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
32748
- var Container$w = /*#__PURE__*/styled.div.withConfig({
32969
+ var Container$x = /*#__PURE__*/styled.div.withConfig({
32749
32970
  displayName: "Spellbook__Container",
32750
32971
  componentId: "sc-r02nfq-1"
32751
32972
  })(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
@@ -33231,7 +33452,7 @@ var TradingMenu = function TradingMenu(_ref) {
33231
33452
  style: {
33232
33453
  width: '100%'
33233
33454
  }
33234
- }, React.createElement(Title$c, null, Capitalize(type), " Menu"), React.createElement("hr", {
33455
+ }, React.createElement(Title$b, null, Capitalize(type), " Menu"), React.createElement("hr", {
33235
33456
  className: "golden"
33236
33457
  })), React.createElement(TradingComponentScrollWrapper, {
33237
33458
  id: "TraderContainer"
@@ -33262,7 +33483,7 @@ var TradingMenu = function TradingMenu(_ref) {
33262
33483
  }
33263
33484
  }, "Cancel"))));
33264
33485
  };
33265
- var Title$c = /*#__PURE__*/styled.h1.withConfig({
33486
+ var Title$b = /*#__PURE__*/styled.h1.withConfig({
33266
33487
  displayName: "TradingMenu__Title",
33267
33488
  componentId: "sc-1wjsz1l-0"
33268
33489
  })(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
@@ -33296,11 +33517,11 @@ var Truncate = function Truncate(_ref) {
33296
33517
  var _ref$maxLines = _ref.maxLines,
33297
33518
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
33298
33519
  children = _ref.children;
33299
- return React.createElement(Container$x, {
33520
+ return React.createElement(Container$y, {
33300
33521
  maxLines: maxLines
33301
33522
  }, children);
33302
33523
  };
33303
- var Container$x = /*#__PURE__*/styled.div.withConfig({
33524
+ var Container$y = /*#__PURE__*/styled.div.withConfig({
33304
33525
  displayName: "Truncate__Container",
33305
33526
  componentId: "sc-6x00qb-0"
33306
33527
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
@@ -33408,7 +33629,7 @@ var TutorialStepper = /*#__PURE__*/React.memo(function (_ref) {
33408
33629
  };
33409
33630
  });
33410
33631
  }, [lessons, imageStyle]);
33411
- return React.createElement(Container$y, null, React.createElement(Stepper, {
33632
+ return React.createElement(Container$z, null, React.createElement(Stepper, {
33412
33633
  steps: generateLessons,
33413
33634
  finalCTAButton: {
33414
33635
  label: 'Close',
@@ -33425,7 +33646,7 @@ var LessonBody = /*#__PURE__*/styled.div.withConfig({
33425
33646
  displayName: "TutorialStepper__LessonBody",
33426
33647
  componentId: "sc-7tgzv2-1"
33427
33648
  })([""]);
33428
- var Container$y = /*#__PURE__*/styled.div.withConfig({
33649
+ var Container$z = /*#__PURE__*/styled.div.withConfig({
33429
33650
  displayName: "TutorialStepper__Container",
33430
33651
  componentId: "sc-7tgzv2-2"
33431
33652
  })(["width:80%;max-width:600px;@media (max-width:600px){width:95%;}"]);
@@ -33446,5 +33667,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
33446
33667
  componentId: "sc-7tgzv2-6"
33447
33668
  })(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
33448
33669
 
33449
- export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
33670
+ export { ActionButtons, AsyncDropdown, Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, ChatRevamp, CheckButton, CheckItem, CircularController, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, EquipmentSlotSpriteByType, ErrorBoundary, FriendList, HistoryDialog, ImageCarousel, ImgSide, Input, InputRadio$1 as InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, Leaderboard, ListMenu, Marketplace, MarketplaceRows, MultitabType, NPCDialog, NPCDialogType, NPCMultiDialog, PartyCreate, PartyDashboard, PartyInvite, PartyManager, PartyManagerRow, PartyRow, PlayersRow, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, Shortcuts, SimpleImageCarousel, SkillProgressBar, SkillsContainer, Spellbook, SpriteFromAtlas, Stepper, TabBody, Table, TableCell, TableHeader, TableRow, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, UserActionLink, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
33450
33671
  //# sourceMappingURL=long-bow.esm.js.map