@rpg-engine/long-bow 0.1.71 → 0.1.72

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.
@@ -6,8 +6,8 @@ import Draggable from 'react-draggable';
6
6
  import { v4 } from 'uuid';
7
7
  import 'rpgui/rpgui.min.css';
8
8
  import 'rpgui/rpgui.min.js';
9
+ import { GRID_WIDTH, GRID_HEIGHT, ItemType, ItemSocketEventsDisplayLabels, ActionsByItemType, ItemSocketEvents, ItemSlotType, getSPForLevel } from '@rpg-engine/shared';
9
10
  import { observer } from 'mobx-react';
10
- import { ItemType, ItemSocketEventsDisplayLabels, ActionsByItemType, GRID_WIDTH, GRID_HEIGHT, ItemSocketEvents, getSPForLevel, ItemSlotType } from '@rpg-engine/shared';
11
11
  import { makeAutoObservable, toJS } from 'mobx';
12
12
 
13
13
  function _extends() {
@@ -452,152 +452,23 @@ var Dropdown = function Dropdown(_ref) {
452
452
  }));
453
453
  };
454
454
 
455
- var SlotsContainer = function SlotsContainer(_ref) {
456
- var children = _ref.children,
457
- title = _ref.title,
458
- onClose = _ref.onClose,
459
- _onPositionChange = _ref.onPositionChange,
460
- onOutsideClick = _ref.onOutsideClick;
461
- return React.createElement(DraggableContainer, {
462
- title: title,
463
- type: RPGUIContainerTypes.Framed,
464
- onCloseButton: function onCloseButton() {
465
- if (onClose) {
466
- onClose();
467
- }
468
- },
469
- width: "330px",
470
- cancelDrag: ".item-container-body",
471
- onPositionChange: function onPositionChange(_ref2) {
472
- var x = _ref2.x,
473
- y = _ref2.y;
474
-
475
- if (_onPositionChange) {
476
- _onPositionChange({
477
- x: x,
478
- y: y
479
- });
480
- }
481
- },
482
- onOutsideClick: onOutsideClick
483
- }, children);
484
- };
485
-
486
- var ListMenu = function ListMenu(_ref) {
487
- var options = _ref.options,
488
- onSelected = _ref.onSelected,
455
+ var ItemCard = function ItemCard(_ref) {
456
+ var item = _ref.item,
489
457
  x = _ref.x,
490
- y = _ref.y,
491
- _ref$fontSize = _ref.fontSize,
492
- fontSize = _ref$fontSize === void 0 ? 0.8 : _ref$fontSize;
458
+ y = _ref.y;
493
459
  return React.createElement(Container$3, {
494
460
  x: x,
495
- y: y,
496
- fontSize: fontSize
497
- }, React.createElement("ul", {
498
- className: "rpgui-list-imp",
499
- style: {
500
- overflow: 'hidden'
501
- }
502
- }, options.map(function (params) {
503
- return React.createElement(ListElement, {
504
- key: params == null ? void 0 : params.id,
505
- onClick: function onClick() {
506
- onSelected(params == null ? void 0 : params.id);
507
- }
508
- }, (params == null ? void 0 : params.text) || 'No text');
509
- })));
461
+ y: y
462
+ }, item == null ? void 0 : item.name);
510
463
  };
511
464
  var Container$3 = /*#__PURE__*/styled.div.withConfig({
512
- displayName: "ListMenu__Container",
513
- componentId: "sc-i9097t-0"
514
- })(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", "em;}"], function (props) {
465
+ displayName: "ItemCard__Container",
466
+ componentId: "sc-170rits-0"
467
+ })(["position:absolute;top:", "px;left:", "px;font-size:0.5rem;color:white;background-color:black;border-radius:5px;padding:0.5rem;min-width:20px;opacity:0.5;"], function (props) {
515
468
  return props.y || 0;
516
469
  }, function (props) {
517
470
  return props.x || 0;
518
- }, function (props) {
519
- return props.fontSize;
520
471
  });
521
- var ListElement = /*#__PURE__*/styled.li.withConfig({
522
- displayName: "ListMenu__ListElement",
523
- componentId: "sc-i9097t-1"
524
- })(["margin-right:0.5rem;"]);
525
-
526
- var ContainerType;
527
-
528
- (function (ContainerType) {
529
- ContainerType["INVENTORY"] = "Inventory";
530
- ContainerType["EQUIPMENT_SET"] = "EquipmentSet";
531
- })(ContainerType || (ContainerType = {})); // TODO: Refactor this file
532
-
533
-
534
- var generateContextList = function generateContextList(actionsByTypeList) {
535
- var contextMenu = actionsByTypeList.map(function (action) {
536
- return {
537
- id: action,
538
- text: ItemSocketEventsDisplayLabels[action]
539
- };
540
- });
541
- return contextMenu;
542
- };
543
-
544
- var handleContextMenuList = function handleContextMenuList(itemType) {
545
- var contextActionMenu = [];
546
-
547
- switch (itemType) {
548
- case ItemType.Weapon:
549
- case ItemType.Armor:
550
- case ItemType.Accessory:
551
- case ItemType.Jewelry:
552
- case ItemType.Tool:
553
- contextActionMenu = generateContextList(ActionsByItemType.Equipment);
554
- break;
555
-
556
- case ItemType.Consumable:
557
- contextActionMenu = generateContextList(ActionsByItemType.Consumable);
558
- break;
559
-
560
- case ItemType.CraftMaterial:
561
- contextActionMenu = generateContextList(ActionsByItemType.CraftMaterial);
562
- break;
563
-
564
- case ItemType.Other:
565
- case ItemType.Information:
566
- case ItemType.Quest:
567
- case ItemType.Container:
568
- contextActionMenu = generateContextList(ActionsByItemType.Other);
569
- break;
570
-
571
- default:
572
- contextActionMenu = generateContextList(ActionsByItemType.Other);
573
- break;
574
- }
575
-
576
- return contextActionMenu;
577
- };
578
- var handleEquipmentContextMenuList = function handleEquipmentContextMenuList(itemType) {
579
- var contextActionMenu = [];
580
-
581
- switch (itemType) {
582
- case ItemType.Weapon:
583
- case ItemType.Armor:
584
- case ItemType.Accessory:
585
- case ItemType.Jewelry:
586
- case ItemType.Tool:
587
- contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetItems);
588
- break;
589
-
590
- case ItemType.Container:
591
- contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetContainer);
592
- break;
593
-
594
- default:
595
- contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetItems);
596
- break;
597
- }
598
-
599
- return contextActionMenu;
600
- };
601
472
 
602
473
  var frames = {
603
474
  "helmets/berserkers-helmet.png": {
@@ -6795,8 +6666,11 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
6795
6666
  width = _ref$width === void 0 ? GRID_WIDTH : _ref$width,
6796
6667
  _ref$height = _ref.height,
6797
6668
  height = _ref$height === void 0 ? GRID_HEIGHT : _ref$height,
6798
- _ref$scale = _ref.scale,
6799
- scale = _ref$scale === void 0 ? 2 : _ref$scale,
6669
+ _ref$imgScale = _ref.imgScale,
6670
+ imgScale = _ref$imgScale === void 0 ? 2 : _ref$imgScale,
6671
+ imgStyle = _ref.imgStyle,
6672
+ onClick = _ref.onClick,
6673
+ containerStyle = _ref.containerStyle,
6800
6674
  _ref$grayScale = _ref.grayScale,
6801
6675
  grayScale = _ref$grayScale === void 0 ? false : _ref$grayScale,
6802
6676
  _ref$opacity = _ref.opacity,
@@ -6807,19 +6681,22 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
6807
6681
  return React.createElement(Container$4, {
6808
6682
  width: width,
6809
6683
  height: height,
6810
- hasHover: grayScale
6684
+ hasHover: grayScale,
6685
+ onClick: onClick,
6686
+ style: containerStyle
6811
6687
  }, React.createElement(ImgSprite, {
6812
6688
  className: "sprite-from-atlas-img",
6813
6689
  atlasIMG: atlasIMG,
6814
6690
  frame: spriteData.frame,
6815
- scale: scale,
6691
+ scale: imgScale,
6816
6692
  grayScale: grayScale,
6817
- opacity: opacity
6693
+ opacity: opacity,
6694
+ style: imgStyle
6818
6695
  }));
6819
6696
  };
6820
6697
  var Container$4 = /*#__PURE__*/styled.div.withConfig({
6821
6698
  displayName: "SpriteFromAtlas__Container",
6822
- componentId: "sc-v74jf1-0"
6699
+ componentId: "sc-1lpani8-0"
6823
6700
  })(["width:", "px;height:", "px;", ""], function (props) {
6824
6701
  return props.width;
6825
6702
  }, function (props) {
@@ -6829,7 +6706,7 @@ var Container$4 = /*#__PURE__*/styled.div.withConfig({
6829
6706
  });
6830
6707
  var ImgSprite = /*#__PURE__*/styled.div.withConfig({
6831
6708
  displayName: "SpriteFromAtlas__ImgSprite",
6832
- componentId: "sc-v74jf1-1"
6709
+ componentId: "sc-1lpani8-1"
6833
6710
  })(["width:", "px;height:", "px;background-image:url(", ");background-position:-", "px -", "px;transform:scale(", ");position:relative;top:8px;left:8px;filter:", ";opacity:", ";"], function (props) {
6834
6711
  return props.frame.w;
6835
6712
  }, function (props) {
@@ -6890,7 +6767,7 @@ var ItemSlot = function ItemSlot(_ref) {
6890
6767
  atlasIMG: img,
6891
6768
  atlasJSON: atlasJSON,
6892
6769
  spriteKey: itemToRender.texturePath,
6893
- scale: 3
6770
+ imgScale: 3
6894
6771
  }));
6895
6772
  }
6896
6773
 
@@ -6911,14 +6788,14 @@ var ItemSlot = function ItemSlot(_ref) {
6911
6788
  atlasIMG: img,
6912
6789
  atlasJSON: atlasJSON,
6913
6790
  spriteKey: itemToRender.texturePath,
6914
- scale: 3
6791
+ imgScale: 3
6915
6792
  });
6916
6793
  } else {
6917
6794
  return React.createElement(SpriteFromAtlas, {
6918
6795
  atlasIMG: img,
6919
6796
  atlasJSON: atlasJSON,
6920
6797
  spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
6921
- scale: 3,
6798
+ imgScale: 3,
6922
6799
  grayScale: true,
6923
6800
  opacity: 0.4
6924
6801
  });
@@ -6958,56 +6835,172 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
6958
6835
  return props.left;
6959
6836
  });
6960
6837
 
6961
- var initialState = {
6962
- visible: false,
6963
- posX: 0,
6964
- posY: 0,
6965
- contextActions: [],
6966
- slotItem: null
6967
- };
6968
- var initialHoverState = {
6969
- visible: false,
6970
- posX: 0,
6971
- posY: 0,
6972
- item: null
6838
+ var ListMenu = function ListMenu(_ref) {
6839
+ var options = _ref.options,
6840
+ onSelected = _ref.onSelected,
6841
+ x = _ref.x,
6842
+ y = _ref.y,
6843
+ _ref$fontSize = _ref.fontSize,
6844
+ fontSize = _ref$fontSize === void 0 ? 0.8 : _ref$fontSize;
6845
+ return React.createElement(Container$6, {
6846
+ x: x,
6847
+ y: y,
6848
+ fontSize: fontSize
6849
+ }, React.createElement("ul", {
6850
+ className: "rpgui-list-imp",
6851
+ style: {
6852
+ overflow: 'hidden'
6853
+ }
6854
+ }, options.map(function (params, index) {
6855
+ return React.createElement(ListElement, {
6856
+ key: (params == null ? void 0 : params.id) || index,
6857
+ onClick: function onClick() {
6858
+ onSelected(params == null ? void 0 : params.id);
6859
+ }
6860
+ }, (params == null ? void 0 : params.text) || 'No text');
6861
+ })));
6973
6862
  };
6863
+ var Container$6 = /*#__PURE__*/styled.div.withConfig({
6864
+ displayName: "ListMenu__Container",
6865
+ componentId: "sc-i9097t-0"
6866
+ })(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", "em;}"], function (props) {
6867
+ return props.y || 0;
6868
+ }, function (props) {
6869
+ return props.x || 0;
6870
+ }, function (props) {
6871
+ return props.fontSize;
6872
+ });
6873
+ var ListElement = /*#__PURE__*/styled.li.withConfig({
6874
+ displayName: "ListMenu__ListElement",
6875
+ componentId: "sc-i9097t-1"
6876
+ })(["margin-right:0.5rem;"]);
6974
6877
 
6975
- var UIStore = /*#__PURE__*/function () {
6976
- function UIStore() {
6977
- var _this = this;
6878
+ var ContainerType;
6978
6879
 
6979
- this.contextMenu = initialState;
6980
- this.onHoverDetail = initialHoverState;
6880
+ (function (ContainerType) {
6881
+ ContainerType["INVENTORY"] = "Inventory";
6882
+ ContainerType["EQUIPMENT_SET"] = "EquipmentSet";
6883
+ })(ContainerType || (ContainerType = {})); // TODO: Refactor this file
6981
6884
 
6982
- this.handleOnItemClick = function (item, posX, posY, slotContainerType) {
6983
- var _this$contextMenu;
6984
6885
 
6985
- if (!item || JSON.stringify((_this$contextMenu = _this.contextMenu) == null ? void 0 : _this$contextMenu.slotItem) === JSON.stringify(item)) {
6986
- _this.clearContextMenu();
6886
+ var generateContextList = function generateContextList(actionsByTypeList) {
6887
+ var contextMenu = actionsByTypeList.map(function (action) {
6888
+ return {
6889
+ id: action,
6890
+ text: ItemSocketEventsDisplayLabels[action]
6891
+ };
6892
+ });
6893
+ return contextMenu;
6894
+ };
6987
6895
 
6988
- _this.clearItemHoverDetail();
6896
+ var handleContextMenuList = function handleContextMenuList(itemType) {
6897
+ var contextActionMenu = [];
6989
6898
 
6990
- return;
6991
- }
6899
+ switch (itemType) {
6900
+ case ItemType.Weapon:
6901
+ case ItemType.Armor:
6902
+ case ItemType.Accessory:
6903
+ case ItemType.Jewelry:
6904
+ case ItemType.Tool:
6905
+ contextActionMenu = generateContextList(ActionsByItemType.Equipment);
6906
+ break;
6992
6907
 
6993
- switch (slotContainerType) {
6994
- case SlotContainerType.EQUIPMENT_SET:
6995
- _this.setEquipContextMenu({
6996
- visible: true,
6997
- posX: posX,
6998
- posY: posY,
6999
- slotItem: item
7000
- }, item.type, item.isItemContainer);
6908
+ case ItemType.Consumable:
6909
+ contextActionMenu = generateContextList(ActionsByItemType.Consumable);
6910
+ break;
7001
6911
 
7002
- break;
6912
+ case ItemType.CraftMaterial:
6913
+ contextActionMenu = generateContextList(ActionsByItemType.CraftMaterial);
6914
+ break;
7003
6915
 
7004
- case SlotContainerType.INVENTORY:
7005
- _this.setContextMenu({
7006
- visible: true,
7007
- posX: posX,
7008
- posY: posY,
7009
- slotItem: item
7010
- }, item.type);
6916
+ case ItemType.Other:
6917
+ case ItemType.Information:
6918
+ case ItemType.Quest:
6919
+ case ItemType.Container:
6920
+ contextActionMenu = generateContextList(ActionsByItemType.Other);
6921
+ break;
6922
+
6923
+ default:
6924
+ contextActionMenu = generateContextList(ActionsByItemType.Other);
6925
+ break;
6926
+ }
6927
+
6928
+ return contextActionMenu;
6929
+ };
6930
+ var handleEquipmentContextMenuList = function handleEquipmentContextMenuList(itemType) {
6931
+ var contextActionMenu = [];
6932
+
6933
+ switch (itemType) {
6934
+ case ItemType.Weapon:
6935
+ case ItemType.Armor:
6936
+ case ItemType.Accessory:
6937
+ case ItemType.Jewelry:
6938
+ case ItemType.Tool:
6939
+ contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetItems);
6940
+ break;
6941
+
6942
+ case ItemType.Container:
6943
+ contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetContainer);
6944
+ break;
6945
+
6946
+ default:
6947
+ contextActionMenu = generateContextList(ActionsByItemType.EquipmenSetItems);
6948
+ break;
6949
+ }
6950
+
6951
+ return contextActionMenu;
6952
+ };
6953
+
6954
+ var initialState = {
6955
+ visible: false,
6956
+ posX: 0,
6957
+ posY: 0,
6958
+ contextActions: [],
6959
+ slotItem: null
6960
+ };
6961
+ var initialHoverState = {
6962
+ visible: false,
6963
+ posX: 0,
6964
+ posY: 0,
6965
+ item: null
6966
+ };
6967
+
6968
+ var UIStore = /*#__PURE__*/function () {
6969
+ function UIStore() {
6970
+ var _this = this;
6971
+
6972
+ this.contextMenu = initialState;
6973
+ this.onHoverDetail = initialHoverState;
6974
+
6975
+ this.handleOnItemClick = function (item, posX, posY, slotContainerType) {
6976
+ var _this$contextMenu;
6977
+
6978
+ if (!item || JSON.stringify((_this$contextMenu = _this.contextMenu) == null ? void 0 : _this$contextMenu.slotItem) === JSON.stringify(item)) {
6979
+ _this.clearContextMenu();
6980
+
6981
+ _this.clearItemHoverDetail();
6982
+
6983
+ return;
6984
+ }
6985
+
6986
+ switch (slotContainerType) {
6987
+ case SlotContainerType.EQUIPMENT_SET:
6988
+ _this.setEquipContextMenu({
6989
+ visible: true,
6990
+ posX: posX,
6991
+ posY: posY,
6992
+ slotItem: item
6993
+ }, item.type, item.isItemContainer);
6994
+
6995
+ break;
6996
+
6997
+ case SlotContainerType.INVENTORY:
6998
+ _this.setContextMenu({
6999
+ visible: true,
7000
+ posX: posX,
7001
+ posY: posY,
7002
+ slotItem: item
7003
+ }, item.type);
7011
7004
 
7012
7005
  break;
7013
7006
 
@@ -7097,23 +7090,142 @@ var UIStore = /*#__PURE__*/function () {
7097
7090
 
7098
7091
  var uiStore = /*#__PURE__*/new UIStore();
7099
7092
 
7100
- var ItemCard = function ItemCard(_ref) {
7101
- var item = _ref.item,
7102
- x = _ref.x,
7103
- y = _ref.y;
7104
- return React.createElement(Container$6, {
7105
- x: x,
7106
- y: y
7107
- }, item == null ? void 0 : item.name);
7108
- };
7109
- var Container$6 = /*#__PURE__*/styled.div.withConfig({
7110
- displayName: "ItemCard__Container",
7111
- componentId: "sc-170rits-0"
7112
- })(["position:absolute;top:", "px;left:", "px;font-size:0.5rem;color:white;background-color:black;border-radius:5px;padding:0.5rem;min-width:20px;opacity:0.5;"], function (props) {
7113
- return props.y || 0;
7114
- }, function (props) {
7115
- return props.x || 0;
7093
+ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
7094
+ var _uiStore$contextMenu, _uiStore$onHoverDetai;
7095
+
7096
+ var equipmentSet = _ref.equipmentSet,
7097
+ onClose = _ref.onClose,
7098
+ onMouseOver = _ref.onMouseOver,
7099
+ onActionSelected = _ref.onActionSelected,
7100
+ _ref$initialPosition = _ref.initialPosition,
7101
+ initialPosition = _ref$initialPosition === void 0 ? {
7102
+ x: 0,
7103
+ y: 0
7104
+ } : _ref$initialPosition;
7105
+ var neck = equipmentSet.neck,
7106
+ leftHand = equipmentSet.leftHand,
7107
+ ring = equipmentSet.ring,
7108
+ head = equipmentSet.head,
7109
+ armor = equipmentSet.armor,
7110
+ legs = equipmentSet.legs,
7111
+ boot = equipmentSet.boot,
7112
+ inventory = equipmentSet.inventory,
7113
+ rightHand = equipmentSet.rightHand,
7114
+ accessory = equipmentSet.accessory;
7115
+ var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
7116
+ var equipmentMaskSlots = [ItemSlotType.Neck, ItemSlotType.LeftHand, ItemSlotType.Ring, ItemSlotType.Head, ItemSlotType.Torso, ItemSlotType.Legs, ItemSlotType.Feet, ItemSlotType.Inventory, ItemSlotType.RightHand, ItemSlotType.Accessory]; // we use this draggable position to offset the menu position, after the container is dragged (otherwise, it bugs!)
7117
+
7118
+ var _useState = useState(initialPosition),
7119
+ draggablePosition = _useState[0],
7120
+ setDraggablePosition = _useState[1];
7121
+
7122
+ var handleOnMouseHover = function handleOnMouseHover(event, slotIndex, item, x, y) {
7123
+ uiStore.handleOnMouseHover(event, slotIndex, item, x, y, onMouseOver);
7124
+ };
7125
+
7126
+ var onSelected = function onSelected(selectedActionId) {
7127
+ uiStore.onSelected(selectedActionId, onActionSelected);
7128
+ };
7129
+
7130
+ var onRenderEquipmentSlotRange = function onRenderEquipmentSlotRange(start, end) {
7131
+ var equipmentRange = equipmentData.slice(start, end);
7132
+ var slotMaksRange = equipmentMaskSlots.slice(start, end);
7133
+ return equipmentRange.map(function (data, i) {
7134
+ var _ref2;
7135
+
7136
+ var item = data;
7137
+ var itemContainer = (_ref2 = item && item.itemContainer) != null ? _ref2 : null;
7138
+ return React.createElement(ItemSlot, {
7139
+ key: i,
7140
+ slotIndex: i,
7141
+ item: item,
7142
+ itemContainer: itemContainer,
7143
+ slotContainerType: SlotContainerType.EQUIPMENT_SET,
7144
+ slotSpriteMask: slotMaksRange[i],
7145
+ onMouseOver: handleOnMouseHover,
7146
+ onMouseOut: function onMouseOut() {
7147
+ uiStore.clearItemHoverDetail();
7148
+ },
7149
+ onClick: uiStore.handleOnItemClick,
7150
+ onCancelContextMenu: function onCancelContextMenu() {
7151
+ uiStore.clearContextMenu();
7152
+ }
7153
+ });
7154
+ });
7155
+ };
7156
+
7157
+ return React.createElement(DraggableContainer, {
7158
+ title: 'Equipments',
7159
+ type: RPGUIContainerTypes.Framed,
7160
+ onCloseButton: function onCloseButton() {
7161
+ if (onClose) onClose();
7162
+ },
7163
+ width: "330px",
7164
+ cancelDrag: ".equipment-container-body",
7165
+ onPositionChange: function onPositionChange(_ref3) {
7166
+ var x = _ref3.x,
7167
+ y = _ref3.y;
7168
+ setDraggablePosition({
7169
+ x: x,
7170
+ y: y
7171
+ });
7172
+ },
7173
+ onOutsideClick: function onOutsideClick() {
7174
+ uiStore.clearContextMenu();
7175
+ uiStore.clearItemHoverDetail();
7176
+ }
7177
+ }, React.createElement(EquipmentSetContainer, {
7178
+ className: "equipment-container-body"
7179
+ }, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))), (_uiStore$contextMenu = uiStore.contextMenu) != null && _uiStore$contextMenu.visible ? React.createElement(ListMenu, {
7180
+ x: uiStore.contextMenu.posX - draggablePosition.x,
7181
+ y: uiStore.contextMenu.posY - draggablePosition.y,
7182
+ options: uiStore.contextMenu.contextActions,
7183
+ onSelected: onSelected
7184
+ }) : null, (_uiStore$onHoverDetai = uiStore.onHoverDetail) != null && _uiStore$onHoverDetai.visible ? React.createElement(ItemCard, {
7185
+ item: uiStore.onHoverDetail.item,
7186
+ x: uiStore.onHoverDetail.posX - draggablePosition.x,
7187
+ y: uiStore.onHoverDetail.posY - draggablePosition.y
7188
+ }) : null);
7116
7189
  });
7190
+ var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
7191
+ displayName: "EquipmentSet__EquipmentSetContainer",
7192
+ componentId: "sc-1wuddg2-0"
7193
+ })(["width:inherit;display:flex;justify-content:center;flex-wrap:wrap;flex-direction:row;"]);
7194
+ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
7195
+ displayName: "EquipmentSet__EquipmentColumn",
7196
+ componentId: "sc-1wuddg2-1"
7197
+ })(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;"]);
7198
+
7199
+ var SlotsContainer = function SlotsContainer(_ref) {
7200
+ var children = _ref.children,
7201
+ title = _ref.title,
7202
+ onClose = _ref.onClose,
7203
+ _onPositionChange = _ref.onPositionChange,
7204
+ onOutsideClick = _ref.onOutsideClick;
7205
+ return React.createElement(DraggableContainer, {
7206
+ title: title,
7207
+ type: RPGUIContainerTypes.Framed,
7208
+ onCloseButton: function onCloseButton() {
7209
+ if (onClose) {
7210
+ onClose();
7211
+ }
7212
+ },
7213
+ width: "330px",
7214
+ cancelDrag: ".item-container-body",
7215
+ onPositionChange: function onPositionChange(_ref2) {
7216
+ var x = _ref2.x,
7217
+ y = _ref2.y;
7218
+
7219
+ if (_onPositionChange) {
7220
+ _onPositionChange({
7221
+ x: x,
7222
+ y: y
7223
+ });
7224
+ }
7225
+ },
7226
+ onOutsideClick: onOutsideClick
7227
+ }, children);
7228
+ };
7117
7229
 
7118
7230
  var ItemContainer = /*#__PURE__*/observer(function (_ref) {
7119
7231
  var _uiStore$contextMenu, _uiStore$onHoverDetai;
@@ -7190,8 +7302,8 @@ var ItemContainer = /*#__PURE__*/observer(function (_ref) {
7190
7302
  onSelected: onSelected
7191
7303
  }) : null, (_uiStore$onHoverDetai = uiStore.onHoverDetail) != null && _uiStore$onHoverDetai.visible ? React.createElement(ItemCard, {
7192
7304
  item: uiStore.onHoverDetail.item,
7193
- x: uiStore.onHoverDetail.posX,
7194
- y: uiStore.onHoverDetail.posY
7305
+ x: uiStore.onHoverDetail.posX - draggablePosition.x,
7306
+ y: uiStore.onHoverDetail.posY - draggablePosition.y
7195
7307
  }) : null);
7196
7308
  });
7197
7309
  var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
@@ -7734,28 +7846,374 @@ var Input$1 = /*#__PURE__*/styled.input.withConfig({
7734
7846
  componentId: "sc-v8mte9-0"
7735
7847
  })(["opacity:0;"]);
7736
7848
 
7737
- var SimpleProgressBar = function SimpleProgressBar(_ref) {
7738
- var value = _ref.value,
7739
- _ref$bgColor = _ref.bgColor,
7740
- bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
7741
- _ref$margin = _ref.margin,
7742
- margin = _ref$margin === void 0 ? 20 : _ref$margin;
7743
- return React.createElement(Container$b, {
7744
- className: "simple-progress-bar"
7745
- }, React.createElement(ProgressBarContainer, {
7746
- margin: margin
7747
- }, React.createElement(BackgroundBar, null, React.createElement(Progress, {
7748
- value: value,
7749
- bgColor: bgColor
7750
- }))));
7751
- };
7752
- var Container$b = /*#__PURE__*/styled.div.withConfig({
7753
- displayName: "SimpleProgressBar__Container",
7754
- componentId: "sc-mbeil3-0"
7755
- })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
7756
- var BackgroundBar = /*#__PURE__*/styled.span.withConfig({
7757
- displayName: "SimpleProgressBar__BackgroundBar",
7758
- componentId: "sc-mbeil3-1"
7849
+ var frames$1 = {
7850
+ "metamask-large.png": {
7851
+ frame: {
7852
+ x: 0,
7853
+ y: 0,
7854
+ w: 33,
7855
+ h: 30
7856
+ },
7857
+ rotated: false,
7858
+ trimmed: false,
7859
+ spriteSourceSize: {
7860
+ x: 0,
7861
+ y: 0,
7862
+ w: 33,
7863
+ h: 30
7864
+ },
7865
+ sourceSize: {
7866
+ w: 33,
7867
+ h: 30
7868
+ },
7869
+ pivot: {
7870
+ x: 0.5,
7871
+ y: 0.5
7872
+ }
7873
+ },
7874
+ "chat-large.png": {
7875
+ frame: {
7876
+ x: 0,
7877
+ y: 30,
7878
+ w: 31,
7879
+ h: 29
7880
+ },
7881
+ rotated: false,
7882
+ trimmed: true,
7883
+ spriteSourceSize: {
7884
+ x: 1,
7885
+ y: 3,
7886
+ w: 31,
7887
+ h: 29
7888
+ },
7889
+ sourceSize: {
7890
+ w: 32,
7891
+ h: 32
7892
+ },
7893
+ pivot: {
7894
+ x: 0.5,
7895
+ y: 0.5
7896
+ }
7897
+ },
7898
+ "equipment.png": {
7899
+ frame: {
7900
+ x: 33,
7901
+ y: 0,
7902
+ w: 17,
7903
+ h: 16
7904
+ },
7905
+ rotated: false,
7906
+ trimmed: false,
7907
+ spriteSourceSize: {
7908
+ x: 0,
7909
+ y: 0,
7910
+ w: 17,
7911
+ h: 16
7912
+ },
7913
+ sourceSize: {
7914
+ w: 17,
7915
+ h: 16
7916
+ },
7917
+ pivot: {
7918
+ x: 0.5,
7919
+ y: 0.5
7920
+ }
7921
+ },
7922
+ "inventory.png": {
7923
+ frame: {
7924
+ x: 33,
7925
+ y: 16,
7926
+ w: 17,
7927
+ h: 16
7928
+ },
7929
+ rotated: false,
7930
+ trimmed: false,
7931
+ spriteSourceSize: {
7932
+ x: 0,
7933
+ y: 0,
7934
+ w: 17,
7935
+ h: 16
7936
+ },
7937
+ sourceSize: {
7938
+ w: 17,
7939
+ h: 16
7940
+ },
7941
+ pivot: {
7942
+ x: 0.5,
7943
+ y: 0.5
7944
+ }
7945
+ },
7946
+ "icon-base-blue.png": {
7947
+ frame: {
7948
+ x: 31,
7949
+ y: 32,
7950
+ w: 16,
7951
+ h: 16
7952
+ },
7953
+ rotated: false,
7954
+ trimmed: false,
7955
+ spriteSourceSize: {
7956
+ x: 0,
7957
+ y: 0,
7958
+ w: 16,
7959
+ h: 16
7960
+ },
7961
+ sourceSize: {
7962
+ w: 16,
7963
+ h: 16
7964
+ },
7965
+ pivot: {
7966
+ x: 0.5,
7967
+ y: 0.5
7968
+ }
7969
+ },
7970
+ "icon-base-brown.png": {
7971
+ frame: {
7972
+ x: 50,
7973
+ y: 0,
7974
+ w: 16,
7975
+ h: 16
7976
+ },
7977
+ rotated: false,
7978
+ trimmed: false,
7979
+ spriteSourceSize: {
7980
+ x: 0,
7981
+ y: 0,
7982
+ w: 16,
7983
+ h: 16
7984
+ },
7985
+ sourceSize: {
7986
+ w: 16,
7987
+ h: 16
7988
+ },
7989
+ pivot: {
7990
+ x: 0.5,
7991
+ y: 0.5
7992
+ }
7993
+ },
7994
+ "chat-small.png": {
7995
+ frame: {
7996
+ x: 50,
7997
+ y: 16,
7998
+ w: 16,
7999
+ h: 16
8000
+ },
8001
+ rotated: false,
8002
+ trimmed: true,
8003
+ spriteSourceSize: {
8004
+ x: 1,
8005
+ y: 0,
8006
+ w: 16,
8007
+ h: 16
8008
+ },
8009
+ sourceSize: {
8010
+ w: 17,
8011
+ h: 16
8012
+ },
8013
+ pivot: {
8014
+ x: 0.5,
8015
+ y: 0.5
8016
+ }
8017
+ },
8018
+ "icon-base-gold.png": {
8019
+ frame: {
8020
+ x: 47,
8021
+ y: 32,
8022
+ w: 16,
8023
+ h: 16
8024
+ },
8025
+ rotated: false,
8026
+ trimmed: false,
8027
+ spriteSourceSize: {
8028
+ x: 0,
8029
+ y: 0,
8030
+ w: 16,
8031
+ h: 16
8032
+ },
8033
+ sourceSize: {
8034
+ w: 16,
8035
+ h: 16
8036
+ },
8037
+ pivot: {
8038
+ x: 0.5,
8039
+ y: 0.5
8040
+ }
8041
+ },
8042
+ "equipment-raw.png": {
8043
+ frame: {
8044
+ x: 0,
8045
+ y: 59,
8046
+ w: 15,
8047
+ h: 13
8048
+ },
8049
+ rotated: false,
8050
+ trimmed: true,
8051
+ spriteSourceSize: {
8052
+ x: 0,
8053
+ y: 0,
8054
+ w: 15,
8055
+ h: 13
8056
+ },
8057
+ sourceSize: {
8058
+ w: 16,
8059
+ h: 13
8060
+ },
8061
+ pivot: {
8062
+ x: 0.5,
8063
+ y: 0.5
8064
+ }
8065
+ },
8066
+ "metamask-small.png": {
8067
+ frame: {
8068
+ x: 31,
8069
+ y: 48,
8070
+ w: 15,
8071
+ h: 15
8072
+ },
8073
+ rotated: false,
8074
+ trimmed: true,
8075
+ spriteSourceSize: {
8076
+ x: 1,
8077
+ y: 0,
8078
+ w: 15,
8079
+ h: 15
8080
+ },
8081
+ sourceSize: {
8082
+ w: 16,
8083
+ h: 16
8084
+ },
8085
+ pivot: {
8086
+ x: 0.5,
8087
+ y: 0.5
8088
+ }
8089
+ },
8090
+ "settings.png": {
8091
+ frame: {
8092
+ x: 46,
8093
+ y: 48,
8094
+ w: 14,
8095
+ h: 14
8096
+ },
8097
+ rotated: false,
8098
+ trimmed: true,
8099
+ spriteSourceSize: {
8100
+ x: 1,
8101
+ y: 1,
8102
+ w: 14,
8103
+ h: 14
8104
+ },
8105
+ sourceSize: {
8106
+ w: 16,
8107
+ h: 16
8108
+ },
8109
+ pivot: {
8110
+ x: 0.5,
8111
+ y: 0.5
8112
+ }
8113
+ },
8114
+ "inventory-raw.png": {
8115
+ frame: {
8116
+ x: 15,
8117
+ y: 59,
8118
+ w: 13,
8119
+ h: 13
8120
+ },
8121
+ rotated: false,
8122
+ trimmed: true,
8123
+ spriteSourceSize: {
8124
+ x: 1,
8125
+ y: 2,
8126
+ w: 13,
8127
+ h: 13
8128
+ },
8129
+ sourceSize: {
8130
+ w: 16,
8131
+ h: 16
8132
+ },
8133
+ pivot: {
8134
+ x: 0.5,
8135
+ y: 0.5
8136
+ }
8137
+ }
8138
+ };
8139
+ var meta$1 = {
8140
+ app: "http://free-tex-packer.com",
8141
+ version: "0.6.7",
8142
+ image: "icons.png",
8143
+ format: "RGBA8888",
8144
+ size: {
8145
+ w: 66,
8146
+ h: 72
8147
+ },
8148
+ scale: 1
8149
+ };
8150
+ var iconsAtlasJSON = {
8151
+ frames: frames$1,
8152
+ meta: meta$1
8153
+ };
8154
+
8155
+ var img$3 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABICAMAAAB1EdO8AAAAkFBMVEUAAADtgCT////1hB92PhridiXX19dVPioVFRXQt0W2nSuIdWScgxFuW0mpfFInt+iGmqJ7UTEUpNXEmWxUanQBZolmZmLj+P/MYiguIhhtZWVOMRxNLRWWlpG7vrq6vbmoqKjArJ3VwLQWFhZ7eXl6ZlTq7OzutCkhM0eqfVHBrZ6/q5z/5HjKYSj83SDxgSCOHfTqAAAAAnRSTlMADpEr4D8AAAN0SURBVFjDrdcBW9owEAbgGyNtF2m1CDhBtDIR1Dn//7/b3TXtl6SUtTz7HmlusrxPEgqcRN+oP/rsLAxRGoQkU2PoVIyZEgs/wszSqyCpCFM2zAnA8DNM2B+r1UomyyhEHhIiwIgECRN2tX1aifC0rYm8Q6gRIkYEEE9iyNUReUTA+N5EBRcm1KgFR+Qe4QQYEEA4QwVH5D6BgHAACLcXj8hjAgYEEBsWamMDIgfhxxHTkNiUG3cWXIHIGyI0lAh+Q7KKggXZS4FVSEB0NxITZbGxIpUgNB3CNIRvkG6Ef9wgBFIT1AIggBDNZLrVVVhhhEBAyERHoHIET0XcKhAlSKZ1CQ3RsDc75pmoVCKNp2RBvEX8lGipVbuM9CpMmlWJlyoDYZqJdQGCj6yUpOn9vRJJMmmTJJkIzvg6Hh1xPH6pIGEiLwuNGEpMvIBoHH1oQOzL4va2uK2NLgEhJJCUhTogXqqJewwn/vwOiZeJewhhJHqWnwbSp56oJt3vy/JwkPPs2YhneB85ECjd80kcDrd8HP8gjEza/ZLs9B8+wekhkoAwu11N8GjOEZXOxa0F48MjPlqhS1AmQnCDN/+X3p93zxy+vnu/TvOiUKAAwQIFwZfQc53gibS5OfUWvxIiFrJzUSIvJSrkuRCxUCX9qdTofD6EApOcyakknIyWQeIPIEdM+pNky+s7L9fLWdRsDCHurr3cLWf2AmIeEfYCYh4R9gJiHhF2NMGJCHuCSNbrdXcEMY8I2yVeqqRa87gORxDziLBdIpkkOjUaQcwjwo5chSYi7Miz0ESEHfWKuESEHU4gEWEHEvPobWb9DCD+y5udpmjNzdQViwUhAwgxnDCtpy9ubhZgQPR8akUNrU5vHi2BL5ZuKiHUUEGJNiAyFqqsJ9Q2xXVBaiwWENTQrybqSdsUG6OE7uD1VfcSEtQbXoEQepF9iED0qsVAgqR9Y0JaOeojzguygKORB1fUs5HzgoaJugiPEwYNJ7ovqob/gPXHtk1t/tpsG1qucWuFxPZxJcPjVga0qTB20reIcPIG17li6FUJtKk10XYdQnTeZjAg1AHhWpemRrqGChS0qTQsMEiDNnUE8cCCGlxR0KYOFsoHdxZcERrEUat4c6/I2wNdSpQ8V6QSxOiN8E8zBG3qcIEvUmjttakj9hHWpWSU8BfjYZgnq0kqDAAAAABJRU5ErkJggg==';
8156
+
8157
+ var SpriteIcon = function SpriteIcon(_ref) {
8158
+ var onClick = _ref.onClick,
8159
+ spriteKey = _ref.spriteKey,
8160
+ baseSpriteKey = _ref.baseSpriteKey,
8161
+ imgStyle = _ref.imgStyle;
8162
+ return React.createElement(Container$b, null, baseSpriteKey && React.createElement(Slot, null, React.createElement(SpriteFromAtlas, {
8163
+ onClick: onClick,
8164
+ atlasJSON: iconsAtlasJSON,
8165
+ atlasIMG: img$3,
8166
+ spriteKey: baseSpriteKey,
8167
+ width: 32,
8168
+ height: 32,
8169
+ containerStyle: {
8170
+ zIndex: -1
8171
+ }
8172
+ })), React.createElement(Slot, null, React.createElement(SpriteFromAtlas, {
8173
+ onClick: onClick,
8174
+ atlasJSON: iconsAtlasJSON,
8175
+ atlasIMG: img$3,
8176
+ spriteKey: spriteKey,
8177
+ width: 28,
8178
+ height: 28,
8179
+ containerStyle: {
8180
+ zIndex: 0
8181
+ },
8182
+ imgScale: baseSpriteKey ? 1.5 : 2,
8183
+ imgStyle: imgStyle
8184
+ })));
8185
+ };
8186
+ var Container$b = /*#__PURE__*/styled.div.withConfig({
8187
+ displayName: "SpriteIcon__Container",
8188
+ componentId: "sc-vi5t1x-0"
8189
+ })(["position:relative;width:32px;height:32px;display:flex;justify-content:center;align-items:center;"]);
8190
+ var Slot = /*#__PURE__*/styled.div.withConfig({
8191
+ displayName: "SpriteIcon__Slot",
8192
+ componentId: "sc-vi5t1x-1"
8193
+ })(["position:absolute;"]);
8194
+
8195
+ var SimpleProgressBar = function SimpleProgressBar(_ref) {
8196
+ var value = _ref.value,
8197
+ _ref$bgColor = _ref.bgColor,
8198
+ bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
8199
+ _ref$margin = _ref.margin,
8200
+ margin = _ref$margin === void 0 ? 20 : _ref$margin;
8201
+ return React.createElement(Container$c, {
8202
+ className: "simple-progress-bar"
8203
+ }, React.createElement(ProgressBarContainer, {
8204
+ margin: margin
8205
+ }, React.createElement(BackgroundBar, null, React.createElement(Progress, {
8206
+ value: value,
8207
+ bgColor: bgColor
8208
+ }))));
8209
+ };
8210
+ var Container$c = /*#__PURE__*/styled.div.withConfig({
8211
+ displayName: "SimpleProgressBar__Container",
8212
+ componentId: "sc-mbeil3-0"
8213
+ })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
8214
+ var BackgroundBar = /*#__PURE__*/styled.span.withConfig({
8215
+ displayName: "SimpleProgressBar__BackgroundBar",
8216
+ componentId: "sc-mbeil3-1"
7759
8217
  })(["background-color:rgba(0,0,0,0.075);"]);
7760
8218
  var Progress = /*#__PURE__*/styled.span.withConfig({
7761
8219
  displayName: "SimpleProgressBar__Progress",
@@ -7786,7 +8244,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
7786
8244
  atlasIMG: img,
7787
8245
  atlasJSON: atlasJSON,
7788
8246
  spriteKey: texturePath,
7789
- scale: 1,
8247
+ imgScale: 1,
7790
8248
  grayScale: true,
7791
8249
  opacity: 0.5
7792
8250
  })) : React.createElement(React.Fragment, null)), React.createElement(ProgressBarContainer$1, null, React.createElement(SimpleProgressBar, {
@@ -7842,122 +8300,16 @@ var Truncate = function Truncate(_ref) {
7842
8300
  var _ref$maxLines = _ref.maxLines,
7843
8301
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
7844
8302
  children = _ref.children;
7845
- return React.createElement(Container$c, {
8303
+ return React.createElement(Container$d, {
7846
8304
  maxLines: maxLines
7847
8305
  }, children);
7848
8306
  };
7849
- var Container$c = /*#__PURE__*/styled.div.withConfig({
8307
+ var Container$d = /*#__PURE__*/styled.div.withConfig({
7850
8308
  displayName: "Truncate__Container",
7851
8309
  componentId: "sc-6x00qb-0"
7852
8310
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
7853
8311
  return props.maxLines;
7854
8312
  });
7855
8313
 
7856
- var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
7857
- var _uiStore$contextMenu, _uiStore$onHoverDetai;
7858
-
7859
- var equipmentSet = _ref.equipmentSet,
7860
- onClose = _ref.onClose,
7861
- onMouseOver = _ref.onMouseOver,
7862
- onActionSelected = _ref.onActionSelected,
7863
- _ref$initialPosition = _ref.initialPosition,
7864
- initialPosition = _ref$initialPosition === void 0 ? {
7865
- x: 0,
7866
- y: 0
7867
- } : _ref$initialPosition;
7868
- var neck = equipmentSet.neck,
7869
- leftHand = equipmentSet.leftHand,
7870
- ring = equipmentSet.ring,
7871
- head = equipmentSet.head,
7872
- armor = equipmentSet.armor,
7873
- legs = equipmentSet.legs,
7874
- boot = equipmentSet.boot,
7875
- inventory = equipmentSet.inventory,
7876
- rightHand = equipmentSet.rightHand,
7877
- accessory = equipmentSet.accessory;
7878
- var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
7879
- var equipmentMaskSlots = [ItemSlotType.Neck, ItemSlotType.LeftHand, ItemSlotType.Ring, ItemSlotType.Head, ItemSlotType.Torso, ItemSlotType.Legs, ItemSlotType.Feet, ItemSlotType.Inventory, ItemSlotType.RightHand, ItemSlotType.Accessory]; // we use this draggable position to offset the menu position, after the container is dragged (otherwise, it bugs!)
7880
-
7881
- var _useState = useState(initialPosition),
7882
- draggablePosition = _useState[0],
7883
- setDraggablePosition = _useState[1];
7884
-
7885
- var handleOnMouseHover = function handleOnMouseHover(event, slotIndex, item, x, y) {
7886
- uiStore.handleOnMouseHover(event, slotIndex, item, x, y, onMouseOver);
7887
- };
7888
-
7889
- var onSelected = function onSelected(selectedActionId) {
7890
- uiStore.onSelected(selectedActionId, onActionSelected);
7891
- };
7892
-
7893
- var onRenderEquipmentSlotRange = function onRenderEquipmentSlotRange(start, end) {
7894
- var equipmentRange = equipmentData.slice(start, end);
7895
- var slotMaksRange = equipmentMaskSlots.slice(start, end);
7896
- return equipmentRange.map(function (data, i) {
7897
- var _ref2;
7898
-
7899
- var item = data;
7900
- var itemContainer = (_ref2 = item && item.itemContainer) != null ? _ref2 : null;
7901
- return React.createElement(ItemSlot, {
7902
- key: i,
7903
- slotIndex: i,
7904
- item: item,
7905
- itemContainer: itemContainer,
7906
- slotContainerType: SlotContainerType.EQUIPMENT_SET,
7907
- slotSpriteMask: slotMaksRange[i],
7908
- onMouseOver: handleOnMouseHover,
7909
- onMouseOut: function onMouseOut() {
7910
- uiStore.clearItemHoverDetail();
7911
- },
7912
- onClick: uiStore.handleOnItemClick,
7913
- onCancelContextMenu: function onCancelContextMenu() {
7914
- uiStore.clearContextMenu();
7915
- }
7916
- });
7917
- });
7918
- };
7919
-
7920
- return React.createElement(DraggableContainer, {
7921
- title: 'Equipments',
7922
- type: RPGUIContainerTypes.Framed,
7923
- onCloseButton: function onCloseButton() {
7924
- if (onClose) onClose();
7925
- },
7926
- width: "330px",
7927
- cancelDrag: ".equipment-container-body",
7928
- onPositionChange: function onPositionChange(_ref3) {
7929
- var x = _ref3.x,
7930
- y = _ref3.y;
7931
- setDraggablePosition({
7932
- x: x,
7933
- y: y
7934
- });
7935
- },
7936
- onOutsideClick: function onOutsideClick() {
7937
- uiStore.clearContextMenu();
7938
- uiStore.clearItemHoverDetail();
7939
- }
7940
- }, React.createElement(EquipmentSetContainer, {
7941
- className: "equipment-container-body"
7942
- }, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))), (_uiStore$contextMenu = uiStore.contextMenu) != null && _uiStore$contextMenu.visible ? React.createElement(ListMenu, {
7943
- x: uiStore.contextMenu.posX - draggablePosition.x,
7944
- y: uiStore.contextMenu.posY - draggablePosition.y,
7945
- options: uiStore.contextMenu.contextActions,
7946
- onSelected: onSelected
7947
- }) : null, (_uiStore$onHoverDetai = uiStore.onHoverDetail) != null && _uiStore$onHoverDetai.visible ? React.createElement(ItemCard, {
7948
- item: uiStore.onHoverDetail.item,
7949
- x: uiStore.onHoverDetail.posX - draggablePosition.x,
7950
- y: uiStore.onHoverDetail.posY - draggablePosition.y
7951
- }) : null);
7952
- });
7953
- var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
7954
- displayName: "EquipmentSet__EquipmentSetContainer",
7955
- componentId: "sc-1wuddg2-0"
7956
- })(["width:inherit;display:flex;justify-content:center;flex-wrap:wrap;flex-direction:row;"]);
7957
- var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
7958
- displayName: "EquipmentSet__EquipmentColumn",
7959
- componentId: "sc-1wuddg2-1"
7960
- })(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;"]);
7961
-
7962
- export { Button, ButtonTypes, Chat, CheckButton, DraggableContainer, Dropdown, DynamicText, EquipmentSet, Input, InputRadio, ItemContainer, ItemSlot, ListMenu, NPCDialog, NPCDialogType, ProgressBar, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SkillProgressBar, SlotContainerType, SpriteFromAtlas, TextArea, Truncate, _RPGUI, useEventListener };
8314
+ export { Button, ButtonTypes, Chat, CheckButton, DraggableContainer, Dropdown, DynamicText, EquipmentSet, Input, InputRadio, ItemContainer, ItemSlot, ListMenu, NPCDialog, NPCDialogType, ProgressBar, QuestionDialog, RPGUIContainer, RPGUIContainerTypes, RPGUIRoot, RangeSlider, RangeSliderType, SkillProgressBar, SlotContainerType, SpriteFromAtlas, SpriteIcon, TextArea, Truncate, _RPGUI, useEventListener };
7963
8315
  //# sourceMappingURL=long-bow.esm.js.map