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