bnstooltips 1.18.14 → 1.18.15
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/build/SkillTooltip/SkillTooltip.d.ts +1 -1
- package/build/SkillTooltip/SkillTooltip.types.d.ts +3 -0
- package/build/SkillTooltipWrapper/SkillTooltipWrapper.types.d.ts +3 -0
- package/build/index.es.js +32 -5
- package/build/index.es.js.map +1 -1
- package/build/index.js +32 -5
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SkillTooltipProps } from "./SkillTooltip.types";
|
|
3
3
|
import "./SkillTooltip.scss";
|
|
4
|
-
declare function SkillTooltip({ data, debug }: SkillTooltipProps): JSX.Element;
|
|
4
|
+
declare function SkillTooltip({ data, debug, masteryPoints, masteryValue, masteryIsPercentage, }: SkillTooltipProps): JSX.Element;
|
|
5
5
|
export default SkillTooltip;
|
|
@@ -2,5 +2,8 @@ import { Skill } from "../Utilities/ISkill";
|
|
|
2
2
|
import { ITooltipWrapper } from "../Utilities/Models";
|
|
3
3
|
export interface SkillTooltipWrapperProps extends ITooltipWrapper {
|
|
4
4
|
data: Skill;
|
|
5
|
+
masteryPoints?: number;
|
|
6
|
+
masteryValue?: number;
|
|
7
|
+
masteryIsPercentage?: boolean;
|
|
5
8
|
debug?: boolean;
|
|
6
9
|
}
|
package/build/index.es.js
CHANGED
|
@@ -8567,7 +8567,7 @@ function JsonArrayToJsxArray(stringArray) {
|
|
|
8567
8567
|
return jsxArray;
|
|
8568
8568
|
}
|
|
8569
8569
|
|
|
8570
|
-
var css_248z$6 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.TooltipBase_bns_downgradeBlue_color {\n color: #28A9F0;\n}\n\n.SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative;\n}\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px;\n position: relative;\n}\n.SkillTooltip_skillIconCanvas {\n width: 60px;\n height: 60px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n filter: blur(30px);\n opacity: 0.5;\n}\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9;\n}\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8);\n}\n.SkillTooltip_mainText {\n font-weight: 500;\n}\n.SkillTooltip_smallText {\n font-size: 12px;\n}\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem;\n}\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px;\n}\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0;\n}\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important;\n}\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important;\n}\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px;\n}\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem;\n}\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem;\n}\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem;\n}\n\n.tooltipArg {\n color: #00D9FF;\n font-weight: 600;\n}\n\n.wordbreakall {\n word-break: break-all;\n}\n\n.wordbreakword {\n word-break: break-word;\n}\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px;\n}\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px;\n}\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px;\n}";
|
|
8570
|
+
var css_248z$6 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.TooltipBase_bns_downgradeBlue_color {\n color: #28A9F0;\n}\n\n.SkillTooltip_skillIconContainer {\n width: 60px;\n height: 60px;\n padding: 0;\n float: left;\n position: relative;\n}\n.SkillTooltip_skillIcon {\n width: 60px;\n height: 60px;\n position: relative;\n}\n.SkillTooltip_skillIconCanvas {\n width: 60px;\n height: 60px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n filter: blur(30px);\n opacity: 0.5;\n}\n.SkillTooltip_buttonIcon {\n position: absolute;\n right: 1px;\n bottom: 1px;\n height: 18px;\n opacity: 0.9;\n}\n.SkillTooltip_buttonIconMouse {\n background-color: rgba(0, 0, 0, 0.8);\n}\n.SkillTooltip_mainText {\n font-weight: 500;\n}\n.SkillTooltip_smallText {\n font-size: 12px;\n}\n.SkillTooltip_subTextMargin {\n margin-bottom: 0.3rem;\n}\n.SkillTooltip_boundaryContainer {\n display: flex;\n width: 100%;\n margin-bottom: 0.5rem;\n line-height: 17px;\n}\n.SkillTooltip_boundary {\n flex: 1;\n flex-basis: 0px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: black;\n margin: 0.15rem;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryHead {\n border-radius: 3px 0 0 0;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryHead {\n border-radius: 0 3px 0 0;\n}\n.SkillTooltip_boundary:first-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 0 3px;\n}\n.SkillTooltip_boundary:last-of-type > .SkillTooltip_boundaryBody {\n border-radius: 0 0 3px 0;\n}\n.SkillTooltip_boundaryHead {\n color: white;\n font-weight: 500;\n font-size: 12px;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0.3rem;\n text-align: center;\n flex: 1;\n min-height: 26px;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBody {\n color: white;\n padding: 0.5rem 0.3rem;\n margin-top: 0.15rem;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 40px;\n flex: 2;\n background-color: rgba(127, 127, 127, 0.4);\n}\n.SkillTooltip_boundaryBodyModifier {\n min-height: 33px !important;\n}\n.SkillTooltip_boundaryHasIcon {\n min-height: 50px !important;\n}\n.SkillTooltip_conditionRow {\n display: flex;\n align-items: center;\n font-size: 12px;\n}\n.SkillTooltip_conditionRow:not(:last-of-type) {\n margin-bottom: 0.1rem;\n}\n.SkillTooltip_conditionIcon {\n width: 20px;\n height: 20px;\n margin-right: 0.33rem;\n}\n.SkillTooltip_conditionIconSmall {\n width: 12px;\n height: 12px;\n margin-right: 0.22rem;\n}\n\n.tooltipArg {\n color: #00D9FF;\n font-weight: 600;\n}\n\n.wordbreakall {\n word-break: break-all;\n}\n\n.wordbreakword {\n word-break: break-word;\n}\n\n.target-360 {\n background-image: url(\"./360.png\");\n background-repeat: no-repeat;\n background-position: 50% 60%;\n background-size: auto 64px;\n}\n\n.target-front-180 {\n background-image: url(\"./180.png\");\n background-repeat: no-repeat;\n background-position: 50% 70%;\n background-size: auto 64px;\n}\n\n.laser {\n background-image: url(\"./laser.png\");\n background-repeat: no-repeat;\n background-position: 50% 50%;\n background-size: auto 64px;\n}\n\n.arcanemark {\n background-image: url(\"./arcanemark.png\");\n width: 24px;\n height: 24px;\n background-position: 50% 50%;\n background-size: auto 24px;\n margin-left: 0.33rem;\n margin-right: 0.05rem;\n}";
|
|
8571
8571
|
styleInject(css_248z$6);
|
|
8572
8572
|
|
|
8573
8573
|
function getButtonIconPath(button) {
|
|
@@ -8733,7 +8733,7 @@ function SkillConditions(_a) {
|
|
|
8733
8733
|
}
|
|
8734
8734
|
|
|
8735
8735
|
function SkillTooltip(_a) {
|
|
8736
|
-
var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b;
|
|
8736
|
+
var data = _a.data, _b = _a.debug, debug = _b === void 0 ? false : _b, _c = _a.masteryPoints, masteryPoints = _c === void 0 ? 0 : _c, _d = _a.masteryValue, masteryValue = _d === void 0 ? 0 : _d, _e = _a.masteryIsPercentage, masteryIsPercentage = _e === void 0 ? false : _e;
|
|
8737
8737
|
var skill = data;
|
|
8738
8738
|
var tooltipBaseProps = {
|
|
8739
8739
|
title: skill.Name,
|
|
@@ -8753,6 +8753,7 @@ function SkillTooltip(_a) {
|
|
|
8753
8753
|
//bottomPart
|
|
8754
8754
|
AddSubTexts(tooltipBaseProps.subInfoGroups, skill);
|
|
8755
8755
|
AddBreakValue(tooltipBaseProps.subInfoGroups, skill);
|
|
8756
|
+
AddSkillMastery(tooltipBaseProps.subInfoGroups, masteryPoints, masteryValue, masteryIsPercentage);
|
|
8756
8757
|
AddPvpModifiers(tooltipBaseProps.subInfoGroups, skill);
|
|
8757
8758
|
AddBoundaries(tooltipBaseProps.subInfoGroups, skill);
|
|
8758
8759
|
AddConditions(tooltipBaseProps.subInfoGroups, skill);
|
|
@@ -8804,6 +8805,32 @@ function AddBreakValue(subInfoGroups, skill) {
|
|
|
8804
8805
|
});
|
|
8805
8806
|
}
|
|
8806
8807
|
}
|
|
8808
|
+
function AddSkillMastery(subInfoGroups, masteryPoints, masteryValue, masteryIsPercentage) {
|
|
8809
|
+
if (masteryPoints == null || masteryPoints == 0 || masteryValue == null || masteryValue == 0)
|
|
8810
|
+
return;
|
|
8811
|
+
subInfoGroups.push({
|
|
8812
|
+
title: "",
|
|
8813
|
+
texts: [
|
|
8814
|
+
React.createElement("div", null,
|
|
8815
|
+
React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
8816
|
+
React.createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, "Skill Grandmaster"),
|
|
8817
|
+
React.createElement("div", { className: "arcanemark" }),
|
|
8818
|
+
React.createElement("span", { className: "tooltipArg", style: { fontSize: "14px" } }, masteryPoints)),
|
|
8819
|
+
masteryIsPercentage ?
|
|
8820
|
+
React.createElement("div", null,
|
|
8821
|
+
"Damage increase:\u00A0",
|
|
8822
|
+
React.createElement("span", { className: "tooltipArg" },
|
|
8823
|
+
masteryValue,
|
|
8824
|
+
"%"))
|
|
8825
|
+
:
|
|
8826
|
+
React.createElement("div", null,
|
|
8827
|
+
"Cooldown reduction:\u00A0",
|
|
8828
|
+
React.createElement("span", { className: "tooltipArg" },
|
|
8829
|
+
masteryValue,
|
|
8830
|
+
" sec."))),
|
|
8831
|
+
],
|
|
8832
|
+
});
|
|
8833
|
+
}
|
|
8807
8834
|
function AddPvpModifiers(subInfoGroups, skill) {
|
|
8808
8835
|
if (skill.Pvp == null || skill.EqualizedPvp == null)
|
|
8809
8836
|
return;
|
|
@@ -9012,9 +9039,9 @@ var css_248z$5 = ".TooltipBase_bns_upgradeRed_color {\n color: #FF2818;\n}\n\n.
|
|
|
9012
9039
|
styleInject(css_248z$5);
|
|
9013
9040
|
|
|
9014
9041
|
var SkillTooltipWrapper = function (_a) {
|
|
9015
|
-
var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g;
|
|
9042
|
+
var data = _a.data, children = _a.children, _b = _a.interactive, interactive = _b === void 0 ? false : _b, _c = _a.placement, placement = _c === void 0 ? "right" : _c, _d = _a.followCursor, followCursor$1 = _d === void 0 ? false : _d, _e = _a.trigger, trigger = _e === void 0 ? "mouseenter focus" : _e, _f = _a.showArrow, showArrow = _f === void 0 ? true : _f, _g = _a.debug, debug = _g === void 0 ? false : _g, _h = _a.masteryPoints, masteryPoints = _h === void 0 ? 0 : _h, _j = _a.masteryValue, masteryValue = _j === void 0 ? 0 : _j, _k = _a.masteryIsPercentage, masteryIsPercentage = _k === void 0 ? false : _k;
|
|
9016
9043
|
var spanRef = useRef(null);
|
|
9017
|
-
var
|
|
9044
|
+
var _l = useState(null), childRef = _l[0], setChildRef = _l[1];
|
|
9018
9045
|
/**
|
|
9019
9046
|
* Mount the temporary span element.
|
|
9020
9047
|
* retrieve and store the target element's reference.
|
|
@@ -9027,7 +9054,7 @@ var SkillTooltipWrapper = function (_a) {
|
|
|
9027
9054
|
}, []);
|
|
9028
9055
|
return (React.createElement(React.Fragment, null,
|
|
9029
9056
|
children,
|
|
9030
|
-
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && (!interactive && !debug), appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React.createElement(SkillTooltip, { data: data, debug: debug }), theme: "grade" + 4, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
9057
|
+
childRef ? (React.createElement(Tippy, { arrow: showArrow, trigger: trigger, plugins: [followCursor], followCursor: followCursor$1 && (!interactive && !debug), appendTo: document.body, placement: placement, animation: "fade", interactive: interactive || debug, content: React.createElement(SkillTooltip, { data: data, debug: debug, masteryPoints: masteryPoints, masteryValue: masteryValue, masteryIsPercentage: masteryIsPercentage }), theme: "grade" + 4, reference: childRef })) : (React.createElement("span", { "data-testid": "TooltipWrapper", ref: spanRef, style: { display: "none" } }))));
|
|
9031
9058
|
};
|
|
9032
9059
|
|
|
9033
9060
|
var ServerRegion;
|