@rpg-engine/long-bow 0.1.66 → 0.1.69

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 (35) hide show
  1. package/dist/components/DraggableContainer.d.ts +4 -1
  2. package/dist/components/Item/Inventory/ItemContainer.d.ts +7 -3
  3. package/dist/components/Item/Inventory/ItemSlot.d.ts +3 -2
  4. package/dist/components/Item/Inventory/itemContainerHelper.d.ts +7 -0
  5. package/dist/components/Item/SpriteFromAtlas.d.ts +2 -0
  6. package/dist/components/SimpleProgressBar.d.ts +3 -4
  7. package/dist/components/SkillProgressBar.d.ts +6 -4
  8. package/dist/components/SkillsContainer.d.ts +7 -0
  9. package/dist/constants/uiColors.d.ts +7 -0
  10. package/dist/hooks/useOutsideAlerter.d.ts +1 -0
  11. package/dist/long-bow.cjs.development.js +4221 -644
  12. package/dist/long-bow.cjs.development.js.map +1 -1
  13. package/dist/long-bow.cjs.production.min.js +1 -1
  14. package/dist/long-bow.cjs.production.min.js.map +1 -1
  15. package/dist/long-bow.esm.js +4223 -646
  16. package/dist/long-bow.esm.js.map +1 -1
  17. package/dist/mocks/skills.mocks.d.ts +115 -0
  18. package/dist/types/eventTypes.d.ts +4 -0
  19. package/package.json +7 -7
  20. package/src/components/DraggableContainer.tsx +20 -5
  21. package/src/components/I_Book.png +0 -0
  22. package/src/components/Item/Cards/ItemCard.tsx +7 -1
  23. package/src/components/Item/Inventory/ItemContainer.tsx +141 -136
  24. package/src/components/Item/Inventory/ItemSlot.tsx +24 -9
  25. package/src/components/Item/Inventory/itemContainerHelper.ts +44 -0
  26. package/src/components/Item/SpriteFromAtlas.tsx +10 -0
  27. package/src/components/SimpleProgressBar.tsx +14 -10
  28. package/src/components/SkillProgressBar.tsx +74 -20
  29. package/src/components/SkillsContainer.tsx +235 -0
  30. package/src/constants/uiColors.ts +7 -0
  31. package/src/hooks/useOutsideAlerter.ts +25 -0
  32. package/src/mocks/atlas/items/items.json +3920 -460
  33. package/src/mocks/atlas/items/items.png +0 -0
  34. package/src/mocks/skills.mocks.ts +116 -0
  35. package/src/types/eventTypes.ts +4 -0
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { IPosition } from '../types/eventTypes';
2
3
  import { RPGUIContainerTypes } from './RPGUIContainer';
3
4
  export interface IDraggableContainerProps {
4
5
  children: React.ReactNode;
@@ -9,6 +10,8 @@ export interface IDraggableContainerProps {
9
10
  title: string;
10
11
  imgSrc?: string;
11
12
  imgWidth?: string;
12
- onCloseButton: () => void;
13
+ onCloseButton?: () => void;
14
+ cancelDrag?: string;
15
+ onPositionChange?: (position: IPosition) => void;
13
16
  }
14
17
  export declare const DraggableContainer: React.FC<IDraggableContainerProps>;
@@ -2,8 +2,12 @@ import { IItem, IItemContainer } from '@rpg-engine/shared';
2
2
  import React from 'react';
3
3
  export interface IItemContainerProps {
4
4
  itemContainer: IItemContainer;
5
- onClose: () => void;
6
- onMouseOver: (e: any, slotIndex: number, item: IItem | null) => void;
7
- onActionSelected: (payload: any) => void;
5
+ onClose?: () => void;
6
+ onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
7
+ onActionSelected?: (payload: any) => void;
8
+ initialPosition?: {
9
+ x: number;
10
+ y: number;
11
+ };
8
12
  }
9
13
  export declare const ItemContainer: React.FC<IItemContainerProps>;
@@ -3,8 +3,9 @@ import React from 'react';
3
3
  interface IProps {
4
4
  slotIndex: number;
5
5
  item: IItem | null;
6
- onMouseOver: (event: any, slotIndex: number, item: IItem | null) => void;
7
- onActionContextMenu: (event: any, slotIndex: number) => void;
6
+ onMouseOver: (event: any, slotIndex: number, item: IItem | null, x: number, y: number) => void;
7
+ onClick: (item: IItem, posX: number, posY: number) => void;
8
+ onCancelContextMenu: () => void;
8
9
  }
9
10
  export declare const ItemSlot: React.FC<IProps>;
10
11
  export {};
@@ -0,0 +1,7 @@
1
+ import { ItemType } from '@rpg-engine/shared';
2
+ interface IContextMenuItem {
3
+ id: string;
4
+ text: string;
5
+ }
6
+ export declare const handleContextMenuList: (itemType: ItemType) => IContextMenuItem[];
7
+ export {};
@@ -6,6 +6,8 @@ interface IProps {
6
6
  width?: number;
7
7
  height?: number;
8
8
  scale?: number;
9
+ grayScale?: boolean;
10
+ opacity?: number;
9
11
  }
10
12
  export declare const SpriteFromAtlas: React.FC<IProps>;
11
13
  export {};
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- interface IProps {
2
+ export interface ISimpleProgressBarProps {
3
3
  value: number;
4
- height?: string;
5
4
  bgColor?: string;
5
+ margin?: number;
6
6
  }
7
- export declare const SimpleProgressBar: React.FC<IProps>;
8
- export {};
7
+ export declare const SimpleProgressBar: React.FC<ISimpleProgressBarProps>;
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  export interface ISkillProgressBarProps {
3
- value: number;
4
- height: string;
3
+ skillName: string;
5
4
  bgColor: string;
6
- titleName: string;
7
- logoSrc?: string;
5
+ level: number;
6
+ skillPoints: number;
7
+ skillPointsToNextLevel?: number;
8
+ texturePath: string;
9
+ showSkillPoints?: boolean;
8
10
  }
9
11
  export declare const SkillProgressBar: React.FC<ISkillProgressBarProps>;
@@ -0,0 +1,7 @@
1
+ import { ISkill } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ export interface ISkillContainerProps {
4
+ skill: ISkill;
5
+ onCloseButton: () => void;
6
+ }
7
+ export declare const SkillsContainer: React.FC<ISkillContainerProps>;
@@ -1,3 +1,10 @@
1
1
  export declare const colors: {
2
2
  darkGrey: string;
3
+ darkYellow: string;
4
+ orange: string;
5
+ cardinal: string;
6
+ raisinBlack: string;
7
+ navyBlue: string;
8
+ purple: string;
9
+ blue: string;
3
10
  };
@@ -0,0 +1 @@
1
+ export declare function useOutsideClick(ref: any, id: string): void;