@rpg-engine/long-bow 0.5.29 → 0.5.31
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/ItemSlotRarity.d.ts +0 -7
- package/dist/long-bow.cjs.development.js +81 -88
- 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 +81 -88
- package/dist/long-bow.esm.js.map +1 -1
- package/dist/stories/ItemContainer.stories.d.ts +0 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +21 -4
- package/src/components/Item/Inventory/ItemSlotRarity.ts +17 -0
- package/src/components/Item/Inventory/ItemSlotRenderer.tsx +16 -19
- package/src/stories/ItemContainer.stories.tsx +0 -6
- package/src/components/Item/Inventory/ItemSlotRarity.tsx +0 -46
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
import { IItem } from '@rpg-engine/shared';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface IProps {
|
|
4
|
-
item: IItem | null;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export declare const ItemSlotRarity: ({ children, item }: IProps) => JSX.Element;
|
|
8
2
|
export declare const rarityColor: (item: IItem | null) => "rgba(13, 193, 13, 0.6)" | "rgba(8, 104, 187, 0.6)" | "rgba(191, 0, 255, 0.6)" | "rgba(255, 191, 0,0.6)" | null;
|
|
9
|
-
export {};
|
|
@@ -13391,6 +13391,21 @@ var Container$7 = /*#__PURE__*/styled.div.withConfig({
|
|
|
13391
13391
|
componentId: "sc-dgmp04-0"
|
|
13392
13392
|
})(["position:static !important;"]);
|
|
13393
13393
|
|
|
13394
|
+
var rarityColor = function rarityColor(item) {
|
|
13395
|
+
switch (item == null ? void 0 : item.rarity) {
|
|
13396
|
+
case shared.ItemRarities.Uncommon:
|
|
13397
|
+
return 'rgba(13, 193, 13, 0.6)';
|
|
13398
|
+
case shared.ItemRarities.Rare:
|
|
13399
|
+
return 'rgba(8, 104, 187, 0.6)';
|
|
13400
|
+
case shared.ItemRarities.Epic:
|
|
13401
|
+
return 'rgba(191, 0, 255, 0.6)';
|
|
13402
|
+
case shared.ItemRarities.Legendary:
|
|
13403
|
+
return 'rgba(255, 191, 0,0.6)';
|
|
13404
|
+
default:
|
|
13405
|
+
return null;
|
|
13406
|
+
}
|
|
13407
|
+
};
|
|
13408
|
+
|
|
13394
13409
|
var onRenderStackInfo = function onRenderStackInfo(itemId, stackQty) {
|
|
13395
13410
|
var isFractionalStackQty = stackQty % 1 !== 0;
|
|
13396
13411
|
var isLargerThan999 = stackQty > 999;
|
|
@@ -13429,42 +13444,6 @@ var ItemQty = /*#__PURE__*/styled.span.withConfig({
|
|
|
13429
13444
|
componentId: "sc-keb1s5-1"
|
|
13430
13445
|
})(["&.regular{font-size:", ";}&.small{font-size:", ";}&.xsmall{font-size:", ";}"], uiFonts.size.small, uiFonts.size.xsmall, uiFonts.size.xxsmall);
|
|
13431
13446
|
|
|
13432
|
-
var ItemSlotRarity = function ItemSlotRarity(_ref) {
|
|
13433
|
-
var children = _ref.children,
|
|
13434
|
-
item = _ref.item;
|
|
13435
|
-
if (!item) return React__default.createElement(React__default.Fragment, null, children);
|
|
13436
|
-
return React__default.createElement(Container$8, {
|
|
13437
|
-
item: item
|
|
13438
|
-
}, children);
|
|
13439
|
-
};
|
|
13440
|
-
var rarityColor = function rarityColor(item) {
|
|
13441
|
-
switch (item == null ? void 0 : item.rarity) {
|
|
13442
|
-
case shared.ItemRarities.Uncommon:
|
|
13443
|
-
return 'rgba(13, 193, 13, 0.6)';
|
|
13444
|
-
case shared.ItemRarities.Rare:
|
|
13445
|
-
return 'rgba(8, 104, 187, 0.6)';
|
|
13446
|
-
case shared.ItemRarities.Epic:
|
|
13447
|
-
return 'rgba(191, 0, 255, 0.6)';
|
|
13448
|
-
case shared.ItemRarities.Legendary:
|
|
13449
|
-
return 'rgba(255, 191, 0,0.6)';
|
|
13450
|
-
default:
|
|
13451
|
-
return null;
|
|
13452
|
-
}
|
|
13453
|
-
};
|
|
13454
|
-
var Container$8 = /*#__PURE__*/styled.div.withConfig({
|
|
13455
|
-
displayName: "ItemSlotRarity__Container",
|
|
13456
|
-
componentId: "sc-1n0r6n7-0"
|
|
13457
|
-
})([".sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}"], function (_ref2) {
|
|
13458
|
-
var item = _ref2.item;
|
|
13459
|
-
return rarityColor(item);
|
|
13460
|
-
}, function (_ref3) {
|
|
13461
|
-
var item = _ref3.item;
|
|
13462
|
-
return "0 0 5px 2px " + rarityColor(item);
|
|
13463
|
-
}, function (_ref4) {
|
|
13464
|
-
var item = _ref4.item;
|
|
13465
|
-
return "0 0 4px 3px " + rarityColor(item);
|
|
13466
|
-
});
|
|
13467
|
-
|
|
13468
13447
|
var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
|
|
13469
13448
|
var containerType = _ref.containerType,
|
|
13470
13449
|
atlasJSON = _ref.atlasJSON,
|
|
@@ -13478,8 +13457,6 @@ var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
|
|
|
13478
13457
|
}
|
|
13479
13458
|
return React__default.createElement(ErrorBoundary, {
|
|
13480
13459
|
key: item._id
|
|
13481
|
-
}, React__default.createElement(ItemSlotRarity, {
|
|
13482
|
-
item: item
|
|
13483
13460
|
}, React__default.createElement(SpriteFromAtlas, {
|
|
13484
13461
|
atlasIMG: atlasIMG,
|
|
13485
13462
|
atlasJSON: atlasJSON,
|
|
@@ -13491,7 +13468,7 @@ var ItemSlotRenderer = function ItemSlotRenderer(_ref) {
|
|
|
13491
13468
|
}, atlasJSON),
|
|
13492
13469
|
imgScale: 3,
|
|
13493
13470
|
imgClassname: "sprite-from-atlas-img--item"
|
|
13494
|
-
}), onRenderStackInfo(item._id, (_item$stackQty = item.stackQty) != null ? _item$stackQty : 0))
|
|
13471
|
+
}), onRenderStackInfo(item._id, (_item$stackQty = item.stackQty) != null ? _item$stackQty : 0));
|
|
13495
13472
|
};
|
|
13496
13473
|
var renderEquipment = function renderEquipment(itemToRender) {
|
|
13497
13474
|
var _itemToRender$allowed;
|
|
@@ -13544,7 +13521,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
13544
13521
|
document.removeEventListener('clickOutside', function (_e) {});
|
|
13545
13522
|
};
|
|
13546
13523
|
}, []);
|
|
13547
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
13524
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$8, Object.assign({
|
|
13548
13525
|
fontSize: fontSize,
|
|
13549
13526
|
ref: ref
|
|
13550
13527
|
}, pos), React__default.createElement("ul", {
|
|
@@ -13561,7 +13538,7 @@ var RelativeListMenu = function RelativeListMenu(_ref) {
|
|
|
13561
13538
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
13562
13539
|
}))));
|
|
13563
13540
|
};
|
|
13564
|
-
var Container$
|
|
13541
|
+
var Container$8 = /*#__PURE__*/styled.div.withConfig({
|
|
13565
13542
|
displayName: "RelativeListMenu__Container",
|
|
13566
13543
|
componentId: "sc-7hohf-0"
|
|
13567
13544
|
})(["position:absolute;top:", "px;left:", "px;display:flex;flex-direction:column;width:max-content;justify-content:start;align-items:flex-start;li{font-size:", "em;}"], function (props) {
|
|
@@ -13591,7 +13568,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
13591
13568
|
var _ref$current;
|
|
13592
13569
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
13593
13570
|
};
|
|
13594
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
13571
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$9, {
|
|
13595
13572
|
ref: ref,
|
|
13596
13573
|
onTouchEnd: function onTouchEnd() {
|
|
13597
13574
|
handleFadeOut();
|
|
@@ -13619,7 +13596,7 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
|
|
|
13619
13596
|
}, option.text);
|
|
13620
13597
|
}))));
|
|
13621
13598
|
};
|
|
13622
|
-
var Container$
|
|
13599
|
+
var Container$9 = /*#__PURE__*/styled.div.withConfig({
|
|
13623
13600
|
displayName: "MobileItemTooltip__Container",
|
|
13624
13601
|
componentId: "sc-ku4p1j-0"
|
|
13625
13602
|
})(["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:640px){flex-direction:column;}"]);
|
|
@@ -13889,6 +13866,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13889
13866
|
setDropPosition = _useState8[1];
|
|
13890
13867
|
var dragContainer = React.useRef(null);
|
|
13891
13868
|
var _useDragging = useDragging(),
|
|
13869
|
+
draggingItem = _useDragging.item,
|
|
13892
13870
|
setDraggingItem = _useDragging.setDraggingItem;
|
|
13893
13871
|
var _useState9 = React.useState([]),
|
|
13894
13872
|
contextActions = _useState9[0],
|
|
@@ -13994,7 +13972,6 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
13994
13972
|
return;
|
|
13995
13973
|
}
|
|
13996
13974
|
if (onDragStart && containerType) {
|
|
13997
|
-
setDraggingItem(item);
|
|
13998
13975
|
onDragStart(item, slotIndex, containerType);
|
|
13999
13976
|
}
|
|
14000
13977
|
};
|
|
@@ -14003,8 +13980,12 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
14003
13980
|
setWasDragged(true);
|
|
14004
13981
|
setIsFocused(true);
|
|
14005
13982
|
}
|
|
13983
|
+
if (!draggingItem) {
|
|
13984
|
+
setDraggingItem(item);
|
|
13985
|
+
}
|
|
14006
13986
|
};
|
|
14007
|
-
return React__default.createElement(Container$
|
|
13987
|
+
return React__default.createElement(Container$a, {
|
|
13988
|
+
isDraggingItem: !!draggingItem,
|
|
14008
13989
|
item: item,
|
|
14009
13990
|
className: "rpgui-icon empty-slot",
|
|
14010
13991
|
onMouseUp: function onMouseUp() {
|
|
@@ -14080,11 +14061,23 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
14080
14061
|
setIsTooltipVisible: setTooltipVisible
|
|
14081
14062
|
}));
|
|
14082
14063
|
});
|
|
14083
|
-
var Container$
|
|
14064
|
+
var Container$a = /*#__PURE__*/styled.div.withConfig({
|
|
14084
14065
|
displayName: "ItemSlot__Container",
|
|
14085
14066
|
componentId: "sc-l2j5ef-0"
|
|
14086
|
-
})(["margin:0.1rem;.react-draggable-dragging{opacity:
|
|
14087
|
-
var
|
|
14067
|
+
})(["margin:0.1rem;.react-draggable-dragging{opacity:", ";}position:relative;.sprite-from-atlas-img--item{position:relative;top:1.5rem;left:1.5rem;border-color:", ";box-shadow:", " inset,", ";}&::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) {
|
|
14068
|
+
var isDraggingItem = _ref2.isDraggingItem;
|
|
14069
|
+
return isDraggingItem ? 0 : 1;
|
|
14070
|
+
}, function (_ref3) {
|
|
14071
|
+
var item = _ref3.item;
|
|
14072
|
+
return rarityColor(item);
|
|
14073
|
+
}, function (_ref4) {
|
|
14074
|
+
var item = _ref4.item;
|
|
14075
|
+
return "0 0 5px 2px " + rarityColor(item);
|
|
14076
|
+
}, function (_ref5) {
|
|
14077
|
+
var item = _ref5.item;
|
|
14078
|
+
return "0 0 4px 3px " + rarityColor(item);
|
|
14079
|
+
}, function (_ref6) {
|
|
14080
|
+
var isSelectingShortcut = _ref6.isSelectingShortcut;
|
|
14088
14081
|
return isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none';
|
|
14089
14082
|
});
|
|
14090
14083
|
var ItemContainer = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -14184,7 +14177,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
14184
14177
|
});
|
|
14185
14178
|
};
|
|
14186
14179
|
var skillName = (_item$minRequirements = item.minRequirements) == null ? void 0 : (_item$minRequirements2 = _item$minRequirements.skill) == null ? void 0 : _item$minRequirements2.name;
|
|
14187
|
-
return React__default.createElement(Container$
|
|
14180
|
+
return React__default.createElement(Container$b, {
|
|
14188
14181
|
item: item
|
|
14189
14182
|
}, React__default.createElement(Header, null, React__default.createElement("div", null, React__default.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React__default.createElement(Rarity, {
|
|
14190
14183
|
item: item
|
|
@@ -14198,7 +14191,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
14198
14191
|
"$isSpecial": true
|
|
14199
14192
|
}, "Two handed"), React__default.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React__default.createElement(StackInfo, null, "x", Math.round(((_item$stackQty = item.stackQty) != null ? _item$stackQty : 1) * 100) / 100, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React__default.createElement(MissingStatistics, null, React__default.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
|
|
14200
14193
|
};
|
|
14201
|
-
var Container$
|
|
14194
|
+
var Container$b = /*#__PURE__*/styled.div.withConfig({
|
|
14202
14195
|
displayName: "ItemInfo__Container",
|
|
14203
14196
|
componentId: "sc-1xm4q8k-0"
|
|
14204
14197
|
})(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:18rem;@media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
|
|
@@ -14344,7 +14337,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
14344
14337
|
}
|
|
14345
14338
|
return;
|
|
14346
14339
|
}, []);
|
|
14347
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
14340
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$c, {
|
|
14348
14341
|
ref: ref
|
|
14349
14342
|
}, React__default.createElement(ItemInfoDisplay, {
|
|
14350
14343
|
item: item,
|
|
@@ -14353,7 +14346,7 @@ var ItemTooltip = function ItemTooltip(_ref) {
|
|
|
14353
14346
|
equipmentSet: equipmentSet
|
|
14354
14347
|
})));
|
|
14355
14348
|
};
|
|
14356
|
-
var Container$
|
|
14349
|
+
var Container$c = /*#__PURE__*/styled.div.withConfig({
|
|
14357
14350
|
displayName: "ItemTooltip__Container",
|
|
14358
14351
|
componentId: "sc-11d9r7x-0"
|
|
14359
14352
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -14706,7 +14699,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
14706
14699
|
onChange(selectedValue);
|
|
14707
14700
|
}
|
|
14708
14701
|
}, [selectedValue]);
|
|
14709
|
-
return React__default.createElement(Container$
|
|
14702
|
+
return React__default.createElement(Container$d, {
|
|
14710
14703
|
onMouseLeave: function onMouseLeave() {
|
|
14711
14704
|
return setOpened(false);
|
|
14712
14705
|
},
|
|
@@ -14733,7 +14726,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
14733
14726
|
}, option.option);
|
|
14734
14727
|
})));
|
|
14735
14728
|
};
|
|
14736
|
-
var Container$
|
|
14729
|
+
var Container$d = /*#__PURE__*/styled.div.withConfig({
|
|
14737
14730
|
displayName: "Dropdown__Container",
|
|
14738
14731
|
componentId: "sc-8arn65-0"
|
|
14739
14732
|
})(["position:relative;width:", ";"], function (props) {
|
|
@@ -14845,7 +14838,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
14845
14838
|
var centeredX = x - OFFSET;
|
|
14846
14839
|
var centeredY = y - OFFSET;
|
|
14847
14840
|
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);
|
|
14848
|
-
return React__default.createElement(Container$
|
|
14841
|
+
return React__default.createElement(Container$e, null, React__default.createElement(SpriteContainer, {
|
|
14849
14842
|
x: centeredX,
|
|
14850
14843
|
y: centeredY
|
|
14851
14844
|
}, React__default.createElement(SpriteFromAtlas, {
|
|
@@ -14863,7 +14856,7 @@ var DraggedItem = function DraggedItem(_ref) {
|
|
|
14863
14856
|
}), stackInfo));
|
|
14864
14857
|
};
|
|
14865
14858
|
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";
|
|
14866
|
-
var Container$
|
|
14859
|
+
var Container$e = /*#__PURE__*/styled.div.withConfig({
|
|
14867
14860
|
displayName: "DraggedItem__Container",
|
|
14868
14861
|
componentId: "sc-mlzzcp-0"
|
|
14869
14862
|
})(["position:relative;"]);
|
|
@@ -15079,7 +15072,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
15079
15072
|
var _useState2 = React.useState(false),
|
|
15080
15073
|
showGoNextIndicator = _useState2[0],
|
|
15081
15074
|
setShowGoNextIndicator = _useState2[1];
|
|
15082
|
-
return React__default.createElement(Container$
|
|
15075
|
+
return React__default.createElement(Container$f, null, React__default.createElement(DynamicText, {
|
|
15083
15076
|
text: (textChunks == null ? void 0 : textChunks[chunkIndex]) || '',
|
|
15084
15077
|
onFinish: function onFinish() {
|
|
15085
15078
|
setShowGoNextIndicator(true);
|
|
@@ -15097,7 +15090,7 @@ var NPCDialogText = function NPCDialogText(_ref) {
|
|
|
15097
15090
|
}
|
|
15098
15091
|
}));
|
|
15099
15092
|
};
|
|
15100
|
-
var Container$
|
|
15093
|
+
var Container$f = /*#__PURE__*/styled.div.withConfig({
|
|
15101
15094
|
displayName: "NPCDialogText__Container",
|
|
15102
15095
|
componentId: "sc-1cxkdh9-0"
|
|
15103
15096
|
})([""]);
|
|
@@ -15249,7 +15242,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15249
15242
|
return null;
|
|
15250
15243
|
});
|
|
15251
15244
|
};
|
|
15252
|
-
return React__default.createElement(Container$
|
|
15245
|
+
return React__default.createElement(Container$g, null, React__default.createElement(QuestionContainer, null, React__default.createElement(DynamicText, {
|
|
15253
15246
|
text: currentQuestion.text,
|
|
15254
15247
|
onStart: function onStart() {
|
|
15255
15248
|
return setCanShowAnswers(false);
|
|
@@ -15259,7 +15252,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
|
|
|
15259
15252
|
}
|
|
15260
15253
|
})), canShowAnswers && React__default.createElement(AnswersContainer, null, onRenderCurrentAnswers()));
|
|
15261
15254
|
};
|
|
15262
|
-
var Container$
|
|
15255
|
+
var Container$g = /*#__PURE__*/styled.div.withConfig({
|
|
15263
15256
|
displayName: "QuestionDialog__Container",
|
|
15264
15257
|
componentId: "sc-bxc5u0-0"
|
|
15265
15258
|
})(["display:flex;word-break:break-all;box-sizing:border-box;justify-content:flex-start;align-items:flex-start;flex-wrap:wrap;"]);
|
|
@@ -15319,7 +15312,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15319
15312
|
}
|
|
15320
15313
|
})), type === exports.NPCDialogType.TextAndThumbnail && React__default.createElement(ThumbnailContainer, null, React__default.createElement(NPCThumbnail, {
|
|
15321
15314
|
src: imagePath || img$7
|
|
15322
|
-
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
15315
|
+
}))) : React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$h, null, React__default.createElement(TextContainer$1, {
|
|
15323
15316
|
flex: type === exports.NPCDialogType.TextAndThumbnail ? '70%' : '100%'
|
|
15324
15317
|
}, React__default.createElement(NPCDialogText, {
|
|
15325
15318
|
type: type,
|
|
@@ -15333,7 +15326,7 @@ var NPCDialog = function NPCDialog(_ref) {
|
|
|
15333
15326
|
src: imagePath || img$7
|
|
15334
15327
|
})))));
|
|
15335
15328
|
};
|
|
15336
|
-
var Container$
|
|
15329
|
+
var Container$h = /*#__PURE__*/styled.div.withConfig({
|
|
15337
15330
|
displayName: "NPCDialog__Container",
|
|
15338
15331
|
componentId: "sc-1b4aw74-0"
|
|
15339
15332
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15389,7 +15382,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15389
15382
|
type: exports.RPGUIContainerTypes.FramedGold,
|
|
15390
15383
|
width: '50%',
|
|
15391
15384
|
height: '180px'
|
|
15392
|
-
}, React__default.createElement(React__default.Fragment, null, React__default.createElement(Container$
|
|
15385
|
+
}, 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, {
|
|
15393
15386
|
flex: '70%'
|
|
15394
15387
|
}, React__default.createElement(NPCDialogText, {
|
|
15395
15388
|
onStartStep: function onStartStep() {
|
|
@@ -15431,7 +15424,7 @@ var NPCMultiDialog = function NPCMultiDialog(_ref) {
|
|
|
15431
15424
|
src: img$6
|
|
15432
15425
|
}))), ")"));
|
|
15433
15426
|
};
|
|
15434
|
-
var Container$
|
|
15427
|
+
var Container$i = /*#__PURE__*/styled.div.withConfig({
|
|
15435
15428
|
displayName: "NPCMultiDialog__Container",
|
|
15436
15429
|
componentId: "sc-rvu5wg-0"
|
|
15437
15430
|
})(["display:flex;width:100%;height:100%;box-sizing:border-box;justify-content:center;align-items:flex-start;position:relative;"]);
|
|
@@ -15722,7 +15715,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15722
15715
|
}
|
|
15723
15716
|
return null;
|
|
15724
15717
|
};
|
|
15725
|
-
return React__default.createElement(Container$
|
|
15718
|
+
return React__default.createElement(Container$j, null, React__default.createElement("p", null, "Shortcuts:"), React__default.createElement(List, {
|
|
15726
15719
|
id: "shortcuts_list"
|
|
15727
15720
|
}, Array.from({
|
|
15728
15721
|
length: 12
|
|
@@ -15740,7 +15733,7 @@ var ShortcutsSetter = function ShortcutsSetter(_ref) {
|
|
|
15740
15733
|
}, getContent(i));
|
|
15741
15734
|
})));
|
|
15742
15735
|
};
|
|
15743
|
-
var Container$
|
|
15736
|
+
var Container$j = /*#__PURE__*/styled.div.withConfig({
|
|
15744
15737
|
displayName: "ShortcutsSetter__Container",
|
|
15745
15738
|
componentId: "sc-xuouuf-0"
|
|
15746
15739
|
})(["p{margin:0;margin-left:0.5rem;font-size:10px;}width:100%;"]);
|
|
@@ -16186,7 +16179,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
16186
16179
|
onSelected = _ref.onSelected,
|
|
16187
16180
|
x = _ref.x,
|
|
16188
16181
|
y = _ref.y;
|
|
16189
|
-
return React__default.createElement(Container$
|
|
16182
|
+
return React__default.createElement(Container$k, {
|
|
16190
16183
|
x: x,
|
|
16191
16184
|
y: y
|
|
16192
16185
|
}, React__default.createElement("ul", {
|
|
@@ -16203,7 +16196,7 @@ var ListMenu = function ListMenu(_ref) {
|
|
|
16203
16196
|
}, (params == null ? void 0 : params.text) || 'No text');
|
|
16204
16197
|
})));
|
|
16205
16198
|
};
|
|
16206
|
-
var Container$
|
|
16199
|
+
var Container$k = /*#__PURE__*/styled.div.withConfig({
|
|
16207
16200
|
displayName: "ListMenu__Container",
|
|
16208
16201
|
componentId: "sc-i9097t-0"
|
|
16209
16202
|
})(["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) {
|
|
@@ -16222,7 +16215,7 @@ var Pager = function Pager(_ref) {
|
|
|
16222
16215
|
itemsPerPage = _ref.itemsPerPage,
|
|
16223
16216
|
onPageChange = _ref.onPageChange;
|
|
16224
16217
|
var totalPages = Math.ceil(totalItems / itemsPerPage);
|
|
16225
|
-
return React__default.createElement(Container$
|
|
16218
|
+
return React__default.createElement(Container$l, null, React__default.createElement("p", null, "Total items: ", totalItems), React__default.createElement(PagerContainer, null, React__default.createElement("button", {
|
|
16226
16219
|
disabled: currentPage === 1,
|
|
16227
16220
|
onPointerDown: function onPointerDown() {
|
|
16228
16221
|
return onPageChange(Math.max(currentPage - 1, 1));
|
|
@@ -16236,7 +16229,7 @@ var Pager = function Pager(_ref) {
|
|
|
16236
16229
|
}
|
|
16237
16230
|
}, '>')));
|
|
16238
16231
|
};
|
|
16239
|
-
var Container$
|
|
16232
|
+
var Container$l = /*#__PURE__*/styled.div.withConfig({
|
|
16240
16233
|
displayName: "Pager__Container",
|
|
16241
16234
|
componentId: "sc-1ekmf50-0"
|
|
16242
16235
|
})(["display:flex;flex-direction:column;align-items:center;p{margin:0;font-size:", ";}"], uiFonts.size.xsmall);
|
|
@@ -16249,7 +16242,7 @@ var ConfirmModal = function ConfirmModal(_ref) {
|
|
|
16249
16242
|
var onConfirm = _ref.onConfirm,
|
|
16250
16243
|
onClose = _ref.onClose,
|
|
16251
16244
|
message = _ref.message;
|
|
16252
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$
|
|
16245
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Background, null), React__default.createElement(Container$m, {
|
|
16253
16246
|
onPointerDown: onClose
|
|
16254
16247
|
}, React__default.createElement(DraggableContainer, {
|
|
16255
16248
|
width: "auto",
|
|
@@ -16272,7 +16265,7 @@ var Background = /*#__PURE__*/styled.div.withConfig({
|
|
|
16272
16265
|
displayName: "ConfirmModal__Background",
|
|
16273
16266
|
componentId: "sc-11qkyu1-0"
|
|
16274
16267
|
})(["position:absolute;width:100%;height:100%;background-color:#000000;opacity:0.5;left:0;top:0;z-index:1000;"]);
|
|
16275
|
-
var Container$
|
|
16268
|
+
var Container$m = /*#__PURE__*/styled.div.withConfig({
|
|
16276
16269
|
displayName: "ConfirmModal__Container",
|
|
16277
16270
|
componentId: "sc-11qkyu1-1"
|
|
16278
16271
|
})(["position:absolute;width:100%;height:100%;left:0;top:0;display:flex;justify-content:center;align-items:center;z-index:1001;"]);
|
|
@@ -17237,7 +17230,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
17237
17230
|
}
|
|
17238
17231
|
return value * 100 / max;
|
|
17239
17232
|
};
|
|
17240
|
-
return React__default.createElement(Container$
|
|
17233
|
+
return React__default.createElement(Container$n, {
|
|
17241
17234
|
className: "rpgui-progress",
|
|
17242
17235
|
"data-value": calculatePercentageValue(max, value) / 100,
|
|
17243
17236
|
"data-rpguitype": "progress",
|
|
@@ -17267,7 +17260,7 @@ var TextOverlay$1 = /*#__PURE__*/styled.div.withConfig({
|
|
|
17267
17260
|
displayName: "ProgressBar__TextOverlay",
|
|
17268
17261
|
componentId: "sc-qa6fzh-1"
|
|
17269
17262
|
})(["width:100%;position:relative;"]);
|
|
17270
|
-
var Container$
|
|
17263
|
+
var Container$n = /*#__PURE__*/styled.div.withConfig({
|
|
17271
17264
|
displayName: "ProgressBar__Container",
|
|
17272
17265
|
componentId: "sc-qa6fzh-2"
|
|
17273
17266
|
})(["display:flex;flex-direction:column;min-width:", "px;width:", "%;justify-content:start;align-items:flex-start;", " @media (max-width:950px){transform:scale(", ");}"], function (props) {
|
|
@@ -17615,7 +17608,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17615
17608
|
bgColor = _ref$bgColor === void 0 ? 'red' : _ref$bgColor,
|
|
17616
17609
|
_ref$margin = _ref.margin,
|
|
17617
17610
|
margin = _ref$margin === void 0 ? 20 : _ref$margin;
|
|
17618
|
-
return React__default.createElement(Container$
|
|
17611
|
+
return React__default.createElement(Container$o, {
|
|
17619
17612
|
className: "simple-progress-bar"
|
|
17620
17613
|
}, React__default.createElement(ProgressBarContainer, {
|
|
17621
17614
|
margin: margin
|
|
@@ -17624,7 +17617,7 @@ var SimpleProgressBar = function SimpleProgressBar(_ref) {
|
|
|
17624
17617
|
bgColor: bgColor
|
|
17625
17618
|
}))));
|
|
17626
17619
|
};
|
|
17627
|
-
var Container$
|
|
17620
|
+
var Container$o = /*#__PURE__*/styled.div.withConfig({
|
|
17628
17621
|
displayName: "SimpleProgressBar__Container",
|
|
17629
17622
|
componentId: "sc-mbeil3-0"
|
|
17630
17623
|
})(["display:flex;justify-content:center;align-items:center;width:100%;"]);
|
|
@@ -17913,7 +17906,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17913
17906
|
castingType = spell.castingType,
|
|
17914
17907
|
cooldown = spell.cooldown,
|
|
17915
17908
|
maxDistanceGrid = spell.maxDistanceGrid;
|
|
17916
|
-
return React__default.createElement(Container$
|
|
17909
|
+
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", {
|
|
17917
17910
|
className: "label"
|
|
17918
17911
|
}, "Casting Type:"), React__default.createElement("div", {
|
|
17919
17912
|
className: "value"
|
|
@@ -17939,7 +17932,7 @@ var SpellInfo = function SpellInfo(_ref) {
|
|
|
17939
17932
|
className: "value"
|
|
17940
17933
|
}, requiredItem))), React__default.createElement(Description$2, null, description));
|
|
17941
17934
|
};
|
|
17942
|
-
var Container$
|
|
17935
|
+
var Container$p = /*#__PURE__*/styled.div.withConfig({
|
|
17943
17936
|
displayName: "SpellInfo__Container",
|
|
17944
17937
|
componentId: "sc-4hbw3q-0"
|
|
17945
17938
|
})(["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);
|
|
@@ -17993,7 +17986,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
17993
17986
|
var _ref$current;
|
|
17994
17987
|
(_ref$current = ref.current) == null ? void 0 : _ref$current.classList.add('fadeOut');
|
|
17995
17988
|
};
|
|
17996
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
17989
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$q, {
|
|
17997
17990
|
ref: ref,
|
|
17998
17991
|
onTouchEnd: function onTouchEnd() {
|
|
17999
17992
|
handleFadeOut();
|
|
@@ -18018,7 +18011,7 @@ var MobileSpellTooltip = function MobileSpellTooltip(_ref) {
|
|
|
18018
18011
|
}, option.text);
|
|
18019
18012
|
}))));
|
|
18020
18013
|
};
|
|
18021
|
-
var Container$
|
|
18014
|
+
var Container$q = /*#__PURE__*/styled.div.withConfig({
|
|
18022
18015
|
displayName: "MobileSpellTooltip__Container",
|
|
18023
18016
|
componentId: "sc-6p7uvr-0"
|
|
18024
18017
|
})(["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;}"]);
|
|
@@ -18059,13 +18052,13 @@ var MagicTooltip = function MagicTooltip(_ref) {
|
|
|
18059
18052
|
}
|
|
18060
18053
|
return;
|
|
18061
18054
|
}, []);
|
|
18062
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$
|
|
18055
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(Container$r, {
|
|
18063
18056
|
ref: ref
|
|
18064
18057
|
}, React__default.createElement(SpellInfoDisplay, {
|
|
18065
18058
|
spell: spell
|
|
18066
18059
|
})));
|
|
18067
18060
|
};
|
|
18068
|
-
var Container$
|
|
18061
|
+
var Container$r = /*#__PURE__*/styled.div.withConfig({
|
|
18069
18062
|
displayName: "SpellTooltip__Container",
|
|
18070
18063
|
componentId: "sc-1go0gwg-0"
|
|
18071
18064
|
})(["position:absolute;z-index:100;pointer-events:none;left:0;top:0;opacity:0;transition:opacity 0.08s;"]);
|
|
@@ -18125,7 +18118,7 @@ var Spell = function Spell(_ref) {
|
|
|
18125
18118
|
var IMAGE_SCALE = 2;
|
|
18126
18119
|
return React__default.createElement(SpellInfoWrapper, {
|
|
18127
18120
|
spell: spell
|
|
18128
|
-
}, React__default.createElement(Container$
|
|
18121
|
+
}, React__default.createElement(Container$s, {
|
|
18129
18122
|
onPointerUp: onPointerUp == null ? void 0 : onPointerUp.bind(null, spellKey),
|
|
18130
18123
|
isSettingShortcut: isSettingShortcut && !disabled,
|
|
18131
18124
|
className: "spell"
|
|
@@ -18144,7 +18137,7 @@ var Spell = function Spell(_ref) {
|
|
|
18144
18137
|
className: "mana"
|
|
18145
18138
|
}, manaCost))));
|
|
18146
18139
|
};
|
|
18147
|
-
var Container$
|
|
18140
|
+
var Container$s = /*#__PURE__*/styled.button.withConfig({
|
|
18148
18141
|
displayName: "Spell__Container",
|
|
18149
18142
|
componentId: "sc-j96fa2-0"
|
|
18150
18143
|
})(["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) {
|
|
@@ -18223,7 +18216,7 @@ var Spellbook = function Spellbook(_ref) {
|
|
|
18223
18216
|
height: "inherit",
|
|
18224
18217
|
cancelDrag: "#spellbook-search, #shortcuts_list, .spell",
|
|
18225
18218
|
scale: scale
|
|
18226
|
-
}, React__default.createElement(Container$
|
|
18219
|
+
}, React__default.createElement(Container$t, null, React__default.createElement(Title$b, null, "Learned Spells"), React__default.createElement(ShortcutsSetter, {
|
|
18227
18220
|
setSettingShortcutIndex: setSettingShortcutIndex,
|
|
18228
18221
|
settingShortcutIndex: settingShortcutIndex,
|
|
18229
18222
|
shortcuts: shortcuts,
|
|
@@ -18259,7 +18252,7 @@ var Title$b = /*#__PURE__*/styled.h1.withConfig({
|
|
|
18259
18252
|
displayName: "Spellbook__Title",
|
|
18260
18253
|
componentId: "sc-r02nfq-0"
|
|
18261
18254
|
})(["font-size:", " !important;margin-bottom:0 !important;"], uiFonts.size.large);
|
|
18262
|
-
var Container$
|
|
18255
|
+
var Container$t = /*#__PURE__*/styled.div.withConfig({
|
|
18263
18256
|
displayName: "Spellbook__Container",
|
|
18264
18257
|
componentId: "sc-r02nfq-1"
|
|
18265
18258
|
})(["width:100%;height:100%;color:white;display:flex;flex-direction:column;"]);
|
|
@@ -18605,11 +18598,11 @@ var Truncate = function Truncate(_ref) {
|
|
|
18605
18598
|
var _ref$maxLines = _ref.maxLines,
|
|
18606
18599
|
maxLines = _ref$maxLines === void 0 ? 1 : _ref$maxLines,
|
|
18607
18600
|
children = _ref.children;
|
|
18608
|
-
return React__default.createElement(Container$
|
|
18601
|
+
return React__default.createElement(Container$u, {
|
|
18609
18602
|
maxLines: maxLines
|
|
18610
18603
|
}, children);
|
|
18611
18604
|
};
|
|
18612
|
-
var Container$
|
|
18605
|
+
var Container$u = /*#__PURE__*/styled.div.withConfig({
|
|
18613
18606
|
displayName: "Truncate__Container",
|
|
18614
18607
|
componentId: "sc-6x00qb-0"
|
|
18615
18608
|
})(["display:-webkit-box;max-width:100%;max-height:100%;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], function (props) {
|