@rpg-engine/long-bow 0.3.28 → 0.3.32

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.
@@ -3,7 +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
+ import { RxPaperPlane } from 'react-icons/rx';
7
7
  import Draggable from 'react-draggable';
8
8
  import { v4 } from 'uuid';
9
9
  import { observer } from 'mobx-react-lite';
@@ -32714,18 +32714,16 @@ var Column = /*#__PURE__*/styled.div.withConfig({
32714
32714
  var Chat = function Chat(_ref) {
32715
32715
  var chatMessages = _ref.chatMessages,
32716
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
32717
  onFocus = _ref.onFocus,
32722
32718
  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;
32719
+ _ref$styles = _ref.styles,
32720
+ styles = _ref$styles === void 0 ? {
32721
+ textColor: '#c65102',
32722
+ buttonColor: '#005b96',
32723
+ buttonBackgroundColor: 'rgba(0,0,0,.2)',
32724
+ width: '80%',
32725
+ height: 'auto'
32726
+ } : _ref$styles;
32729
32727
  var _useState = useState(''),
32730
32728
  message = _useState[0],
32731
32729
  setMessage = _useState[1];
@@ -32759,16 +32757,16 @@ var Chat = function Chat(_ref) {
32759
32757
  emitter = _ref2.emitter,
32760
32758
  message = _ref2.message;
32761
32759
  return React.createElement(Message, {
32762
- color: color,
32760
+ color: (styles == null ? void 0 : styles.textColor) || '#c65102',
32763
32761
  key: _id + "_" + index
32764
32762
  }, onRenderMessageLines(emitter, createdAt, message));
32765
32763
  }) : React.createElement(Message, {
32766
- color: color
32764
+ color: (styles == null ? void 0 : styles.textColor) || '#c65102'
32767
32765
  }, "No messages available.");
32768
32766
  };
32769
32767
  return React.createElement(ChatContainer, {
32770
- width: width,
32771
- height: height
32768
+ width: (styles == null ? void 0 : styles.width) || '80%',
32769
+ height: (styles == null ? void 0 : styles.height) || 'auto'
32772
32770
  }, React.createElement(ErrorBoundary$1, {
32773
32771
  fallback: React.createElement("p", null, "Oops! Your chat has crashed.")
32774
32772
  }, React.createElement(MessagesContainer, {
@@ -32791,20 +32789,20 @@ var Chat = function Chat(_ref) {
32791
32789
  })), React.createElement(Column, {
32792
32790
  justifyContent: "flex-end"
32793
32791
  }, React.createElement(Button$1, {
32794
- buttonColor: buttonColor,
32795
- buttonBackgroundColor: buttonBackgroundColor,
32792
+ buttonColor: (styles == null ? void 0 : styles.buttonColor) || '#005b96',
32793
+ buttonBackgroundColor: (styles == null ? void 0 : styles.buttonBackgroundColor) || 'rgba(0,0,0,.5)',
32796
32794
  id: "chat-send-button",
32797
32795
  style: {
32798
32796
  borderRadius: '20%'
32799
32797
  }
32800
- }, React.createElement(CiPaperplane, {
32798
+ }, React.createElement(RxPaperPlane, {
32801
32799
  size: 15
32802
32800
  }))))));
32803
32801
  };
32804
32802
  var ChatContainer = /*#__PURE__*/styled.div.withConfig({
32805
32803
  displayName: "Chat__ChatContainer",
32806
32804
  componentId: "sc-1bk05n6-0"
32807
- })(["height:", ";width:", ";padding:10px;margin-top:100px;background-color:rgba(0,0,0,0.2);.chat-body{max-height:170px;overflow-y:auto;}"], function (props) {
32805
+ })(["height:", ";width:", ";padding:10px;background-color:rgba(0,0,0,0.2);height:auto;"], function (props) {
32808
32806
  return props.height;
32809
32807
  }, function (_ref3) {
32810
32808
  var width = _ref3.width;
@@ -32817,7 +32815,7 @@ var TextField = /*#__PURE__*/styled.input.withConfig({
32817
32815
  var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
32818
32816
  displayName: "Chat__MessagesContainer",
32819
32817
  componentId: "sc-1bk05n6-2"
32820
- })(["height:70%;margin-bottom:10px;"]);
32818
+ })(["height:70%;margin-bottom:10px;.chat-body{max-height:auto;overflow-y:auto;}"]);
32821
32819
  var Message = /*#__PURE__*/styled.div.withConfig({
32822
32820
  displayName: "Chat__Message",
32823
32821
  componentId: "sc-1bk05n6-3"
@@ -33332,7 +33330,14 @@ var CraftBook = function CraftBook(_ref) {
33332
33330
  }
33333
33331
  }), React.createElement("label", {
33334
33332
  onClick: function onClick() {
33335
- return handleClick(option.key);
33333
+ handleClick(option.key);
33334
+ },
33335
+ onTouchStart: function onTouchStart() {
33336
+ handleClick(option.key);
33337
+ setIsShown({
33338
+ show: true,
33339
+ index: index
33340
+ });
33336
33341
  },
33337
33342
  style: {
33338
33343
  display: 'flex',
@@ -33362,11 +33367,15 @@ var CraftBook = function CraftBook(_ref) {
33362
33367
  })));
33363
33368
  })), React.createElement(ButtonWrapper, null, React.createElement(Button, {
33364
33369
  buttonType: ButtonTypes.RPGUIButton,
33365
- onClick: onClose
33370
+ onClick: onClose,
33371
+ onTouchStart: onClose
33366
33372
  }, "Cancel"), React.createElement(Button, {
33367
33373
  buttonType: ButtonTypes.RPGUIButton,
33368
33374
  onClick: function onClick() {
33369
33375
  return onCraftItem(craftItem);
33376
+ },
33377
+ onTouchStart: function onTouchStart() {
33378
+ return onCraftItem(craftItem);
33370
33379
  }
33371
33380
  }, "Craft")));
33372
33381
  };
@@ -33389,7 +33398,7 @@ var Subtitle = /*#__PURE__*/styled.h1.withConfig({
33389
33398
  var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
33390
33399
  displayName: "CraftBook__RadioInputScroller",
33391
33400
  componentId: "sc-19q95ue-4"
33392
- })(["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;"]);
33401
+ })(["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;-webkit-overflow-scrolling:touch;"]);
33393
33402
  var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
33394
33403
  displayName: "CraftBook__SpriteAtlasWrapper",
33395
33404
  componentId: "sc-19q95ue-5"
@@ -33614,7 +33623,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33614
33623
  onDrop = _ref.onOutsideDrop,
33615
33624
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33616
33625
  openQuantitySelector = _ref.openQuantitySelector,
33617
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33626
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33627
+ dragScale = _ref.dragScale;
33618
33628
  var _useState = useState(false),
33619
33629
  isTooltipVisible = _useState[0],
33620
33630
  setTooltipVisible = _useState[1];
@@ -33778,6 +33788,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33778
33788
  }
33779
33789
  }, React.createElement(Draggable, {
33780
33790
  defaultClassName: item ? 'draggable' : 'empty-slot',
33791
+ scale: dragScale,
33781
33792
  onStop: function onStop(e, data) {
33782
33793
  if (wasDragged && item) {
33783
33794
  var _e$target;
@@ -33897,7 +33908,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
33897
33908
  onItemPlaceDrop = _ref.onItemPlaceDrop,
33898
33909
  onItemOutsideDrop = _ref.onItemOutsideDrop,
33899
33910
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33900
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33911
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33912
+ dragScale = _ref.dragScale;
33901
33913
  var neck = equipmentSet.neck,
33902
33914
  leftHand = equipmentSet.leftHand,
33903
33915
  ring = equipmentSet.ring,
@@ -33942,6 +33954,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
33942
33954
  onDragEnd: function onDragEnd(quantity) {
33943
33955
  if (onItemDragEnd) onItemDragEnd(quantity);
33944
33956
  },
33957
+ dragScale: dragScale,
33945
33958
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
33946
33959
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
33947
33960
  onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
@@ -34723,7 +34736,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34723
34736
  _onOutsideDrop = _ref.onOutsideDrop,
34724
34737
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34725
34738
  initialPosition = _ref.initialPosition,
34726
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
34739
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34740
+ dragScale = _ref.dragScale;
34727
34741
  var _useState = useState({
34728
34742
  isOpen: false,
34729
34743
  maxQuantity: 1,
@@ -34756,6 +34770,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34756
34770
  onDragEnd: function onDragEnd(quantity) {
34757
34771
  if (onItemDragEnd) onItemDragEnd(quantity);
34758
34772
  },
34773
+ dragScale: dragScale,
34759
34774
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34760
34775
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34761
34776
  openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {