@rpg-engine/long-bow 0.5.3 → 0.5.5
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/ImageCarousel/ImageCarousel.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +19 -10
- 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 +19 -10
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ImageCarousel/ImageCarousel.tsx +23 -1
- package/src/components/shared/SpriteFromAtlas.tsx +2 -1
package/dist/long-bow.esm.js
CHANGED
|
@@ -95,6 +95,7 @@ var ButtonContainer = /*#__PURE__*/styled.button.withConfig({
|
|
|
95
95
|
})(["height:45px;font-size:", ";"], uiFonts.size.small);
|
|
96
96
|
|
|
97
97
|
var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
98
|
+
var _atlasJSON$frames, _atlasJSON$frames2;
|
|
98
99
|
var atlasJSON = _ref.atlasJSON,
|
|
99
100
|
atlasIMG = _ref.atlasIMG,
|
|
100
101
|
spriteKey = _ref.spriteKey,
|
|
@@ -116,7 +117,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
116
117
|
borderRadius = _ref.borderRadius;
|
|
117
118
|
//! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).
|
|
118
119
|
//!Due to React's limitations, we cannot import it from the public folder directly!
|
|
119
|
-
var spriteData = atlasJSON.frames[spriteKey] || atlasJSON.frames['others/no-image.png'];
|
|
120
|
+
var spriteData = (atlasJSON == null ? void 0 : (_atlasJSON$frames = atlasJSON.frames) == null ? void 0 : _atlasJSON$frames[spriteKey]) || (atlasJSON == null ? void 0 : (_atlasJSON$frames2 = atlasJSON.frames) == null ? void 0 : _atlasJSON$frames2['others/no-image.png']);
|
|
120
121
|
if (!spriteData) throw new Error("Sprite " + spriteKey + " not found in atlas!");
|
|
121
122
|
return React.createElement(Container, {
|
|
122
123
|
width: width,
|
|
@@ -15163,7 +15164,8 @@ var DialogContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
15163
15164
|
var ImageCarousel = function ImageCarousel(_ref) {
|
|
15164
15165
|
var _textImageSelected$te, _textImageSelected$te2;
|
|
15165
15166
|
var textImage = _ref.textImage,
|
|
15166
|
-
isTextFixed = _ref.isTextFixed
|
|
15167
|
+
isTextFixed = _ref.isTextFixed,
|
|
15168
|
+
onCloseButton = _ref.onCloseButton;
|
|
15167
15169
|
var _useState = useState(textImage[0]),
|
|
15168
15170
|
textImageSelected = _useState[0],
|
|
15169
15171
|
setTextImageSelected = _useState[1];
|
|
@@ -15217,7 +15219,10 @@ var ImageCarousel = function ImageCarousel(_ref) {
|
|
|
15217
15219
|
onPointerDown: function onPointerDown() {
|
|
15218
15220
|
return goToNextImage();
|
|
15219
15221
|
}
|
|
15220
|
-
})))
|
|
15222
|
+
}))), onCloseButton && React.createElement(CloseButton$2, {
|
|
15223
|
+
className: "container-close",
|
|
15224
|
+
onPointerDown: onCloseButton
|
|
15225
|
+
}, "X"));
|
|
15221
15226
|
};
|
|
15222
15227
|
var CarouselWrapper = /*#__PURE__*/styled(DraggableContainer).withConfig({
|
|
15223
15228
|
displayName: "ImageCarousel__CarouselWrapper",
|
|
@@ -15230,7 +15235,7 @@ var ArrowContainer = /*#__PURE__*/styled.span.withConfig({
|
|
|
15230
15235
|
var BackgroundImage = /*#__PURE__*/styled.div.withConfig({
|
|
15231
15236
|
displayName: "ImageCarousel__BackgroundImage",
|
|
15232
15237
|
componentId: "sc-jl6f8-2"
|
|
15233
|
-
})(["background-image:url(", ");background-repeat:no-repeat;background-attachment:fixed;background-size:
|
|
15238
|
+
})(["background-image:url(", ");background-repeat:no-repeat;background-attachment:fixed;background-size:contain;background-position:center;width:100%;height:", ";"], function (props) {
|
|
15234
15239
|
return props.imagePath;
|
|
15235
15240
|
}, function (props) {
|
|
15236
15241
|
return props.isTextFixed ? '80%' : '100%';
|
|
@@ -15245,6 +15250,10 @@ var Description$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
15245
15250
|
}, function (props) {
|
|
15246
15251
|
return props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)';
|
|
15247
15252
|
});
|
|
15253
|
+
var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
|
|
15254
|
+
displayName: "ImageCarousel__CloseButton",
|
|
15255
|
+
componentId: "sc-jl6f8-4"
|
|
15256
|
+
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:1.5rem;@media (max-width:950px){font-size:1.7rem;padding:12px;}"]);
|
|
15248
15257
|
|
|
15249
15258
|
var SlotsContainer = function SlotsContainer(_ref) {
|
|
15250
15259
|
var children = _ref.children,
|
|
@@ -15394,7 +15403,7 @@ var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
|
|
|
15394
15403
|
return React.createElement(StyledContainer, {
|
|
15395
15404
|
type: RPGUIContainerTypes.Framed,
|
|
15396
15405
|
width: "25rem"
|
|
15397
|
-
}, React.createElement(CloseButton$
|
|
15406
|
+
}, React.createElement(CloseButton$3, {
|
|
15398
15407
|
className: "container-close",
|
|
15399
15408
|
onPointerDown: onClose
|
|
15400
15409
|
}, "X"), React.createElement("h2", null, "Select quantity to move"), React.createElement(StyledForm, {
|
|
@@ -15452,7 +15461,7 @@ var StyledInput = /*#__PURE__*/styled(Input).withConfig({
|
|
|
15452
15461
|
displayName: "ItemQuantitySelector__StyledInput",
|
|
15453
15462
|
componentId: "sc-yfdtpn-2"
|
|
15454
15463
|
})(["text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"]);
|
|
15455
|
-
var CloseButton$
|
|
15464
|
+
var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
|
|
15456
15465
|
displayName: "ItemQuantitySelector__CloseButton",
|
|
15457
15466
|
componentId: "sc-yfdtpn-3"
|
|
15458
15467
|
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
|
|
@@ -17354,7 +17363,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
17354
17363
|
cancelDrag: "#skillsDiv",
|
|
17355
17364
|
scale: scale,
|
|
17356
17365
|
width: "100%"
|
|
17357
|
-
}, onCloseButton && React.createElement(CloseButton$
|
|
17366
|
+
}, onCloseButton && React.createElement(CloseButton$4, {
|
|
17358
17367
|
onPointerDown: onCloseButton
|
|
17359
17368
|
}, "X"), React.createElement(SkillsContainerDiv, {
|
|
17360
17369
|
id: "skillsDiv"
|
|
@@ -17390,7 +17399,7 @@ var SkillSplitDiv = /*#__PURE__*/styled.div.withConfig({
|
|
|
17390
17399
|
displayName: "SkillsContainer__SkillSplitDiv",
|
|
17391
17400
|
componentId: "sc-1g0c67q-2"
|
|
17392
17401
|
})(["width:100%;font-size:11px;hr{margin:0;margin-bottom:1rem;padding:0px;}p{margin-bottom:0px;}"]);
|
|
17393
|
-
var CloseButton$
|
|
17402
|
+
var CloseButton$4 = /*#__PURE__*/styled.div.withConfig({
|
|
17394
17403
|
displayName: "SkillsContainer__CloseButton",
|
|
17395
17404
|
componentId: "sc-1g0c67q-3"
|
|
17396
17405
|
})(["position:absolute;top:2px;right:2px;color:white;z-index:22;font-size:1.1rem;"]);
|
|
@@ -17800,7 +17809,7 @@ var TimeWidget = function TimeWidget(_ref) {
|
|
|
17800
17809
|
scale = _ref.scale;
|
|
17801
17810
|
return React.createElement(Draggable, {
|
|
17802
17811
|
scale: scale
|
|
17803
|
-
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$
|
|
17812
|
+
}, React.createElement(WidgetContainer, null, React.createElement(CloseButton$5, {
|
|
17804
17813
|
onPointerDown: onClose
|
|
17805
17814
|
}, "X"), React.createElement(DayNightContainer, null, React.createElement(DayNightPeriod, {
|
|
17806
17815
|
periodOfDay: periodOfDay
|
|
@@ -17814,7 +17823,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
|
|
|
17814
17823
|
displayName: "TimeWidget__Time",
|
|
17815
17824
|
componentId: "sc-1ja236h-1"
|
|
17816
17825
|
})(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
|
|
17817
|
-
var CloseButton$
|
|
17826
|
+
var CloseButton$5 = /*#__PURE__*/styled.p.withConfig({
|
|
17818
17827
|
displayName: "TimeWidget__CloseButton",
|
|
17819
17828
|
componentId: "sc-1ja236h-2"
|
|
17820
17829
|
})(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);
|