@rpg-engine/long-bow 0.3.79 → 0.3.81

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.
Files changed (34) hide show
  1. package/dist/components/Abstractions/ModalPortal.d.ts +6 -0
  2. package/dist/components/Abstractions/SlotsContainer.d.ts +1 -0
  3. package/dist/components/DraggableContainer.d.ts +1 -0
  4. package/dist/components/Equipment/EquipmentSet.d.ts +1 -1
  5. package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -1
  6. package/dist/components/QuestInfo/QuestInfo.d.ts +1 -0
  7. package/dist/components/QuestList.d.ts +1 -0
  8. package/dist/components/SkillsContainer.d.ts +1 -0
  9. package/dist/components/Spellbook/Spellbook.d.ts +1 -0
  10. package/dist/components/TimeWidget/TimeWidget.d.ts +1 -0
  11. package/dist/long-bow.cjs.development.js +105 -89
  12. package/dist/long-bow.cjs.development.js.map +1 -1
  13. package/dist/long-bow.cjs.production.min.js +1 -1
  14. package/dist/long-bow.cjs.production.min.js.map +1 -1
  15. package/dist/long-bow.esm.js +105 -89
  16. package/dist/long-bow.esm.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/components/Abstractions/ModalPortal.tsx +22 -0
  19. package/src/components/Abstractions/SlotsContainer.tsx +3 -0
  20. package/src/components/CraftBook/CraftBook.tsx +1 -0
  21. package/src/components/DraggableContainer.tsx +3 -0
  22. package/src/components/Equipment/EquipmentSet.tsx +4 -3
  23. package/src/components/Item/Cards/ItemInfo.tsx +1 -1
  24. package/src/components/Item/Cards/ItemTooltip.tsx +20 -22
  25. package/src/components/Item/Cards/MobileItemTooltip.tsx +70 -55
  26. package/src/components/Item/Inventory/ItemContainer.tsx +28 -24
  27. package/src/components/Item/Inventory/ItemSlot.tsx +3 -1
  28. package/src/components/QuestInfo/QuestInfo.tsx +3 -0
  29. package/src/components/QuestList.tsx +7 -1
  30. package/src/components/SkillsContainer.tsx +7 -1
  31. package/src/components/Spellbook/Spellbook.tsx +3 -0
  32. package/src/components/TimeWidget/TimeWidget.tsx +3 -1
  33. package/src/components/TradingMenu/TradingMenu.tsx +1 -0
  34. package/src/mocks/itemContainer.mocks.ts +1 -1
@@ -13,6 +13,7 @@ var reactErrorBoundary = require('react-error-boundary');
13
13
  var rx = require('react-icons/rx');
14
14
  var Draggable = _interopDefault(require('react-draggable'));
15
15
  var uuid = require('uuid');
16
+ var ReactDOM = _interopDefault(require('react-dom'));
16
17
  var lodash = require('lodash');
17
18
  var mobxReactLite = require('mobx-react-lite');
18
19
  require('rpgui/rpgui.min.css');
@@ -33223,7 +33224,8 @@ var DraggableContainer = function DraggableContainer(_ref) {
33223
33224
  initialPosition = _ref$initialPosition === void 0 ? {
33224
33225
  x: 0,
33225
33226
  y: 0
33226
- } : _ref$initialPosition;
33227
+ } : _ref$initialPosition,
33228
+ scale = _ref.scale;
33227
33229
  var draggableRef = React.useRef(null);
33228
33230
  useOutsideClick(draggableRef, 'item-container');
33229
33231
  React.useEffect(function () {
@@ -33249,7 +33251,8 @@ var DraggableContainer = function DraggableContainer(_ref) {
33249
33251
  });
33250
33252
  }
33251
33253
  },
33252
- defaultPosition: initialPosition
33254
+ defaultPosition: initialPosition,
33255
+ scale: scale
33253
33256
  }, React__default.createElement(Container$6, {
33254
33257
  ref: draggableRef,
33255
33258
  width: width,
@@ -33363,6 +33366,18 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
33363
33366
  return props.opened ? 'block' : 'none';
33364
33367
  });
33365
33368
 
33369
+ var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
33370
+ var ModalPortal = function ModalPortal(_ref) {
33371
+ var children = _ref.children;
33372
+ return ReactDOM.createPortal(React__default.createElement(Container$8, {
33373
+ className: "rpgui-content"
33374
+ }, children), modalRoot);
33375
+ };
33376
+ var Container$8 = /*#__PURE__*/styled.div.withConfig({
33377
+ displayName: "ModalPortal__Container",
33378
+ componentId: "sc-dgmp04-0"
33379
+ })(["position:static !important;"]);
33380
+
33366
33381
  var RelativeListMenu = function RelativeListMenu(_ref) {
33367
33382
  var options = _ref.options,
33368
33383
  onSelected = _ref.onSelected,
@@ -33384,7 +33399,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
33384
33399
  document.removeEventListener('clickOutside', function (_e) {});
33385
33400
  };
33386
33401
  }, []);
33387
- return React__default.createElement(Container$8, {
33402
+ return React__default.createElement(Container$9, {
33388
33403
  fontSize: fontSize,
33389
33404
  ref: ref
33390
33405
  }, React__default.createElement("ul", {
@@ -33401,7 +33416,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
33401
33416
  }, (params == null ? void 0 : params.text) || 'No text');
33402
33417
  })));
33403
33418
  };
33404
- var Container$8 = /*#__PURE__*/styled.div.withConfig({
33419
+ var Container$9 = /*#__PURE__*/styled.div.withConfig({
33405
33420
  displayName: "RelativeListMenu__Container",
33406
33421
  componentId: "sc-7hohf-0"
33407
33422
  })(["position:absolute;top:1rem;left:4rem;display:flex;flex-direction:column;width:max-content;justify-content:start;align-items:flex-start;li{font-size:", "em;}"], function (props) {
@@ -33423,24 +33438,17 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
33423
33438
  options = _ref.options,
33424
33439
  onSelected = _ref.onSelected;
33425
33440
  var ref = React.useRef(null);
33426
- React.useEffect(function () {
33427
- var current = ref.current;
33428
- if (current) {
33429
- // Adjust the position to be on whole window
33430
- var rect = current.getBoundingClientRect();
33431
- var x = -rect.x * 100 / (scale * 100);
33432
- var y = -rect.y * 100 / (scale * 100);
33433
- current.style.transform = "translate(" + x + "px, " + y + "px)";
33434
- current.style.opacity = '0.92';
33435
- }
33436
- return;
33437
- }, []);
33438
- return React__default.createElement(Container$9, {
33441
+ var handleFadeOut = function handleFadeOut() {
33442
+ var _ref$current;
33443
+ (_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
33444
+ };
33445
+ return React__default.createElement(ModalPortal, null, React__default.createElement(Container$a, {
33439
33446
  ref: ref,
33440
33447
  onTouchEnd: function onTouchEnd() {
33448
+ handleFadeOut();
33441
33449
  setTimeout(function () {
33442
33450
  closeTooltip();
33443
- }, 10);
33451
+ }, 100);
33444
33452
  },
33445
33453
  scale: scale
33446
33454
  }, React__default.createElement(ItemInfoDisplay, {
@@ -33453,24 +33461,19 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
33453
33461
  return React__default.createElement(Option, {
33454
33462
  key: option.id,
33455
33463
  onTouchEnd: function onTouchEnd() {
33464
+ handleFadeOut();
33456
33465
  setTimeout(function () {
33457
33466
  onSelected == null ? void 0 : onSelected(option.id);
33458
33467
  closeTooltip();
33459
- }, 10);
33468
+ }, 100);
33460
33469
  }
33461
33470
  }, option.text);
33462
- })));
33471
+ }))));
33463
33472
  };
33464
- var Container$9 = /*#__PURE__*/styled.div.withConfig({
33473
+ var Container$a = /*#__PURE__*/styled.div.withConfig({
33465
33474
  displayName: "MobileItemTooltip__Container",
33466
33475
  componentId: "sc-ku4p1j-0"
33467
- })(["position:fixed;z-index:50;left:0;top:0;opacity:0;width:", ";height:", ";background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;@media (max-width:580px){flex-direction:column;}"], function (_ref2) {
33468
- var scale = _ref2.scale;
33469
- return "calc(100vw * 100 / " + scale * 100 + ")";
33470
- }, function (_ref3) {
33471
- var scale = _ref3.scale;
33472
- return "calc(100vh * 100 / " + scale * 100 + ")";
33473
- });
33476
+ })(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
33474
33477
  var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
33475
33478
  displayName: "MobileItemTooltip__OptionsContainer",
33476
33479
  componentId: "sc-ku4p1j-1"
@@ -33478,7 +33481,7 @@ var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
33478
33481
  var Option = /*#__PURE__*/styled.button.withConfig({
33479
33482
  displayName: "MobileItemTooltip__Option",
33480
33483
  componentId: "sc-ku4p1j-2"
33481
- })(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.2s;&:hover{background-color:#555;}@media (max-width:580px){padding:1rem 0.5rem;}"]);
33484
+ })(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.1s;&:hover{background-color:#555;}@media (max-width:580px){padding:1rem 0.5rem;}"]);
33482
33485
 
33483
33486
  var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
33484
33487
  var contextMenu = actionsByTypeList.map(function (action) {
@@ -33673,7 +33676,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33673
33676
  maxWidth: "48px"
33674
33677
  }, React__default.createElement(ItemQty, {
33675
33678
  className: qtyClassName
33676
- }, " ", stackQty, " ")));
33679
+ }, Math.round(stackQty * 100) / 100, ' ')));
33677
33680
  }
33678
33681
  return undefined;
33679
33682
  };
@@ -33767,7 +33770,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
33767
33770
  onDragEnd(quantity);
33768
33771
  }
33769
33772
  };
33770
- return React__default.createElement(Container$a, {
33773
+ return React__default.createElement(Container$b, {
33771
33774
  item: item,
33772
33775
  className: "rpgui-icon empty-slot",
33773
33776
  onMouseUp: function onMouseUp() {
@@ -33918,7 +33921,7 @@ var rarityColor = function rarityColor(item) {
33918
33921
  return null;
33919
33922
  }
33920
33923
  };
33921
- var Container$a = /*#__PURE__*/styled.div.withConfig({
33924
+ var Container$b = /*#__PURE__*/styled.div.withConfig({
33922
33925
  displayName: "ItemSlot__Container",
33923
33926
  componentId: "sc-l2j5ef-0"
33924
33927
  })(["margin:0.1rem;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}position:relative;&::before{content:'';position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;border-radius:12px;pointer-events:none;animation:", ";@keyframes bg-color-change{0%{background-color:rgba(255 255 255 / 0.5);}50%{background-color:transparent;}100%{background-color:rgba(255 255 255 / 0.5);}}}"], function (_ref2) {
@@ -34029,13 +34032,13 @@ var ItemInfo = function ItemInfo(_ref) {
34029
34032
  }));
34030
34033
  });
34031
34034
  };
34032
- return React__default.createElement(Container$b, {
34035
+ return React__default.createElement(Container$c, {
34033
34036
  item: item
34034
34037
  }, React__default.createElement(Header, null, React__default.createElement("div", null, React__default.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React__default.createElement(Rarity, {
34035
34038
  item: item
34036
- }, item.rarity), React__default.createElement(Type, null, item.subType)), React__default.createElement(AllowedSlots, null, renderAvaibleSlots())), renderStatistics(), item.isTwoHanded && React__default.createElement(Statistic, null, "Two handed"), React__default.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React__default.createElement(StackInfo, null, "x", (_item$stackQty = item.stackQty) != null ? _item$stackQty : 1, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React__default.createElement(MissingStatistics, null, React__default.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
34039
+ }, item.rarity), React__default.createElement(Type, null, item.subType)), React__default.createElement(AllowedSlots, null, renderAvaibleSlots())), renderStatistics(), item.isTwoHanded && React__default.createElement(Statistic, null, "Two handed"), React__default.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React__default.createElement(StackInfo, null, "x", Math.round(((_item$stackQty = item.stackQty) != null ? _item$stackQty : 1) * 100) / 100, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React__default.createElement(MissingStatistics, null, React__default.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
34037
34040
  };
34038
- var Container$b = /*#__PURE__*/styled.div.withConfig({
34041
+ var Container$c = /*#__PURE__*/styled.div.withConfig({
34039
34042
  displayName: "ItemInfo__Container",
34040
34043
  componentId: "sc-1xm4q8k-0"
34041
34044
  })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:15rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
@@ -34148,22 +34151,18 @@ var ItemTooltip = function ItemTooltip(_ref) {
34148
34151
  var ref = React.useRef(null);
34149
34152
  React.useEffect(function () {
34150
34153
  var current = ref.current;
34151
- var initialOffset;
34152
34154
  if (current) {
34153
34155
  var handleMouseMove = function handleMouseMove(event) {
34154
34156
  var clientX = event.clientX,
34155
34157
  clientY = event.clientY;
34156
34158
  // Adjust the position of the tooltip based on the mouse position
34157
34159
  var rect = current.getBoundingClientRect();
34158
- if (!initialOffset) {
34159
- initialOffset = rect;
34160
- }
34161
34160
  var tooltipWidth = rect.width;
34162
34161
  var tooltipHeight = rect.height;
34163
34162
  var isOffScreenRight = clientX + tooltipWidth + offset > window.innerWidth;
34164
34163
  var isOffScreenBottom = clientY + tooltipHeight + offset > window.innerHeight;
34165
- var x = (isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset) - initialOffset.x;
34166
- var y = (isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset) - initialOffset.y;
34164
+ var x = isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset;
34165
+ var y = isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset;
34167
34166
  current.style.transform = "translate(" + x + "px, " + y + "px)";
34168
34167
  current.style.opacity = '1';
34169
34168
  };
@@ -34174,19 +34173,19 @@ var ItemTooltip = function ItemTooltip(_ref) {
34174
34173
  }
34175
34174
  return;
34176
34175
  }, []);
34177
- return React__default.createElement(Container$c, {
34176
+ return React__default.createElement(ModalPortal, null, React__default.createElement(Container$d, {
34178
34177
  ref: ref
34179
34178
  }, React__default.createElement(ItemInfoDisplay, {
34180
34179
  item: item,
34181
34180
  atlasIMG: atlasIMG,
34182
34181
  atlasJSON: atlasJSON,
34183
34182
  equipmentSet: equipmentSet
34184
- }));
34183
+ })));
34185
34184
  };
34186
- var Container$c = /*#__PURE__*/styled.div.withConfig({
34185
+ var Container$d = /*#__PURE__*/styled.div.withConfig({
34187
34186
  displayName: "ItemTooltip__Container",
34188
34187
  componentId: "sc-11d9r7x-0"
34189
- })(["position:fixed;z-index:50;pointer-events:none;left:0;top:0;opacity:0;"]);
34188
+ })(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
34190
34189
 
34191
34190
  var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
34192
34191
  var children = _ref.children,
@@ -34289,7 +34288,8 @@ var CraftBook = function CraftBook(_ref) {
34289
34288
  if (onClose) {
34290
34289
  onClose();
34291
34290
  }
34292
- }
34291
+ },
34292
+ scale: scale
34293
34293
  }, React__default.createElement("div", {
34294
34294
  style: {
34295
34295
  width: '100%'
@@ -34446,7 +34446,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
34446
34446
  onItemOutsideDrop = _ref.onItemOutsideDrop,
34447
34447
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34448
34448
  checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34449
- dragScale = _ref.dragScale;
34449
+ scale = _ref.scale;
34450
34450
  var neck = equipmentSet.neck,
34451
34451
  leftHand = equipmentSet.leftHand,
34452
34452
  ring = equipmentSet.ring,
@@ -34491,7 +34491,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
34491
34491
  onDragEnd: function onDragEnd(quantity) {
34492
34492
  if (onItemDragEnd) onItemDragEnd(quantity);
34493
34493
  },
34494
- dragScale: dragScale,
34494
+ dragScale: scale,
34495
34495
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34496
34496
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34497
34497
  onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
@@ -34512,7 +34512,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
34512
34512
  if (onClose) onClose();
34513
34513
  },
34514
34514
  width: "330px",
34515
- cancelDrag: ".equipment-container-body"
34515
+ cancelDrag: ".equipment-container-body",
34516
+ scale: scale
34516
34517
  }, React__default.createElement(EquipmentSetContainer, {
34517
34518
  className: "equipment-container-body"
34518
34519
  }, React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
@@ -34532,7 +34533,8 @@ var SlotsContainer = function SlotsContainer(_ref) {
34532
34533
  onClose = _ref.onClose,
34533
34534
  _onPositionChange = _ref.onPositionChange,
34534
34535
  onOutsideClick = _ref.onOutsideClick,
34535
- initialPosition = _ref.initialPosition;
34536
+ initialPosition = _ref.initialPosition,
34537
+ scale = _ref.scale;
34536
34538
  return React__default.createElement(DraggableContainer, {
34537
34539
  title: title,
34538
34540
  type: exports.RPGUIContainerTypes.Framed,
@@ -34554,7 +34556,8 @@ var SlotsContainer = function SlotsContainer(_ref) {
34554
34556
  }
34555
34557
  },
34556
34558
  onOutsideClick: onOutsideClick,
34557
- initialPosition: initialPosition
34559
+ initialPosition: initialPosition,
34560
+ scale: scale
34558
34561
  }, children);
34559
34562
  };
34560
34563
 
@@ -34746,7 +34749,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
34746
34749
  return word[0];
34747
34750
  }));
34748
34751
  };
34749
- return React__default.createElement(Container$d, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
34752
+ return React__default.createElement(Container$e, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
34750
34753
  id: "shortcuts_list"
34751
34754
  }, Array.from({
34752
34755
  length: 6
@@ -34762,7 +34765,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
34762
34765
  }, getContent(i));
34763
34766
  })));
34764
34767
  };
34765
- var Container$d = /*#__PURE__*/styled.div.withConfig({
34768
+ var Container$e = /*#__PURE__*/styled.div.withConfig({
34766
34769
  displayName: "ShortcutsSetter__Container",
34767
34770
  componentId: "sc-xuouuf-0"
34768
34771
  })(["p{margin:0;margin-left:0.5rem;}"]);
@@ -34796,7 +34799,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34796
34799
  checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
34797
34800
  initialPosition = _ref.initialPosition,
34798
34801
  checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
34799
- dragScale = _ref.dragScale,
34802
+ scale = _ref.scale,
34800
34803
  shortcuts = _ref.shortcuts,
34801
34804
  setItemShortcut = _ref.setItemShortcut,
34802
34805
  removeShortcut = _ref.removeShortcut,
@@ -34841,7 +34844,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34841
34844
  onDragEnd: function onDragEnd(quantity) {
34842
34845
  if (onItemDragEnd) onItemDragEnd(quantity);
34843
34846
  },
34844
- dragScale: dragScale,
34847
+ dragScale: scale,
34845
34848
  checkIfItemCanBeMoved: checkIfItemCanBeMoved,
34846
34849
  checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
34847
34850
  openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {
@@ -34868,7 +34871,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34868
34871
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(SlotsContainer, {
34869
34872
  title: itemContainer.name || 'Container',
34870
34873
  onClose: onClose,
34871
- initialPosition: initialPosition
34874
+ initialPosition: initialPosition,
34875
+ scale: scale
34872
34876
  }, type === shared.ItemContainerType.Inventory && shortcuts && removeShortcut && React__default.createElement(ShortcutsSetter, {
34873
34877
  setSettingShortcutIndex: setSettingShortcutIndex,
34874
34878
  settingShortcutIndex: settingShortcutIndex,
@@ -34878,7 +34882,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34878
34882
  atlasJSON: atlasJSON
34879
34883
  }), React__default.createElement(ItemsContainer, {
34880
34884
  className: "item-container-body"
34881
- }, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(QuantitySelectorContainer, null, React__default.createElement(ItemQuantitySelector, {
34885
+ }, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ModalPortal, null, React__default.createElement(QuantitySelectorContainer, null, React__default.createElement(ItemQuantitySelector, {
34882
34886
  quantity: quantitySelect.maxQuantity,
34883
34887
  onConfirm: function onConfirm(quantity) {
34884
34888
  quantitySelect.callback(quantity);
@@ -34896,7 +34900,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
34896
34900
  callback: function callback() {}
34897
34901
  });
34898
34902
  }
34899
- })));
34903
+ }))));
34900
34904
  };
34901
34905
  var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
34902
34906
  displayName: "ItemContainer__ItemsContainer",
@@ -34998,7 +35002,7 @@ var ListMenu = function ListMenu(_ref) {
34998
35002
  onSelected = _ref.onSelected,
34999
35003
  x = _ref.x,
35000
35004
  y = _ref.y;
35001
- return React__default.createElement(Container$e, {
35005
+ return React__default.createElement(Container$f, {
35002
35006
  x: x,
35003
35007
  y: y
35004
35008
  }, React__default.createElement("ul", {
@@ -35015,7 +35019,7 @@ var ListMenu = function ListMenu(_ref) {
35015
35019
  }, (params == null ? void 0 : params.text) || 'No text');
35016
35020
  })));
35017
35021
  };
35018
- var Container$e = /*#__PURE__*/styled.div.withConfig({
35022
+ var Container$f = /*#__PURE__*/styled.div.withConfig({
35019
35023
  displayName: "ListMenu__Container",
35020
35024
  componentId: "sc-i9097t-0"
35021
35025
  })(["display:flex;flex-direction:column;width:100%;justify-content:start;align-items:flex-start;position:absolute;top:", "px;left:", "px;li{font-size:", ";}"], function (props) {
@@ -35068,7 +35072,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
35068
35072
  type: exports.RPGUIContainerTypes.FramedGold,
35069
35073
  width: '50%',
35070
35074
  height: '180px'
35071
- }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$f, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
35075
+ }, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$g, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer, {
35072
35076
  flex: '70%'
35073
35077
  }, React__default.createElement(NPCDialogText, {
35074
35078
  onStartStep: function onStartStep() {
@@ -35110,7 +35114,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
35110
35114
  src: img$7
35111
35115
  }))), ")"));
35112
35116
  };
35113
- var Container$f = /*#__PURE__*/styled.div.withConfig({
35117
+ var Container$g = /*#__PURE__*/styled.div.withConfig({
35114
35118
  displayName: "NPCMultiDialog__Container",
35115
35119
  componentId: "sc-rvu5wg-0"
35116
35120
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
@@ -35314,7 +35318,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
35314
35318
  return null;
35315
35319
  });
35316
35320
  };
35317
- return React__default.createElement(Container$g, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
35321
+ return React__default.createElement(Container$h, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
35318
35322
  text: currentQuestion.text,
35319
35323
  onStart: function onStart() {
35320
35324
  return setCanShowAnswers(false);
@@ -35324,7 +35328,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
35324
35328
  }
35325
35329
  })), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
35326
35330
  };
35327
- var Container$g = /*#__PURE__*/styled.div.withConfig({
35331
+ var Container$h = /*#__PURE__*/styled.div.withConfig({
35328
35332
  displayName: "QuestionDialog__Container",
35329
35333
  componentId: "sc-bxc5u0-0"
35330
35334
  })(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
@@ -35370,7 +35374,7 @@ var ProgressBar = function ProgressBar(_ref) {
35370
35374
  }
35371
35375
  return value * 100 / max;
35372
35376
  };
35373
- return React__default.createElement(Container$h, {
35377
+ return React__default.createElement(Container$i, {
35374
35378
  className: "rpgui-progress",
35375
35379
  "data-value": calculatePercentageValue(max, value) / 100,
35376
35380
  "data-rpguitype": "progress",
@@ -35399,7 +35403,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
35399
35403
  displayName: "ProgressBar__TextOverlay",
35400
35404
  componentId: "sc-qa6fzh-1"
35401
35405
  })(["width:100%;position:relative;"]);
35402
- var Container$h = /*#__PURE__*/styled.div.withConfig({
35406
+ var Container$i = /*#__PURE__*/styled.div.withConfig({
35403
35407
  displayName: "ProgressBar__Container",
35404
35408
  componentId: "sc-qa6fzh-2"
35405
35409
  })(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
@@ -35416,7 +35420,8 @@ var QuestInfo = function QuestInfo(_ref) {
35416
35420
  var quests = _ref.quests,
35417
35421
  onClose = _ref.onClose,
35418
35422
  buttons = _ref.buttons,
35419
- onChangeQuest = _ref.onChangeQuest;
35423
+ onChangeQuest = _ref.onChangeQuest,
35424
+ scale = _ref.scale;
35420
35425
  var _useState = React.useState(0),
35421
35426
  currentIndex = _useState[0],
35422
35427
  setCurrentIndex = _useState[1];
@@ -35442,7 +35447,8 @@ var QuestInfo = function QuestInfo(_ref) {
35442
35447
  if (onClose) onClose();
35443
35448
  },
35444
35449
  width: "730px",
35445
- cancelDrag: ".equipment-container-body .arrow-selector"
35450
+ cancelDrag: ".equipment-container-body .arrow-selector",
35451
+ scale: scale
35446
35452
  }, quests.length >= 2 ? React__default.createElement(QuestsContainer, null, currentIndex !== 0 && React__default.createElement(SelectArrow, {
35447
35453
  direction: "left",
35448
35454
  onPointerDown: onLeftClick
@@ -35528,13 +35534,15 @@ var Thumbnail = /*#__PURE__*/styled.img.withConfig({
35528
35534
 
35529
35535
  var QuestList = function QuestList(_ref) {
35530
35536
  var quests = _ref.quests,
35531
- onClose = _ref.onClose;
35537
+ onClose = _ref.onClose,
35538
+ scale = _ref.scale;
35532
35539
  return React__default.createElement(QuestDraggableContainer$1, {
35533
35540
  type: exports.RPGUIContainerTypes.Framed,
35534
35541
  onCloseButton: function onCloseButton() {
35535
35542
  if (onClose) onClose();
35536
35543
  },
35537
- width: "520px"
35544
+ width: "520px",
35545
+ scale: scale
35538
35546
  }, React__default.createElement("div", {
35539
35547
  style: {
35540
35548
  width: '100%'
@@ -35720,7 +35728,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
35720
35728
  bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
35721
35729
  _ref$margin = _ref.margin,
35722
35730
  margin = _ref$margin === void 0 ? 20 : _ref$margin;
35723
- return React__default.createElement(Container$i, {
35731
+ return React__default.createElement(Container$j, {
35724
35732
  className: "simple-progress-bar"
35725
35733
  }, React__default.createElement(ProgressBarContainer, {
35726
35734
  margin: margin
@@ -35729,7 +35737,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
35729
35737
  bgColor: bgColor
35730
35738
  }))));
35731
35739
  };
35732
- var Container$i = /*#__PURE__*/styled.div.withConfig({
35740
+ var Container$j = /*#__PURE__*/styled.div.withConfig({
35733
35741
  displayName: "SimpleProgressBar__Container",
35734
35742
  componentId: "sc-mbeil3-0"
35735
35743
  })(["display:flex;justify-content:center;align-items:center;width:100%;"]);
@@ -35878,7 +35886,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
35878
35886
  var onCloseButton = _ref.onCloseButton,
35879
35887
  skill = _ref.skill,
35880
35888
  atlasIMG = _ref.atlasIMG,
35881
- atlasJSON = _ref.atlasJSON;
35889
+ atlasJSON = _ref.atlasJSON,
35890
+ scale = _ref.scale;
35882
35891
  var onRenderSkillCategory = function onRenderSkillCategory(category) {
35883
35892
  var skillCategory = skillProps[category];
35884
35893
  var skillCategoryColor = skillCategory.color;
@@ -35905,7 +35914,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
35905
35914
  };
35906
35915
  return React__default.createElement(SkillsDraggableContainer, {
35907
35916
  title: "Skills",
35908
- cancelDrag: "#skillsDiv"
35917
+ cancelDrag: "#skillsDiv",
35918
+ scale: scale
35909
35919
  }, onCloseButton && React__default.createElement(CloseButton$3, {
35910
35920
  onPointerDown: onCloseButton
35911
35921
  }, "X"), React__default.createElement(SkillsContainerDiv, {
@@ -35958,7 +35968,7 @@ var Spell = function Spell(_ref) {
35958
35968
  isSettingShortcut = _ref.isSettingShortcut,
35959
35969
  minMagicLevelRequired = _ref.minMagicLevelRequired;
35960
35970
  var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
35961
- return React__default.createElement(Container$j, {
35971
+ return React__default.createElement(Container$k, {
35962
35972
  disabled: disabled,
35963
35973
  onPointerDown: onPointerDown == null ? void 0 : onPointerDown.bind(null, spellKey),
35964
35974
  isSettingShortcut: isSettingShortcut && !disabled,
@@ -35971,7 +35981,7 @@ var Spell = function Spell(_ref) {
35971
35981
  className: "mana"
35972
35982
  }, manaCost)));
35973
35983
  };
35974
- var Container$j = /*#__PURE__*/styled.button.withConfig({
35984
+ var Container$k = /*#__PURE__*/styled.button.withConfig({
35975
35985
  displayName: "Spell__Container",
35976
35986
  componentId: "sc-j96fa2-0"
35977
35987
  })(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;height:5rem;gap:1rem;align-items:center;padding:0 1rem;text-align:left;position:relative;animation:", ";@keyframes border-color-change{0%{border-color:", ";}50%{border-color:transparent;}100%{border-color:", ";}}&:hover,&:focus{background-color:", ";}&:active{background:none;}"], function (_ref2) {
@@ -36019,7 +36029,8 @@ var Spellbook = function Spellbook(_ref) {
36019
36029
  shortcuts = _ref.shortcuts,
36020
36030
  removeShortcut = _ref.removeShortcut,
36021
36031
  atlasIMG = _ref.atlasIMG,
36022
- atlasJSON = _ref.atlasJSON;
36032
+ atlasJSON = _ref.atlasJSON,
36033
+ scale = _ref.scale;
36023
36034
  var _useState = React.useState(''),
36024
36035
  search = _useState[0],
36025
36036
  setSearch = _useState[1];
@@ -36055,8 +36066,9 @@ var Spellbook = function Spellbook(_ref) {
36055
36066
  onCloseButton: onClose,
36056
36067
  width: "inherit",
36057
36068
  height: "inherit",
36058
- cancelDrag: "#spellbook-search, #shortcuts_list, .spell"
36059
- }, React__default.createElement(Container$k, null, React__default.createElement(Title$7, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
36069
+ cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
36070
+ scale: scale
36071
+ }, React__default.createElement(Container$l, null, React__default.createElement(Title$7, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
36060
36072
  setSettingShortcutIndex: setSettingShortcutIndex,
36061
36073
  settingShortcutIndex: settingShortcutIndex,
36062
36074
  shortcuts: shortcuts,
@@ -36088,7 +36100,7 @@ var Title$7 = /*#__PURE__*/styled.h1.withConfig({
36088
36100
  displayName: "Spellbook__Title",
36089
36101
  componentId: "sc-r02nfq-0"
36090
36102
  })(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
36091
- var Container$k = /*#__PURE__*/styled.div.withConfig({
36103
+ var Container$l = /*#__PURE__*/styled.div.withConfig({
36092
36104
  displayName: "Spellbook__Container",
36093
36105
  componentId: "sc-r02nfq-1"
36094
36106
  })(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
@@ -36126,8 +36138,11 @@ var img$c = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHMAAABHCAYAAAA0qHhdA
36126
36138
  var TimeWidget = function TimeWidget(_ref) {
36127
36139
  var onClose = _ref.onClose,
36128
36140
  TimeClock = _ref.TimeClock,
36129
- periodOfDay = _ref.periodOfDay;
36130
- return React__default.createElement(Draggable, null, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$4, {
36141
+ periodOfDay = _ref.periodOfDay,
36142
+ scale = _ref.scale;
36143
+ return React__default.createElement(Draggable, {
36144
+ scale: scale
36145
+ }, React__default.createElement(WidgetContainer, null, React__default.createElement(CloseButton$4, {
36131
36146
  onPointerDown: onClose
36132
36147
  }, "X"), React__default.createElement(DayNightContainer, null, React__default.createElement(DayNightPeriod, {
36133
36148
  periodOfDay: periodOfDay
@@ -36315,7 +36330,8 @@ var TradingMenu = function TradingMenu(_ref) {
36315
36330
  if (onClose) onClose();
36316
36331
  },
36317
36332
  width: "600px",
36318
- cancelDrag: "#TraderContainer"
36333
+ cancelDrag: "#TraderContainer",
36334
+ scale: scale
36319
36335
  }, React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
36320
36336
  style: {
36321
36337
  width: '100%'
@@ -36384,11 +36400,11 @@ var Truncate = function Truncate(_ref) {
36384
36400
  var _ref$maxLines = _ref.maxLines,
36385
36401
  maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
36386
36402
  children = _ref.children;
36387
- return React__default.createElement(Container$l, {
36403
+ return React__default.createElement(Container$m, {
36388
36404
  maxLines: maxLines
36389
36405
  }, children);
36390
36406
  };
36391
- var Container$l = /*#__PURE__*/styled.div.withConfig({
36407
+ var Container$m = /*#__PURE__*/styled.div.withConfig({
36392
36408
  displayName: "Truncate__Container",
36393
36409
  componentId: "sc-6x00qb-0"
36394
36410
  })(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
@@ -36451,7 +36467,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
36451
36467
  var _useState2 = React.useState(false),
36452
36468
  showGoNextIndicator = _useState2[0],
36453
36469
  setShowGoNextIndicator = _useState2[1];
36454
- return React__default.createElement(Container$m, null, React__default.createElement(DynamicText, {
36470
+ return React__default.createElement(Container$n, null, React__default.createElement(DynamicText, {
36455
36471
  text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
36456
36472
  onFinish: function onFinish() {
36457
36473
  setShowGoNextIndicator(true);
@@ -36469,7 +36485,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
36469
36485
  }
36470
36486
  }));
36471
36487
  };
36472
- var Container$m = /*#__PURE__*/styled.div.withConfig({
36488
+ var Container$n = /*#__PURE__*/styled.div.withConfig({
36473
36489
  displayName: "NPCDialogText__Container",
36474
36490
  componentId: "sc-1cxkdh9-0"
36475
36491
  })([""]);
@@ -36510,7 +36526,7 @@ var NPCDialog = function NPCDialog(_ref) {
36510
36526
  }
36511
36527
  })), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer$1, null, React__default.createElement(NPCThumbnail$1, {
36512
36528
  src: imagePath || img$6
36513
- }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$n, null, React__default.createElement(TextContainer$2, {
36529
+ }))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$o, null, React__default.createElement(TextContainer$2, {
36514
36530
  flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
36515
36531
  }, React__default.createElement(NPCDialogText, {
36516
36532
  type: type,
@@ -36524,7 +36540,7 @@ var NPCDialog = function NPCDialog(_ref) {
36524
36540
  src: imagePath || img$6
36525
36541
  })))));
36526
36542
  };
36527
- var Container$n = /*#__PURE__*/styled.div.withConfig({
36543
+ var Container$o = /*#__PURE__*/styled.div.withConfig({
36528
36544
  displayName: "NPCDialog__Container",
36529
36545
  componentId: "sc-1b4aw74-0"
36530
36546
  })(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);