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