@rpg-engine/long-bow 0.1.79 → 0.1.80
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/LICENSE +20 -20
- package/README.md +181 -181
- package/dist/components/store/UI.store.d.ts +0 -3
- package/dist/long-bow.cjs.development.js +8 -18
- 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 +8 -18
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +96 -96
- package/src/components/Abstractions/SlotsContainer.tsx +42 -42
- package/src/components/Button.tsx +29 -29
- package/src/components/Chat/Chat.tsx +193 -193
- package/src/components/CheckButton.tsx +65 -65
- package/src/components/DraggableContainer.tsx +150 -150
- package/src/components/Dropdown.tsx +57 -57
- package/src/components/Equipment/EquipmentSet.tsx +179 -179
- package/src/components/Input.tsx +11 -11
- package/src/components/Item/Cards/ItemCard.tsx +36 -36
- package/src/components/Item/Inventory/ItemContainer.tsx +113 -113
- package/src/components/Item/Inventory/ItemSlot.tsx +158 -158
- package/src/components/Item/Inventory/itemContainerHelper.ts +81 -81
- package/src/components/ListMenu.tsx +65 -65
- package/src/components/Multitab/Tab.tsx +57 -57
- package/src/components/Multitab/TabBody.tsx +13 -13
- package/src/components/Multitab/TabsContainer.tsx +97 -97
- package/src/components/NPCDialog/NPCDialog.tsx +145 -145
- package/src/components/NPCDialog/NPCDialogText.tsx +53 -53
- package/src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx +242 -242
- package/src/components/ProgressBar.tsx +91 -91
- package/src/components/RPGUIContainer.tsx +47 -47
- package/src/components/RPGUIRoot.tsx +14 -14
- package/src/components/RadioButton.tsx +53 -53
- package/src/components/RangeSlider.tsx +68 -68
- package/src/components/ScrollList.tsx +77 -77
- package/src/components/SimpleProgressBar.tsx +62 -62
- package/src/components/SkillProgressBar.tsx +124 -124
- package/src/components/SkillsContainer.tsx +235 -235
- package/src/components/TextArea.tsx +11 -11
- package/src/components/Truncate.tsx +25 -25
- package/src/components/shared/Column.tsx +16 -16
- package/src/components/shared/SpriteFromAtlas.tsx +99 -99
- package/src/components/shared/SpriteIcon.tsx +67 -67
- package/src/components/store/UI.store.ts +192 -205
- package/src/components/typography/DynamicText.tsx +49 -49
- package/src/constants/uiColors.ts +10 -10
- package/src/hooks/useEventListener.ts +21 -21
- package/src/hooks/useOutsideAlerter.ts +25 -25
- package/src/index.tsx +25 -25
- package/src/libs/StringHelpers.ts +3 -3
- package/src/mocks/atlas/icons/icons.json +303 -303
- package/src/mocks/atlas/items/items.json +5195 -5195
- package/src/mocks/equipmentSet.mocks.ts +347 -347
- package/src/mocks/itemContainer.mocks.ts +249 -249
- package/src/mocks/skills.mocks.ts +122 -122
- package/src/types/eventTypes.ts +4 -4
- package/src/types/index.d.ts +2 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -5974,10 +5974,6 @@ var initialHoverState = {
|
|
|
5974
5974
|
posY: 0,
|
|
5975
5975
|
item: null
|
|
5976
5976
|
};
|
|
5977
|
-
var initialPosition = {
|
|
5978
|
-
x: 0,
|
|
5979
|
-
y: 0
|
|
5980
|
-
};
|
|
5981
5977
|
|
|
5982
5978
|
var UIStore = /*#__PURE__*/function () {
|
|
5983
5979
|
function UIStore() {
|
|
@@ -5985,7 +5981,6 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
5985
5981
|
|
|
5986
5982
|
this.contextMenu = initialState;
|
|
5987
5983
|
this.onHoverDetail = initialHoverState;
|
|
5988
|
-
this.draggablePosition = initialPosition;
|
|
5989
5984
|
|
|
5990
5985
|
this.handleOnItemClick = function (item, posX, posY, slotContainerType) {
|
|
5991
5986
|
var _this$contextMenu;
|
|
@@ -6100,10 +6095,6 @@ var UIStore = /*#__PURE__*/function () {
|
|
|
6100
6095
|
this.clearContextMenu();
|
|
6101
6096
|
};
|
|
6102
6097
|
|
|
6103
|
-
_proto.setDraggablePosition = function setDraggablePosition(currentPosition) {
|
|
6104
|
-
this.draggablePosition = _extends({}, currentPosition);
|
|
6105
|
-
};
|
|
6106
|
-
|
|
6107
6098
|
return UIStore;
|
|
6108
6099
|
}();
|
|
6109
6100
|
|
|
@@ -6134,9 +6125,9 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6134
6125
|
var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
|
|
6135
6126
|
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!)
|
|
6136
6127
|
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6128
|
+
var _useState = useState(initialPosition),
|
|
6129
|
+
draggablePosition = _useState[0],
|
|
6130
|
+
setDraggablePosition = _useState[1];
|
|
6140
6131
|
|
|
6141
6132
|
var handleOnMouseHover = function handleOnMouseHover(event, slotIndex, item, x, y) {
|
|
6142
6133
|
uiStore.handleOnMouseHover(event, slotIndex, item, x, y, onMouseOver);
|
|
@@ -6184,8 +6175,7 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6184
6175
|
onPositionChange: function onPositionChange(_ref3) {
|
|
6185
6176
|
var x = _ref3.x,
|
|
6186
6177
|
y = _ref3.y;
|
|
6187
|
-
|
|
6188
|
-
uiStore.setDraggablePosition({
|
|
6178
|
+
setDraggablePosition({
|
|
6189
6179
|
x: x,
|
|
6190
6180
|
y: y
|
|
6191
6181
|
});
|
|
@@ -6197,14 +6187,14 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6197
6187
|
}, React.createElement(EquipmentSetContainer, {
|
|
6198
6188
|
className: "equipment-container-body"
|
|
6199
6189
|
}, 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, {
|
|
6200
|
-
x: uiStore.contextMenu.posX -
|
|
6201
|
-
y: uiStore.contextMenu.posY -
|
|
6190
|
+
x: uiStore.contextMenu.posX - draggablePosition.x,
|
|
6191
|
+
y: uiStore.contextMenu.posY - draggablePosition.y,
|
|
6202
6192
|
options: uiStore.contextMenu.contextActions,
|
|
6203
6193
|
onSelected: onSelected
|
|
6204
6194
|
}) : null, (_uiStore$onHoverDetai = uiStore.onHoverDetail) != null && _uiStore$onHoverDetai.visible ? React.createElement(ItemCard, {
|
|
6205
6195
|
item: uiStore.onHoverDetail.item,
|
|
6206
|
-
x: uiStore.onHoverDetail.posX -
|
|
6207
|
-
y: uiStore.onHoverDetail.posY -
|
|
6196
|
+
x: uiStore.onHoverDetail.posX - draggablePosition.x,
|
|
6197
|
+
y: uiStore.onHoverDetail.posY - draggablePosition.y
|
|
6208
6198
|
}) : null);
|
|
6209
6199
|
});
|
|
6210
6200
|
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|