@rpg-engine/long-bow 0.5.30 → 0.5.31

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.
@@ -13866,6 +13866,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13866
13866
  setDropPosition = _useState8[1];
13867
13867
  var dragContainer = React.useRef(null);
13868
13868
  var _useDragging = useDragging(),
13869
+ draggingItem = _useDragging.item,
13869
13870
  setDraggingItem = _useDragging.setDraggingItem;
13870
13871
  var _useState9 = React.useState([]),
13871
13872
  contextActions = _useState9[0],
@@ -13971,7 +13972,6 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13971
13972
  return;
13972
13973
  }
13973
13974
  if (onDragStart && containerType) {
13974
- setDraggingItem(item);
13975
13975
  onDragStart(item, slotIndex, containerType);
13976
13976
  }
13977
13977
  };
@@ -13980,8 +13980,12 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
13980
13980
  setWasDragged(true);
13981
13981
  setIsFocused(true);
13982
13982
  }
13983
+ if (!draggingItem) {
13984
+ setDraggingItem(item);
13985
+ }
13983
13986
  };
13984
13987
  return React__default.createElement(Container$a, {
13988
+ isDraggingItem: !!draggingItem,
13985
13989
  item: item,
13986
13990
  className: "rpgui-icon empty-slot",
13987
13991
  onMouseUp: function onMouseUp() {
@@ -14060,17 +14064,20 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
14060
14064
  var Container$a = /*#__PURE__*/styled.div.withConfig({
14061
14065
  displayName: "ItemSlot__Container",
14062
14066
  componentId: "sc-l2j5ef-0"
14063
- })(["margin:0.1rem;.react-draggable-dragging{opacity:0;}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
14064
- var item = _ref2.item;
14065
- return rarityColor(item);
14067
+ })(["margin:0.1rem;.react-draggable-dragging{opacity:", ";}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
14068
+ var isDraggingItem = _ref2.isDraggingItem;
14069
+ return isDraggingItem ? 0 : 1;
14066
14070
  }, function (_ref3) {
14067
14071
  var item = _ref3.item;
14068
- return "0 0 5px 2px " + rarityColor(item);
14072
+ return rarityColor(item);
14069
14073
  }, function (_ref4) {
14070
14074
  var item = _ref4.item;
14071
- return "0 0 4px 3px " + rarityColor(item);
14075
+ return "0 0 5px 2px " + rarityColor(item);
14072
14076
  }, function (_ref5) {
14073
- var isSelectingShortcut = _ref5.isSelectingShortcut;
14077
+ var item = _ref5.item;
14078
+ return "0 0 4px 3px " + rarityColor(item);
14079
+ }, function (_ref6) {
14080
+ var isSelectingShortcut = _ref6.isSelectingShortcut;
14074
14081
  return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
14075
14082
  });
14076
14083
  var ItemContainer = /*#__PURE__*/styled.div.withConfig({