@rpg-engine/long-bow 0.3.29 → 0.3.33

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 ? 'auto' : _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,13 +32789,13 @@ 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
  };
@@ -33208,6 +33206,11 @@ var Dropdown = function Dropdown(_ref) {
33208
33206
  return setOpened(function (prev) {
33209
33207
  return !prev;
33210
33208
  });
33209
+ },
33210
+ onTouchStart: function onTouchStart() {
33211
+ return setOpened(function (prev) {
33212
+ return !prev;
33213
+ });
33211
33214
  }
33212
33215
  }, React.createElement("label", null, "\u25BC"), " ", selectedOption), React.createElement(DropdownOptions, {
33213
33216
  className: "rpgui-dropdown-imp",
@@ -33219,6 +33222,11 @@ var Dropdown = function Dropdown(_ref) {
33219
33222
  setSelectedValue(option.value);
33220
33223
  setSelectedOption(option.option);
33221
33224
  setOpened(false);
33225
+ },
33226
+ onTouchStart: function onTouchStart() {
33227
+ setSelectedValue(option.value);
33228
+ setSelectedOption(option.option);
33229
+ setOpened(false);
33222
33230
  }
33223
33231
  }, option.option);
33224
33232
  })));
@@ -33332,7 +33340,14 @@ var CraftBook = function CraftBook(_ref) {
33332
33340
  }
33333
33341
  }), React.createElement("label", {
33334
33342
  onClick: function onClick() {
33335
- return handleClick(option.key);
33343
+ handleClick(option.key);
33344
+ },
33345
+ onTouchStart: function onTouchStart() {
33346
+ handleClick(option.key);
33347
+ setIsShown({
33348
+ show: true,
33349
+ index: index
33350
+ });
33336
33351
  },
33337
33352
  style: {
33338
33353
  display: 'flex',
@@ -33362,11 +33377,15 @@ var CraftBook = function CraftBook(_ref) {
33362
33377
  })));
33363
33378
  })), React.createElement(ButtonWrapper, null, React.createElement(Button, {
33364
33379
  buttonType: ButtonTypes.RPGUIButton,
33365
- onClick: onClose
33380
+ onClick: onClose,
33381
+ onTouchStart: onClose
33366
33382
  }, "Cancel"), React.createElement(Button, {
33367
33383
  buttonType: ButtonTypes.RPGUIButton,
33368
33384
  onClick: function onClick() {
33369
33385
  return onCraftItem(craftItem);
33386
+ },
33387
+ onTouchStart: function onTouchStart() {
33388
+ return onCraftItem(craftItem);
33370
33389
  }
33371
33390
  }, "Craft")));
33372
33391
  };
@@ -33389,7 +33408,7 @@ var Subtitle = /*#__PURE__*/styled.h1.withConfig({
33389
33408
  var RadioInputScroller = /*#__PURE__*/styled.div.withConfig({
33390
33409
  displayName: "CraftBook__RadioInputScroller",
33391
33410
  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;"]);
33411
+ })(["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
33412
  var SpriteAtlasWrapper = /*#__PURE__*/styled.div.withConfig({
33394
33413
  displayName: "CraftBook__SpriteAtlasWrapper",
33395
33414
  componentId: "sc-19q95ue-5"
@@ -33614,7 +33633,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33614
33633
  onDrop = _ref.onOutsideDrop,
33615
33634
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33616
33635
  openQuantitySelector = _ref.openQuantitySelector,
33617
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33636
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33637
+ dragScale = _ref.dragScale;
33618
33638
  var _useState = useState(false),
33619
33639
  isTooltipVisible = _useState[0],
33620
33640
  setTooltipVisible = _useState[1];
@@ -33778,6 +33798,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
33778
33798
  }
33779
33799
  }, React.createElement(Draggable, {
33780
33800
  defaultClassName: item ? 'draggable' : 'empty-slot',
33801
+ scale: dragScale,
33781
33802
  onStop: function onStop(e, data) {
33782
33803
  if (wasDragged && item) {
33783
33804
  var _e$target;
@@ -33897,7 +33918,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
33897
33918
  onItemPlaceDrop = _ref.onItemPlaceDrop,
33898
33919
  onItemOutsideDrop = _ref.onItemOutsideDrop,
33899
33920
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
33900
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
33921
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
33922
+ dragScale = _ref.dragScale;
33901
33923
  var neck = equipmentSet.neck,
33902
33924
  leftHand = equipmentSet.leftHand,
33903
33925
  ring = equipmentSet.ring,
@@ -33942,6 +33964,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
33942
33964
  onDragEnd: function onDragEnd(quantity) {
33943
33965
  if (onItemDragEnd) onItemDragEnd(quantity);
33944
33966
  },
33967
+ dragScale: dragScale,
33945
33968
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
33946
33969
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
33947
33970
  onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
@@ -34723,7 +34746,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34723
34746
  _onOutsideDrop = _ref.onOutsideDrop,
34724
34747
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34725
34748
  initialPosition = _ref.initialPosition,
34726
- checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd;
34749
+ checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34750
+ dragScale = _ref.dragScale;
34727
34751
  var _useState = useState({
34728
34752
  isOpen: false,
34729
34753
  maxQuantity: 1,
@@ -34756,6 +34780,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34756
34780
  onDragEnd: function onDragEnd(quantity) {
34757
34781
  if (onItemDragEnd) onItemDragEnd(quantity);
34758
34782
  },
34783
+ dragScale: dragScale,
34759
34784
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34760
34785
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34761
34786
  openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {