@rpg-engine/long-bow 0.8.0 → 0.8.2
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/components/ChatRevamp/ChatRevamp.d.ts +2 -2
- package/dist/components/ChatRevamp/types.d.ts +11 -13
- package/dist/components/SocialModal/SocialModal.d.ts +6 -0
- package/dist/components/shared/Divider/Divider.d.ts +7 -0
- package/dist/long-bow.cjs.development.js +39 -14
- 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 +40 -15
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ChatRevamp/ChatRevamp.tsx +75 -20
- package/src/components/ChatRevamp/types.ts +11 -10
- package/src/components/Item/Inventory/ItemSlot.tsx +5 -10
- package/src/components/SocialModal/SocialModal.tsx +192 -0
- package/src/components/SocialModal/images/social-modal-group.png +0 -0
- package/src/components/shared/Divider/Divider.tsx +27 -0
- package/src/stories/UI/divider/Divider.stories.tsx +30 -0
- package/src/stories/UI/social/SocialModal.stories.tsx +23 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { v4 } from 'uuid';
|
|
|
5
5
|
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemRarities, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemSubType, isMobile, ItemSlotType, isMobileOrTablet, CharacterClass, QuestStatus, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
8
|
-
import { FaTimes, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight } from 'react-icons/fa';
|
|
8
|
+
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight } from 'react-icons/fa';
|
|
9
9
|
import { RxMagnifyingGlass, RxCross2 } from 'react-icons/rx';
|
|
10
10
|
import { IoMdContract, IoMdExpand } from 'react-icons/io';
|
|
11
11
|
import Draggable from 'react-draggable';
|
|
@@ -26804,13 +26804,18 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26804
26804
|
onRemoveRecentChatCharacter = _ref.onRemoveRecentChatCharacter,
|
|
26805
26805
|
unseenMessageCharacterIds = _ref.unseenMessageCharacterIds,
|
|
26806
26806
|
onSendTradeMessage = _ref.onSendTradeMessage,
|
|
26807
|
-
|
|
26808
|
-
|
|
26809
|
-
|
|
26807
|
+
_ref$searchCharacterU = _ref.searchCharacterUI,
|
|
26808
|
+
searchCharacterUI = _ref$searchCharacterU === void 0 ? false : _ref$searchCharacterU,
|
|
26809
|
+
_ref$hideSearchCharac = _ref.hideSearchCharacterUI,
|
|
26810
|
+
hideSearchCharacterUI = _ref$hideSearchCharac === void 0 ? function () {} : _ref$hideSearchCharac,
|
|
26811
|
+
_ref$showSearchCharac = _ref.showSearchCharacterUI,
|
|
26812
|
+
showSearchCharacterUI = _ref$showSearchCharac === void 0 ? function () {} : _ref$showSearchCharac,
|
|
26810
26813
|
_ref$minimizedByDefau = _ref.minimizedByDefault,
|
|
26811
26814
|
minimizedByDefault = _ref$minimizedByDefau === void 0 ? false : _ref$minimizedByDefau,
|
|
26812
26815
|
autoCloseOnSend = _ref.autoCloseOnSend,
|
|
26813
|
-
onSendLocalChatMessage = _ref.onSendLocalChatMessage
|
|
26816
|
+
onSendLocalChatMessage = _ref.onSendLocalChatMessage,
|
|
26817
|
+
onDiscordClick = _ref.onDiscordClick,
|
|
26818
|
+
onWhatsAppClick = _ref.onWhatsAppClick;
|
|
26814
26819
|
var isPrivate = activeTab === 'private';
|
|
26815
26820
|
var isTrade = activeTab === 'trade';
|
|
26816
26821
|
var isGuild = activeTab === 'guild';
|
|
@@ -26822,13 +26827,25 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26822
26827
|
onPreviousChatCharacterClick: onPreviousChatCharacterClick,
|
|
26823
26828
|
unseenMessageCharacterIds: unseenMessageCharacterIds
|
|
26824
26829
|
});
|
|
26830
|
+
var handleDiscordClick = function handleDiscordClick(e) {
|
|
26831
|
+
e.preventDefault();
|
|
26832
|
+
onDiscordClick == null ? void 0 : onDiscordClick();
|
|
26833
|
+
};
|
|
26834
|
+
var handleWhatsAppClick = function handleWhatsAppClick(e) {
|
|
26835
|
+
e.preventDefault();
|
|
26836
|
+
onWhatsAppClick == null ? void 0 : onWhatsAppClick();
|
|
26837
|
+
};
|
|
26825
26838
|
return React.createElement(ChatRevampContainer, null, React.createElement(TopBar, {
|
|
26826
26839
|
isExpanded: chatHook.isExpanded
|
|
26827
|
-
}, chatHook.isExpanded && React.createElement(ChatTabs, {
|
|
26840
|
+
}, chatHook.isExpanded && React.createElement(React.Fragment, null, React.createElement(ChatTabs, {
|
|
26828
26841
|
tabs: tabs,
|
|
26829
26842
|
activeTab: activeTab,
|
|
26830
26843
|
onChangeTab: chatHook.handleTabChange
|
|
26831
|
-
}), React.createElement(
|
|
26844
|
+
}), React.createElement(SocialButtons, null, React.createElement(SocialButton, {
|
|
26845
|
+
onClick: handleDiscordClick
|
|
26846
|
+
}, React.createElement(FaDiscord, null)), React.createElement(SocialButton, {
|
|
26847
|
+
onClick: handleWhatsAppClick
|
|
26848
|
+
}, React.createElement(FaWhatsapp, null)))), React.createElement(ExpandButton, {
|
|
26832
26849
|
isExpanded: chatHook.isExpanded,
|
|
26833
26850
|
onClick: chatHook.toggleExpand
|
|
26834
26851
|
})), React.createElement(AllChatsContainer, {
|
|
@@ -26838,7 +26855,7 @@ var ChatRevamp = function ChatRevamp(_ref) {
|
|
|
26838
26855
|
}, chatHook.isExpanded ? React.createElement(ExpandedChatContent, null, isPrivate && React.createElement(RecentChats, {
|
|
26839
26856
|
showRecentChats: chatHook.showRecentChats,
|
|
26840
26857
|
toggleRecentChats: chatHook.toggleRecentChats,
|
|
26841
|
-
hasUnseenMessages: chatHook.hasUnseenMessages
|
|
26858
|
+
hasUnseenMessages: !!chatHook.hasUnseenMessages,
|
|
26842
26859
|
showSearchCharacterUI: showSearchCharacterUI,
|
|
26843
26860
|
recentChatCharacters: recentChatCharacters,
|
|
26844
26861
|
recentSelectedChatCharacterId: recentSelectedChatCharacterId,
|
|
@@ -26889,7 +26906,7 @@ var ChatRevampContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
26889
26906
|
var TopBar = /*#__PURE__*/styled.div.withConfig({
|
|
26890
26907
|
displayName: "ChatRevamp__TopBar",
|
|
26891
26908
|
componentId: "sc-1sdiknw-1"
|
|
26892
|
-
})(["display:flex;align-items:center;justify-content:
|
|
26909
|
+
})(["display:flex;align-items:center;justify-content:space-between;min-height:", ";padding:0 8px;"], function (_ref2) {
|
|
26893
26910
|
var isExpanded = _ref2.isExpanded;
|
|
26894
26911
|
return isExpanded ? 'auto' : '32px';
|
|
26895
26912
|
});
|
|
@@ -26907,8 +26924,9 @@ var AllChatsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
26907
26924
|
var ChatContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
26908
26925
|
displayName: "ChatRevamp__ChatContentWrapper",
|
|
26909
26926
|
componentId: "sc-1sdiknw-3"
|
|
26910
|
-
})(["flex-grow:1;overflow:hidden;display:flex;flex-direction:column;position:relative;width:", ";"], function (
|
|
26911
|
-
|
|
26927
|
+
})(["flex-grow:1;overflow:hidden;display:flex;flex-direction:column;position:relative;width:", ";"], function (_ref5) {
|
|
26928
|
+
var isPrivate = _ref5.isPrivate;
|
|
26929
|
+
return isPrivate ? '75%' : '100%';
|
|
26912
26930
|
});
|
|
26913
26931
|
var CollapsedChatInput = /*#__PURE__*/styled.div.withConfig({
|
|
26914
26932
|
displayName: "ChatRevamp__CollapsedChatInput",
|
|
@@ -26918,6 +26936,14 @@ var ExpandedChatContent = /*#__PURE__*/styled.div.withConfig({
|
|
|
26918
26936
|
displayName: "ChatRevamp__ExpandedChatContent",
|
|
26919
26937
|
componentId: "sc-1sdiknw-5"
|
|
26920
26938
|
})(["display:flex;width:100%;height:100%;"]);
|
|
26939
|
+
var SocialButtons = /*#__PURE__*/styled.div.withConfig({
|
|
26940
|
+
displayName: "ChatRevamp__SocialButtons",
|
|
26941
|
+
componentId: "sc-1sdiknw-6"
|
|
26942
|
+
})(["display:flex;gap:8px;margin-right:32px;"]);
|
|
26943
|
+
var SocialButton = /*#__PURE__*/styled.button.withConfig({
|
|
26944
|
+
displayName: "ChatRevamp__SocialButton",
|
|
26945
|
+
componentId: "sc-1sdiknw-7"
|
|
26946
|
+
})(["background-color:transparent;border:none;color:white;font-size:16px;cursor:pointer;transition:color 0.3s ease;padding:4px;&:hover{color:", ";}"], uiColors.yellow);
|
|
26921
26947
|
|
|
26922
26948
|
var CheckButton = function CheckButton(_ref) {
|
|
26923
26949
|
var items = _ref.items,
|
|
@@ -27938,15 +27964,14 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
27938
27964
|
},
|
|
27939
27965
|
isFocused: false
|
|
27940
27966
|
});
|
|
27941
|
-
}, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled]);
|
|
27942
|
-
useEffect(function () {
|
|
27943
|
-
// Reset drag position and focus when item changes
|
|
27944
27967
|
clearDraggingState();
|
|
27945
27968
|
// Clear context actions when component unmounts or dependencies change
|
|
27946
27969
|
return function () {
|
|
27970
|
+
clearDraggingState();
|
|
27971
|
+
clearDetailsState();
|
|
27947
27972
|
clearContextActions();
|
|
27948
27973
|
};
|
|
27949
|
-
}, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled, updateDraggingState]);
|
|
27974
|
+
}, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled, clearDraggingState, clearDetailsState, updateDraggingState]);
|
|
27950
27975
|
var resetItem = function resetItem() {
|
|
27951
27976
|
clearDraggingState();
|
|
27952
27977
|
clearDetailsState();
|