@rpg-engine/long-bow 0.5.21 → 0.5.22
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/components/Abstractions/SlotsContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/DraggedItem.d.ts +7 -0
- package/dist/components/Item/Inventory/ItemSlotQty/ItemSlotQty.d.ts +9 -0
- package/dist/components/Item/Inventory/ItemSlotRenderer.d.ts +11 -0
- package/dist/components/Item/Inventory/ItemSlotTooltips.d.ts +24 -0
- package/dist/components/Item/Inventory/context/DraggingContext.d.ts +11 -0
- package/dist/hooks/useMousePosition.d.ts +6 -0
- package/dist/long-bow.cjs.development.js +342 -177
- 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 +343 -178
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Abstractions/SlotsContainer.tsx +3 -1
- package/src/components/Equipment/EquipmentSet.tsx +24 -19
- package/src/components/Item/Inventory/DraggedItem.tsx +107 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +6 -3
- package/src/components/Item/Inventory/ItemQuantitySelectorModal.tsx +0 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +50 -211
- package/src/components/Item/Inventory/ItemSlotQty/ItemSlotQty.tsx +70 -0
- package/src/components/Item/Inventory/ItemSlotRenderer.tsx +92 -0
- package/src/components/Item/Inventory/ItemSlotTooltips.tsx +93 -0
- package/src/components/Item/Inventory/context/DraggingContext.tsx +26 -0
- package/src/hooks/useMousePosition.ts +49 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IProps {
|
|
3
|
+
itemId: string;
|
|
4
|
+
stackQty: number;
|
|
5
|
+
qtyClassName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const onRenderStackInfo: (itemId: string, stackQty: number) => JSX.Element | undefined;
|
|
8
|
+
export declare const ItemSlotQty: ({ itemId, stackQty, qtyClassName, }: IProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IItem, ItemContainerType, ItemSlotType } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IProps {
|
|
4
|
+
containerType: ItemContainerType | null | undefined;
|
|
5
|
+
atlasJSON: any;
|
|
6
|
+
atlasIMG: any;
|
|
7
|
+
slotSpriteMask: ItemSlotType | null | undefined;
|
|
8
|
+
item: IItem | null;
|
|
9
|
+
}
|
|
10
|
+
export declare const ItemSlotRenderer: React.FC<IProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IEquipmentSet, IItem } from '@rpg-engine/shared';
|
|
3
|
+
import { IPosition } from '../../../types/eventTypes';
|
|
4
|
+
import { IContextMenuItem } from './itemContainerHelper';
|
|
5
|
+
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
|
+
dragScale: number | undefined;
|
|
15
|
+
setIsContextMenuVisible: (visible: boolean) => void;
|
|
16
|
+
setIsTooltipMobileVisible: (visible: boolean) => void;
|
|
17
|
+
setIsTooltipVisible: (visible: boolean) => void;
|
|
18
|
+
onSelected?: (optionId: string, item: IItem) => void;
|
|
19
|
+
atlasIMG: any;
|
|
20
|
+
atlasJSON: any;
|
|
21
|
+
equipmentSet?: IEquipmentSet | null;
|
|
22
|
+
}
|
|
23
|
+
export declare const ItemSlotToolTips: ({ isTooltipVisible, isFocused, isContextMenuVisible, isContextMenuDisabled, item, contextActions, contextMenuPosition, dragScale, setIsContextMenuVisible, setIsTooltipMobileVisible, isTooltipMobileVisible, onSelected, atlasIMG, atlasJSON, equipmentSet, }: IProps) => JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IItem } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const useDragging: () => {
|
|
4
|
+
item: IItem | null;
|
|
5
|
+
setDraggingItem: React.Dispatch<React.SetStateAction<IItem | null>>;
|
|
6
|
+
};
|
|
7
|
+
interface IProps {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const DraggingProvider: ({ children }: IProps) => JSX.Element;
|
|
11
|
+
export {};
|