@rpg-engine/long-bow 0.1.68 → 0.1.71

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 (47) hide show
  1. package/dist/components/Abstractions/SlotsContainer.d.ts +11 -0
  2. package/dist/components/DraggableContainer.d.ts +3 -2
  3. package/dist/components/Equipment/EquipmentSet.d.ts +13 -0
  4. package/dist/components/Item/Inventory/ItemSlot.d.ts +10 -2
  5. package/dist/components/Item/Inventory/itemContainerHelper.d.ts +6 -2
  6. package/dist/components/Item/SpriteFromAtlas.d.ts +2 -0
  7. package/dist/components/Multitab/Tab.d.ts +9 -0
  8. package/dist/components/Multitab/TabBody.d.ts +7 -0
  9. package/dist/components/Multitab/TabsContainer.d.ts +17 -0
  10. package/dist/components/SimpleProgressBar.d.ts +3 -4
  11. package/dist/components/SkillProgressBar.d.ts +6 -4
  12. package/dist/components/SkillsContainer.d.ts +7 -0
  13. package/dist/components/store/UI.store.d.ts +34 -0
  14. package/dist/constants/uiColors.d.ts +7 -0
  15. package/dist/index.d.ts +1 -0
  16. package/dist/long-bow.cjs.development.js +5258 -419
  17. package/dist/long-bow.cjs.development.js.map +1 -1
  18. package/dist/long-bow.cjs.production.min.js +1 -1
  19. package/dist/long-bow.cjs.production.min.js.map +1 -1
  20. package/dist/long-bow.esm.js +5260 -420
  21. package/dist/long-bow.esm.js.map +1 -1
  22. package/dist/mocks/equipmentSet.mocks.d.ts +3 -0
  23. package/dist/mocks/skills.mocks.d.ts +115 -0
  24. package/package.json +5 -3
  25. package/src/components/Abstractions/SlotsContainer.tsx +42 -0
  26. package/src/components/DraggableContainer.tsx +65 -38
  27. package/src/components/Equipment/EquipmentSet.tsx +179 -0
  28. package/src/components/I_Book.png +0 -0
  29. package/src/components/Item/Inventory/ItemContainer.tsx +70 -178
  30. package/src/components/Item/Inventory/ItemSlot.tsx +92 -24
  31. package/src/components/Item/Inventory/itemContainerHelper.ts +48 -11
  32. package/src/components/Item/SpriteFromAtlas.tsx +18 -1
  33. package/src/components/ListMenu.tsx +3 -3
  34. package/src/components/Multitab/Tab.tsx +57 -0
  35. package/src/components/Multitab/TabBody.tsx +13 -0
  36. package/src/components/Multitab/TabsContainer.tsx +97 -0
  37. package/src/components/SimpleProgressBar.tsx +14 -10
  38. package/src/components/SkillProgressBar.tsx +74 -20
  39. package/src/components/SkillsContainer.tsx +235 -0
  40. package/src/components/store/UI.store.ts +192 -0
  41. package/src/constants/uiColors.ts +7 -0
  42. package/src/index.tsx +1 -0
  43. package/src/mocks/atlas/items/items.json +4677 -189
  44. package/src/mocks/atlas/items/items.png +0 -0
  45. package/src/mocks/equipmentSet.mocks.ts +347 -0
  46. package/src/mocks/itemContainer.mocks.ts +33 -33
  47. package/src/mocks/skills.mocks.ts +116 -0
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IPosition } from '../../types/eventTypes';
3
+ interface IProps {
4
+ children: React.ReactNode;
5
+ title: string;
6
+ onClose?: () => void;
7
+ onPositionChange?: (position: IPosition) => void;
8
+ onOutsideClick?: () => void;
9
+ }
10
+ export declare const SlotsContainer: React.FC<IProps>;
11
+ export {};
@@ -7,11 +7,12 @@ export interface IDraggableContainerProps {
7
7
  height?: string;
8
8
  className?: string;
9
9
  type?: RPGUIContainerTypes;
10
- title: string;
10
+ title?: string;
11
11
  imgSrc?: string;
12
12
  imgWidth?: string;
13
- onCloseButton: () => void;
13
+ onCloseButton?: () => void;
14
14
  cancelDrag?: string;
15
15
  onPositionChange?: (position: IPosition) => void;
16
+ onOutsideClick?: () => void;
16
17
  }
17
18
  export declare const DraggableContainer: React.FC<IDraggableContainerProps>;
@@ -0,0 +1,13 @@
1
+ import { IEquipementSet, IItem } from '@rpg-engine/shared';
2
+ import React from 'react';
3
+ export interface IEquipmentSetProps {
4
+ equipmentSet: IEquipementSet;
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
+ };
12
+ }
13
+ export declare const EquipmentSet: React.FC<IEquipmentSetProps>;
@@ -1,10 +1,18 @@
1
- import { IItem } from '@rpg-engine/shared';
1
+ import { IItem, IItemContainer, ItemSlotType } from '@rpg-engine/shared';
2
2
  import React from 'react';
3
+ export declare enum SlotContainerType {
4
+ INVENTORY = "Inventory",
5
+ EQUIPMENT_SET = "EquipmentSet"
6
+ }
3
7
  interface IProps {
4
8
  slotIndex: number;
5
9
  item: IItem | null;
10
+ itemContainer?: IItemContainer | null;
11
+ slotContainerType: SlotContainerType | null;
12
+ slotSpriteMask?: ItemSlotType | null;
6
13
  onMouseOver: (event: any, slotIndex: number, item: IItem | null, x: number, y: number) => void;
7
- onClick: (item: IItem, posX: number, posY: number) => void;
14
+ onMouseOut: () => void;
15
+ onClick: (item: IItem, posX: number, posY: number, slotContainerType: SlotContainerType | null) => void;
8
16
  onCancelContextMenu: () => void;
9
17
  }
10
18
  export declare const ItemSlot: React.FC<IProps>;
@@ -1,7 +1,11 @@
1
1
  import { ItemType } from '@rpg-engine/shared';
2
- interface IContextMenuItem {
2
+ export interface IContextMenuItem {
3
3
  id: string;
4
4
  text: string;
5
5
  }
6
+ export declare enum ContainerType {
7
+ INVENTORY = "Inventory",
8
+ EQUIPMENT_SET = "EquipmentSet"
9
+ }
6
10
  export declare const handleContextMenuList: (itemType: ItemType) => IContextMenuItem[];
7
- export {};
11
+ export declare const handleEquipmentContextMenuList: (itemType: ItemType) => IContextMenuItem[];
@@ -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 {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { MultitabType } from './TabsContainer';
3
+ export interface ISingleTab {
4
+ active: boolean;
5
+ label: string;
6
+ onClick: () => void;
7
+ type: MultitabType;
8
+ }
9
+ export declare const Tab: React.FC<ISingleTab>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ id: string;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const TabBody: React.FC<IProps>;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ interface ITab {
3
+ label: string;
4
+ id: string;
5
+ }
6
+ export declare enum MultitabType {
7
+ Brown = "brown",
8
+ Gray = "gray"
9
+ }
10
+ export interface ITabsContainer {
11
+ children: React.ReactNode;
12
+ onCloseButton?: () => void;
13
+ tabs: ITab[];
14
+ type: MultitabType;
15
+ }
16
+ export declare const TabsContainer: React.FC<ITabsContainer>;
17
+ 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>;
@@ -0,0 +1,34 @@
1
+ import { IItem, ItemSocketEvents, ItemType } from '@rpg-engine/shared';
2
+ import { IContextMenuItem } from '../Item/Inventory/itemContainerHelper';
3
+ import { SlotContainerType } from '../Item/Inventory/ItemSlot';
4
+ interface IContextMenu {
5
+ visible: boolean;
6
+ posX: number;
7
+ posY: number;
8
+ slotItem: IItem | null;
9
+ slotIndex?: number | null;
10
+ contextActions: IContextMenuItem[];
11
+ }
12
+ interface IHoverDetail {
13
+ visible: boolean;
14
+ posX: number;
15
+ posY: number;
16
+ item: IItem | null;
17
+ }
18
+ interface ISetContextMenu extends Omit<IContextMenu, 'contextActions'> {
19
+ }
20
+ declare class UIStore {
21
+ contextMenu: IContextMenu | null;
22
+ onHoverDetail: IHoverDetail | null;
23
+ constructor();
24
+ setContextMenu(contextMenu: ISetContextMenu, itemType: ItemType): void;
25
+ setEquipContextMenu(contextMenu: ISetContextMenu, itemType: ItemType, isItemContainer: boolean | undefined): void;
26
+ clearContextMenu(): void;
27
+ setItemHoverDetail(hoverDetail: IHoverDetail): void;
28
+ clearItemHoverDetail(): void;
29
+ handleOnItemClick: (item: IItem, posX: number, posY: number, slotContainerType: SlotContainerType | null) => void;
30
+ handleOnMouseHover: (event: any, slotIndex: number, item: IItem | null, posX: number, posY: number, onMouseOver: any) => void;
31
+ onSelected(selectedActionId: ItemSocketEvents | string, onActionSelected: any): void;
32
+ }
33
+ export declare const uiStore: UIStore;
34
+ export {};
@@ -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
  };
package/dist/index.d.ts CHANGED
@@ -19,4 +19,5 @@ export * from './components/SkillProgressBar';
19
19
  export * from './components/TextArea';
20
20
  export * from './components/Truncate';
21
21
  export * from './components/typography/DynamicText';
22
+ export * from './components/Equipment/EquipmentSet';
22
23
  export { useEventListener } from './hooks/useEventListener';