@rpg-engine/long-bow 0.2.81 → 0.2.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.81",
3
+ "version": "0.2.90",
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.6.41",
86
+ "@rpg-engine/shared": "^0.6.40",
87
87
  "dayjs": "^1.11.2",
88
88
  "fs-extra": "^10.1.0",
89
89
  "is-mobile": "^3.1.1",
package/src/.DS_Store ADDED
Binary file
@@ -5,6 +5,7 @@ import { Button, ButtonTypes } from '../Button';
5
5
  import { DraggableContainer } from '../DraggableContainer';
6
6
  import { Dropdown, IOptionsProps } from '../Dropdown';
7
7
  import { RPGUIContainerTypes } from '../RPGUIContainer';
8
+ import { RPGUIForceRenderStart } from '../RPGUIForceRenderStart';
8
9
  import { SpriteFromAtlas } from '../shared/SpriteFromAtlas';
9
10
 
10
11
  export interface IItemCraftSelectorProps {
@@ -79,85 +80,92 @@ export const CraftBook: React.FC<IItemCraftSelectorProps> = ({
79
80
  };
80
81
 
81
82
  return (
82
- <DraggableContainer
83
- type={RPGUIContainerTypes.Framed}
84
- width="500px"
85
- cancelDrag=".equipment-container-body .arrow-selector"
86
- onCloseButton={() => {
87
- if (onClose) {
88
- onClose();
89
- }
90
- }}
83
+ <RPGUIForceRenderStart
84
+ elementDOMId="radioInput"
85
+ elementRenderedDOMKey="rpgui-radio"
86
+ RPGUICreateFunction="radio"
91
87
  >
92
- <div style={{ width: '100%' }}>
93
- <Title>{'Craftbook'}</Title>
94
- <Subtitle>{'Select an item to craft'}</Subtitle>
95
- <hr className="golden" />
96
- </div>
97
- <Dropdown
98
- options={getDropdownOptions()}
99
- onChange={value => onSelect(value)}
100
- />
101
- <RadioInputScroller>
102
- {craftablesItems?.map((option, index) => (
103
- <RadioOptionsWrapper key={index}>
104
- <SpriteAtlasWrapper>
105
- <SpriteFromAtlas
106
- atlasIMG={atlasIMG}
107
- atlasJSON={atlasJSON}
108
- spriteKey={option.texturePath}
109
- imgScale={3}
110
- grayScale={!option.canCraft}
111
- />
112
- </SpriteAtlasWrapper>
113
- <div>
114
- <input
115
- className="rpgui-radio"
116
- type="radio"
117
- value={option.name}
118
- name="test"
119
- disabled={!option.canCraft}
120
- />
121
- <label
122
- onClick={handleClick}
123
- style={{ display: 'flex', alignItems: 'center' }}
124
- onMouseEnter={() => setIsShown({ show: true, index: index })}
125
- onMouseLeave={() => setIsShown({ show: false, index: index })}
126
- >
127
- {modifyString(option.name)}
128
- </label>
129
-
130
- {isShown &&
131
- isShown.index === index &&
132
- option.ingredients.map((option, index) => (
133
- <Recipes key={index}>
134
- <SpriteFromAtlas
135
- atlasIMG={atlasIMG}
136
- atlasJSON={atlasJSON}
137
- spriteKey={option.texturePath}
138
- imgScale={1}
139
- />
140
- <StyledItem>
141
- {modifyString(option.key)} ({option.qty}x)
142
- </StyledItem>
143
- </Recipes>
144
- ))}
145
- </div>
146
- </RadioOptionsWrapper>
147
- ))}
148
- </RadioInputScroller>
149
- <ButtonWrapper>
150
- <Button buttonType={ButtonTypes.RPGUIButton} onClick={onClose}>
151
- Cancel
152
- </Button>
153
- <Button
154
- buttonType={ButtonTypes.RPGUIButton}
155
- onClick={() => onCraftItem(craftItem)}
156
- >
157
- Craft
158
- </Button>
159
- </ButtonWrapper>
160
- </DraggableContainer>
88
+ <DraggableContainer
89
+ type={RPGUIContainerTypes.Framed}
90
+ width="500px"
91
+ cancelDrag=".equipment-container-body .arrow-selector"
92
+ onCloseButton={() => {
93
+ if (onClose) {
94
+ onClose();
95
+ }
96
+ }}
97
+ >
98
+ <div style={{ width: '100%' }}>
99
+ <Title>{'Craftbook'}</Title>
100
+ <Subtitle>{'Select an item to craft'}</Subtitle>
101
+ <hr className="golden" />
102
+ </div>
103
+ <Dropdown
104
+ options={getDropdownOptions()}
105
+ onChange={value => onSelect(value)}
106
+ />
107
+ <RadioInputScroller>
108
+ {craftablesItems?.map((option, index) => (
109
+ <RadioOptionsWrapper key={index}>
110
+ <SpriteAtlasWrapper>
111
+ <SpriteFromAtlas
112
+ atlasIMG={atlasIMG}
113
+ atlasJSON={atlasJSON}
114
+ spriteKey={option.texturePath}
115
+ imgScale={3}
116
+ grayScale={!option.canCraft}
117
+ />
118
+ </SpriteAtlasWrapper>
119
+ <div>
120
+ <input
121
+ className="rpgui-radio"
122
+ type="radio"
123
+ value={option.name}
124
+ name="test"
125
+ disabled={!option.canCraft}
126
+ id="radioInput"
127
+ />
128
+ <label
129
+ onClick={handleClick}
130
+ style={{ display: 'flex', alignItems: 'center' }}
131
+ onMouseEnter={() => setIsShown({ show: true, index: index })}
132
+ onMouseLeave={() => setIsShown({ show: false, index: index })}
133
+ >
134
+ {modifyString(option.name)}
135
+ </label>
136
+
137
+ {isShown &&
138
+ isShown.index === index &&
139
+ option.ingredients.map((option, index) => (
140
+ <Recipes key={index}>
141
+ <SpriteFromAtlas
142
+ atlasIMG={atlasIMG}
143
+ atlasJSON={atlasJSON}
144
+ spriteKey={option.texturePath}
145
+ imgScale={1}
146
+ />
147
+ <StyledItem>
148
+ {modifyString(option.key)} ({option.qty}x)
149
+ </StyledItem>
150
+ </Recipes>
151
+ ))}
152
+ </div>
153
+ </RadioOptionsWrapper>
154
+ ))}
155
+ </RadioInputScroller>
156
+ <ButtonWrapper>
157
+ <Button buttonType={ButtonTypes.RPGUIButton} onClick={onClose}>
158
+ Cancel
159
+ </Button>
160
+ <Button
161
+ buttonType={ButtonTypes.RPGUIButton}
162
+ onClick={() => onCraftItem(craftItem)}
163
+ >
164
+ Craft
165
+ </Button>
166
+ </ButtonWrapper>
167
+ </DraggableContainer>
168
+ </RPGUIForceRenderStart>
161
169
  );
162
170
  };
163
171
 
package/src/index.tsx CHANGED
@@ -12,6 +12,7 @@ export * from './components/Input';
12
12
  export { ErrorBoundary } from './components/Item/Inventory/ErrorBoundary';
13
13
  export * from './components/Item/Inventory/ItemContainer';
14
14
  export * from './components/Item/Inventory/ItemSlot';
15
+ export * from './components/itemSelector/ItemSelector';
15
16
  export * from './components/ListMenu';
16
17
  export * from './components/NPCDialog/NPCDialog';
17
18
  export * from './components/NPCDialog/NPCMultiDialog';
@@ -20,17 +21,17 @@ export * from './components/ProgressBar';
20
21
  export * from './components/PropertySelect/PropertySelect';
21
22
  export * from './components/QuestInfo/QuestInfo';
22
23
  export * from './components/QuestList';
23
- export * from './components/RPGUIContainer';
24
- export * from './components/RPGUIRoot';
25
24
  export * from './components/RadioButton';
26
25
  export * from './components/RangeSlider';
26
+ export * from './components/RPGUIContainer';
27
+ export * from './components/RPGUIForceRenderStart';
28
+ export * from './components/RPGUIRoot';
29
+ export * from './components/shared/SpriteFromAtlas';
27
30
  export * from './components/SkillProgressBar';
28
31
  export * from './components/SkillsContainer';
29
32
  export * from './components/TextArea';
30
33
  export * from './components/TimeWidget/TimeWidget';
31
34
  export * from './components/TradingMenu/TradingMenu';
32
35
  export * from './components/Truncate';
33
- export * from './components/itemSelector/ItemSelector';
34
- export * from './components/shared/SpriteFromAtlas';
35
36
  export * from './components/typography/DynamicText';
36
37
  export { useEventListener } from './hooks/useEventListener';
Binary file
Binary file