@dgpholdings/greatoak-shared 1.2.17 → 1.2.19
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.
|
@@ -10,6 +10,12 @@ exports.bodyCategories = [
|
|
|
10
10
|
"Triceps",
|
|
11
11
|
"Forearms",
|
|
12
12
|
"Legs",
|
|
13
|
+
"Glutes",
|
|
14
|
+
"Calves",
|
|
15
|
+
"Hamstrings",
|
|
16
|
+
"Quadriceps",
|
|
17
|
+
"Lower Back",
|
|
18
|
+
"Trapezius",
|
|
13
19
|
];
|
|
14
20
|
exports.bodySubCategories = {
|
|
15
21
|
Chest: ["pectoralis-major", "pectoralis-minor", "serratus-anterior"],
|
|
@@ -28,6 +34,12 @@ exports.bodySubCategories = {
|
|
|
28
34
|
"maximus-lower",
|
|
29
35
|
"adductors",
|
|
30
36
|
],
|
|
37
|
+
Glutes: ["glutes-maximus", "glutes-medius"],
|
|
38
|
+
Calves: ["calf-inner", "calf-outer", "calves"],
|
|
39
|
+
Hamstrings: ["hamstrings"],
|
|
40
|
+
Quadriceps: ["quadriceps"],
|
|
41
|
+
"Lower Back": ["lower-back"],
|
|
42
|
+
Trapezius: ["trapezius"],
|
|
31
43
|
};
|
|
32
44
|
exports.bodySubCatNaming = {
|
|
33
45
|
"pectoralis-major": "Upper pectoralis major",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TRecord } from "./commonTypes";
|
|
2
|
-
export type TBodyPart = "Chest" | "Core" | "Shoulders" | "Back" | "Biceps" | "Triceps" | "Forearms" | "Legs";
|
|
2
|
+
export type TBodyPart = "Chest" | "Core" | "Shoulders" | "Back" | "Biceps" | "Triceps" | "Forearms" | "Legs" | "Glutes" | "Calves" | "Hamstrings" | "Quadriceps" | "Lower Back" | "Trapezius";
|
|
3
3
|
export declare enum EBodyParts {
|
|
4
4
|
"pectoralis-major" = "Pectoralis major upper",
|
|
5
5
|
"pectoralis-minor" = "Pectoralis major lower ",
|
|
@@ -104,11 +104,11 @@ export type TExercise = {
|
|
|
104
104
|
longDuration: number;
|
|
105
105
|
};
|
|
106
106
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
"5.0": 4.3, // 5 km/h walking = 4.3 MET
|
|
108
|
+
"8.0": 8.3, // 8 km/h jogging = 8.3 MET
|
|
109
|
+
"12.0": 11.0, // 12 km/h running = 11.0 MET
|
|
110
|
+
"16.0": 15.0 // 16 km/h fast running = 15.0 MET
|
|
111
|
+
*/
|
|
112
112
|
paceFactors?: {
|
|
113
113
|
[key: string]: number;
|
|
114
114
|
};
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* - Fatigue multiplier (later sets get 8% bonus per set for accumulated fatigue)
|
|
43
43
|
*/
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.calculateExerciseScore = void 0;
|
|
45
|
+
exports.calculateTotalVolume = exports.calculateExerciseScore = void 0;
|
|
46
46
|
const time_util_1 = require("./time.util");
|
|
47
47
|
const calculateExerciseScore = (param) => {
|
|
48
48
|
const { exercise, record, user } = param;
|
|
@@ -52,7 +52,7 @@ const calculateExerciseScore = (param) => {
|
|
|
52
52
|
return { score: 0, muscleScores: {} };
|
|
53
53
|
}
|
|
54
54
|
// Calculate base performance metrics
|
|
55
|
-
const totalVolume = calculateTotalVolume(completedSets, user);
|
|
55
|
+
const totalVolume = (0, exports.calculateTotalVolume)(completedSets, user);
|
|
56
56
|
const avgIntensity = calculateAverageIntensity(completedSets, exercise, user);
|
|
57
57
|
const setQuality = calculateSetQuality(completedSets);
|
|
58
58
|
// Calculate muscle fatigue scores
|
|
@@ -106,6 +106,7 @@ const calculateTotalVolume = (record, user) => {
|
|
|
106
106
|
return total;
|
|
107
107
|
}, 0);
|
|
108
108
|
};
|
|
109
|
+
exports.calculateTotalVolume = calculateTotalVolume;
|
|
109
110
|
const calculateAverageIntensity = (record, exercise, user) => {
|
|
110
111
|
const intensities = record.map((set, index) => {
|
|
111
112
|
let baseIntensity = 0;
|