@rpg-engine/long-bow 0.5.21 → 0.5.23
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/SlotsContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/DraggedItem.d.ts +7 -0
- package/dist/components/Item/Inventory/ItemQuantitySelectorModal.d.ts +12 -0
- package/dist/components/Item/Inventory/ItemSlotQty/ItemSlotQty.d.ts +9 -0
- package/dist/components/Item/Inventory/ItemSlotRenderer.d.ts +11 -0
- package/dist/components/Item/Inventory/ItemSlotTooltips.d.ts +24 -0
- package/dist/components/Item/Inventory/context/DraggingContext.d.ts +11 -0
- package/dist/hooks/useMousePosition.d.ts +6 -0
- package/dist/long-bow.cjs.development.js +449 -275
- 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 +450 -276
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Abstractions/SlotsContainer.tsx +3 -1
- package/src/components/Equipment/EquipmentSet.tsx +24 -19
- package/src/components/Item/Inventory/DraggedItem.tsx +107 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +11 -41
- package/src/components/Item/Inventory/ItemQuantitySelectorModal.tsx +59 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +50 -211
- package/src/components/Item/Inventory/ItemSlotQty/ItemSlotQty.tsx +70 -0
- package/src/components/Item/Inventory/ItemSlotRenderer.tsx +92 -0
- package/src/components/Item/Inventory/ItemSlotTooltips.tsx +93 -0
- package/src/components/Item/Inventory/context/DraggingContext.tsx +26 -0
- package/src/hooks/useMousePosition.ts +49 -0
|
@@ -13391,6 +13391,101 @@ var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
|
13391
13391
|
componentId: "sc-dgmp04-0"
|
|
13392
13392
|
})(["position:static !important;"]);
|
|
13393
13393
|
|
|
13394
|
+
var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
|
|
13395
|
+
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
13396
|
+
var isLargerThan999 = stackQty > 999;
|
|
13397
|
+
var qtyClassName = 'regular';
|
|
13398
|
+
if (isLargerThan999) qtyClassName = 'small';
|
|
13399
|
+
if (isFractionalStackQty) qtyClassName = 'xsmall';
|
|
13400
|
+
if (stackQty > 1) {
|
|
13401
|
+
return React__default.createElement(ItemSlotQty, {
|
|
13402
|
+
itemId: itemId,
|
|
13403
|
+
stackQty: stackQty,
|
|
13404
|
+
qtyClassName: qtyClassName
|
|
13405
|
+
});
|
|
13406
|
+
}
|
|
13407
|
+
return undefined;
|
|
13408
|
+
};
|
|
13409
|
+
var ItemSlotQty = function ItemSlotQty(_ref) {
|
|
13410
|
+
var itemId = _ref.itemId,
|
|
13411
|
+
stackQty = _ref.stackQty,
|
|
13412
|
+
qtyClassName = _ref.qtyClassName;
|
|
13413
|
+
return React__default.createElement(ItemQtyContainer, {
|
|
13414
|
+
key: "qty-" + itemId,
|
|
13415
|
+
className: "item-slot-qty"
|
|
13416
|
+
}, React__default.createElement(Ellipsis, {
|
|
13417
|
+
maxLines: 1,
|
|
13418
|
+
maxWidth: "48px"
|
|
13419
|
+
}, React__default.createElement(ItemQty, {
|
|
13420
|
+
className: qtyClassName
|
|
13421
|
+
}, Math.round(stackQty * 100) / 100, ' ')));
|
|
13422
|
+
};
|
|
13423
|
+
var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13424
|
+
displayName: "ItemSlotQty__ItemQtyContainer",
|
|
13425
|
+
componentId: "sc-keb1s5-0"
|
|
13426
|
+
})(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
|
|
13427
|
+
var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
13428
|
+
displayName: "ItemSlotQty__ItemQty",
|
|
13429
|
+
componentId: "sc-keb1s5-1"
|
|
13430
|
+
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
13431
|
+
|
|
13432
|
+
var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
|
|
13433
|
+
var containerType = _ref.containerType,
|
|
13434
|
+
atlasJSON = _ref.atlasJSON,
|
|
13435
|
+
atlasIMG = _ref.atlasIMG,
|
|
13436
|
+
slotSpriteMask = _ref.slotSpriteMask,
|
|
13437
|
+
item = _ref.item;
|
|
13438
|
+
var renderItem = function renderItem(itemToRender) {
|
|
13439
|
+
var _itemToRender$stackQt;
|
|
13440
|
+
if (!(itemToRender != null && itemToRender.texturePath)) {
|
|
13441
|
+
return null;
|
|
13442
|
+
}
|
|
13443
|
+
return React__default.createElement(ErrorBoundary, {
|
|
13444
|
+
key: itemToRender._id
|
|
13445
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
13446
|
+
atlasIMG: atlasIMG,
|
|
13447
|
+
atlasJSON: atlasJSON,
|
|
13448
|
+
spriteKey: shared.getItemTextureKeyPath({
|
|
13449
|
+
key: itemToRender.texturePath,
|
|
13450
|
+
texturePath: itemToRender.texturePath,
|
|
13451
|
+
stackQty: itemToRender.stackQty || 1,
|
|
13452
|
+
isStackable: itemToRender.isStackable
|
|
13453
|
+
}, atlasJSON),
|
|
13454
|
+
imgScale: 3,
|
|
13455
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
13456
|
+
}), onRenderStackInfo(itemToRender._id, (_itemToRender$stackQt = itemToRender.stackQty) != null ? _itemToRender$stackQt : 0));
|
|
13457
|
+
};
|
|
13458
|
+
var renderEquipment = function renderEquipment(itemToRender) {
|
|
13459
|
+
var _itemToRender$allowed;
|
|
13460
|
+
if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
|
|
13461
|
+
return React__default.createElement(ErrorBoundary, {
|
|
13462
|
+
key: uuid.v4()
|
|
13463
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
13464
|
+
key: uuid.v4(),
|
|
13465
|
+
atlasIMG: atlasIMG,
|
|
13466
|
+
atlasJSON: atlasJSON,
|
|
13467
|
+
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
13468
|
+
imgScale: 3,
|
|
13469
|
+
grayScale: true,
|
|
13470
|
+
opacity: 0.4,
|
|
13471
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
13472
|
+
}));
|
|
13473
|
+
}
|
|
13474
|
+
return renderItem(itemToRender);
|
|
13475
|
+
};
|
|
13476
|
+
var onRenderSlot = function onRenderSlot(itemToRender) {
|
|
13477
|
+
switch (containerType) {
|
|
13478
|
+
case shared.ItemContainerType.Equipment:
|
|
13479
|
+
return renderEquipment(itemToRender);
|
|
13480
|
+
case shared.ItemContainerType.Inventory:
|
|
13481
|
+
return renderItem(itemToRender);
|
|
13482
|
+
default:
|
|
13483
|
+
return null;
|
|
13484
|
+
}
|
|
13485
|
+
};
|
|
13486
|
+
return React__default.createElement(React__default.Fragment, null, onRenderSlot(item));
|
|
13487
|
+
};
|
|
13488
|
+
|
|
13394
13489
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
13395
13490
|
var options = _ref.options,
|
|
13396
13491
|
onSelected = _ref.onSelected,
|
|
@@ -13501,6 +13596,78 @@ var Option = /*#__PURE__*/styled.button.withConfig({
|
|
|
13501
13596
|
componentId: "sc-ku4p1j-2"
|
|
13502
13597
|
})(["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:640px){padding:1rem 0.5rem;}"]);
|
|
13503
13598
|
|
|
13599
|
+
var ItemSlotToolTips = function ItemSlotToolTips(_ref) {
|
|
13600
|
+
var isTooltipVisible = _ref.isTooltipVisible,
|
|
13601
|
+
isFocused = _ref.isFocused,
|
|
13602
|
+
isContextMenuVisible = _ref.isContextMenuVisible,
|
|
13603
|
+
isContextMenuDisabled = _ref.isContextMenuDisabled,
|
|
13604
|
+
item = _ref.item,
|
|
13605
|
+
contextActions = _ref.contextActions,
|
|
13606
|
+
contextMenuPosition = _ref.contextMenuPosition,
|
|
13607
|
+
dragScale = _ref.dragScale,
|
|
13608
|
+
setIsContextMenuVisible = _ref.setIsContextMenuVisible,
|
|
13609
|
+
setIsTooltipMobileVisible = _ref.setIsTooltipMobileVisible,
|
|
13610
|
+
isTooltipMobileVisible = _ref.isTooltipMobileVisible,
|
|
13611
|
+
_onSelected = _ref.onSelected,
|
|
13612
|
+
atlasIMG = _ref.atlasIMG,
|
|
13613
|
+
atlasJSON = _ref.atlasJSON,
|
|
13614
|
+
equipmentSet = _ref.equipmentSet;
|
|
13615
|
+
return React__default.createElement(React__default.Fragment, null, isTooltipVisible && item && !isFocused && React__default.createElement(ItemTooltip, {
|
|
13616
|
+
item: item,
|
|
13617
|
+
atlasIMG: atlasIMG,
|
|
13618
|
+
atlasJSON: atlasJSON,
|
|
13619
|
+
equipmentSet: equipmentSet
|
|
13620
|
+
}), isTooltipMobileVisible && item && React__default.createElement(MobileItemTooltip, {
|
|
13621
|
+
item: item,
|
|
13622
|
+
atlasIMG: atlasIMG,
|
|
13623
|
+
atlasJSON: atlasJSON,
|
|
13624
|
+
equipmentSet: equipmentSet,
|
|
13625
|
+
closeTooltip: function closeTooltip() {
|
|
13626
|
+
setIsTooltipMobileVisible(false);
|
|
13627
|
+
},
|
|
13628
|
+
scale: dragScale,
|
|
13629
|
+
options: contextActions,
|
|
13630
|
+
onSelected: function onSelected(optionId) {
|
|
13631
|
+
setIsContextMenuVisible(false);
|
|
13632
|
+
if (item) {
|
|
13633
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13634
|
+
}
|
|
13635
|
+
}
|
|
13636
|
+
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React__default.createElement(RelativeListMenu, {
|
|
13637
|
+
options: contextActions,
|
|
13638
|
+
onSelected: function onSelected(optionId) {
|
|
13639
|
+
setIsContextMenuVisible(false);
|
|
13640
|
+
if (item) {
|
|
13641
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13642
|
+
}
|
|
13643
|
+
},
|
|
13644
|
+
onOutsideClick: function onOutsideClick() {
|
|
13645
|
+
setIsContextMenuVisible(false);
|
|
13646
|
+
},
|
|
13647
|
+
pos: contextMenuPosition
|
|
13648
|
+
}));
|
|
13649
|
+
};
|
|
13650
|
+
|
|
13651
|
+
var DraggingContext = /*#__PURE__*/React.createContext({
|
|
13652
|
+
item: null,
|
|
13653
|
+
setDraggingItem: function setDraggingItem() {}
|
|
13654
|
+
});
|
|
13655
|
+
var useDragging = function useDragging() {
|
|
13656
|
+
return React.useContext(DraggingContext);
|
|
13657
|
+
};
|
|
13658
|
+
var DraggingProvider = function DraggingProvider(_ref) {
|
|
13659
|
+
var children = _ref.children;
|
|
13660
|
+
var _useState = React.useState(null),
|
|
13661
|
+
item = _useState[0],
|
|
13662
|
+
setDraggingItem = _useState[1];
|
|
13663
|
+
return React__default.createElement(DraggingContext.Provider, {
|
|
13664
|
+
value: {
|
|
13665
|
+
item: item,
|
|
13666
|
+
setDraggingItem: setDraggingItem
|
|
13667
|
+
}
|
|
13668
|
+
}, children);
|
|
13669
|
+
};
|
|
13670
|
+
|
|
13504
13671
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
13505
13672
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
13506
13673
|
return {
|
|
@@ -13685,6 +13852,8 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13685
13852
|
dropPosition = _useState8[0],
|
|
13686
13853
|
setDropPosition = _useState8[1];
|
|
13687
13854
|
var dragContainer = React.useRef(null);
|
|
13855
|
+
var _useDragging = useDragging(),
|
|
13856
|
+
setDraggingItem = _useDragging.setDraggingItem;
|
|
13688
13857
|
var _useState9 = React.useState([]),
|
|
13689
13858
|
contextActions = _useState9[0],
|
|
13690
13859
|
setContextActions = _useState9[1];
|
|
@@ -13703,105 +13872,11 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13703
13872
|
onDrop(item, dropPosition);
|
|
13704
13873
|
}
|
|
13705
13874
|
}, [dropPosition]);
|
|
13706
|
-
var getStackInfo = function getStackInfo(itemId, stackQty) {
|
|
13707
|
-
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
13708
|
-
var isLargerThan999 = stackQty > 999;
|
|
13709
|
-
var qtyClassName = 'regular';
|
|
13710
|
-
if (isLargerThan999) qtyClassName = 'small';
|
|
13711
|
-
if (isFractionalStackQty) qtyClassName = 'xsmall';
|
|
13712
|
-
if (stackQty > 1) {
|
|
13713
|
-
return React__default.createElement(ItemQtyContainer, {
|
|
13714
|
-
key: "qty-" + itemId
|
|
13715
|
-
}, React__default.createElement(Ellipsis, {
|
|
13716
|
-
maxLines: 1,
|
|
13717
|
-
maxWidth: "48px"
|
|
13718
|
-
}, React__default.createElement(ItemQty, {
|
|
13719
|
-
className: qtyClassName
|
|
13720
|
-
}, Math.round(stackQty * 100) / 100, ' ')));
|
|
13721
|
-
}
|
|
13722
|
-
return undefined;
|
|
13723
|
-
};
|
|
13724
|
-
var renderItem = function renderItem(itemToRender) {
|
|
13725
|
-
var _itemToRender$_id, _itemToRender$stackQt;
|
|
13726
|
-
var element = [];
|
|
13727
|
-
if (itemToRender != null && itemToRender.texturePath) {
|
|
13728
|
-
element.push(React__default.createElement(ErrorBoundary, {
|
|
13729
|
-
key: itemToRender._id
|
|
13730
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
13731
|
-
key: itemToRender._id,
|
|
13732
|
-
atlasIMG: atlasIMG,
|
|
13733
|
-
atlasJSON: atlasJSON,
|
|
13734
|
-
spriteKey: shared.getItemTextureKeyPath({
|
|
13735
|
-
key: itemToRender.texturePath,
|
|
13736
|
-
texturePath: itemToRender.texturePath,
|
|
13737
|
-
stackQty: itemToRender.stackQty || 1,
|
|
13738
|
-
isStackable: itemToRender.isStackable
|
|
13739
|
-
}, atlasJSON),
|
|
13740
|
-
imgScale: 3,
|
|
13741
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13742
|
-
})));
|
|
13743
|
-
}
|
|
13744
|
-
var stackInfo = getStackInfo((_itemToRender$_id = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id : '', (_itemToRender$stackQt = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt : 0);
|
|
13745
|
-
if (stackInfo) {
|
|
13746
|
-
element.push(stackInfo);
|
|
13747
|
-
}
|
|
13748
|
-
return element;
|
|
13749
|
-
};
|
|
13750
|
-
var renderEquipment = function renderEquipment(itemToRender) {
|
|
13751
|
-
var _itemToRender$allowed;
|
|
13752
|
-
if (itemToRender != null && itemToRender.texturePath && (_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask)) {
|
|
13753
|
-
var _itemToRender$_id2, _itemToRender$stackQt2;
|
|
13754
|
-
var element = [];
|
|
13755
|
-
element.push(React__default.createElement(ErrorBoundary, {
|
|
13756
|
-
key: itemToRender._id
|
|
13757
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
13758
|
-
key: itemToRender._id,
|
|
13759
|
-
atlasIMG: atlasIMG,
|
|
13760
|
-
atlasJSON: atlasJSON,
|
|
13761
|
-
spriteKey: shared.getItemTextureKeyPath({
|
|
13762
|
-
key: itemToRender.texturePath,
|
|
13763
|
-
texturePath: itemToRender.texturePath,
|
|
13764
|
-
stackQty: itemToRender.stackQty || 1,
|
|
13765
|
-
isStackable: itemToRender.isStackable
|
|
13766
|
-
}, atlasJSON),
|
|
13767
|
-
imgScale: 3,
|
|
13768
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13769
|
-
})));
|
|
13770
|
-
var stackInfo = getStackInfo((_itemToRender$_id2 = itemToRender == null ? void 0 : itemToRender._id) != null ? _itemToRender$_id2 : '', (_itemToRender$stackQt2 = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt2 : 0);
|
|
13771
|
-
if (stackInfo) {
|
|
13772
|
-
element.push(stackInfo);
|
|
13773
|
-
}
|
|
13774
|
-
return element;
|
|
13775
|
-
} else {
|
|
13776
|
-
return React__default.createElement(ErrorBoundary, {
|
|
13777
|
-
key: uuid.v4()
|
|
13778
|
-
}, React__default.createElement(SpriteFromAtlas, {
|
|
13779
|
-
key: uuid.v4(),
|
|
13780
|
-
atlasIMG: atlasIMG,
|
|
13781
|
-
atlasJSON: atlasJSON,
|
|
13782
|
-
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
13783
|
-
imgScale: 3,
|
|
13784
|
-
grayScale: true,
|
|
13785
|
-
opacity: 0.4,
|
|
13786
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13787
|
-
}));
|
|
13788
|
-
}
|
|
13789
|
-
};
|
|
13790
|
-
var onRenderSlot = function onRenderSlot(itemToRender) {
|
|
13791
|
-
switch (containerType) {
|
|
13792
|
-
case shared.ItemContainerType.Equipment:
|
|
13793
|
-
return renderEquipment(itemToRender);
|
|
13794
|
-
case shared.ItemContainerType.Inventory:
|
|
13795
|
-
return renderItem(itemToRender);
|
|
13796
|
-
default:
|
|
13797
|
-
return renderItem(itemToRender);
|
|
13798
|
-
}
|
|
13799
|
-
};
|
|
13800
13875
|
var resetItem = function resetItem() {
|
|
13801
13876
|
setTooltipVisible(false);
|
|
13802
13877
|
setWasDragged(false);
|
|
13803
13878
|
};
|
|
13804
|
-
var
|
|
13879
|
+
var onSuccessfulDrag = function onSuccessfulDrag(quantity) {
|
|
13805
13880
|
resetItem();
|
|
13806
13881
|
if (quantity === -1) {
|
|
13807
13882
|
setDragPosition({
|
|
@@ -13842,6 +13917,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13842
13917
|
scale: dragScale,
|
|
13843
13918
|
disabled: onDragStart === undefined || onDragEnd === undefined,
|
|
13844
13919
|
onStop: function onStop(e, data) {
|
|
13920
|
+
setDraggingItem(null);
|
|
13845
13921
|
var target = e.target;
|
|
13846
13922
|
if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
|
|
13847
13923
|
var index = parseInt(target.id.split('_')[1]);
|
|
@@ -13876,7 +13952,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13876
13952
|
setTimeout(function () {
|
|
13877
13953
|
if (checkIfItemCanBeMoved != null && checkIfItemCanBeMoved()) {
|
|
13878
13954
|
if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;
|
|
13879
|
-
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty,
|
|
13955
|
+
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccessfulDrag);else onSuccessfulDrag(item.stackQty);
|
|
13880
13956
|
} else {
|
|
13881
13957
|
resetItem();
|
|
13882
13958
|
setIsFocused(false);
|
|
@@ -13885,7 +13961,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13885
13961
|
y: 0
|
|
13886
13962
|
});
|
|
13887
13963
|
}
|
|
13888
|
-
},
|
|
13964
|
+
}, 50);
|
|
13889
13965
|
} else if (item) {
|
|
13890
13966
|
var isTouch = false;
|
|
13891
13967
|
if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut) {
|
|
@@ -13909,6 +13985,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13909
13985
|
if (!item || isSelectingShortcut) {
|
|
13910
13986
|
return;
|
|
13911
13987
|
}
|
|
13988
|
+
setDraggingItem(item);
|
|
13912
13989
|
if (onDragStart && containerType) {
|
|
13913
13990
|
onDragStart(item, slotIndex, containerType);
|
|
13914
13991
|
}
|
|
@@ -13936,39 +14013,32 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13936
14013
|
onMouseLeave: function onMouseLeave() {
|
|
13937
14014
|
setTooltipVisible(false);
|
|
13938
14015
|
}
|
|
13939
|
-
},
|
|
14016
|
+
}, React__default.createElement(ItemSlotRenderer, {
|
|
13940
14017
|
item: item,
|
|
14018
|
+
slotSpriteMask: slotSpriteMask,
|
|
13941
14019
|
atlasIMG: atlasIMG,
|
|
13942
14020
|
atlasJSON: atlasJSON,
|
|
13943
|
-
|
|
13944
|
-
}),
|
|
14021
|
+
containerType: containerType
|
|
14022
|
+
}))), React__default.createElement(ItemSlotToolTips, {
|
|
14023
|
+
isTooltipVisible: isTooltipVisible,
|
|
14024
|
+
isTooltipMobileVisible: isTooltipMobileVisible,
|
|
14025
|
+
setIsTooltipMobileVisible: setIsTooltipMobileVisible,
|
|
14026
|
+
isFocused: isFocused,
|
|
14027
|
+
isContextMenuVisible: isContextMenuVisible,
|
|
14028
|
+
isContextMenuDisabled: isContextMenuDisabled,
|
|
13945
14029
|
item: item,
|
|
14030
|
+
contextActions: contextActions,
|
|
14031
|
+
contextMenuPosition: contextMenuPosition,
|
|
14032
|
+
dragScale: dragScale,
|
|
14033
|
+
setIsContextMenuVisible: setIsContextMenuVisible,
|
|
14034
|
+
onSelected: function onSelected(optionId, item) {
|
|
14035
|
+
setIsContextMenuVisible(false);
|
|
14036
|
+
if (_onSelected) _onSelected(optionId, item);
|
|
14037
|
+
},
|
|
13946
14038
|
atlasIMG: atlasIMG,
|
|
13947
14039
|
atlasJSON: atlasJSON,
|
|
13948
14040
|
equipmentSet: equipmentSet,
|
|
13949
|
-
|
|
13950
|
-
setIsTooltipMobileVisible(false);
|
|
13951
|
-
},
|
|
13952
|
-
scale: dragScale,
|
|
13953
|
-
options: contextActions,
|
|
13954
|
-
onSelected: function onSelected(optionId) {
|
|
13955
|
-
setIsContextMenuVisible(false);
|
|
13956
|
-
if (item) {
|
|
13957
|
-
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13958
|
-
}
|
|
13959
|
-
}
|
|
13960
|
-
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React__default.createElement(RelativeListMenu, {
|
|
13961
|
-
options: contextActions,
|
|
13962
|
-
onSelected: function onSelected(optionId) {
|
|
13963
|
-
setIsContextMenuVisible(false);
|
|
13964
|
-
if (item) {
|
|
13965
|
-
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13966
|
-
}
|
|
13967
|
-
},
|
|
13968
|
-
onOutsideClick: function onOutsideClick() {
|
|
13969
|
-
setIsContextMenuVisible(false);
|
|
13970
|
-
},
|
|
13971
|
-
pos: contextMenuPosition
|
|
14041
|
+
setIsTooltipVisible: setTooltipVisible
|
|
13972
14042
|
}));
|
|
13973
14043
|
});
|
|
13974
14044
|
var rarityColor = function rarityColor(item) {
|
|
@@ -13988,7 +14058,7 @@ var rarityColor = function rarityColor(item) {
|
|
|
13988
14058
|
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
13989
14059
|
displayName: "ItemSlot__Container",
|
|
13990
14060
|
componentId: "sc-l2j5ef-0"
|
|
13991
|
-
})(["margin:0.1rem;.react-draggable-dragging{
|
|
14061
|
+
})(["margin:0.1rem;.react-draggable-dragging{display:none;}.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) {
|
|
13992
14062
|
var item = _ref2.item;
|
|
13993
14063
|
return rarityColor(item);
|
|
13994
14064
|
}, function (_ref3) {
|
|
@@ -14004,17 +14074,9 @@ var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
|
14004
14074
|
var ItemContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14005
14075
|
displayName: "ItemSlot__ItemContainer",
|
|
14006
14076
|
componentId: "sc-l2j5ef-1"
|
|
14007
|
-
})(["width:
|
|
14077
|
+
})(["width:64px;height:64px;position:relative;", ";"], function (props) {
|
|
14008
14078
|
return props.isFocused && 'z-index: 100; pointer-events: none;';
|
|
14009
14079
|
});
|
|
14010
|
-
var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14011
|
-
displayName: "ItemSlot__ItemQtyContainer",
|
|
14012
|
-
componentId: "sc-l2j5ef-2"
|
|
14013
|
-
})(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
|
|
14014
|
-
var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
14015
|
-
displayName: "ItemSlot__ItemQty",
|
|
14016
|
-
componentId: "sc-l2j5ef-3"
|
|
14017
|
-
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
14018
14080
|
|
|
14019
14081
|
var statisticsToDisplay = [{
|
|
14020
14082
|
key: 'attack'
|
|
@@ -14693,6 +14755,102 @@ var Details = /*#__PURE__*/styled.p.withConfig({
|
|
|
14693
14755
|
componentId: "sc-kaa0h9-0"
|
|
14694
14756
|
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
14695
14757
|
|
|
14758
|
+
var useCursorPosition = function useCursorPosition() {
|
|
14759
|
+
var _useState = React.useState({
|
|
14760
|
+
x: 0,
|
|
14761
|
+
y: 0
|
|
14762
|
+
}),
|
|
14763
|
+
cursorPosition = _useState[0],
|
|
14764
|
+
setCursorPosition = _useState[1];
|
|
14765
|
+
React.useEffect(function () {
|
|
14766
|
+
var animationFrameId;
|
|
14767
|
+
var updateCursorPosition = function updateCursorPosition(x, y) {
|
|
14768
|
+
// Cancel the previous frame request
|
|
14769
|
+
cancelAnimationFrame(animationFrameId);
|
|
14770
|
+
// Request a new frame
|
|
14771
|
+
animationFrameId = requestAnimationFrame(function () {
|
|
14772
|
+
setCursorPosition({
|
|
14773
|
+
x: x,
|
|
14774
|
+
y: y
|
|
14775
|
+
});
|
|
14776
|
+
});
|
|
14777
|
+
};
|
|
14778
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
14779
|
+
updateCursorPosition(event.clientX, event.clientY);
|
|
14780
|
+
};
|
|
14781
|
+
var handleTouchMove = function handleTouchMove(event) {
|
|
14782
|
+
// Prevent default touch behavior (like scrolling)
|
|
14783
|
+
event.preventDefault();
|
|
14784
|
+
if (event.touches.length > 0) {
|
|
14785
|
+
var touch = event.touches[0];
|
|
14786
|
+
updateCursorPosition(touch.clientX, touch.clientY);
|
|
14787
|
+
}
|
|
14788
|
+
};
|
|
14789
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
14790
|
+
window.addEventListener('touchmove', handleTouchMove, {
|
|
14791
|
+
passive: false
|
|
14792
|
+
});
|
|
14793
|
+
// Cleanup function
|
|
14794
|
+
return function () {
|
|
14795
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
14796
|
+
window.removeEventListener('touchmove', handleTouchMove);
|
|
14797
|
+
cancelAnimationFrame(animationFrameId);
|
|
14798
|
+
};
|
|
14799
|
+
}, []);
|
|
14800
|
+
return cursorPosition;
|
|
14801
|
+
};
|
|
14802
|
+
|
|
14803
|
+
var CONTAINER_SIZE = 32;
|
|
14804
|
+
var OFFSET = CONTAINER_SIZE / 2;
|
|
14805
|
+
var DraggedItem = function DraggedItem(_ref) {
|
|
14806
|
+
var _item$_id, _item$stackQty;
|
|
14807
|
+
var atlasJSON = _ref.atlasJSON,
|
|
14808
|
+
atlasIMG = _ref.atlasIMG;
|
|
14809
|
+
var _useDragging = useDragging(),
|
|
14810
|
+
item = _useDragging.item;
|
|
14811
|
+
var _useCursorPosition = useCursorPosition(),
|
|
14812
|
+
x = _useCursorPosition.x,
|
|
14813
|
+
y = _useCursorPosition.y;
|
|
14814
|
+
if (!item) {
|
|
14815
|
+
return null;
|
|
14816
|
+
}
|
|
14817
|
+
var centeredX = x - OFFSET;
|
|
14818
|
+
var centeredY = y - OFFSET;
|
|
14819
|
+
var stackInfo = onRenderStackInfo((_item$_id = item == null ? void 0 : item._id) != null ? _item$_id : '', (_item$stackQty = item == null ? void 0 : item.stackQty) != null ? _item$stackQty : 0);
|
|
14820
|
+
return React__default.createElement(Container$e, null, React__default.createElement(SpriteContainer, {
|
|
14821
|
+
x: centeredX,
|
|
14822
|
+
y: centeredY
|
|
14823
|
+
}, React__default.createElement(SpriteFromAtlas, {
|
|
14824
|
+
key: item._id,
|
|
14825
|
+
atlasIMG: atlasIMG,
|
|
14826
|
+
atlasJSON: atlasJSON,
|
|
14827
|
+
spriteKey: shared.getItemTextureKeyPath({
|
|
14828
|
+
key: item.texturePath,
|
|
14829
|
+
texturePath: item.texturePath,
|
|
14830
|
+
stackQty: item.stackQty || 1,
|
|
14831
|
+
isStackable: item.isStackable
|
|
14832
|
+
}, atlasJSON),
|
|
14833
|
+
imgScale: 3,
|
|
14834
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
14835
|
+
}), stackInfo));
|
|
14836
|
+
};
|
|
14837
|
+
var pulse = "\n @keyframes pulse {\n 0%, 100% {\n transform: scale(1) rotate(-3deg);\n }\n 50% {\n transform: scale(0.95) rotate(-3deg);\n }\n }\n";
|
|
14838
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
14839
|
+
displayName: "DraggedItem__Container",
|
|
14840
|
+
componentId: "sc-mlzzcp-0"
|
|
14841
|
+
})(["position:relative;"]);
|
|
14842
|
+
var SpriteContainer = /*#__PURE__*/styled.div.attrs(function (props) {
|
|
14843
|
+
return {
|
|
14844
|
+
style: {
|
|
14845
|
+
left: props.x + "px",
|
|
14846
|
+
top: props.y + "px"
|
|
14847
|
+
}
|
|
14848
|
+
};
|
|
14849
|
+
}).withConfig({
|
|
14850
|
+
displayName: "DraggedItem__SpriteContainer",
|
|
14851
|
+
componentId: "sc-mlzzcp-1"
|
|
14852
|
+
})(["", " position:absolute;z-index:100;pointer-events:none;width:", "px;height:", "px;transform:rotate(-3deg);filter:grayscale(100%);opacity:0.35;animation:pulse 2s infinite;.item-slot-qty{position:absolute;bottom:0;margin-left:0.8rem;}"], pulse, CONTAINER_SIZE, CONTAINER_SIZE);
|
|
14853
|
+
|
|
14696
14854
|
var EquipmentSet = function EquipmentSet(_ref) {
|
|
14697
14855
|
var equipmentSet = _ref.equipmentSet,
|
|
14698
14856
|
onClose = _ref.onClose,
|
|
@@ -14769,7 +14927,10 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
14769
14927
|
});
|
|
14770
14928
|
});
|
|
14771
14929
|
};
|
|
14772
|
-
return React__default.createElement(
|
|
14930
|
+
return React__default.createElement(DraggingProvider, null, React__default.createElement(DraggedItem, {
|
|
14931
|
+
atlasIMG: atlasIMG,
|
|
14932
|
+
atlasJSON: atlasJSON
|
|
14933
|
+
}), React__default.createElement(DraggableContainer, {
|
|
14773
14934
|
title: 'Equipments',
|
|
14774
14935
|
type: exports.RPGUIContainerTypes.Framed,
|
|
14775
14936
|
onCloseButton: function onCloseButton() {
|
|
@@ -14783,7 +14944,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
14783
14944
|
onPositionChangeStart: onPositionChangeStart
|
|
14784
14945
|
}, React__default.createElement(EquipmentSetContainer, {
|
|
14785
14946
|
className: "equipment-container-body"
|
|
14786
|
-
}, React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
|
|
14947
|
+
}, React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React__default.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10)))));
|
|
14787
14948
|
};
|
|
14788
14949
|
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14789
14950
|
displayName: "EquipmentSet__EquipmentSetContainer",
|
|
@@ -14889,7 +15050,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
14889
15050
|
var _useState2 = React.useState(false),
|
|
14890
15051
|
showGoNextIndicator = _useState2[0],
|
|
14891
15052
|
setShowGoNextIndicator = _useState2[1];
|
|
14892
|
-
return React__default.createElement(Container$
|
|
15053
|
+
return React__default.createElement(Container$f, null, React__default.createElement(DynamicText, {
|
|
14893
15054
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
14894
15055
|
onFinish: function onFinish() {
|
|
14895
15056
|
setShowGoNextIndicator(true);
|
|
@@ -14907,7 +15068,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
14907
15068
|
}
|
|
14908
15069
|
}));
|
|
14909
15070
|
};
|
|
14910
|
-
var Container$
|
|
15071
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
14911
15072
|
displayName: "NPCDialogText__Container",
|
|
14912
15073
|
componentId: "sc-1cxkdh9-0"
|
|
14913
15074
|
})([""]);
|
|
@@ -15059,7 +15220,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15059
15220
|
return null;
|
|
15060
15221
|
});
|
|
15061
15222
|
};
|
|
15062
|
-
return React__default.createElement(Container$
|
|
15223
|
+
return React__default.createElement(Container$g, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
|
|
15063
15224
|
text: currentQuestion.text,
|
|
15064
15225
|
onStart: function onStart() {
|
|
15065
15226
|
return setCanShowAnswers(false);
|
|
@@ -15069,7 +15230,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15069
15230
|
}
|
|
15070
15231
|
})), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
15071
15232
|
};
|
|
15072
|
-
var Container$
|
|
15233
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
15073
15234
|
displayName: "QuestionDialog__Container",
|
|
15074
15235
|
componentId: "sc-bxc5u0-0"
|
|
15075
15236
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -15129,7 +15290,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15129
15290
|
}
|
|
15130
15291
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer, null, React__default.createElement(NPCThumbnail, {
|
|
15131
15292
|
src: imagePath || img$7
|
|
15132
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
15293
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$h, null, React__default.createElement(TextContainer$1, {
|
|
15133
15294
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
15134
15295
|
}, React__default.createElement(NPCDialogText, {
|
|
15135
15296
|
type: type,
|
|
@@ -15143,7 +15304,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15143
15304
|
src: imagePath || img$7
|
|
15144
15305
|
})))));
|
|
15145
15306
|
};
|
|
15146
|
-
var Container$
|
|
15307
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
15147
15308
|
displayName: "NPCDialog__Container",
|
|
15148
15309
|
componentId: "sc-1b4aw74-0"
|
|
15149
15310
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15199,7 +15360,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15199
15360
|
type: exports.RPGUIContainerTypes.FramedGold,
|
|
15200
15361
|
width: '50%',
|
|
15201
15362
|
height: '180px'
|
|
15202
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
15363
|
+
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$i, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React__default.createElement(React__default.Fragment, null, React__default.createElement(TextContainer$2, {
|
|
15203
15364
|
flex: '70%'
|
|
15204
15365
|
}, React__default.createElement(NPCDialogText, {
|
|
15205
15366
|
onStartStep: function onStartStep() {
|
|
@@ -15241,7 +15402,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15241
15402
|
src: img$6
|
|
15242
15403
|
}))), ")"));
|
|
15243
15404
|
};
|
|
15244
|
-
var Container$
|
|
15405
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
15245
15406
|
displayName: "NPCMultiDialog__Container",
|
|
15246
15407
|
componentId: "sc-rvu5wg-0"
|
|
15247
15408
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15435,7 +15596,8 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
15435
15596
|
_onPositionChangeStart = _ref.onPositionChangeStart,
|
|
15436
15597
|
onOutsideClick = _ref.onOutsideClick,
|
|
15437
15598
|
initialPosition = _ref.initialPosition,
|
|
15438
|
-
scale = _ref.scale
|
|
15599
|
+
scale = _ref.scale,
|
|
15600
|
+
width = _ref.width;
|
|
15439
15601
|
return React__default.createElement(DraggableContainer, {
|
|
15440
15602
|
title: title,
|
|
15441
15603
|
type: exports.RPGUIContainerTypes.Framed,
|
|
@@ -15444,7 +15606,7 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
15444
15606
|
onClose();
|
|
15445
15607
|
}
|
|
15446
15608
|
},
|
|
15447
|
-
width:
|
|
15609
|
+
width: width != null ? width : '415px',
|
|
15448
15610
|
cancelDrag: ".item-container-body, #shortcuts_list",
|
|
15449
15611
|
onPositionChange: function onPositionChange(_ref2) {
|
|
15450
15612
|
var x = _ref2.x,
|
|
@@ -15482,6 +15644,89 @@ var SlotsContainer = function SlotsContainer(_ref) {
|
|
|
15482
15644
|
}, children);
|
|
15483
15645
|
};
|
|
15484
15646
|
|
|
15647
|
+
var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
15648
|
+
var setSettingShortcutIndex = _ref.setSettingShortcutIndex,
|
|
15649
|
+
settingShortcutIndex = _ref.settingShortcutIndex,
|
|
15650
|
+
shortcuts = _ref.shortcuts,
|
|
15651
|
+
removeShortcut = _ref.removeShortcut,
|
|
15652
|
+
atlasJSON = _ref.atlasJSON,
|
|
15653
|
+
atlasIMG = _ref.atlasIMG;
|
|
15654
|
+
var getContent = function getContent(index) {
|
|
15655
|
+
var _shortcuts$index;
|
|
15656
|
+
if (((_shortcuts$index = shortcuts[index]) == null ? void 0 : _shortcuts$index.type) === shared.ShortcutType.Item) {
|
|
15657
|
+
var _shortcuts$index2;
|
|
15658
|
+
var payload = (_shortcuts$index2 = shortcuts[index]) == null ? void 0 : _shortcuts$index2.payload;
|
|
15659
|
+
if (!payload) return null;
|
|
15660
|
+
return React__default.createElement(SpriteFromAtlas, {
|
|
15661
|
+
atlasIMG: atlasIMG,
|
|
15662
|
+
atlasJSON: atlasJSON,
|
|
15663
|
+
spriteKey: shared.getItemTextureKeyPath({
|
|
15664
|
+
key: payload.texturePath,
|
|
15665
|
+
texturePath: payload.texturePath,
|
|
15666
|
+
stackQty: payload.stackQty || 1,
|
|
15667
|
+
isStackable: payload.isStackable
|
|
15668
|
+
}, atlasJSON),
|
|
15669
|
+
width: 32,
|
|
15670
|
+
height: 32,
|
|
15671
|
+
imgScale: 1.2,
|
|
15672
|
+
imgStyle: {
|
|
15673
|
+
left: '3px'
|
|
15674
|
+
}
|
|
15675
|
+
});
|
|
15676
|
+
}
|
|
15677
|
+
var IMAGE_SIZE = 32;
|
|
15678
|
+
var IMAGE_SCALE = 1;
|
|
15679
|
+
var shortcut = shortcuts[index];
|
|
15680
|
+
if ((shortcut == null ? void 0 : shortcut.type) === shared.ShortcutType.Spell && shortcut.payload) {
|
|
15681
|
+
var _payload$texturePath;
|
|
15682
|
+
var _payload = shortcut.payload; // TypeScript type assertion
|
|
15683
|
+
return React__default.createElement(SpriteFromAtlas, {
|
|
15684
|
+
atlasIMG: _payload.atlasIMG,
|
|
15685
|
+
atlasJSON: _payload.atlasJSON,
|
|
15686
|
+
spriteKey: (_payload$texturePath = _payload.texturePath) != null ? _payload$texturePath : '',
|
|
15687
|
+
width: IMAGE_SIZE,
|
|
15688
|
+
height: IMAGE_SIZE,
|
|
15689
|
+
imgScale: IMAGE_SCALE,
|
|
15690
|
+
centered: true,
|
|
15691
|
+
borderRadius: "50%"
|
|
15692
|
+
});
|
|
15693
|
+
}
|
|
15694
|
+
return null;
|
|
15695
|
+
};
|
|
15696
|
+
return React__default.createElement(Container$j, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
|
|
15697
|
+
id: "shortcuts_list"
|
|
15698
|
+
}, Array.from({
|
|
15699
|
+
length: 12
|
|
15700
|
+
}).map(function (_, i) {
|
|
15701
|
+
return React__default.createElement(Shortcut, {
|
|
15702
|
+
key: i,
|
|
15703
|
+
onPointerDown: function onPointerDown() {
|
|
15704
|
+
if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);
|
|
15705
|
+
removeShortcut(i);
|
|
15706
|
+
if (settingShortcutIndex === -1 && (!shortcuts[i] || shortcuts[i].type === shared.ShortcutType.None)) setSettingShortcutIndex(i);
|
|
15707
|
+
},
|
|
15708
|
+
disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
|
|
15709
|
+
isBeingSet: settingShortcutIndex === i,
|
|
15710
|
+
id: "shortcutSetter_" + i
|
|
15711
|
+
}, getContent(i));
|
|
15712
|
+
})));
|
|
15713
|
+
};
|
|
15714
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15715
|
+
displayName: "ShortcutsSetter__Container",
|
|
15716
|
+
componentId: "sc-xuouuf-0"
|
|
15717
|
+
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
|
|
15718
|
+
var Shortcut = /*#__PURE__*/styled.button.withConfig({
|
|
15719
|
+
displayName: "ShortcutsSetter__Shortcut",
|
|
15720
|
+
componentId: "sc-xuouuf-1"
|
|
15721
|
+
})(["width:2.4rem;height:2.4rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;span{margin-top:4px;}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, function (_ref2) {
|
|
15722
|
+
var isBeingSet = _ref2.isBeingSet;
|
|
15723
|
+
return isBeingSet ? uiColors.yellow : uiColors.darkGray;
|
|
15724
|
+
}, uiColors.darkGray, uiColors.gray);
|
|
15725
|
+
var List = /*#__PURE__*/styled.div.withConfig({
|
|
15726
|
+
displayName: "ShortcutsSetter__List",
|
|
15727
|
+
componentId: "sc-xuouuf-2"
|
|
15728
|
+
})(["width:100%;display:flex;align-items:center;gap:0.4rem;box-sizing:border-box;margin:0 !important;flex-wrap:wrap;padding:0.3rem;padding-bottom:1rem;"]);
|
|
15729
|
+
|
|
15485
15730
|
(function (RangeSliderType) {
|
|
15486
15731
|
RangeSliderType["Slider"] = "rpgui-slider";
|
|
15487
15732
|
RangeSliderType["GoldSlider"] = "rpgui-slider golden";
|
|
@@ -15636,88 +15881,33 @@ var CloseButton$3 = /*#__PURE__*/styled.div.withConfig({
|
|
|
15636
15881
|
componentId: "sc-yfdtpn-3"
|
|
15637
15882
|
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:0.8rem;"]);
|
|
15638
15883
|
|
|
15639
|
-
var
|
|
15640
|
-
var
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
var payload = (_shortcuts$index2 = shortcuts[index]) == null ? void 0 : _shortcuts$index2.payload;
|
|
15651
|
-
if (!payload) return null;
|
|
15652
|
-
return React__default.createElement(SpriteFromAtlas, {
|
|
15653
|
-
atlasIMG: atlasIMG,
|
|
15654
|
-
atlasJSON: atlasJSON,
|
|
15655
|
-
spriteKey: shared.getItemTextureKeyPath({
|
|
15656
|
-
key: payload.texturePath,
|
|
15657
|
-
texturePath: payload.texturePath,
|
|
15658
|
-
stackQty: payload.stackQty || 1,
|
|
15659
|
-
isStackable: payload.isStackable
|
|
15660
|
-
}, atlasJSON),
|
|
15661
|
-
width: 32,
|
|
15662
|
-
height: 32,
|
|
15663
|
-
imgScale: 1.2,
|
|
15664
|
-
imgStyle: {
|
|
15665
|
-
left: '3px'
|
|
15666
|
-
}
|
|
15884
|
+
var ItemQuantitySelectorModal = function ItemQuantitySelectorModal(_ref) {
|
|
15885
|
+
var quantitySelect = _ref.quantitySelect,
|
|
15886
|
+
setQuantitySelect = _ref.setQuantitySelect;
|
|
15887
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(QuantitySelectorContainer, null, React__default.createElement(ItemQuantitySelector, {
|
|
15888
|
+
quantity: quantitySelect.maxQuantity,
|
|
15889
|
+
onConfirm: function onConfirm(quantity) {
|
|
15890
|
+
quantitySelect.callback(quantity);
|
|
15891
|
+
setQuantitySelect({
|
|
15892
|
+
isOpen: false,
|
|
15893
|
+
maxQuantity: 1,
|
|
15894
|
+
callback: function callback() {}
|
|
15667
15895
|
});
|
|
15668
|
-
}
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15674
|
-
|
|
15675
|
-
return React__default.createElement(SpriteFromAtlas, {
|
|
15676
|
-
atlasIMG: _payload.atlasIMG,
|
|
15677
|
-
atlasJSON: _payload.atlasJSON,
|
|
15678
|
-
spriteKey: (_payload$texturePath = _payload.texturePath) != null ? _payload$texturePath : '',
|
|
15679
|
-
width: IMAGE_SIZE,
|
|
15680
|
-
height: IMAGE_SIZE,
|
|
15681
|
-
imgScale: IMAGE_SCALE,
|
|
15682
|
-
centered: true,
|
|
15683
|
-
borderRadius: "50%"
|
|
15896
|
+
},
|
|
15897
|
+
onClose: function onClose() {
|
|
15898
|
+
quantitySelect.callback(-1);
|
|
15899
|
+
setQuantitySelect({
|
|
15900
|
+
isOpen: false,
|
|
15901
|
+
maxQuantity: 1,
|
|
15902
|
+
callback: function callback() {}
|
|
15684
15903
|
});
|
|
15685
15904
|
}
|
|
15686
|
-
return null;
|
|
15687
|
-
};
|
|
15688
|
-
return React__default.createElement(Container$i, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
|
|
15689
|
-
id: "shortcuts_list"
|
|
15690
|
-
}, Array.from({
|
|
15691
|
-
length: 12
|
|
15692
|
-
}).map(function (_, i) {
|
|
15693
|
-
return React__default.createElement(Shortcut, {
|
|
15694
|
-
key: i,
|
|
15695
|
-
onPointerDown: function onPointerDown() {
|
|
15696
|
-
if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);
|
|
15697
|
-
removeShortcut(i);
|
|
15698
|
-
if (settingShortcutIndex === -1 && (!shortcuts[i] || shortcuts[i].type === shared.ShortcutType.None)) setSettingShortcutIndex(i);
|
|
15699
|
-
},
|
|
15700
|
-
disabled: settingShortcutIndex !== -1 && settingShortcutIndex !== i,
|
|
15701
|
-
isBeingSet: settingShortcutIndex === i,
|
|
15702
|
-
id: "shortcutSetter_" + i
|
|
15703
|
-
}, getContent(i));
|
|
15704
15905
|
})));
|
|
15705
15906
|
};
|
|
15706
|
-
var
|
|
15707
|
-
displayName: "
|
|
15708
|
-
componentId: "sc-
|
|
15709
|
-
})(["
|
|
15710
|
-
var Shortcut = /*#__PURE__*/styled.button.withConfig({
|
|
15711
|
-
displayName: "ShortcutsSetter__Shortcut",
|
|
15712
|
-
componentId: "sc-xuouuf-1"
|
|
15713
|
-
})(["width:2.4rem;height:2.4rem;background-color:", ";border:2px solid ", ";border-radius:50%;text-transform:uppercase;font-size:0.7rem;font-weight:bold;display:flex;align-items:center;justify-content:center;span{margin-top:4px;}&:hover,&:focus{background-color:", ";}&:active{background-color:", ";}&:disabled{opacity:0.5;}"], uiColors.lightGray, function (_ref2) {
|
|
15714
|
-
var isBeingSet = _ref2.isBeingSet;
|
|
15715
|
-
return isBeingSet ? uiColors.yellow : uiColors.darkGray;
|
|
15716
|
-
}, uiColors.darkGray, uiColors.gray);
|
|
15717
|
-
var List = /*#__PURE__*/styled.div.withConfig({
|
|
15718
|
-
displayName: "ShortcutsSetter__List",
|
|
15719
|
-
componentId: "sc-xuouuf-2"
|
|
15720
|
-
})(["width:100%;display:flex;align-items:center;gap:0.4rem;box-sizing:border-box;margin:0 !important;flex-wrap:wrap;padding:0.3rem;padding-bottom:1rem;"]);
|
|
15907
|
+
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15908
|
+
displayName: "ItemQuantitySelectorModal__QuantitySelectorContainer",
|
|
15909
|
+
componentId: "sc-1b8cosc-0"
|
|
15910
|
+
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
15721
15911
|
|
|
15722
15912
|
var ItemContainer$1 = function ItemContainer(_ref) {
|
|
15723
15913
|
var itemContainer = _ref.itemContainer,
|
|
@@ -15814,7 +16004,10 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
15814
16004
|
}
|
|
15815
16005
|
return slots;
|
|
15816
16006
|
};
|
|
15817
|
-
return React__default.createElement(
|
|
16007
|
+
return React__default.createElement(DraggingProvider, null, React__default.createElement(DraggedItem, {
|
|
16008
|
+
atlasIMG: atlasIMG,
|
|
16009
|
+
atlasJSON: atlasJSON
|
|
16010
|
+
}), React__default.createElement(SlotsContainer, {
|
|
15818
16011
|
title: itemContainer.name || 'Container',
|
|
15819
16012
|
onClose: onClose,
|
|
15820
16013
|
initialPosition: initialPosition,
|
|
@@ -15830,34 +16023,15 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
15830
16023
|
atlasJSON: atlasJSON
|
|
15831
16024
|
}), React__default.createElement(ItemsContainer, {
|
|
15832
16025
|
className: "item-container-body"
|
|
15833
|
-
}, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
setQuantitySelect({
|
|
15838
|
-
isOpen: false,
|
|
15839
|
-
maxQuantity: 1,
|
|
15840
|
-
callback: function callback() {}
|
|
15841
|
-
});
|
|
15842
|
-
},
|
|
15843
|
-
onClose: function onClose() {
|
|
15844
|
-
quantitySelect.callback(-1);
|
|
15845
|
-
setQuantitySelect({
|
|
15846
|
-
isOpen: false,
|
|
15847
|
-
maxQuantity: 1,
|
|
15848
|
-
callback: function callback() {}
|
|
15849
|
-
});
|
|
15850
|
-
}
|
|
15851
|
-
}))));
|
|
16026
|
+
}, onRenderSlots())), quantitySelect.isOpen && React__default.createElement(ItemQuantitySelectorModal, {
|
|
16027
|
+
quantitySelect: quantitySelect,
|
|
16028
|
+
setQuantitySelect: setQuantitySelect
|
|
16029
|
+
}));
|
|
15852
16030
|
};
|
|
15853
16031
|
var ItemsContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15854
16032
|
displayName: "ItemContainer__ItemsContainer",
|
|
15855
16033
|
componentId: "sc-15y5p9l-0"
|
|
15856
|
-
})(["display:flex;justify-content:center;flex-wrap:wrap;max-height:270px;overflow-y:auto;overflow-x:hidden;width:
|
|
15857
|
-
var QuantitySelectorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
15858
|
-
displayName: "ItemContainer__QuantitySelectorContainer",
|
|
15859
|
-
componentId: "sc-15y5p9l-1"
|
|
15860
|
-
})(["position:absolute;top:0;left:0;width:100vw;height:100vh;z-index:100;display:flex;justify-content:center;align-items:center;background-color:rgba(0,0,0,0.5);"]);
|
|
16034
|
+
})(["display:flex;justify-content:center;flex-wrap:wrap;max-height:270px;overflow-y:auto;overflow-x:hidden;width:415px;"]);
|
|
15861
16035
|
|
|
15862
16036
|
var LeaderboardTable = function LeaderboardTable(props) {
|
|
15863
16037
|
var items = props.items,
|
|
@@ -15982,7 +16156,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
15982
16156
|
onSelected = _ref.onSelected,
|
|
15983
16157
|
x = _ref.x,
|
|
15984
16158
|
y = _ref.y;
|
|
15985
|
-
return React__default.createElement(Container$
|
|
16159
|
+
return React__default.createElement(Container$k, {
|
|
15986
16160
|
x: x,
|
|
15987
16161
|
y: y
|
|
15988
16162
|
}, React__default.createElement("ul", {
|
|
@@ -15999,7 +16173,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
15999
16173
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
16000
16174
|
})));
|
|
16001
16175
|
};
|
|
16002
|
-
var Container$
|
|
16176
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
16003
16177
|
displayName: "ListMenu__Container",
|
|
16004
16178
|
componentId: "sc-i9097t-0"
|
|
16005
16179
|
})(["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) {
|
|
@@ -16018,7 +16192,7 @@ var Pager = function Pager(_ref) {
|
|
|
16018
16192
|
itemsPerPage = _ref.itemsPerPage,
|
|
16019
16193
|
onPageChange = _ref.onPageChange;
|
|
16020
16194
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
16021
|
-
return React__default.createElement(Container$
|
|
16195
|
+
return React__default.createElement(Container$l, null, React__default.createElement("p", null, "Total items: ", totalItems), React__default.createElement(PagerContainer, null, React__default.createElement("button", {
|
|
16022
16196
|
disabled: currentPage === 1,
|
|
16023
16197
|
onPointerDown: function onPointerDown() {
|
|
16024
16198
|
return onPageChange(Math.max(currentPage - 1, 1));
|
|
@@ -16032,7 +16206,7 @@ var Pager = function Pager(_ref) {
|
|
|
16032
16206
|
}
|
|
16033
16207
|
}, '>')));
|
|
16034
16208
|
};
|
|
16035
|
-
var Container$
|
|
16209
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16036
16210
|
displayName: "Pager__Container",
|
|
16037
16211
|
componentId: "sc-1ekmf50-0"
|
|
16038
16212
|
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
@@ -16045,7 +16219,7 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
16045
16219
|
var onConfirm = _ref.onConfirm,
|
|
16046
16220
|
onClose = _ref.onClose,
|
|
16047
16221
|
message = _ref.message;
|
|
16048
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$
|
|
16222
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$m, {
|
|
16049
16223
|
onPointerDown: onClose
|
|
16050
16224
|
}, React__default.createElement(DraggableContainer, {
|
|
16051
16225
|
width: "auto",
|
|
@@ -16068,7 +16242,7 @@ var Background = /*#__PURE__*/styled.div.withConfig({
|
|
|
16068
16242
|
displayName: "ConfirmModal__Background",
|
|
16069
16243
|
componentId: "sc-11qkyu1-0"
|
|
16070
16244
|
})(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
|
|
16071
|
-
var Container$
|
|
16245
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16072
16246
|
displayName: "ConfirmModal__Container",
|
|
16073
16247
|
componentId: "sc-11qkyu1-1"
|
|
16074
16248
|
})(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
|
|
@@ -16091,7 +16265,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
16091
16265
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
16092
16266
|
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
16093
16267
|
disabled = _ref.disabled;
|
|
16094
|
-
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(ItemInfoWrapper, {
|
|
16268
|
+
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer$1, null, React__default.createElement(ItemInfoWrapper, {
|
|
16095
16269
|
item: item,
|
|
16096
16270
|
atlasIMG: atlasIMG,
|
|
16097
16271
|
atlasJSON: atlasJSON,
|
|
@@ -16152,7 +16326,7 @@ var GoldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
16152
16326
|
displayName: "MarketplaceRows__GoldContainer",
|
|
16153
16327
|
componentId: "sc-wmpr1o-4"
|
|
16154
16328
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
16155
|
-
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16329
|
+
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
16156
16330
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
16157
16331
|
componentId: "sc-wmpr1o-5"
|
|
16158
16332
|
})(["position:relative;left:0.5rem;"]);
|
|
@@ -17033,7 +17207,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17033
17207
|
}
|
|
17034
17208
|
return value * 100 / max;
|
|
17035
17209
|
};
|
|
17036
|
-
return React__default.createElement(Container$
|
|
17210
|
+
return React__default.createElement(Container$n, {
|
|
17037
17211
|
className: "rpgui-progress",
|
|
17038
17212
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17039
17213
|
"data-rpguitype": "progress",
|
|
@@ -17063,7 +17237,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17063
17237
|
displayName: "ProgressBar__TextOverlay",
|
|
17064
17238
|
componentId: "sc-qa6fzh-1"
|
|
17065
17239
|
})(["width:100%;position:relative;"]);
|
|
17066
|
-
var Container$
|
|
17240
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
17067
17241
|
displayName: "ProgressBar__Container",
|
|
17068
17242
|
componentId: "sc-qa6fzh-2"
|
|
17069
17243
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -17411,7 +17585,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17411
17585
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
17412
17586
|
_ref$margin = _ref.margin,
|
|
17413
17587
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
17414
|
-
return React__default.createElement(Container$
|
|
17588
|
+
return React__default.createElement(Container$o, {
|
|
17415
17589
|
className: "simple-progress-bar"
|
|
17416
17590
|
}, React__default.createElement(ProgressBarContainer, {
|
|
17417
17591
|
margin: margin
|
|
@@ -17420,7 +17594,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17420
17594
|
bgColor: bgColor
|
|
17421
17595
|
}))));
|
|
17422
17596
|
};
|
|
17423
|
-
var Container$
|
|
17597
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
17424
17598
|
displayName: "SimpleProgressBar__Container",
|
|
17425
17599
|
componentId: "sc-mbeil3-0"
|
|
17426
17600
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -17467,7 +17641,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
17467
17641
|
return "" + result.toFixed(2);
|
|
17468
17642
|
}
|
|
17469
17643
|
};
|
|
17470
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React__default.createElement(React__default.Fragment, null, buffAndDebuff > 0 ? React__default.createElement(BuffAndDebuffContainer, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameBuff, null, skillName), React__default.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React__default.createElement(TitleNameBuffContainer, null, React__default.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React__default.createElement(React__default.Fragment, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameDebuff, null, skillName), React__default.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React__default.createElement("div", null, React__default.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React__default.createElement(TitleName, null, skillName)), !buffAndDebuff && React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleName, null, skillName), React__default.createElement(ValueDisplay, null, "lv ", level))), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$
|
|
17644
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React__default.createElement(React__default.Fragment, null, buffAndDebuff > 0 ? React__default.createElement(BuffAndDebuffContainer, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameBuff, null, skillName), React__default.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React__default.createElement(TitleNameBuffContainer, null, React__default.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React__default.createElement(React__default.Fragment, null, React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleNameDebuff, null, skillName), React__default.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React__default.createElement("div", null, React__default.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React__default.createElement(TitleName, null, skillName)), !buffAndDebuff && React__default.createElement(TitleNameContainer, null, React__default.createElement(TitleName, null, skillName), React__default.createElement(ValueDisplay, null, "lv ", level))), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$2, null, React__default.createElement(ErrorBoundary, null, React__default.createElement(SpriteFromAtlas, {
|
|
17471
17645
|
atlasIMG: atlasIMG,
|
|
17472
17646
|
atlasJSON: atlasJSON,
|
|
17473
17647
|
spriteKey: texturePath,
|
|
@@ -17483,7 +17657,7 @@ var ProgressBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17483
17657
|
displayName: "SkillProgressBar__ProgressBarContainer",
|
|
17484
17658
|
componentId: "sc-5vuroc-0"
|
|
17485
17659
|
})(["position:relative;top:8px;width:100%;height:auto;"]);
|
|
17486
|
-
var SpriteContainer$
|
|
17660
|
+
var SpriteContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
17487
17661
|
displayName: "SkillProgressBar__SpriteContainer",
|
|
17488
17662
|
componentId: "sc-5vuroc-1"
|
|
17489
17663
|
})(["position:relative;top:-3px;left:0;"]);
|
|
@@ -17709,7 +17883,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17709
17883
|
castingType = spell.castingType,
|
|
17710
17884
|
cooldown = spell.cooldown,
|
|
17711
17885
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
17712
|
-
return React__default.createElement(Container$
|
|
17886
|
+
return React__default.createElement(Container$p, null, React__default.createElement(Header$1, null, React__default.createElement("div", null, React__default.createElement(Title$9, null, name), React__default.createElement(Type$1, null, magicWords))), React__default.createElement(Statistic$1, null, React__default.createElement("div", {
|
|
17713
17887
|
className: "label"
|
|
17714
17888
|
}, "Casting Type:"), React__default.createElement("div", {
|
|
17715
17889
|
className: "value"
|
|
@@ -17735,7 +17909,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17735
17909
|
className: "value"
|
|
17736
17910
|
}, requiredItem))), React__default.createElement(Description$2, null, description));
|
|
17737
17911
|
};
|
|
17738
|
-
var Container$
|
|
17912
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
17739
17913
|
displayName: "SpellInfo__Container",
|
|
17740
17914
|
componentId: "sc-4hbw3q-0"
|
|
17741
17915
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:30rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, uiColors.lightGray);
|
|
@@ -17789,7 +17963,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17789
17963
|
var _ref$current;
|
|
17790
17964
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
17791
17965
|
};
|
|
17792
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
17966
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$q, {
|
|
17793
17967
|
ref: ref,
|
|
17794
17968
|
onTouchEnd: function onTouchEnd() {
|
|
17795
17969
|
handleFadeOut();
|
|
@@ -17814,7 +17988,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17814
17988
|
}, option.text);
|
|
17815
17989
|
}))));
|
|
17816
17990
|
};
|
|
17817
|
-
var Container$
|
|
17991
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
17818
17992
|
displayName: "MobileSpellTooltip__Container",
|
|
17819
17993
|
componentId: "sc-6p7uvr-0"
|
|
17820
17994
|
})(["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;}"]);
|
|
@@ -17855,13 +18029,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
17855
18029
|
}
|
|
17856
18030
|
return;
|
|
17857
18031
|
}, []);
|
|
17858
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
18032
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$r, {
|
|
17859
18033
|
ref: ref
|
|
17860
18034
|
}, React__default.createElement(SpellInfoDisplay, {
|
|
17861
18035
|
spell: spell
|
|
17862
18036
|
})));
|
|
17863
18037
|
};
|
|
17864
|
-
var Container$
|
|
18038
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
17865
18039
|
displayName: "SpellTooltip__Container",
|
|
17866
18040
|
componentId: "sc-1go0gwg-0"
|
|
17867
18041
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -17921,7 +18095,7 @@ var Spell = function Spell(_ref) {
|
|
|
17921
18095
|
var IMAGE_SCALE = 2;
|
|
17922
18096
|
return React__default.createElement(SpellInfoWrapper, {
|
|
17923
18097
|
spell: spell
|
|
17924
|
-
}, React__default.createElement(Container$
|
|
18098
|
+
}, React__default.createElement(Container$s, {
|
|
17925
18099
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
17926
18100
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
17927
18101
|
className: "spell"
|
|
@@ -17940,7 +18114,7 @@ var Spell = function Spell(_ref) {
|
|
|
17940
18114
|
className: "mana"
|
|
17941
18115
|
}, manaCost))));
|
|
17942
18116
|
};
|
|
17943
|
-
var Container$
|
|
18117
|
+
var Container$s = /*#__PURE__*/styled.button.withConfig({
|
|
17944
18118
|
displayName: "Spell__Container",
|
|
17945
18119
|
componentId: "sc-j96fa2-0"
|
|
17946
18120
|
})(["display:block;background:none;border:2px solid transparent;border-radius:1rem;width:100%;display:flex;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) {
|
|
@@ -18019,7 +18193,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18019
18193
|
height: "inherit",
|
|
18020
18194
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18021
18195
|
scale: scale
|
|
18022
|
-
}, React__default.createElement(Container$
|
|
18196
|
+
}, React__default.createElement(Container$t, null, React__default.createElement(Title$b, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
18023
18197
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18024
18198
|
settingShortcutIndex: settingShortcutIndex,
|
|
18025
18199
|
shortcuts: shortcuts,
|
|
@@ -18055,7 +18229,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
|
|
|
18055
18229
|
displayName: "Spellbook__Title",
|
|
18056
18230
|
componentId: "sc-r02nfq-0"
|
|
18057
18231
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
18058
|
-
var Container$
|
|
18232
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
18059
18233
|
displayName: "Spellbook__Container",
|
|
18060
18234
|
componentId: "sc-r02nfq-1"
|
|
18061
18235
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -18176,7 +18350,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
18176
18350
|
}
|
|
18177
18351
|
return null;
|
|
18178
18352
|
};
|
|
18179
|
-
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer$1, null, React__default.createElement(SpriteContainer$
|
|
18353
|
+
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer$1, null, React__default.createElement(SpriteContainer$3, null, React__default.createElement(ItemInfoWrapper, {
|
|
18180
18354
|
atlasIMG: atlasIMG,
|
|
18181
18355
|
atlasJSON: atlasJSON,
|
|
18182
18356
|
equipmentSet: equipmentSet,
|
|
@@ -18243,7 +18417,7 @@ var ItemIconContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
18243
18417
|
displayName: "TradingItemRow__ItemIconContainer",
|
|
18244
18418
|
componentId: "sc-mja0b5-4"
|
|
18245
18419
|
})(["display:flex;justify-content:flex-start;align-items:center;flex:0 0 58px;"]);
|
|
18246
|
-
var SpriteContainer$
|
|
18420
|
+
var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
18247
18421
|
displayName: "TradingItemRow__SpriteContainer",
|
|
18248
18422
|
componentId: "sc-mja0b5-5"
|
|
18249
18423
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
@@ -18401,11 +18575,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
18401
18575
|
var _ref$maxLines = _ref.maxLines,
|
|
18402
18576
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
18403
18577
|
children = _ref.children;
|
|
18404
|
-
return React__default.createElement(Container$
|
|
18578
|
+
return React__default.createElement(Container$u, {
|
|
18405
18579
|
maxLines: maxLines
|
|
18406
18580
|
}, children);
|
|
18407
18581
|
};
|
|
18408
|
-
var Container$
|
|
18582
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
18409
18583
|
displayName: "Truncate__Container",
|
|
18410
18584
|
componentId: "sc-6x00qb-0"
|
|
18411
18585
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|