@rpg-engine/long-bow 0.6.83 → 0.6.86
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/Spellbook/cards/SpellInfoWrapper.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +84 -47
- 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 +84 -47
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Quests/QuestList.tsx +72 -89
- package/src/components/Spellbook/cards/SpellInfoWrapper.tsx +21 -6
package/dist/long-bow.esm.js
CHANGED
|
@@ -31944,7 +31944,7 @@ var QuestList = function QuestList(_ref) {
|
|
|
31944
31944
|
style: {
|
|
31945
31945
|
color: getStatusColor(quest.status)
|
|
31946
31946
|
}
|
|
31947
|
-
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, null, "Description:"), React.createElement(Value, null, quest.description))
|
|
31947
|
+
}, (_formatStatus = formatStatus(quest.status)) != null ? _formatStatus : 'Unknown')), React.createElement(QuestItem, null, React.createElement(Label, null, "Description:"), React.createElement(Value, null, quest.description)));
|
|
31948
31948
|
}) : React.createElement(NoQuestContainer, null, React.createElement("p", null, "There are no ongoing quests")));
|
|
31949
31949
|
};
|
|
31950
31950
|
var QuestListContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -31971,47 +31971,71 @@ var NoQuestContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
31971
31971
|
displayName: "QuestList__NoQuestContainer",
|
|
31972
31972
|
componentId: "sc-1c1y8sp-5"
|
|
31973
31973
|
})(["text-align:center;p{margin-top:5px;color:", ";}"], uiColors.lightGray);
|
|
31974
|
-
|
|
31975
|
-
|
|
31976
|
-
|
|
31977
|
-
|
|
31978
|
-
|
|
31979
|
-
|
|
31980
|
-
|
|
31981
|
-
|
|
31982
|
-
|
|
31983
|
-
|
|
31984
|
-
|
|
31985
|
-
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
}
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
31974
|
+
// const formatObjectives = (
|
|
31975
|
+
// objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]
|
|
31976
|
+
// ) => {
|
|
31977
|
+
// try {
|
|
31978
|
+
// if (!objectives || !Array.isArray(objectives)) return '';
|
|
31979
|
+
// return objectives
|
|
31980
|
+
// .map(objective => {
|
|
31981
|
+
// if ('killCountTarget' in objective) {
|
|
31982
|
+
// const killObjective = objective as IQuestObjectiveKill;
|
|
31983
|
+
// return `Kill ${formatText(
|
|
31984
|
+
// killObjective.creatureKeys?.join(', ') ?? ''
|
|
31985
|
+
// )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??
|
|
31986
|
+
// 0}`;
|
|
31987
|
+
// } else if ('targetNPCkey' in objective) {
|
|
31988
|
+
// const interactionObjective = objective as IQuestObjectiveInteraction;
|
|
31989
|
+
// return `Interact with NPC: ${formatText(
|
|
31990
|
+
// interactionObjective.targetNPCkey ?? ''
|
|
31991
|
+
// )}`;
|
|
31992
|
+
// } else {
|
|
31993
|
+
// return '';
|
|
31994
|
+
// }
|
|
31995
|
+
// })
|
|
31996
|
+
// .filter(Boolean)
|
|
31997
|
+
// .join('; ');
|
|
31998
|
+
// } catch (error) {
|
|
31999
|
+
// console.error('Error formatting objectives:', error);
|
|
32000
|
+
// return '';
|
|
32001
|
+
// }
|
|
32002
|
+
// };
|
|
32003
|
+
// const formatRewards = (rewards: IQuest['rewards']) => {
|
|
32004
|
+
// try {
|
|
32005
|
+
// if (!rewards || !Array.isArray(rewards)) return '';
|
|
32006
|
+
// return rewards
|
|
32007
|
+
// .map(reward => {
|
|
32008
|
+
// const itemKeysFormatted = reward?.itemKeys
|
|
32009
|
+
// ?.map(itemKey =>
|
|
32010
|
+
// itemKey && reward?.qty !== undefined
|
|
32011
|
+
// ? `${itemKey} x${reward.qty}`
|
|
32012
|
+
// : ''
|
|
32013
|
+
// )
|
|
32014
|
+
// .filter(Boolean)
|
|
32015
|
+
// .join(', ');
|
|
32016
|
+
// const spellKeysFormatted = reward?.spellKeys
|
|
32017
|
+
// ?.filter(Boolean)
|
|
32018
|
+
// .join(', ');
|
|
32019
|
+
// const formattedReward = itemKeysFormatted
|
|
32020
|
+
// ? `${formatText(itemKeysFormatted)}`
|
|
32021
|
+
// : '';
|
|
32022
|
+
// if (spellKeysFormatted) {
|
|
32023
|
+
// return formattedReward
|
|
32024
|
+
// ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`
|
|
32025
|
+
// : `Spells: ${formatText(spellKeysFormatted)}`;
|
|
32026
|
+
// }
|
|
32027
|
+
// return formattedReward || '';
|
|
32028
|
+
// })
|
|
32029
|
+
// .filter(Boolean)
|
|
32030
|
+
// .join('; ');
|
|
32031
|
+
// } catch (error) {
|
|
32032
|
+
// console.error(
|
|
32033
|
+
// `Error formatting rewards: ${JSON.stringify(rewards)}:`,
|
|
32034
|
+
// error
|
|
32035
|
+
// );
|
|
32036
|
+
// return '';
|
|
32037
|
+
// }
|
|
32038
|
+
// };
|
|
32015
32039
|
var formatText = function formatText(text) {
|
|
32016
32040
|
if (!text) return '';
|
|
32017
32041
|
return text.split('-').map(function (word) {
|
|
@@ -32678,22 +32702,35 @@ var Container$v = /*#__PURE__*/styled.div.withConfig({
|
|
|
32678
32702
|
var SpellInfoWrapper = function SpellInfoWrapper(_ref) {
|
|
32679
32703
|
var children = _ref.children,
|
|
32680
32704
|
spell = _ref.spell,
|
|
32681
|
-
scale = _ref.scale
|
|
32705
|
+
scale = _ref.scale,
|
|
32706
|
+
_ref$holdTouchDuratio = _ref.holdTouchDuration,
|
|
32707
|
+
holdTouchDuration = _ref$holdTouchDuratio === void 0 ? 500 : _ref$holdTouchDuratio;
|
|
32682
32708
|
var _useState = useState(false),
|
|
32683
32709
|
isTooltipVisible = _useState[0],
|
|
32684
32710
|
setIsTooltipVisible = _useState[1];
|
|
32685
32711
|
var _useState2 = useState(false),
|
|
32686
32712
|
isTooltipMobileVisible = _useState2[0],
|
|
32687
32713
|
setIsTooltipMobileVisible = _useState2[1];
|
|
32714
|
+
var touchTimeoutRef = useRef(null);
|
|
32715
|
+
var handleTouchStart = function handleTouchStart() {
|
|
32716
|
+
touchTimeoutRef.current = setTimeout(function () {
|
|
32717
|
+
setIsTooltipMobileVisible(true);
|
|
32718
|
+
setIsTooltipVisible(false);
|
|
32719
|
+
}, holdTouchDuration);
|
|
32720
|
+
};
|
|
32721
|
+
var handleTouchEnd = function handleTouchEnd() {
|
|
32722
|
+
if (touchTimeoutRef.current) {
|
|
32723
|
+
clearTimeout(touchTimeoutRef.current);
|
|
32724
|
+
touchTimeoutRef.current = null;
|
|
32725
|
+
}
|
|
32726
|
+
};
|
|
32688
32727
|
return React.createElement("div", {
|
|
32689
32728
|
onMouseEnter: function onMouseEnter() {
|
|
32690
32729
|
if (!isTooltipMobileVisible) setIsTooltipVisible(true);
|
|
32691
32730
|
},
|
|
32692
32731
|
onMouseLeave: setIsTooltipVisible.bind(null, false),
|
|
32693
|
-
|
|
32694
|
-
|
|
32695
|
-
setIsTooltipVisible(false);
|
|
32696
|
-
}
|
|
32732
|
+
onTouchStart: handleTouchStart,
|
|
32733
|
+
onTouchEnd: handleTouchEnd
|
|
32697
32734
|
}, children, isTooltipVisible && !isTooltipMobileVisible && React.createElement(MagicTooltip, {
|
|
32698
32735
|
spell: spell
|
|
32699
32736
|
}), isTooltipMobileVisible && React.createElement(MobileSpellTooltip, {
|