@rpg-engine/long-bow 0.6.66 → 0.6.68

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,22 @@ 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;
28875
28907
  var _useState = useState(false),
28876
28908
  isAddFriendUI = _useState[0],
28877
28909
  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, {
28910
+ return React.createElement(ListWrapper, null, isAddFriendUI ? React.createElement(SearchFriend, {
28900
28911
  searchedCharacters: searchedCharacters,
28901
28912
  onSendFriendRequest: onSendFriendRequest,
28902
28913
  onAcceptRequest: onAcceptRequest,
@@ -28905,58 +28916,58 @@ var FriendList = function FriendList(props) {
28905
28916
  onSearch: onSearch,
28906
28917
  onBlur: onBlur,
28907
28918
  onFocus: onFocus
28908
- }) : React.createElement(ListContainer$2, null, React.createElement(FriendsTitle, null, "Friends"), friends.map(function (friend) {
28909
- return React.createElement(ListElement$4, {
28919
+ }) : 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) {
28920
+ return React.createElement(TableRow, {
28910
28921
  key: friend._id
28911
- }, React.createElement("div", null, React.createElement(IsOnlineBadge, {
28922
+ }, React.createElement(TableCell, null, React.createElement(IsOnlineBadge, {
28912
28923
  "$isOnline": friend.isOnline
28913
- }), friend.name), React.createElement(MessageAndDeleteContainer, null, React.createElement(Button, {
28914
- buttonType: ButtonTypes.RPGUIButton,
28915
- onPointerDown: function onPointerDown() {
28924
+ })), React.createElement(TableCell, null, friend.name), React.createElement(TableCell, null, React.createElement(ActionButtons, null, React.createElement(UserAction, {
28925
+ color: uiColors.yellow,
28926
+ onClick: function onClick() {
28916
28927
  return onOpenPrivateMessage(friend);
28917
28928
  }
28918
- }, "Message"), React.createElement(Button, {
28919
- buttonType: ButtonTypes.RPGUIButton,
28920
- onPointerDown: function onPointerDown() {
28929
+ }, "Chat"), React.createElement(UserAction, {
28930
+ color: uiColors.red,
28931
+ onClick: function onClick() {
28921
28932
  return onRemoveFriend(friend);
28922
28933
  }
28923
- }, "Remove")));
28924
- })), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
28934
+ }, "Remove"))));
28935
+ }))))), React.createElement(ButtonContainer$1, null, React.createElement(Button, {
28925
28936
  buttonType: ButtonTypes.RPGUIButton,
28926
28937
  onClick: function onClick() {
28927
- return setIsAddFriendUI(function (t) {
28928
- return !t;
28938
+ return setIsAddFriendUI(function (prev) {
28939
+ return !prev;
28929
28940
  });
28930
28941
  }
28931
28942
  }, isAddFriendUI ? 'Back' : 'Add New Friend')));
28932
28943
  };
28933
- var FriendsTitle = /*#__PURE__*/styled.h2.withConfig({
28934
- displayName: "FriendList__FriendsTitle",
28944
+ // Styled components for FriendList UI
28945
+ var ListWrapper = /*#__PURE__*/styled.div.withConfig({
28946
+ displayName: "FriendList__ListWrapper",
28935
28947
  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",
28948
+ })(["margin-top:1rem;max-height:350px;display:flex;flex-direction:column;"]);
28949
+ var ScrollableArea = /*#__PURE__*/styled.div.withConfig({
28950
+ displayName: "FriendList__ScrollableArea",
28939
28951
  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);
28952
+ })(["overflow-y:auto;max-height:300px;"]);
28945
28953
  var IsOnlineBadge = /*#__PURE__*/styled.div.withConfig({
28946
28954
  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;
28955
+ componentId: "sc-3jf9vt-2"
28956
+ })(["width:10px;height:10px;border-radius:50%;background-color:", ";margin-right:1rem;"], function (_ref2) {
28957
+ var $isOnline = _ref2.$isOnline;
28950
28958
  return $isOnline ? uiColors.lightGreen : uiColors.red;
28951
28959
  });
28952
28960
  var ButtonContainer$1 = /*#__PURE__*/styled.div.withConfig({
28953
28961
  displayName: "FriendList__ButtonContainer",
28954
- componentId: "sc-3jf9vt-4"
28962
+ componentId: "sc-3jf9vt-3"
28955
28963
  })(["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;"]);
28964
+ var UserAction = /*#__PURE__*/styled.span.withConfig({
28965
+ displayName: "FriendList__UserAction",
28966
+ componentId: "sc-3jf9vt-4"
28967
+ })(["color:", " !important;cursor:pointer;margin-right:0.5rem;&:hover{text-decoration:underline;}"], function (_ref3) {
28968
+ var color = _ref3.color;
28969
+ return color;
28970
+ });
28960
28971
 
28961
28972
  var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
28962
28973
 
@@ -30472,7 +30483,7 @@ var ListMenu = function ListMenu(_ref) {
30472
30483
  overflow: 'hidden'
30473
30484
  }
30474
30485
  }, options.map(function (params, index) {
30475
- return React.createElement(ListElement$5, {
30486
+ return React.createElement(ListElement$4, {
30476
30487
  key: (params == null ? void 0 : params.id) || index,
30477
30488
  onPointerDown: function onPointerDown() {
30478
30489
  onSelected(params == null ? void 0 : params.id);
@@ -30488,7 +30499,7 @@ var Container$l = /*#__PURE__*/styled.div.withConfig({
30488
30499
  }, function (props) {
30489
30500
  return props.x || 0;
30490
30501
  }, uiFonts.size.xsmall);
30491
- var ListElement$5 = /*#__PURE__*/styled.li.withConfig({
30502
+ var ListElement$4 = /*#__PURE__*/styled.li.withConfig({
30492
30503
  displayName: "ListMenu__ListElement",
30493
30504
  componentId: "sc-i9097t-1"
30494
30505
  })(["margin-right:0.5rem;"]);
@@ -33426,5 +33437,5 @@ var LessonContainer = /*#__PURE__*/styled.div.withConfig({
33426
33437
  componentId: "sc-7tgzv2-6"
33427
33438
  })(["display:flex;flex-direction:column;justify-content:space-between;min-height:200px;p{font-size:0.7rem !important;}"]);
33428
33439
 
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 };
33440
+ 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
33441
  //# sourceMappingURL=long-bow.esm.js.map