@rpg-engine/long-bow 0.8.237 → 0.8.240
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 +30 -15
- 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 +31 -16
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +10 -10
- package/src/components/Item/Inventory/__tests__/itemContainerHelper.spec.ts +60 -0
- package/src/components/Item/Inventory/itemContainerHelper.ts +9 -0
- package/src/components/LoginStreak/LoginStreakPanel.tsx +1 -1
- package/src/components/LoginStreak/__tests__/LoginStreakPanel.spec.tsx +33 -0
- package/src/components/Spellbook/Spell.tsx +12 -1
- package/src/components/Spellbook/__tests__/SpellInfoWrapper.test.tsx +26 -0
- package/src/components/Spellbook/__tests__/Spellbook.test.tsx +12 -0
- package/src/components/Spellbook/cards/SpellInfoWrapper.tsx +3 -1
- package/src/stories/Features/loginStreak/LoginStreakPanel.stories.tsx +16 -16
- package/src/stories/Features/quest/QuestList.stories.tsx +2 -2
package/dist/long-bow.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useMemo, me
|
|
|
2
2
|
import styled, { css, createGlobalStyle, keyframes } from 'styled-components';
|
|
3
3
|
import { BeatLoader } from 'react-spinners';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities,
|
|
5
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ItemSubType, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, DC_TO_GOLD_SWAP_RATE, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, MarketplaceBuyOrderStatus, MarketplaceAcceptedCurrency, formatDCAmount, goldToDC, MarketplaceTransactionType, CharacterClass as CharacterClass$2, QuestType, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, PaymentCurrency, UserAccountTypes, PeriodOfDay } from '@rpg-engine/shared';
|
|
6
6
|
export { MarketplaceAcceptedCurrency } from '@rpg-engine/shared';
|
|
7
7
|
import dayjs from 'dayjs';
|
|
8
8
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
@@ -2859,6 +2859,12 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
|
|
|
2859
2859
|
text: "Detach Gems"
|
|
2860
2860
|
});
|
|
2861
2861
|
}
|
|
2862
|
+
if (itemContainerType === ItemContainerType.Inventory && item.subType === ItemSubType.SoulGem && item.soulGem) {
|
|
2863
|
+
contextActionMenu.push({
|
|
2864
|
+
id: 'attach-soul-gem',
|
|
2865
|
+
text: 'Attach gem'
|
|
2866
|
+
});
|
|
2867
|
+
}
|
|
2862
2868
|
return contextActionMenu;
|
|
2863
2869
|
};
|
|
2864
2870
|
|
|
@@ -6275,7 +6281,9 @@ var LoginStreakPanel = function LoginStreakPanel(_ref) {
|
|
|
6275
6281
|
return React.createElement(MilestoneCard, {
|
|
6276
6282
|
key: milestone.day,
|
|
6277
6283
|
"$reached": milestone.reached
|
|
6278
|
-
}, React.createElement(MilestoneDayLabel, null, "Day ", milestone.day), React.createElement(MilestoneRewardName, null, milestone.
|
|
6284
|
+
}, React.createElement(MilestoneDayLabel, null, "Day ", milestone.day), React.createElement(MilestoneRewardName, null, milestone.rewards.map(function (reward) {
|
|
6285
|
+
return reward.quantity + "x " + reward.itemName;
|
|
6286
|
+
}).join(', ')), React.createElement(MilestoneBadge, {
|
|
6279
6287
|
"$reached": milestone.reached
|
|
6280
6288
|
}, milestone.reached ? '✓' : '○'));
|
|
6281
6289
|
})), React.createElement(MotivationalText, null, getMotivationalText(streak, isConsecutive, milestones))));
|
|
@@ -17412,7 +17420,10 @@ var SpellInfoWrapper = function SpellInfoWrapper(_ref) {
|
|
|
17412
17420
|
if (!isTooltipMobileVisible) setIsTooltipVisible(true);
|
|
17413
17421
|
},
|
|
17414
17422
|
onMouseLeave: function onMouseLeave(event) {
|
|
17415
|
-
|
|
17423
|
+
var _document$activeEleme;
|
|
17424
|
+
if (!event.currentTarget.contains(document.activeElement) || !((_document$activeEleme = document.activeElement) != null && _document$activeEleme.matches(':focus-visible'))) {
|
|
17425
|
+
setIsTooltipVisible(false);
|
|
17426
|
+
}
|
|
17416
17427
|
},
|
|
17417
17428
|
onTouchStart: handleTouchStart,
|
|
17418
17429
|
onTouchEnd: clearHold,
|
|
@@ -17525,15 +17536,19 @@ var Spell = function Spell(_ref) {
|
|
|
17525
17536
|
"$unavailable": unavailable
|
|
17526
17537
|
}, note)));
|
|
17527
17538
|
};
|
|
17539
|
+
var assignmentPulse = /*#__PURE__*/keyframes(["0%,100%{background-color:rgba(255,247,215,.5);}50%{background-color:rgba(255,252,235,.9);}"]);
|
|
17528
17540
|
var Card$1 = /*#__PURE__*/styled.button.withConfig({
|
|
17529
17541
|
displayName: "Spell__Card",
|
|
17530
17542
|
componentId: "sc-j96fa2-0"
|
|
17531
|
-
})(["box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-width:0;padding:7px 8px 8px;text-align:left;color:#392718;background:rgba(255,247,215,0.5);border:1px solid ", ";box-shadow:", ";border-radius:3px;font:inherit;cursor:pointer;transition:background .12s,border-color .12s;&:hover:not(:disabled){background:rgba(255,252,235,.9);border-color:#8a5a14;box-shadow:inset 0 0 0 1px #8a5a14;}&:focus-visible{outline:3px solid #3a2110;outline-offset:2px;}&&:disabled{cursor:default;background:rgba(113,81,49,.1);border-style:dashed;color:#392718;filter:none;}&:disabled img,&:disabled canvas{opacity:.55;}"], function (_ref2) {
|
|
17543
|
+
})(["box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-width:0;padding:7px 8px 8px;text-align:left;color:#392718;background:rgba(255,247,215,0.5);border:1px solid ", ";box-shadow:", ";border-radius:3px;font:inherit;cursor:pointer;transition:background .12s,border-color .12s;animation-name:", ";animation-duration:1.4s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;&:disabled{animation-name:none;}@media (prefers-reduced-motion:reduce){animation-name:none;}&:hover:not(:disabled){background:rgba(255,252,235,.9);border-color:#8a5a14;box-shadow:inset 0 0 0 1px #8a5a14;}&:focus-visible{outline:3px solid #3a2110;outline-offset:2px;}&&:disabled{cursor:default;background:rgba(113,81,49,.1);border-style:dashed;color:#392718;filter:none;}&:disabled img,&:disabled canvas{opacity:.55;}"], function (_ref2) {
|
|
17532
17544
|
var $assigning = _ref2.$assigning;
|
|
17533
17545
|
return $assigning ? '#8a5a14' : 'rgba(89, 56, 28, .4)';
|
|
17534
17546
|
}, function (_ref3) {
|
|
17535
17547
|
var $assigning = _ref3.$assigning;
|
|
17536
17548
|
return $assigning ? 'inset 0 0 0 1px #8a5a14' : 'none';
|
|
17549
|
+
}, function (_ref4) {
|
|
17550
|
+
var $assigning = _ref4.$assigning;
|
|
17551
|
+
return $assigning ? assignmentPulse : 'none';
|
|
17537
17552
|
});
|
|
17538
17553
|
var Heading = /*#__PURE__*/styled.span.withConfig({
|
|
17539
17554
|
displayName: "Spell__Heading",
|
|
@@ -17566,12 +17581,12 @@ var RARITY_INK = (_RARITY_INK = {}, _RARITY_INK[ItemRarities.Common] = '#5a3f27'
|
|
|
17566
17581
|
var Rarity$1 = /*#__PURE__*/styled.span.withConfig({
|
|
17567
17582
|
displayName: "Spell__Rarity",
|
|
17568
17583
|
componentId: "sc-j96fa2-6"
|
|
17569
|
-
})(["display:inline-block;flex:none;padding:1px 5px;border:1px solid ", ";border-radius:2px;background:rgba(255,250,229,.7);&&{font-size:9px;line-height:1.3;color:", ";text-shadow:none;}"], function (
|
|
17570
|
-
var $rarity = _ref4.$rarity;
|
|
17571
|
-
return RARITY_INK[$rarity];
|
|
17572
|
-
}, function (_ref5) {
|
|
17584
|
+
})(["display:inline-block;flex:none;padding:1px 5px;border:1px solid ", ";border-radius:2px;background:rgba(255,250,229,.7);&&{font-size:9px;line-height:1.3;color:", ";text-shadow:none;}"], function (_ref5) {
|
|
17573
17585
|
var $rarity = _ref5.$rarity;
|
|
17574
17586
|
return RARITY_INK[$rarity];
|
|
17587
|
+
}, function (_ref6) {
|
|
17588
|
+
var $rarity = _ref6.$rarity;
|
|
17589
|
+
return RARITY_INK[$rarity];
|
|
17575
17590
|
});
|
|
17576
17591
|
var Description$8 = /*#__PURE__*/styled.span.withConfig({
|
|
17577
17592
|
displayName: "Spell__Description",
|
|
@@ -17587,8 +17602,8 @@ var Facts = /*#__PURE__*/styled.span.withConfig({
|
|
|
17587
17602
|
var Requirement = /*#__PURE__*/styled.span.withConfig({
|
|
17588
17603
|
displayName: "Spell__Requirement",
|
|
17589
17604
|
componentId: "sc-j96fa2-9"
|
|
17590
|
-
})(["display:block;&&{font-size:9px;line-height:1.5;color:#392718;text-shadow:none;}", ""], function (
|
|
17591
|
-
var $unmet =
|
|
17605
|
+
})(["display:block;&&{font-size:9px;line-height:1.5;color:#392718;text-shadow:none;}", ""], function (_ref7) {
|
|
17606
|
+
var $unmet = _ref7.$unmet;
|
|
17592
17607
|
return $unmet && css(["padding:3px 6px;background:rgba(138,42,34,.12);border-left:3px solid #8a2a22;border-radius:2px;&&{color:#8a2a22;}"]);
|
|
17593
17608
|
});
|
|
17594
17609
|
var Stats = /*#__PURE__*/styled.span.withConfig({
|
|
@@ -17610,18 +17625,18 @@ var STAT_TONES = {
|
|
|
17610
17625
|
var Value$2 = /*#__PURE__*/styled.span.withConfig({
|
|
17611
17626
|
displayName: "Spell__Value",
|
|
17612
17627
|
componentId: "sc-j96fa2-13"
|
|
17613
|
-
})(["&&{font-size:10px;line-height:1.4;color:", ";text-shadow:none;}"], function (
|
|
17614
|
-
var $tone =
|
|
17628
|
+
})(["&&{font-size:10px;line-height:1.4;color:", ";text-shadow:none;}"], function (_ref8) {
|
|
17629
|
+
var $tone = _ref8.$tone;
|
|
17615
17630
|
return $tone ? STAT_TONES[$tone] : '#2a1708';
|
|
17616
17631
|
});
|
|
17617
17632
|
var Status$1 = /*#__PURE__*/styled.span.withConfig({
|
|
17618
17633
|
displayName: "Spell__Status",
|
|
17619
17634
|
componentId: "sc-j96fa2-14"
|
|
17620
|
-
})(["display:flex;align-items:center;gap:6px;margin-top:4px;&&{font-size:9px;line-height:1.5;color:", ";text-shadow:none;}&::before{content:'';flex:none;width:6px;height:6px;background:currentColor;clip-path:", ";}"], function (
|
|
17621
|
-
var $unavailable = _ref8.$unavailable;
|
|
17622
|
-
return $unavailable ? '#8a2a22' : '#4b4420';
|
|
17623
|
-
}, function (_ref9) {
|
|
17635
|
+
})(["display:flex;align-items:center;gap:6px;margin-top:4px;&&{font-size:9px;line-height:1.5;color:", ";text-shadow:none;}&::before{content:'';flex:none;width:6px;height:6px;background:currentColor;clip-path:", ";}"], function (_ref9) {
|
|
17624
17636
|
var $unavailable = _ref9.$unavailable;
|
|
17637
|
+
return $unavailable ? '#8a2a22' : '#4b4420';
|
|
17638
|
+
}, function (_ref10) {
|
|
17639
|
+
var $unavailable = _ref10.$unavailable;
|
|
17625
17640
|
return $unavailable ? 'none' : 'polygon(0 0, 100% 50%, 0 100%)';
|
|
17626
17641
|
});
|
|
17627
17642
|
|