@rpg-engine/long-bow 0.6.96 → 0.6.97

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.
@@ -26528,62 +26528,63 @@ var ChatRevamp = function ChatRevamp(_ref) {
26528
26528
  setShowRecentChats = _useState[1];
26529
26529
  var isPrivate = activeTab === 'private';
26530
26530
  var isTrade = activeTab === 'trade';
26531
+ var toggleRecentChats = function toggleRecentChats() {
26532
+ setShowRecentChats(function (prev) {
26533
+ return !prev;
26534
+ });
26535
+ };
26531
26536
  var handlePreviousChatCharacterClick = function handlePreviousChatCharacterClick(character) {
26532
26537
  if (!onPreviousChatCharacterClick) return;
26533
26538
  onPreviousChatCharacterClick(character);
26534
26539
  hideSearchCharacterUI();
26535
26540
  };
26536
- return React__default.createElement(ChatContainer$1, null, React__default.createElement(TabContainer, null, tabs.map(function (tab, index) {
26541
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(TabContainer, null, tabs.map(function (tab, index) {
26537
26542
  return React__default.createElement(Tab, {
26538
26543
  key: tab.label + "_" + index,
26539
26544
  active: tab.id === activeTab,
26540
- onClick: function onClick() {
26545
+ onPointerDown: function onPointerDown() {
26541
26546
  return onChangeTab(tab.id);
26542
26547
  }
26543
26548
  }, tab.label);
26544
26549
  })), React__default.createElement(PrivateChatContainer, {
26545
26550
  width: (styles == null ? void 0 : styles.width) || '80%',
26546
26551
  height: (styles == null ? void 0 : styles.height) || 'auto'
26547
- }, isPrivate && React__default.createElement(RecentChatTabContainer, {
26552
+ }, React__default.createElement(RecentChatTabContainer, {
26548
26553
  isPrivate: isPrivate,
26549
26554
  isOpen: showRecentChats
26550
- }, React__default.createElement(RecentChatContent, {
26551
- isOpen: showRecentChats
26552
26555
  }, React__default.createElement(RecentChatTopBar, null, React__default.createElement(BurgerIconContainer, {
26553
- onClick: function onClick() {
26554
- return setShowRecentChats(function (t) {
26555
- return !t;
26556
- });
26557
- },
26556
+ onPointerDown: toggleRecentChats,
26558
26557
  hasUnseenMessages: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.length) > 0 || false
26559
26558
  }, React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null), React__default.createElement(BurgerLineIcon, null)), showRecentChats && React__default.createElement(SearchButton$1, {
26560
- onClick: function onClick() {
26559
+ onPointerDown: function onPointerDown() {
26561
26560
  return showSearchCharacterUI();
26562
26561
  }
26563
26562
  }, React__default.createElement(rx.RxMagnifyingGlass, {
26564
26563
  size: 16,
26565
26564
  color: uiColors.white
26566
- }))), React__default.createElement(RecentChatLogContainer, null, recentChatCharacters == null ? void 0 : recentChatCharacters.map(function (character) {
26565
+ }))), React__default.createElement(RecentChatLogContainer, {
26566
+ isOpen: showRecentChats
26567
+ }, recentChatCharacters == null ? void 0 : recentChatCharacters.map(function (character) {
26567
26568
  return React__default.createElement(ListElementContainer, {
26568
26569
  key: character._id
26569
26570
  }, React__default.createElement(ListElement$1, {
26570
26571
  active: character._id === recentSelectedChatCharacterId,
26571
- onClick: function onClick() {
26572
+ onPointerDown: function onPointerDown() {
26572
26573
  return handlePreviousChatCharacterClick(character);
26573
26574
  }
26574
26575
  }, React__default.createElement(StatusDot, {
26575
26576
  isUnseen: (unseenMessageCharacterIds == null ? void 0 : unseenMessageCharacterIds.includes(character._id)) || false
26576
- }), React__default.createElement(EllipsisWrapper, null, React__default.createElement(Ellipsis, {
26577
- maxLines: 1,
26578
- maxWidth: "140px"
26579
- }, character.name))), React__default.createElement(CloseButton$1, {
26580
- onClick: function onClick() {
26577
+ }), React__default.createElement(Ellipsis, {
26578
+ maxWidth: "140px",
26579
+ maxLines: 1
26580
+ }, character.name)), React__default.createElement(CloseButton$1, {
26581
+ onPointerDown: function onPointerDown() {
26581
26582
  return onRemoveRecentChatCharacter == null ? void 0 : onRemoveRecentChatCharacter(character);
26582
26583
  }
26583
26584
  }, React__default.createElement(rx.RxCross2, {
26584
26585
  size: 16
26585
26586
  })));
26586
- })))), isPrivate && searchCharacterUI ? React__default.createElement(SearchCharacter, {
26587
+ }))), isPrivate && searchCharacterUI ? React__default.createElement(SearchCharacter, {
26587
26588
  onFocus: onFocus,
26588
26589
  onBlur: onBlur,
26589
26590
  onChangeCharacterName: onChangeCharacterName,
@@ -26601,30 +26602,24 @@ var ChatRevamp = function ChatRevamp(_ref) {
26601
26602
  onBlur: onBlur
26602
26603
  })));
26603
26604
  };
26604
- var ChatContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
26605
- displayName: "ChatRevamp__ChatContainer",
26606
- componentId: "sc-1sdiknw-0"
26607
- })(["display:flex;flex-direction:column;gap:10px;max-width:1200px;"]);
26608
26605
  var TabContainer = /*#__PURE__*/styled__default.div.withConfig({
26609
26606
  displayName: "ChatRevamp__TabContainer",
26610
- componentId: "sc-1sdiknw-1"
26607
+ componentId: "sc-1sdiknw-0"
26611
26608
  })(["width:100%;display:flex;gap:10px;"]);
26612
26609
  var Tab = /*#__PURE__*/styled__default.button.withConfig({
26613
26610
  displayName: "ChatRevamp__Tab",
26614
- componentId: "sc-1sdiknw-2"
26615
- })(["width:120px;color:white;font-size:0.8rem;all:unset;padding:0.6rem;font-size:0.8rem;border-radius:5px 5px 0 0;border-width:0.25rem 0.25rem 0 0.25rem;border-style:solid;border-color:", ";background-color:", ";color:", ";transition:all 0.3s ease;cursor:pointer;&:hover{background-color:", ";}"], function (props) {
26611
+ componentId: "sc-1sdiknw-1"
26612
+ })(["width:120px;color:white;font-size:0.8rem;all:unset;padding:0.6rem;font-size:0.8rem;border-radius:5px 5px 0 0;border-width:0.25rem 0.25rem 0 0.25rem;border-style:solid;border-color:", ";background-color:", ";color:", ";"], function (props) {
26616
26613
  return props.active ? '#c65102' : uiColors.gray;
26617
26614
  }, function (props) {
26618
26615
  return props.active ? uiColors.orange : 'transparent';
26619
26616
  }, function (props) {
26620
26617
  return props.active ? 'white' : uiColors.raisinBlack;
26621
- }, function (props) {
26622
- return props.active ? uiColors.orange : uiColors.lightGray;
26623
26618
  });
26624
26619
  var PrivateChatContainer = /*#__PURE__*/styled__default.div.withConfig({
26625
26620
  displayName: "ChatRevamp__PrivateChatContainer",
26626
- componentId: "sc-1sdiknw-3"
26627
- })(["width:", ";min-height:", " !important;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;display:flex;gap:10px;border-radius:0 0 10px 10px;box-shadow:0 4px 6px rgba(0,0,0,0.1);"], function (_ref2) {
26621
+ componentId: "sc-1sdiknw-2"
26622
+ })(["width:", ";min-height:", " !important;padding:10px;background-color:rgba(0,0,0,0.2);height:auto;display:flex;gap:10px;"], function (_ref2) {
26628
26623
  var width = _ref2.width;
26629
26624
  return width;
26630
26625
  }, function (_ref3) {
@@ -26633,70 +26628,62 @@ var PrivateChatContainer = /*#__PURE__*/styled__default.div.withConfig({
26633
26628
  });
26634
26629
  var RecentChatTabContainer = /*#__PURE__*/styled__default.div.withConfig({
26635
26630
  displayName: "ChatRevamp__RecentChatTabContainer",
26636
- componentId: "sc-1sdiknw-4"
26637
- })(["display:", ";flex-direction:column;border-right:1px solid ", ";outline:none;width:", ";min-width:", ";max-width:300px;transition:all 0.3s ease-in-out;overflow:hidden;@media (max-width:768px){width:", ";min-width:", ";}"], function (props) {
26631
+ componentId: "sc-1sdiknw-3"
26632
+ })(["display:", ";flex-direction:column;border-right:1px solid ", ";outline:none;width:", ";max-width:200px;min-width:", ";transition:all 0.3s ease-in-out;overflow:hidden;@media (max-width:768px){width:", ";min-width:", ";}"], function (props) {
26638
26633
  return props.isPrivate ? 'flex' : 'none';
26639
26634
  }, uiColors.gray, function (props) {
26640
- return props.isOpen ? '20%' : '30px';
26635
+ return props.isOpen ? '25%' : '30px';
26641
26636
  }, function (props) {
26642
- return props.isOpen ? '140px' : '30px';
26637
+ return props.isOpen ? '180px' : '30px';
26643
26638
  }, function (props) {
26644
- return props.isOpen ? '40%' : '30px';
26639
+ return props.isOpen ? '50%' : '30px';
26645
26640
  }, function (props) {
26646
- return props.isOpen ? '140px' : '30px';
26647
- });
26648
- var RecentChatContent = /*#__PURE__*/styled__default.div.withConfig({
26649
- displayName: "ChatRevamp__RecentChatContent",
26650
- componentId: "sc-1sdiknw-5"
26651
- })(["width:100%;min-width:140px;opacity:", ";transition:opacity 0.3s ease-in-out;"], function (props) {
26652
- return props.isOpen ? 1 : 0;
26641
+ return props.isOpen ? '150px' : '30px';
26653
26642
  });
26654
26643
  var RecentChatTopBar = /*#__PURE__*/styled__default.div.withConfig({
26655
26644
  displayName: "ChatRevamp__RecentChatTopBar",
26656
- componentId: "sc-1sdiknw-6"
26645
+ componentId: "sc-1sdiknw-4"
26657
26646
  })(["display:flex;align-items:center;justify-content:space-between;height:30px;"]);
26658
26647
  var SearchButton$1 = /*#__PURE__*/styled__default.button.withConfig({
26659
26648
  displayName: "ChatRevamp__SearchButton",
26660
- componentId: "sc-1sdiknw-7"
26649
+ componentId: "sc-1sdiknw-5"
26661
26650
  })(["border:none;background-color:transparent;display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:4px;position:relative;"]);
26662
26651
  var BurgerIconContainer = /*#__PURE__*/styled__default.button.withConfig({
26663
26652
  displayName: "ChatRevamp__BurgerIconContainer",
26664
- componentId: "sc-1sdiknw-8"
26653
+ componentId: "sc-1sdiknw-6"
26665
26654
  })(["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) {
26666
26655
  return props.hasUnseenMessages ? 'block' : 'none';
26667
26656
  });
26668
26657
  var BurgerLineIcon = /*#__PURE__*/styled__default.span.withConfig({
26669
26658
  displayName: "ChatRevamp__BurgerLineIcon",
26670
- componentId: "sc-1sdiknw-9"
26659
+ componentId: "sc-1sdiknw-7"
26671
26660
  })(["width:1rem;height:2px;background-color:#ffffff;"]);
26672
26661
  var RecentChatLogContainer = /*#__PURE__*/styled__default.div.withConfig({
26673
26662
  displayName: "ChatRevamp__RecentChatLogContainer",
26674
- componentId: "sc-1sdiknw-10"
26675
- })(["border:none;list-style:none;display:flex;flex-direction:column;gap:0.5rem;padding:0;margin:0;flex:1;"]);
26663
+ componentId: "sc-1sdiknw-8"
26664
+ })(["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) {
26665
+ return props.isOpen ? 1 : 0;
26666
+ });
26676
26667
  var ListElementContainer = /*#__PURE__*/styled__default.div.withConfig({
26677
26668
  displayName: "ChatRevamp__ListElementContainer",
26678
- componentId: "sc-1sdiknw-11"
26679
- })(["display:flex;justify-content:space-between;align-items:center;width:100%;"]);
26669
+ componentId: "sc-1sdiknw-9"
26670
+ })(["display:flex;justify-content:space-between;align-items:center;"]);
26680
26671
  var ListElement$1 = /*#__PURE__*/styled__default.button.withConfig({
26681
26672
  displayName: "ChatRevamp__ListElement",
26682
- componentId: "sc-1sdiknw-12"
26683
- })(["margin:0.5rem 0 !important;font-size:", " !important;padding:8px 4px;border-radius:4px;all:unset;color:", ";width:100%;position:relative;display:flex;align-items:center;gap:4px;transition:all 0.2s ease;flex:1;min-width:0;&:hover{background-color:rgba(255,255,255,0.1);}"], uiFonts.size.small, function (props) {
26673
+ componentId: "sc-1sdiknw-10"
26674
+ })(["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;}max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"], uiFonts.size.small, function (props) {
26684
26675
  return props.active ? uiColors.yellow : uiColors.white;
26685
26676
  });
26686
- var EllipsisWrapper = /*#__PURE__*/styled__default.div.withConfig({
26687
- displayName: "ChatRevamp__EllipsisWrapper",
26688
- componentId: "sc-1sdiknw-13"
26689
- })(["flex:1;min-width:0;"]);
26690
26677
  var StatusDot = /*#__PURE__*/styled__default.span.withConfig({
26691
26678
  displayName: "ChatRevamp__StatusDot",
26692
- componentId: "sc-1sdiknw-14"
26679
+ componentId: "sc-1sdiknw-11"
26693
26680
  })(["width:6px;height:6px;border-radius:50%;background-color:", ";display:inline-block;margin-right:6px;"], function (props) {
26694
26681
  return props.isUnseen ? uiColors.lightGreen : uiColors.gray;
26695
26682
  });
26696
26683
  var CloseButton$1 = /*#__PURE__*/styled__default.button.withConfig({
26697
26684
  displayName: "ChatRevamp__CloseButton",
26698
- componentId: "sc-1sdiknw-15"
26699
- })(["all:unset;font-size:", ";margin:0 0.5rem;transition:all 0.2s ease-in-out;background-color:", ";color:", ";border-radius:50%;padding:4px;display:flex;align-items:center;justify-content:center;flex-shrink:0;&:hover{background-color:", ";color:", ";}"], uiFonts.size.xxsmall, uiColors.red, uiColors.white, uiColors.white, uiColors.red);
26685
+ componentId: "sc-1sdiknw-12"
26686
+ })(["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);
26700
26687
 
26701
26688
  var CheckButton = function CheckButton(_ref) {
26702
26689
  var items = _ref.items,