@rpg-engine/long-bow 0.7.74 → 0.7.76

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.
@@ -27700,9 +27700,11 @@ var ItemSlotDetailsProvider = function ItemSlotDetailsProvider(_ref) {
27700
27700
  var clearDetailsState = useCallback(function () {
27701
27701
  setDetailsState(initialDetailsState);
27702
27702
  }, [setDetailsState]);
27703
- var setContextActions = useCallback(function (item, containerType, isDepotSystem) {
27704
- if (item && containerType) {
27703
+ var setContextActions = useCallback(function (item, containerType, isDepotSystem, isContextMenuDisabled) {
27704
+ console.log('ITEM SLOT: Set context actions for', item == null ? void 0 : item.key);
27705
+ if (item && containerType && !isContextMenuDisabled) {
27705
27706
  var newContextActions = generateContextMenu(item, containerType, isDepotSystem);
27707
+ console.log('ITEM SLOT: New context actions:', newContextActions);
27706
27708
  updateDetailsState({
27707
27709
  contextActions: newContextActions
27708
27710
  });
@@ -27834,19 +27836,13 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
27834
27836
  },
27835
27837
  isFocused: false
27836
27838
  });
27837
- // Update context actions when item or depot system changes
27838
- if (item && containerType && !isContextMenuDisabled) {
27839
- setContextActions(item, containerType, isDepotSystem != null ? isDepotSystem : false);
27840
- } else {
27841
- clearContextActions();
27842
- }
27843
- }, [item, containerType, isDepotSystem, setContextActions, clearContextActions]);
27839
+ }, [containerType, isDepotSystem, setContextActions, clearContextActions, isContextMenuDisabled]);
27844
27840
  useEffect(function () {
27845
27841
  // Handle outside drop
27846
27842
  if (onDrop && item && dropPosition) {
27847
27843
  onDrop(item, dropPosition);
27848
27844
  }
27849
- }, [dropPosition]);
27845
+ }, [dropPosition, onDrop, item]);
27850
27846
  var resetItem = function resetItem() {
27851
27847
  clearDraggingState();
27852
27848
  updateDetailsState({
@@ -27868,6 +27864,9 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
27868
27864
  onDragEnd == null ? void 0 : onDragEnd(quantity);
27869
27865
  }
27870
27866
  };
27867
+ var refreshContextActions = function refreshContextActions() {
27868
+ setContextActions(item, containerType, isDepotSystem != null ? isDepotSystem : false, isContextMenuDisabled);
27869
+ };
27871
27870
  var onDraggableStop = function onDraggableStop(e, data) {
27872
27871
  requestAnimationFrame(function () {
27873
27872
  updateDraggingState({
@@ -28007,6 +28006,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
28007
28006
  if (!item || isSelectingShortcut) {
28008
28007
  return;
28009
28008
  }
28009
+ refreshContextActions();
28010
28010
  if (onDragStart && containerType) {
28011
28011
  onDragStart(item, slotIndex, containerType);
28012
28012
  }
@@ -28095,7 +28095,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
28095
28095
  var Container$9 = /*#__PURE__*/styled.div.withConfig({
28096
28096
  displayName: "ItemSlot__Container",
28097
28097
  componentId: "sc-l2j5ef-0"
28098
- })(["margin:0.1rem;*{border:1px solid yellow;}.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) {
28098
+ })(["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) {
28099
28099
  var isDraggingItem = _ref2.isDraggingItem;
28100
28100
  return isDraggingItem ? 0 : 1;
28101
28101
  }, function (_ref3) {