@rpg-engine/long-bow 0.5.20 → 0.5.22
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/Item/Inventory/DraggedItem.d.ts +7 -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 +338 -174
- 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 +339 -175
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -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 +5 -2
- package/src/components/Item/Inventory/ItemQuantitySelectorModal.tsx +0 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +45 -207
- 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:64px;height:64px;position:
|
|
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;"]);
|
|
@@ -15686,7 +15847,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15686
15847
|
}
|
|
15687
15848
|
return null;
|
|
15688
15849
|
};
|
|
15689
|
-
return React__default.createElement(Container$
|
|
15850
|
+
return React__default.createElement(Container$j, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
|
|
15690
15851
|
id: "shortcuts_list"
|
|
15691
15852
|
}, Array.from({
|
|
15692
15853
|
length: 12
|
|
@@ -15704,7 +15865,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15704
15865
|
}, getContent(i));
|
|
15705
15866
|
})));
|
|
15706
15867
|
};
|
|
15707
|
-
var Container$
|
|
15868
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15708
15869
|
displayName: "ShortcutsSetter__Container",
|
|
15709
15870
|
componentId: "sc-xuouuf-0"
|
|
15710
15871
|
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
|
|
@@ -15815,7 +15976,10 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
15815
15976
|
}
|
|
15816
15977
|
return slots;
|
|
15817
15978
|
};
|
|
15818
|
-
return React__default.createElement(
|
|
15979
|
+
return React__default.createElement(DraggingProvider, null, React__default.createElement(DraggedItem, {
|
|
15980
|
+
atlasIMG: atlasIMG,
|
|
15981
|
+
atlasJSON: atlasJSON
|
|
15982
|
+
}), React__default.createElement(SlotsContainer, {
|
|
15819
15983
|
title: itemContainer.name || 'Container',
|
|
15820
15984
|
onClose: onClose,
|
|
15821
15985
|
initialPosition: initialPosition,
|
|
@@ -15983,7 +16147,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
15983
16147
|
onSelected = _ref.onSelected,
|
|
15984
16148
|
x = _ref.x,
|
|
15985
16149
|
y = _ref.y;
|
|
15986
|
-
return React__default.createElement(Container$
|
|
16150
|
+
return React__default.createElement(Container$k, {
|
|
15987
16151
|
x: x,
|
|
15988
16152
|
y: y
|
|
15989
16153
|
}, React__default.createElement("ul", {
|
|
@@ -16000,7 +16164,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
16000
16164
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
16001
16165
|
})));
|
|
16002
16166
|
};
|
|
16003
|
-
var Container$
|
|
16167
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
16004
16168
|
displayName: "ListMenu__Container",
|
|
16005
16169
|
componentId: "sc-i9097t-0"
|
|
16006
16170
|
})(["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) {
|
|
@@ -16019,7 +16183,7 @@ var Pager = function Pager(_ref) {
|
|
|
16019
16183
|
itemsPerPage = _ref.itemsPerPage,
|
|
16020
16184
|
onPageChange = _ref.onPageChange;
|
|
16021
16185
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
16022
|
-
return React__default.createElement(Container$
|
|
16186
|
+
return React__default.createElement(Container$l, null, React__default.createElement("p", null, "Total items: ", totalItems), React__default.createElement(PagerContainer, null, React__default.createElement("button", {
|
|
16023
16187
|
disabled: currentPage === 1,
|
|
16024
16188
|
onPointerDown: function onPointerDown() {
|
|
16025
16189
|
return onPageChange(Math.max(currentPage - 1, 1));
|
|
@@ -16033,7 +16197,7 @@ var Pager = function Pager(_ref) {
|
|
|
16033
16197
|
}
|
|
16034
16198
|
}, '>')));
|
|
16035
16199
|
};
|
|
16036
|
-
var Container$
|
|
16200
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16037
16201
|
displayName: "Pager__Container",
|
|
16038
16202
|
componentId: "sc-1ekmf50-0"
|
|
16039
16203
|
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
@@ -16046,7 +16210,7 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
16046
16210
|
var onConfirm = _ref.onConfirm,
|
|
16047
16211
|
onClose = _ref.onClose,
|
|
16048
16212
|
message = _ref.message;
|
|
16049
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$
|
|
16213
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$m, {
|
|
16050
16214
|
onPointerDown: onClose
|
|
16051
16215
|
}, React__default.createElement(DraggableContainer, {
|
|
16052
16216
|
width: "auto",
|
|
@@ -16069,7 +16233,7 @@ var Background = /*#__PURE__*/styled.div.withConfig({
|
|
|
16069
16233
|
displayName: "ConfirmModal__Background",
|
|
16070
16234
|
componentId: "sc-11qkyu1-0"
|
|
16071
16235
|
})(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
|
|
16072
|
-
var Container$
|
|
16236
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16073
16237
|
displayName: "ConfirmModal__Container",
|
|
16074
16238
|
componentId: "sc-11qkyu1-1"
|
|
16075
16239
|
})(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
|
|
@@ -16092,7 +16256,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
16092
16256
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
16093
16257
|
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
16094
16258
|
disabled = _ref.disabled;
|
|
16095
|
-
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer, null, React__default.createElement(ItemInfoWrapper, {
|
|
16259
|
+
return React__default.createElement(MarketplaceWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer$1, null, React__default.createElement(ItemInfoWrapper, {
|
|
16096
16260
|
item: item,
|
|
16097
16261
|
atlasIMG: atlasIMG,
|
|
16098
16262
|
atlasJSON: atlasJSON,
|
|
@@ -16153,7 +16317,7 @@ var GoldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
16153
16317
|
displayName: "MarketplaceRows__GoldContainer",
|
|
16154
16318
|
componentId: "sc-wmpr1o-4"
|
|
16155
16319
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
16156
|
-
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16320
|
+
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
16157
16321
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
16158
16322
|
componentId: "sc-wmpr1o-5"
|
|
16159
16323
|
})(["position:relative;left:0.5rem;"]);
|
|
@@ -17034,7 +17198,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17034
17198
|
}
|
|
17035
17199
|
return value * 100 / max;
|
|
17036
17200
|
};
|
|
17037
|
-
return React__default.createElement(Container$
|
|
17201
|
+
return React__default.createElement(Container$n, {
|
|
17038
17202
|
className: "rpgui-progress",
|
|
17039
17203
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17040
17204
|
"data-rpguitype": "progress",
|
|
@@ -17064,7 +17228,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17064
17228
|
displayName: "ProgressBar__TextOverlay",
|
|
17065
17229
|
componentId: "sc-qa6fzh-1"
|
|
17066
17230
|
})(["width:100%;position:relative;"]);
|
|
17067
|
-
var Container$
|
|
17231
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
17068
17232
|
displayName: "ProgressBar__Container",
|
|
17069
17233
|
componentId: "sc-qa6fzh-2"
|
|
17070
17234
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -17412,7 +17576,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17412
17576
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
17413
17577
|
_ref$margin = _ref.margin,
|
|
17414
17578
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
17415
|
-
return React__default.createElement(Container$
|
|
17579
|
+
return React__default.createElement(Container$o, {
|
|
17416
17580
|
className: "simple-progress-bar"
|
|
17417
17581
|
}, React__default.createElement(ProgressBarContainer, {
|
|
17418
17582
|
margin: margin
|
|
@@ -17421,7 +17585,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17421
17585
|
bgColor: bgColor
|
|
17422
17586
|
}))));
|
|
17423
17587
|
};
|
|
17424
|
-
var Container$
|
|
17588
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
17425
17589
|
displayName: "SimpleProgressBar__Container",
|
|
17426
17590
|
componentId: "sc-mbeil3-0"
|
|
17427
17591
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -17468,7 +17632,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
17468
17632
|
return "" + result.toFixed(2);
|
|
17469
17633
|
}
|
|
17470
17634
|
};
|
|
17471
|
-
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$
|
|
17635
|
+
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, {
|
|
17472
17636
|
atlasIMG: atlasIMG,
|
|
17473
17637
|
atlasJSON: atlasJSON,
|
|
17474
17638
|
spriteKey: texturePath,
|
|
@@ -17484,7 +17648,7 @@ var ProgressBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17484
17648
|
displayName: "SkillProgressBar__ProgressBarContainer",
|
|
17485
17649
|
componentId: "sc-5vuroc-0"
|
|
17486
17650
|
})(["position:relative;top:8px;width:100%;height:auto;"]);
|
|
17487
|
-
var SpriteContainer$
|
|
17651
|
+
var SpriteContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
17488
17652
|
displayName: "SkillProgressBar__SpriteContainer",
|
|
17489
17653
|
componentId: "sc-5vuroc-1"
|
|
17490
17654
|
})(["position:relative;top:-3px;left:0;"]);
|
|
@@ -17710,7 +17874,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17710
17874
|
castingType = spell.castingType,
|
|
17711
17875
|
cooldown = spell.cooldown,
|
|
17712
17876
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
17713
|
-
return React__default.createElement(Container$
|
|
17877
|
+
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", {
|
|
17714
17878
|
className: "label"
|
|
17715
17879
|
}, "Casting Type:"), React__default.createElement("div", {
|
|
17716
17880
|
className: "value"
|
|
@@ -17736,7 +17900,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17736
17900
|
className: "value"
|
|
17737
17901
|
}, requiredItem))), React__default.createElement(Description$2, null, description));
|
|
17738
17902
|
};
|
|
17739
|
-
var Container$
|
|
17903
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
17740
17904
|
displayName: "SpellInfo__Container",
|
|
17741
17905
|
componentId: "sc-4hbw3q-0"
|
|
17742
17906
|
})(["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);
|
|
@@ -17790,7 +17954,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17790
17954
|
var _ref$current;
|
|
17791
17955
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
17792
17956
|
};
|
|
17793
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
17957
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$q, {
|
|
17794
17958
|
ref: ref,
|
|
17795
17959
|
onTouchEnd: function onTouchEnd() {
|
|
17796
17960
|
handleFadeOut();
|
|
@@ -17815,7 +17979,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17815
17979
|
}, option.text);
|
|
17816
17980
|
}))));
|
|
17817
17981
|
};
|
|
17818
|
-
var Container$
|
|
17982
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
17819
17983
|
displayName: "MobileSpellTooltip__Container",
|
|
17820
17984
|
componentId: "sc-6p7uvr-0"
|
|
17821
17985
|
})(["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;}"]);
|
|
@@ -17856,13 +18020,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
17856
18020
|
}
|
|
17857
18021
|
return;
|
|
17858
18022
|
}, []);
|
|
17859
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
18023
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$r, {
|
|
17860
18024
|
ref: ref
|
|
17861
18025
|
}, React__default.createElement(SpellInfoDisplay, {
|
|
17862
18026
|
spell: spell
|
|
17863
18027
|
})));
|
|
17864
18028
|
};
|
|
17865
|
-
var Container$
|
|
18029
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
17866
18030
|
displayName: "SpellTooltip__Container",
|
|
17867
18031
|
componentId: "sc-1go0gwg-0"
|
|
17868
18032
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -17922,7 +18086,7 @@ var Spell = function Spell(_ref) {
|
|
|
17922
18086
|
var IMAGE_SCALE = 2;
|
|
17923
18087
|
return React__default.createElement(SpellInfoWrapper, {
|
|
17924
18088
|
spell: spell
|
|
17925
|
-
}, React__default.createElement(Container$
|
|
18089
|
+
}, React__default.createElement(Container$s, {
|
|
17926
18090
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
17927
18091
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
17928
18092
|
className: "spell"
|
|
@@ -17941,7 +18105,7 @@ var Spell = function Spell(_ref) {
|
|
|
17941
18105
|
className: "mana"
|
|
17942
18106
|
}, manaCost))));
|
|
17943
18107
|
};
|
|
17944
|
-
var Container$
|
|
18108
|
+
var Container$s = /*#__PURE__*/styled.button.withConfig({
|
|
17945
18109
|
displayName: "Spell__Container",
|
|
17946
18110
|
componentId: "sc-j96fa2-0"
|
|
17947
18111
|
})(["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) {
|
|
@@ -18020,7 +18184,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18020
18184
|
height: "inherit",
|
|
18021
18185
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18022
18186
|
scale: scale
|
|
18023
|
-
}, React__default.createElement(Container$
|
|
18187
|
+
}, React__default.createElement(Container$t, null, React__default.createElement(Title$b, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
18024
18188
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18025
18189
|
settingShortcutIndex: settingShortcutIndex,
|
|
18026
18190
|
shortcuts: shortcuts,
|
|
@@ -18056,7 +18220,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
|
|
|
18056
18220
|
displayName: "Spellbook__Title",
|
|
18057
18221
|
componentId: "sc-r02nfq-0"
|
|
18058
18222
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
18059
|
-
var Container$
|
|
18223
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
18060
18224
|
displayName: "Spellbook__Container",
|
|
18061
18225
|
componentId: "sc-r02nfq-1"
|
|
18062
18226
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -18177,7 +18341,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
18177
18341
|
}
|
|
18178
18342
|
return null;
|
|
18179
18343
|
};
|
|
18180
|
-
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer$1, null, React__default.createElement(SpriteContainer$
|
|
18344
|
+
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer$1, null, React__default.createElement(SpriteContainer$3, null, React__default.createElement(ItemInfoWrapper, {
|
|
18181
18345
|
atlasIMG: atlasIMG,
|
|
18182
18346
|
atlasJSON: atlasJSON,
|
|
18183
18347
|
equipmentSet: equipmentSet,
|
|
@@ -18244,7 +18408,7 @@ var ItemIconContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
18244
18408
|
displayName: "TradingItemRow__ItemIconContainer",
|
|
18245
18409
|
componentId: "sc-mja0b5-4"
|
|
18246
18410
|
})(["display:flex;justify-content:flex-start;align-items:center;flex:0 0 58px;"]);
|
|
18247
|
-
var SpriteContainer$
|
|
18411
|
+
var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
18248
18412
|
displayName: "TradingItemRow__SpriteContainer",
|
|
18249
18413
|
componentId: "sc-mja0b5-5"
|
|
18250
18414
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
@@ -18402,11 +18566,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
18402
18566
|
var _ref$maxLines = _ref.maxLines,
|
|
18403
18567
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
18404
18568
|
children = _ref.children;
|
|
18405
|
-
return React__default.createElement(Container$
|
|
18569
|
+
return React__default.createElement(Container$u, {
|
|
18406
18570
|
maxLines: maxLines
|
|
18407
18571
|
}, children);
|
|
18408
18572
|
};
|
|
18409
|
-
var Container$
|
|
18573
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
18410
18574
|
displayName: "Truncate__Container",
|
|
18411
18575
|
componentId: "sc-6x00qb-0"
|
|
18412
18576
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|