@rpg-engine/long-bow 0.3.0 → 0.3.24
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/Chat/Chat.d.ts +4 -0
- package/dist/components/Chatdeprecated/ChatDeprecated.d.ts +13 -0
- package/dist/index.d.ts +5 -4
- package/dist/long-bow.cjs.development.js +261 -132
- 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 +261 -133
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/ChatDeprecated.stories.d.ts +5 -0
- package/package.json +3 -1
- package/src/.DS_Store +0 -0
- package/src/components/Chat/Chat.tsx +81 -105
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +200 -0
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/index.tsx +5 -4
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
- package/src/stories/Chat.stories.tsx +17 -2
- package/src/stories/ChatDeprecated.stories.tsx +170 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -3,6 +3,7 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { GRID_WIDTH, GRID_HEIGHT, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, getItemTextureKeyPath, ItemSlotType, getSPForLevel, PeriodOfDay } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
6
|
+
import { CiPaperplane } from 'react-icons/ci';
|
|
6
7
|
import Draggable from 'react-draggable';
|
|
7
8
|
import { v4 } from 'uuid';
|
|
8
9
|
import { observer } from 'mobx-react-lite';
|
|
@@ -32697,6 +32698,146 @@ var Container$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32697
32698
|
componentId: "sc-b34498-0"
|
|
32698
32699
|
})(["display:flex;flex-direction:column;align-items:center;image-rendering:pixelated;"]);
|
|
32699
32700
|
|
|
32701
|
+
var Column = /*#__PURE__*/styled.div.withConfig({
|
|
32702
|
+
displayName: "Column",
|
|
32703
|
+
componentId: "sc-1pesqff-0"
|
|
32704
|
+
})(["flex:", ";display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";"], function (props) {
|
|
32705
|
+
return props.flex || 'auto';
|
|
32706
|
+
}, function (props) {
|
|
32707
|
+
return props.flexWrap || 'nowrap';
|
|
32708
|
+
}, function (props) {
|
|
32709
|
+
return props.alignItems || 'flex-start';
|
|
32710
|
+
}, function (props) {
|
|
32711
|
+
return props.justifyContent || 'flex-start';
|
|
32712
|
+
});
|
|
32713
|
+
|
|
32714
|
+
var Chat = function Chat(_ref) {
|
|
32715
|
+
var chatMessages = _ref.chatMessages,
|
|
32716
|
+
onSendChatMessage = _ref.onSendChatMessage,
|
|
32717
|
+
_ref$width = _ref.width,
|
|
32718
|
+
width = _ref$width === void 0 ? '80%' : _ref$width,
|
|
32719
|
+
_ref$height = _ref.height,
|
|
32720
|
+
height = _ref$height === void 0 ? '250px' : _ref$height,
|
|
32721
|
+
onFocus = _ref.onFocus,
|
|
32722
|
+
onBlur = _ref.onBlur,
|
|
32723
|
+
_ref$color = _ref.color,
|
|
32724
|
+
color = _ref$color === void 0 ? '#c65102' : _ref$color,
|
|
32725
|
+
_ref$buttonColor = _ref.buttonColor,
|
|
32726
|
+
buttonColor = _ref$buttonColor === void 0 ? '#005b96' : _ref$buttonColor,
|
|
32727
|
+
_ref$buttonBackground = _ref.buttonBackgroundColor,
|
|
32728
|
+
buttonBackgroundColor = _ref$buttonBackground === void 0 ? '#FFF' : _ref$buttonBackground;
|
|
32729
|
+
var _useState = useState(''),
|
|
32730
|
+
message = _useState[0],
|
|
32731
|
+
setMessage = _useState[1];
|
|
32732
|
+
useEffect(function () {
|
|
32733
|
+
scrollChatToBottom();
|
|
32734
|
+
}, []);
|
|
32735
|
+
useEffect(function () {
|
|
32736
|
+
scrollChatToBottom();
|
|
32737
|
+
}, [chatMessages]);
|
|
32738
|
+
var scrollChatToBottom = function scrollChatToBottom() {
|
|
32739
|
+
var scrollingElement = document.querySelector('.chat-body');
|
|
32740
|
+
if (scrollingElement) {
|
|
32741
|
+
scrollingElement.scrollTop = scrollingElement.scrollHeight;
|
|
32742
|
+
}
|
|
32743
|
+
};
|
|
32744
|
+
var handleSubmit = function handleSubmit(event) {
|
|
32745
|
+
event.preventDefault();
|
|
32746
|
+
onSendChatMessage(message);
|
|
32747
|
+
setMessage('');
|
|
32748
|
+
};
|
|
32749
|
+
var getInputValue = function getInputValue(value) {
|
|
32750
|
+
setMessage(value);
|
|
32751
|
+
};
|
|
32752
|
+
var onRenderMessageLines = function onRenderMessageLines(emitter, createdAt, message) {
|
|
32753
|
+
return dayjs(createdAt || new Date()).format('HH:mm') + " " + (emitter != null && emitter.name ? emitter.name + ": " : 'Unknown: ') + " " + message;
|
|
32754
|
+
};
|
|
32755
|
+
var onRenderChatMessages = function onRenderChatMessages(chatMessages) {
|
|
32756
|
+
return chatMessages != null && chatMessages.length ? chatMessages == null ? void 0 : chatMessages.map(function (_ref2, index) {
|
|
32757
|
+
var _id = _ref2._id,
|
|
32758
|
+
createdAt = _ref2.createdAt,
|
|
32759
|
+
emitter = _ref2.emitter,
|
|
32760
|
+
message = _ref2.message;
|
|
32761
|
+
return React.createElement(Message, {
|
|
32762
|
+
color: color,
|
|
32763
|
+
key: _id + "_" + index
|
|
32764
|
+
}, onRenderMessageLines(emitter, createdAt, message));
|
|
32765
|
+
}) : React.createElement(Message, {
|
|
32766
|
+
color: color
|
|
32767
|
+
}, "No messages available.");
|
|
32768
|
+
};
|
|
32769
|
+
return React.createElement(ChatContainer, {
|
|
32770
|
+
width: width,
|
|
32771
|
+
height: height
|
|
32772
|
+
}, React.createElement(ErrorBoundary$1, {
|
|
32773
|
+
fallback: React.createElement("p", null, "Oops! Your chat has crashed.")
|
|
32774
|
+
}, React.createElement(MessagesContainer, null, onRenderChatMessages(chatMessages)), React.createElement(Form, {
|
|
32775
|
+
onSubmit: handleSubmit
|
|
32776
|
+
}, React.createElement(Column, {
|
|
32777
|
+
flex: 70
|
|
32778
|
+
}, React.createElement(TextField, {
|
|
32779
|
+
value: message,
|
|
32780
|
+
id: "inputMessage",
|
|
32781
|
+
onChange: function onChange(e) {
|
|
32782
|
+
return getInputValue(e.target.value);
|
|
32783
|
+
},
|
|
32784
|
+
height: 20,
|
|
32785
|
+
type: "text",
|
|
32786
|
+
autoComplete: "off",
|
|
32787
|
+
onFocus: onFocus,
|
|
32788
|
+
onBlur: onBlur
|
|
32789
|
+
})), React.createElement(Column, {
|
|
32790
|
+
justifyContent: "flex-end"
|
|
32791
|
+
}, React.createElement(Button$1, {
|
|
32792
|
+
buttonColor: buttonColor,
|
|
32793
|
+
buttonBackgroundColor: buttonBackgroundColor,
|
|
32794
|
+
id: "chat-send-button",
|
|
32795
|
+
style: {
|
|
32796
|
+
borderRadius: '20%'
|
|
32797
|
+
}
|
|
32798
|
+
}, React.createElement(CiPaperplane, {
|
|
32799
|
+
size: 20
|
|
32800
|
+
}))))));
|
|
32801
|
+
};
|
|
32802
|
+
var ChatContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32803
|
+
displayName: "Chat__ChatContainer",
|
|
32804
|
+
componentId: "sc-1bk05n6-0"
|
|
32805
|
+
})(["height:", ";width:", ";padding:10px;margin-top:100px;background-color:rgba(0,0,0,0.1);"], function (props) {
|
|
32806
|
+
return props.height;
|
|
32807
|
+
}, function (_ref3) {
|
|
32808
|
+
var width = _ref3.width;
|
|
32809
|
+
return width;
|
|
32810
|
+
});
|
|
32811
|
+
var TextField = /*#__PURE__*/styled.input.withConfig({
|
|
32812
|
+
displayName: "Chat__TextField",
|
|
32813
|
+
componentId: "sc-1bk05n6-1"
|
|
32814
|
+
})(["width:100%;background-color:rgba(0,0,0,0.2) !important;border:none !important;"]);
|
|
32815
|
+
var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32816
|
+
displayName: "Chat__MessagesContainer",
|
|
32817
|
+
componentId: "sc-1bk05n6-2"
|
|
32818
|
+
})(["overflow:hidden;height:70%;margin-bottom:10px;"]);
|
|
32819
|
+
var Message = /*#__PURE__*/styled.div.withConfig({
|
|
32820
|
+
displayName: "Chat__Message",
|
|
32821
|
+
componentId: "sc-1bk05n6-3"
|
|
32822
|
+
})(["margin-bottom:8px;color:", ";"], function (_ref4) {
|
|
32823
|
+
var color = _ref4.color;
|
|
32824
|
+
return color;
|
|
32825
|
+
});
|
|
32826
|
+
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32827
|
+
displayName: "Chat__Form",
|
|
32828
|
+
componentId: "sc-1bk05n6-4"
|
|
32829
|
+
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32830
|
+
var Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
32831
|
+
displayName: "Chat__Button",
|
|
32832
|
+
componentId: "sc-1bk05n6-5"
|
|
32833
|
+
})(["color:", ";background-color:", ";width:50px;height:40px;border:none !important;"], function (_ref5) {
|
|
32834
|
+
var buttonColor = _ref5.buttonColor;
|
|
32835
|
+
return buttonColor;
|
|
32836
|
+
}, function (_ref6) {
|
|
32837
|
+
var buttonBackgroundColor = _ref6.buttonBackgroundColor;
|
|
32838
|
+
return buttonBackgroundColor;
|
|
32839
|
+
});
|
|
32840
|
+
|
|
32700
32841
|
var uiColors = {
|
|
32701
32842
|
lightGray: '#757161',
|
|
32702
32843
|
gray: '#4E4A4E',
|
|
@@ -32757,20 +32898,7 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32757
32898
|
return width;
|
|
32758
32899
|
});
|
|
32759
32900
|
|
|
32760
|
-
var
|
|
32761
|
-
displayName: "Column",
|
|
32762
|
-
componentId: "sc-1pesqff-0"
|
|
32763
|
-
})(["flex:", ";display:flex;flex-wrap:", ";align-items:", ";justify-content:", ";"], function (props) {
|
|
32764
|
-
return props.flex || 'auto';
|
|
32765
|
-
}, function (props) {
|
|
32766
|
-
return props.flexWrap || 'nowrap';
|
|
32767
|
-
}, function (props) {
|
|
32768
|
-
return props.alignItems || 'flex-start';
|
|
32769
|
-
}, function (props) {
|
|
32770
|
-
return props.justifyContent || 'flex-start';
|
|
32771
|
-
});
|
|
32772
|
-
|
|
32773
|
-
var Chat = function Chat(_ref) {
|
|
32901
|
+
var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
32774
32902
|
var chatMessages = _ref.chatMessages,
|
|
32775
32903
|
onSendChatMessage = _ref.onSendChatMessage,
|
|
32776
32904
|
_ref$opacity = _ref.opacity,
|
|
@@ -32835,7 +32963,7 @@ var Chat = function Chat(_ref) {
|
|
|
32835
32963
|
width: '100%',
|
|
32836
32964
|
height: '80%',
|
|
32837
32965
|
className: "chat-body dark-background"
|
|
32838
|
-
}, onRenderChatMessages(chatMessages)), React.createElement(Form, {
|
|
32966
|
+
}, onRenderChatMessages(chatMessages)), React.createElement(Form$1, {
|
|
32839
32967
|
onSubmit: handleSubmit
|
|
32840
32968
|
}, React.createElement(Column, {
|
|
32841
32969
|
flex: 70
|
|
@@ -32859,30 +32987,30 @@ var Chat = function Chat(_ref) {
|
|
|
32859
32987
|
}, "Send"))))));
|
|
32860
32988
|
};
|
|
32861
32989
|
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
32862
|
-
displayName: "
|
|
32863
|
-
componentId: "sc-
|
|
32990
|
+
displayName: "ChatDeprecated__Container",
|
|
32991
|
+
componentId: "sc-fuuod3-0"
|
|
32864
32992
|
})(["position:relative;"]);
|
|
32865
32993
|
var CloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
32866
|
-
displayName: "
|
|
32867
|
-
componentId: "sc-
|
|
32994
|
+
displayName: "ChatDeprecated__CloseButton",
|
|
32995
|
+
componentId: "sc-fuuod3-1"
|
|
32868
32996
|
})(["position:absolute;top:2px;right:0px;color:white;z-index:22;font-size:0.7rem;"]);
|
|
32869
32997
|
var CustomInput = /*#__PURE__*/styled(Input).withConfig({
|
|
32870
|
-
displayName: "
|
|
32871
|
-
componentId: "sc-
|
|
32998
|
+
displayName: "ChatDeprecated__CustomInput",
|
|
32999
|
+
componentId: "sc-fuuod3-2"
|
|
32872
33000
|
})(["height:30px;width:100%;.rpgui-content .input{min-height:39px;}"]);
|
|
32873
33001
|
var CustomContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
32874
|
-
displayName: "
|
|
32875
|
-
componentId: "sc-
|
|
33002
|
+
displayName: "ChatDeprecated__CustomContainer",
|
|
33003
|
+
componentId: "sc-fuuod3-3"
|
|
32876
33004
|
})(["display:block;opacity:", ";&:hover{opacity:1;}.dark-background{background-color:", " !important;}.chat-body{&.rpgui-container.framed-grey{background:unset;}max-height:170px;overflow-y:auto;}"], function (props) {
|
|
32877
33005
|
return props.opacity;
|
|
32878
33006
|
}, uiColors.darkGray);
|
|
32879
|
-
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32880
|
-
displayName: "
|
|
32881
|
-
componentId: "sc-
|
|
33007
|
+
var Form$1 = /*#__PURE__*/styled.form.withConfig({
|
|
33008
|
+
displayName: "ChatDeprecated__Form",
|
|
33009
|
+
componentId: "sc-fuuod3-4"
|
|
32882
33010
|
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32883
33011
|
var MessageText = /*#__PURE__*/styled.p.withConfig({
|
|
32884
|
-
displayName: "
|
|
32885
|
-
componentId: "sc-
|
|
33012
|
+
displayName: "ChatDeprecated__MessageText",
|
|
33013
|
+
componentId: "sc-fuuod3-5"
|
|
32886
33014
|
})(["display:block !important;width:100%;font-size:", " !important;overflow-y:auto;margin:0;"], uiFonts.size.xsmall);
|
|
32887
33015
|
|
|
32888
33016
|
var CheckButton = function CheckButton(_ref) {
|
|
@@ -34682,6 +34810,92 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34682
34810
|
componentId: "sc-15y5p9l-1"
|
|
34683
34811
|
})(["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);"]);
|
|
34684
34812
|
|
|
34813
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34814
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34815
|
+
atlasJSON = _ref.atlasJSON,
|
|
34816
|
+
options = _ref.options,
|
|
34817
|
+
onClose = _ref.onClose,
|
|
34818
|
+
onSelect = _ref.onSelect;
|
|
34819
|
+
var _useState = useState(),
|
|
34820
|
+
selectedValue = _useState[0],
|
|
34821
|
+
setSelectedValue = _useState[1];
|
|
34822
|
+
var handleClick = function handleClick() {
|
|
34823
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34824
|
+
var elementValue = element.value;
|
|
34825
|
+
setSelectedValue(elementValue);
|
|
34826
|
+
};
|
|
34827
|
+
useEffect(function () {
|
|
34828
|
+
if (selectedValue) {
|
|
34829
|
+
onSelect(selectedValue);
|
|
34830
|
+
}
|
|
34831
|
+
}, [selectedValue]);
|
|
34832
|
+
return React.createElement(DraggableContainer, {
|
|
34833
|
+
type: RPGUIContainerTypes.Framed,
|
|
34834
|
+
width: "500px",
|
|
34835
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34836
|
+
onCloseButton: function onCloseButton() {
|
|
34837
|
+
if (onClose) {
|
|
34838
|
+
onClose();
|
|
34839
|
+
}
|
|
34840
|
+
}
|
|
34841
|
+
}, React.createElement("div", {
|
|
34842
|
+
style: {
|
|
34843
|
+
width: '100%'
|
|
34844
|
+
}
|
|
34845
|
+
}, React.createElement(Title$2, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
34846
|
+
className: "golden"
|
|
34847
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34848
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
34849
|
+
key: index
|
|
34850
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
34851
|
+
atlasIMG: atlasIMG,
|
|
34852
|
+
atlasJSON: atlasJSON,
|
|
34853
|
+
spriteKey: option.imageKey,
|
|
34854
|
+
imgScale: 3
|
|
34855
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
34856
|
+
className: "rpgui-radio",
|
|
34857
|
+
type: "radio",
|
|
34858
|
+
value: option.name,
|
|
34859
|
+
name: "test"
|
|
34860
|
+
}), React.createElement("label", {
|
|
34861
|
+
onClick: handleClick,
|
|
34862
|
+
style: {
|
|
34863
|
+
display: 'flex',
|
|
34864
|
+
alignItems: 'center'
|
|
34865
|
+
}
|
|
34866
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
34867
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
34868
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34869
|
+
onClick: onClose
|
|
34870
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34871
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
34872
|
+
}, "Select")));
|
|
34873
|
+
};
|
|
34874
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34875
|
+
displayName: "ItemSelector__Title",
|
|
34876
|
+
componentId: "sc-gptoxp-0"
|
|
34877
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34878
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34879
|
+
displayName: "ItemSelector__Subtitle",
|
|
34880
|
+
componentId: "sc-gptoxp-1"
|
|
34881
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34882
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34883
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34884
|
+
componentId: "sc-gptoxp-2"
|
|
34885
|
+
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
34886
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34887
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34888
|
+
componentId: "sc-gptoxp-3"
|
|
34889
|
+
})(["margin-right:40px;"]);
|
|
34890
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34891
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34892
|
+
componentId: "sc-gptoxp-4"
|
|
34893
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34894
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34895
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34896
|
+
componentId: "sc-gptoxp-5"
|
|
34897
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34898
|
+
|
|
34685
34899
|
var ListMenu = function ListMenu(_ref) {
|
|
34686
34900
|
var options = _ref.options,
|
|
34687
34901
|
onSelected = _ref.onSelected,
|
|
@@ -34817,7 +35031,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34817
35031
|
onTouchStart: onRightClick
|
|
34818
35032
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
34819
35033
|
className: "drag-handler"
|
|
34820
|
-
}, React.createElement(Title$
|
|
35034
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
34821
35035
|
src: quests[currentIndex].thumbnail || img$9
|
|
34822
35036
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
34823
35037
|
className: "golden"
|
|
@@ -34836,7 +35050,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34836
35050
|
}, button.title);
|
|
34837
35051
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
34838
35052
|
className: "drag-handler"
|
|
34839
|
-
}, React.createElement(Title$
|
|
35053
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
34840
35054
|
src: quests[0].thumbnail || img$9
|
|
34841
35055
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
34842
35056
|
className: "golden"
|
|
@@ -34883,7 +35097,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
34883
35097
|
displayName: "QuestInfo__TitleContainer",
|
|
34884
35098
|
componentId: "sc-15s2boc-6"
|
|
34885
35099
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
34886
|
-
var Title$
|
|
35100
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34887
35101
|
displayName: "QuestInfo__Title",
|
|
34888
35102
|
componentId: "sc-15s2boc-7"
|
|
34889
35103
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -34905,7 +35119,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
34905
35119
|
style: {
|
|
34906
35120
|
width: '100%'
|
|
34907
35121
|
}
|
|
34908
|
-
}, React.createElement(Title$
|
|
35122
|
+
}, React.createElement(Title$4, null, "Quests"), React.createElement("hr", {
|
|
34909
35123
|
className: "golden"
|
|
34910
35124
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
34911
35125
|
return React.createElement("div", {
|
|
@@ -34926,7 +35140,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
34926
35140
|
displayName: "QuestList__QuestDraggableContainer",
|
|
34927
35141
|
componentId: "sc-1a2vx6q-0"
|
|
34928
35142
|
})([".container-close{top:10px;right:10px;}.quest-title{text-align:left;margin-left:44px;margin-top:20px;color:yellow;}.quest-desc{margin-top:12px;margin-left:44px;}.rpgui-progress{min-width:80%;margin:0 auto;}"]);
|
|
34929
|
-
var Title$
|
|
35143
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
34930
35144
|
displayName: "QuestList__Title",
|
|
34931
35145
|
componentId: "sc-1a2vx6q-1"
|
|
34932
35146
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -34939,15 +35153,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34939
35153
|
componentId: "sc-1a2vx6q-3"
|
|
34940
35154
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
34941
35155
|
|
|
34942
|
-
//@ts-ignore
|
|
34943
|
-
var _RPGUI = RPGUI;
|
|
34944
|
-
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
34945
|
-
var children = _ref.children;
|
|
34946
|
-
return React.createElement("div", {
|
|
34947
|
-
className: "rpgui-content"
|
|
34948
|
-
}, children);
|
|
34949
|
-
};
|
|
34950
|
-
|
|
34951
35156
|
var InputRadio = function InputRadio(_ref) {
|
|
34952
35157
|
var name = _ref.name,
|
|
34953
35158
|
items = _ref.items,
|
|
@@ -34980,6 +35185,15 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
34980
35185
|
}));
|
|
34981
35186
|
};
|
|
34982
35187
|
|
|
35188
|
+
//@ts-ignore
|
|
35189
|
+
var _RPGUI = RPGUI;
|
|
35190
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
35191
|
+
var children = _ref.children;
|
|
35192
|
+
return React.createElement("div", {
|
|
35193
|
+
className: "rpgui-content"
|
|
35194
|
+
}, children);
|
|
35195
|
+
};
|
|
35196
|
+
|
|
34983
35197
|
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
34984
35198
|
var value = _ref.value,
|
|
34985
35199
|
_ref$bgColor = _ref.bgColor,
|
|
@@ -35384,7 +35598,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35384
35598
|
style: {
|
|
35385
35599
|
width: '100%'
|
|
35386
35600
|
}
|
|
35387
|
-
}, React.createElement(Title$
|
|
35601
|
+
}, React.createElement(Title$5, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
35388
35602
|
className: "golden"
|
|
35389
35603
|
})), React.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
35390
35604
|
var _qtyMap$get;
|
|
@@ -35397,7 +35611,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35397
35611
|
traderItem: tradeItem,
|
|
35398
35612
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
35399
35613
|
}));
|
|
35400
|
-
})), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), !hasGoldForSale() ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", getFinalGold())), React.createElement(ButtonWrapper$
|
|
35614
|
+
})), React.createElement(GoldWrapper, null, React.createElement("p", null, "Available Gold:"), React.createElement("p", null, "$", characterAvailableGold)), React.createElement(TotalWrapper, null, React.createElement("p", null, "Total:"), React.createElement("p", null, "$", sum)), !hasGoldForSale() ? React.createElement(AlertWrapper, null, React.createElement("p", null, " Sorry, not enough money.")) : React.createElement(GoldWrapper, null, React.createElement("p", null, "Final Gold:"), React.createElement("p", null, "$", getFinalGold())), React.createElement(ButtonWrapper$2, null, React.createElement(Button, {
|
|
35401
35615
|
buttonType: ButtonTypes.RPGUIButton,
|
|
35402
35616
|
disabled: !hasGoldForSale(),
|
|
35403
35617
|
onClick: function onClick() {
|
|
@@ -35410,7 +35624,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35410
35624
|
}
|
|
35411
35625
|
}, "Cancel"))));
|
|
35412
35626
|
};
|
|
35413
|
-
var Title$
|
|
35627
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35414
35628
|
displayName: "TradingMenu__Title",
|
|
35415
35629
|
componentId: "sc-1wjsz1l-0"
|
|
35416
35630
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -35434,7 +35648,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
35434
35648
|
displayName: "TradingMenu__AlertWrapper",
|
|
35435
35649
|
componentId: "sc-1wjsz1l-5"
|
|
35436
35650
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
35437
|
-
var ButtonWrapper$
|
|
35651
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35438
35652
|
displayName: "TradingMenu__ButtonWrapper",
|
|
35439
35653
|
componentId: "sc-1wjsz1l-6"
|
|
35440
35654
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -35455,91 +35669,5 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
35455
35669
|
return props.maxLines;
|
|
35456
35670
|
});
|
|
35457
35671
|
|
|
35458
|
-
|
|
35459
|
-
var atlasIMG = _ref.atlasIMG,
|
|
35460
|
-
atlasJSON = _ref.atlasJSON,
|
|
35461
|
-
options = _ref.options,
|
|
35462
|
-
onClose = _ref.onClose,
|
|
35463
|
-
onSelect = _ref.onSelect;
|
|
35464
|
-
var _useState = useState(),
|
|
35465
|
-
selectedValue = _useState[0],
|
|
35466
|
-
setSelectedValue = _useState[1];
|
|
35467
|
-
var handleClick = function handleClick() {
|
|
35468
|
-
var element = document.querySelector("input[name='test']:checked");
|
|
35469
|
-
var elementValue = element.value;
|
|
35470
|
-
setSelectedValue(elementValue);
|
|
35471
|
-
};
|
|
35472
|
-
useEffect(function () {
|
|
35473
|
-
if (selectedValue) {
|
|
35474
|
-
onSelect(selectedValue);
|
|
35475
|
-
}
|
|
35476
|
-
}, [selectedValue]);
|
|
35477
|
-
return React.createElement(DraggableContainer, {
|
|
35478
|
-
type: RPGUIContainerTypes.Framed,
|
|
35479
|
-
width: "500px",
|
|
35480
|
-
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
35481
|
-
onCloseButton: function onCloseButton() {
|
|
35482
|
-
if (onClose) {
|
|
35483
|
-
onClose();
|
|
35484
|
-
}
|
|
35485
|
-
}
|
|
35486
|
-
}, React.createElement("div", {
|
|
35487
|
-
style: {
|
|
35488
|
-
width: '100%'
|
|
35489
|
-
}
|
|
35490
|
-
}, React.createElement(Title$5, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
35491
|
-
className: "golden"
|
|
35492
|
-
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
35493
|
-
return React.createElement(RadioOptionsWrapper$1, {
|
|
35494
|
-
key: index
|
|
35495
|
-
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
35496
|
-
atlasIMG: atlasIMG,
|
|
35497
|
-
atlasJSON: atlasJSON,
|
|
35498
|
-
spriteKey: option.imageKey,
|
|
35499
|
-
imgScale: 3
|
|
35500
|
-
})), React.createElement("div", null, React.createElement("input", {
|
|
35501
|
-
className: "rpgui-radio",
|
|
35502
|
-
type: "radio",
|
|
35503
|
-
value: option.name,
|
|
35504
|
-
name: "test"
|
|
35505
|
-
}), React.createElement("label", {
|
|
35506
|
-
onClick: handleClick,
|
|
35507
|
-
style: {
|
|
35508
|
-
display: 'flex',
|
|
35509
|
-
alignItems: 'center'
|
|
35510
|
-
}
|
|
35511
|
-
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
35512
|
-
})), React.createElement(ButtonWrapper$2, null, React.createElement(Button, {
|
|
35513
|
-
buttonType: ButtonTypes.RPGUIButton,
|
|
35514
|
-
onClick: onClose
|
|
35515
|
-
}, "Cancel"), React.createElement(Button, {
|
|
35516
|
-
buttonType: ButtonTypes.RPGUIButton
|
|
35517
|
-
}, "Select")));
|
|
35518
|
-
};
|
|
35519
|
-
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35520
|
-
displayName: "ItemSelector__Title",
|
|
35521
|
-
componentId: "sc-gptoxp-0"
|
|
35522
|
-
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
35523
|
-
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
35524
|
-
displayName: "ItemSelector__Subtitle",
|
|
35525
|
-
componentId: "sc-gptoxp-1"
|
|
35526
|
-
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
35527
|
-
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35528
|
-
displayName: "ItemSelector__RadioInputScroller",
|
|
35529
|
-
componentId: "sc-gptoxp-2"
|
|
35530
|
-
})(["padding-left:15px;padding-top:10px;width:100%;margin-top:1rem;align-items:center;margin-left:20px;align-items:flex-start;overflow-y:scroll;height:360px;"]);
|
|
35531
|
-
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35532
|
-
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
35533
|
-
componentId: "sc-gptoxp-3"
|
|
35534
|
-
})(["margin-right:40px;"]);
|
|
35535
|
-
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
35536
|
-
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
35537
|
-
componentId: "sc-gptoxp-4"
|
|
35538
|
-
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
35539
|
-
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35540
|
-
displayName: "ItemSelector__ButtonWrapper",
|
|
35541
|
-
componentId: "sc-gptoxp-5"
|
|
35542
|
-
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
35543
|
-
|
|
35544
|
-
export { Button, ButtonTypes, CharacterSelection, Chat, CheckButton, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, ErrorBoundary, HistoryDialog, ImgSide, Input, InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SkillProgressBar, SkillsContainer, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, useEventListener };
|
|
35672
|
+
export { Button, ButtonTypes, CharacterSelection, Chat, ChatDeprecated, CheckButton, CraftBook, DraggableContainer, Dropdown, DropdownSelectorContainer, DynamicText, EquipmentSet, ErrorBoundary, HistoryDialog, ImgSide, Input, InputRadio, ItemContainer$1 as ItemContainer, ItemSelector, ItemSlot, ListMenu, NPCDialog, NPCDialogType, NPCMultiDialog, ProgressBar, PropertySelect, QuestInfo, QuestList, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SkillProgressBar, SkillsContainer, SpriteFromAtlas, TextArea, TimeWidget, TradingMenu, Truncate, _RPGUI, useEventListener };
|
|
35545
35673
|
//# sourceMappingURL=long-bow.esm.js.map
|