@rpg-engine/long-bow 0.6.66 → 0.6.69

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.
@@ -28781,6 +28781,27 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
28781
28781
  componentId: "sc-1wuddg2-1"
28782
28782
  })(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
28783
28783
 
28784
+ var Table = /*#__PURE__*/styled.table.withConfig({
28785
+ displayName: "Table",
28786
+ componentId: "sc-1c24pcj-0"
28787
+ })(["width:100%;border-collapse:collapse;margin-top:1rem;"]);
28788
+ var TableRow = /*#__PURE__*/styled.tr.withConfig({
28789
+ displayName: "Table__TableRow",
28790
+ componentId: "sc-1c24pcj-1"
28791
+ })(["&:nth-child(even){background-color:rgba(255,255,255,0.05) !important;}"]);
28792
+ var TableHeader = /*#__PURE__*/styled.th.withConfig({
28793
+ displayName: "Table__TableHeader",
28794
+ componentId: "sc-1c24pcj-2"
28795
+ })(["text-align:left;padding:0.5rem;color:", " !important;border-bottom:1px solid ", ";"], uiColors.yellow, uiColors.lightGray);
28796
+ var TableCell = /*#__PURE__*/styled.td.withConfig({
28797
+ displayName: "Table__TableCell",
28798
+ componentId: "sc-1c24pcj-3"
28799
+ })(["padding:0.5rem;color:", ";border-bottom:1px solid ", ";"], uiColors.white, uiColors.lightGray);
28800
+ var ActionButtons = /*#__PURE__*/styled.div.withConfig({
28801
+ displayName: "Table__ActionButtons",
28802
+ componentId: "sc-1c24pcj-4"
28803
+ })(["display:flex;gap:10px;align-items:center;"]);
28804
+
28784
28805
  var SearchFriend = function SearchFriend(props) {
28785
28806
  var searchedCharacters = props.searchedCharacters,
28786
28807
  friendRequests = props.friendRequests,
@@ -28871,32 +28892,31 @@ var AcceptRejectButtonContainer = /*#__PURE__*/styled.div.withConfig({
28871
28892
  componentId: "sc-1lt1ols-5"
28872
28893
  })(["display:flex;justify-content:space-between;gap:0.5rem;"]);
28873
28894
 
28874
- var FriendList = function FriendList(props) {
28895
+ var FriendList = function FriendList(_ref) {
28896
+ var friends = _ref.friends,
28897
+ friendRequests = _ref.friendRequests,
28898
+ searchedCharacters = _ref.searchedCharacters,
28899
+ onFocus = _ref.onFocus,
28900
+ onBlur = _ref.onBlur,
28901
+ onSearch = _ref.onSearch,
28902
+ onAcceptRequest = _ref.onAcceptRequest,
28903
+ onSendFriendRequest = _ref.onSendFriendRequest,
28904
+ onRemoveFriend = _ref.onRemoveFriend,
28905
+ onOpenPrivateMessage = _ref.onOpenPrivateMessage,
28906
+ onRejectRequest = _ref.onRejectRequest,
28907
+ onAddFriend = _ref.onAddFriend,
28908
+ onBackFriendList = _ref.onBackFriendList;
28875
28909
  var _useState = useState(false),
28876
28910
  isAddFriendUI = _useState[0],
28877
28911
  setIsAddFriendUI = _useState[1];
28878
- var scale = props.scale,
28879
- friends = props.friends,
28880
- friendRequests = props.friendRequests,
28881
- searchedCharacters = props.searchedCharacters,
28882
- onBlur = props.onBlur,
28883
- onFocus = props.onFocus,
28884
- onClose = props.onClose,
28885
- onSearch = props.onSearch,
28886
- onAcceptRequest = props.onAcceptRequest,
28887
- onSendFriendRequest = props.onSendFriendRequest,
28888
- onRemoveFriend = props.onRemoveFriend,
28889
- onOpenPrivateMessage = props.onOpenPrivateMessage,
28890
- onRejectRequest = props.onRejectRequest;
28891
- return React.createElement(DraggableContainer, {
28892
- type: RPGUIContainerTypes.Framed,
28893
- onCloseButton: function onCloseButton() {
28894
- if (onClose) onClose();
28895
- },
28896
- width: "800px",
28897
- cancelDrag: "#FriendListContainer, .rpgui-dropdown-imp, input, .empty-slot, button",
28898
- scale: scale
28899
- }, isAddFriendUI ? React.createElement(SearchFriend, {
28912
+ useEffect(function () {
28913
+ if (isAddFriendUI) {
28914
+ onAddFriend == null ? void 0 : onAddFriend();
28915
+ } else {
28916
+ onBackFriendList == null ? void 0 : onBackFriendList();
28917
+ }
28918
+ }, [isAddFriendUI]);
28919
+ return React.createElement(ListWrapper, null, isAddFriendUI ? React.createElement(SearchFriend, {
28900
28920
  searchedCharacters: searchedCharacters,
28901
28921
  onSendFriendRequest: onSendFriendRequest,
28902
28922
  onAcceptRequest: onAcceptRequest,
@@ -28905,58 +28925,58 @@ var FriendList = function FriendList(props) {
28905
28925
  onSearch: onSearch,
28906
28926
  onBlur: onBlur,
28907
28927
  onFocus: onFocus
28908
- }) : React.createElement(ListContainer$2, null, React.createElement(FriendsTitle, null, "Friends"), friends.map(function (friend) {
28909
- return React.createElement(ListElement$4, {
28928
+ }) : React.createElement(React.Fragment, null, React.createElement(ScrollableArea, null, React.createElement(Table, null, React.createElement("thead", null, React.createElement(TableRow, null, React.createElement(TableHeader, null, "Online"), React.createElement(TableHeader, null, "Name"), React.createElement(TableHeader, null, "Actions"))), React.createElement("tbody", null, friends.map(function (friend) {
28929
+ return React.createElement(TableRow, {
28910
28930
  key: friend._id
28911
- }, React.createElement("div", null, React.createElement(IsOnlineBadge, {
28931
+ }, React.createElement(TableCell, null, React.createElement(IsOnlineBadge, {
28912
28932
  "$isOnline": friend.isOnline
28913
- }), friend.name), React.createElement(MessageAndDeleteContainer, null, React.createElement(Button, {
28914
- buttonType: ButtonTypes.RPGUIButton,
28915
- onPointerDown: function onPointerDown() {
28933
+ })), React.createElement(TableCell, null, friend.name), React.createElement(TableCell, null, React.createElement(ActionButtons, null, React.createElement(UserAction, {
28934
+ color: uiColors.yellow,
28935
+ onClick: function onClick() {
28916
28936
  return onOpenPrivateMessage(friend);
28917
28937
  }
28918
- }, "Message"), React.createElement(Button, {
28919
- buttonType: ButtonTypes.RPGUIButton,
28920
- onPointerDown: function onPointerDown() {
28938
+ }, "Chat"), React.createElement(UserAction, {
28939
+ color: uiColors.red,
28940
+ onClick: function onClick() {
28921
28941
  return onRemoveFriend(friend);
28922
28942
  }
28923
- }, "Remove")));
28924
- })), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
28943
+ }, "Remove"))));
28944
+ }))))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
28925
28945
  buttonType: ButtonTypes.RPGUIButton,
28926
28946
  onClick: function onClick() {
28927
- return setIsAddFriendUI(function (t) {
28928
- return !t;
28947
+ return setIsAddFriendUI(function (prev) {
28948
+ return !prev;
28929
28949
  });
28930
28950
  }
28931
28951
  }, isAddFriendUI ? 'Back' : 'Add New Friend')));
28932
28952
  };
28933
- var FriendsTitle = /*#__PURE__*/styled.h2.withConfig({
28934
- displayName: "FriendList__FriendsTitle",
28953
+ // Styled components for FriendList UI
28954
+ var ListWrapper = /*#__PURE__*/styled.div.withConfig({
28955
+ displayName: "FriendList__ListWrapper",
28935
28956
  componentId: "sc-3jf9vt-0"
28936
- })(["font-size:", ";margin:0;padding:0;text-align:center;"], uiFonts.size.medium);
28937
- var ListContainer$2 = /*#__PURE__*/styled.ul.withConfig({
28938
- displayName: "FriendList__ListContainer",
28957
+ })(["margin-top:1rem;max-height:350px;display:flex;flex-direction:column;"]);
28958
+ var ScrollableArea = /*#__PURE__*/styled.div.withConfig({
28959
+ displayName: "FriendList__ScrollableArea",
28939
28960
  componentId: "sc-3jf9vt-1"
28940
- })(["border:none;overflow-y:scroll;list-style:none;padding:0;width:100%;height:50vh;@media (max-width:768px){max-height:90wh;}"]);
28941
- var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
28942
- displayName: "FriendList__ListElement",
28943
- componentId: "sc-3jf9vt-2"
28944
- })(["margin:0.5rem 0 !important;font-size:", ";padding:0.5rem 4px;display:flex;align-items:center;justify-content:space-between;border-radius:4px;& div{display:flex;align-items:center;}"], uiFonts.size.small);
28961
+ })(["overflow-y:auto;max-height:300px;"]);
28945
28962
  var IsOnlineBadge = /*#__PURE__*/styled.div.withConfig({
28946
28963
  displayName: "FriendList__IsOnlineBadge",
28947
- componentId: "sc-3jf9vt-3"
28948
- })(["width:10px;height:10px;border-radius:50%;background-color:", ";margin-right:1rem;"], function (_ref) {
28949
- var $isOnline = _ref.$isOnline;
28964
+ componentId: "sc-3jf9vt-2"
28965
+ })(["width:10px;height:10px;border-radius:50%;background-color:", ";margin-right:1rem;"], function (_ref2) {
28966
+ var $isOnline = _ref2.$isOnline;
28950
28967
  return $isOnline ? uiColors.lightGreen : uiColors.red;
28951
28968
  });
28952
28969
  var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
28953
28970
  displayName: "FriendList__ButtonContainer",
28954
- componentId: "sc-3jf9vt-4"
28971
+ componentId: "sc-3jf9vt-3"
28955
28972
  })(["display:flex;justify-content:center;align-items:center;width:100%;margin-top:1rem;"]);
28956
- var MessageAndDeleteContainer = /*#__PURE__*/styled.div.withConfig({
28957
- displayName: "FriendList__MessageAndDeleteContainer",
28958
- componentId: "sc-3jf9vt-5"
28959
- })(["display:flex;justify-content:space-between;gap:0.5rem;"]);
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
+ });
28960
28980
 
28961
28981
  var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
28962
28982
 
@@ -30472,7 +30492,7 @@ var ListMenu = function ListMenu(_ref) {
30472
30492
  overflow: 'hidden'
30473
30493
  }
30474
30494
  }, options.map(function (params, index) {
30475
- return React.createElement(ListElement$5, {
30495
+ return React.createElement(ListElement$4, {
30476
30496
  key: (params == null ? void 0 : params.id) || index,
30477
30497
  onPointerDown: function onPointerDown() {
30478
30498
  onSelected(params == null ? void 0 : params.id);
@@ -30488,7 +30508,7 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
30488
30508
  }, function (props) {
30489
30509
  return props.x || 0;
30490
30510
  }, uiFonts.size.xsmall);
30491
- var ListElement$5 = /*#__PURE__*/styled.li.withConfig({
30511
+ var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
30492
30512
  displayName: "ListMenu__ListElement",
30493
30513
  componentId: "sc-i9097t-1"
30494
30514
  })(["margin-right:0.5rem;"]);
@@ -33426,5 +33446,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
33426
33446
  componentId: "sc-7tgzv2-6"
33427
33447
  })(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
33428
33448
 
33429
- export { 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, TableTab, TabsContainer, TextArea, TimeWidget, TradingMenu, Truncate, TutorialStepper, _RPGUI, getMockedPlayersRowsLeader, getMockedPlayersRowsNotLeader, mockedPartyManager, mockedPartyRows, mockedPlayersRows, mockedPlayersRows2, useEventListener };
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 };
33430
33450
  //# sourceMappingURL=long-bow.esm.js.map