@rpg-engine/long-bow 0.5.41 → 0.5.43

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.
@@ -1,10 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { ICharacter, IChatMessage, IPrivateChatMessage } from '@rpg-engine/shared';
3
3
  import { IStyles } from '../Chat/Chat';
4
- export interface ITabStyles {
5
- width?: string;
6
- height?: string;
7
- }
8
4
  export declare type PrivateChatCharacter = Pick<ICharacter, '_id' | 'name'>;
9
5
  export interface IChatRevampProps {
10
6
  chatMessages: IChatMessage[] | IPrivateChatMessage[];
@@ -12,7 +8,6 @@ export interface IChatRevampProps {
12
8
  onCloseButton: () => void;
13
9
  onFocus?: () => void;
14
10
  onBlur?: () => void;
15
- opacity?: number;
16
11
  styles?: IStyles;
17
12
  tabs: {
18
13
  label: string;
@@ -24,5 +19,10 @@ export interface IChatRevampProps {
24
19
  onChangeCharacterName: (characterName: string) => void;
25
20
  onCharacterClick?: (character: PrivateChatCharacter) => void;
26
21
  onSendPrivateChatMessage: (message: string) => void;
22
+ recentChatCharacters?: PrivateChatCharacter[];
23
+ recentSelectedChatCharacterId?: string;
24
+ onPreviousChatCharacterClick?: (character: PrivateChatCharacter) => void;
25
+ onRemoveRecentChatCharacter?: (character: PrivateChatCharacter) => void;
26
+ unseenMessageCharacterIds?: string[];
27
27
  }
28
- export declare const ChatRevamp: ({ chatMessages, onSendGlobalChatMessage, onChangeCharacterName, onFocus, onBlur, onCloseButton, styles, tabs, onChangeTab, activeTab, privateChatCharacters, onCharacterClick, onSendPrivateChatMessage, }: IChatRevampProps) => JSX.Element;
28
+ export declare const ChatRevamp: ({ chatMessages, onSendGlobalChatMessage, onChangeCharacterName, onFocus, onBlur, onCloseButton, styles, tabs, onChangeTab, activeTab, privateChatCharacters, onCharacterClick, onSendPrivateChatMessage, recentChatCharacters, recentSelectedChatCharacterId, onPreviousChatCharacterClick, onRemoveRecentChatCharacter, unseenMessageCharacterIds, }: IChatRevampProps) => JSX.Element;
@@ -12608,11 +12608,8 @@ var Chat = function Chat(_ref) {
12608
12608
  var ChatContainer = /*#__PURE__*/styled.div.withConfig({
12609
12609
  displayName: "Chat__ChatContainer",
12610
12610
  componentId: "sc-1bk05n6-0"
12611
- })(["height:", ";width:", ";padding:10px;background-color:rgba(0,0,0,0.2);height:auto;"], function (props) {
12611
+ })(["height:", " !important;width:100%;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;"], function (props) {
12612
12612
  return props.height;
12613
- }, function (_ref2) {
12614
- var width = _ref2.width;
12615
- return width;
12616
12613
  });
12617
12614
  var TextField = /*#__PURE__*/styled.input.withConfig({
12618
12615
  displayName: "Chat__TextField",
@@ -12621,12 +12618,12 @@ var TextField = /*#__PURE__*/styled.input.withConfig({
12621
12618
  var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
12622
12619
  displayName: "Chat__MessagesContainer",
12623
12620
  componentId: "sc-1bk05n6-2"
12624
- })(["height:70%;margin-bottom:10px;.chat-body{max-height:auto;overflow-y:auto;}"]);
12621
+ })(["height:70%;margin-bottom:10px;overflow-y:auto;"]);
12625
12622
  var Message = /*#__PURE__*/styled.div.withConfig({
12626
12623
  displayName: "Chat__Message",
12627
12624
  componentId: "sc-1bk05n6-3"
12628
- })(["margin-bottom:8px;color:", ";"], function (_ref3) {
12629
- var color = _ref3.color;
12625
+ })(["margin-bottom:8px;color:", ";"], function (_ref2) {
12626
+ var color = _ref2.color;
12630
12627
  return color;
12631
12628
  });
12632
12629
  var Form = /*#__PURE__*/styled.form.withConfig({
@@ -12636,11 +12633,11 @@ var Form = /*#__PURE__*/styled.form.withConfig({
12636
12633
  var Button$1 = /*#__PURE__*/styled.button.withConfig({
12637
12634
  displayName: "Chat__Button",
12638
12635
  componentId: "sc-1bk05n6-5"
12639
- })(["color:", ";background-color:", ";width:28px;height:28px;border:none !important;"], function (_ref4) {
12640
- var buttonColor = _ref4.buttonColor;
12636
+ })(["color:", ";background-color:", ";width:28px;height:28px;border:none !important;"], function (_ref3) {
12637
+ var buttonColor = _ref3.buttonColor;
12641
12638
  return buttonColor;
12642
- }, function (_ref5) {
12643
- var buttonBackgroundColor = _ref5.buttonBackgroundColor;
12639
+ }, function (_ref4) {
12640
+ var buttonBackgroundColor = _ref4.buttonBackgroundColor;
12644
12641
  return buttonBackgroundColor;
12645
12642
  });
12646
12643
 
@@ -12695,31 +12692,30 @@ var SearchCharacter = function SearchCharacter(_ref) {
12695
12692
  onCharacterClick(character);
12696
12693
  setShowSearchCharacter(false);
12697
12694
  };
12698
- return React__default.createElement(SearchCharacterContainer, {
12699
- width: (styles == null ? void 0 : styles.width) || '80%',
12700
- height: (styles == null ? void 0 : styles.height) || 'auto'
12701
- }, React__default.createElement(Form$1, {
12695
+ return React__default.createElement(SearchContainer, null, React__default.createElement(Form$1, {
12702
12696
  onSubmit: handleSubmit
12703
12697
  }, React__default.createElement(Column, {
12704
12698
  flex: 70
12705
12699
  }, React__default.createElement(TextField$1, {
12706
12700
  value: characterName,
12707
- id: "inputCharacterName",
12701
+ id: "characterName",
12702
+ name: 'characterName',
12708
12703
  onChange: function onChange(e) {
12709
12704
  setCharacterName(e.target.value);
12710
12705
  onChangeCharacterName(e.target.value);
12711
12706
  },
12707
+ placeholder: 'Search for a character...',
12712
12708
  height: 20,
12713
12709
  type: "text",
12714
12710
  autoComplete: "off",
12715
12711
  onFocus: onFocus,
12716
12712
  onBlur: onBlur,
12717
12713
  onPointerDown: onFocus,
12718
- autoFocus: true,
12719
- placeholder: "Type a character name..."
12714
+ autoFocus: true
12720
12715
  })), React__default.createElement(Column, {
12721
12716
  justifyContent: "flex-end"
12722
12717
  }, React__default.createElement(SearchButton, {
12718
+ type: 'submit',
12723
12719
  buttonColor: (styles == null ? void 0 : styles.buttonColor) || '#005b96',
12724
12720
  buttonBackgroundColor: (styles == null ? void 0 : styles.buttonBackgroundColor) || 'rgba(0,0,0,.5)',
12725
12721
  id: "chat-send-button",
@@ -12737,15 +12733,10 @@ var SearchCharacter = function SearchCharacter(_ref) {
12737
12733
  }, character.name);
12738
12734
  })));
12739
12735
  };
12740
- var SearchCharacterContainer = /*#__PURE__*/styled.div.withConfig({
12741
- displayName: "SearchCharacter__SearchCharacterContainer",
12736
+ var SearchContainer = /*#__PURE__*/styled.div.withConfig({
12737
+ displayName: "SearchCharacter__SearchContainer",
12742
12738
  componentId: "sc-172lyfr-0"
12743
- })(["height:", ";width:", ";padding:10px;background-color:rgba(0,0,0,0.2);height:auto;"], function (props) {
12744
- return props.height;
12745
- }, function (_ref2) {
12746
- var width = _ref2.width;
12747
- return width;
12748
- });
12739
+ })(["width:100%;"]);
12749
12740
  var Form$1 = /*#__PURE__*/styled.form.withConfig({
12750
12741
  displayName: "SearchCharacter__Form",
12751
12742
  componentId: "sc-172lyfr-1"
@@ -12757,11 +12748,11 @@ var TextField$1 = /*#__PURE__*/styled.input.withConfig({
12757
12748
  var SearchButton = /*#__PURE__*/styled.button.withConfig({
12758
12749
  displayName: "SearchCharacter__SearchButton",
12759
12750
  componentId: "sc-172lyfr-3"
12760
- })(["color:", ";background-color:", ";width:28px;height:28px;border:none !important;"], function (_ref3) {
12761
- var buttonColor = _ref3.buttonColor;
12751
+ })(["color:", ";background-color:", ";width:28px;height:28px;border:none !important;"], function (_ref2) {
12752
+ var buttonColor = _ref2.buttonColor;
12762
12753
  return buttonColor;
12763
- }, function (_ref4) {
12764
- var buttonBackgroundColor = _ref4.buttonBackgroundColor;
12754
+ }, function (_ref3) {
12755
+ var buttonBackgroundColor = _ref3.buttonBackgroundColor;
12765
12756
  return buttonBackgroundColor;
12766
12757
  });
12767
12758
  var ListContainer = /*#__PURE__*/styled.ul.withConfig({
@@ -12771,7 +12762,7 @@ var ListContainer = /*#__PURE__*/styled.ul.withConfig({
12771
12762
  var ListElement = /*#__PURE__*/styled.li.withConfig({
12772
12763
  displayName: "SearchCharacter__ListElement",
12773
12764
  componentId: "sc-172lyfr-5"
12774
- })(["margin:0.5rem 0 !important;font-size:", ";&:hover{color:#ff0;background-color:", ";}button{all:unset;}"], uiFonts.size.small, uiColors.darkGray);
12765
+ })(["margin:0.5rem 0 !important;font-size:", ";padding:0.5rem 2px;&:hover{color:#ff0;background-color:", ";}button{all:unset;}"], uiFonts.size.small, uiColors.darkGray);
12775
12766
 
12776
12767
  var ChatRevamp = function ChatRevamp(_ref) {
12777
12768
  var chatMessages = _ref.chatMessages,
@@ -12786,14 +12777,29 @@ var ChatRevamp = function ChatRevamp(_ref) {
12786
12777
  activeTab = _ref.activeTab,
12787
12778
  privateChatCharacters = _ref.privateChatCharacters,
12788
12779
  onCharacterClick = _ref.onCharacterClick,
12789
- onSendPrivateChatMessage = _ref.onSendPrivateChatMessage;
12780
+ onSendPrivateChatMessage = _ref.onSendPrivateChatMessage,
12781
+ recentChatCharacters = _ref.recentChatCharacters,
12782
+ _ref$recentSelectedCh = _ref.recentSelectedChatCharacterId,
12783
+ recentSelectedChatCharacterId = _ref$recentSelectedCh === void 0 ? '' : _ref$recentSelectedCh,
12784
+ onPreviousChatCharacterClick = _ref.onPreviousChatCharacterClick,
12785
+ onRemoveRecentChatCharacter = _ref.onRemoveRecentChatCharacter,
12786
+ _ref$unseenMessageCha = _ref.unseenMessageCharacterIds,
12787
+ unseenMessageCharacterIds = _ref$unseenMessageCha === void 0 ? [] : _ref$unseenMessageCha;
12790
12788
  var _useState = React.useState(true),
12791
- showSearchCharacter = _useState[0],
12792
- setShowSearchCharacter = _useState[1];
12789
+ showSearchCharacterUI = _useState[0],
12790
+ setShowSearchCharacterUI = _useState[1];
12791
+ var _useState2 = React.useState(false),
12792
+ showRecentChats = _useState2[0],
12793
+ setShowRecentChats = _useState2[1];
12793
12794
  React.useEffect(function () {
12794
- setShowSearchCharacter(true);
12795
+ setShowSearchCharacterUI(true);
12795
12796
  }, [activeTab]);
12796
12797
  var isPrivate = activeTab === 'private';
12798
+ var handlePreviousChatCharacterClick = function handlePreviousChatCharacterClick(character) {
12799
+ if (!onPreviousChatCharacterClick) return;
12800
+ onPreviousChatCharacterClick(character);
12801
+ setShowSearchCharacterUI(false);
12802
+ };
12797
12803
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(TabContainer, null, tabs.map(function (tab, index) {
12798
12804
  return React__default.createElement(Tab, {
12799
12805
  key: tab.label + "_" + index,
@@ -12802,13 +12808,54 @@ var ChatRevamp = function ChatRevamp(_ref) {
12802
12808
  return onChangeTab(tab.id);
12803
12809
  }
12804
12810
  }, tab.label);
12805
- })), isPrivate && showSearchCharacter ? React__default.createElement(SearchCharacter, {
12811
+ })), React__default.createElement(PrivateChatContainer, {
12812
+ width: (styles == null ? void 0 : styles.width) || '80%',
12813
+ height: (styles == null ? void 0 : styles.height) || 'auto'
12814
+ }, React__default.createElement(RecentChatTabContainer, {
12815
+ isPrivate: isPrivate,
12816
+ isOpen: showRecentChats
12817
+ }, React__default.createElement(RecentChatTopBar, {
12818
+ isOpen: showRecentChats
12819
+ }, React__default.createElement(BurgerIconContainer, {
12820
+ onPointerDown: function onPointerDown() {
12821
+ return setShowRecentChats(function (t) {
12822
+ return !t;
12823
+ });
12824
+ },
12825
+ hasUnseenMessages: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.length) > 0 ? true : false
12826
+ }, React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null)), showRecentChats && React__default.createElement(SearchButton$1, {
12827
+ onPointerDown: function onPointerDown() {
12828
+ return setShowSearchCharacterUI(true);
12829
+ }
12830
+ }, React__default.createElement(rx.RxMagnifyingGlass, {
12831
+ size: 16,
12832
+ color: uiColors.white
12833
+ }))), React__default.createElement(RecentChatLogContainer, {
12834
+ isOpen: showRecentChats
12835
+ }, recentChatCharacters == null ? void 0 : recentChatCharacters.map(function (character) {
12836
+ return React__default.createElement(ListElementContainer, {
12837
+ key: character._id
12838
+ }, React__default.createElement(ListElement$1, {
12839
+ active: character._id === recentSelectedChatCharacterId,
12840
+ onPointerDown: function onPointerDown() {
12841
+ return handlePreviousChatCharacterClick(character);
12842
+ }
12843
+ }, React__default.createElement(StatusDot, {
12844
+ isUnseen: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.includes(character._id)) || false
12845
+ }), character.name), React__default.createElement(CloseButton, {
12846
+ onPointerDown: function onPointerDown() {
12847
+ return onRemoveRecentChatCharacter == null ? void 0 : onRemoveRecentChatCharacter(character);
12848
+ }
12849
+ }, React__default.createElement(rx.RxCross2, {
12850
+ size: 16
12851
+ })));
12852
+ }))), isPrivate && showSearchCharacterUI ? React__default.createElement(SearchCharacter, {
12806
12853
  onFocus: onFocus,
12807
12854
  onBlur: onBlur,
12808
12855
  onChangeCharacterName: onChangeCharacterName,
12809
12856
  styles: styles,
12810
12857
  recentCharacters: privateChatCharacters,
12811
- setShowSearchCharacter: setShowSearchCharacter,
12858
+ setShowSearchCharacter: setShowSearchCharacterUI,
12812
12859
  onCharacterClick: onCharacterClick
12813
12860
  }) : React__default.createElement(Chat, {
12814
12861
  chatMessages: chatMessages,
@@ -12818,7 +12865,7 @@ var ChatRevamp = function ChatRevamp(_ref) {
12818
12865
  styles: styles,
12819
12866
  onFocus: onFocus,
12820
12867
  onBlur: onBlur
12821
- }));
12868
+ })));
12822
12869
  };
12823
12870
  var TabContainer = /*#__PURE__*/styled.div.withConfig({
12824
12871
  displayName: "ChatRevamp__TabContainer",
@@ -12834,6 +12881,70 @@ var Tab = /*#__PURE__*/styled.button.withConfig({
12834
12881
  }, function (props) {
12835
12882
  return props.active ? 'white' : uiColors.raisinBlack;
12836
12883
  });
12884
+ var PrivateChatContainer = /*#__PURE__*/styled.div.withConfig({
12885
+ displayName: "ChatRevamp__PrivateChatContainer",
12886
+ componentId: "sc-1sdiknw-2"
12887
+ })(["width:", ";min-height:", " !important;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;display:flex;gap:10px;"], function (_ref2) {
12888
+ var width = _ref2.width;
12889
+ return width;
12890
+ }, function (_ref3) {
12891
+ var height = _ref3.height;
12892
+ return height;
12893
+ });
12894
+ var RecentChatTabContainer = /*#__PURE__*/styled.div.withConfig({
12895
+ displayName: "ChatRevamp__RecentChatTabContainer",
12896
+ componentId: "sc-1sdiknw-3"
12897
+ })(["display:", ";flex-direction:column;border-right:1px solid ", ";outline:none;width:", " !important;transition:width 0.3s ease-in-out;overflow:hidden;@media (max-width:768px){width:", " !important;}"], function (props) {
12898
+ return props.isPrivate ? 'flex' : 'none';
12899
+ }, uiColors.gray, function (props) {
12900
+ return props.isOpen ? '20%' : '30px';
12901
+ }, function (props) {
12902
+ return props.isOpen ? '40%' : '30px';
12903
+ });
12904
+ var RecentChatTopBar = /*#__PURE__*/styled.div.withConfig({
12905
+ displayName: "ChatRevamp__RecentChatTopBar",
12906
+ componentId: "sc-1sdiknw-4"
12907
+ })(["display:flex;align-items:center;justify-content:space-between;height:30px;"]);
12908
+ var SearchButton$1 = /*#__PURE__*/styled.button.withConfig({
12909
+ displayName: "ChatRevamp__SearchButton",
12910
+ componentId: "sc-1sdiknw-5"
12911
+ })(["border:none;background-color:transparent;display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:4px;position:relative;"]);
12912
+ var BurgerIconContainer = /*#__PURE__*/styled.button.withConfig({
12913
+ displayName: "ChatRevamp__BurgerIconContainer",
12914
+ componentId: "sc-1sdiknw-6"
12915
+ })(["border:none;background-color:transparent;display:flex;flex-direction:column;align-items:flex-end;padding:4px;gap:2px;position:relative;&:after{content:'';width:6px;height:6px;position:absolute;top:0;right:2px;border-radius:50%;background-color:", ";display:", ";}"], uiColors.lightGreen, function (props) {
12916
+ return props.hasUnseenMessages ? 'block' : 'none';
12917
+ });
12918
+ var BurgerLineIcon = /*#__PURE__*/styled.span.withConfig({
12919
+ displayName: "ChatRevamp__BurgerLineIcon",
12920
+ componentId: "sc-1sdiknw-7"
12921
+ })(["width:1rem;height:2px;background-color:#ffffff;"]);
12922
+ var RecentChatLogContainer = /*#__PURE__*/styled.div.withConfig({
12923
+ displayName: "ChatRevamp__RecentChatLogContainer",
12924
+ componentId: "sc-1sdiknw-8"
12925
+ })(["border:none;list-style:none;display:flex;opacity:", ";flex-direction:column;gap:0.5rem;transition:opacity 0.3s ease-in-out;padding:0;margin:0;flex:1;"], function (props) {
12926
+ return props.isOpen ? 1 : 0;
12927
+ });
12928
+ var ListElementContainer = /*#__PURE__*/styled.div.withConfig({
12929
+ displayName: "ChatRevamp__ListElementContainer",
12930
+ componentId: "sc-1sdiknw-9"
12931
+ })(["display:flex;justify-content:space-between;align-items:center;"]);
12932
+ var ListElement$1 = /*#__PURE__*/styled.button.withConfig({
12933
+ displayName: "ChatRevamp__ListElement",
12934
+ componentId: "sc-1sdiknw-10"
12935
+ })(["margin:0.5rem 0 !important;font-size:", " !important;padding:2px;all:unset;color:", ";width:100%;position:relative;display:flex;align-items:center;gap:4px;&:hover{color:#ff0;}"], uiFonts.size.small, function (props) {
12936
+ return props.active ? uiColors.yellow : uiColors.white;
12937
+ });
12938
+ var StatusDot = /*#__PURE__*/styled.span.withConfig({
12939
+ displayName: "ChatRevamp__StatusDot",
12940
+ componentId: "sc-1sdiknw-11"
12941
+ })(["width:6px;height:6px;border-radius:50%;background-color:", ";display:inline-block;margin-right:6px;"], function (props) {
12942
+ return props.isUnseen ? uiColors.lightGreen : uiColors.gray;
12943
+ });
12944
+ var CloseButton = /*#__PURE__*/styled.button.withConfig({
12945
+ displayName: "ChatRevamp__CloseButton",
12946
+ componentId: "sc-1sdiknw-12"
12947
+ })(["all:unset;font-size:", ";margin:0 0.5rem;transition:all 0.2s ease-in-out;background-color:", ";color:", ";&:hover{background-color:", ";color:", ";}"], uiFonts.size.xxsmall, uiColors.red, uiColors.white, uiColors.white, uiColors.red);
12837
12948
 
12838
12949
  var _excluded$2 = ["innerRef"];
12839
12950
  var Input = function Input(_ref) {
@@ -12930,7 +13041,7 @@ var ChatDeprecated = function ChatDeprecated(_ref) {
12930
13041
  opacity: opacity
12931
13042
  }, React__default.createElement(reactErrorBoundary.ErrorBoundary, {
12932
13043
  fallback: React__default.createElement("p", null, "Oops! Your chat has crashed.")
12933
- }, onCloseButton && React__default.createElement(CloseButton, {
13044
+ }, onCloseButton && React__default.createElement(CloseButton$1, {
12934
13045
  onPointerDown: onCloseButton
12935
13046
  }, "X"), React__default.createElement(RPGUIContainer, {
12936
13047
  type: exports.RPGUIContainerTypes.FramedGrey,
@@ -12964,7 +13075,7 @@ var Container$5 = /*#__PURE__*/styled.div.withConfig({
12964
13075
  displayName: "ChatDeprecated__Container",
12965
13076
  componentId: "sc-fuuod3-0"
12966
13077
  })(["position:relative;"]);
12967
- var CloseButton = /*#__PURE__*/styled.div.withConfig({
13078
+ var CloseButton$1 = /*#__PURE__*/styled.div.withConfig({
12968
13079
  displayName: "ChatDeprecated__CloseButton",
12969
13080
  componentId: "sc-fuuod3-1"
12970
13081
  })(["position:absolute;top:2px;right:0px;color:white;z-index:22;font-size:0.7rem;"]);
@@ -13306,7 +13417,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
13306
13417
  }, React__default.createElement(Title, null, imgSrc && React__default.createElement(Icon, {
13307
13418
  src: imgSrc,
13308
13419
  width: imgWidth
13309
- }), title)), onCloseButton && React__default.createElement(CloseButton$1, {
13420
+ }), title)), onCloseButton && React__default.createElement(CloseButton$2, {
13310
13421
  className: "container-close",
13311
13422
  onPointerDown: onCloseButton
13312
13423
  }, "X"), children));
@@ -13320,7 +13431,7 @@ var Container$6 = /*#__PURE__*/styled.div.withConfig({
13320
13431
  var width = _ref2.width;
13321
13432
  return width;
13322
13433
  });
13323
- var CloseButton$1 = /*#__PURE__*/styled.div.withConfig({
13434
+ var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
13324
13435
  displayName: "DraggableContainer__CloseButton",
13325
13436
  componentId: "sc-184mpyl-1"
13326
13437
  })(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:1.5rem;@media (max-width:950px){font-size:1.7rem;padding:12px;}"]);
@@ -13530,7 +13641,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
13530
13641
  overflow: 'hidden'
13531
13642
  }
13532
13643
  }, options.map(function (params, index) {
13533
- return React__default.createElement(ListElement$1, {
13644
+ return React__default.createElement(ListElement$2, {
13534
13645
  key: (params == null ? void 0 : params.id) || index,
13535
13646
  onPointerDown: function onPointerDown() {
13536
13647
  onSelected(params == null ? void 0 : params.id);
@@ -13548,7 +13659,7 @@ var Container$8 = /*#__PURE__*/styled.div.withConfig({
13548
13659
  }, function (props) {
13549
13660
  return props.fontSize;
13550
13661
  });
13551
- var ListElement$1 = /*#__PURE__*/styled.li.withConfig({
13662
+ var ListElement$2 = /*#__PURE__*/styled.li.withConfig({
13552
13663
  displayName: "RelativeListMenu__ListElement",
13553
13664
  componentId: "sc-7hohf-1"
13554
13665
  })(["margin-right:0.5rem;"]);
@@ -15577,7 +15688,7 @@ var ImageCarousel = function ImageCarousel(_ref) {
15577
15688
  onPointerDown: function onPointerDown() {
15578
15689
  return goToNextImage();
15579
15690
  }
15580
- }))), onCloseButton && React__default.createElement(CloseButton$2, {
15691
+ }))), onCloseButton && React__default.createElement(CloseButton$3, {
15581
15692
  className: "container-close",
15582
15693
  onPointerDown: onCloseButton
15583
15694
  }, "X"));
@@ -15608,7 +15719,7 @@ var Description$1 = /*#__PURE__*/styled.div.withConfig({
15608
15719
  }, function (props) {
15609
15720
  return props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)';
15610
15721
  });
15611
- var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
15722
+ var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
15612
15723
  displayName: "ImageCarousel__CloseButton",
15613
15724
  componentId: "sc-jl6f8-4"
15614
15725
  })(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:1.5rem;@media (max-width:950px){font-size:1.7rem;padding:12px;}"]);
@@ -15892,7 +16003,7 @@ var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
15892
16003
  return React__default.createElement(StyledContainer, {
15893
16004
  type: exports.RPGUIContainerTypes.Framed,
15894
16005
  width: "25rem"
15895
- }, React__default.createElement(CloseButton$3, {
16006
+ }, React__default.createElement(CloseButton$4, {
15896
16007
  className: "container-close",
15897
16008
  onPointerDown: onClose
15898
16009
  }, "X"), React__default.createElement("h2", null, "Select quantity to move"), React__default.createElement(StyledForm, {
@@ -15950,7 +16061,7 @@ var StyledInput = /*#__PURE__*/styled(Input).withConfig({
15950
16061
  displayName: "ItemQuantitySelector__StyledInput",
15951
16062
  componentId: "sc-yfdtpn-2"
15952
16063
  })(["text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"]);
15953
- var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
16064
+ var CloseButton$4 = /*#__PURE__*/styled.div.withConfig({
15954
16065
  displayName: "ItemQuantitySelector__CloseButton",
15955
16066
  componentId: "sc-yfdtpn-3"
15956
16067
  })(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
@@ -15983,6 +16094,7 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
15983
16094
  componentId: "sc-1b8cosc-0"
15984
16095
  })(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
15985
16096
 
16097
+ var MIN_SLOTS_FOR_SCROLL = 20;
15986
16098
  var ItemContainer$1 = function ItemContainer(_ref) {
15987
16099
  var itemContainer = _ref.itemContainer,
15988
16100
  onClose = _ref.onClose,
@@ -16138,7 +16250,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
16138
16250
  atlasJSON: atlasJSON
16139
16251
  }), React__default.createElement(ItemsContainer, {
16140
16252
  className: "item-container-body",
16141
- ref: containerRef
16253
+ ref: containerRef,
16254
+ isScrollable: itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL
16142
16255
  }, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ItemQuantitySelectorModal, {
16143
16256
  quantitySelect: quantitySelect,
16144
16257
  setQuantitySelect: setQuantitySelect
@@ -16147,7 +16260,10 @@ var ItemContainer$1 = function ItemContainer(_ref) {
16147
16260
  var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
16148
16261
  displayName: "ItemContainer__ItemsContainer",
16149
16262
  componentId: "sc-15y5p9l-0"
16150
- })(["display:flex;justify-content:center;flex-wrap:wrap;max-height:270px;overflow-y:auto;overflow-x:hidden;width:415px;"]);
16263
+ })(["display:flex;justify-content:center;flex-wrap:wrap;max-height:270px;overflow-y:", ";overflow-x:hidden;width:415px;"], function (_ref2) {
16264
+ var isScrollable = _ref2.isScrollable;
16265
+ return isScrollable ? 'scroll' : 'hidden';
16266
+ });
16151
16267
 
16152
16268
  var LeaderboardTable = function LeaderboardTable(props) {
16153
16269
  var items = props.items,
@@ -16281,7 +16397,7 @@ var ListMenu = function ListMenu(_ref) {
16281
16397
  overflow: 'hidden'
16282
16398
  }
16283
16399
  }, options.map(function (params, index) {
16284
- return React__default.createElement(ListElement$2, {
16400
+ return React__default.createElement(ListElement$3, {
16285
16401
  key: (params == null ? void 0 : params.id) || index,
16286
16402
  onPointerDown: function onPointerDown() {
16287
16403
  onSelected(params == null ? void 0 : params.id);
@@ -16297,7 +16413,7 @@ var Container$k = /*#__PURE__*/styled.div.withConfig({
16297
16413
  }, function (props) {
16298
16414
  return props.x || 0;
16299
16415
  }, uiFonts.size.xsmall);
16300
- var ListElement$2 = /*#__PURE__*/styled.li.withConfig({
16416
+ var ListElement$3 = /*#__PURE__*/styled.li.withConfig({
16301
16417
  displayName: "ListMenu__ListElement",
16302
16418
  componentId: "sc-i9097t-1"
16303
16419
  })(["margin-right:0.5rem;"]);
@@ -17955,7 +18071,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
17955
18071
  cancelDrag: "#skillsDiv",
17956
18072
  scale: scale,
17957
18073
  width: "100%"
17958
- }, onCloseButton && React__default.createElement(CloseButton$4, {
18074
+ }, onCloseButton && React__default.createElement(CloseButton$5, {
17959
18075
  onPointerDown: onCloseButton
17960
18076
  }, "X"), React__default.createElement(SkillsContainerDiv, {
17961
18077
  id: "skillsDiv"
@@ -17991,7 +18107,7 @@ var SkillSplitDiv = /*#__PURE__*/styled.div.withConfig({
17991
18107
  displayName: "SkillsContainer__SkillSplitDiv",
17992
18108
  componentId: "sc-1g0c67q-2"
17993
18109
  })(["width:100%;font-size:11px;hr{margin:0;margin-bottom:1rem;padding:0px;}p{margin-bottom:0px;}"]);
17994
- var CloseButton$4 = /*#__PURE__*/styled.div.withConfig({
18110
+ var CloseButton$5 = /*#__PURE__*/styled.div.withConfig({
17995
18111
  displayName: "SkillsContainer__CloseButton",
17996
18112
  componentId: "sc-1g0c67q-3"
17997
18113
  })(["position:absolute;top:2px;right:2px;color:white;z-index:22;font-size:1.1rem;"]);
@@ -18401,7 +18517,7 @@ var TimeWidget = function TimeWidget(_ref) {
18401
18517
  scale = _ref.scale;
18402
18518
  return React__default.createElement(Draggable, {
18403
18519
  scale: scale
18404
- }, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$5, {
18520
+ }, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$6, {
18405
18521
  onPointerDown: onClose
18406
18522
  }, "X"), React__default.createElement(DayNightContainer, null, React__default.createElement(DayNightPeriod, {
18407
18523
  periodOfDay: periodOfDay
@@ -18415,7 +18531,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
18415
18531
  displayName: "TimeWidget__Time",
18416
18532
  componentId: "sc-1ja236h-1"
18417
18533
  })(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
18418
- var CloseButton$5 = /*#__PURE__*/styled.p.withConfig({
18534
+ var CloseButton$6 = /*#__PURE__*/styled.p.withConfig({
18419
18535
  displayName: "TimeWidget__CloseButton",
18420
18536
  componentId: "sc-1ja236h-2"
18421
18537
  })(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);