@rpg-engine/long-bow 0.5.21 → 0.5.23

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.
Files changed (26) hide show
  1. package/dist/components/Abstractions/SlotsContainer.d.ts +1 -0
  2. package/dist/components/Item/Inventory/DraggedItem.d.ts +7 -0
  3. package/dist/components/Item/Inventory/ItemQuantitySelectorModal.d.ts +12 -0
  4. package/dist/components/Item/Inventory/ItemSlotQty/ItemSlotQty.d.ts +9 -0
  5. package/dist/components/Item/Inventory/ItemSlotRenderer.d.ts +11 -0
  6. package/dist/components/Item/Inventory/ItemSlotTooltips.d.ts +24 -0
  7. package/dist/components/Item/Inventory/context/DraggingContext.d.ts +11 -0
  8. package/dist/hooks/useMousePosition.d.ts +6 -0
  9. package/dist/long-bow.cjs.development.js +449 -275
  10. package/dist/long-bow.cjs.development.js.map +1 -1
  11. package/dist/long-bow.cjs.production.min.js +1 -1
  12. package/dist/long-bow.cjs.production.min.js.map +1 -1
  13. package/dist/long-bow.esm.js +450 -276
  14. package/dist/long-bow.esm.js.map +1 -1
  15. package/package.json +1 -1
  16. package/src/components/Abstractions/SlotsContainer.tsx +3 -1
  17. package/src/components/Equipment/EquipmentSet.tsx +24 -19
  18. package/src/components/Item/Inventory/DraggedItem.tsx +107 -0
  19. package/src/components/Item/Inventory/ItemContainer.tsx +11 -41
  20. package/src/components/Item/Inventory/ItemQuantitySelectorModal.tsx +59 -0
  21. package/src/components/Item/Inventory/ItemSlot.tsx +50 -211
  22. package/src/components/Item/Inventory/ItemSlotQty/ItemSlotQty.tsx +70 -0
  23. package/src/components/Item/Inventory/ItemSlotRenderer.tsx +92 -0
  24. package/src/components/Item/Inventory/ItemSlotTooltips.tsx +93 -0
  25. package/src/components/Item/Inventory/context/DraggingContext.tsx +26 -0
  26. package/src/hooks/useMousePosition.ts +49 -0
@@ -10,6 +10,7 @@ interface IProps {
10
10
  onOutsideClick?: () => void;
11
11
  initialPosition?: IPosition;
12
12
  scale?: number;
13
+ width?: string;
13
14
  }
14
15
  export declare const SlotsContainer: React.FC<IProps>;
15
16
  export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ interface IProps {
3
+ atlasJSON: any;
4
+ atlasIMG: any;
5
+ }
6
+ export declare const DraggedItem: ({ atlasJSON, atlasIMG, }: IProps) => JSX.Element | null;
7
+ export default DraggedItem;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface IQuantitySelect {
3
+ isOpen: boolean;
4
+ maxQuantity: number;
5
+ callback: (_quantity: number) => void;
6
+ }
7
+ interface IProps {
8
+ quantitySelect: IQuantitySelect;
9
+ setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;
10
+ }
11
+ export declare const ItemQuantitySelectorModal: ({ quantitySelect, setQuantitySelect, }: IProps) => JSX.Element;
12
+ export {};
@@ -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 {};
@@ -0,0 +1,6 @@
1
+ interface ICursorPosition {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ export declare const useCursorPosition: () => ICursorPosition;
6
+ export {};