@rpg-engine/long-bow 0.8.190 → 0.8.192
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/SkillProgressBar.d.ts +1 -0
- package/dist/components/SkillsContainer.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +142 -120
- 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 +143 -122
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SkillProgressBar.tsx +21 -2
- package/src/components/SkillsContainer.tsx +4 -0
- package/src/index.tsx +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './components/Chat/Chat';
|
|
|
7
7
|
export * from './components/Chatdeprecated/ChatDeprecated';
|
|
8
8
|
export * from './components/ChatRevamp/ChatRevamp';
|
|
9
9
|
export * from './components/CheckButton';
|
|
10
|
+
export * from './components/ConfirmModal';
|
|
10
11
|
export * from './components/CheckItem';
|
|
11
12
|
export * from './components/CircularController/CircularController';
|
|
12
13
|
export * from './components/CraftBook/CraftBook';
|
|
@@ -16,9 +16,9 @@ var reactErrorBoundary = require('react-error-boundary');
|
|
|
16
16
|
var fa = require('react-icons/fa');
|
|
17
17
|
var rx = require('react-icons/rx');
|
|
18
18
|
var io = require('react-icons/io');
|
|
19
|
-
var Draggable = _interopDefault(require('react-draggable'));
|
|
20
19
|
var ReactDOM = require('react-dom');
|
|
21
20
|
var ReactDOM__default = _interopDefault(ReactDOM);
|
|
21
|
+
var Draggable = _interopDefault(require('react-draggable'));
|
|
22
22
|
var lodash = require('lodash');
|
|
23
23
|
var mobxReactLite = require('mobx-react-lite');
|
|
24
24
|
var ai = require('react-icons/ai');
|
|
@@ -36035,6 +36035,105 @@ var CheckButton = function CheckButton(_ref) {
|
|
|
36035
36035
|
}));
|
|
36036
36036
|
};
|
|
36037
36037
|
|
|
36038
|
+
var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
|
|
36039
|
+
var ModalPortal = function ModalPortal(_ref) {
|
|
36040
|
+
var children = _ref.children;
|
|
36041
|
+
return ReactDOM__default.createPortal(React__default.createElement(Container$9, {
|
|
36042
|
+
className: "rpgui-content"
|
|
36043
|
+
}, children), modalRoot);
|
|
36044
|
+
};
|
|
36045
|
+
var Container$9 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36046
|
+
displayName: "ModalPortal__Container",
|
|
36047
|
+
componentId: "sc-dgmp04-0"
|
|
36048
|
+
})(["position:static !important;"]);
|
|
36049
|
+
|
|
36050
|
+
// Global style to prevent body scrolling when modal is open
|
|
36051
|
+
var GlobalStyle = /*#__PURE__*/styled.createGlobalStyle(["body{overflow:hidden;width:100%;height:100%;}"]);
|
|
36052
|
+
var ConfirmModal = function ConfirmModal(_ref) {
|
|
36053
|
+
var onConfirm = _ref.onConfirm,
|
|
36054
|
+
onClose = _ref.onClose,
|
|
36055
|
+
_ref$message = _ref.message,
|
|
36056
|
+
message = _ref$message === void 0 ? 'Are you sure?' : _ref$message;
|
|
36057
|
+
var handleConfirm = React.useCallback(function (e) {
|
|
36058
|
+
e.preventDefault();
|
|
36059
|
+
e.stopPropagation();
|
|
36060
|
+
onConfirm();
|
|
36061
|
+
}, [onConfirm]);
|
|
36062
|
+
var handleClose = React.useCallback(function (e) {
|
|
36063
|
+
e.preventDefault();
|
|
36064
|
+
e.stopPropagation();
|
|
36065
|
+
onClose();
|
|
36066
|
+
}, [onClose]);
|
|
36067
|
+
// Fix type issues by separating event handlers for different event types
|
|
36068
|
+
var stopPropagationClick = React.useCallback(function (e) {
|
|
36069
|
+
e.stopPropagation();
|
|
36070
|
+
}, []);
|
|
36071
|
+
var stopPropagationTouch = React.useCallback(function (e) {
|
|
36072
|
+
e.stopPropagation();
|
|
36073
|
+
}, []);
|
|
36074
|
+
var stopPropagationPointer = React.useCallback(function (e) {
|
|
36075
|
+
e.stopPropagation();
|
|
36076
|
+
}, []);
|
|
36077
|
+
return React__default.createElement(ModalPortal, null, React__default.createElement(GlobalStyle, null), React__default.createElement(Overlay, {
|
|
36078
|
+
onPointerDown: handleClose
|
|
36079
|
+
}), React__default.createElement(ModalContainer, null, React__default.createElement(ModalContent, {
|
|
36080
|
+
onClick: stopPropagationClick,
|
|
36081
|
+
onTouchStart: stopPropagationTouch,
|
|
36082
|
+
onTouchEnd: stopPropagationTouch,
|
|
36083
|
+
onTouchMove: stopPropagationTouch,
|
|
36084
|
+
onPointerDown: stopPropagationPointer
|
|
36085
|
+
}, React__default.createElement(Header$1, null, React__default.createElement(Title, null, "Confirm"), React__default.createElement(CloseButton$3, {
|
|
36086
|
+
onPointerDown: handleClose,
|
|
36087
|
+
"aria-label": "Close"
|
|
36088
|
+
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(MessageContainer, null, typeof message === 'string' ? React__default.createElement(Message$1, null, message) : message), React__default.createElement(ButtonsContainer$1, null, React__default.createElement(CancelButtonWrapper, null, React__default.createElement(Button, {
|
|
36089
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
36090
|
+
onPointerDown: handleClose
|
|
36091
|
+
}, "No")), React__default.createElement(Button, {
|
|
36092
|
+
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
36093
|
+
onPointerDown: handleConfirm
|
|
36094
|
+
}, "Yes")))));
|
|
36095
|
+
};
|
|
36096
|
+
var Overlay = /*#__PURE__*/styled__default.div.withConfig({
|
|
36097
|
+
displayName: "ConfirmModal__Overlay",
|
|
36098
|
+
componentId: "sc-11qkyu1-0"
|
|
36099
|
+
})(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:1000;animation:fadeIn 0.2s ease-out;cursor:pointer;touch-action:none;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]);
|
|
36100
|
+
var ModalContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
36101
|
+
displayName: "ConfirmModal__ModalContainer",
|
|
36102
|
+
componentId: "sc-11qkyu1-1"
|
|
36103
|
+
})(["position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;z-index:1001;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);"]);
|
|
36104
|
+
var ModalContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
36105
|
+
displayName: "ConfirmModal__ModalContent",
|
|
36106
|
+
componentId: "sc-11qkyu1-2"
|
|
36107
|
+
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}@media (max-width:768px){width:85%;}"]);
|
|
36108
|
+
var Header$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36109
|
+
displayName: "ConfirmModal__Header",
|
|
36110
|
+
componentId: "sc-11qkyu1-3"
|
|
36111
|
+
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
36112
|
+
var Title = /*#__PURE__*/styled__default.h3.withConfig({
|
|
36113
|
+
displayName: "ConfirmModal__Title",
|
|
36114
|
+
componentId: "sc-11qkyu1-4"
|
|
36115
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
36116
|
+
var CloseButton$3 = /*#__PURE__*/styled__default.button.withConfig({
|
|
36117
|
+
displayName: "ConfirmModal__CloseButton",
|
|
36118
|
+
componentId: "sc-11qkyu1-5"
|
|
36119
|
+
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
36120
|
+
var MessageContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
36121
|
+
displayName: "ConfirmModal__MessageContainer",
|
|
36122
|
+
componentId: "sc-11qkyu1-6"
|
|
36123
|
+
})(["text-align:center;"]);
|
|
36124
|
+
var Message$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
36125
|
+
displayName: "ConfirmModal__Message",
|
|
36126
|
+
componentId: "sc-11qkyu1-7"
|
|
36127
|
+
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.6rem;color:rgba(255,255,255,0.85);line-height:1.8;"]);
|
|
36128
|
+
var ButtonsContainer$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36129
|
+
displayName: "ConfirmModal__ButtonsContainer",
|
|
36130
|
+
componentId: "sc-11qkyu1-8"
|
|
36131
|
+
})(["display:flex;justify-content:center;gap:20px;margin-top:4px;@media (max-width:768px){gap:30px;}"]);
|
|
36132
|
+
var CancelButtonWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
36133
|
+
displayName: "ConfirmModal__CancelButtonWrapper",
|
|
36134
|
+
componentId: "sc-11qkyu1-9"
|
|
36135
|
+
})(["filter:grayscale(0.7);"]);
|
|
36136
|
+
|
|
36038
36137
|
var CheckItem = function CheckItem(_ref) {
|
|
36039
36138
|
var label = _ref.label,
|
|
36040
36139
|
_ref$defaultValue = _ref.defaultValue,
|
|
@@ -36215,7 +36314,7 @@ var CircularController = function CircularController(_ref) {
|
|
|
36215
36314
|
return word[0];
|
|
36216
36315
|
})));
|
|
36217
36316
|
};
|
|
36218
|
-
return React__default.createElement(ButtonsContainer$
|
|
36317
|
+
return React__default.createElement(ButtonsContainer$2, null, React__default.createElement(ShortcutsContainer, null, Array.from({
|
|
36219
36318
|
length: 12
|
|
36220
36319
|
}).map(function (_, i) {
|
|
36221
36320
|
return renderShortcut(i);
|
|
@@ -36237,7 +36336,7 @@ var CancelButton = /*#__PURE__*/styled__default(Button$1).withConfig({
|
|
|
36237
36336
|
displayName: "CircularController__CancelButton",
|
|
36238
36337
|
componentId: "sc-1fewf3h-1"
|
|
36239
36338
|
})(["width:3rem;height:3rem;font-size:0.8rem;position:relative;left:2.6rem;span{margin-top:4px;margin-left:2px;pointer-events:none;}"]);
|
|
36240
|
-
var ButtonsContainer$
|
|
36339
|
+
var ButtonsContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36241
36340
|
displayName: "CircularController__ButtonsContainer",
|
|
36242
36341
|
componentId: "sc-1fewf3h-2"
|
|
36243
36342
|
})(["display:flex;align-items:center;justify-content:center;gap:0.5rem;scale:0.9;"]);
|
|
@@ -36392,7 +36491,7 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
36392
36491
|
},
|
|
36393
36492
|
defaultPosition: initialPosition,
|
|
36394
36493
|
scale: scale
|
|
36395
|
-
}, React__default.createElement(Container$
|
|
36494
|
+
}, React__default.createElement(Container$a, {
|
|
36396
36495
|
ref: draggableRef,
|
|
36397
36496
|
width: width,
|
|
36398
36497
|
height: height || 'auto',
|
|
@@ -36403,15 +36502,15 @@ var DraggableContainer = function DraggableContainer(_ref) {
|
|
|
36403
36502
|
opacity: opacity
|
|
36404
36503
|
}, title && React__default.createElement(TitleContainer, {
|
|
36405
36504
|
className: "drag-handler"
|
|
36406
|
-
}, React__default.createElement(Title, null, imgSrc && React__default.createElement(Icon, {
|
|
36505
|
+
}, React__default.createElement(Title$1, null, imgSrc && React__default.createElement(Icon, {
|
|
36407
36506
|
src: imgSrc,
|
|
36408
36507
|
width: imgWidth
|
|
36409
|
-
}), title)), onCloseButton && React__default.createElement(CloseButton$
|
|
36508
|
+
}), title)), onCloseButton && React__default.createElement(CloseButton$4, {
|
|
36410
36509
|
className: "container-close",
|
|
36411
36510
|
onPointerDown: onCloseButton
|
|
36412
36511
|
}, "X"), children));
|
|
36413
36512
|
};
|
|
36414
|
-
var Container$
|
|
36513
|
+
var Container$a = /*#__PURE__*/styled__default.div.withConfig({
|
|
36415
36514
|
displayName: "DraggableContainer__Container",
|
|
36416
36515
|
componentId: "sc-184mpyl-0"
|
|
36417
36516
|
})(["height:", ";width:", ";min-width:", ";min-height:", ";display:flex;flex-wrap:wrap;image-rendering:pixelated;overflow-y:hidden;", " ", " &.rpgui-container{padding-top:1.5rem;}"], function (props) {
|
|
@@ -36432,7 +36531,7 @@ var Container$9 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36432
36531
|
var isFullScreen = _ref6.isFullScreen;
|
|
36433
36532
|
return isFullScreen && styled.css(["justify-content:center;align-items:flex-start;align-content:flex-start;"]);
|
|
36434
36533
|
});
|
|
36435
|
-
var CloseButton$
|
|
36534
|
+
var CloseButton$4 = /*#__PURE__*/styled__default.div.withConfig({
|
|
36436
36535
|
displayName: "DraggableContainer__CloseButton",
|
|
36437
36536
|
componentId: "sc-184mpyl-1"
|
|
36438
36537
|
})(["position:absolute;top:3px;right:0px;color:white;z-index:22;font-size:1.5rem;@media (max-width:950px){font-size:1.7rem;padding:12px;}"]);
|
|
@@ -36440,7 +36539,7 @@ var TitleContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
36440
36539
|
displayName: "DraggableContainer__TitleContainer",
|
|
36441
36540
|
componentId: "sc-184mpyl-2"
|
|
36442
36541
|
})(["width:100%;height:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;max-height:42px;"]);
|
|
36443
|
-
var Title = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36542
|
+
var Title$1 = /*#__PURE__*/styled__default.h1.withConfig({
|
|
36444
36543
|
displayName: "DraggableContainer__Title",
|
|
36445
36544
|
componentId: "sc-184mpyl-3"
|
|
36446
36545
|
})(["color:white;z-index:22;font-size:", ";"], uiFonts.size.large);
|
|
@@ -36488,7 +36587,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
36488
36587
|
onChange(selectedValue);
|
|
36489
36588
|
}
|
|
36490
36589
|
}, [selectedValue]);
|
|
36491
|
-
return React__default.createElement(Container$
|
|
36590
|
+
return React__default.createElement(Container$b, {
|
|
36492
36591
|
onMouseLeave: function onMouseLeave() {
|
|
36493
36592
|
return setOpened(false);
|
|
36494
36593
|
},
|
|
@@ -36516,7 +36615,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
36516
36615
|
}, option.option);
|
|
36517
36616
|
})));
|
|
36518
36617
|
};
|
|
36519
|
-
var Container$
|
|
36618
|
+
var Container$b = /*#__PURE__*/styled__default.div.withConfig({
|
|
36520
36619
|
displayName: "Dropdown__Container",
|
|
36521
36620
|
componentId: "sc-8arn65-0"
|
|
36522
36621
|
})(["position:relative;width:", ";"], function (props) {
|
|
@@ -36537,18 +36636,6 @@ var DropdownOptions$1 = /*#__PURE__*/styled__default.ul.withConfig({
|
|
|
36537
36636
|
return props.opensUp ? 'auto' : '100%';
|
|
36538
36637
|
});
|
|
36539
36638
|
|
|
36540
|
-
var modalRoot = /*#__PURE__*/document.getElementById('modal-root');
|
|
36541
|
-
var ModalPortal = function ModalPortal(_ref) {
|
|
36542
|
-
var children = _ref.children;
|
|
36543
|
-
return ReactDOM__default.createPortal(React__default.createElement(Container$b, {
|
|
36544
|
-
className: "rpgui-content"
|
|
36545
|
-
}, children), modalRoot);
|
|
36546
|
-
};
|
|
36547
|
-
var Container$b = /*#__PURE__*/styled__default.div.withConfig({
|
|
36548
|
-
displayName: "ModalPortal__Container",
|
|
36549
|
-
componentId: "sc-dgmp04-0"
|
|
36550
|
-
})(["position:static !important;"]);
|
|
36551
|
-
|
|
36552
36639
|
function useTouchTarget() {
|
|
36553
36640
|
var getTouchTarget = React.useCallback(function (e) {
|
|
36554
36641
|
// Check if it's a touch event
|
|
@@ -37449,7 +37536,7 @@ var ItemInfo = function ItemInfo(_ref) {
|
|
|
37449
37536
|
var skillName = (_item$minRequirements = item.minRequirements) == null ? void 0 : (_item$minRequirements2 = _item$minRequirements.skill) == null ? void 0 : _item$minRequirements2.name;
|
|
37450
37537
|
return React__default.createElement(Container$d, {
|
|
37451
37538
|
item: item
|
|
37452
|
-
}, React__default.createElement(Header$
|
|
37539
|
+
}, React__default.createElement(Header$2, null, React__default.createElement("div", null, React__default.createElement(Title$2, null, item.name), item.rarity !== 'Common' && React__default.createElement(Rarity, {
|
|
37453
37540
|
item: item
|
|
37454
37541
|
}, item.rarity), React__default.createElement(Type, null, item.subType)), React__default.createElement(AllowedSlots, null, renderAvaibleSlots())), item.minRequirements && React__default.createElement(LevelRequirement, null, React__default.createElement("div", {
|
|
37455
37542
|
className: "title"
|
|
@@ -37472,7 +37559,7 @@ var Container$d = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37472
37559
|
var item = _ref3.item;
|
|
37473
37560
|
return "0 0 5px 2px " + rarityColor(item);
|
|
37474
37561
|
});
|
|
37475
|
-
var Title$
|
|
37562
|
+
var Title$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
37476
37563
|
displayName: "ItemInfo__Title",
|
|
37477
37564
|
componentId: "sc-1xm4q8k-1"
|
|
37478
37565
|
})(["font-size:", ";font-weight:bold;margin-bottom:0.5rem;display:flex;align-items:center;margin:0;"], uiFonts.size.medium);
|
|
@@ -37502,7 +37589,7 @@ var Description = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
37502
37589
|
displayName: "ItemInfo__Description",
|
|
37503
37590
|
componentId: "sc-1xm4q8k-6"
|
|
37504
37591
|
})(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
|
|
37505
|
-
var Header$
|
|
37592
|
+
var Header$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
37506
37593
|
displayName: "ItemInfo__Header",
|
|
37507
37594
|
componentId: "sc-1xm4q8k-7"
|
|
37508
37595
|
})(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
|
|
@@ -38091,7 +38178,7 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
38091
38178
|
cancelDrag: ".inputRadioCraftBook",
|
|
38092
38179
|
onCloseButton: onClose,
|
|
38093
38180
|
scale: scale
|
|
38094
|
-
}, React__default.createElement(Wrapper, null, React__default.createElement(HeaderContainer, null, React__default.createElement(Title$
|
|
38181
|
+
}, React__default.createElement(Wrapper, null, React__default.createElement(HeaderContainer, null, React__default.createElement(Title$3, null, "Craftbook"), React__default.createElement(HeaderControls, null, React__default.createElement(DropdownWrapper, null, React__default.createElement(Dropdown, {
|
|
38095
38182
|
options: categoryOptions,
|
|
38096
38183
|
onChange: function onChange(value) {
|
|
38097
38184
|
setSelectedType(value);
|
|
@@ -38185,7 +38272,7 @@ var HeaderContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
38185
38272
|
displayName: "CraftBook__HeaderContainer",
|
|
38186
38273
|
componentId: "sc-19q95ue-1"
|
|
38187
38274
|
})(["display:flex;justify-content:space-between;align-items:center;width:100%;padding:16px 16px 0;"]);
|
|
38188
|
-
var Title$
|
|
38275
|
+
var Title$3 = /*#__PURE__*/styled__default.h1.withConfig({
|
|
38189
38276
|
displayName: "CraftBook__Title",
|
|
38190
38277
|
componentId: "sc-19q95ue-2"
|
|
38191
38278
|
})(["font-size:1.2rem;color:", " !important;margin:0;text-shadow:2px 2px 2px rgba(0,0,0,0.5);"], uiColors.yellow);
|
|
@@ -39378,93 +39465,6 @@ var EmptyMessage = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
39378
39465
|
componentId: "sc-debjdj-14"
|
|
39379
39466
|
})(["font-size:8px !important;color:", " !important;font-family:'Press Start 2P',cursive !important;text-align:center;padding:20px;"], uiColors.lightGray);
|
|
39380
39467
|
|
|
39381
|
-
// Global style to prevent body scrolling when modal is open
|
|
39382
|
-
var GlobalStyle = /*#__PURE__*/styled.createGlobalStyle(["body{overflow:hidden;width:100%;height:100%;}"]);
|
|
39383
|
-
var ConfirmModal = function ConfirmModal(_ref) {
|
|
39384
|
-
var onConfirm = _ref.onConfirm,
|
|
39385
|
-
onClose = _ref.onClose,
|
|
39386
|
-
_ref$message = _ref.message,
|
|
39387
|
-
message = _ref$message === void 0 ? 'Are you sure?' : _ref$message;
|
|
39388
|
-
var handleConfirm = React.useCallback(function (e) {
|
|
39389
|
-
e.preventDefault();
|
|
39390
|
-
e.stopPropagation();
|
|
39391
|
-
onConfirm();
|
|
39392
|
-
}, [onConfirm]);
|
|
39393
|
-
var handleClose = React.useCallback(function (e) {
|
|
39394
|
-
e.preventDefault();
|
|
39395
|
-
e.stopPropagation();
|
|
39396
|
-
onClose();
|
|
39397
|
-
}, [onClose]);
|
|
39398
|
-
// Fix type issues by separating event handlers for different event types
|
|
39399
|
-
var stopPropagationClick = React.useCallback(function (e) {
|
|
39400
|
-
e.stopPropagation();
|
|
39401
|
-
}, []);
|
|
39402
|
-
var stopPropagationTouch = React.useCallback(function (e) {
|
|
39403
|
-
e.stopPropagation();
|
|
39404
|
-
}, []);
|
|
39405
|
-
var stopPropagationPointer = React.useCallback(function (e) {
|
|
39406
|
-
e.stopPropagation();
|
|
39407
|
-
}, []);
|
|
39408
|
-
return React__default.createElement(ModalPortal, null, React__default.createElement(GlobalStyle, null), React__default.createElement(Overlay, {
|
|
39409
|
-
onPointerDown: handleClose
|
|
39410
|
-
}), React__default.createElement(ModalContainer, null, React__default.createElement(ModalContent, {
|
|
39411
|
-
onClick: stopPropagationClick,
|
|
39412
|
-
onTouchStart: stopPropagationTouch,
|
|
39413
|
-
onTouchEnd: stopPropagationTouch,
|
|
39414
|
-
onTouchMove: stopPropagationTouch,
|
|
39415
|
-
onPointerDown: stopPropagationPointer
|
|
39416
|
-
}, React__default.createElement(Header$2, null, React__default.createElement(Title$3, null, "Confirm"), React__default.createElement(CloseButton$4, {
|
|
39417
|
-
onPointerDown: handleClose,
|
|
39418
|
-
"aria-label": "Close"
|
|
39419
|
-
}, React__default.createElement(fa.FaTimes, null))), React__default.createElement(MessageContainer, null, typeof message === 'string' ? React__default.createElement(Message$1, null, message) : message), React__default.createElement(ButtonsContainer$2, null, React__default.createElement(CancelButtonWrapper, null, React__default.createElement(Button, {
|
|
39420
|
-
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
39421
|
-
onPointerDown: handleClose
|
|
39422
|
-
}, "No")), React__default.createElement(Button, {
|
|
39423
|
-
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
39424
|
-
onPointerDown: handleConfirm
|
|
39425
|
-
}, "Yes")))));
|
|
39426
|
-
};
|
|
39427
|
-
var Overlay = /*#__PURE__*/styled__default.div.withConfig({
|
|
39428
|
-
displayName: "ConfirmModal__Overlay",
|
|
39429
|
-
componentId: "sc-11qkyu1-0"
|
|
39430
|
-
})(["position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.6);z-index:1000;animation:fadeIn 0.2s ease-out;cursor:pointer;touch-action:none;@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}"]);
|
|
39431
|
-
var ModalContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
39432
|
-
displayName: "ConfirmModal__ModalContainer",
|
|
39433
|
-
componentId: "sc-11qkyu1-1"
|
|
39434
|
-
})(["position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;z-index:1001;pointer-events:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);"]);
|
|
39435
|
-
var ModalContent = /*#__PURE__*/styled__default.div.withConfig({
|
|
39436
|
-
displayName: "ConfirmModal__ModalContent",
|
|
39437
|
-
componentId: "sc-11qkyu1-2"
|
|
39438
|
-
})(["background:#1a1a2e;border:2px solid #f59e0b;border-radius:8px;padding:20px 24px 24px;min-width:300px;max-width:90%;display:flex;flex-direction:column;gap:16px;pointer-events:auto;animation:scaleIn 0.15s ease-out;@keyframes scaleIn{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}@media (max-width:768px){width:85%;}"]);
|
|
39439
|
-
var Header$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
39440
|
-
displayName: "ConfirmModal__Header",
|
|
39441
|
-
componentId: "sc-11qkyu1-3"
|
|
39442
|
-
})(["display:flex;align-items:center;justify-content:space-between;"]);
|
|
39443
|
-
var Title$3 = /*#__PURE__*/styled__default.h3.withConfig({
|
|
39444
|
-
displayName: "ConfirmModal__Title",
|
|
39445
|
-
componentId: "sc-11qkyu1-4"
|
|
39446
|
-
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.7rem;color:#fef08a;"]);
|
|
39447
|
-
var CloseButton$4 = /*#__PURE__*/styled__default.button.withConfig({
|
|
39448
|
-
displayName: "ConfirmModal__CloseButton",
|
|
39449
|
-
componentId: "sc-11qkyu1-5"
|
|
39450
|
-
})(["background:none;border:none;color:rgba(255,255,255,0.6);cursor:pointer;font-size:1rem;padding:4px;display:flex;align-items:center;&:hover{color:#ffffff;}"]);
|
|
39451
|
-
var MessageContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
39452
|
-
displayName: "ConfirmModal__MessageContainer",
|
|
39453
|
-
componentId: "sc-11qkyu1-6"
|
|
39454
|
-
})(["text-align:center;"]);
|
|
39455
|
-
var Message$1 = /*#__PURE__*/styled__default.p.withConfig({
|
|
39456
|
-
displayName: "ConfirmModal__Message",
|
|
39457
|
-
componentId: "sc-11qkyu1-7"
|
|
39458
|
-
})(["margin:0;font-family:'Press Start 2P',cursive;font-size:0.6rem;color:rgba(255,255,255,0.85);line-height:1.8;"]);
|
|
39459
|
-
var ButtonsContainer$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
39460
|
-
displayName: "ConfirmModal__ButtonsContainer",
|
|
39461
|
-
componentId: "sc-11qkyu1-8"
|
|
39462
|
-
})(["display:flex;justify-content:center;gap:20px;margin-top:4px;@media (max-width:768px){gap:30px;}"]);
|
|
39463
|
-
var CancelButtonWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
39464
|
-
displayName: "ConfirmModal__CancelButtonWrapper",
|
|
39465
|
-
componentId: "sc-11qkyu1-9"
|
|
39466
|
-
})(["filter:grayscale(0.7);"]);
|
|
39467
|
-
|
|
39468
39468
|
var CTAButton = function CTAButton(_ref) {
|
|
39469
39469
|
var icon = _ref.icon,
|
|
39470
39470
|
label = _ref.label,
|
|
@@ -49692,7 +49692,8 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
49692
49692
|
showSkillPoints = _ref$showSkillPoints === void 0 ? true : _ref$showSkillPoints,
|
|
49693
49693
|
atlasIMG = _ref.atlasIMG,
|
|
49694
49694
|
atlasJSON = _ref.atlasJSON,
|
|
49695
|
-
buffAndDebuff = _ref.buffAndDebuff
|
|
49695
|
+
buffAndDebuff = _ref.buffAndDebuff,
|
|
49696
|
+
onClick = _ref.onClick;
|
|
49696
49697
|
// Use CharacterClass.None as default if skillKey is provided but characterClass is not
|
|
49697
49698
|
var effectiveClass = characterClass != null ? characterClass : shared.CharacterClass.None;
|
|
49698
49699
|
// Calculate the effective level based on actual SP/XP (handles data inconsistencies)
|
|
@@ -49747,7 +49748,10 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
49747
49748
|
var result = level * (buffAndDebuff / 100);
|
|
49748
49749
|
return result > 0 ? "+" + result.toFixed(2) : "" + result.toFixed(2);
|
|
49749
49750
|
};
|
|
49750
|
-
return React__default.createElement(
|
|
49751
|
+
return React__default.createElement(ClickableRow, {
|
|
49752
|
+
onClick: onClick,
|
|
49753
|
+
"$isClickable": !!onClick
|
|
49754
|
+
}, 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 ", effectiveLevel, " (", skillsBuffsCalc(effectiveLevel, buffAndDebuff), ")")), React__default.createElement(TitleNameBuffContainer, null, React__default.createElement(TitleNameBuff, null, "(+", formatBuffAndDebuff(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 ", effectiveLevel, " (", skillsBuffsCalc(effectiveLevel, buffAndDebuff), ")")), React__default.createElement("div", null, React__default.createElement(TitleNameDebuff, null, "(", formatBuffAndDebuff(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 ", effectiveLevel))), React__default.createElement(ProgressBody, null, React__default.createElement(ProgressIconContainer, null, atlasIMG && atlasJSON ? React__default.createElement(SpriteContainer$7, null, React__default.createElement(ErrorBoundary, null, React__default.createElement(SpriteFromAtlas, {
|
|
49751
49755
|
atlasIMG: atlasIMG,
|
|
49752
49756
|
atlasJSON: atlasJSON,
|
|
49753
49757
|
spriteKey: texturePath,
|
|
@@ -49815,6 +49819,16 @@ var TitleNameContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
49815
49819
|
displayName: "SkillProgressBar__TitleNameContainer",
|
|
49816
49820
|
componentId: "sc-5vuroc-13"
|
|
49817
49821
|
})(["display:flex;justify-content:space-between;"]);
|
|
49822
|
+
var ClickableRow = /*#__PURE__*/styled__default.div.withConfig({
|
|
49823
|
+
displayName: "SkillProgressBar__ClickableRow",
|
|
49824
|
+
componentId: "sc-5vuroc-14"
|
|
49825
|
+
})(["cursor:", ";border-radius:4px;transition:background-color 0.15s ease;", ""], function (_ref2) {
|
|
49826
|
+
var $isClickable = _ref2.$isClickable;
|
|
49827
|
+
return $isClickable ? 'pointer' : 'default';
|
|
49828
|
+
}, function (_ref3) {
|
|
49829
|
+
var $isClickable = _ref3.$isClickable;
|
|
49830
|
+
return $isClickable && "\n &:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n &:active {\n background-color: rgba(255, 255, 255, 0.1);\n }\n ";
|
|
49831
|
+
});
|
|
49818
49832
|
|
|
49819
49833
|
var skillProps = {
|
|
49820
49834
|
attributes: {
|
|
@@ -49881,7 +49895,8 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
49881
49895
|
characterClass = _ref.characterClass,
|
|
49882
49896
|
atlasIMG = _ref.atlasIMG,
|
|
49883
49897
|
atlasJSON = _ref.atlasJSON,
|
|
49884
|
-
scale = _ref.scale
|
|
49898
|
+
scale = _ref.scale,
|
|
49899
|
+
onSkillClick = _ref.onSkillClick;
|
|
49885
49900
|
var onRenderSkillCategory = function onRenderSkillCategory(category) {
|
|
49886
49901
|
var skillCategory = skillProps[category];
|
|
49887
49902
|
var skillCategoryColor = skillCategory.color;
|
|
@@ -49919,7 +49934,10 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
49919
49934
|
texturePath: value,
|
|
49920
49935
|
atlasIMG: atlasIMG,
|
|
49921
49936
|
atlasJSON: atlasJSON,
|
|
49922
|
-
buffAndDebuff: skillDetails.buffAndDebuff
|
|
49937
|
+
buffAndDebuff: skillDetails.buffAndDebuff,
|
|
49938
|
+
onClick: onSkillClick ? function () {
|
|
49939
|
+
return onSkillClick(key);
|
|
49940
|
+
} : undefined
|
|
49923
49941
|
}));
|
|
49924
49942
|
},
|
|
49925
49943
|
_ret;
|
|
@@ -49948,7 +49966,10 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
49948
49966
|
skillPointsToNextLevel: Math.round(shared.getXPForLevel(skill.level + 1)) || 0,
|
|
49949
49967
|
texturePath: 'swords/broad-sword.png',
|
|
49950
49968
|
atlasIMG: atlasIMG,
|
|
49951
|
-
atlasJSON: atlasJSON
|
|
49969
|
+
atlasJSON: atlasJSON,
|
|
49970
|
+
onClick: onSkillClick ? function () {
|
|
49971
|
+
return onSkillClick('level');
|
|
49972
|
+
} : undefined
|
|
49952
49973
|
}), React__default.createElement("p", null, "Combat Skills"), React__default.createElement("hr", {
|
|
49953
49974
|
className: "golden"
|
|
49954
49975
|
})), onRenderSkillCategory('combat'), React__default.createElement(SkillSplitDiv, null, React__default.createElement("p", null, "Crafting Skills"), React__default.createElement("hr", {
|
|
@@ -74065,6 +74086,7 @@ exports.ChatRevamp = ChatRevamp;
|
|
|
74065
74086
|
exports.CheckButton = CheckButton;
|
|
74066
74087
|
exports.CheckItem = CheckItem;
|
|
74067
74088
|
exports.CircularController = CircularController;
|
|
74089
|
+
exports.ConfirmModal = ConfirmModal;
|
|
74068
74090
|
exports.CountdownTimer = CountdownTimer;
|
|
74069
74091
|
exports.CraftBook = CraftBook;
|
|
74070
74092
|
exports.DCRateStrip = DCRateStrip;
|