@rpg-engine/long-bow 0.8.74 → 0.8.76
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/long-bow.cjs.development.js +45 -29
- 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 +45 -29
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DailyTasks/DailyTaskItem.tsx +32 -35
- package/src/components/DailyTasks/DailyTasks.tsx +40 -23
|
@@ -29687,7 +29687,7 @@ var CheckItemWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29687
29687
|
})(["display:flex;justify-content:center;width:100%;height:20px;input.rpgui-checkbox + label{margin:0 !important;padding-left:23px !important;}"]);
|
|
29688
29688
|
|
|
29689
29689
|
var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
29690
|
-
var _task$name;
|
|
29690
|
+
var _task$difficulty, _task$name;
|
|
29691
29691
|
var task = _ref.task,
|
|
29692
29692
|
spriteKey = _ref.spriteKey,
|
|
29693
29693
|
onClaimReward = _ref.onClaimReward,
|
|
@@ -29695,12 +29695,14 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29695
29695
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
29696
29696
|
iconAtlasJSON = _ref.iconAtlasJSON,
|
|
29697
29697
|
iconAtlasIMG = _ref.iconAtlasIMG,
|
|
29698
|
-
isRewardClaimed = _ref.isRewardClaimed
|
|
29698
|
+
isRewardClaimed = _ref.isRewardClaimed,
|
|
29699
|
+
isPinned = _ref.isPinned;
|
|
29699
29700
|
var isMobile = shared.isMobileOrTablet();
|
|
29700
29701
|
var isCompleted = task.status === shared.TaskStatus.Completed;
|
|
29701
29702
|
var isInProgress = task.status === shared.TaskStatus.InProgress;
|
|
29702
29703
|
var isNotStarted = task.status === shared.TaskStatus.NotStarted;
|
|
29703
29704
|
var isClaimed = task.claimed || isRewardClaimed;
|
|
29705
|
+
var isChallenge = ((_task$difficulty = task.difficulty) == null ? void 0 : _task$difficulty.toLowerCase()) === 'challenge';
|
|
29704
29706
|
var handleClaimReward = function handleClaimReward() {
|
|
29705
29707
|
onClaimReward(task.key, task.type);
|
|
29706
29708
|
};
|
|
@@ -29708,8 +29710,12 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29708
29710
|
isMobile: isMobile,
|
|
29709
29711
|
isCompleted: isCompleted,
|
|
29710
29712
|
isInProgress: isInProgress,
|
|
29711
|
-
isNotStarted: isNotStarted
|
|
29712
|
-
|
|
29713
|
+
isNotStarted: isNotStarted,
|
|
29714
|
+
isPinned: isPinned,
|
|
29715
|
+
isChallenge: isChallenge
|
|
29716
|
+
}, React__default.createElement(TaskHeader, {
|
|
29717
|
+
isMobile: isMobile
|
|
29718
|
+
}, React__default.createElement(TaskHeaderLeft, null, iconAtlasJSON && iconAtlasIMG && React__default.createElement(IconWrapper, null, React__default.createElement(SpriteFromAtlas, {
|
|
29713
29719
|
atlasJSON: iconAtlasJSON,
|
|
29714
29720
|
atlasIMG: iconAtlasIMG,
|
|
29715
29721
|
spriteKey: spriteKey,
|
|
@@ -29729,7 +29735,9 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29729
29735
|
color: getStatusInfo(task).color
|
|
29730
29736
|
}, getStatusInfo(task).text))))), React__default.createElement(TaskHeaderRight, null, isClaimed && React__default.createElement(ClaimedBadge, {
|
|
29731
29737
|
isMobile: isMobile
|
|
29732
|
-
}, "\u2713"))), React__default.createElement(TaskBody,
|
|
29738
|
+
}, "\u2713"))), React__default.createElement(TaskBody, {
|
|
29739
|
+
isMobile: isMobile
|
|
29740
|
+
}, React__default.createElement(TaskDescription, {
|
|
29733
29741
|
isMobile: isMobile
|
|
29734
29742
|
}, React__default.createElement(Ellipsis, {
|
|
29735
29743
|
maxWidth: "100%",
|
|
@@ -29742,7 +29750,9 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29742
29750
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
29743
29751
|
iconAtlasJSON: iconAtlasJSON,
|
|
29744
29752
|
iconAtlasIMG: iconAtlasIMG
|
|
29745
|
-
}))), isCompleted && !isClaimed && React__default.createElement(TaskFooter,
|
|
29753
|
+
}))), isCompleted && !isClaimed && React__default.createElement(TaskFooter, {
|
|
29754
|
+
isMobile: isMobile
|
|
29755
|
+
}, React__default.createElement(Button, {
|
|
29746
29756
|
buttonType: exports.ButtonTypes.RPGUIButton,
|
|
29747
29757
|
onPointerDown: handleClaimReward
|
|
29748
29758
|
}, isMobile ? 'Collect Reward' : 'Collect Reward')));
|
|
@@ -29751,31 +29761,27 @@ var pulseAnimation = /*#__PURE__*/styled.keyframes(["0%{box-shadow:0 1px 2px rgb
|
|
|
29751
29761
|
var TaskContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
29752
29762
|
displayName: "DailyTaskItem__TaskContainer",
|
|
29753
29763
|
componentId: "sc-45bxmt-0"
|
|
29754
|
-
})(["background:
|
|
29755
|
-
return props.
|
|
29756
|
-
}, function (props) {
|
|
29764
|
+
})(["background:", " !important;border:1px solid ", " !important;border-radius:", ";padding:", ";display:flex;flex-direction:column;gap:", ";box-shadow:0 1px 2px rgba(0,0,0,0.4);transition:all 0.2s ease;font-style:normal;width:100%;max-width:100%;box-sizing:border-box;opacity:1;", " ", " *{font-style:normal !important;}&:hover{background:", " !important;border-color:", ";opacity:1;}"], function (props) {
|
|
29765
|
+
return props.isChallenge ? 'rgb(209, 39, 42)' : props.isPinned ? 'rgba(255, 215, 0, 0.1)' : 'rgba(0, 0, 0, 0.6)';
|
|
29766
|
+
}, uiColors.darkGray, function (props) {
|
|
29757
29767
|
return props.isMobile ? '4px' : '6px';
|
|
29758
29768
|
}, function (props) {
|
|
29759
|
-
return props.isMobile ? '
|
|
29760
|
-
}, function (props) {
|
|
29761
|
-
return props.isMobile ? '4px' : '6px';
|
|
29769
|
+
return props.isMobile ? '10px' : '14px';
|
|
29762
29770
|
}, function (props) {
|
|
29763
|
-
return props.
|
|
29771
|
+
return props.isMobile ? '8px' : '12px';
|
|
29764
29772
|
}, function (props) {
|
|
29765
29773
|
return props.isNotStarted && "\n filter: grayscale(0.7);\n ";
|
|
29766
29774
|
}, function (props) {
|
|
29767
29775
|
return props.isInProgress && styled.css(["animation:", " 2s ease-in-out infinite;"], pulseAnimation);
|
|
29768
29776
|
}, function (props) {
|
|
29769
29777
|
return props.isPinned ? 'rgba(255, 215, 0, 0.25)' : 'rgba(0, 0, 0, 0.7)';
|
|
29770
|
-
},
|
|
29771
|
-
return props.isPinned ? uiColors.yellow : props.isCompleted ? uiColors.green : props.isInProgress ? uiColors.yellow : uiColors.yellow;
|
|
29772
|
-
}, function (props) {
|
|
29773
|
-
return props.isNotStarted ? 0.8 : 1;
|
|
29774
|
-
});
|
|
29778
|
+
}, uiColors.yellow);
|
|
29775
29779
|
var TaskHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
29776
29780
|
displayName: "DailyTaskItem__TaskHeader",
|
|
29777
29781
|
componentId: "sc-45bxmt-1"
|
|
29778
|
-
})(["display:flex;width:100%;justify-content:space-between;align-items:flex-start;border-bottom:1px solid ", ";padding-bottom:
|
|
29782
|
+
})(["display:flex;width:100%;justify-content:space-between;align-items:flex-start;border-bottom:1px solid ", ";padding-bottom:", ";min-height:36px;"], uiColors.darkGray, function (props) {
|
|
29783
|
+
return props.isMobile ? '8px' : '10px';
|
|
29784
|
+
});
|
|
29779
29785
|
var TaskHeaderLeft = /*#__PURE__*/styled__default.div.withConfig({
|
|
29780
29786
|
displayName: "DailyTaskItem__TaskHeaderLeft",
|
|
29781
29787
|
componentId: "sc-45bxmt-2"
|
|
@@ -29815,13 +29821,13 @@ var TaskDifficulty = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
29815
29821
|
var StatusText = /*#__PURE__*/styled__default.span.withConfig({
|
|
29816
29822
|
displayName: "DailyTaskItem__StatusText",
|
|
29817
29823
|
componentId: "sc-45bxmt-10"
|
|
29818
|
-
})(["color:", ";font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29824
|
+
})(["color:", " !important;font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29819
29825
|
return props.color;
|
|
29820
29826
|
});
|
|
29821
29827
|
var ClaimedBadge = /*#__PURE__*/styled__default.div.withConfig({
|
|
29822
29828
|
displayName: "DailyTaskItem__ClaimedBadge",
|
|
29823
29829
|
componentId: "sc-45bxmt-11"
|
|
29824
|
-
})(["background:", ";color:white;border-radius:50%;width:", ";height:", ";display:flex;align-items:center;justify-content:center;font-size:", ";font-weight:bold;"], uiColors.green, function (props) {
|
|
29830
|
+
})(["background:", ";color:white;border-radius:50%;width:", ";height:", ";display:flex;align-items:center;justify-content:center;font-size:", ";font-weight:bold;margin-left:8px;"], uiColors.green, function (props) {
|
|
29825
29831
|
return props.isMobile ? '18px' : '20px';
|
|
29826
29832
|
}, function (props) {
|
|
29827
29833
|
return props.isMobile ? '18px' : '20px';
|
|
@@ -29831,7 +29837,9 @@ var ClaimedBadge = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29831
29837
|
var TaskBody = /*#__PURE__*/styled__default.div.withConfig({
|
|
29832
29838
|
displayName: "DailyTaskItem__TaskBody",
|
|
29833
29839
|
componentId: "sc-45bxmt-12"
|
|
29834
|
-
})(["display:flex;flex-direction:column;gap:8px;padding:
|
|
29840
|
+
})(["display:flex;flex-direction:column;gap:8px;padding:", ";"], function (props) {
|
|
29841
|
+
return props.isMobile ? '4px 0' : '6px 0';
|
|
29842
|
+
});
|
|
29835
29843
|
var RewardsSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
29836
29844
|
displayName: "DailyTaskItem__RewardsSection",
|
|
29837
29845
|
componentId: "sc-45bxmt-13"
|
|
@@ -29839,7 +29847,9 @@ var RewardsSection = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
29839
29847
|
var TaskFooter = /*#__PURE__*/styled__default.div.withConfig({
|
|
29840
29848
|
displayName: "DailyTaskItem__TaskFooter",
|
|
29841
29849
|
componentId: "sc-45bxmt-14"
|
|
29842
|
-
})(["display:flex;justify-content:center;padding-top:
|
|
29850
|
+
})(["display:flex;justify-content:center;padding-top:", ";border-top:1px solid ", ";"], function (props) {
|
|
29851
|
+
return props.isMobile ? '8px' : '10px';
|
|
29852
|
+
}, uiColors.darkGray);
|
|
29843
29853
|
var IconWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
29844
29854
|
displayName: "DailyTaskItem__IconWrapper",
|
|
29845
29855
|
componentId: "sc-45bxmt-15"
|
|
@@ -30030,13 +30040,19 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
30030
30040
|
var matchesStatus = selectedStatus === 'all' || selectedStatus === 'pinned' && pinnedTasks.includes(task.key) || selectedStatus === 'completed' && task.status === shared.TaskStatus.Completed || selectedStatus === 'inprogress' && task.status === shared.TaskStatus.InProgress || selectedStatus === 'notstarted' && task.status === shared.TaskStatus.NotStarted;
|
|
30031
30041
|
return matchesSearch && matchesStatus;
|
|
30032
30042
|
});
|
|
30033
|
-
// Sort
|
|
30043
|
+
// Sort by relevance: pinned first, then by status (in progress, completed, not started)
|
|
30034
30044
|
return filtered.sort(function (a, b) {
|
|
30045
|
+
var _statusPriority;
|
|
30035
30046
|
var aIsPinned = pinnedTasks.includes(a.key);
|
|
30036
30047
|
var bIsPinned = pinnedTasks.includes(b.key);
|
|
30048
|
+
// Pinned tasks always come first
|
|
30037
30049
|
if (aIsPinned && !bIsPinned) return -1;
|
|
30038
30050
|
if (!aIsPinned && bIsPinned) return 1;
|
|
30039
|
-
|
|
30051
|
+
// If both are pinned or both are not pinned, sort by status priority
|
|
30052
|
+
var statusPriority = (_statusPriority = {}, _statusPriority[shared.TaskStatus.InProgress] = 1, _statusPriority[shared.TaskStatus.Completed] = 2, _statusPriority[shared.TaskStatus.NotStarted] = 3, _statusPriority);
|
|
30053
|
+
var aPriority = statusPriority[a.status] || 4;
|
|
30054
|
+
var bPriority = statusPriority[b.status] || 4;
|
|
30055
|
+
return aPriority - bPriority;
|
|
30040
30056
|
});
|
|
30041
30057
|
}, [localTasks, searchQuery, selectedStatus, pinnedTasks]);
|
|
30042
30058
|
return React__default.createElement(TasksContainer, {
|
|
@@ -30111,18 +30127,18 @@ var TasksList = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30111
30127
|
})(["display:flex;flex-direction:column;gap:", ";padding:", ";overflow-y:auto;flex:1;background-color:transparent;", ""], function (props) {
|
|
30112
30128
|
return props.isMobile ? '8px' : '12px';
|
|
30113
30129
|
}, function (props) {
|
|
30114
|
-
return props.isMobile ? '8px' : '12px';
|
|
30130
|
+
return props.isMobile ? '8px 8px 40px 8px' : '12px 12px 40px 12px';
|
|
30115
30131
|
}, function (props) {
|
|
30116
30132
|
return props.isMobile ? "\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n " : '';
|
|
30117
30133
|
});
|
|
30118
30134
|
var GlobalProgressFixed = /*#__PURE__*/styled__default.div.withConfig({
|
|
30119
30135
|
displayName: "DailyTasks__GlobalProgressFixed",
|
|
30120
30136
|
componentId: "sc-ittn77-3"
|
|
30121
|
-
})(["flex-shrink:0;padding:
|
|
30137
|
+
})(["flex-shrink:0;padding:12px;background-color:transparent;"]);
|
|
30122
30138
|
var SearchHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
30123
30139
|
displayName: "DailyTasks__SearchHeader",
|
|
30124
30140
|
componentId: "sc-ittn77-4"
|
|
30125
|
-
})(["display:flex;gap:12px;
|
|
30141
|
+
})(["display:flex;gap:12px;justify-content:center;align-items:center;margin-left:12px;margin-right:12px;padding:0.25rem;border-bottom:1px solid ", ";background:rgba(0,0,0,0.3);"], uiColors.darkGray);
|
|
30126
30142
|
var SearchBarContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
30127
30143
|
displayName: "DailyTasks__SearchBarContainer",
|
|
30128
30144
|
componentId: "sc-ittn77-5"
|
|
@@ -30138,7 +30154,7 @@ var TaskWrapper = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
30138
30154
|
var PinButton$1 = /*#__PURE__*/styled__default.button.withConfig({
|
|
30139
30155
|
displayName: "DailyTasks__PinButton",
|
|
30140
30156
|
componentId: "sc-ittn77-8"
|
|
30141
|
-
})(["position:absolute;top:8px;right:
|
|
30157
|
+
})(["position:absolute;top:8px;right:32px;background:rgba(0,0,0,0.7);color:", ";border:1px solid ", ";cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all 0.2s ease;z-index:10;width:20px;height:20px;&:hover{color:", ";background:rgba(0,0,0,0.9);border-color:", ";}", ""], function (props) {
|
|
30142
30158
|
return props.isPinned ? uiColors.yellow : uiColors.lightGray;
|
|
30143
30159
|
}, function (props) {
|
|
30144
30160
|
return props.isPinned ? uiColors.yellow : 'transparent';
|