@rpg-engine/long-bow 0.2.21 → 0.2.23
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/HistoryDialog.d.ts +1 -1
- package/dist/components/QuestList.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +32 -4
- 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 +32 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/HistoryDialog.tsx +20 -3
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/{background.png → background01.png} +0 -0
- package/src/components/NPCDialog/img/background02.png +0 -0
- package/src/components/NPCDialog/img/background03.png +0 -0
- package/src/components/QuestList.tsx +27 -9
- package/src/mocks/.DS_Store +0 -0
- package/src/stories/HistoryDialog.stories.tsx +4 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -28394,7 +28394,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
28394
28394
|
}
|
|
28395
28395
|
}, React.createElement(Title$2, null, "Quests"), React.createElement("hr", {
|
|
28396
28396
|
className: "golden"
|
|
28397
|
-
}), React.createElement(QuestListContainer, null, quests.map(function (quest, i) {
|
|
28397
|
+
}), React.createElement(QuestListContainer, null, quests ? quests.map(function (quest, i) {
|
|
28398
28398
|
return React.createElement("div", {
|
|
28399
28399
|
className: "quest-item",
|
|
28400
28400
|
key: i
|
|
@@ -28407,7 +28407,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
28407
28407
|
}, quest.title), React.createElement("p", {
|
|
28408
28408
|
className: "quest-detail__description"
|
|
28409
28409
|
}, quest.description)));
|
|
28410
|
-
}))));
|
|
28410
|
+
}) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")))));
|
|
28411
28411
|
};
|
|
28412
28412
|
var QuestDraggableContainer$1 = /*#__PURE__*/styled(DraggableContainer).withConfig({
|
|
28413
28413
|
displayName: "QuestList__QuestDraggableContainer",
|
|
@@ -28420,7 +28420,11 @@ var Title$2 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
28420
28420
|
var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
28421
28421
|
displayName: "QuestList__QuestListContainer",
|
|
28422
28422
|
componentId: "sc-1a2vx6q-2"
|
|
28423
|
-
})(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;.quest-item{display:flex;align-items:flex-start;margin-bottom:12px;}.quest-number{border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;margin-right:16px;background-color:brown;flex-shrink:0;}.quest-number.completed{background-color:yellow;}p{margin:0;}.quest-detail__title{color:yellow;}.quest-detail__description{margin-top:5px;}"]);
|
|
28423
|
+
})(["margin-top:20px;margin-bottom:40px;overflow-y:auto;max-height:400px;.quest-item{display:flex;align-items:flex-start;margin-bottom:12px;}.quest-number{border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;margin-right:16px;background-color:brown;flex-shrink:0;}.quest-number.completed{background-color:yellow;}p{margin:0;}.quest-detail__title{color:yellow;}.quest-detail__description{margin-top:5px;}.Noquest-detail__description{margin-top:5px;margin:auto;}"]);
|
|
28424
|
+
var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
28425
|
+
displayName: "QuestList__NoQuestContainer",
|
|
28426
|
+
componentId: "sc-1a2vx6q-3"
|
|
28427
|
+
})(["text-align:center;p{margin-top:5px;}"]);
|
|
28424
28428
|
|
|
28425
28429
|
var InputRadio = function InputRadio(_ref) {
|
|
28426
28430
|
var name = _ref.name,
|
|
@@ -28838,8 +28842,32 @@ var HistoryDialog = function HistoryDialog(_ref) {
|
|
|
28838
28842
|
imagePath = _ref.imagePath,
|
|
28839
28843
|
textAndTypeArray = _ref.textAndTypeArray,
|
|
28840
28844
|
onClose = _ref.onClose;
|
|
28845
|
+
|
|
28846
|
+
var _useState = useState(0),
|
|
28847
|
+
img = _useState[0],
|
|
28848
|
+
setImage = _useState[1];
|
|
28849
|
+
|
|
28850
|
+
var onHandleSpacePress = function onHandleSpacePress(event) {
|
|
28851
|
+
if (event.code === 'Space') {
|
|
28852
|
+
if (img < (backgroundImgPath == null ? void 0 : backgroundImgPath.length) - 1) {
|
|
28853
|
+
setImage(function (prev) {
|
|
28854
|
+
return prev + 1;
|
|
28855
|
+
});
|
|
28856
|
+
} else {
|
|
28857
|
+
// if there's no more text chunks, close the dialog
|
|
28858
|
+
onClose();
|
|
28859
|
+
}
|
|
28860
|
+
}
|
|
28861
|
+
};
|
|
28862
|
+
|
|
28863
|
+
useEffect(function () {
|
|
28864
|
+
document.addEventListener('keydown', onHandleSpacePress);
|
|
28865
|
+
return function () {
|
|
28866
|
+
return document.removeEventListener('keydown', onHandleSpacePress);
|
|
28867
|
+
};
|
|
28868
|
+
}, [backgroundImgPath]);
|
|
28841
28869
|
return React.createElement(BackgroundContainer, {
|
|
28842
|
-
imgPath: backgroundImgPath,
|
|
28870
|
+
imgPath: backgroundImgPath[img],
|
|
28843
28871
|
fullImg: fullCoverBackground
|
|
28844
28872
|
}, React.createElement(DialogContainer, null, textAndTypeArray ? React.createElement(NPCMultiDialog, {
|
|
28845
28873
|
textAndTypeArray: textAndTypeArray,
|