@rpg-engine/long-bow 0.3.51 → 0.3.52
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/CircularController/CircularController.d.ts +7 -3
- package/dist/components/Item/Inventory/ItemContainer.d.ts +4 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -0
- package/dist/components/Shortcuts/Shortcuts.d.ts +21 -0
- package/dist/components/Shortcuts/ShortcutsSetter.d.ts +12 -0
- package/dist/components/Shortcuts/SingleShortcut.d.ts +1 -0
- package/dist/components/Spellbook/Spellbook.d.ts +5 -2
- package/dist/components/Spellbook/constants.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +271 -120
- 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 +273 -120
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/{QuickSpells.stories.d.ts → Shortcuts.stories.d.ts} +2 -2
- package/package.json +1 -1
- package/src/components/Abstractions/SlotsContainer.tsx +2 -2
- package/src/components/CircularController/CircularController.tsx +118 -36
- package/src/components/Item/Inventory/ItemContainer.tsx +39 -4
- package/src/components/Item/Inventory/ItemSlot.tsx +38 -3
- package/src/components/Shortcuts/Shortcuts.tsx +138 -0
- package/src/components/Shortcuts/ShortcutsSetter.tsx +127 -0
- package/src/components/Shortcuts/SingleShortcut.ts +61 -0
- package/src/components/Spellbook/Spellbook.tsx +15 -8
- package/src/components/Spellbook/constants.ts +5 -9
- package/src/components/TradingMenu/TradingMenu.tsx +2 -2
- package/src/components/TradingMenu/items.mock.ts +59 -0
- package/src/index.tsx +1 -1
- package/src/mocks/itemContainer.mocks.ts +22 -20
- package/src/stories/CircullarController.stories.tsx +9 -5
- package/src/stories/ItemContainer.stories.tsx +70 -1
- package/src/stories/Shortcuts.stories.tsx +39 -0
- package/src/stories/Spellbook.stories.tsx +35 -38
- package/dist/components/Spellbook/QuickSpells.d.ts +0 -10
- package/dist/components/Spellbook/SpellbookShortcuts.d.ts +0 -10
- package/src/components/Spellbook/QuickSpells.tsx +0 -120
- package/src/components/Spellbook/SpellbookShortcuts.tsx +0 -77
- package/src/stories/QuickSpells.stories.tsx +0 -38
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IItemContainer } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { IShortcut } from '../Shortcuts/Shortcuts';
|
|
3
4
|
export declare type CircularControllerProps = {
|
|
4
5
|
onActionClick: () => void;
|
|
5
6
|
onCancelClick: () => void;
|
|
6
|
-
|
|
7
|
+
onShortcutClick: (index: number) => void;
|
|
7
8
|
mana: number;
|
|
8
|
-
|
|
9
|
+
shortcuts: IShortcut[];
|
|
10
|
+
inventory?: IItemContainer | null;
|
|
11
|
+
atlasIMG: any;
|
|
12
|
+
atlasJSON: any;
|
|
9
13
|
};
|
|
10
14
|
export declare const CircularController: React.FC<CircularControllerProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IItem, IItemContainer, ItemContainerType } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IPosition } from '../../../types/eventTypes';
|
|
4
|
+
import { IShortcut } from '../../Shortcuts/Shortcuts';
|
|
4
5
|
export interface IItemContainerProps {
|
|
5
6
|
itemContainer: IItemContainer;
|
|
6
7
|
onClose?: () => void;
|
|
@@ -22,5 +23,8 @@ export interface IItemContainerProps {
|
|
|
22
23
|
x: number;
|
|
23
24
|
y: number;
|
|
24
25
|
};
|
|
26
|
+
shortcuts?: IShortcut[];
|
|
27
|
+
setItemShortcut?: (key: string, index: number) => void;
|
|
28
|
+
removeShortcut?: (index: number) => void;
|
|
25
29
|
}
|
|
26
30
|
export declare const ItemContainer: React.FC<IItemContainerProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IItem, IItemContainer, IRawSpell } from '@rpg-engine/shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare enum ShortcutType {
|
|
4
|
+
Spell = 0,
|
|
5
|
+
Item = 1,
|
|
6
|
+
None = 2
|
|
7
|
+
}
|
|
8
|
+
export interface IShortcut {
|
|
9
|
+
type: ShortcutType;
|
|
10
|
+
payload: IRawSpell | IItem | null;
|
|
11
|
+
}
|
|
12
|
+
export declare type ShortcutsProps = {
|
|
13
|
+
shortcuts: IShortcut[];
|
|
14
|
+
onShortcutCast: (index: number) => void;
|
|
15
|
+
mana: number;
|
|
16
|
+
isBlockedCastingByKeyboard?: boolean;
|
|
17
|
+
inventory?: IItemContainer | null;
|
|
18
|
+
atlasJSON: any;
|
|
19
|
+
atlasIMG: any;
|
|
20
|
+
};
|
|
21
|
+
export declare const Shortcuts: React.FC<ShortcutsProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IShortcut } from './Shortcuts';
|
|
3
|
+
declare type ShortcutsSetterProps = {
|
|
4
|
+
setSettingShortcutIndex: (index: number) => void;
|
|
5
|
+
settingShortcutIndex: number;
|
|
6
|
+
shortcuts: IShortcut[];
|
|
7
|
+
removeShortcut: (index: number) => void;
|
|
8
|
+
atlasJSON: any;
|
|
9
|
+
atlasIMG: any;
|
|
10
|
+
};
|
|
11
|
+
export declare const ShortcutsSetter: React.FC<ShortcutsSetterProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SingleShortcut: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRawSpell } from '@rpg-engine/shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { IShortcut } from '../Shortcuts/Shortcuts';
|
|
3
4
|
export interface ISpellbookProps {
|
|
4
5
|
onClose?: () => void;
|
|
5
6
|
onInputFocus?: () => void;
|
|
@@ -9,7 +10,9 @@ export interface ISpellbookProps {
|
|
|
9
10
|
mana: number;
|
|
10
11
|
onSpellClick: (spellKey: string) => void;
|
|
11
12
|
setSpellShortcut: (key: string, index: number) => void;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
shortcuts: IShortcut[];
|
|
14
|
+
removeShortcut: (index: number) => void;
|
|
15
|
+
atlasIMG: any;
|
|
16
|
+
atlasJSON: any;
|
|
14
17
|
}
|
|
15
18
|
export declare const Spellbook: React.FC<ISpellbookProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { IShortcut } from '../Shortcuts/Shortcuts';
|
|
2
|
+
export declare const SHORTCUTS_STORAGE_KEY = "shortcuts";
|
|
3
|
+
export declare const defaultShortcut: IShortcut;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,9 +28,9 @@ export * from './components/RangeSlider';
|
|
|
28
28
|
export * from './components/RPGUIContainer';
|
|
29
29
|
export * from './components/RPGUIRoot';
|
|
30
30
|
export * from './components/shared/SpriteFromAtlas';
|
|
31
|
+
export * from './components/Shortcuts/Shortcuts';
|
|
31
32
|
export * from './components/SkillProgressBar';
|
|
32
33
|
export * from './components/SkillsContainer';
|
|
33
|
-
export * from './components/Spellbook/QuickSpells';
|
|
34
34
|
export * from './components/Spellbook/Spellbook';
|
|
35
35
|
export * from './components/TextArea';
|
|
36
36
|
export * from './components/TimeWidget/TimeWidget';
|