@rpg-engine/long-bow 0.3.80 → 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.
- package/dist/components/Abstractions/ModalPortal.d.ts +6 -0
- package/dist/long-bow.cjs.development.js +64 -67
- 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 +64 -67
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Abstractions/ModalPortal.tsx +22 -0
- package/src/components/Item/Cards/ItemInfo.tsx +1 -1
- package/src/components/Item/Cards/ItemTooltip.tsx +20 -22
- package/src/components/Item/Cards/MobileItemTooltip.tsx +70 -55
- package/src/components/Item/Inventory/ItemContainer.tsx +24 -21
- package/src/components/Item/Inventory/ItemSlot.tsx +3 -1
- 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');
|
|
@@ -33365,6 +33366,18 @@ var DropdownOptions = /*#__PURE__*/styled.ul.withConfig({
|
|
|
33365
33366
|
return props.opened ? 'block' : 'none';
|
|
33366
33367
|
});
|
|
33367
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
|
+
|
|
33368
33381
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
33369
33382
|
var options = _ref.options,
|
|
33370
33383
|
onSelected = _ref.onSelected,
|
|
@@ -33386,7 +33399,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
33386
33399
|
document.removeEventListener('clickOutside', function (_e) {});
|
|
33387
33400
|
};
|
|
33388
33401
|
}, []);
|
|
33389
|
-
return React__default.createElement(Container$
|
|
33402
|
+
return React__default.createElement(Container$9, {
|
|
33390
33403
|
fontSize: fontSize,
|
|
33391
33404
|
ref: ref
|
|
33392
33405
|
}, React__default.createElement("ul", {
|
|
@@ -33403,7 +33416,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
33403
33416
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
33404
33417
|
})));
|
|
33405
33418
|
};
|
|
33406
|
-
var Container$
|
|
33419
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
33407
33420
|
displayName: "RelativeListMenu__Container",
|
|
33408
33421
|
componentId: "sc-7hohf-0"
|
|
33409
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) {
|
|
@@ -33425,24 +33438,17 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
33425
33438
|
options = _ref.options,
|
|
33426
33439
|
onSelected = _ref.onSelected;
|
|
33427
33440
|
var ref = React.useRef(null);
|
|
33428
|
-
|
|
33429
|
-
var current
|
|
33430
|
-
|
|
33431
|
-
|
|
33432
|
-
|
|
33433
|
-
var x = -rect.x * 100 / (scale * 100);
|
|
33434
|
-
var y = -rect.y * 100 / (scale * 100);
|
|
33435
|
-
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
33436
|
-
current.style.opacity = '0.92';
|
|
33437
|
-
}
|
|
33438
|
-
return;
|
|
33439
|
-
}, []);
|
|
33440
|
-
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, {
|
|
33441
33446
|
ref: ref,
|
|
33442
33447
|
onTouchEnd: function onTouchEnd() {
|
|
33448
|
+
handleFadeOut();
|
|
33443
33449
|
setTimeout(function () {
|
|
33444
33450
|
closeTooltip();
|
|
33445
|
-
},
|
|
33451
|
+
}, 100);
|
|
33446
33452
|
},
|
|
33447
33453
|
scale: scale
|
|
33448
33454
|
}, React__default.createElement(ItemInfoDisplay, {
|
|
@@ -33455,24 +33461,19 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
33455
33461
|
return React__default.createElement(Option, {
|
|
33456
33462
|
key: option.id,
|
|
33457
33463
|
onTouchEnd: function onTouchEnd() {
|
|
33464
|
+
handleFadeOut();
|
|
33458
33465
|
setTimeout(function () {
|
|
33459
33466
|
onSelected == null ? void 0 : onSelected(option.id);
|
|
33460
33467
|
closeTooltip();
|
|
33461
|
-
},
|
|
33468
|
+
}, 100);
|
|
33462
33469
|
}
|
|
33463
33470
|
}, option.text);
|
|
33464
|
-
})));
|
|
33471
|
+
}))));
|
|
33465
33472
|
};
|
|
33466
|
-
var Container$
|
|
33473
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
33467
33474
|
displayName: "MobileItemTooltip__Container",
|
|
33468
33475
|
componentId: "sc-ku4p1j-0"
|
|
33469
|
-
})(["position:
|
|
33470
|
-
var scale = _ref2.scale;
|
|
33471
|
-
return "calc(100vw * 100 / " + scale * 100 + ")";
|
|
33472
|
-
}, function (_ref3) {
|
|
33473
|
-
var scale = _ref3.scale;
|
|
33474
|
-
return "calc(100vh * 100 / " + scale * 100 + ")";
|
|
33475
|
-
});
|
|
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;}"]);
|
|
33476
33477
|
var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
33477
33478
|
displayName: "MobileItemTooltip__OptionsContainer",
|
|
33478
33479
|
componentId: "sc-ku4p1j-1"
|
|
@@ -33480,7 +33481,7 @@ var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
33480
33481
|
var Option = /*#__PURE__*/styled.button.withConfig({
|
|
33481
33482
|
displayName: "MobileItemTooltip__Option",
|
|
33482
33483
|
componentId: "sc-ku4p1j-2"
|
|
33483
|
-
})(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.
|
|
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;}"]);
|
|
33484
33485
|
|
|
33485
33486
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
33486
33487
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
@@ -33675,7 +33676,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
33675
33676
|
maxWidth: "48px"
|
|
33676
33677
|
}, React__default.createElement(ItemQty, {
|
|
33677
33678
|
className: qtyClassName
|
|
33678
|
-
},
|
|
33679
|
+
}, Math.round(stackQty * 100) / 100, ' ')));
|
|
33679
33680
|
}
|
|
33680
33681
|
return undefined;
|
|
33681
33682
|
};
|
|
@@ -33769,7 +33770,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
33769
33770
|
onDragEnd(quantity);
|
|
33770
33771
|
}
|
|
33771
33772
|
};
|
|
33772
|
-
return React__default.createElement(Container$
|
|
33773
|
+
return React__default.createElement(Container$b, {
|
|
33773
33774
|
item: item,
|
|
33774
33775
|
className: "rpgui-icon empty-slot",
|
|
33775
33776
|
onMouseUp: function onMouseUp() {
|
|
@@ -33920,7 +33921,7 @@ var rarityColor = function rarityColor(item) {
|
|
|
33920
33921
|
return null;
|
|
33921
33922
|
}
|
|
33922
33923
|
};
|
|
33923
|
-
var Container$
|
|
33924
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
33924
33925
|
displayName: "ItemSlot__Container",
|
|
33925
33926
|
componentId: "sc-l2j5ef-0"
|
|
33926
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) {
|
|
@@ -34031,13 +34032,13 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
34031
34032
|
}));
|
|
34032
34033
|
});
|
|
34033
34034
|
};
|
|
34034
|
-
return React__default.createElement(Container$
|
|
34035
|
+
return React__default.createElement(Container$c, {
|
|
34035
34036
|
item: item
|
|
34036
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, {
|
|
34037
34038
|
item: item
|
|
34038
|
-
}, 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()));
|
|
34039
34040
|
};
|
|
34040
|
-
var Container$
|
|
34041
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
34041
34042
|
displayName: "ItemInfo__Container",
|
|
34042
34043
|
componentId: "sc-1xm4q8k-0"
|
|
34043
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) {
|
|
@@ -34150,22 +34151,18 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
34150
34151
|
var ref = React.useRef(null);
|
|
34151
34152
|
React.useEffect(function () {
|
|
34152
34153
|
var current = ref.current;
|
|
34153
|
-
var initialOffset;
|
|
34154
34154
|
if (current) {
|
|
34155
34155
|
var handleMouseMove = function handleMouseMove(event) {
|
|
34156
34156
|
var clientX = event.clientX,
|
|
34157
34157
|
clientY = event.clientY;
|
|
34158
34158
|
// Adjust the position of the tooltip based on the mouse position
|
|
34159
34159
|
var rect = current.getBoundingClientRect();
|
|
34160
|
-
if (!initialOffset) {
|
|
34161
|
-
initialOffset = rect;
|
|
34162
|
-
}
|
|
34163
34160
|
var tooltipWidth = rect.width;
|
|
34164
34161
|
var tooltipHeight = rect.height;
|
|
34165
34162
|
var isOffScreenRight = clientX + tooltipWidth + offset > window.innerWidth;
|
|
34166
34163
|
var isOffScreenBottom = clientY + tooltipHeight + offset > window.innerHeight;
|
|
34167
|
-
var x =
|
|
34168
|
-
var y =
|
|
34164
|
+
var x = isOffScreenRight ? clientX - tooltipWidth - offset : clientX + offset;
|
|
34165
|
+
var y = isOffScreenBottom ? clientY - tooltipHeight - offset : clientY + offset;
|
|
34169
34166
|
current.style.transform = "translate(" + x + "px, " + y + "px)";
|
|
34170
34167
|
current.style.opacity = '1';
|
|
34171
34168
|
};
|
|
@@ -34176,19 +34173,19 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
34176
34173
|
}
|
|
34177
34174
|
return;
|
|
34178
34175
|
}, []);
|
|
34179
|
-
return React__default.createElement(Container$
|
|
34176
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$d, {
|
|
34180
34177
|
ref: ref
|
|
34181
34178
|
}, React__default.createElement(ItemInfoDisplay, {
|
|
34182
34179
|
item: item,
|
|
34183
34180
|
atlasIMG: atlasIMG,
|
|
34184
34181
|
atlasJSON: atlasJSON,
|
|
34185
34182
|
equipmentSet: equipmentSet
|
|
34186
|
-
}));
|
|
34183
|
+
})));
|
|
34187
34184
|
};
|
|
34188
|
-
var Container$
|
|
34185
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
34189
34186
|
displayName: "ItemTooltip__Container",
|
|
34190
34187
|
componentId: "sc-11d9r7x-0"
|
|
34191
|
-
})(["position:
|
|
34188
|
+
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
34192
34189
|
|
|
34193
34190
|
var ItemInfoWrapper = function ItemInfoWrapper(_ref) {
|
|
34194
34191
|
var children = _ref.children,
|
|
@@ -34752,7 +34749,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34752
34749
|
return word[0];
|
|
34753
34750
|
}));
|
|
34754
34751
|
};
|
|
34755
|
-
return React__default.createElement(Container$
|
|
34752
|
+
return React__default.createElement(Container$e, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
|
|
34756
34753
|
id: "shortcuts_list"
|
|
34757
34754
|
}, Array.from({
|
|
34758
34755
|
length: 6
|
|
@@ -34768,7 +34765,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
34768
34765
|
}, getContent(i));
|
|
34769
34766
|
})));
|
|
34770
34767
|
};
|
|
34771
|
-
var Container$
|
|
34768
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
34772
34769
|
displayName: "ShortcutsSetter__Container",
|
|
34773
34770
|
componentId: "sc-xuouuf-0"
|
|
34774
34771
|
})(["p{margin:0;margin-left:0.5rem;}"]);
|
|
@@ -34885,7 +34882,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34885
34882
|
atlasJSON: atlasJSON
|
|
34886
34883
|
}), React__default.createElement(ItemsContainer, {
|
|
34887
34884
|
className: "item-container-body"
|
|
34888
|
-
}, 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, {
|
|
34889
34886
|
quantity: quantitySelect.maxQuantity,
|
|
34890
34887
|
onConfirm: function onConfirm(quantity) {
|
|
34891
34888
|
quantitySelect.callback(quantity);
|
|
@@ -34903,7 +34900,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34903
34900
|
callback: function callback() {}
|
|
34904
34901
|
});
|
|
34905
34902
|
}
|
|
34906
|
-
})));
|
|
34903
|
+
}))));
|
|
34907
34904
|
};
|
|
34908
34905
|
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
34909
34906
|
displayName: "ItemContainer__ItemsContainer",
|
|
@@ -35005,7 +35002,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
35005
35002
|
onSelected = _ref.onSelected,
|
|
35006
35003
|
x = _ref.x,
|
|
35007
35004
|
y = _ref.y;
|
|
35008
|
-
return React__default.createElement(Container$
|
|
35005
|
+
return React__default.createElement(Container$f, {
|
|
35009
35006
|
x: x,
|
|
35010
35007
|
y: y
|
|
35011
35008
|
}, React__default.createElement("ul", {
|
|
@@ -35022,7 +35019,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
35022
35019
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
35023
35020
|
})));
|
|
35024
35021
|
};
|
|
35025
|
-
var Container$
|
|
35022
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
35026
35023
|
displayName: "ListMenu__Container",
|
|
35027
35024
|
componentId: "sc-i9097t-0"
|
|
35028
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) {
|
|
@@ -35075,7 +35072,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
35075
35072
|
type: exports.RPGUIContainerTypes.FramedGold,
|
|
35076
35073
|
width: '50%',
|
|
35077
35074
|
height: '180px'
|
|
35078
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
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, {
|
|
35079
35076
|
flex: '70%'
|
|
35080
35077
|
}, React__default.createElement(NPCDialogText, {
|
|
35081
35078
|
onStartStep: function onStartStep() {
|
|
@@ -35117,7 +35114,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
35117
35114
|
src: img$7
|
|
35118
35115
|
}))), ")"));
|
|
35119
35116
|
};
|
|
35120
|
-
var Container$
|
|
35117
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
35121
35118
|
displayName: "NPCMultiDialog__Container",
|
|
35122
35119
|
componentId: "sc-rvu5wg-0"
|
|
35123
35120
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -35321,7 +35318,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
35321
35318
|
return null;
|
|
35322
35319
|
});
|
|
35323
35320
|
};
|
|
35324
|
-
return React__default.createElement(Container$
|
|
35321
|
+
return React__default.createElement(Container$h, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
|
|
35325
35322
|
text: currentQuestion.text,
|
|
35326
35323
|
onStart: function onStart() {
|
|
35327
35324
|
return setCanShowAnswers(false);
|
|
@@ -35331,7 +35328,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
35331
35328
|
}
|
|
35332
35329
|
})), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
35333
35330
|
};
|
|
35334
|
-
var Container$
|
|
35331
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
35335
35332
|
displayName: "QuestionDialog__Container",
|
|
35336
35333
|
componentId: "sc-bxc5u0-0"
|
|
35337
35334
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -35377,7 +35374,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
35377
35374
|
}
|
|
35378
35375
|
return value * 100 / max;
|
|
35379
35376
|
};
|
|
35380
|
-
return React__default.createElement(Container$
|
|
35377
|
+
return React__default.createElement(Container$i, {
|
|
35381
35378
|
className: "rpgui-progress",
|
|
35382
35379
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
35383
35380
|
"data-rpguitype": "progress",
|
|
@@ -35406,7 +35403,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
35406
35403
|
displayName: "ProgressBar__TextOverlay",
|
|
35407
35404
|
componentId: "sc-qa6fzh-1"
|
|
35408
35405
|
})(["width:100%;position:relative;"]);
|
|
35409
|
-
var Container$
|
|
35406
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
35410
35407
|
displayName: "ProgressBar__Container",
|
|
35411
35408
|
componentId: "sc-qa6fzh-2"
|
|
35412
35409
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", ""], function (props) {
|
|
@@ -35731,7 +35728,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35731
35728
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
35732
35729
|
_ref$margin = _ref.margin,
|
|
35733
35730
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
35734
|
-
return React__default.createElement(Container$
|
|
35731
|
+
return React__default.createElement(Container$j, {
|
|
35735
35732
|
className: "simple-progress-bar"
|
|
35736
35733
|
}, React__default.createElement(ProgressBarContainer, {
|
|
35737
35734
|
margin: margin
|
|
@@ -35740,7 +35737,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
35740
35737
|
bgColor: bgColor
|
|
35741
35738
|
}))));
|
|
35742
35739
|
};
|
|
35743
|
-
var Container$
|
|
35740
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
35744
35741
|
displayName: "SimpleProgressBar__Container",
|
|
35745
35742
|
componentId: "sc-mbeil3-0"
|
|
35746
35743
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -35971,7 +35968,7 @@ var Spell = function Spell(_ref) {
|
|
|
35971
35968
|
isSettingShortcut = _ref.isSettingShortcut,
|
|
35972
35969
|
minMagicLevelRequired = _ref.minMagicLevelRequired;
|
|
35973
35970
|
var disabled = isSettingShortcut ? charMagicLevel < minMagicLevelRequired : manaCost > charMana || charMagicLevel < minMagicLevelRequired;
|
|
35974
|
-
return React__default.createElement(Container$
|
|
35971
|
+
return React__default.createElement(Container$k, {
|
|
35975
35972
|
disabled: disabled,
|
|
35976
35973
|
onPointerDown: onPointerDown == null ? void 0 : onPointerDown.bind(null, spellKey),
|
|
35977
35974
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
@@ -35984,7 +35981,7 @@ var Spell = function Spell(_ref) {
|
|
|
35984
35981
|
className: "mana"
|
|
35985
35982
|
}, manaCost)));
|
|
35986
35983
|
};
|
|
35987
|
-
var Container$
|
|
35984
|
+
var Container$k = /*#__PURE__*/styled.button.withConfig({
|
|
35988
35985
|
displayName: "Spell__Container",
|
|
35989
35986
|
componentId: "sc-j96fa2-0"
|
|
35990
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) {
|
|
@@ -36071,7 +36068,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
36071
36068
|
height: "inherit",
|
|
36072
36069
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
36073
36070
|
scale: scale
|
|
36074
|
-
}, React__default.createElement(Container$
|
|
36071
|
+
}, React__default.createElement(Container$l, null, React__default.createElement(Title$7, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
36075
36072
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
36076
36073
|
settingShortcutIndex: settingShortcutIndex,
|
|
36077
36074
|
shortcuts: shortcuts,
|
|
@@ -36103,7 +36100,7 @@ var Title$7 = /*#__PURE__*/styled.h1.withConfig({
|
|
|
36103
36100
|
displayName: "Spellbook__Title",
|
|
36104
36101
|
componentId: "sc-r02nfq-0"
|
|
36105
36102
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
36106
|
-
var Container$
|
|
36103
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
36107
36104
|
displayName: "Spellbook__Container",
|
|
36108
36105
|
componentId: "sc-r02nfq-1"
|
|
36109
36106
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -36403,11 +36400,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
36403
36400
|
var _ref$maxLines = _ref.maxLines,
|
|
36404
36401
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
36405
36402
|
children = _ref.children;
|
|
36406
|
-
return React__default.createElement(Container$
|
|
36403
|
+
return React__default.createElement(Container$m, {
|
|
36407
36404
|
maxLines: maxLines
|
|
36408
36405
|
}, children);
|
|
36409
36406
|
};
|
|
36410
|
-
var Container$
|
|
36407
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
36411
36408
|
displayName: "Truncate__Container",
|
|
36412
36409
|
componentId: "sc-6x00qb-0"
|
|
36413
36410
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|
|
@@ -36470,7 +36467,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
36470
36467
|
var _useState2 = React.useState(false),
|
|
36471
36468
|
showGoNextIndicator = _useState2[0],
|
|
36472
36469
|
setShowGoNextIndicator = _useState2[1];
|
|
36473
|
-
return React__default.createElement(Container$
|
|
36470
|
+
return React__default.createElement(Container$n, null, React__default.createElement(DynamicText, {
|
|
36474
36471
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
36475
36472
|
onFinish: function onFinish() {
|
|
36476
36473
|
setShowGoNextIndicator(true);
|
|
@@ -36488,7 +36485,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
36488
36485
|
}
|
|
36489
36486
|
}));
|
|
36490
36487
|
};
|
|
36491
|
-
var Container$
|
|
36488
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
36492
36489
|
displayName: "NPCDialogText__Container",
|
|
36493
36490
|
componentId: "sc-1cxkdh9-0"
|
|
36494
36491
|
})([""]);
|
|
@@ -36529,7 +36526,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
36529
36526
|
}
|
|
36530
36527
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer$1, null, React__default.createElement(NPCThumbnail$1, {
|
|
36531
36528
|
src: imagePath || img$6
|
|
36532
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
36529
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$o, null, React__default.createElement(TextContainer$2, {
|
|
36533
36530
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
36534
36531
|
}, React__default.createElement(NPCDialogText, {
|
|
36535
36532
|
type: type,
|
|
@@ -36543,7 +36540,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
36543
36540
|
src: imagePath || img$6
|
|
36544
36541
|
})))));
|
|
36545
36542
|
};
|
|
36546
|
-
var Container$
|
|
36543
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
36547
36544
|
displayName: "NPCDialog__Container",
|
|
36548
36545
|
componentId: "sc-1b4aw74-0"
|
|
36549
36546
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|