@rpg-engine/long-bow 0.2.18 → 0.2.20
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/long-bow.cjs.development.js +4 -42
- 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 +4 -42
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Dropdown.tsx +12 -19
- package/src/components/RangeSlider.tsx +14 -21
- package/src/mocks/itemContainer.mocks.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@rollup/plugin-image": "^2.1.1",
|
|
86
|
-
"@rpg-engine/shared": "^0.4.
|
|
86
|
+
"@rpg-engine/shared": "^0.4.54",
|
|
87
87
|
"dayjs": "^1.11.2",
|
|
88
88
|
"fs-extra": "^10.1.0",
|
|
89
89
|
"lodash": "^4.17.21",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
|
-
import { RPGUIForceRenderStart } from './RPGUIForceRenderStart';
|
|
4
3
|
import { _RPGUI } from './RPGUIRoot';
|
|
5
4
|
|
|
6
5
|
export interface IOptionsProps {
|
|
@@ -41,24 +40,18 @@ export const Dropdown: React.FC<IDropdownProps> = ({
|
|
|
41
40
|
}, [selectedValue]);
|
|
42
41
|
|
|
43
42
|
return (
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
<select
|
|
44
|
+
id={`rpgui-dropdown-${dropdownId}`}
|
|
45
|
+
style={{ width: width }}
|
|
46
|
+
className="rpgui-dropdown"
|
|
48
47
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
{option.option}
|
|
58
|
-
</option>
|
|
59
|
-
);
|
|
60
|
-
})}
|
|
61
|
-
</select>
|
|
62
|
-
</RPGUIForceRenderStart>
|
|
48
|
+
{options.map(option => {
|
|
49
|
+
return (
|
|
50
|
+
<option key={option.id} value={option.value}>
|
|
51
|
+
{option.option}
|
|
52
|
+
</option>
|
|
53
|
+
);
|
|
54
|
+
})}
|
|
55
|
+
</select>
|
|
63
56
|
);
|
|
64
57
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { v4 as uuidv4 } from 'uuid';
|
|
4
|
-
import { RPGUIForceRenderStart } from './RPGUIForceRenderStart';
|
|
5
4
|
import { _RPGUI } from './RPGUIRoot';
|
|
6
5
|
|
|
7
6
|
export enum RangeSliderType {
|
|
@@ -34,26 +33,20 @@ export const RangeSlider: React.FC<IRangeSliderProps> = ({
|
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
return (
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
min={valueMin}
|
|
52
|
-
max={valueMax}
|
|
53
|
-
id={`rpgui-slider-${sliderId}`}
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</RPGUIForceRenderStart>
|
|
36
|
+
<div onMouseUp={onHandleMouseUp}>
|
|
37
|
+
<Input
|
|
38
|
+
className={
|
|
39
|
+
type === RangeSliderType.Slider
|
|
40
|
+
? RangeSliderType.Slider
|
|
41
|
+
: RangeSliderType.GoldSlider
|
|
42
|
+
}
|
|
43
|
+
type="range"
|
|
44
|
+
style={{ width: width }}
|
|
45
|
+
min={valueMin}
|
|
46
|
+
max={valueMax}
|
|
47
|
+
id={`rpgui-slider-${sliderId}`}
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
57
50
|
);
|
|
58
51
|
};
|
|
59
52
|
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
export const items: IItem[] = [
|
|
10
10
|
{
|
|
11
11
|
_id: '629acef1c7c8e8002ff60736',
|
|
12
|
+
hasUseWith: false,
|
|
12
13
|
type: ItemType.Weapon,
|
|
13
14
|
subType: ItemSubType.Sword,
|
|
14
15
|
textureAtlas: 'items',
|
|
@@ -42,6 +43,7 @@ export const items: IItem[] = [
|
|
|
42
43
|
},
|
|
43
44
|
{
|
|
44
45
|
_id: '629acef1c7c8e8002ff73564',
|
|
46
|
+
hasUseWith: false,
|
|
45
47
|
type: ItemType.Weapon,
|
|
46
48
|
subType: ItemSubType.Axe,
|
|
47
49
|
textureAtlas: 'items',
|
|
@@ -73,6 +75,7 @@ export const items: IItem[] = [
|
|
|
73
75
|
},
|
|
74
76
|
{
|
|
75
77
|
_id: '629acef1c7c8e8002ff60723',
|
|
78
|
+
hasUseWith: false,
|
|
76
79
|
type: ItemType.Consumable,
|
|
77
80
|
subType: ItemSubType.Potion,
|
|
78
81
|
textureAtlas: 'items',
|
|
@@ -105,6 +108,7 @@ export const items: IItem[] = [
|
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
110
|
_id: '629acek4j7c8e8002ff60034',
|
|
111
|
+
hasUseWith: false,
|
|
108
112
|
type: ItemType.Consumable,
|
|
109
113
|
subType: ItemSubType.Food,
|
|
110
114
|
textureAtlas: 'items',
|
|
@@ -137,6 +141,7 @@ export const items: IItem[] = [
|
|
|
137
141
|
},
|
|
138
142
|
{
|
|
139
143
|
_id: '629acek4j7c8e8002fg60034',
|
|
144
|
+
hasUseWith: false,
|
|
140
145
|
type: ItemType.Consumable,
|
|
141
146
|
subType: ItemSubType.Accessory,
|
|
142
147
|
textureAtlas: 'items',
|
|
@@ -170,6 +175,7 @@ export const items: IItem[] = [
|
|
|
170
175
|
{
|
|
171
176
|
_id: '392acek4j7c8e8002ff60403',
|
|
172
177
|
type: ItemType.CraftMaterial,
|
|
178
|
+
hasUseWith: false,
|
|
173
179
|
subType: ItemSubType.Other,
|
|
174
180
|
textureAtlas: 'items',
|
|
175
181
|
allowedEquipSlotType: [ItemSlotType.Inventory],
|
|
@@ -202,6 +208,7 @@ export const items: IItem[] = [
|
|
|
202
208
|
|
|
203
209
|
{
|
|
204
210
|
_id: '392acek4j7c8e8002ff60404',
|
|
211
|
+
hasUseWith: false,
|
|
205
212
|
type: ItemType.Container,
|
|
206
213
|
subType: ItemSubType.Other,
|
|
207
214
|
textureAtlas: 'items',
|