@rpg-engine/long-bow 0.3.46 → 0.3.48
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/dist/components/CharacterStatus/CharacterStatus.d.ts +9 -0
- package/dist/long-bow.cjs.development.js +34 -11
- 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 +35 -12
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/CharacterStatus.stories.d.ts +5 -0
- package/package.json +2 -3
- package/src/components/CharacterStatus/Character.png +0 -0
- package/src/components/CharacterStatus/CharacterStatus.tsx +120 -0
- package/src/components/Chat/Chat.tsx +1 -0
- package/src/components/CraftBook/CraftBook.tsx +26 -21
- package/src/components/Item/Inventory/ItemSlot.tsx +1 -2
- package/src/components/SkillsContainer.tsx +26 -2
- package/src/components/TradingMenu/items.mock.ts +1 -0
- package/src/constants/uiDevices.ts +2 -4
- package/src/stories/CharacterStatus.stories.tsx +29 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { GRID_WIDTH, GRID_HEIGHT, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, getItemTextureKeyPath, ItemSlotType, getSPForLevel, PeriodOfDay } from '@rpg-engine/shared';
|
|
3
|
+
import { GRID_WIDTH, GRID_HEIGHT, ItemSubType, ItemContainerType, ItemType, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, getItemTextureKeyPath, ItemSlotType, isMobileOrTablet, getSPForLevel, PeriodOfDay } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
6
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';
|
|
10
|
-
import isMobile from 'is-mobile';
|
|
11
10
|
import 'rpgui/rpgui.min.css';
|
|
12
11
|
import 'rpgui/rpgui.min.js';
|
|
13
|
-
import _ from 'lodash-es';
|
|
14
12
|
import capitalize from 'lodash-es/capitalize';
|
|
15
13
|
|
|
16
14
|
function _extends() {
|
|
@@ -32786,7 +32784,8 @@ var Chat = function Chat(_ref) {
|
|
|
32786
32784
|
autoComplete: "off",
|
|
32787
32785
|
onFocus: onFocus,
|
|
32788
32786
|
onBlur: onBlur,
|
|
32789
|
-
onTouchStart: onFocus
|
|
32787
|
+
onTouchStart: onFocus,
|
|
32788
|
+
autoFocus: true
|
|
32790
32789
|
})), React.createElement(Column, {
|
|
32791
32790
|
justifyContent: "flex-end"
|
|
32792
32791
|
}, React.createElement(Button$1, {
|
|
@@ -33446,7 +33445,14 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33446
33445
|
spriteKey: option.texturePath,
|
|
33447
33446
|
imgScale: 3,
|
|
33448
33447
|
grayScale: !option.canCraft
|
|
33449
|
-
})), React.createElement("div", null, React.createElement("
|
|
33448
|
+
})), React.createElement("div", null, React.createElement("div", {
|
|
33449
|
+
onClick: function onClick() {
|
|
33450
|
+
return handleClick(option.key);
|
|
33451
|
+
},
|
|
33452
|
+
onTouchStart: function onTouchStart() {
|
|
33453
|
+
return handleClick(option.key);
|
|
33454
|
+
}
|
|
33455
|
+
}, React.createElement("input", {
|
|
33450
33456
|
className: "rpgui-radio",
|
|
33451
33457
|
type: "radio",
|
|
33452
33458
|
value: option.name,
|
|
@@ -33482,7 +33488,7 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33482
33488
|
index: index
|
|
33483
33489
|
});
|
|
33484
33490
|
}
|
|
33485
|
-
}, modifyString(option.name)), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
33491
|
+
}, modifyString(option.name))), isShown && isShown.index === index && option.ingredients.map(function (option, index) {
|
|
33486
33492
|
return React.createElement(Recipes, {
|
|
33487
33493
|
key: index
|
|
33488
33494
|
}, React.createElement(SpriteFromAtlas, {
|
|
@@ -33884,6 +33890,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33884
33890
|
var resetItem = function resetItem() {
|
|
33885
33891
|
setTooltipVisible(false);
|
|
33886
33892
|
setWasDragged(false);
|
|
33893
|
+
setIsFocused(false);
|
|
33887
33894
|
};
|
|
33888
33895
|
var onSuccesfulDrag = function onSuccesfulDrag(quantity) {
|
|
33889
33896
|
resetItem();
|
|
@@ -33892,7 +33899,6 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33892
33899
|
y: 0
|
|
33893
33900
|
});else if (item) {
|
|
33894
33901
|
onDragEnd(quantity);
|
|
33895
|
-
resetItem();
|
|
33896
33902
|
}
|
|
33897
33903
|
};
|
|
33898
33904
|
return React.createElement(Container$a, {
|
|
@@ -33948,7 +33954,6 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33948
33954
|
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccesfulDrag);else onSuccesfulDrag(item.stackQty);
|
|
33949
33955
|
} else {
|
|
33950
33956
|
resetItem();
|
|
33951
|
-
setIsFocused(false);
|
|
33952
33957
|
setDragPosition({
|
|
33953
33958
|
x: 0,
|
|
33954
33959
|
y: 0
|
|
@@ -34142,9 +34147,7 @@ var EquipmentColumn = /*#__PURE__*/styled.div.withConfig({
|
|
|
34142
34147
|
componentId: "sc-1wuddg2-1"
|
|
34143
34148
|
})(["display:flex;justify-content:center;flex-wrap:wrap;flex-direction:column;touch-action:none;"]);
|
|
34144
34149
|
|
|
34145
|
-
var IS_MOBILE_OR_TABLET = /*#__PURE__*/
|
|
34146
|
-
tablet: true
|
|
34147
|
-
});
|
|
34150
|
+
var IS_MOBILE_OR_TABLET = /*#__PURE__*/isMobileOrTablet();
|
|
34148
34151
|
|
|
34149
34152
|
var chunkString = function chunkString(str, length) {
|
|
34150
34153
|
return str.match(new RegExp('.{1,' + length + '}', 'g'));
|
|
@@ -35502,6 +35505,26 @@ var skillProps = {
|
|
|
35502
35505
|
}
|
|
35503
35506
|
}
|
|
35504
35507
|
};
|
|
35508
|
+
var skillNameMap = {
|
|
35509
|
+
stamina: 'Stamina',
|
|
35510
|
+
magic: 'Magic',
|
|
35511
|
+
magicResistance: 'Magic Resistance',
|
|
35512
|
+
strength: 'Strength',
|
|
35513
|
+
resistance: 'Resistance',
|
|
35514
|
+
dexterity: 'Dexterity',
|
|
35515
|
+
first: 'Fist',
|
|
35516
|
+
club: 'Club',
|
|
35517
|
+
sword: 'Sword',
|
|
35518
|
+
axe: 'Axe',
|
|
35519
|
+
distance: 'Distance',
|
|
35520
|
+
shielding: 'Shieldeing',
|
|
35521
|
+
dagger: 'Dagger',
|
|
35522
|
+
fishing: 'Fishing',
|
|
35523
|
+
mining: 'Mining',
|
|
35524
|
+
lumberjacking: 'Lumberjacking',
|
|
35525
|
+
cooking: 'Cooking',
|
|
35526
|
+
alchemy: 'Alchemy'
|
|
35527
|
+
};
|
|
35505
35528
|
var SkillsContainer = function SkillsContainer(_ref) {
|
|
35506
35529
|
var onCloseButton = _ref.onCloseButton,
|
|
35507
35530
|
skill = _ref.skill,
|
|
@@ -35519,7 +35542,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
35519
35542
|
var skillDetails = skill[key];
|
|
35520
35543
|
output.push(React.createElement(SkillProgressBar, {
|
|
35521
35544
|
key: key,
|
|
35522
|
-
skillName:
|
|
35545
|
+
skillName: skillNameMap[key],
|
|
35523
35546
|
bgColor: skillCategoryColor,
|
|
35524
35547
|
level: skillDetails.level || 0,
|
|
35525
35548
|
skillPoints: Math.round(skillDetails.skillPoints) || 0,
|