@rpg-engine/long-bow 0.5.91 → 0.5.93
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/long-bow.cjs.development.js +21 -7
- 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 +21 -7
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CraftBook/CraftBook.tsx +13 -2
- package/src/components/NPCDialog/NPCDialog.tsx +10 -0
- package/src/components/typography/DynamicText.tsx +1 -1
- package/src/stories/NPCDialog.stories.tsx +1 -1
|
@@ -14793,6 +14793,9 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
14793
14793
|
var _useState3 = React.useState(),
|
|
14794
14794
|
size = _useState3[0],
|
|
14795
14795
|
setSize = _useState3[1];
|
|
14796
|
+
var _useState4 = React.useState(false),
|
|
14797
|
+
isCraftingDisabled = _useState4[0],
|
|
14798
|
+
setIsCraftingDisabled = _useState4[1];
|
|
14796
14799
|
React.useEffect(function () {
|
|
14797
14800
|
var handleResize = function handleResize() {
|
|
14798
14801
|
if (window.innerWidth < 500 && (size == null ? void 0 : size.width) !== mobilePortrait.width && (!scale || scale < 1)) {
|
|
@@ -14897,10 +14900,15 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
14897
14900
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
14898
14901
|
onPointerDown: onClose
|
|
14899
14902
|
}, "Cancel"), React__default.createElement(Button, {
|
|
14900
|
-
disabled: !craftItemKey,
|
|
14903
|
+
disabled: !craftItemKey || isCraftingDisabled,
|
|
14901
14904
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
14902
14905
|
onPointerDown: function onPointerDown() {
|
|
14903
|
-
|
|
14906
|
+
if (!craftItemKey || isCraftingDisabled) return;
|
|
14907
|
+
onCraftItem(craftItemKey);
|
|
14908
|
+
setIsCraftingDisabled(true);
|
|
14909
|
+
setTimeout(function () {
|
|
14910
|
+
setIsCraftingDisabled(false);
|
|
14911
|
+
}, 2000);
|
|
14904
14912
|
}
|
|
14905
14913
|
}, "Craft"))));
|
|
14906
14914
|
};
|
|
@@ -15460,7 +15468,7 @@ var DynamicText = function DynamicText(_ref) {
|
|
|
15460
15468
|
onFinish();
|
|
15461
15469
|
}
|
|
15462
15470
|
}
|
|
15463
|
-
},
|
|
15471
|
+
}, 25);
|
|
15464
15472
|
return function () {
|
|
15465
15473
|
clearInterval(interval);
|
|
15466
15474
|
};
|
|
@@ -15764,7 +15772,9 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15764
15772
|
}
|
|
15765
15773
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer, null, React__default.createElement(NPCThumbnail, {
|
|
15766
15774
|
src: imagePath || img$7
|
|
15767
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$i, null, React__default.createElement(
|
|
15775
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$i, null, React__default.createElement(CloseIcon, {
|
|
15776
|
+
onPointerDown: _onClose
|
|
15777
|
+
}, "X"), React__default.createElement(TextContainer$1, {
|
|
15768
15778
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
15769
15779
|
}, React__default.createElement(NPCDialogText, {
|
|
15770
15780
|
type: type,
|
|
@@ -15782,20 +15792,24 @@ var Container$i = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
15782
15792
|
displayName: "NPCDialog__Container",
|
|
15783
15793
|
componentId: "sc-1b4aw74-0"
|
|
15784
15794
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
15795
|
+
var CloseIcon = /*#__PURE__*/styled__default.p.withConfig({
|
|
15796
|
+
displayName: "NPCDialog__CloseIcon",
|
|
15797
|
+
componentId: "sc-1b4aw74-1"
|
|
15798
|
+
})(["position:absolute;top:-1.5rem;right:-0.4rem;cursor:pointer;color:white;font-size:1.1rem !important;"]);
|
|
15785
15799
|
var TextContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
15786
15800
|
displayName: "NPCDialog__TextContainer",
|
|
15787
|
-
componentId: "sc-1b4aw74-
|
|
15801
|
+
componentId: "sc-1b4aw74-2"
|
|
15788
15802
|
})(["flex:", " 0 0;width:355px;"], function (_ref2) {
|
|
15789
15803
|
var flex = _ref2.flex;
|
|
15790
15804
|
return flex;
|
|
15791
15805
|
});
|
|
15792
15806
|
var ThumbnailContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
15793
15807
|
displayName: "NPCDialog__ThumbnailContainer",
|
|
15794
|
-
componentId: "sc-1b4aw74-
|
|
15808
|
+
componentId: "sc-1b4aw74-3"
|
|
15795
15809
|
})(["flex:30% 0 0;display:flex;justify-content:flex-end;"]);
|
|
15796
15810
|
var NPCThumbnail = /*#__PURE__*/styled__default.img.withConfig({
|
|
15797
15811
|
displayName: "NPCDialog__NPCThumbnail",
|
|
15798
|
-
componentId: "sc-1b4aw74-
|
|
15812
|
+
componentId: "sc-1b4aw74-4"
|
|
15799
15813
|
})(["image-rendering:pixelated;height:128px;width:128px;"]);
|
|
15800
15814
|
|
|
15801
15815
|
(function (ImgSide) {
|