@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
package/dist/long-bow.esm.js
CHANGED
|
@@ -29680,7 +29680,7 @@ var CheckItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
29680
29680
|
})(["display:flex;justify-content:center;width:100%;height:20px;input.rpgui-checkbox + label{margin:0 !important;padding-left:23px !important;}"]);
|
|
29681
29681
|
|
|
29682
29682
|
var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
29683
|
-
var _task$name;
|
|
29683
|
+
var _task$difficulty, _task$name;
|
|
29684
29684
|
var task = _ref.task,
|
|
29685
29685
|
spriteKey = _ref.spriteKey,
|
|
29686
29686
|
onClaimReward = _ref.onClaimReward,
|
|
@@ -29688,12 +29688,14 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29688
29688
|
itemsAtlasIMG = _ref.itemsAtlasIMG,
|
|
29689
29689
|
iconAtlasJSON = _ref.iconAtlasJSON,
|
|
29690
29690
|
iconAtlasIMG = _ref.iconAtlasIMG,
|
|
29691
|
-
isRewardClaimed = _ref.isRewardClaimed
|
|
29691
|
+
isRewardClaimed = _ref.isRewardClaimed,
|
|
29692
|
+
isPinned = _ref.isPinned;
|
|
29692
29693
|
var isMobile = isMobileOrTablet();
|
|
29693
29694
|
var isCompleted = task.status === TaskStatus.Completed;
|
|
29694
29695
|
var isInProgress = task.status === TaskStatus.InProgress;
|
|
29695
29696
|
var isNotStarted = task.status === TaskStatus.NotStarted;
|
|
29696
29697
|
var isClaimed = task.claimed || isRewardClaimed;
|
|
29698
|
+
var isChallenge = ((_task$difficulty = task.difficulty) == null ? void 0 : _task$difficulty.toLowerCase()) === 'challenge';
|
|
29697
29699
|
var handleClaimReward = function handleClaimReward() {
|
|
29698
29700
|
onClaimReward(task.key, task.type);
|
|
29699
29701
|
};
|
|
@@ -29701,8 +29703,12 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29701
29703
|
isMobile: isMobile,
|
|
29702
29704
|
isCompleted: isCompleted,
|
|
29703
29705
|
isInProgress: isInProgress,
|
|
29704
|
-
isNotStarted: isNotStarted
|
|
29705
|
-
|
|
29706
|
+
isNotStarted: isNotStarted,
|
|
29707
|
+
isPinned: isPinned,
|
|
29708
|
+
isChallenge: isChallenge
|
|
29709
|
+
}, React.createElement(TaskHeader, {
|
|
29710
|
+
isMobile: isMobile
|
|
29711
|
+
}, React.createElement(TaskHeaderLeft, null, iconAtlasJSON && iconAtlasIMG && React.createElement(IconWrapper, null, React.createElement(SpriteFromAtlas, {
|
|
29706
29712
|
atlasJSON: iconAtlasJSON,
|
|
29707
29713
|
atlasIMG: iconAtlasIMG,
|
|
29708
29714
|
spriteKey: spriteKey,
|
|
@@ -29722,7 +29728,9 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29722
29728
|
color: getStatusInfo(task).color
|
|
29723
29729
|
}, getStatusInfo(task).text))))), React.createElement(TaskHeaderRight, null, isClaimed && React.createElement(ClaimedBadge, {
|
|
29724
29730
|
isMobile: isMobile
|
|
29725
|
-
}, "\u2713"))), React.createElement(TaskBody,
|
|
29731
|
+
}, "\u2713"))), React.createElement(TaskBody, {
|
|
29732
|
+
isMobile: isMobile
|
|
29733
|
+
}, React.createElement(TaskDescription, {
|
|
29726
29734
|
isMobile: isMobile
|
|
29727
29735
|
}, React.createElement(Ellipsis, {
|
|
29728
29736
|
maxWidth: "100%",
|
|
@@ -29735,7 +29743,9 @@ var DailyTaskItem = function DailyTaskItem(_ref) {
|
|
|
29735
29743
|
itemsAtlasIMG: itemsAtlasIMG,
|
|
29736
29744
|
iconAtlasJSON: iconAtlasJSON,
|
|
29737
29745
|
iconAtlasIMG: iconAtlasIMG
|
|
29738
|
-
}))), isCompleted && !isClaimed && React.createElement(TaskFooter,
|
|
29746
|
+
}))), isCompleted && !isClaimed && React.createElement(TaskFooter, {
|
|
29747
|
+
isMobile: isMobile
|
|
29748
|
+
}, React.createElement(Button, {
|
|
29739
29749
|
buttonType: ButtonTypes.RPGUIButton,
|
|
29740
29750
|
onPointerDown: handleClaimReward
|
|
29741
29751
|
}, isMobile ? 'Collect Reward' : 'Collect Reward')));
|
|
@@ -29744,31 +29754,27 @@ var pulseAnimation = /*#__PURE__*/keyframes(["0%{box-shadow:0 1px 2px rgba(0,0,0
|
|
|
29744
29754
|
var TaskContainer = /*#__PURE__*/styled.div.withConfig({
|
|
29745
29755
|
displayName: "DailyTaskItem__TaskContainer",
|
|
29746
29756
|
componentId: "sc-45bxmt-0"
|
|
29747
|
-
})(["background:
|
|
29748
|
-
return props.
|
|
29749
|
-
}, function (props) {
|
|
29757
|
+
})(["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) {
|
|
29758
|
+
return props.isChallenge ? 'rgb(209, 39, 42)' : props.isPinned ? 'rgba(255, 215, 0, 0.1)' : 'rgba(0, 0, 0, 0.6)';
|
|
29759
|
+
}, uiColors.darkGray, function (props) {
|
|
29750
29760
|
return props.isMobile ? '4px' : '6px';
|
|
29751
29761
|
}, function (props) {
|
|
29752
|
-
return props.isMobile ? '
|
|
29753
|
-
}, function (props) {
|
|
29754
|
-
return props.isMobile ? '4px' : '6px';
|
|
29762
|
+
return props.isMobile ? '10px' : '14px';
|
|
29755
29763
|
}, function (props) {
|
|
29756
|
-
return props.
|
|
29764
|
+
return props.isMobile ? '8px' : '12px';
|
|
29757
29765
|
}, function (props) {
|
|
29758
29766
|
return props.isNotStarted && "\n filter: grayscale(0.7);\n ";
|
|
29759
29767
|
}, function (props) {
|
|
29760
29768
|
return props.isInProgress && css(["animation:", " 2s ease-in-out infinite;"], pulseAnimation);
|
|
29761
29769
|
}, function (props) {
|
|
29762
29770
|
return props.isPinned ? 'rgba(255, 215, 0, 0.25)' : 'rgba(0, 0, 0, 0.7)';
|
|
29763
|
-
},
|
|
29764
|
-
return props.isPinned ? uiColors.yellow : props.isCompleted ? uiColors.green : props.isInProgress ? uiColors.yellow : uiColors.yellow;
|
|
29765
|
-
}, function (props) {
|
|
29766
|
-
return props.isNotStarted ? 0.8 : 1;
|
|
29767
|
-
});
|
|
29771
|
+
}, uiColors.yellow);
|
|
29768
29772
|
var TaskHeader = /*#__PURE__*/styled.div.withConfig({
|
|
29769
29773
|
displayName: "DailyTaskItem__TaskHeader",
|
|
29770
29774
|
componentId: "sc-45bxmt-1"
|
|
29771
|
-
})(["display:flex;width:100%;justify-content:space-between;align-items:flex-start;border-bottom:1px solid ", ";padding-bottom:
|
|
29775
|
+
})(["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) {
|
|
29776
|
+
return props.isMobile ? '8px' : '10px';
|
|
29777
|
+
});
|
|
29772
29778
|
var TaskHeaderLeft = /*#__PURE__*/styled.div.withConfig({
|
|
29773
29779
|
displayName: "DailyTaskItem__TaskHeaderLeft",
|
|
29774
29780
|
componentId: "sc-45bxmt-2"
|
|
@@ -29808,13 +29814,13 @@ var TaskDifficulty = /*#__PURE__*/styled.span.withConfig({
|
|
|
29808
29814
|
var StatusText = /*#__PURE__*/styled.span.withConfig({
|
|
29809
29815
|
displayName: "DailyTaskItem__StatusText",
|
|
29810
29816
|
componentId: "sc-45bxmt-10"
|
|
29811
|
-
})(["color:", ";font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29817
|
+
})(["color:", " !important;font-size:0.65rem;font-weight:500;"], function (props) {
|
|
29812
29818
|
return props.color;
|
|
29813
29819
|
});
|
|
29814
29820
|
var ClaimedBadge = /*#__PURE__*/styled.div.withConfig({
|
|
29815
29821
|
displayName: "DailyTaskItem__ClaimedBadge",
|
|
29816
29822
|
componentId: "sc-45bxmt-11"
|
|
29817
|
-
})(["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) {
|
|
29823
|
+
})(["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) {
|
|
29818
29824
|
return props.isMobile ? '18px' : '20px';
|
|
29819
29825
|
}, function (props) {
|
|
29820
29826
|
return props.isMobile ? '18px' : '20px';
|
|
@@ -29824,7 +29830,9 @@ var ClaimedBadge = /*#__PURE__*/styled.div.withConfig({
|
|
|
29824
29830
|
var TaskBody = /*#__PURE__*/styled.div.withConfig({
|
|
29825
29831
|
displayName: "DailyTaskItem__TaskBody",
|
|
29826
29832
|
componentId: "sc-45bxmt-12"
|
|
29827
|
-
})(["display:flex;flex-direction:column;gap:8px;padding:
|
|
29833
|
+
})(["display:flex;flex-direction:column;gap:8px;padding:", ";"], function (props) {
|
|
29834
|
+
return props.isMobile ? '4px 0' : '6px 0';
|
|
29835
|
+
});
|
|
29828
29836
|
var RewardsSection = /*#__PURE__*/styled.div.withConfig({
|
|
29829
29837
|
displayName: "DailyTaskItem__RewardsSection",
|
|
29830
29838
|
componentId: "sc-45bxmt-13"
|
|
@@ -29832,7 +29840,9 @@ var RewardsSection = /*#__PURE__*/styled.div.withConfig({
|
|
|
29832
29840
|
var TaskFooter = /*#__PURE__*/styled.div.withConfig({
|
|
29833
29841
|
displayName: "DailyTaskItem__TaskFooter",
|
|
29834
29842
|
componentId: "sc-45bxmt-14"
|
|
29835
|
-
})(["display:flex;justify-content:center;padding-top:
|
|
29843
|
+
})(["display:flex;justify-content:center;padding-top:", ";border-top:1px solid ", ";"], function (props) {
|
|
29844
|
+
return props.isMobile ? '8px' : '10px';
|
|
29845
|
+
}, uiColors.darkGray);
|
|
29836
29846
|
var IconWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
29837
29847
|
displayName: "DailyTaskItem__IconWrapper",
|
|
29838
29848
|
componentId: "sc-45bxmt-15"
|
|
@@ -30023,13 +30033,19 @@ var DailyTasks = function DailyTasks(_ref) {
|
|
|
30023
30033
|
var matchesStatus = selectedStatus === 'all' || selectedStatus === 'pinned' && pinnedTasks.includes(task.key) || selectedStatus === 'completed' && task.status === TaskStatus.Completed || selectedStatus === 'inprogress' && task.status === TaskStatus.InProgress || selectedStatus === 'notstarted' && task.status === TaskStatus.NotStarted;
|
|
30024
30034
|
return matchesSearch && matchesStatus;
|
|
30025
30035
|
});
|
|
30026
|
-
// Sort
|
|
30036
|
+
// Sort by relevance: pinned first, then by status (in progress, completed, not started)
|
|
30027
30037
|
return filtered.sort(function (a, b) {
|
|
30038
|
+
var _statusPriority;
|
|
30028
30039
|
var aIsPinned = pinnedTasks.includes(a.key);
|
|
30029
30040
|
var bIsPinned = pinnedTasks.includes(b.key);
|
|
30041
|
+
// Pinned tasks always come first
|
|
30030
30042
|
if (aIsPinned && !bIsPinned) return -1;
|
|
30031
30043
|
if (!aIsPinned && bIsPinned) return 1;
|
|
30032
|
-
|
|
30044
|
+
// If both are pinned or both are not pinned, sort by status priority
|
|
30045
|
+
var statusPriority = (_statusPriority = {}, _statusPriority[TaskStatus.InProgress] = 1, _statusPriority[TaskStatus.Completed] = 2, _statusPriority[TaskStatus.NotStarted] = 3, _statusPriority);
|
|
30046
|
+
var aPriority = statusPriority[a.status] || 4;
|
|
30047
|
+
var bPriority = statusPriority[b.status] || 4;
|
|
30048
|
+
return aPriority - bPriority;
|
|
30033
30049
|
});
|
|
30034
30050
|
}, [localTasks, searchQuery, selectedStatus, pinnedTasks]);
|
|
30035
30051
|
return React.createElement(TasksContainer, {
|
|
@@ -30104,18 +30120,18 @@ var TasksList = /*#__PURE__*/styled.div.withConfig({
|
|
|
30104
30120
|
})(["display:flex;flex-direction:column;gap:", ";padding:", ";overflow-y:auto;flex:1;background-color:transparent;", ""], function (props) {
|
|
30105
30121
|
return props.isMobile ? '8px' : '12px';
|
|
30106
30122
|
}, function (props) {
|
|
30107
|
-
return props.isMobile ? '8px' : '12px';
|
|
30123
|
+
return props.isMobile ? '8px 8px 40px 8px' : '12px 12px 40px 12px';
|
|
30108
30124
|
}, function (props) {
|
|
30109
30125
|
return props.isMobile ? "\n -webkit-overflow-scrolling: touch;\n scrollbar-width: thin;\n " : '';
|
|
30110
30126
|
});
|
|
30111
30127
|
var GlobalProgressFixed = /*#__PURE__*/styled.div.withConfig({
|
|
30112
30128
|
displayName: "DailyTasks__GlobalProgressFixed",
|
|
30113
30129
|
componentId: "sc-ittn77-3"
|
|
30114
|
-
})(["flex-shrink:0;padding:
|
|
30130
|
+
})(["flex-shrink:0;padding:12px;background-color:transparent;"]);
|
|
30115
30131
|
var SearchHeader = /*#__PURE__*/styled.div.withConfig({
|
|
30116
30132
|
displayName: "DailyTasks__SearchHeader",
|
|
30117
30133
|
componentId: "sc-ittn77-4"
|
|
30118
|
-
})(["display:flex;gap:12px;
|
|
30134
|
+
})(["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);
|
|
30119
30135
|
var SearchBarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
30120
30136
|
displayName: "DailyTasks__SearchBarContainer",
|
|
30121
30137
|
componentId: "sc-ittn77-5"
|
|
@@ -30131,7 +30147,7 @@ var TaskWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
|
30131
30147
|
var PinButton$1 = /*#__PURE__*/styled.button.withConfig({
|
|
30132
30148
|
displayName: "DailyTasks__PinButton",
|
|
30133
30149
|
componentId: "sc-ittn77-8"
|
|
30134
|
-
})(["position:absolute;top:8px;right:
|
|
30150
|
+
})(["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) {
|
|
30135
30151
|
return props.isPinned ? uiColors.yellow : uiColors.lightGray;
|
|
30136
30152
|
}, function (props) {
|
|
30137
30153
|
return props.isPinned ? uiColors.yellow : 'transparent';
|