@rpg-engine/long-bow 0.3.28 → 0.3.30

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, {
@@ -32787,24 +32785,25 @@ var Chat = function Chat(_ref) {
32787
32785
  type: "text",
32788
32786
  autoComplete: "off",
32789
32787
  onFocus: onFocus,
32790
- onBlur: onBlur
32788
+ onBlur: onBlur,
32789
+ onTouchStart: onFocus
32791
32790
  })), React.createElement(Column, {
32792
32791
  justifyContent: "flex-end"
32793
32792
  }, React.createElement(Button$1, {
32794
- buttonColor: buttonColor,
32795
- buttonBackgroundColor: buttonBackgroundColor,
32793
+ buttonColor: (styles == null ? void 0 : styles.buttonColor) || '#005b96',
32794
+ buttonBackgroundColor: (styles == null ? void 0 : styles.buttonBackgroundColor) || 'rgba(0,0,0,.5)',
32796
32795
  id: "chat-send-button",
32797
32796
  style: {
32798
32797
  borderRadius: '20%'
32799
32798
  }
32800
- }, React.createElement(CiPaperplane, {
32799
+ }, React.createElement(RxPaperPlane, {
32801
32800
  size: 15
32802
32801
  }))))));
32803
32802
  };
32804
32803
  var ChatContainer = /*#__PURE__*/styled.div.withConfig({
32805
32804
  displayName: "Chat__ChatContainer",
32806
32805
  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) {
32806
+ })(["height:", ";width:", ";padding:10px;background-color:rgba(0,0,0,0.2);height:auto;"], function (props) {
32808
32807
  return props.height;
32809
32808
  }, function (_ref3) {
32810
32809
  var width = _ref3.width;
@@ -32817,7 +32816,7 @@ var TextField = /*#__PURE__*/styled.input.withConfig({
32817
32816
  var MessagesContainer = /*#__PURE__*/styled.div.withConfig({
32818
32817
  displayName: "Chat__MessagesContainer",
32819
32818
  componentId: "sc-1bk05n6-2"
32820
- })(["height:70%;margin-bottom:10px;"]);
32819
+ })(["height:70%;margin-bottom:10px;.chat-body{max-height:auto;overflow-y:auto;}"]);
32821
32820
  var Message = /*#__PURE__*/styled.div.withConfig({
32822
32821
  displayName: "Chat__Message",
32823
32822
  componentId: "sc-1bk05n6-3"
@@ -33614,7 +33613,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33614
33613
  onDrop = _ref.onOutsideDrop,
33615
33614
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33616
33615
  openQuantitySelector = _ref.openQuantitySelector,
33617
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33616
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33617
+ dragScale = _ref.dragScale;
33618
33618
  var _useState = useState(false),
33619
33619
  isTooltipVisible = _useState[0],
33620
33620
  setTooltipVisible = _useState[1];
@@ -33778,6 +33778,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33778
33778
  }
33779
33779
  }, React.createElement(Draggable, {
33780
33780
  defaultClassName: item ? 'draggable' : 'empty-slot',
33781
+ scale: dragScale,
33781
33782
  onStop: function onStop(e, data) {
33782
33783
  if (wasDragged && item) {
33783
33784
  var _e$target;
@@ -33897,7 +33898,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
33897
33898
  onItemPlaceDrop = _ref.onItemPlaceDrop,
33898
33899
  onItemOutsideDrop = _ref.onItemOutsideDrop,
33899
33900
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33900
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33901
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33902
+ dragScale = _ref.dragScale;
33901
33903
  var neck = equipmentSet.neck,
33902
33904
  leftHand = equipmentSet.leftHand,
33903
33905
  ring = equipmentSet.ring,
@@ -33942,6 +33944,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
33942
33944
  onDragEnd: function onDragEnd(quantity) {
33943
33945
  if (onItemDragEnd) onItemDragEnd(quantity);
33944
33946
  },
33947
+ dragScale: dragScale,
33945
33948
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
33946
33949
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
33947
33950
  onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
@@ -34723,7 +34726,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34723
34726
  _onOutsideDrop = _ref.onOutsideDrop,
34724
34727
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34725
34728
  initialPosition = _ref.initialPosition,
34726
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
34729
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34730
+ dragScale = _ref.dragScale;
34727
34731
  var _useState = useState({
34728
34732
  isOpen: false,
34729
34733
  maxQuantity: 1,
@@ -34756,6 +34760,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34756
34760
  onDragEnd: function onDragEnd(quantity) {
34757
34761
  if (onItemDragEnd) onItemDragEnd(quantity);
34758
34762
  },
34763
+ dragScale: dragScale,
34759
34764
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34760
34765
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34761
34766
  openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {