@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.
@@ -7,5 +7,6 @@ export interface ITextImageProps {
7
7
  export interface IImageCarouselProps {
8
8
  textImage: ITextImageProps[];
9
9
  isTextFixed: boolean;
10
+ onCloseButton?: () => void;
10
11
  }
11
12
  export declare const ImageCarousel: React.FC<IImageCarouselProps>;
@@ -101,6 +101,7 @@ var ButtonContainer = /*#__PURE__*/styled.button.withConfig({
101
101
  })(["height:45px;font-size:", ";"], uiFonts.size.small);
102
102
 
103
103
  var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
104
+ var _atlasJSON$frames, _atlasJSON$frames2;
104
105
  var atlasJSON = _ref.atlasJSON,
105
106
  atlasIMG = _ref.atlasIMG,
106
107
  spriteKey = _ref.spriteKey,
@@ -122,7 +123,7 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
122
123
  borderRadius = _ref.borderRadius;
123
124
  //! 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).
124
125
  //!Due to React's limitations, we cannot import it from the public folder directly!
125
- var spriteData = atlasJSON.frames[spriteKey] || atlasJSON.frames['others/no-image.png'];
126
+ 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']);
126
127
  if (!spriteData) throw new Error("Sprite " + spriteKey + " not found in atlas!");
127
128
  return React__default.createElement(Container, {
128
129
  width: width,
@@ -15166,7 +15167,8 @@ var DialogContainer = /*#__PURE__*/styled.div.withConfig({
15166
15167
  var ImageCarousel = function ImageCarousel(_ref) {
15167
15168
  var _textImageSelected$te, _textImageSelected$te2;
15168
15169
  var textImage = _ref.textImage,
15169
- isTextFixed = _ref.isTextFixed;
15170
+ isTextFixed = _ref.isTextFixed,
15171
+ onCloseButton = _ref.onCloseButton;
15170
15172
  var _useState = React.useState(textImage[0]),
15171
15173
  textImageSelected = _useState[0],
15172
15174
  setTextImageSelected = _useState[1];
@@ -15220,7 +15222,10 @@ var ImageCarousel = function ImageCarousel(_ref) {
15220
15222
  onPointerDown: function onPointerDown() {
15221
15223
  return goToNextImage();
15222
15224
  }
15223
- }))));
15225
+ }))), onCloseButton && React__default.createElement(CloseButton$2, {
15226
+ className: "container-close",
15227
+ onPointerDown: onCloseButton
15228
+ }, "X"));
15224
15229
  };
15225
15230
  var CarouselWrapper = /*#__PURE__*/styled(DraggableContainer).withConfig({
15226
15231
  displayName: "ImageCarousel__CarouselWrapper",
@@ -15233,7 +15238,7 @@ var ArrowContainer = /*#__PURE__*/styled.span.withConfig({
15233
15238
  var BackgroundImage = /*#__PURE__*/styled.div.withConfig({
15234
15239
  displayName: "ImageCarousel__BackgroundImage",
15235
15240
  componentId: "sc-jl6f8-2"
15236
- })(["background-image:url(", ");background-repeat:no-repeat;background-attachment:fixed;background-size:cover;width:100%;height:", ";"], function (props) {
15241
+ })(["background-image:url(", ");background-repeat:no-repeat;background-attachment:fixed;background-size:contain;background-position:center;width:100%;height:", ";"], function (props) {
15237
15242
  return props.imagePath;
15238
15243
  }, function (props) {
15239
15244
  return props.isTextFixed ? '80%' : '100%';
@@ -15248,6 +15253,10 @@ var Description$1 = /*#__PURE__*/styled.div.withConfig({
15248
15253
  }, function (props) {
15249
15254
  return props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)';
15250
15255
  });
15256
+ var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
15257
+ displayName: "ImageCarousel__CloseButton",
15258
+ componentId: "sc-jl6f8-4"
15259
+ })(["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;}"]);
15251
15260
 
15252
15261
  var SlotsContainer = function SlotsContainer(_ref) {
15253
15262
  var children = _ref.children,
@@ -15396,7 +15405,7 @@ var ItemQuantitySelector = function ItemQuantitySelector(_ref) {
15396
15405
  return React__default.createElement(StyledContainer, {
15397
15406
  type: exports.RPGUIContainerTypes.Framed,
15398
15407
  width: "25rem"
15399
- }, React__default.createElement(CloseButton$2, {
15408
+ }, React__default.createElement(CloseButton$3, {
15400
15409
  className: "container-close",
15401
15410
  onPointerDown: onClose
15402
15411
  }, "X"), React__default.createElement("h2", null, "Select quantity to move"), React__default.createElement(StyledForm, {
@@ -15454,7 +15463,7 @@ var StyledInput = /*#__PURE__*/styled(Input).withConfig({
15454
15463
  displayName: "ItemQuantitySelector__StyledInput",
15455
15464
  componentId: "sc-yfdtpn-2"
15456
15465
  })(["text-align:center;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}&[type='number']{-moz-appearance:textfield;}"]);
15457
- var CloseButton$2 = /*#__PURE__*/styled.div.withConfig({
15466
+ var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
15458
15467
  displayName: "ItemQuantitySelector__CloseButton",
15459
15468
  componentId: "sc-yfdtpn-3"
15460
15469
  })(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
@@ -17356,7 +17365,7 @@ var SkillsContainer = function SkillsContainer(_ref) {
17356
17365
  cancelDrag: "#skillsDiv",
17357
17366
  scale: scale,
17358
17367
  width: "100%"
17359
- }, onCloseButton && React__default.createElement(CloseButton$3, {
17368
+ }, onCloseButton && React__default.createElement(CloseButton$4, {
17360
17369
  onPointerDown: onCloseButton
17361
17370
  }, "X"), React__default.createElement(SkillsContainerDiv, {
17362
17371
  id: "skillsDiv"
@@ -17392,7 +17401,7 @@ var SkillSplitDiv = /*#__PURE__*/styled.div.withConfig({
17392
17401
  displayName: "SkillsContainer__SkillSplitDiv",
17393
17402
  componentId: "sc-1g0c67q-2"
17394
17403
  })(["width:100%;font-size:11px;hr{margin:0;margin-bottom:1rem;padding:0px;}p{margin-bottom:0px;}"]);
17395
- var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
17404
+ var CloseButton$4 = /*#__PURE__*/styled.div.withConfig({
17396
17405
  displayName: "SkillsContainer__CloseButton",
17397
17406
  componentId: "sc-1g0c67q-3"
17398
17407
  })(["position:absolute;top:2px;right:2px;color:white;z-index:22;font-size:1.1rem;"]);
@@ -17802,7 +17811,7 @@ var TimeWidget = function TimeWidget(_ref) {
17802
17811
  scale = _ref.scale;
17803
17812
  return React__default.createElement(Draggable, {
17804
17813
  scale: scale
17805
- }, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$4, {
17814
+ }, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$5, {
17806
17815
  onPointerDown: onClose
17807
17816
  }, "X"), React__default.createElement(DayNightContainer, null, React__default.createElement(DayNightPeriod, {
17808
17817
  periodOfDay: periodOfDay
@@ -17816,7 +17825,7 @@ var Time = /*#__PURE__*/styled.div.withConfig({
17816
17825
  displayName: "TimeWidget__Time",
17817
17826
  componentId: "sc-1ja236h-1"
17818
17827
  })(["top:0.75rem;right:0.5rem;position:absolute;font-size:", ";color:white;"], uiFonts.size.small);
17819
- var CloseButton$4 = /*#__PURE__*/styled.p.withConfig({
17828
+ var CloseButton$5 = /*#__PURE__*/styled.p.withConfig({
17820
17829
  displayName: "TimeWidget__CloseButton",
17821
17830
  componentId: "sc-1ja236h-2"
17822
17831
  })(["position:absolute;top:-0.5rem;margin:0;right:-0.2rem;font-size:", " !important;z-index:1;"], uiFonts.size.small);