@burdenoff/microfe-mybodyshield 2026.821.2 → 2026.830.1

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.
Files changed (90) hide show
  1. package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -1
  2. package/dist/mybodyshield/MyBodyShieldRoot.js +54 -56
  3. package/dist/mybodyshield/MyBodyShieldRoot.js.map +1 -1
  4. package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -1
  5. package/dist/mybodyshield/MyBodyShieldRoutes.js +121 -62
  6. package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
  7. package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -1
  8. package/dist/mybodyshield/components/EvidenceUpload.js +46 -45
  9. package/dist/mybodyshield/components/EvidenceUpload.js.map +1 -1
  10. package/dist/mybodyshield/components/FileLink.d.ts.map +1 -1
  11. package/dist/mybodyshield/components/FileLink.js +27 -18
  12. package/dist/mybodyshield/components/FileLink.js.map +1 -1
  13. package/dist/mybodyshield/components/MybDiscussion.d.ts +1 -1
  14. package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -1
  15. package/dist/mybodyshield/components/MybDiscussion.js +59 -58
  16. package/dist/mybodyshield/components/MybDiscussion.js.map +1 -1
  17. package/dist/mybodyshield/components/MybTags.d.ts +1 -1
  18. package/dist/mybodyshield/components/MybTags.d.ts.map +1 -1
  19. package/dist/mybodyshield/components/MybTags.js +83 -74
  20. package/dist/mybodyshield/components/MybTags.js.map +1 -1
  21. package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -1
  22. package/dist/mybodyshield/components/PageDisabled.js +16 -11
  23. package/dist/mybodyshield/components/PageDisabled.js.map +1 -1
  24. package/dist/mybodyshield/components/Pagination.d.ts.map +1 -1
  25. package/dist/mybodyshield/components/Pagination.js +36 -27
  26. package/dist/mybodyshield/components/Pagination.js.map +1 -1
  27. package/dist/mybodyshield/components/StateViews.d.ts.map +1 -1
  28. package/dist/mybodyshield/components/StateViews.js +42 -34
  29. package/dist/mybodyshield/components/StateViews.js.map +1 -1
  30. package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -1
  31. package/dist/mybodyshield/components/UserSearchSelect.js +66 -68
  32. package/dist/mybodyshield/components/UserSearchSelect.js.map +1 -1
  33. package/dist/mybodyshield/hooks/index.d.ts +1 -0
  34. package/dist/mybodyshield/hooks/index.d.ts.map +1 -1
  35. package/dist/mybodyshield/hooks/index.js +1 -0
  36. package/dist/mybodyshield/hooks/useTr.d.ts +5 -0
  37. package/dist/mybodyshield/hooks/useTr.d.ts.map +1 -0
  38. package/dist/mybodyshield/hooks/useTr.js +12 -0
  39. package/dist/mybodyshield/hooks/useTr.js.map +1 -0
  40. package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -1
  41. package/dist/mybodyshield/pages/DashboardPage.js +157 -136
  42. package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
  43. package/dist/mybodyshield/pages/SettingsPage.d.ts.map +1 -1
  44. package/dist/mybodyshield/pages/SettingsPage.js +50 -59
  45. package/dist/mybodyshield/pages/SettingsPage.js.map +1 -1
  46. package/dist/mybodyshield/pages/_shared/visuals.d.ts +2 -1
  47. package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -1
  48. package/dist/mybodyshield/pages/_shared/visuals.js +91 -81
  49. package/dist/mybodyshield/pages/_shared/visuals.js.map +1 -1
  50. package/dist/mybodyshield/pages/ai/AiControlsPage.d.ts.map +1 -1
  51. package/dist/mybodyshield/pages/ai/AiControlsPage.js +279 -231
  52. package/dist/mybodyshield/pages/ai/AiControlsPage.js.map +1 -1
  53. package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -1
  54. package/dist/mybodyshield/pages/coaching/CoachingPage.js +349 -258
  55. package/dist/mybodyshield/pages/coaching/CoachingPage.js.map +1 -1
  56. package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -1
  57. package/dist/mybodyshield/pages/goals/GoalsPage.js +247 -251
  58. package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
  59. package/dist/mybodyshield/pages/insights/InsightsCharts.d.ts.map +1 -1
  60. package/dist/mybodyshield/pages/insights/InsightsCharts.js +216 -213
  61. package/dist/mybodyshield/pages/insights/InsightsCharts.js.map +1 -1
  62. package/dist/mybodyshield/pages/insights/InsightsPage.d.ts.map +1 -1
  63. package/dist/mybodyshield/pages/insights/InsightsPage.js +327 -220
  64. package/dist/mybodyshield/pages/insights/InsightsPage.js.map +1 -1
  65. package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -1
  66. package/dist/mybodyshield/pages/nutrition/NutritionPage.js +575 -529
  67. package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
  68. package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -1
  69. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +333 -275
  70. package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
  71. package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -1
  72. package/dist/mybodyshield/pages/programs/ProgramsPage.js +258 -253
  73. package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
  74. package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -1
  75. package/dist/mybodyshield/pages/progress/ProgressPage.js +271 -254
  76. package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
  77. package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -1
  78. package/dist/mybodyshield/pages/recovery/RecoveryPage.js +206 -200
  79. package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
  80. package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -1
  81. package/dist/mybodyshield/pages/train/SessionDetailPage.js +327 -294
  82. package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
  83. package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -1
  84. package/dist/mybodyshield/pages/train/SessionsPage.js +180 -163
  85. package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
  86. package/dist/mybodyshield/utils/i18n.d.ts +1 -2
  87. package/dist/mybodyshield/utils/i18n.d.ts.map +1 -1
  88. package/dist/mybodyshield/utils/i18n.js +15 -0
  89. package/dist/mybodyshield/utils/i18n.js.map +1 -0
  90. package/package.json +1 -1
@@ -2,54 +2,59 @@ import { PageLayout as e } from "../../components/PageLayout.js";
2
2
  import { MetricsCard as t } from "../../components/MetricsCard.js";
3
3
  import { formatDate as n, formatNumber as r, formatRelativeTime as i } from "../../utils/formatters.js";
4
4
  import { EmptyState as ee } from "../../components/EmptyState.js";
5
- import { ErrorView as a, LoadingView as te, Section as o } from "../../components/StateViews.js";
5
+ import { useMybLogRecovery as te, useMybRecoveryLogs as a } from "../../hooks/useMyBodyShieldApi.js";
6
+ import { useTr as o } from "../../hooks/useTr.js";
7
+ import "../../hooks/index.js";
8
+ import { ErrorView as s, LoadingView as c, Section as l } from "../../components/StateViews.js";
6
9
  import { DataTable as ne } from "../../components/DataTable.js";
7
10
  import { FilterTabs as re } from "../../components/FilterTabs.js";
8
- import { useMybLogRecovery as ie, useMybRecoveryLogs as s } from "../../hooks/useMyBodyShieldApi.js";
9
- import "../../hooks/index.js";
10
11
  import "../../components/index.js";
11
- import { motion as c } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
12
- import { useReducedMotion as l } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
13
- import { IconChip as u, RECOVERY_META as d } from "../_shared/visuals.js";
14
- import { Tooltip as f } from "../../../node_modules/recharts/es6/component/Tooltip.js";
15
- import { ResponsiveContainer as ae } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
12
+ import { motion as u } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
13
+ import { useReducedMotion as ie } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
14
+ import { IconChip as d, RECOVERY_META as f } from "../_shared/visuals.js";
15
+ import { Tooltip as ae } from "../../../node_modules/recharts/es6/component/Tooltip.js";
16
+ import { ResponsiveContainer as oe } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
16
17
  import { ReferenceDot as p } from "../../../node_modules/recharts/es6/cartesian/ReferenceDot.js";
17
- import { CartesianGrid as oe } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
18
- import { Area as se } from "../../../node_modules/recharts/es6/cartesian/Area.js";
19
- import { XAxis as ce } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
20
- import { YAxis as le } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
21
- import { AreaChart as ue } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
18
+ import { CartesianGrid as se } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
19
+ import { Area as ce } from "../../../node_modules/recharts/es6/cartesian/Area.js";
20
+ import { XAxis as le } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
21
+ import { YAxis as ue } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
22
+ import { AreaChart as de } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
22
23
  import { useMemo as m, useState as h } from "react";
23
24
  import { HeartPulse as g, Plus as _ } from "lucide-react";
24
25
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
25
- import { Button as b, GlassCard as de, Input as x, Label as S, ResponsiveDialog as fe, ResponsiveDialogContent as pe, ResponsiveDialogDescription as C, ResponsiveDialogFooter as w, ResponsiveDialogHeader as me, ResponsiveDialogTitle as he, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Spinner as xe, Textarea as Se } from "@burdenoff/fe-libs/ui";
26
+ import { Button as b, GlassCard as fe, Input as x, Label as S, ResponsiveDialog as pe, ResponsiveDialogContent as me, ResponsiveDialogDescription as he, ResponsiveDialogFooter as ge, ResponsiveDialogHeader as _e, ResponsiveDialogTitle as ve, Select as ye, SelectContent as be, SelectItem as xe, SelectTrigger as Se, SelectValue as Ce, Spinner as we, Textarea as Te } from "@burdenoff/fe-libs/ui";
26
27
  //#region src/mybodyshield/pages/recovery/RecoveryPage.tsx
27
- var T = [
28
+ var C = [
28
29
  "SLEEP",
29
30
  "READINESS",
30
31
  "SORENESS",
31
32
  "STRESS",
32
33
  "MOOD"
33
- ], Ce = [{
34
- value: "ALL",
35
- label: "All"
36
- }, ...T.map((e) => ({
37
- value: e,
38
- label: d[e].label
39
- }))], E = "var(--color-action-primary-bg)", D = (e) => e >= 70 ? "success" : e >= 40 ? "warning" : "error", O = (e) => e >= 7 ? "success" : e >= 6 ? "warning" : "error";
40
- function k(e) {
34
+ ], w = "var(--color-action-primary-bg)", T = (e) => e >= 70 ? "success" : e >= 40 ? "warning" : "error", E = (e) => e >= 7 ? "success" : e >= 6 ? "warning" : "error";
35
+ function D(e) {
41
36
  let t = (e) => String(e).padStart(2, "0");
42
37
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}`;
43
38
  }
44
- var A = (e = "READINESS") => ({
39
+ var O = (e = "READINESS") => ({
45
40
  metric: e,
46
41
  score: "",
47
42
  sleepHours: "",
48
43
  notes: "",
49
- loggedAt: k(/* @__PURE__ */ new Date())
44
+ loggedAt: D(/* @__PURE__ */ new Date())
50
45
  });
51
- function j() {
52
- let [k, j] = h("ALL"), [we, M] = h(!1), [N, P] = h(A), [F, I] = h(null), Te = s("READINESS"), Ee = s("SLEEP"), De = s("MOOD"), L = s(k === "ALL" ? void 0 : k), R = ie(), z = l(), B = (e, t = !0) => z ? { initial: !1 } : {
46
+ function k(e, t) {
47
+ let n = "mybodyshield.pages.recovery.metricNames";
48
+ switch (t) {
49
+ case "SLEEP": return e(`${n}.sleep`, "Sleep");
50
+ case "READINESS": return e(`${n}.readiness`, "Readiness");
51
+ case "SORENESS": return e(`${n}.soreness`, "Soreness");
52
+ case "STRESS": return e(`${n}.stress`, "Stress");
53
+ case "MOOD": return e(`${n}.mood`, "Mood");
54
+ }
55
+ }
56
+ function A() {
57
+ let D = o(), [A, Ee] = h("ALL"), [De, j] = h(!1), [M, N] = h(O), [P, F] = h(null), Oe = a("READINESS"), ke = a("SLEEP"), Ae = a("MOOD"), I = a(A === "ALL" ? void 0 : A), L = te(), R = ie(), z = (e, t = !0) => R ? { initial: !1 } : {
53
58
  initial: {
54
59
  opacity: 0,
55
60
  y: 14
@@ -71,67 +76,73 @@ function j() {
71
76
  damping: 22
72
77
  }
73
78
  } } : {}
74
- }, V = Te.data?.items ?? [], H = Ee.data?.items ?? [], U = De.data?.items ?? [], W = L.data?.items ?? [], G = m(() => [...V].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [V]), K = m(() => [...U].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [U]), q = m(() => H.length === 0 ? null : H.reduce((e, t) => e + t.sleepHours, 0) / H.length, [H]), J = k === "SLEEP", Y = k === "ALL" ? "All metrics" : d[k].label, X = m(() => [...W].sort((e, t) => new Date(e.loggedAt).getTime() - new Date(t.loggedAt).getTime()).map((e) => ({
79
+ }, B = Oe.data?.items ?? [], V = ke.data?.items ?? [], H = Ae.data?.items ?? [], U = I.data?.items ?? [], W = m(() => [...B].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [B]), G = m(() => [...H].sort((e, t) => new Date(t.loggedAt).getTime() - new Date(e.loggedAt).getTime())[0], [H]), K = m(() => V.length === 0 ? null : V.reduce((e, t) => e + t.sleepHours, 0) / V.length, [V]), q = A === "SLEEP", J = A === "ALL" ? D("mybodyshield.pages.recovery.allMetrics", "All metrics") : k(D, A), je = [{
80
+ value: "ALL",
81
+ label: D("mybodyshield.common.all", "All")
82
+ }, ...C.map((e) => ({
83
+ value: e,
84
+ label: k(D, e)
85
+ }))], Y = m(() => [...U].sort((e, t) => new Date(e.loggedAt).getTime() - new Date(t.loggedAt).getTime()).map((e) => ({
75
86
  label: n(e.loggedAt),
76
- value: J ? e.sleepHours : e.score
77
- })), [W, J]), Z = X.length > 0 ? X[X.length - 1] : void 0, Q = (e = "READINESS") => {
78
- P(A(e)), I(null), M(!0);
79
- }, $ = N.metric === "SLEEP", Oe = async () => {
80
- if (I(null), $) {
81
- if (N.sleepHours.trim() === "") {
82
- I("Sleep hours is required for sleep entries.");
87
+ value: q ? e.sleepHours : e.score
88
+ })), [U, q]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z = (e = "READINESS") => {
89
+ N(O(e)), F(null), j(!0);
90
+ }, Q = M.metric === "SLEEP", Me = async () => {
91
+ if (F(null), Q) {
92
+ if (M.sleepHours.trim() === "") {
93
+ F(D("mybodyshield.pages.recovery.sleepHoursRequired", "Sleep hours is required for sleep entries."));
83
94
  return;
84
95
  }
85
- let e = Number(N.sleepHours);
96
+ let e = Number(M.sleepHours);
86
97
  if (!Number.isFinite(e) || e < 0 || e > 24) {
87
- I("Enter sleep hours between 0 and 24.");
98
+ F(D("mybodyshield.pages.recovery.sleepHoursRange", "Enter sleep hours between 0 and 24."));
88
99
  return;
89
100
  }
90
- } else if (N.score.trim() === "") {
91
- I("A score is required.");
101
+ } else if (M.score.trim() === "") {
102
+ F(D("mybodyshield.pages.recovery.scoreRequired", "A score is required."));
92
103
  return;
93
104
  }
94
- if (N.score.trim() !== "") {
95
- let e = Number(N.score);
105
+ if (M.score.trim() !== "") {
106
+ let e = Number(M.score);
96
107
  if (!Number.isFinite(e) || e < 0 || e > 100) {
97
- I("Enter a score between 0 and 100.");
108
+ F(D("mybodyshield.pages.recovery.scoreRange", "Enter a score between 0 and 100."));
98
109
  return;
99
110
  }
100
111
  }
101
112
  let e = {
102
- metric: N.metric,
103
- score: N.score.trim() === "" ? void 0 : Number(N.score),
104
- sleepHours: N.sleepHours.trim() === "" ? void 0 : Number(N.sleepHours),
105
- notes: N.notes.trim() || void 0,
106
- loggedAt: N.loggedAt ? new Date(N.loggedAt).toISOString() : void 0
113
+ metric: M.metric,
114
+ score: M.score.trim() === "" ? void 0 : Number(M.score),
115
+ sleepHours: M.sleepHours.trim() === "" ? void 0 : Number(M.sleepHours),
116
+ notes: M.notes.trim() || void 0,
117
+ loggedAt: M.loggedAt ? new Date(M.loggedAt).toISOString() : void 0
107
118
  };
108
119
  try {
109
- await R.mutateAsync(e), M(!1);
120
+ await L.mutateAsync(e), j(!1);
110
121
  } catch (e) {
111
- I(e instanceof Error ? e.message : "Failed to log recovery.");
122
+ F(e instanceof Error ? e.message : D("mybodyshield.pages.recovery.failedToLog", "Failed to log recovery."));
112
123
  }
113
- }, ke = [
124
+ }, $ = [
114
125
  {
115
126
  key: "metric",
116
- header: "Metric",
117
- sortValue: (e) => d[e.metric].label,
127
+ header: D("mybodyshield.pages.recovery.metricColumn", "Metric"),
128
+ sortValue: (e) => k(D, e.metric),
118
129
  render: (e) => {
119
- let t = d[e.metric], n = t.icon;
130
+ let t = f[e.metric], n = t.icon;
120
131
  return /* @__PURE__ */ y("span", {
121
132
  className: "inline-flex items-center gap-2.5",
122
- children: [/* @__PURE__ */ v(u, {
133
+ children: [/* @__PURE__ */ v(d, {
123
134
  icon: /* @__PURE__ */ v(n, { className: "h-4 w-4" }),
124
135
  tint: t.tint
125
136
  }), /* @__PURE__ */ v("span", {
126
137
  className: "font-medium text-text-primary",
127
- children: t.label
138
+ children: k(D, e.metric)
128
139
  })]
129
140
  });
130
141
  }
131
142
  },
132
143
  {
133
144
  key: "value",
134
- header: "Value",
145
+ header: D("mybodyshield.pages.recovery.valueColumn", "Value"),
135
146
  align: "right",
136
147
  sortValue: (e) => e.metric === "SLEEP" ? e.sleepHours : e.score,
137
148
  render: (e) => e.metric === "SLEEP" ? /* @__PURE__ */ y("span", {
@@ -144,7 +155,7 @@ function j() {
144
155
  },
145
156
  {
146
157
  key: "notes",
147
- header: "Notes",
158
+ header: D("mybodyshield.pages.recovery.notesColumn", "Notes"),
148
159
  hideOnMobile: !0,
149
160
  render: (e) => e.notes && e.notes.trim() ? /* @__PURE__ */ v("span", {
150
161
  className: "text-text-secondary",
@@ -156,7 +167,7 @@ function j() {
156
167
  },
157
168
  {
158
169
  key: "loggedAt",
159
- header: "Logged",
170
+ header: D("mybodyshield.pages.recovery.loggedColumn", "Logged"),
160
171
  align: "right",
161
172
  sortValue: (e) => new Date(e.loggedAt).getTime(),
162
173
  render: (e) => /* @__PURE__ */ v("span", {
@@ -164,80 +175,79 @@ function j() {
164
175
  children: i(e.loggedAt)
165
176
  })
166
177
  }
167
- ], Ae = d.READINESS.icon, je = d.SLEEP.icon, Me = d.MOOD.icon;
178
+ ], Ne = f.READINESS.icon, Pe = f.SLEEP.icon, Fe = f.MOOD.icon;
168
179
  return /* @__PURE__ */ y(e, {
169
- title: "Recovery",
170
- description: "Sleep, readiness, soreness, stress & mood.",
180
+ title: D("mybodyshield.pages.recovery.title", "Recovery"),
181
+ description: D("mybodyshield.pages.recovery.description", "Sleep, readiness, soreness, stress & mood."),
171
182
  actions: /* @__PURE__ */ y(b, {
172
183
  className: "gap-2",
173
- onClick: () => Q(),
174
- children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "Log recovery"]
184
+ onClick: () => Z(),
185
+ children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")]
175
186
  }),
176
187
  children: [
177
- /* @__PURE__ */ y(c.div, {
178
- ...B(0),
188
+ /* @__PURE__ */ y(u.div, {
189
+ ...z(0),
179
190
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
180
191
  children: [
181
192
  /* @__PURE__ */ v(t, {
182
- icon: /* @__PURE__ */ v(u, {
183
- icon: /* @__PURE__ */ v(Ae, { className: "h-5 w-5" }),
184
- tint: d.READINESS.tint
193
+ icon: /* @__PURE__ */ v(d, {
194
+ icon: /* @__PURE__ */ v(Ne, { className: "h-5 w-5" }),
195
+ tint: f.READINESS.tint
185
196
  }),
186
- value: G ? r(G.score) : "—",
187
- label: "Latest readiness",
188
- accent: G ? D(G.score) : void 0,
189
- footer: G ? /* @__PURE__ */ v("p", {
197
+ value: W ? r(W.score) : "—",
198
+ label: D("mybodyshield.pages.recovery.latestReadiness", "Latest readiness"),
199
+ accent: W ? T(W.score) : void 0,
200
+ footer: W ? /* @__PURE__ */ v("p", {
190
201
  className: "text-xs text-text-tertiary",
191
- children: i(G.loggedAt)
202
+ children: i(W.loggedAt)
192
203
  }) : /* @__PURE__ */ v("button", {
193
204
  type: "button",
194
- onClick: () => Q("READINESS"),
205
+ onClick: () => Z("READINESS"),
195
206
  className: "text-xs font-medium text-accent hover:underline",
196
- children: "Log readiness →"
207
+ children: D("mybodyshield.pages.recovery.logReadiness", "Log readiness →")
197
208
  })
198
209
  }),
199
210
  /* @__PURE__ */ v(t, {
200
- icon: /* @__PURE__ */ v(u, {
201
- icon: /* @__PURE__ */ v(je, { className: "h-5 w-5" }),
202
- tint: d.SLEEP.tint
211
+ icon: /* @__PURE__ */ v(d, {
212
+ icon: /* @__PURE__ */ v(Pe, { className: "h-5 w-5" }),
213
+ tint: f.SLEEP.tint
203
214
  }),
204
- value: q == null ? "—" : `${r(q, { maximumFractionDigits: 1 })} h`,
205
- label: "Avg sleep",
206
- accent: q == null ? void 0 : O(q),
207
- footer: H.length > 0 ? /* @__PURE__ */ y("p", {
215
+ value: K == null ? "—" : `${r(K, { maximumFractionDigits: 1 })} h`,
216
+ label: D("mybodyshield.pages.recovery.avgSleep", "Avg sleep"),
217
+ accent: K == null ? void 0 : E(K),
218
+ footer: V.length > 0 ? /* @__PURE__ */ y("p", {
208
219
  className: "text-xs text-text-tertiary",
209
220
  children: [
210
221
  /* @__PURE__ */ v("span", {
211
222
  className: "tabular-nums text-text-secondary",
212
- children: H.length
223
+ children: V.length
213
224
  }),
214
225
  " ",
215
- H.length === 1 ? "night" : "nights",
216
- " logged"
226
+ V.length === 1 ? D("mybodyshield.pages.recovery.nightsLogged", "{{count}} night logged", { count: V.length }) : D("mybodyshield.pages.recovery.nightsLoggedPlural", "{{count}} nights logged", { count: V.length })
217
227
  ]
218
228
  }) : /* @__PURE__ */ v("button", {
219
229
  type: "button",
220
- onClick: () => Q("SLEEP"),
230
+ onClick: () => Z("SLEEP"),
221
231
  className: "text-xs font-medium text-accent hover:underline",
222
- children: "Log sleep →"
232
+ children: D("mybodyshield.pages.recovery.logSleep", "Log sleep →")
223
233
  })
224
234
  }),
225
235
  /* @__PURE__ */ v(t, {
226
- icon: /* @__PURE__ */ v(u, {
227
- icon: /* @__PURE__ */ v(Me, { className: "h-5 w-5" }),
228
- tint: d.MOOD.tint
236
+ icon: /* @__PURE__ */ v(d, {
237
+ icon: /* @__PURE__ */ v(Fe, { className: "h-5 w-5" }),
238
+ tint: f.MOOD.tint
229
239
  }),
230
- value: K ? r(K.score) : "—",
231
- label: "Latest mood",
232
- accent: K ? D(K.score) : void 0,
233
- footer: K ? /* @__PURE__ */ v("p", {
240
+ value: G ? r(G.score) : "—",
241
+ label: D("mybodyshield.pages.recovery.latestMood", "Latest mood"),
242
+ accent: G ? T(G.score) : void 0,
243
+ footer: G ? /* @__PURE__ */ v("p", {
234
244
  className: "text-xs text-text-tertiary",
235
- children: i(K.loggedAt)
245
+ children: i(G.loggedAt)
236
246
  }) : /* @__PURE__ */ v("button", {
237
247
  type: "button",
238
- onClick: () => Q("MOOD"),
248
+ onClick: () => Z("MOOD"),
239
249
  className: "text-xs font-medium text-accent hover:underline",
240
- children: "Log mood →"
250
+ children: D("mybodyshield.pages.recovery.logMood", "Log mood →")
241
251
  })
242
252
  })
243
253
  ]
@@ -245,26 +255,26 @@ function j() {
245
255
  /* @__PURE__ */ v("div", {
246
256
  className: "mt-6 flex flex-wrap items-center gap-3",
247
257
  children: /* @__PURE__ */ v(re, {
248
- options: Ce,
249
- value: k,
250
- onChange: j
258
+ options: je,
259
+ value: A,
260
+ onChange: Ee
251
261
  })
252
262
  }),
253
- /* @__PURE__ */ v(o, {
254
- title: `${Y} trend`,
255
- description: J ? "Sleep hours over time." : "Recovery score over time.",
256
- children: /* @__PURE__ */ v(c.div, {
257
- ...B(.08),
258
- children: /* @__PURE__ */ v(de, {
263
+ /* @__PURE__ */ v(l, {
264
+ title: D("mybodyshield.pages.recovery.trendTitle", "{{metric}} trend", { metric: J }),
265
+ description: q ? D("mybodyshield.pages.recovery.sleepTrendDescription", "Sleep hours over time.") : D("mybodyshield.pages.recovery.scoreTrendDescription", "Recovery score over time."),
266
+ children: /* @__PURE__ */ v(u.div, {
267
+ ...z(.08),
268
+ children: /* @__PURE__ */ v(fe, {
259
269
  treatment: "glass",
260
270
  className: "rounded-2xl p-6 transition-shadow duration-300 hover:shadow-2xl",
261
- children: L.isLoading ? /* @__PURE__ */ v("div", {
271
+ children: I.isLoading ? /* @__PURE__ */ v("div", {
262
272
  className: "flex h-[280px] items-center justify-center",
263
- children: /* @__PURE__ */ v(xe, { size: "lg" })
264
- }) : L.isError ? /* @__PURE__ */ v(a, {
265
- message: "We couldn't load this metric's history.",
266
- onRetry: () => L.refetch()
267
- }) : X.length === 0 ? /* @__PURE__ */ y("div", {
273
+ children: /* @__PURE__ */ v(we, { size: "lg" })
274
+ }) : I.isError ? /* @__PURE__ */ v(s, {
275
+ message: D("mybodyshield.pages.recovery.chartError", "We couldn't load this metric's history."),
276
+ onRetry: () => I.refetch()
277
+ }) : Y.length === 0 ? /* @__PURE__ */ y("div", {
268
278
  className: "flex h-[280px] flex-col items-center justify-center text-center",
269
279
  children: [
270
280
  /* @__PURE__ */ v("span", {
@@ -273,22 +283,18 @@ function j() {
273
283
  }),
274
284
  /* @__PURE__ */ v("p", {
275
285
  className: "mt-3 text-sm font-medium text-text-primary",
276
- children: "Nothing to chart yet"
286
+ children: D("mybodyshield.pages.recovery.emptyChartTitle", "Nothing to chart yet")
277
287
  }),
278
- /* @__PURE__ */ y("p", {
288
+ /* @__PURE__ */ v("p", {
279
289
  className: "mt-1 max-w-xs text-xs text-text-tertiary",
280
- children: [
281
- "Log a few ",
282
- Y.toLowerCase(),
283
- " entries to see your trend here."
284
- ]
290
+ children: D("mybodyshield.pages.recovery.emptyChartDescription", "Log a few {{metric}} entries to see your trend here.", { metric: J.toLowerCase() })
285
291
  })
286
292
  ]
287
- }) : /* @__PURE__ */ v(ae, {
293
+ }) : /* @__PURE__ */ v(oe, {
288
294
  width: "100%",
289
295
  height: 280,
290
- children: /* @__PURE__ */ y(ue, {
291
- data: X,
296
+ children: /* @__PURE__ */ y(de, {
297
+ data: Y,
292
298
  margin: {
293
299
  top: 12,
294
300
  right: 16,
@@ -305,27 +311,27 @@ function j() {
305
311
  children: [
306
312
  /* @__PURE__ */ v("stop", {
307
313
  offset: "0%",
308
- stopColor: E,
314
+ stopColor: w,
309
315
  stopOpacity: .38
310
316
  }),
311
317
  /* @__PURE__ */ v("stop", {
312
318
  offset: "55%",
313
- stopColor: E,
319
+ stopColor: w,
314
320
  stopOpacity: .12
315
321
  }),
316
322
  /* @__PURE__ */ v("stop", {
317
323
  offset: "100%",
318
- stopColor: E,
324
+ stopColor: w,
319
325
  stopOpacity: 0
320
326
  })
321
327
  ]
322
328
  }) }),
323
- /* @__PURE__ */ v(oe, {
329
+ /* @__PURE__ */ v(se, {
324
330
  vertical: !1,
325
331
  stroke: "var(--color-border-seam)",
326
332
  strokeDasharray: "4 4"
327
333
  }),
328
- /* @__PURE__ */ v(ce, {
334
+ /* @__PURE__ */ v(le, {
329
335
  dataKey: "label",
330
336
  tickLine: !1,
331
337
  axisLine: !1,
@@ -336,7 +342,7 @@ function j() {
336
342
  fontSize: 12
337
343
  }
338
344
  }),
339
- /* @__PURE__ */ v(le, {
345
+ /* @__PURE__ */ v(ue, {
340
346
  width: 44,
341
347
  tickLine: !1,
342
348
  axisLine: !1,
@@ -345,7 +351,7 @@ function j() {
345
351
  fontSize: 12
346
352
  }
347
353
  }),
348
- /* @__PURE__ */ v(f, {
354
+ /* @__PURE__ */ v(ae, {
349
355
  contentStyle: {
350
356
  background: "var(--color-bg-surface)",
351
357
  border: "1px solid var(--color-border-seam)",
@@ -359,11 +365,11 @@ function j() {
359
365
  strokeDasharray: "4 4"
360
366
  }
361
367
  }),
362
- /* @__PURE__ */ v(se, {
368
+ /* @__PURE__ */ v(ce, {
363
369
  type: "monotone",
364
370
  dataKey: "value",
365
- name: J ? "Sleep hours" : "Score",
366
- stroke: E,
371
+ name: q ? D("mybodyshield.pages.recovery.sleepHours", "Sleep hours") : D("mybodyshield.pages.recovery.score", "Score"),
372
+ stroke: w,
367
373
  strokeWidth: 2.5,
368
374
  fill: "url(#myb-recovery-fill)",
369
375
  fillOpacity: 1,
@@ -372,28 +378,28 @@ function j() {
372
378
  r: 4,
373
379
  strokeWidth: 2,
374
380
  stroke: "var(--color-bg-surface)",
375
- fill: E
381
+ fill: w
376
382
  },
377
- isAnimationActive: !z,
383
+ isAnimationActive: !R,
378
384
  animationDuration: 900
379
385
  }),
380
- Z && /* @__PURE__ */ v(p, {
381
- x: Z.label,
382
- y: Z.value,
386
+ X && /* @__PURE__ */ v(p, {
387
+ x: X.label,
388
+ y: X.value,
383
389
  r: 12,
384
390
  isFront: !0,
385
391
  ifOverflow: "visible",
386
- fill: E,
392
+ fill: w,
387
393
  fillOpacity: .16,
388
394
  stroke: "none"
389
395
  }),
390
- Z && /* @__PURE__ */ v(p, {
391
- x: Z.label,
392
- y: Z.value,
396
+ X && /* @__PURE__ */ v(p, {
397
+ x: X.label,
398
+ y: X.value,
393
399
  r: 5,
394
400
  isFront: !0,
395
401
  ifOverflow: "visible",
396
- fill: E,
402
+ fill: w,
397
403
  stroke: "var(--color-bg-surface)",
398
404
  strokeWidth: 2
399
405
  })
@@ -403,27 +409,27 @@ function j() {
403
409
  })
404
410
  })
405
411
  }),
406
- /* @__PURE__ */ v(c.div, {
407
- ...B(.16, !1),
408
- children: /* @__PURE__ */ v(o, {
409
- title: "Recovery log",
410
- description: "Every recovery entry, most recent first.",
411
- children: L.isLoading ? /* @__PURE__ */ v(te, { label: "Loading recovery logs…" }) : L.isError ? /* @__PURE__ */ v(a, {
412
- message: "We couldn't load your recovery logs.",
413
- onRetry: () => L.refetch()
414
- }) : W.length === 0 ? /* @__PURE__ */ v(ee, {
412
+ /* @__PURE__ */ v(u.div, {
413
+ ...z(.16, !1),
414
+ children: /* @__PURE__ */ v(l, {
415
+ title: D("mybodyshield.pages.recovery.recoveryLog", "Recovery log"),
416
+ description: D("mybodyshield.pages.recovery.recoveryLogDescription", "Every recovery entry, most recent first."),
417
+ children: I.isLoading ? /* @__PURE__ */ v(c, { label: D("mybodyshield.pages.recovery.loading", "Loading recovery logs…") }) : I.isError ? /* @__PURE__ */ v(s, {
418
+ message: D("mybodyshield.pages.recovery.error", "We couldn't load your recovery logs."),
419
+ onRetry: () => I.refetch()
420
+ }) : U.length === 0 ? /* @__PURE__ */ v(ee, {
415
421
  illustration: "empty-data",
416
422
  icon: /* @__PURE__ */ v(g, { className: "h-10 w-10" }),
417
- title: "No recovery logs yet",
418
- description: "Track your sleep, readiness, soreness, stress or mood to see how your body is recovering between sessions.",
423
+ title: D("mybodyshield.pages.recovery.emptyTitle", "No recovery logs yet"),
424
+ description: D("mybodyshield.pages.recovery.emptyDescription", "Track your sleep, readiness, soreness, stress or mood to see how your body is recovering between sessions."),
419
425
  action: /* @__PURE__ */ y(b, {
420
426
  className: "gap-2",
421
- onClick: () => Q(),
422
- children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), "Log recovery"]
427
+ onClick: () => Z(),
428
+ children: [/* @__PURE__ */ v(_, { className: "h-4 w-4" }), D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")]
423
429
  })
424
430
  }) : /* @__PURE__ */ v(ne, {
425
- columns: ke,
426
- rows: W,
431
+ columns: $,
432
+ rows: U,
427
433
  rowKey: (e) => e.id,
428
434
  defaultSort: {
429
435
  key: "loggedAt",
@@ -432,13 +438,13 @@ function j() {
432
438
  })
433
439
  })
434
440
  }),
435
- /* @__PURE__ */ v(fe, {
436
- open: we,
437
- onOpenChange: M,
438
- children: /* @__PURE__ */ y(pe, {
441
+ /* @__PURE__ */ v(pe, {
442
+ open: De,
443
+ onOpenChange: j,
444
+ children: /* @__PURE__ */ y(me, {
439
445
  className: "sm:max-w-[480px]",
440
446
  children: [
441
- /* @__PURE__ */ y(me, { children: [/* @__PURE__ */ v(he, { children: "Log recovery" }), /* @__PURE__ */ v(C, { children: "Capture how your body is recovering — one metric per entry." })] }),
447
+ /* @__PURE__ */ y(_e, { children: [/* @__PURE__ */ v(ve, { children: D("mybodyshield.pages.recovery.dialogTitle", "Log recovery") }), /* @__PURE__ */ v(he, { children: D("mybodyshield.pages.recovery.dialogDescription", "Capture how your body is recovering — one metric per entry.") })] }),
442
448
  /* @__PURE__ */ y("div", {
443
449
  className: "space-y-4 py-2",
444
450
  children: [
@@ -446,28 +452,28 @@ function j() {
446
452
  className: "space-y-1.5",
447
453
  children: [/* @__PURE__ */ v(S, {
448
454
  htmlFor: "myb-recovery-metric",
449
- children: "Metric"
450
- }), /* @__PURE__ */ y(ge, {
451
- value: N.metric,
452
- onValueChange: (e) => P((t) => ({
455
+ children: D("mybodyshield.pages.recovery.metric", "Metric")
456
+ }), /* @__PURE__ */ y(ye, {
457
+ value: M.metric,
458
+ onValueChange: (e) => N((t) => ({
453
459
  ...t,
454
460
  metric: e
455
461
  })),
456
- children: [/* @__PURE__ */ v(ye, {
462
+ children: [/* @__PURE__ */ v(Se, {
457
463
  id: "myb-recovery-metric",
458
- children: /* @__PURE__ */ v(be, {})
459
- }), /* @__PURE__ */ v(_e, { children: T.map((e) => /* @__PURE__ */ v(ve, {
464
+ children: /* @__PURE__ */ v(Ce, {})
465
+ }), /* @__PURE__ */ v(be, { children: C.map((e) => /* @__PURE__ */ v(xe, {
460
466
  value: e,
461
- children: d[e].label
467
+ children: k(D, e)
462
468
  }, e)) })]
463
469
  })]
464
470
  }),
465
- $ && /* @__PURE__ */ y("div", {
471
+ Q && /* @__PURE__ */ y("div", {
466
472
  className: "space-y-1.5",
467
473
  children: [
468
474
  /* @__PURE__ */ v(S, {
469
475
  htmlFor: "myb-recovery-sleep",
470
- children: "Sleep hours"
476
+ children: D("mybodyshield.pages.recovery.sleepHours", "Sleep hours")
471
477
  }),
472
478
  /* @__PURE__ */ v(x, {
473
479
  id: "myb-recovery-sleep",
@@ -475,25 +481,25 @@ function j() {
475
481
  min: "0",
476
482
  max: "24",
477
483
  step: "0.1",
478
- value: N.sleepHours,
479
- onChange: (e) => P((t) => ({
484
+ value: M.sleepHours,
485
+ onChange: (e) => N((t) => ({
480
486
  ...t,
481
487
  sleepHours: e.target.value
482
488
  })),
483
- placeholder: "e.g. 7.5"
489
+ placeholder: D("mybodyshield.pages.recovery.sleepHoursPlaceholder", "e.g. 7.5")
484
490
  }),
485
491
  /* @__PURE__ */ v("p", {
486
492
  className: "text-xs text-text-tertiary",
487
- children: "Primary measure for sleep entries."
493
+ children: D("mybodyshield.pages.recovery.sleepHoursHint", "Primary measure for sleep entries.")
488
494
  })
489
495
  ]
490
496
  }),
491
497
  /* @__PURE__ */ y("div", {
492
498
  className: "space-y-1.5",
493
499
  children: [
494
- /* @__PURE__ */ y(S, {
500
+ /* @__PURE__ */ v(S, {
495
501
  htmlFor: "myb-recovery-score",
496
- children: ["Score", $ ? " (optional)" : ""]
502
+ children: Q ? D("mybodyshield.pages.recovery.scoreOptional", "Score (optional)") : D("mybodyshield.pages.recovery.score", "Score")
497
503
  }),
498
504
  /* @__PURE__ */ v(x, {
499
505
  id: "myb-recovery-score",
@@ -501,16 +507,16 @@ function j() {
501
507
  min: "0",
502
508
  max: "100",
503
509
  step: "1",
504
- value: N.score,
505
- onChange: (e) => P((t) => ({
510
+ value: M.score,
511
+ onChange: (e) => N((t) => ({
506
512
  ...t,
507
513
  score: e.target.value
508
514
  })),
509
- placeholder: "0–100"
515
+ placeholder: D("mybodyshield.pages.recovery.scorePlaceholder", "0–100")
510
516
  }),
511
517
  /* @__PURE__ */ v("p", {
512
518
  className: "text-xs text-text-tertiary",
513
- children: $ ? "Optional 0–100 sleep-quality score." : "A 0–100 rating for this metric."
519
+ children: Q ? D("mybodyshield.pages.recovery.sleepScoreHint", "Optional 0–100 sleep-quality score.") : D("mybodyshield.pages.recovery.scoreHint", "A 0–100 rating for this metric.")
514
520
  })
515
521
  ]
516
522
  }),
@@ -518,12 +524,12 @@ function j() {
518
524
  className: "space-y-1.5",
519
525
  children: [/* @__PURE__ */ v(S, {
520
526
  htmlFor: "myb-recovery-at",
521
- children: "Logged at"
527
+ children: D("mybodyshield.pages.recovery.loggedAt", "Logged at")
522
528
  }), /* @__PURE__ */ v(x, {
523
529
  id: "myb-recovery-at",
524
530
  type: "datetime-local",
525
- value: N.loggedAt,
526
- onChange: (e) => P((t) => ({
531
+ value: M.loggedAt,
532
+ onChange: (e) => N((t) => ({
527
533
  ...t,
528
534
  loggedAt: e.target.value
529
535
  }))
@@ -533,33 +539,33 @@ function j() {
533
539
  className: "space-y-1.5",
534
540
  children: [/* @__PURE__ */ v(S, {
535
541
  htmlFor: "myb-recovery-notes",
536
- children: "Notes"
537
- }), /* @__PURE__ */ v(Se, {
542
+ children: D("mybodyshield.common.notes", "Notes")
543
+ }), /* @__PURE__ */ v(Te, {
538
544
  id: "myb-recovery-notes",
539
545
  rows: 3,
540
- value: N.notes,
541
- onChange: (e) => P((t) => ({
546
+ value: M.notes,
547
+ onChange: (e) => N((t) => ({
542
548
  ...t,
543
549
  notes: e.target.value
544
550
  })),
545
- placeholder: "How are you feeling? (optional)"
551
+ placeholder: D("mybodyshield.pages.recovery.notesPlaceholder", "How are you feeling? (optional)")
546
552
  })]
547
553
  }),
548
- F && /* @__PURE__ */ v("p", {
554
+ P && /* @__PURE__ */ v("p", {
549
555
  className: "text-sm text-status-error-text",
550
- children: F
556
+ children: P
551
557
  })
552
558
  ]
553
559
  }),
554
- /* @__PURE__ */ y(w, { children: [/* @__PURE__ */ v(b, {
560
+ /* @__PURE__ */ y(ge, { children: [/* @__PURE__ */ v(b, {
555
561
  variant: "outline",
556
- onClick: () => M(!1),
557
- disabled: R.isPending,
558
- children: "Cancel"
562
+ onClick: () => j(!1),
563
+ disabled: L.isPending,
564
+ children: D("mybodyshield.common.cancel", "Cancel")
559
565
  }), /* @__PURE__ */ v(b, {
560
- onClick: Oe,
561
- disabled: R.isPending,
562
- children: R.isPending ? "Saving…" : "Log recovery"
566
+ onClick: Me,
567
+ disabled: L.isPending,
568
+ children: L.isPending ? D("mybodyshield.common.saving", "Saving…") : D("mybodyshield.pages.recovery.logRecoveryButton", "Log recovery")
563
569
  })] })
564
570
  ]
565
571
  })
@@ -568,6 +574,6 @@ function j() {
568
574
  });
569
575
  }
570
576
  //#endregion
571
- export { j as RecoveryPage };
577
+ export { A as RecoveryPage };
572
578
 
573
579
  //# sourceMappingURL=RecoveryPage.js.map