@rpg-engine/long-bow 0.3.76 → 0.3.78
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 +17 -13
- 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 +17 -13
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CraftBook/MockItems.ts +3 -172
- package/src/components/Item/Cards/ItemInfo.tsx +9 -5
- package/src/components/Item/Cards/ItemInfoDisplay.tsx +5 -0
- package/src/components/Item/Cards/MobileItemTooltip.tsx +38 -9
- package/src/mocks/itemContainer.mocks.ts +1 -1
|
@@ -33431,15 +33431,16 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
33431
33431
|
var x = -rect.x * 100 / (scale * 100);
|
|
33432
33432
|
var y = -rect.y * 100 / (scale * 100);
|
|
33433
33433
|
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
33434
|
-
current.style.opacity = '
|
|
33434
|
+
current.style.opacity = '0.92';
|
|
33435
33435
|
}
|
|
33436
33436
|
return;
|
|
33437
33437
|
}, []);
|
|
33438
33438
|
return React__default.createElement(Container$9, {
|
|
33439
33439
|
ref: ref,
|
|
33440
|
-
onTouchEnd: function onTouchEnd(
|
|
33441
|
-
|
|
33442
|
-
|
|
33440
|
+
onTouchEnd: function onTouchEnd() {
|
|
33441
|
+
setTimeout(function () {
|
|
33442
|
+
closeTooltip();
|
|
33443
|
+
}, 10);
|
|
33443
33444
|
},
|
|
33444
33445
|
scale: scale
|
|
33445
33446
|
}, React__default.createElement(ItemInfoDisplay, {
|
|
@@ -33452,7 +33453,10 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
33452
33453
|
return React__default.createElement(Option, {
|
|
33453
33454
|
key: option.id,
|
|
33454
33455
|
onTouchEnd: function onTouchEnd() {
|
|
33455
|
-
|
|
33456
|
+
setTimeout(function () {
|
|
33457
|
+
onSelected == null ? void 0 : onSelected(option.id);
|
|
33458
|
+
closeTooltip();
|
|
33459
|
+
}, 10);
|
|
33456
33460
|
}
|
|
33457
33461
|
}, option.text);
|
|
33458
33462
|
})));
|
|
@@ -33460,7 +33464,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
33460
33464
|
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33461
33465
|
displayName: "MobileItemTooltip__Container",
|
|
33462
33466
|
componentId: "sc-ku4p1j-0"
|
|
33463
|
-
})(["position:fixed;z-index:50;left:0;top:0;opacity:0;width:", ";height:", ";background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;"], function (_ref2) {
|
|
33467
|
+
})(["position:fixed;z-index:50;left:0;top:0;opacity:0;width:", ";height:", ";background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;@media (max-width:580px){flex-direction:column;}"], function (_ref2) {
|
|
33464
33468
|
var scale = _ref2.scale;
|
|
33465
33469
|
return "calc(100vw * 100 / " + scale * 100 + ")";
|
|
33466
33470
|
}, function (_ref3) {
|
|
@@ -33470,11 +33474,11 @@ var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
|
33470
33474
|
var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
33471
33475
|
displayName: "MobileItemTooltip__OptionsContainer",
|
|
33472
33476
|
componentId: "sc-ku4p1j-1"
|
|
33473
|
-
})(["display:flex;flex-direction:column;
|
|
33477
|
+
})(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:580px){flex-direction:row;justify-content:center;}"]);
|
|
33474
33478
|
var Option = /*#__PURE__*/styled.button.withConfig({
|
|
33475
33479
|
displayName: "MobileItemTooltip__Option",
|
|
33476
33480
|
componentId: "sc-ku4p1j-2"
|
|
33477
|
-
})(["padding:1rem;background-color:
|
|
33481
|
+
})(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.2s;&:hover{background-color:#555;}@media (max-width:580px){padding:1rem 0.5rem;}"]);
|
|
33478
33482
|
|
|
33479
33483
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33480
33484
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
@@ -34034,7 +34038,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
34034
34038
|
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
34035
34039
|
displayName: "ItemInfo__Container",
|
|
34036
34040
|
componentId: "sc-1xm4q8k-0"
|
|
34037
|
-
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;
|
|
34041
|
+
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:15rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
|
|
34038
34042
|
var _rarityColor;
|
|
34039
34043
|
var item = _ref2.item;
|
|
34040
34044
|
return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
|
|
@@ -34057,11 +34061,11 @@ var Type = /*#__PURE__*/styled.div.withConfig({
|
|
|
34057
34061
|
var Statistic = /*#__PURE__*/styled.div.withConfig({
|
|
34058
34062
|
displayName: "ItemInfo__Statistic",
|
|
34059
34063
|
componentId: "sc-1xm4q8k-4"
|
|
34060
|
-
})(["margin-bottom:0.4rem;.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], uiColors.lightGreen, uiColors.cardinal);
|
|
34064
|
+
})(["margin-bottom:0.4rem;width:max-content;.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], uiColors.lightGreen, uiColors.cardinal);
|
|
34061
34065
|
var Description = /*#__PURE__*/styled.div.withConfig({
|
|
34062
34066
|
displayName: "ItemInfo__Description",
|
|
34063
34067
|
componentId: "sc-1xm4q8k-5"
|
|
34064
|
-
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;
|
|
34068
|
+
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
34065
34069
|
var Header = /*#__PURE__*/styled.div.withConfig({
|
|
34066
34070
|
displayName: "ItemInfo__Header",
|
|
34067
34071
|
componentId: "sc-1xm4q8k-6"
|
|
@@ -34069,7 +34073,7 @@ var Header = /*#__PURE__*/styled.div.withConfig({
|
|
|
34069
34073
|
var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
|
|
34070
34074
|
displayName: "ItemInfo__AllowedSlots",
|
|
34071
34075
|
componentId: "sc-1xm4q8k-7"
|
|
34072
|
-
})(["display:flex;align-items:center;justify-content:center;
|
|
34076
|
+
})(["display:flex;align-items:center;justify-content:center;gap:0.5rem;margin-left:auto;align-self:flex-start;"]);
|
|
34073
34077
|
var StackInfo = /*#__PURE__*/styled.div.withConfig({
|
|
34074
34078
|
displayName: "ItemInfo__StackInfo",
|
|
34075
34079
|
componentId: "sc-1xm4q8k-8"
|
|
@@ -34122,7 +34126,7 @@ var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
|
|
|
34122
34126
|
var Flex = /*#__PURE__*/styled.div.withConfig({
|
|
34123
34127
|
displayName: "ItemInfoDisplay__Flex",
|
|
34124
34128
|
componentId: "sc-1lftdo8-0"
|
|
34125
|
-
})(["display:flex;gap:0.5rem;flex-direction:", ";"], function (_ref2) {
|
|
34129
|
+
})(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:580px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
|
|
34126
34130
|
var $isMobile = _ref2.$isMobile;
|
|
34127
34131
|
return $isMobile ? 'row-reverse' : 'row';
|
|
34128
34132
|
});
|