@algoux/standard-ranklist-utils 0.2.3 → 0.2.4
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/README.md +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -188,6 +188,13 @@ function resolveStyle(style) {
|
|
|
188
188
|
backgroundColor: backgroundThemeColor
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
+
function resolveUserMarkers(user, markersConfig) {
|
|
192
|
+
if (!user) {
|
|
193
|
+
return [];
|
|
194
|
+
}
|
|
195
|
+
const userMarkers = (Array.isArray(user.markers) ? user.markers : [user.marker]).filter(Boolean).map((marker) => (markersConfig || []).find((m) => m.id === marker)).filter(Boolean);
|
|
196
|
+
return userMarkers;
|
|
197
|
+
}
|
|
191
198
|
|
|
192
199
|
function canRegenerateRanklist(ranklist) {
|
|
193
200
|
var _a;
|
|
@@ -709,5 +716,6 @@ exports.resolveContributor = resolveContributor;
|
|
|
709
716
|
exports.resolveStyle = resolveStyle;
|
|
710
717
|
exports.resolveText = resolveText;
|
|
711
718
|
exports.resolveThemeColor = resolveThemeColor;
|
|
719
|
+
exports.resolveUserMarkers = resolveUserMarkers;
|
|
712
720
|
exports.secToTimeStr = secToTimeStr;
|
|
713
721
|
exports.sortRows = sortRows;
|
package/dist/index.d.cts
CHANGED
|
@@ -90,6 +90,7 @@ declare function resolveStyle(style: srk.Style): {
|
|
|
90
90
|
textColor: ThemeColor;
|
|
91
91
|
backgroundColor: ThemeColor;
|
|
92
92
|
};
|
|
93
|
+
declare function resolveUserMarkers(user: srk.User, markersConfig: srk.Marker[] | undefined): srk.Marker[];
|
|
93
94
|
|
|
94
95
|
declare function canRegenerateRanklist(ranklist: srk.Ranklist): boolean;
|
|
95
96
|
declare function getSortedCalculatedRawSolutions(rows: srk.RanklistRow[]): CalculatedSolutionTetrad[];
|
|
@@ -99,4 +100,4 @@ declare function regenerateRanklistBySolutions(originalRanklist: srk.Ranklist, s
|
|
|
99
100
|
declare function regenerateRowsByIncrementalSolutions(originalRanklist: srk.Ranklist, solutions: CalculatedSolutionTetrad[]): srk.RanklistRow[];
|
|
100
101
|
declare function convertToStaticRanklist(ranklist: srk.Ranklist): StaticRanklist;
|
|
101
102
|
|
|
102
|
-
export { type CalculatedSolutionTetrad, EnumTheme, MIN_REGEN_SUPPORTED_VERSION, type RankValue, type StaticRanklist, type ThemeColor, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, secToTimeStr, sortRows };
|
|
103
|
+
export { type CalculatedSolutionTetrad, EnumTheme, MIN_REGEN_SUPPORTED_VERSION, type RankValue, type StaticRanklist, type ThemeColor, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, resolveUserMarkers, secToTimeStr, sortRows };
|
package/dist/index.d.mts
CHANGED
|
@@ -90,6 +90,7 @@ declare function resolveStyle(style: srk.Style): {
|
|
|
90
90
|
textColor: ThemeColor;
|
|
91
91
|
backgroundColor: ThemeColor;
|
|
92
92
|
};
|
|
93
|
+
declare function resolveUserMarkers(user: srk.User, markersConfig: srk.Marker[] | undefined): srk.Marker[];
|
|
93
94
|
|
|
94
95
|
declare function canRegenerateRanklist(ranklist: srk.Ranklist): boolean;
|
|
95
96
|
declare function getSortedCalculatedRawSolutions(rows: srk.RanklistRow[]): CalculatedSolutionTetrad[];
|
|
@@ -99,4 +100,4 @@ declare function regenerateRanklistBySolutions(originalRanklist: srk.Ranklist, s
|
|
|
99
100
|
declare function regenerateRowsByIncrementalSolutions(originalRanklist: srk.Ranklist, solutions: CalculatedSolutionTetrad[]): srk.RanklistRow[];
|
|
100
101
|
declare function convertToStaticRanklist(ranklist: srk.Ranklist): StaticRanklist;
|
|
101
102
|
|
|
102
|
-
export { type CalculatedSolutionTetrad, EnumTheme, MIN_REGEN_SUPPORTED_VERSION, type RankValue, type StaticRanklist, type ThemeColor, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, secToTimeStr, sortRows };
|
|
103
|
+
export { type CalculatedSolutionTetrad, EnumTheme, MIN_REGEN_SUPPORTED_VERSION, type RankValue, type StaticRanklist, type ThemeColor, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, resolveUserMarkers, secToTimeStr, sortRows };
|
package/dist/index.mjs
CHANGED
|
@@ -186,6 +186,13 @@ function resolveStyle(style) {
|
|
|
186
186
|
backgroundColor: backgroundThemeColor
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
+
function resolveUserMarkers(user, markersConfig) {
|
|
190
|
+
if (!user) {
|
|
191
|
+
return [];
|
|
192
|
+
}
|
|
193
|
+
const userMarkers = (Array.isArray(user.markers) ? user.markers : [user.marker]).filter(Boolean).map((marker) => (markersConfig || []).find((m) => m.id === marker)).filter(Boolean);
|
|
194
|
+
return userMarkers;
|
|
195
|
+
}
|
|
189
196
|
|
|
190
197
|
function canRegenerateRanklist(ranklist) {
|
|
191
198
|
var _a;
|
|
@@ -690,4 +697,4 @@ function convertToStaticRanklist(ranklist) {
|
|
|
690
697
|
};
|
|
691
698
|
}
|
|
692
699
|
|
|
693
|
-
export { EnumTheme, MIN_REGEN_SUPPORTED_VERSION, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, secToTimeStr, sortRows };
|
|
700
|
+
export { EnumTheme, MIN_REGEN_SUPPORTED_VERSION, alphabetToNumber, canRegenerateRanklist, convertToStaticRanklist, filterSolutionsUntil, formatTimeDuration, getSortedCalculatedRawSolutions, numberToAlphabet, preZeroFill, regenerateRanklistBySolutions, regenerateRowsByIncrementalSolutions, resolveColor, resolveContributor, resolveStyle, resolveText, resolveThemeColor, resolveUserMarkers, secToTimeStr, sortRows };
|