@rpg-engine/long-bow 0.2.99 → 0.3.23
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 +263 -133
- 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 +263 -134
- 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 +82 -105
- package/src/components/Chatdeprecated/ChatDeprecated.tsx +200 -0
- package/src/components/CraftBook/CraftBook.tsx +1 -1
- 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,147 @@ 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
|
+
className: "chat-input dark-background",
|
|
32786
|
+
type: "text",
|
|
32787
|
+
autoComplete: "off",
|
|
32788
|
+
onFocus: onFocus,
|
|
32789
|
+
onBlur: onBlur
|
|
32790
|
+
})), React.createElement(Column, {
|
|
32791
|
+
justifyContent: "flex-end"
|
|
32792
|
+
}, React.createElement(Button$1, {
|
|
32793
|
+
buttonColor: buttonColor,
|
|
32794
|
+
buttonBackgroundColor: buttonBackgroundColor,
|
|
32795
|
+
id: "chat-send-button",
|
|
32796
|
+
style: {
|
|
32797
|
+
borderRadius: '20%'
|
|
32798
|
+
}
|
|
32799
|
+
}, React.createElement(CiPaperplane, {
|
|
32800
|
+
size: 20
|
|
32801
|
+
}))))));
|
|
32802
|
+
};
|
|
32803
|
+
var ChatContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32804
|
+
displayName: "Chat__ChatContainer",
|
|
32805
|
+
componentId: "sc-1bk05n6-0"
|
|
32806
|
+
})(["height:", ";width:", ";border-radius:10px;padding:40px 30px;margin-top:100px;box-shadow:-3px -3px 9px #aaa9a9a2,3px 3px 7px rgba(147,149,151,0.671);"], function (props) {
|
|
32807
|
+
return props.height;
|
|
32808
|
+
}, function (_ref3) {
|
|
32809
|
+
var width = _ref3.width;
|
|
32810
|
+
return width;
|
|
32811
|
+
});
|
|
32812
|
+
var TextField = /*#__PURE__*/styled.input.withConfig({
|
|
32813
|
+
displayName: "Chat__TextField",
|
|
32814
|
+
componentId: "sc-1bk05n6-1"
|
|
32815
|
+
})(["width:100%;border-radius:10px;box-shadow:-3px -3px 9px #aaa9a9a2,3px 3px 7px rgba(147,149,151,0.671);"]);
|
|
32816
|
+
var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
|
|
32817
|
+
displayName: "Chat__MessagesContainer",
|
|
32818
|
+
componentId: "sc-1bk05n6-2"
|
|
32819
|
+
})(["overflow:hidden;height:70%;margin-bottom:20px;"]);
|
|
32820
|
+
var Message = /*#__PURE__*/styled.div.withConfig({
|
|
32821
|
+
displayName: "Chat__Message",
|
|
32822
|
+
componentId: "sc-1bk05n6-3"
|
|
32823
|
+
})(["margin-bottom:8px;color:", ";"], function (_ref4) {
|
|
32824
|
+
var color = _ref4.color;
|
|
32825
|
+
return color;
|
|
32826
|
+
});
|
|
32827
|
+
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32828
|
+
displayName: "Chat__Form",
|
|
32829
|
+
componentId: "sc-1bk05n6-4"
|
|
32830
|
+
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32831
|
+
var Button$1 = /*#__PURE__*/styled.button.withConfig({
|
|
32832
|
+
displayName: "Chat__Button",
|
|
32833
|
+
componentId: "sc-1bk05n6-5"
|
|
32834
|
+
})(["color:", ";background-color:", ";width:50px;height:40px;"], function (_ref5) {
|
|
32835
|
+
var buttonColor = _ref5.buttonColor;
|
|
32836
|
+
return buttonColor;
|
|
32837
|
+
}, function (_ref6) {
|
|
32838
|
+
var buttonBackgroundColor = _ref6.buttonBackgroundColor;
|
|
32839
|
+
return buttonBackgroundColor;
|
|
32840
|
+
});
|
|
32841
|
+
|
|
32700
32842
|
var uiColors = {
|
|
32701
32843
|
lightGray: '#757161',
|
|
32702
32844
|
gray: '#4E4A4E',
|
|
@@ -32757,20 +32899,7 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
|
|
|
32757
32899
|
return width;
|
|
32758
32900
|
});
|
|
32759
32901
|
|
|
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) {
|
|
32902
|
+
var ChatDeprecated = function ChatDeprecated(_ref) {
|
|
32774
32903
|
var chatMessages = _ref.chatMessages,
|
|
32775
32904
|
onSendChatMessage = _ref.onSendChatMessage,
|
|
32776
32905
|
_ref$opacity = _ref.opacity,
|
|
@@ -32835,7 +32964,7 @@ var Chat = function Chat(_ref) {
|
|
|
32835
32964
|
width: '100%',
|
|
32836
32965
|
height: '80%',
|
|
32837
32966
|
className: "chat-body dark-background"
|
|
32838
|
-
}, onRenderChatMessages(chatMessages)), React.createElement(Form, {
|
|
32967
|
+
}, onRenderChatMessages(chatMessages)), React.createElement(Form$1, {
|
|
32839
32968
|
onSubmit: handleSubmit
|
|
32840
32969
|
}, React.createElement(Column, {
|
|
32841
32970
|
flex: 70
|
|
@@ -32859,30 +32988,30 @@ var Chat = function Chat(_ref) {
|
|
|
32859
32988
|
}, "Send"))))));
|
|
32860
32989
|
};
|
|
32861
32990
|
var Container$5 = /*#__PURE__*/styled.div.withConfig({
|
|
32862
|
-
displayName: "
|
|
32863
|
-
componentId: "sc-
|
|
32991
|
+
displayName: "ChatDeprecated__Container",
|
|
32992
|
+
componentId: "sc-fuuod3-0"
|
|
32864
32993
|
})(["position:relative;"]);
|
|
32865
32994
|
var CloseButton = /*#__PURE__*/styled.div.withConfig({
|
|
32866
|
-
displayName: "
|
|
32867
|
-
componentId: "sc-
|
|
32995
|
+
displayName: "ChatDeprecated__CloseButton",
|
|
32996
|
+
componentId: "sc-fuuod3-1"
|
|
32868
32997
|
})(["position:absolute;top:2px;right:0px;color:white;z-index:22;font-size:0.7rem;"]);
|
|
32869
32998
|
var CustomInput = /*#__PURE__*/styled(Input).withConfig({
|
|
32870
|
-
displayName: "
|
|
32871
|
-
componentId: "sc-
|
|
32999
|
+
displayName: "ChatDeprecated__CustomInput",
|
|
33000
|
+
componentId: "sc-fuuod3-2"
|
|
32872
33001
|
})(["height:30px;width:100%;.rpgui-content .input{min-height:39px;}"]);
|
|
32873
33002
|
var CustomContainer = /*#__PURE__*/styled(RPGUIContainer).withConfig({
|
|
32874
|
-
displayName: "
|
|
32875
|
-
componentId: "sc-
|
|
33003
|
+
displayName: "ChatDeprecated__CustomContainer",
|
|
33004
|
+
componentId: "sc-fuuod3-3"
|
|
32876
33005
|
})(["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
33006
|
return props.opacity;
|
|
32878
33007
|
}, uiColors.darkGray);
|
|
32879
|
-
var Form = /*#__PURE__*/styled.form.withConfig({
|
|
32880
|
-
displayName: "
|
|
32881
|
-
componentId: "sc-
|
|
33008
|
+
var Form$1 = /*#__PURE__*/styled.form.withConfig({
|
|
33009
|
+
displayName: "ChatDeprecated__Form",
|
|
33010
|
+
componentId: "sc-fuuod3-4"
|
|
32882
33011
|
})(["display:flex;width:100%;justify-content:center;align-items:center;"]);
|
|
32883
33012
|
var MessageText = /*#__PURE__*/styled.p.withConfig({
|
|
32884
|
-
displayName: "
|
|
32885
|
-
componentId: "sc-
|
|
33013
|
+
displayName: "ChatDeprecated__MessageText",
|
|
33014
|
+
componentId: "sc-fuuod3-5"
|
|
32886
33015
|
})(["display:block !important;width:100%;font-size:", " !important;overflow-y:auto;margin:0;"], uiFonts.size.xsmall);
|
|
32887
33016
|
|
|
32888
33017
|
var CheckButton = function CheckButton(_ref) {
|
|
@@ -33130,7 +33259,7 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33130
33259
|
var getDropdownOptions = function getDropdownOptions() {
|
|
33131
33260
|
var options = [];
|
|
33132
33261
|
Object.keys(ItemSubType).forEach(function (key) {
|
|
33133
|
-
if (key === 'CraftingResource') {
|
|
33262
|
+
if (key === 'CraftingResource' || key === 'DeadBody') {
|
|
33134
33263
|
return; // we can't craft crafting resouces...
|
|
33135
33264
|
}
|
|
33136
33265
|
|
|
@@ -34682,6 +34811,92 @@ var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34682
34811
|
componentId: "sc-15y5p9l-1"
|
|
34683
34812
|
})(["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
34813
|
|
|
34814
|
+
var ItemSelector = function ItemSelector(_ref) {
|
|
34815
|
+
var atlasIMG = _ref.atlasIMG,
|
|
34816
|
+
atlasJSON = _ref.atlasJSON,
|
|
34817
|
+
options = _ref.options,
|
|
34818
|
+
onClose = _ref.onClose,
|
|
34819
|
+
onSelect = _ref.onSelect;
|
|
34820
|
+
var _useState = useState(),
|
|
34821
|
+
selectedValue = _useState[0],
|
|
34822
|
+
setSelectedValue = _useState[1];
|
|
34823
|
+
var handleClick = function handleClick() {
|
|
34824
|
+
var element = document.querySelector("input[name='test']:checked");
|
|
34825
|
+
var elementValue = element.value;
|
|
34826
|
+
setSelectedValue(elementValue);
|
|
34827
|
+
};
|
|
34828
|
+
useEffect(function () {
|
|
34829
|
+
if (selectedValue) {
|
|
34830
|
+
onSelect(selectedValue);
|
|
34831
|
+
}
|
|
34832
|
+
}, [selectedValue]);
|
|
34833
|
+
return React.createElement(DraggableContainer, {
|
|
34834
|
+
type: RPGUIContainerTypes.Framed,
|
|
34835
|
+
width: "500px",
|
|
34836
|
+
cancelDrag: ".equipment-container-body .arrow-selector",
|
|
34837
|
+
onCloseButton: function onCloseButton() {
|
|
34838
|
+
if (onClose) {
|
|
34839
|
+
onClose();
|
|
34840
|
+
}
|
|
34841
|
+
}
|
|
34842
|
+
}, React.createElement("div", {
|
|
34843
|
+
style: {
|
|
34844
|
+
width: '100%'
|
|
34845
|
+
}
|
|
34846
|
+
}, React.createElement(Title$2, null, 'Harvesting instruments'), React.createElement(Subtitle$1, null, 'Use the tool, you need it'), React.createElement("hr", {
|
|
34847
|
+
className: "golden"
|
|
34848
|
+
})), React.createElement(RadioInputScroller$1, null, options == null ? void 0 : options.map(function (option, index) {
|
|
34849
|
+
return React.createElement(RadioOptionsWrapper$1, {
|
|
34850
|
+
key: index
|
|
34851
|
+
}, React.createElement(SpriteAtlasWrapper$1, null, React.createElement(SpriteFromAtlas, {
|
|
34852
|
+
atlasIMG: atlasIMG,
|
|
34853
|
+
atlasJSON: atlasJSON,
|
|
34854
|
+
spriteKey: option.imageKey,
|
|
34855
|
+
imgScale: 3
|
|
34856
|
+
})), React.createElement("div", null, React.createElement("input", {
|
|
34857
|
+
className: "rpgui-radio",
|
|
34858
|
+
type: "radio",
|
|
34859
|
+
value: option.name,
|
|
34860
|
+
name: "test"
|
|
34861
|
+
}), React.createElement("label", {
|
|
34862
|
+
onClick: handleClick,
|
|
34863
|
+
style: {
|
|
34864
|
+
display: 'flex',
|
|
34865
|
+
alignItems: 'center'
|
|
34866
|
+
}
|
|
34867
|
+
}, option.name, " ", React.createElement("br", null), option.description)));
|
|
34868
|
+
})), React.createElement(ButtonWrapper$1, null, React.createElement(Button, {
|
|
34869
|
+
buttonType: ButtonTypes.RPGUIButton,
|
|
34870
|
+
onClick: onClose
|
|
34871
|
+
}, "Cancel"), React.createElement(Button, {
|
|
34872
|
+
buttonType: ButtonTypes.RPGUIButton
|
|
34873
|
+
}, "Select")));
|
|
34874
|
+
};
|
|
34875
|
+
var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
34876
|
+
displayName: "ItemSelector__Title",
|
|
34877
|
+
componentId: "sc-gptoxp-0"
|
|
34878
|
+
})(["font-size:0.6rem;color:yellow !important;"]);
|
|
34879
|
+
var Subtitle$1 = /*#__PURE__*/styled.h1.withConfig({
|
|
34880
|
+
displayName: "ItemSelector__Subtitle",
|
|
34881
|
+
componentId: "sc-gptoxp-1"
|
|
34882
|
+
})(["font-size:0.4rem;color:yellow !important;"]);
|
|
34883
|
+
var RadioInputScroller$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34884
|
+
displayName: "ItemSelector__RadioInputScroller",
|
|
34885
|
+
componentId: "sc-gptoxp-2"
|
|
34886
|
+
})(["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;"]);
|
|
34887
|
+
var SpriteAtlasWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34888
|
+
displayName: "ItemSelector__SpriteAtlasWrapper",
|
|
34889
|
+
componentId: "sc-gptoxp-3"
|
|
34890
|
+
})(["margin-right:40px;"]);
|
|
34891
|
+
var RadioOptionsWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34892
|
+
displayName: "ItemSelector__RadioOptionsWrapper",
|
|
34893
|
+
componentId: "sc-gptoxp-4"
|
|
34894
|
+
})(["display:flex;align-items:stretch;margin-bottom:40px;"]);
|
|
34895
|
+
var ButtonWrapper$1 = /*#__PURE__*/styled.div.withConfig({
|
|
34896
|
+
displayName: "ItemSelector__ButtonWrapper",
|
|
34897
|
+
componentId: "sc-gptoxp-5"
|
|
34898
|
+
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;"]);
|
|
34899
|
+
|
|
34685
34900
|
var ListMenu = function ListMenu(_ref) {
|
|
34686
34901
|
var options = _ref.options,
|
|
34687
34902
|
onSelected = _ref.onSelected,
|
|
@@ -34817,7 +35032,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34817
35032
|
onTouchStart: onRightClick
|
|
34818
35033
|
}), React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
34819
35034
|
className: "drag-handler"
|
|
34820
|
-
}, React.createElement(Title$
|
|
35035
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
34821
35036
|
src: quests[currentIndex].thumbnail || img$9
|
|
34822
35037
|
}), quests[currentIndex].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
34823
35038
|
className: "golden"
|
|
@@ -34836,7 +35051,7 @@ var QuestInfo = function QuestInfo(_ref) {
|
|
|
34836
35051
|
}, button.title);
|
|
34837
35052
|
})))) : React.createElement(QuestsContainer, null, React.createElement(QuestContainer, null, React.createElement(TitleContainer$1, {
|
|
34838
35053
|
className: "drag-handler"
|
|
34839
|
-
}, React.createElement(Title$
|
|
35054
|
+
}, React.createElement(Title$3, null, React.createElement(Thumbnail, {
|
|
34840
35055
|
src: quests[0].thumbnail || img$9
|
|
34841
35056
|
}), quests[0].title), React.createElement(QuestSplitDiv, null, React.createElement("hr", {
|
|
34842
35057
|
className: "golden"
|
|
@@ -34883,7 +35098,7 @@ var TitleContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
34883
35098
|
displayName: "QuestInfo__TitleContainer",
|
|
34884
35099
|
componentId: "sc-15s2boc-6"
|
|
34885
35100
|
})(["width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;margin-top:1rem;"]);
|
|
34886
|
-
var Title$
|
|
35101
|
+
var Title$3 = /*#__PURE__*/styled.h1.withConfig({
|
|
34887
35102
|
displayName: "QuestInfo__Title",
|
|
34888
35103
|
componentId: "sc-15s2boc-7"
|
|
34889
35104
|
})(["color:white;z-index:22;font-size:", " !important;color:", " !important;"], uiFonts.size.medium, uiColors.yellow);
|
|
@@ -34905,7 +35120,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
34905
35120
|
style: {
|
|
34906
35121
|
width: '100%'
|
|
34907
35122
|
}
|
|
34908
|
-
}, React.createElement(Title$
|
|
35123
|
+
}, React.createElement(Title$4, null, "Quests"), React.createElement("hr", {
|
|
34909
35124
|
className: "golden"
|
|
34910
35125
|
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
34911
35126
|
return React.createElement("div", {
|
|
@@ -34926,7 +35141,7 @@ var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConf
|
|
|
34926
35141
|
displayName: "QuestList__QuestDraggableContainer",
|
|
34927
35142
|
componentId: "sc-1a2vx6q-0"
|
|
34928
35143
|
})([".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$
|
|
35144
|
+
var Title$4 = /*#__PURE__*/styled.h1.withConfig({
|
|
34930
35145
|
displayName: "QuestList__Title",
|
|
34931
35146
|
componentId: "sc-1a2vx6q-1"
|
|
34932
35147
|
})(["z-index:22;font-size:", " !important;color:yellow !important;"], uiFonts.size.medium);
|
|
@@ -34939,15 +35154,6 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
34939
35154
|
componentId: "sc-1a2vx6q-3"
|
|
34940
35155
|
})(["text-align:center;p{margin-top:5px;}"]);
|
|
34941
35156
|
|
|
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
35157
|
var InputRadio = function InputRadio(_ref) {
|
|
34952
35158
|
var name = _ref.name,
|
|
34953
35159
|
items = _ref.items,
|
|
@@ -34980,6 +35186,15 @@ var InputRadio = function InputRadio(_ref) {
|
|
|
34980
35186
|
}));
|
|
34981
35187
|
};
|
|
34982
35188
|
|
|
35189
|
+
//@ts-ignore
|
|
35190
|
+
var _RPGUI = RPGUI;
|
|
35191
|
+
var RPGUIRoot = function RPGUIRoot(_ref) {
|
|
35192
|
+
var children = _ref.children;
|
|
35193
|
+
return React.createElement("div", {
|
|
35194
|
+
className: "rpgui-content"
|
|
35195
|
+
}, children);
|
|
35196
|
+
};
|
|
35197
|
+
|
|
34983
35198
|
var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
34984
35199
|
var value = _ref.value,
|
|
34985
35200
|
_ref$bgColor = _ref.bgColor,
|
|
@@ -35384,7 +35599,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35384
35599
|
style: {
|
|
35385
35600
|
width: '100%'
|
|
35386
35601
|
}
|
|
35387
|
-
}, React.createElement(Title$
|
|
35602
|
+
}, React.createElement(Title$5, null, Capitalize(type), " Menu"), React.createElement("hr", {
|
|
35388
35603
|
className: "golden"
|
|
35389
35604
|
})), React.createElement(TradingComponentScrollWrapper, null, traderItems.map(function (tradeItem, index) {
|
|
35390
35605
|
var _qtyMap$get;
|
|
@@ -35397,7 +35612,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35397
35612
|
traderItem: tradeItem,
|
|
35398
35613
|
selectedQty: (_qtyMap$get = qtyMap.get(tradeItem.key)) != null ? _qtyMap$get : 0
|
|
35399
35614
|
}));
|
|
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$
|
|
35615
|
+
})), 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
35616
|
buttonType: ButtonTypes.RPGUIButton,
|
|
35402
35617
|
disabled: !hasGoldForSale(),
|
|
35403
35618
|
onClick: function onClick() {
|
|
@@ -35410,7 +35625,7 @@ var TradingMenu = function TradingMenu(_ref) {
|
|
|
35410
35625
|
}
|
|
35411
35626
|
}, "Cancel"))));
|
|
35412
35627
|
};
|
|
35413
|
-
var Title$
|
|
35628
|
+
var Title$5 = /*#__PURE__*/styled.h1.withConfig({
|
|
35414
35629
|
displayName: "TradingMenu__Title",
|
|
35415
35630
|
componentId: "sc-1wjsz1l-0"
|
|
35416
35631
|
})(["z-index:22;font-size:0.6rem;color:yellow !important;"]);
|
|
@@ -35434,7 +35649,7 @@ var AlertWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
35434
35649
|
displayName: "TradingMenu__AlertWrapper",
|
|
35435
35650
|
componentId: "sc-1wjsz1l-5"
|
|
35436
35651
|
})(["margin-top:1rem;display:flex;width:100%;justify-content:center;height:20px;p{color:red !important;}"]);
|
|
35437
|
-
var ButtonWrapper$
|
|
35652
|
+
var ButtonWrapper$2 = /*#__PURE__*/styled.div.withConfig({
|
|
35438
35653
|
displayName: "TradingMenu__ButtonWrapper",
|
|
35439
35654
|
componentId: "sc-1wjsz1l-6"
|
|
35440
35655
|
})(["display:flex;justify-content:space-around;padding-top:20px;width:100%;margin-top:1rem;"]);
|
|
@@ -35455,91 +35670,5 @@ var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
|
35455
35670
|
return props.maxLines;
|
|
35456
35671
|
});
|
|
35457
35672
|
|
|
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 };
|
|
35673
|
+
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
35674
|
//# sourceMappingURL=long-bow.esm.js.map
|