@rpg-engine/long-bow 0.2.93 → 0.2.95
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 +8 -7
- 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 +8 -7
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +8 -12
- package/src/components/NPCDialog/.DS_Store +0 -0
- package/src/components/NPCDialog/img/.DS_Store +0 -0
- package/src/hooks/useOutsideAlerter.ts +2 -2
- package/src/mocks/.DS_Store +0 -0
- package/src/mocks/atlas/.DS_Store +0 -0
- package/src/mocks/itemContainer.mocks.ts +37 -3
package/dist/long-bow.esm.js
CHANGED
|
@@ -32941,10 +32941,10 @@ function useOutsideClick(ref, id) {
|
|
|
32941
32941
|
}
|
|
32942
32942
|
}
|
|
32943
32943
|
// Bind the event listener
|
|
32944
|
-
document.addEventListener('
|
|
32944
|
+
document.addEventListener('pointerdown', handleClickOutside);
|
|
32945
32945
|
return function () {
|
|
32946
32946
|
// Unbind the event listener on clean up
|
|
32947
|
-
document.removeEventListener('
|
|
32947
|
+
document.removeEventListener('pointerdown', handleClickOutside);
|
|
32948
32948
|
};
|
|
32949
32949
|
}, [ref]);
|
|
32950
32950
|
}
|
|
@@ -33520,9 +33520,11 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33520
33520
|
}
|
|
33521
33521
|
}, [dropPosition]);
|
|
33522
33522
|
var getStackInfo = function getStackInfo(itemId, stackQty) {
|
|
33523
|
-
// if (itemToRender?.isStackable && itemToRender?.stackQty) {
|
|
33524
33523
|
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
33525
33524
|
var isLargerThan999 = stackQty > 999;
|
|
33525
|
+
var qtyClassName = 'regular';
|
|
33526
|
+
if (isLargerThan999) qtyClassName = 'small';
|
|
33527
|
+
if (isFractionalStackQty) qtyClassName = 'xsmall';
|
|
33526
33528
|
if (stackQty > 1) {
|
|
33527
33529
|
return React.createElement(ItemQtyContainer, {
|
|
33528
33530
|
key: "qty-" + itemId
|
|
@@ -33530,8 +33532,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33530
33532
|
maxLines: 1,
|
|
33531
33533
|
maxWidth: "48px"
|
|
33532
33534
|
}, React.createElement(ItemQty, {
|
|
33533
|
-
className:
|
|
33534
|
-
},
|
|
33535
|
+
className: qtyClassName
|
|
33536
|
+
}, " ", stackQty, " ")));
|
|
33535
33537
|
}
|
|
33536
33538
|
return undefined;
|
|
33537
33539
|
};
|
|
@@ -33647,7 +33649,6 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
33647
33649
|
//@ts-ignore
|
|
33648
33650
|
var classes = Array.from((_e$target = e.target) == null ? void 0 : _e$target.classList);
|
|
33649
33651
|
var isOutsideDrop = classes.some(function (elm) {
|
|
33650
|
-
//elm matches ItemContainer string
|
|
33651
33652
|
return elm.includes('rpgui-content');
|
|
33652
33653
|
}) || classes.length === 0;
|
|
33653
33654
|
if (isOutsideDrop) {
|
|
@@ -33744,7 +33745,7 @@ var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
33744
33745
|
var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
33745
33746
|
displayName: "ItemSlot__ItemQty",
|
|
33746
33747
|
componentId: "sc-l2j5ef-3"
|
|
33747
|
-
})(["&.regular{font-size:", ";}&.small{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall);
|
|
33748
|
+
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
33748
33749
|
|
|
33749
33750
|
var EquipmentSet = function EquipmentSet(_ref) {
|
|
33750
33751
|
var equipmentSet = _ref.equipmentSet,
|