@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
package/dist/long-bow.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Component, useState, useEffect, useRef, useMemo, Fragment } from 'react';
|
|
1
|
+
import React, { Component, useState, useEffect, useRef, useContext, createContext, useMemo, Fragment } from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemRarities, ItemSubType, ItemSlotType, isMobileOrTablet, CharacterClass, getSPForLevel, getXPForLevel, PeriodOfDay, UserAccountTypes } from '@rpg-engine/shared';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
@@ -13386,6 +13386,101 @@ var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
|
13386
13386
|
componentId: "sc-dgmp04-0"
|
|
13387
13387
|
})(["position:static !important;"]);
|
|
13388
13388
|
|
|
13389
|
+
var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
|
|
13390
|
+
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
13391
|
+
var isLargerThan999 = stackQty > 999;
|
|
13392
|
+
var qtyClassName = 'regular';
|
|
13393
|
+
if (isLargerThan999) qtyClassName = 'small';
|
|
13394
|
+
if (isFractionalStackQty) qtyClassName = 'xsmall';
|
|
13395
|
+
if (stackQty > 1) {
|
|
13396
|
+
return React.createElement(ItemSlotQty, {
|
|
13397
|
+
itemId: itemId,
|
|
13398
|
+
stackQty: stackQty,
|
|
13399
|
+
qtyClassName: qtyClassName
|
|
13400
|
+
});
|
|
13401
|
+
}
|
|
13402
|
+
return undefined;
|
|
13403
|
+
};
|
|
13404
|
+
var ItemSlotQty = function ItemSlotQty(_ref) {
|
|
13405
|
+
var itemId = _ref.itemId,
|
|
13406
|
+
stackQty = _ref.stackQty,
|
|
13407
|
+
qtyClassName = _ref.qtyClassName;
|
|
13408
|
+
return React.createElement(ItemQtyContainer, {
|
|
13409
|
+
key: "qty-" + itemId,
|
|
13410
|
+
className: "item-slot-qty"
|
|
13411
|
+
}, React.createElement(Ellipsis, {
|
|
13412
|
+
maxLines: 1,
|
|
13413
|
+
maxWidth: "48px"
|
|
13414
|
+
}, React.createElement(ItemQty, {
|
|
13415
|
+
className: qtyClassName
|
|
13416
|
+
}, Math.round(stackQty * 100) / 100, ' ')));
|
|
13417
|
+
};
|
|
13418
|
+
var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
13419
|
+
displayName: "ItemSlotQty__ItemQtyContainer",
|
|
13420
|
+
componentId: "sc-keb1s5-0"
|
|
13421
|
+
})(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
|
|
13422
|
+
var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
13423
|
+
displayName: "ItemSlotQty__ItemQty",
|
|
13424
|
+
componentId: "sc-keb1s5-1"
|
|
13425
|
+
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
13426
|
+
|
|
13427
|
+
var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
|
|
13428
|
+
var containerType = _ref.containerType,
|
|
13429
|
+
atlasJSON = _ref.atlasJSON,
|
|
13430
|
+
atlasIMG = _ref.atlasIMG,
|
|
13431
|
+
slotSpriteMask = _ref.slotSpriteMask,
|
|
13432
|
+
item = _ref.item;
|
|
13433
|
+
var renderItem = function renderItem(itemToRender) {
|
|
13434
|
+
var _itemToRender$stackQt;
|
|
13435
|
+
if (!(itemToRender != null && itemToRender.texturePath)) {
|
|
13436
|
+
return null;
|
|
13437
|
+
}
|
|
13438
|
+
return React.createElement(ErrorBoundary, {
|
|
13439
|
+
key: itemToRender._id
|
|
13440
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
13441
|
+
atlasIMG: atlasIMG,
|
|
13442
|
+
atlasJSON: atlasJSON,
|
|
13443
|
+
spriteKey: getItemTextureKeyPath({
|
|
13444
|
+
key: itemToRender.texturePath,
|
|
13445
|
+
texturePath: itemToRender.texturePath,
|
|
13446
|
+
stackQty: itemToRender.stackQty || 1,
|
|
13447
|
+
isStackable: itemToRender.isStackable
|
|
13448
|
+
}, atlasJSON),
|
|
13449
|
+
imgScale: 3,
|
|
13450
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
13451
|
+
}), onRenderStackInfo(itemToRender._id, (_itemToRender$stackQt = itemToRender.stackQty) != null ? _itemToRender$stackQt : 0));
|
|
13452
|
+
};
|
|
13453
|
+
var renderEquipment = function renderEquipment(itemToRender) {
|
|
13454
|
+
var _itemToRender$allowed;
|
|
13455
|
+
if (!(itemToRender != null && itemToRender.texturePath) || !((_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask))) {
|
|
13456
|
+
return React.createElement(ErrorBoundary, {
|
|
13457
|
+
key: v4()
|
|
13458
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
13459
|
+
key: v4(),
|
|
13460
|
+
atlasIMG: atlasIMG,
|
|
13461
|
+
atlasJSON: atlasJSON,
|
|
13462
|
+
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
13463
|
+
imgScale: 3,
|
|
13464
|
+
grayScale: true,
|
|
13465
|
+
opacity: 0.4,
|
|
13466
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
13467
|
+
}));
|
|
13468
|
+
}
|
|
13469
|
+
return renderItem(itemToRender);
|
|
13470
|
+
};
|
|
13471
|
+
var onRenderSlot = function onRenderSlot(itemToRender) {
|
|
13472
|
+
switch (containerType) {
|
|
13473
|
+
case ItemContainerType.Equipment:
|
|
13474
|
+
return renderEquipment(itemToRender);
|
|
13475
|
+
case ItemContainerType.Inventory:
|
|
13476
|
+
return renderItem(itemToRender);
|
|
13477
|
+
default:
|
|
13478
|
+
return null;
|
|
13479
|
+
}
|
|
13480
|
+
};
|
|
13481
|
+
return React.createElement(React.Fragment, null, onRenderSlot(item));
|
|
13482
|
+
};
|
|
13483
|
+
|
|
13389
13484
|
var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
13390
13485
|
var options = _ref.options,
|
|
13391
13486
|
onSelected = _ref.onSelected,
|
|
@@ -13496,6 +13591,78 @@ var Option = /*#__PURE__*/styled.button.withConfig({
|
|
|
13496
13591
|
componentId: "sc-ku4p1j-2"
|
|
13497
13592
|
})(["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;}"]);
|
|
13498
13593
|
|
|
13594
|
+
var ItemSlotToolTips = function ItemSlotToolTips(_ref) {
|
|
13595
|
+
var isTooltipVisible = _ref.isTooltipVisible,
|
|
13596
|
+
isFocused = _ref.isFocused,
|
|
13597
|
+
isContextMenuVisible = _ref.isContextMenuVisible,
|
|
13598
|
+
isContextMenuDisabled = _ref.isContextMenuDisabled,
|
|
13599
|
+
item = _ref.item,
|
|
13600
|
+
contextActions = _ref.contextActions,
|
|
13601
|
+
contextMenuPosition = _ref.contextMenuPosition,
|
|
13602
|
+
dragScale = _ref.dragScale,
|
|
13603
|
+
setIsContextMenuVisible = _ref.setIsContextMenuVisible,
|
|
13604
|
+
setIsTooltipMobileVisible = _ref.setIsTooltipMobileVisible,
|
|
13605
|
+
isTooltipMobileVisible = _ref.isTooltipMobileVisible,
|
|
13606
|
+
_onSelected = _ref.onSelected,
|
|
13607
|
+
atlasIMG = _ref.atlasIMG,
|
|
13608
|
+
atlasJSON = _ref.atlasJSON,
|
|
13609
|
+
equipmentSet = _ref.equipmentSet;
|
|
13610
|
+
return React.createElement(React.Fragment, null, isTooltipVisible && item && !isFocused && React.createElement(ItemTooltip, {
|
|
13611
|
+
item: item,
|
|
13612
|
+
atlasIMG: atlasIMG,
|
|
13613
|
+
atlasJSON: atlasJSON,
|
|
13614
|
+
equipmentSet: equipmentSet
|
|
13615
|
+
}), isTooltipMobileVisible && item && React.createElement(MobileItemTooltip, {
|
|
13616
|
+
item: item,
|
|
13617
|
+
atlasIMG: atlasIMG,
|
|
13618
|
+
atlasJSON: atlasJSON,
|
|
13619
|
+
equipmentSet: equipmentSet,
|
|
13620
|
+
closeTooltip: function closeTooltip() {
|
|
13621
|
+
setIsTooltipMobileVisible(false);
|
|
13622
|
+
},
|
|
13623
|
+
scale: dragScale,
|
|
13624
|
+
options: contextActions,
|
|
13625
|
+
onSelected: function onSelected(optionId) {
|
|
13626
|
+
setIsContextMenuVisible(false);
|
|
13627
|
+
if (item) {
|
|
13628
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13629
|
+
}
|
|
13630
|
+
}
|
|
13631
|
+
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
13632
|
+
options: contextActions,
|
|
13633
|
+
onSelected: function onSelected(optionId) {
|
|
13634
|
+
setIsContextMenuVisible(false);
|
|
13635
|
+
if (item) {
|
|
13636
|
+
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13637
|
+
}
|
|
13638
|
+
},
|
|
13639
|
+
onOutsideClick: function onOutsideClick() {
|
|
13640
|
+
setIsContextMenuVisible(false);
|
|
13641
|
+
},
|
|
13642
|
+
pos: contextMenuPosition
|
|
13643
|
+
}));
|
|
13644
|
+
};
|
|
13645
|
+
|
|
13646
|
+
var DraggingContext = /*#__PURE__*/createContext({
|
|
13647
|
+
item: null,
|
|
13648
|
+
setDraggingItem: function setDraggingItem() {}
|
|
13649
|
+
});
|
|
13650
|
+
var useDragging = function useDragging() {
|
|
13651
|
+
return useContext(DraggingContext);
|
|
13652
|
+
};
|
|
13653
|
+
var DraggingProvider = function DraggingProvider(_ref) {
|
|
13654
|
+
var children = _ref.children;
|
|
13655
|
+
var _useState = useState(null),
|
|
13656
|
+
item = _useState[0],
|
|
13657
|
+
setDraggingItem = _useState[1];
|
|
13658
|
+
return React.createElement(DraggingContext.Provider, {
|
|
13659
|
+
value: {
|
|
13660
|
+
item: item,
|
|
13661
|
+
setDraggingItem: setDraggingItem
|
|
13662
|
+
}
|
|
13663
|
+
}, children);
|
|
13664
|
+
};
|
|
13665
|
+
|
|
13499
13666
|
var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
|
|
13500
13667
|
var contextMenu = actionsByTypeList.map(function (action) {
|
|
13501
13668
|
return {
|
|
@@ -13680,6 +13847,8 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13680
13847
|
dropPosition = _useState8[0],
|
|
13681
13848
|
setDropPosition = _useState8[1];
|
|
13682
13849
|
var dragContainer = useRef(null);
|
|
13850
|
+
var _useDragging = useDragging(),
|
|
13851
|
+
setDraggingItem = _useDragging.setDraggingItem;
|
|
13683
13852
|
var _useState9 = useState([]),
|
|
13684
13853
|
contextActions = _useState9[0],
|
|
13685
13854
|
setContextActions = _useState9[1];
|
|
@@ -13698,105 +13867,11 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13698
13867
|
onDrop(item, dropPosition);
|
|
13699
13868
|
}
|
|
13700
13869
|
}, [dropPosition]);
|
|
13701
|
-
var getStackInfo = function getStackInfo(itemId, stackQty) {
|
|
13702
|
-
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
13703
|
-
var isLargerThan999 = stackQty > 999;
|
|
13704
|
-
var qtyClassName = 'regular';
|
|
13705
|
-
if (isLargerThan999) qtyClassName = 'small';
|
|
13706
|
-
if (isFractionalStackQty) qtyClassName = 'xsmall';
|
|
13707
|
-
if (stackQty > 1) {
|
|
13708
|
-
return React.createElement(ItemQtyContainer, {
|
|
13709
|
-
key: "qty-" + itemId
|
|
13710
|
-
}, React.createElement(Ellipsis, {
|
|
13711
|
-
maxLines: 1,
|
|
13712
|
-
maxWidth: "48px"
|
|
13713
|
-
}, React.createElement(ItemQty, {
|
|
13714
|
-
className: qtyClassName
|
|
13715
|
-
}, Math.round(stackQty * 100) / 100, ' ')));
|
|
13716
|
-
}
|
|
13717
|
-
return undefined;
|
|
13718
|
-
};
|
|
13719
|
-
var renderItem = function renderItem(itemToRender) {
|
|
13720
|
-
var _itemToRender$_id, _itemToRender$stackQt;
|
|
13721
|
-
var element = [];
|
|
13722
|
-
if (itemToRender != null && itemToRender.texturePath) {
|
|
13723
|
-
element.push(React.createElement(ErrorBoundary, {
|
|
13724
|
-
key: itemToRender._id
|
|
13725
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
13726
|
-
key: itemToRender._id,
|
|
13727
|
-
atlasIMG: atlasIMG,
|
|
13728
|
-
atlasJSON: atlasJSON,
|
|
13729
|
-
spriteKey: getItemTextureKeyPath({
|
|
13730
|
-
key: itemToRender.texturePath,
|
|
13731
|
-
texturePath: itemToRender.texturePath,
|
|
13732
|
-
stackQty: itemToRender.stackQty || 1,
|
|
13733
|
-
isStackable: itemToRender.isStackable
|
|
13734
|
-
}, atlasJSON),
|
|
13735
|
-
imgScale: 3,
|
|
13736
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13737
|
-
})));
|
|
13738
|
-
}
|
|
13739
|
-
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);
|
|
13740
|
-
if (stackInfo) {
|
|
13741
|
-
element.push(stackInfo);
|
|
13742
|
-
}
|
|
13743
|
-
return element;
|
|
13744
|
-
};
|
|
13745
|
-
var renderEquipment = function renderEquipment(itemToRender) {
|
|
13746
|
-
var _itemToRender$allowed;
|
|
13747
|
-
if (itemToRender != null && itemToRender.texturePath && (_itemToRender$allowed = itemToRender.allowedEquipSlotType) != null && _itemToRender$allowed.includes(slotSpriteMask)) {
|
|
13748
|
-
var _itemToRender$_id2, _itemToRender$stackQt2;
|
|
13749
|
-
var element = [];
|
|
13750
|
-
element.push(React.createElement(ErrorBoundary, {
|
|
13751
|
-
key: itemToRender._id
|
|
13752
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
13753
|
-
key: itemToRender._id,
|
|
13754
|
-
atlasIMG: atlasIMG,
|
|
13755
|
-
atlasJSON: atlasJSON,
|
|
13756
|
-
spriteKey: getItemTextureKeyPath({
|
|
13757
|
-
key: itemToRender.texturePath,
|
|
13758
|
-
texturePath: itemToRender.texturePath,
|
|
13759
|
-
stackQty: itemToRender.stackQty || 1,
|
|
13760
|
-
isStackable: itemToRender.isStackable
|
|
13761
|
-
}, atlasJSON),
|
|
13762
|
-
imgScale: 3,
|
|
13763
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13764
|
-
})));
|
|
13765
|
-
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);
|
|
13766
|
-
if (stackInfo) {
|
|
13767
|
-
element.push(stackInfo);
|
|
13768
|
-
}
|
|
13769
|
-
return element;
|
|
13770
|
-
} else {
|
|
13771
|
-
return React.createElement(ErrorBoundary, {
|
|
13772
|
-
key: v4()
|
|
13773
|
-
}, React.createElement(SpriteFromAtlas, {
|
|
13774
|
-
key: v4(),
|
|
13775
|
-
atlasIMG: atlasIMG,
|
|
13776
|
-
atlasJSON: atlasJSON,
|
|
13777
|
-
spriteKey: EquipmentSlotSpriteByType[slotSpriteMask],
|
|
13778
|
-
imgScale: 3,
|
|
13779
|
-
grayScale: true,
|
|
13780
|
-
opacity: 0.4,
|
|
13781
|
-
imgClassname: "sprite-from-atlas-img--item"
|
|
13782
|
-
}));
|
|
13783
|
-
}
|
|
13784
|
-
};
|
|
13785
|
-
var onRenderSlot = function onRenderSlot(itemToRender) {
|
|
13786
|
-
switch (containerType) {
|
|
13787
|
-
case ItemContainerType.Equipment:
|
|
13788
|
-
return renderEquipment(itemToRender);
|
|
13789
|
-
case ItemContainerType.Inventory:
|
|
13790
|
-
return renderItem(itemToRender);
|
|
13791
|
-
default:
|
|
13792
|
-
return renderItem(itemToRender);
|
|
13793
|
-
}
|
|
13794
|
-
};
|
|
13795
13870
|
var resetItem = function resetItem() {
|
|
13796
13871
|
setTooltipVisible(false);
|
|
13797
13872
|
setWasDragged(false);
|
|
13798
13873
|
};
|
|
13799
|
-
var
|
|
13874
|
+
var onSuccessfulDrag = function onSuccessfulDrag(quantity) {
|
|
13800
13875
|
resetItem();
|
|
13801
13876
|
if (quantity === -1) {
|
|
13802
13877
|
setDragPosition({
|
|
@@ -13837,6 +13912,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13837
13912
|
scale: dragScale,
|
|
13838
13913
|
disabled: onDragStart === undefined || onDragEnd === undefined,
|
|
13839
13914
|
onStop: function onStop(e, data) {
|
|
13915
|
+
setDraggingItem(null);
|
|
13840
13916
|
var target = e.target;
|
|
13841
13917
|
if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
|
|
13842
13918
|
var index = parseInt(target.id.split('_')[1]);
|
|
@@ -13871,7 +13947,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13871
13947
|
setTimeout(function () {
|
|
13872
13948
|
if (checkIfItemCanBeMoved != null && checkIfItemCanBeMoved()) {
|
|
13873
13949
|
if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;
|
|
13874
|
-
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty,
|
|
13950
|
+
if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) openQuantitySelector(item.stackQty, onSuccessfulDrag);else onSuccessfulDrag(item.stackQty);
|
|
13875
13951
|
} else {
|
|
13876
13952
|
resetItem();
|
|
13877
13953
|
setIsFocused(false);
|
|
@@ -13880,7 +13956,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13880
13956
|
y: 0
|
|
13881
13957
|
});
|
|
13882
13958
|
}
|
|
13883
|
-
},
|
|
13959
|
+
}, 50);
|
|
13884
13960
|
} else if (item) {
|
|
13885
13961
|
var isTouch = false;
|
|
13886
13962
|
if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut) {
|
|
@@ -13904,6 +13980,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13904
13980
|
if (!item || isSelectingShortcut) {
|
|
13905
13981
|
return;
|
|
13906
13982
|
}
|
|
13983
|
+
setDraggingItem(item);
|
|
13907
13984
|
if (onDragStart && containerType) {
|
|
13908
13985
|
onDragStart(item, slotIndex, containerType);
|
|
13909
13986
|
}
|
|
@@ -13931,39 +14008,32 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
|
|
|
13931
14008
|
onMouseLeave: function onMouseLeave() {
|
|
13932
14009
|
setTooltipVisible(false);
|
|
13933
14010
|
}
|
|
13934
|
-
},
|
|
14011
|
+
}, React.createElement(ItemSlotRenderer, {
|
|
13935
14012
|
item: item,
|
|
14013
|
+
slotSpriteMask: slotSpriteMask,
|
|
13936
14014
|
atlasIMG: atlasIMG,
|
|
13937
14015
|
atlasJSON: atlasJSON,
|
|
13938
|
-
|
|
13939
|
-
}),
|
|
14016
|
+
containerType: containerType
|
|
14017
|
+
}))), React.createElement(ItemSlotToolTips, {
|
|
14018
|
+
isTooltipVisible: isTooltipVisible,
|
|
14019
|
+
isTooltipMobileVisible: isTooltipMobileVisible,
|
|
14020
|
+
setIsTooltipMobileVisible: setIsTooltipMobileVisible,
|
|
14021
|
+
isFocused: isFocused,
|
|
14022
|
+
isContextMenuVisible: isContextMenuVisible,
|
|
14023
|
+
isContextMenuDisabled: isContextMenuDisabled,
|
|
13940
14024
|
item: item,
|
|
14025
|
+
contextActions: contextActions,
|
|
14026
|
+
contextMenuPosition: contextMenuPosition,
|
|
14027
|
+
dragScale: dragScale,
|
|
14028
|
+
setIsContextMenuVisible: setIsContextMenuVisible,
|
|
14029
|
+
onSelected: function onSelected(optionId, item) {
|
|
14030
|
+
setIsContextMenuVisible(false);
|
|
14031
|
+
if (_onSelected) _onSelected(optionId, item);
|
|
14032
|
+
},
|
|
13941
14033
|
atlasIMG: atlasIMG,
|
|
13942
14034
|
atlasJSON: atlasJSON,
|
|
13943
14035
|
equipmentSet: equipmentSet,
|
|
13944
|
-
|
|
13945
|
-
setIsTooltipMobileVisible(false);
|
|
13946
|
-
},
|
|
13947
|
-
scale: dragScale,
|
|
13948
|
-
options: contextActions,
|
|
13949
|
-
onSelected: function onSelected(optionId) {
|
|
13950
|
-
setIsContextMenuVisible(false);
|
|
13951
|
-
if (item) {
|
|
13952
|
-
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13953
|
-
}
|
|
13954
|
-
}
|
|
13955
|
-
}), !isContextMenuDisabled && isContextMenuVisible && contextActions && React.createElement(RelativeListMenu, {
|
|
13956
|
-
options: contextActions,
|
|
13957
|
-
onSelected: function onSelected(optionId) {
|
|
13958
|
-
setIsContextMenuVisible(false);
|
|
13959
|
-
if (item) {
|
|
13960
|
-
_onSelected == null ? void 0 : _onSelected(optionId, item);
|
|
13961
|
-
}
|
|
13962
|
-
},
|
|
13963
|
-
onOutsideClick: function onOutsideClick() {
|
|
13964
|
-
setIsContextMenuVisible(false);
|
|
13965
|
-
},
|
|
13966
|
-
pos: contextMenuPosition
|
|
14036
|
+
setIsTooltipVisible: setTooltipVisible
|
|
13967
14037
|
}));
|
|
13968
14038
|
});
|
|
13969
14039
|
var rarityColor = function rarityColor(item) {
|
|
@@ -13983,7 +14053,7 @@ var rarityColor = function rarityColor(item) {
|
|
|
13983
14053
|
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
13984
14054
|
displayName: "ItemSlot__Container",
|
|
13985
14055
|
componentId: "sc-l2j5ef-0"
|
|
13986
|
-
})(["margin:0.1rem;.react-draggable-dragging{
|
|
14056
|
+
})(["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) {
|
|
13987
14057
|
var item = _ref2.item;
|
|
13988
14058
|
return rarityColor(item);
|
|
13989
14059
|
}, function (_ref3) {
|
|
@@ -13999,17 +14069,9 @@ var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
|
13999
14069
|
var ItemContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14000
14070
|
displayName: "ItemSlot__ItemContainer",
|
|
14001
14071
|
componentId: "sc-l2j5ef-1"
|
|
14002
|
-
})(["width:64px;height:64px;position:
|
|
14072
|
+
})(["width:64px;height:64px;position:relative;", ";"], function (props) {
|
|
14003
14073
|
return props.isFocused && 'z-index: 100; pointer-events: none;';
|
|
14004
14074
|
});
|
|
14005
|
-
var ItemQtyContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14006
|
-
displayName: "ItemSlot__ItemQtyContainer",
|
|
14007
|
-
componentId: "sc-l2j5ef-2"
|
|
14008
|
-
})(["position:relative;width:85%;height:16px;top:25px;left:2px;pointer-events:none;display:flex;justify-content:flex-end;"]);
|
|
14009
|
-
var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
14010
|
-
displayName: "ItemSlot__ItemQty",
|
|
14011
|
-
componentId: "sc-l2j5ef-3"
|
|
14012
|
-
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
14013
14075
|
|
|
14014
14076
|
var statisticsToDisplay = [{
|
|
14015
14077
|
key: 'attack'
|
|
@@ -14688,6 +14750,102 @@ var Details = /*#__PURE__*/styled.p.withConfig({
|
|
|
14688
14750
|
componentId: "sc-kaa0h9-0"
|
|
14689
14751
|
})(["font-size:", " !important;"], uiFonts.size.xsmall);
|
|
14690
14752
|
|
|
14753
|
+
var useCursorPosition = function useCursorPosition() {
|
|
14754
|
+
var _useState = useState({
|
|
14755
|
+
x: 0,
|
|
14756
|
+
y: 0
|
|
14757
|
+
}),
|
|
14758
|
+
cursorPosition = _useState[0],
|
|
14759
|
+
setCursorPosition = _useState[1];
|
|
14760
|
+
useEffect(function () {
|
|
14761
|
+
var animationFrameId;
|
|
14762
|
+
var updateCursorPosition = function updateCursorPosition(x, y) {
|
|
14763
|
+
// Cancel the previous frame request
|
|
14764
|
+
cancelAnimationFrame(animationFrameId);
|
|
14765
|
+
// Request a new frame
|
|
14766
|
+
animationFrameId = requestAnimationFrame(function () {
|
|
14767
|
+
setCursorPosition({
|
|
14768
|
+
x: x,
|
|
14769
|
+
y: y
|
|
14770
|
+
});
|
|
14771
|
+
});
|
|
14772
|
+
};
|
|
14773
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
14774
|
+
updateCursorPosition(event.clientX, event.clientY);
|
|
14775
|
+
};
|
|
14776
|
+
var handleTouchMove = function handleTouchMove(event) {
|
|
14777
|
+
// Prevent default touch behavior (like scrolling)
|
|
14778
|
+
event.preventDefault();
|
|
14779
|
+
if (event.touches.length > 0) {
|
|
14780
|
+
var touch = event.touches[0];
|
|
14781
|
+
updateCursorPosition(touch.clientX, touch.clientY);
|
|
14782
|
+
}
|
|
14783
|
+
};
|
|
14784
|
+
window.addEventListener('mousemove', handleMouseMove);
|
|
14785
|
+
window.addEventListener('touchmove', handleTouchMove, {
|
|
14786
|
+
passive: false
|
|
14787
|
+
});
|
|
14788
|
+
// Cleanup function
|
|
14789
|
+
return function () {
|
|
14790
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
|
14791
|
+
window.removeEventListener('touchmove', handleTouchMove);
|
|
14792
|
+
cancelAnimationFrame(animationFrameId);
|
|
14793
|
+
};
|
|
14794
|
+
}, []);
|
|
14795
|
+
return cursorPosition;
|
|
14796
|
+
};
|
|
14797
|
+
|
|
14798
|
+
var CONTAINER_SIZE = 32;
|
|
14799
|
+
var OFFSET = CONTAINER_SIZE / 2;
|
|
14800
|
+
var DraggedItem = function DraggedItem(_ref) {
|
|
14801
|
+
var _item$_id, _item$stackQty;
|
|
14802
|
+
var atlasJSON = _ref.atlasJSON,
|
|
14803
|
+
atlasIMG = _ref.atlasIMG;
|
|
14804
|
+
var _useDragging = useDragging(),
|
|
14805
|
+
item = _useDragging.item;
|
|
14806
|
+
var _useCursorPosition = useCursorPosition(),
|
|
14807
|
+
x = _useCursorPosition.x,
|
|
14808
|
+
y = _useCursorPosition.y;
|
|
14809
|
+
if (!item) {
|
|
14810
|
+
return null;
|
|
14811
|
+
}
|
|
14812
|
+
var centeredX = x - OFFSET;
|
|
14813
|
+
var centeredY = y - OFFSET;
|
|
14814
|
+
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);
|
|
14815
|
+
return React.createElement(Container$e, null, React.createElement(SpriteContainer, {
|
|
14816
|
+
x: centeredX,
|
|
14817
|
+
y: centeredY
|
|
14818
|
+
}, React.createElement(SpriteFromAtlas, {
|
|
14819
|
+
key: item._id,
|
|
14820
|
+
atlasIMG: atlasIMG,
|
|
14821
|
+
atlasJSON: atlasJSON,
|
|
14822
|
+
spriteKey: getItemTextureKeyPath({
|
|
14823
|
+
key: item.texturePath,
|
|
14824
|
+
texturePath: item.texturePath,
|
|
14825
|
+
stackQty: item.stackQty || 1,
|
|
14826
|
+
isStackable: item.isStackable
|
|
14827
|
+
}, atlasJSON),
|
|
14828
|
+
imgScale: 3,
|
|
14829
|
+
imgClassname: "sprite-from-atlas-img--item"
|
|
14830
|
+
}), stackInfo));
|
|
14831
|
+
};
|
|
14832
|
+
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";
|
|
14833
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
14834
|
+
displayName: "DraggedItem__Container",
|
|
14835
|
+
componentId: "sc-mlzzcp-0"
|
|
14836
|
+
})(["position:relative;"]);
|
|
14837
|
+
var SpriteContainer = /*#__PURE__*/styled.div.attrs(function (props) {
|
|
14838
|
+
return {
|
|
14839
|
+
style: {
|
|
14840
|
+
left: props.x + "px",
|
|
14841
|
+
top: props.y + "px"
|
|
14842
|
+
}
|
|
14843
|
+
};
|
|
14844
|
+
}).withConfig({
|
|
14845
|
+
displayName: "DraggedItem__SpriteContainer",
|
|
14846
|
+
componentId: "sc-mlzzcp-1"
|
|
14847
|
+
})(["", " 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);
|
|
14848
|
+
|
|
14691
14849
|
var EquipmentSet = function EquipmentSet(_ref) {
|
|
14692
14850
|
var equipmentSet = _ref.equipmentSet,
|
|
14693
14851
|
onClose = _ref.onClose,
|
|
@@ -14764,7 +14922,10 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
14764
14922
|
});
|
|
14765
14923
|
});
|
|
14766
14924
|
};
|
|
14767
|
-
return React.createElement(
|
|
14925
|
+
return React.createElement(DraggingProvider, null, React.createElement(DraggedItem, {
|
|
14926
|
+
atlasIMG: atlasIMG,
|
|
14927
|
+
atlasJSON: atlasJSON
|
|
14928
|
+
}), React.createElement(DraggableContainer, {
|
|
14768
14929
|
title: 'Equipments',
|
|
14769
14930
|
type: RPGUIContainerTypes.Framed,
|
|
14770
14931
|
onCloseButton: function onCloseButton() {
|
|
@@ -14778,7 +14939,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
14778
14939
|
onPositionChangeStart: onPositionChangeStart
|
|
14779
14940
|
}, React.createElement(EquipmentSetContainer, {
|
|
14780
14941
|
className: "equipment-container-body"
|
|
14781
|
-
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))));
|
|
14942
|
+
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10)))));
|
|
14782
14943
|
};
|
|
14783
14944
|
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|
|
14784
14945
|
displayName: "EquipmentSet__EquipmentSetContainer",
|
|
@@ -14884,7 +15045,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
14884
15045
|
var _useState2 = useState(false),
|
|
14885
15046
|
showGoNextIndicator = _useState2[0],
|
|
14886
15047
|
setShowGoNextIndicator = _useState2[1];
|
|
14887
|
-
return React.createElement(Container$
|
|
15048
|
+
return React.createElement(Container$f, null, React.createElement(DynamicText, {
|
|
14888
15049
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
14889
15050
|
onFinish: function onFinish() {
|
|
14890
15051
|
setShowGoNextIndicator(true);
|
|
@@ -14902,7 +15063,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
14902
15063
|
}
|
|
14903
15064
|
}));
|
|
14904
15065
|
};
|
|
14905
|
-
var Container$
|
|
15066
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
14906
15067
|
displayName: "NPCDialogText__Container",
|
|
14907
15068
|
componentId: "sc-1cxkdh9-0"
|
|
14908
15069
|
})([""]);
|
|
@@ -15054,7 +15215,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15054
15215
|
return null;
|
|
15055
15216
|
});
|
|
15056
15217
|
};
|
|
15057
|
-
return React.createElement(Container$
|
|
15218
|
+
return React.createElement(Container$g, null, React.createElement(QuestionContainer, null, React.createElement(DynamicText, {
|
|
15058
15219
|
text: currentQuestion.text,
|
|
15059
15220
|
onStart: function onStart() {
|
|
15060
15221
|
return setCanShowAnswers(false);
|
|
@@ -15064,7 +15225,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15064
15225
|
}
|
|
15065
15226
|
})), canShowAnswers && React.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
15066
15227
|
};
|
|
15067
|
-
var Container$
|
|
15228
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
15068
15229
|
displayName: "QuestionDialog__Container",
|
|
15069
15230
|
componentId: "sc-bxc5u0-0"
|
|
15070
15231
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -15125,7 +15286,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15125
15286
|
}
|
|
15126
15287
|
})), type === NPCDialogType.TextAndThumbnail && React.createElement(ThumbnailContainer, null, React.createElement(NPCThumbnail, {
|
|
15127
15288
|
src: imagePath || img$7
|
|
15128
|
-
}))) : React.createElement(React.Fragment, null, React.createElement(Container$
|
|
15289
|
+
}))) : React.createElement(React.Fragment, null, React.createElement(Container$h, null, React.createElement(TextContainer$1, {
|
|
15129
15290
|
flex: type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
15130
15291
|
}, React.createElement(NPCDialogText, {
|
|
15131
15292
|
type: type,
|
|
@@ -15139,7 +15300,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15139
15300
|
src: imagePath || img$7
|
|
15140
15301
|
})))));
|
|
15141
15302
|
};
|
|
15142
|
-
var Container$
|
|
15303
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
15143
15304
|
displayName: "NPCDialog__Container",
|
|
15144
15305
|
componentId: "sc-1b4aw74-0"
|
|
15145
15306
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15196,7 +15357,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15196
15357
|
type: RPGUIContainerTypes.FramedGold,
|
|
15197
15358
|
width: '50%',
|
|
15198
15359
|
height: '180px'
|
|
15199
|
-
}, React.createElement(React.Fragment, null, React.createElement(Container$
|
|
15360
|
+
}, React.createElement(React.Fragment, null, React.createElement(Container$i, null, ((_textAndTypeArray$sli = textAndTypeArray[slide]) == null ? void 0 : _textAndTypeArray$sli.imageSide) === 'right' && React.createElement(React.Fragment, null, React.createElement(TextContainer$2, {
|
|
15200
15361
|
flex: '70%'
|
|
15201
15362
|
}, React.createElement(NPCDialogText, {
|
|
15202
15363
|
onStartStep: function onStartStep() {
|
|
@@ -15238,7 +15399,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15238
15399
|
src: img$6
|
|
15239
15400
|
}))), ")"));
|
|
15240
15401
|
};
|
|
15241
|
-
var Container$
|
|
15402
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
15242
15403
|
displayName: "NPCMultiDialog__Container",
|
|
15243
15404
|
componentId: "sc-rvu5wg-0"
|
|
15244
15405
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15684,7 +15845,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15684
15845
|
}
|
|
15685
15846
|
return null;
|
|
15686
15847
|
};
|
|
15687
|
-
return React.createElement(Container$
|
|
15848
|
+
return React.createElement(Container$j, null, React.createElement("p", null, "Shortcuts:"), React.createElement(List, {
|
|
15688
15849
|
id: "shortcuts_list"
|
|
15689
15850
|
}, Array.from({
|
|
15690
15851
|
length: 12
|
|
@@ -15702,7 +15863,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15702
15863
|
}, getContent(i));
|
|
15703
15864
|
})));
|
|
15704
15865
|
};
|
|
15705
|
-
var Container$
|
|
15866
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15706
15867
|
displayName: "ShortcutsSetter__Container",
|
|
15707
15868
|
componentId: "sc-xuouuf-0"
|
|
15708
15869
|
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
|
|
@@ -15813,7 +15974,10 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
15813
15974
|
}
|
|
15814
15975
|
return slots;
|
|
15815
15976
|
};
|
|
15816
|
-
return React.createElement(
|
|
15977
|
+
return React.createElement(DraggingProvider, null, React.createElement(DraggedItem, {
|
|
15978
|
+
atlasIMG: atlasIMG,
|
|
15979
|
+
atlasJSON: atlasJSON
|
|
15980
|
+
}), React.createElement(SlotsContainer, {
|
|
15817
15981
|
title: itemContainer.name || 'Container',
|
|
15818
15982
|
onClose: onClose,
|
|
15819
15983
|
initialPosition: initialPosition,
|
|
@@ -15981,7 +16145,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
15981
16145
|
onSelected = _ref.onSelected,
|
|
15982
16146
|
x = _ref.x,
|
|
15983
16147
|
y = _ref.y;
|
|
15984
|
-
return React.createElement(Container$
|
|
16148
|
+
return React.createElement(Container$k, {
|
|
15985
16149
|
x: x,
|
|
15986
16150
|
y: y
|
|
15987
16151
|
}, React.createElement("ul", {
|
|
@@ -15998,7 +16162,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
15998
16162
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
15999
16163
|
})));
|
|
16000
16164
|
};
|
|
16001
|
-
var Container$
|
|
16165
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
16002
16166
|
displayName: "ListMenu__Container",
|
|
16003
16167
|
componentId: "sc-i9097t-0"
|
|
16004
16168
|
})(["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) {
|
|
@@ -16017,7 +16181,7 @@ var Pager = function Pager(_ref) {
|
|
|
16017
16181
|
itemsPerPage = _ref.itemsPerPage,
|
|
16018
16182
|
onPageChange = _ref.onPageChange;
|
|
16019
16183
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
16020
|
-
return React.createElement(Container$
|
|
16184
|
+
return React.createElement(Container$l, null, React.createElement("p", null, "Total items: ", totalItems), React.createElement(PagerContainer, null, React.createElement("button", {
|
|
16021
16185
|
disabled: currentPage === 1,
|
|
16022
16186
|
onPointerDown: function onPointerDown() {
|
|
16023
16187
|
return onPageChange(Math.max(currentPage - 1, 1));
|
|
@@ -16031,7 +16195,7 @@ var Pager = function Pager(_ref) {
|
|
|
16031
16195
|
}
|
|
16032
16196
|
}, '>')));
|
|
16033
16197
|
};
|
|
16034
|
-
var Container$
|
|
16198
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16035
16199
|
displayName: "Pager__Container",
|
|
16036
16200
|
componentId: "sc-1ekmf50-0"
|
|
16037
16201
|
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
@@ -16044,7 +16208,7 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
16044
16208
|
var onConfirm = _ref.onConfirm,
|
|
16045
16209
|
onClose = _ref.onClose,
|
|
16046
16210
|
message = _ref.message;
|
|
16047
|
-
return React.createElement(ModalPortal, null, React.createElement(Background, null), React.createElement(Container$
|
|
16211
|
+
return React.createElement(ModalPortal, null, React.createElement(Background, null), React.createElement(Container$m, {
|
|
16048
16212
|
onPointerDown: onClose
|
|
16049
16213
|
}, React.createElement(DraggableContainer, {
|
|
16050
16214
|
width: "auto",
|
|
@@ -16067,7 +16231,7 @@ var Background = /*#__PURE__*/styled.div.withConfig({
|
|
|
16067
16231
|
displayName: "ConfirmModal__Background",
|
|
16068
16232
|
componentId: "sc-11qkyu1-0"
|
|
16069
16233
|
})(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
|
|
16070
|
-
var Container$
|
|
16234
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16071
16235
|
displayName: "ConfirmModal__Container",
|
|
16072
16236
|
componentId: "sc-11qkyu1-1"
|
|
16073
16237
|
})(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
|
|
@@ -16090,7 +16254,7 @@ var MarketplaceRows = function MarketplaceRows(_ref) {
|
|
|
16090
16254
|
onMarketPlaceItemBuy = _ref.onMarketPlaceItemBuy,
|
|
16091
16255
|
onMarketPlaceItemRemove = _ref.onMarketPlaceItemRemove,
|
|
16092
16256
|
disabled = _ref.disabled;
|
|
16093
|
-
return React.createElement(MarketplaceWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer, null, React.createElement(ItemInfoWrapper, {
|
|
16257
|
+
return React.createElement(MarketplaceWrapper, null, React.createElement(ItemIconContainer, null, React.createElement(SpriteContainer$1, null, React.createElement(ItemInfoWrapper, {
|
|
16094
16258
|
item: item,
|
|
16095
16259
|
atlasIMG: atlasIMG,
|
|
16096
16260
|
atlasJSON: atlasJSON,
|
|
@@ -16151,7 +16315,7 @@ var GoldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
16151
16315
|
displayName: "MarketplaceRows__GoldContainer",
|
|
16152
16316
|
componentId: "sc-wmpr1o-4"
|
|
16153
16317
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
16154
|
-
var SpriteContainer = /*#__PURE__*/styled.div.withConfig({
|
|
16318
|
+
var SpriteContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
16155
16319
|
displayName: "MarketplaceRows__SpriteContainer",
|
|
16156
16320
|
componentId: "sc-wmpr1o-5"
|
|
16157
16321
|
})(["position:relative;left:0.5rem;"]);
|
|
@@ -17032,7 +17196,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17032
17196
|
}
|
|
17033
17197
|
return value * 100 / max;
|
|
17034
17198
|
};
|
|
17035
|
-
return React.createElement(Container$
|
|
17199
|
+
return React.createElement(Container$n, {
|
|
17036
17200
|
className: "rpgui-progress",
|
|
17037
17201
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17038
17202
|
"data-rpguitype": "progress",
|
|
@@ -17062,7 +17226,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17062
17226
|
displayName: "ProgressBar__TextOverlay",
|
|
17063
17227
|
componentId: "sc-qa6fzh-1"
|
|
17064
17228
|
})(["width:100%;position:relative;"]);
|
|
17065
|
-
var Container$
|
|
17229
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
17066
17230
|
displayName: "ProgressBar__Container",
|
|
17067
17231
|
componentId: "sc-qa6fzh-2"
|
|
17068
17232
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -17410,7 +17574,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17410
17574
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
17411
17575
|
_ref$margin = _ref.margin,
|
|
17412
17576
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
17413
|
-
return React.createElement(Container$
|
|
17577
|
+
return React.createElement(Container$o, {
|
|
17414
17578
|
className: "simple-progress-bar"
|
|
17415
17579
|
}, React.createElement(ProgressBarContainer, {
|
|
17416
17580
|
margin: margin
|
|
@@ -17419,7 +17583,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17419
17583
|
bgColor: bgColor
|
|
17420
17584
|
}))));
|
|
17421
17585
|
};
|
|
17422
|
-
var Container$
|
|
17586
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
17423
17587
|
displayName: "SimpleProgressBar__Container",
|
|
17424
17588
|
componentId: "sc-mbeil3-0"
|
|
17425
17589
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -17466,7 +17630,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
17466
17630
|
return "" + result.toFixed(2);
|
|
17467
17631
|
}
|
|
17468
17632
|
};
|
|
17469
|
-
return React.createElement(React.Fragment, null, React.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React.createElement(React.Fragment, null, buffAndDebuff > 0 ? React.createElement(BuffAndDebuffContainer, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameBuff, null, skillName), React.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React.createElement(TitleNameBuffContainer, null, React.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React.createElement(React.Fragment, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameDebuff, null, skillName), React.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React.createElement("div", null, React.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React.createElement(TitleName, null, skillName)), !buffAndDebuff && React.createElement(TitleNameContainer, null, React.createElement(TitleName, null, skillName), React.createElement(ValueDisplay, null, "lv ", level))), React.createElement(ProgressBody, null, React.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React.createElement(SpriteContainer$
|
|
17633
|
+
return React.createElement(React.Fragment, null, React.createElement(ProgressTitle, null, buffAndDebuff !== undefined && React.createElement(React.Fragment, null, buffAndDebuff > 0 ? React.createElement(BuffAndDebuffContainer, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameBuff, null, skillName), React.createElement(TitleNameBuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React.createElement(TitleNameBuffContainer, null, React.createElement(TitleNameBuff, null, "(+", buffAndDebuff, "%)"))) : buffAndDebuff < 0 ? React.createElement(React.Fragment, null, React.createElement(TitleNameContainer, null, React.createElement(TitleNameDebuff, null, skillName), React.createElement(TitleNameDebuff, null, "lv ", level, " (", skillsBuffsCalc(level, buffAndDebuff), ")")), React.createElement("div", null, React.createElement(TitleNameDebuff, null, "(", buffAndDebuff, "%)"))) : React.createElement(TitleName, null, skillName)), !buffAndDebuff && React.createElement(TitleNameContainer, null, React.createElement(TitleName, null, skillName), React.createElement(ValueDisplay, null, "lv ", level))), React.createElement(ProgressBody, null, React.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React.createElement(SpriteContainer$2, null, React.createElement(ErrorBoundary, null, React.createElement(SpriteFromAtlas, {
|
|
17470
17634
|
atlasIMG: atlasIMG,
|
|
17471
17635
|
atlasJSON: atlasJSON,
|
|
17472
17636
|
spriteKey: texturePath,
|
|
@@ -17482,7 +17646,7 @@ var ProgressBarContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17482
17646
|
displayName: "SkillProgressBar__ProgressBarContainer",
|
|
17483
17647
|
componentId: "sc-5vuroc-0"
|
|
17484
17648
|
})(["position:relative;top:8px;width:100%;height:auto;"]);
|
|
17485
|
-
var SpriteContainer$
|
|
17649
|
+
var SpriteContainer$2 = /*#__PURE__*/styled.div.withConfig({
|
|
17486
17650
|
displayName: "SkillProgressBar__SpriteContainer",
|
|
17487
17651
|
componentId: "sc-5vuroc-1"
|
|
17488
17652
|
})(["position:relative;top:-3px;left:0;"]);
|
|
@@ -17708,7 +17872,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17708
17872
|
castingType = spell.castingType,
|
|
17709
17873
|
cooldown = spell.cooldown,
|
|
17710
17874
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
17711
|
-
return React.createElement(Container$
|
|
17875
|
+
return React.createElement(Container$p, null, React.createElement(Header$1, null, React.createElement("div", null, React.createElement(Title$9, null, name), React.createElement(Type$1, null, magicWords))), React.createElement(Statistic$1, null, React.createElement("div", {
|
|
17712
17876
|
className: "label"
|
|
17713
17877
|
}, "Casting Type:"), React.createElement("div", {
|
|
17714
17878
|
className: "value"
|
|
@@ -17734,7 +17898,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17734
17898
|
className: "value"
|
|
17735
17899
|
}, requiredItem))), React.createElement(Description$2, null, description));
|
|
17736
17900
|
};
|
|
17737
|
-
var Container$
|
|
17901
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
17738
17902
|
displayName: "SpellInfo__Container",
|
|
17739
17903
|
componentId: "sc-4hbw3q-0"
|
|
17740
17904
|
})(["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);
|
|
@@ -17788,7 +17952,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17788
17952
|
var _ref$current;
|
|
17789
17953
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
17790
17954
|
};
|
|
17791
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
17955
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$q, {
|
|
17792
17956
|
ref: ref,
|
|
17793
17957
|
onTouchEnd: function onTouchEnd() {
|
|
17794
17958
|
handleFadeOut();
|
|
@@ -17813,7 +17977,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17813
17977
|
}, option.text);
|
|
17814
17978
|
}))));
|
|
17815
17979
|
};
|
|
17816
|
-
var Container$
|
|
17980
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
17817
17981
|
displayName: "MobileSpellTooltip__Container",
|
|
17818
17982
|
componentId: "sc-6p7uvr-0"
|
|
17819
17983
|
})(["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;}"]);
|
|
@@ -17854,13 +18018,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
17854
18018
|
}
|
|
17855
18019
|
return;
|
|
17856
18020
|
}, []);
|
|
17857
|
-
return React.createElement(ModalPortal, null, React.createElement(Container$
|
|
18021
|
+
return React.createElement(ModalPortal, null, React.createElement(Container$r, {
|
|
17858
18022
|
ref: ref
|
|
17859
18023
|
}, React.createElement(SpellInfoDisplay, {
|
|
17860
18024
|
spell: spell
|
|
17861
18025
|
})));
|
|
17862
18026
|
};
|
|
17863
|
-
var Container$
|
|
18027
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
17864
18028
|
displayName: "SpellTooltip__Container",
|
|
17865
18029
|
componentId: "sc-1go0gwg-0"
|
|
17866
18030
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -17920,7 +18084,7 @@ var Spell = function Spell(_ref) {
|
|
|
17920
18084
|
var IMAGE_SCALE = 2;
|
|
17921
18085
|
return React.createElement(SpellInfoWrapper, {
|
|
17922
18086
|
spell: spell
|
|
17923
|
-
}, React.createElement(Container$
|
|
18087
|
+
}, React.createElement(Container$s, {
|
|
17924
18088
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
17925
18089
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
17926
18090
|
className: "spell"
|
|
@@ -17939,7 +18103,7 @@ var Spell = function Spell(_ref) {
|
|
|
17939
18103
|
className: "mana"
|
|
17940
18104
|
}, manaCost))));
|
|
17941
18105
|
};
|
|
17942
|
-
var Container$
|
|
18106
|
+
var Container$s = /*#__PURE__*/styled.button.withConfig({
|
|
17943
18107
|
displayName: "Spell__Container",
|
|
17944
18108
|
componentId: "sc-j96fa2-0"
|
|
17945
18109
|
})(["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) {
|
|
@@ -18018,7 +18182,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18018
18182
|
height: "inherit",
|
|
18019
18183
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18020
18184
|
scale: scale
|
|
18021
|
-
}, React.createElement(Container$
|
|
18185
|
+
}, React.createElement(Container$t, null, React.createElement(Title$b, null, "Learned Spells"), React.createElement(ShortcutsSetter, {
|
|
18022
18186
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18023
18187
|
settingShortcutIndex: settingShortcutIndex,
|
|
18024
18188
|
shortcuts: shortcuts,
|
|
@@ -18054,7 +18218,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
|
|
|
18054
18218
|
displayName: "Spellbook__Title",
|
|
18055
18219
|
componentId: "sc-r02nfq-0"
|
|
18056
18220
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
18057
|
-
var Container$
|
|
18221
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
18058
18222
|
displayName: "Spellbook__Container",
|
|
18059
18223
|
componentId: "sc-r02nfq-1"
|
|
18060
18224
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -18175,7 +18339,7 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
18175
18339
|
}
|
|
18176
18340
|
return null;
|
|
18177
18341
|
};
|
|
18178
|
-
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer$1, null, React.createElement(SpriteContainer$
|
|
18342
|
+
return React.createElement(ItemWrapper, null, React.createElement(ItemIconContainer$1, null, React.createElement(SpriteContainer$3, null, React.createElement(ItemInfoWrapper, {
|
|
18179
18343
|
atlasIMG: atlasIMG,
|
|
18180
18344
|
atlasJSON: atlasJSON,
|
|
18181
18345
|
equipmentSet: equipmentSet,
|
|
@@ -18242,7 +18406,7 @@ var ItemIconContainer$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
18242
18406
|
displayName: "TradingItemRow__ItemIconContainer",
|
|
18243
18407
|
componentId: "sc-mja0b5-4"
|
|
18244
18408
|
})(["display:flex;justify-content:flex-start;align-items:center;flex:0 0 58px;"]);
|
|
18245
|
-
var SpriteContainer$
|
|
18409
|
+
var SpriteContainer$3 = /*#__PURE__*/styled.div.withConfig({
|
|
18246
18410
|
displayName: "TradingItemRow__SpriteContainer",
|
|
18247
18411
|
componentId: "sc-mja0b5-5"
|
|
18248
18412
|
})(["position:relative;top:-0.5rem;left:0.5rem;"]);
|
|
@@ -18400,11 +18564,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
18400
18564
|
var _ref$maxLines = _ref.maxLines,
|
|
18401
18565
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
18402
18566
|
children = _ref.children;
|
|
18403
|
-
return React.createElement(Container$
|
|
18567
|
+
return React.createElement(Container$u, {
|
|
18404
18568
|
maxLines: maxLines
|
|
18405
18569
|
}, children);
|
|
18406
18570
|
};
|
|
18407
|
-
var Container$
|
|
18571
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
18408
18572
|
displayName: "Truncate__Container",
|
|
18409
18573
|
componentId: "sc-6x00qb-0"
|
|
18410
18574
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|