@rpg-engine/long-bow 0.7.72 → 0.7.74

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.
@@ -8,7 +8,6 @@ interface IProps {
8
8
  itemContainer?: IItemContainer | null;
9
9
  itemContainerType?: ItemContainerType | null;
10
10
  slotSpriteMask?: ItemSlotType | null;
11
- onSelected?: (selectedOption: string, item: IItem) => void;
12
11
  onMouseOver?: (event: any, slotIndex: number, item: IItem | null, x: number, y: number) => void;
13
12
  onMouseOut?: () => void;
14
13
  onPointerDown: (ItemType: ItemType, itemContainerType: ItemContainerType | null, item: IItem) => void;
@@ -1,24 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { IEquipmentSet, IItem } from '@rpg-engine/shared';
3
- import { IPosition } from '../../../types/eventTypes';
4
- import { IContextMenuItem } from './itemContainerHelper';
5
3
  interface IProps {
6
- isTooltipVisible: boolean;
7
- isFocused: boolean;
8
- isContextMenuVisible: boolean;
9
- isContextMenuDisabled: boolean;
10
- item: IItem | null;
11
- isTooltipMobileVisible: boolean;
12
- contextActions: IContextMenuItem[];
13
- contextMenuPosition: IPosition;
14
4
  dragScale: number | undefined;
15
- setIsContextMenuVisible: (visible: boolean) => void;
16
- setIsTooltipMobileVisible: (visible: boolean) => void;
17
- setIsTooltipVisible: (visible: boolean) => void;
18
5
  onSelected?: (optionId: string, item: IItem) => void;
19
6
  atlasIMG: any;
20
7
  atlasJSON: any;
21
8
  equipmentSet?: IEquipmentSet | null;
9
+ isContextMenuDisabled?: boolean;
22
10
  }
23
- export declare const ItemSlotToolTips: ({ isTooltipVisible, isFocused, isContextMenuVisible, isContextMenuDisabled, item, contextActions, contextMenuPosition, dragScale, setIsContextMenuVisible, setIsTooltipMobileVisible, isTooltipMobileVisible, onSelected, atlasIMG, atlasJSON, equipmentSet, }: IProps) => JSX.Element;
11
+ export declare const ItemSlotToolTips: ({ dragScale, onSelected, atlasIMG, atlasJSON, equipmentSet, isContextMenuDisabled, }: IProps) => JSX.Element;
24
12
  export {};
@@ -0,0 +1,30 @@
1
+ import { IItem } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ import { IContextMenuItem } from '../itemContainerHelper';
4
+ interface IPosition {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ interface IItemSlotDetailsState {
9
+ item: IItem | null;
10
+ isTooltipVisible: boolean;
11
+ isTooltipMobileVisible: boolean;
12
+ isContextMenuVisible: boolean;
13
+ contextMenuPosition: IPosition;
14
+ contextActions: IContextMenuItem[];
15
+ clearContextActions: () => void;
16
+ clearDetailsState: () => void;
17
+ }
18
+ interface IItemSlotDetailsContext {
19
+ detailsState: IItemSlotDetailsState;
20
+ updateDetailsState: (newState: Partial<IItemSlotDetailsState>) => void;
21
+ clearDetailsState: () => void;
22
+ setContextActions: (item: IItem | null, containerType: string | null, isDepotSystem: boolean) => void;
23
+ clearContextActions: () => void;
24
+ }
25
+ export declare const useItemSlotDetails: () => IItemSlotDetailsContext;
26
+ interface IProps {
27
+ children: React.ReactNode;
28
+ }
29
+ export declare const ItemSlotDetailsProvider: React.FC<IProps>;
30
+ export {};
@@ -0,0 +1,22 @@
1
+ import { IItem } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ import { IPosition } from '../../../../types/eventTypes';
4
+ interface IDraggingState {
5
+ item: IItem | null;
6
+ isDragging: boolean;
7
+ position: IPosition;
8
+ dropPosition: IPosition | null;
9
+ isFocused: boolean;
10
+ draggingDistance: number;
11
+ }
12
+ interface IDraggingContext {
13
+ draggingState: IDraggingState;
14
+ updateDraggingState: (newState: Partial<IDraggingState>) => void;
15
+ clearDraggingState: () => void;
16
+ }
17
+ export declare const useItemSlotDragging: () => IDraggingContext;
18
+ interface IProps {
19
+ children: React.ReactNode;
20
+ }
21
+ export declare const ItemSlotDraggingProvider: React.FC<IProps>;
22
+ export {};