@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,217 +2,355 @@ import { useMyBodyShield as e } from "../../context/MyBodyShieldContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
4
  import { formatDate as r, formatEnumLabel as i, formatGrams as a, formatKcal as o, formatNumber as s, formatPercent as c, formatWeight as l } from "../../utils/formatters.js";
5
- import { ErrorView as u, LoadingView as d, Section as f } from "../../components/StateViews.js";
6
- import { DataTable as p } from "../../components/DataTable.js";
7
5
  import "../../context/index.js";
8
- import { useMybInsights as m } from "../../hooks/useMyBodyShieldApi.js";
9
- import { useMyBodyShieldAnalytics as h } from "../../hooks/useMyBodyShieldAnalytics.js";
6
+ import { useMybInsights as u } from "../../hooks/useMyBodyShieldApi.js";
7
+ import { useMyBodyShieldAnalytics as d } from "../../hooks/useMyBodyShieldAnalytics.js";
8
+ import { useTr as f } from "../../hooks/useTr.js";
10
9
  import "../../hooks/index.js";
10
+ import { ErrorView as p, LoadingView as m, Section as h } from "../../components/StateViews.js";
11
+ import { DataTable as g } from "../../components/DataTable.js";
11
12
  import "../../components/index.js";
12
- import { CalorieChart as g, CorrelationView as _, MacroChart as v, ReadinessSleepChart as y, VolumeChart as b } from "./InsightsCharts.js";
13
- import { useEffect as x, useMemo as S, useState as C } from "react";
14
- import { BarChart3 as w, Calendar as T, Dumbbell as E, Flame as D, HeartPulse as O, Moon as k, Scale as A, Target as j, TrendingUp as M, Utensils as N } from "lucide-react";
15
- import { jsx as P, jsxs as F } from "react/jsx-runtime";
16
- import { GlassCard as I } from "@burdenoff/fe-libs/ui";
13
+ import { CalorieChart as _, CorrelationView as v, MacroChart as y, ReadinessSleepChart as b, VolumeChart as x } from "./InsightsCharts.js";
14
+ import { useEffect as S, useMemo as C, useState as w } from "react";
15
+ import { BarChart3 as T, Calendar as E, Dumbbell as D, Flame as O, HeartPulse as k, Moon as A, Scale as j, Target as M, TrendingUp as N, Utensils as P } from "lucide-react";
16
+ import { jsx as F, jsxs as I } from "react/jsx-runtime";
17
+ import { Button as L, GlassCard as R } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/mybodyshield/pages/insights/InsightsPage.tsx
18
- var L = [
19
+ var z = [
19
20
  {
20
- label: "Last 7 days",
21
+ labelKey: "last7Days",
22
+ fallback: "Last 7 days",
21
23
  days: 7
22
24
  },
23
25
  {
24
- label: "Last 30 days",
26
+ labelKey: "last30Days",
27
+ fallback: "Last 30 days",
25
28
  days: 30
26
29
  },
27
30
  {
28
- label: "Last 90 days",
31
+ labelKey: "last90Days",
32
+ fallback: "Last 90 days",
29
33
  days: 90
30
34
  }
31
35
  ];
32
- function R(e) {
36
+ function B(e) {
33
37
  return e.toISOString().split("T")[0];
34
38
  }
35
- function z(e) {
36
- return S(() => {
39
+ function V(e) {
40
+ return e.calories > 0 || e.proteinG > 0 || e.carbsG > 0 || e.fatG > 0;
41
+ }
42
+ function H(e) {
43
+ return e.readiness != null || e.sleepHours != null;
44
+ }
45
+ function U(e) {
46
+ return e.sessions > 0 || H(e) || V(e) || e.weight != null;
47
+ }
48
+ function W({ daily: e, summary: t, onOpen: n }) {
49
+ let r = f(), i = e.length, a = [
50
+ {
51
+ route: "train",
52
+ icon: /* @__PURE__ */ F(D, { className: "h-4 w-4" }),
53
+ label: r("mybodyshield.pages.insights.training", "Training"),
54
+ value: t.totalSessions,
55
+ unit: t.totalSessions === 1 ? r("mybodyshield.pages.insights.trainingUnitSingular", "completed session") : r("mybodyshield.pages.insights.trainingUnitPlural", "completed sessions"),
56
+ detail: r("mybodyshield.pages.insights.trainingDetail", "on {{active}} of {{total}} days", {
57
+ active: s(e.filter((e) => e.sessions > 0).length),
58
+ total: s(i)
59
+ })
60
+ },
61
+ {
62
+ route: "recovery",
63
+ icon: /* @__PURE__ */ F(k, { className: "h-4 w-4" }),
64
+ label: r("mybodyshield.pages.insights.recovery", "Recovery"),
65
+ value: e.filter(H).length,
66
+ unit: r("mybodyshield.pages.insights.recoveryUnit", "days logged"),
67
+ detail: r("mybodyshield.pages.insights.recoveryDetail", "readiness or sleep entries")
68
+ },
69
+ {
70
+ route: "nutrition",
71
+ icon: /* @__PURE__ */ F(P, { className: "h-4 w-4" }),
72
+ label: r("mybodyshield.pages.insights.nutrition", "Nutrition"),
73
+ value: e.filter(V).length,
74
+ unit: r("mybodyshield.pages.insights.nutritionUnit", "days logged"),
75
+ detail: r("mybodyshield.pages.insights.nutritionDetail", "days with macros logged")
76
+ },
77
+ {
78
+ route: "progress",
79
+ icon: /* @__PURE__ */ F(j, { className: "h-4 w-4" }),
80
+ label: r("mybodyshield.pages.insights.bodyWeight", "Body weight"),
81
+ value: e.filter((e) => e.weight != null).length,
82
+ unit: r("mybodyshield.pages.insights.bodyWeightUnit", "days logged"),
83
+ detail: r("mybodyshield.pages.insights.bodyWeightDetail", "weight readings only")
84
+ }
85
+ ];
86
+ return /* @__PURE__ */ F(h, {
87
+ title: r("mybodyshield.pages.insights.sourcesTitle", "What these numbers are built on"),
88
+ description: r("mybodyshield.pages.insights.sourcesDescription", "The logs feeding the charts above. Gaps here are why a trend can look flat."),
89
+ children: /* @__PURE__ */ F("div", {
90
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
91
+ children: a.map((e) => /* @__PURE__ */ I(R, {
92
+ treatment: "plain",
93
+ className: "flex flex-col gap-3 p-5",
94
+ children: [/* @__PURE__ */ I("div", {
95
+ className: "flex items-center justify-between gap-2",
96
+ children: [/* @__PURE__ */ I("div", {
97
+ className: "flex min-w-0 items-center gap-2 text-text-secondary",
98
+ children: [e.icon, /* @__PURE__ */ F("span", {
99
+ className: "truncate text-sm font-medium text-text-primary",
100
+ children: e.label
101
+ })]
102
+ }), /* @__PURE__ */ F(L, {
103
+ variant: "ghost",
104
+ size: "sm",
105
+ onClick: () => n(e.route),
106
+ children: r("mybodyshield.pages.insights.viewButton", "View")
107
+ })]
108
+ }), /* @__PURE__ */ I("div", { children: [
109
+ /* @__PURE__ */ F("p", {
110
+ className: "text-2xl font-bold tabular-nums text-text-primary",
111
+ children: s(e.value)
112
+ }),
113
+ /* @__PURE__ */ F("p", {
114
+ className: "text-xs text-text-secondary",
115
+ children: e.unit
116
+ }),
117
+ /* @__PURE__ */ F("p", {
118
+ className: "mt-1 text-xs text-text-tertiary",
119
+ children: e.detail
120
+ })
121
+ ] })]
122
+ }, e.route))
123
+ })
124
+ });
125
+ }
126
+ function G(e) {
127
+ return C(() => {
37
128
  let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
38
129
  return n.setDate(t.getDate() - e + 1), {
39
- dateRangeStart: R(n),
40
- dateRangeEnd: R(t)
130
+ dateRangeStart: B(n),
131
+ dateRangeEnd: B(t)
41
132
  };
42
133
  }, [e]);
43
134
  }
44
- function B() {
45
- let { workspaceId: S } = e(), [R, B] = C(30), V = m(z(R)), H = h();
46
- if (x(() => {
47
- H.emitPageView("insights", { workspaceId: S });
48
- }, [H, S]), V.isLoading) return /* @__PURE__ */ P(t, {
49
- title: "Insights",
50
- children: /* @__PURE__ */ P(d, { label: "Loading insights…" })
135
+ function K() {
136
+ let C = f(), { workspaceId: L, navigateTo: B } = e(), [V, H] = w(30), K = u(G(V)), q = d();
137
+ if (S(() => {
138
+ q.emitPageView("insights", { workspaceId: L });
139
+ }, [q, L]), K.isLoading) return /* @__PURE__ */ F(t, {
140
+ title: C("mybodyshield.pages.insights.title", "Insights"),
141
+ children: /* @__PURE__ */ F(m, { label: C("mybodyshield.pages.insights.loading", "Loading insights…") })
51
142
  });
52
- if (V.isError) return /* @__PURE__ */ P(t, {
53
- title: "Insights",
54
- children: /* @__PURE__ */ P(u, {
55
- title: "Could not load insights",
56
- message: V.error instanceof Error ? V.error.message : "Unknown error",
57
- onRetry: () => V.refetch()
143
+ if (K.isError) return /* @__PURE__ */ F(t, {
144
+ title: C("mybodyshield.pages.insights.title", "Insights"),
145
+ children: /* @__PURE__ */ F(p, {
146
+ title: C("mybodyshield.pages.insights.errorTitle", "Could not load insights"),
147
+ message: K.error instanceof Error ? K.error.message : C("mybodyshield.common.unknownError", "Unknown error"),
148
+ onRetry: () => K.refetch()
58
149
  })
59
150
  });
60
- let U = V.data;
61
- if (!U) return /* @__PURE__ */ P(t, {
62
- title: "Insights",
63
- children: /* @__PURE__ */ P(u, {
64
- title: "Could not load insights",
65
- message: "No insight data was returned.",
66
- onRetry: () => V.refetch()
151
+ let J = K.data;
152
+ if (!J) return /* @__PURE__ */ F(t, {
153
+ title: C("mybodyshield.pages.insights.title", "Insights"),
154
+ children: /* @__PURE__ */ F(p, {
155
+ title: C("mybodyshield.pages.insights.errorTitle", "Could not load insights"),
156
+ message: C("mybodyshield.pages.insights.error", "No insight data was returned."),
157
+ onRetry: () => K.refetch()
67
158
  })
68
159
  });
69
- let { summary: W, daily: G, goals: K } = U;
70
- return /* @__PURE__ */ F(t, {
71
- title: "Insights",
72
- description: `${r(U.dateRangeStart)} – ${r(U.dateRangeEnd)}`,
160
+ let { summary: Y, daily: X, goals: Z } = J, Q = X.filter(U).length, $ = [
161
+ {
162
+ key: "date",
163
+ header: C("mybodyshield.pages.insights.dateColumn", "Date"),
164
+ render: (e) => /* @__PURE__ */ F("span", {
165
+ className: "text-text-primary",
166
+ children: r(e.date)
167
+ })
168
+ },
169
+ {
170
+ key: "sessions",
171
+ header: C("mybodyshield.pages.insights.sessionsColumn", "Sessions"),
172
+ align: "right",
173
+ render: (e) => /* @__PURE__ */ F("span", {
174
+ className: "tabular-nums text-text-secondary",
175
+ children: e.sessions
176
+ })
177
+ },
178
+ {
179
+ key: "volumeKg",
180
+ header: C("mybodyshield.pages.insights.volumeColumn", "Volume"),
181
+ align: "right",
182
+ render: (e) => /* @__PURE__ */ F("span", {
183
+ className: "tabular-nums text-text-secondary",
184
+ children: l(e.volumeKg)
185
+ })
186
+ },
187
+ {
188
+ key: "readiness",
189
+ header: C("mybodyshield.pages.insights.readinessColumn", "Readiness"),
190
+ align: "right",
191
+ render: (e) => /* @__PURE__ */ F("span", {
192
+ className: "tabular-nums text-text-secondary",
193
+ children: e.readiness == null ? "—" : s(e.readiness)
194
+ })
195
+ },
196
+ {
197
+ key: "sleepHours",
198
+ header: C("mybodyshield.pages.insights.sleepColumn", "Sleep"),
199
+ align: "right",
200
+ render: (e) => /* @__PURE__ */ F("span", {
201
+ className: "tabular-nums text-text-secondary",
202
+ children: e.sleepHours == null ? "—" : `${s(e.sleepHours)} h`
203
+ })
204
+ },
205
+ {
206
+ key: "calories",
207
+ header: C("mybodyshield.pages.insights.caloriesColumn", "Calories"),
208
+ align: "right",
209
+ render: (e) => /* @__PURE__ */ F("span", {
210
+ className: "tabular-nums text-text-secondary",
211
+ children: o(e.calories)
212
+ })
213
+ },
214
+ {
215
+ key: "proteinG",
216
+ header: C("mybodyshield.pages.insights.proteinColumn", "Protein"),
217
+ align: "right",
218
+ render: (e) => /* @__PURE__ */ F("span", {
219
+ className: "tabular-nums text-text-secondary",
220
+ children: a(e.proteinG)
221
+ })
222
+ },
223
+ {
224
+ key: "weight",
225
+ header: C("mybodyshield.pages.insights.weightColumn", "Weight"),
226
+ align: "right",
227
+ render: (e) => /* @__PURE__ */ F("span", {
228
+ className: "tabular-nums text-text-secondary",
229
+ children: e.weight == null ? "—" : l(e.weight)
230
+ })
231
+ }
232
+ ], ee = [
233
+ {
234
+ key: "title",
235
+ header: C("mybodyshield.pages.insights.goalColumn", "Goal"),
236
+ render: (e) => /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("span", {
237
+ className: "block text-sm text-text-primary",
238
+ children: e.title
239
+ }), /* @__PURE__ */ F("span", {
240
+ className: "text-xs text-text-tertiary",
241
+ children: i(e.type)
242
+ })] })
243
+ },
244
+ {
245
+ key: "status",
246
+ header: C("mybodyshield.pages.insights.statusColumn", "Status"),
247
+ render: (e) => /* @__PURE__ */ F("span", {
248
+ className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.status === "ACHIEVED" ? "bg-status-success-bg text-status-success-text" : "bg-status-warning-bg text-status-warning-text"}`,
249
+ children: i(e.status)
250
+ })
251
+ },
252
+ {
253
+ key: "progress",
254
+ header: C("mybodyshield.pages.insights.progressColumn", "Progress"),
255
+ align: "right",
256
+ render: (e) => /* @__PURE__ */ I("span", {
257
+ className: "tabular-nums text-text-secondary",
258
+ children: [
259
+ s(e.currentValue),
260
+ " / ",
261
+ s(e.targetValue),
262
+ " ",
263
+ e.unit
264
+ ]
265
+ })
266
+ }
267
+ ];
268
+ return /* @__PURE__ */ I(t, {
269
+ title: C("mybodyshield.pages.insights.title", "Insights"),
270
+ description: C("mybodyshield.pages.insights.description", "{{start}} – {{end}}", {
271
+ start: r(J.dateRangeStart),
272
+ end: r(J.dateRangeEnd)
273
+ }),
73
274
  children: [
74
- /* @__PURE__ */ P("div", {
275
+ /* @__PURE__ */ F("div", {
75
276
  className: "flex flex-wrap items-center gap-2",
76
- children: L.map((e) => /* @__PURE__ */ P("button", {
277
+ children: z.map((e) => /* @__PURE__ */ F("button", {
77
278
  type: "button",
78
- onClick: () => B(e.days),
79
- className: `rounded-lg px-3 py-1.5 text-sm font-medium transition-colors ${R === e.days ? "bg-accent text-white" : "bg-bg-sunken text-text-secondary hover:bg-bg-elevated"}`,
80
- children: e.label
279
+ onClick: () => H(e.days),
280
+ className: `rounded-lg px-3 py-1.5 text-sm font-medium transition-colors ${V === e.days ? "bg-accent text-white" : "bg-bg-sunken text-text-secondary hover:bg-bg-elevated"}`,
281
+ children: C(`mybodyshield.pages.insights.${e.labelKey}`, e.fallback)
81
282
  }, e.days))
82
283
  }),
83
- /* @__PURE__ */ P(f, {
84
- title: "Summary",
85
- children: /* @__PURE__ */ F("div", {
284
+ /* @__PURE__ */ F(h, {
285
+ title: C("mybodyshield.pages.insights.summary", "Summary"),
286
+ children: /* @__PURE__ */ I("div", {
86
287
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
87
288
  children: [
88
- /* @__PURE__ */ P(n, {
89
- icon: /* @__PURE__ */ P(D, { className: "h-5 w-5" }),
90
- value: W.consistencyStreakDays,
91
- label: "Consistency streak"
289
+ /* @__PURE__ */ F(n, {
290
+ icon: /* @__PURE__ */ F(O, { className: "h-5 w-5" }),
291
+ value: Y.consistencyStreakDays,
292
+ label: C("mybodyshield.pages.insights.consistencyStreak", "Consistency streak")
92
293
  }),
93
- /* @__PURE__ */ P(n, {
94
- icon: /* @__PURE__ */ P(E, { className: "h-5 w-5" }),
95
- value: W.totalSessions,
96
- label: "Total sessions"
294
+ /* @__PURE__ */ F(n, {
295
+ icon: /* @__PURE__ */ F(D, { className: "h-5 w-5" }),
296
+ value: Y.totalSessions,
297
+ label: C("mybodyshield.pages.insights.totalSessions", "Total sessions")
97
298
  }),
98
- /* @__PURE__ */ P(n, {
99
- icon: /* @__PURE__ */ P(M, { className: "h-5 w-5" }),
100
- value: l(W.totalVolumeKg),
101
- label: "Total volume"
299
+ /* @__PURE__ */ F(n, {
300
+ icon: /* @__PURE__ */ F(N, { className: "h-5 w-5" }),
301
+ value: l(Y.totalVolumeKg),
302
+ label: C("mybodyshield.pages.insights.totalVolume", "Total volume")
102
303
  }),
103
- /* @__PURE__ */ P(n, {
104
- icon: /* @__PURE__ */ P(O, { className: "h-5 w-5" }),
105
- value: s(W.averageReadiness),
106
- label: "Average readiness"
304
+ /* @__PURE__ */ F(n, {
305
+ icon: /* @__PURE__ */ F(k, { className: "h-5 w-5" }),
306
+ value: s(Y.averageReadiness),
307
+ label: C("mybodyshield.pages.insights.averageReadiness", "Average readiness")
107
308
  }),
108
- /* @__PURE__ */ P(n, {
109
- icon: /* @__PURE__ */ P(N, { className: "h-5 w-5" }),
110
- value: c(W.macroAdherencePercent),
111
- label: "Macro adherence"
309
+ /* @__PURE__ */ F(n, {
310
+ icon: /* @__PURE__ */ F(P, { className: "h-5 w-5" }),
311
+ value: c(Y.macroAdherencePercent),
312
+ label: C("mybodyshield.pages.insights.macroAdherence", "Macro adherence")
112
313
  }),
113
- /* @__PURE__ */ P(n, {
114
- icon: /* @__PURE__ */ P(T, { className: "h-5 w-5" }),
115
- value: G.length,
116
- label: "Days tracked"
314
+ /* @__PURE__ */ F(n, {
315
+ icon: /* @__PURE__ */ F(E, { className: "h-5 w-5" }),
316
+ value: Q,
317
+ label: C("mybodyshield.pages.insights.daysWithData", "Days with data"),
318
+ footer: /* @__PURE__ */ F("p", {
319
+ className: "text-xs text-text-tertiary",
320
+ children: C("mybodyshield.pages.insights.ofDaysInRange", "of {{count}} days in this range", { count: X.length })
321
+ })
117
322
  })
118
323
  ]
119
324
  })
120
325
  }),
121
- /* @__PURE__ */ P(f, {
122
- title: "Trends",
123
- description: "How training, recovery and nutrition move together.",
124
- children: /* @__PURE__ */ F("div", {
326
+ /* @__PURE__ */ F(W, {
327
+ daily: X,
328
+ summary: Y,
329
+ onOpen: B
330
+ }),
331
+ /* @__PURE__ */ F(h, {
332
+ title: C("mybodyshield.pages.insights.trends", "Trends"),
333
+ description: C("mybodyshield.pages.insights.trendsDescription", "How training, recovery and nutrition move together."),
334
+ children: /* @__PURE__ */ I("div", {
125
335
  className: "grid grid-cols-1 gap-6 xl:grid-cols-2",
126
336
  children: [
127
- /* @__PURE__ */ P(b, { daily: G }),
128
- /* @__PURE__ */ P(y, { daily: G }),
129
- /* @__PURE__ */ P(v, { daily: G }),
130
- /* @__PURE__ */ P(g, { daily: G })
337
+ /* @__PURE__ */ F(x, { daily: X }),
338
+ /* @__PURE__ */ F(b, { daily: X }),
339
+ /* @__PURE__ */ F(y, { daily: X }),
340
+ /* @__PURE__ */ F(_, { daily: X })
131
341
  ]
132
342
  })
133
343
  }),
134
- /* @__PURE__ */ P(_, { daily: G }),
135
- /* @__PURE__ */ P(f, {
136
- title: "Daily breakdown",
137
- description: "Per-day training, recovery and nutrition.",
138
- children: /* @__PURE__ */ P(I, {
344
+ /* @__PURE__ */ F(v, { daily: X }),
345
+ /* @__PURE__ */ F(h, {
346
+ title: C("mybodyshield.pages.insights.dailyBreakdown", "Daily breakdown"),
347
+ description: C("mybodyshield.pages.insights.dailyBreakdownDescription", "Per-day training, recovery and nutrition."),
348
+ children: /* @__PURE__ */ F(R, {
139
349
  treatment: "plain",
140
350
  className: "overflow-hidden p-0",
141
- children: /* @__PURE__ */ P(p, {
142
- columns: [
143
- {
144
- key: "date",
145
- header: "Date",
146
- render: (e) => /* @__PURE__ */ P("span", {
147
- className: "text-text-primary",
148
- children: r(e.date)
149
- })
150
- },
151
- {
152
- key: "sessions",
153
- header: "Sessions",
154
- align: "right",
155
- render: (e) => /* @__PURE__ */ P("span", {
156
- className: "tabular-nums text-text-secondary",
157
- children: e.sessions
158
- })
159
- },
160
- {
161
- key: "volumeKg",
162
- header: "Volume",
163
- align: "right",
164
- render: (e) => /* @__PURE__ */ P("span", {
165
- className: "tabular-nums text-text-secondary",
166
- children: l(e.volumeKg)
167
- })
168
- },
169
- {
170
- key: "readiness",
171
- header: "Readiness",
172
- align: "right",
173
- render: (e) => /* @__PURE__ */ P("span", {
174
- className: "tabular-nums text-text-secondary",
175
- children: e.readiness == null ? "—" : s(e.readiness)
176
- })
177
- },
178
- {
179
- key: "sleepHours",
180
- header: "Sleep",
181
- align: "right",
182
- render: (e) => /* @__PURE__ */ P("span", {
183
- className: "tabular-nums text-text-secondary",
184
- children: e.sleepHours == null ? "—" : `${s(e.sleepHours)} h`
185
- })
186
- },
187
- {
188
- key: "calories",
189
- header: "Calories",
190
- align: "right",
191
- render: (e) => /* @__PURE__ */ P("span", {
192
- className: "tabular-nums text-text-secondary",
193
- children: o(e.calories)
194
- })
195
- },
196
- {
197
- key: "proteinG",
198
- header: "Protein",
199
- align: "right",
200
- render: (e) => /* @__PURE__ */ P("span", {
201
- className: "tabular-nums text-text-secondary",
202
- children: a(e.proteinG)
203
- })
204
- },
205
- {
206
- key: "weight",
207
- header: "Weight",
208
- align: "right",
209
- render: (e) => /* @__PURE__ */ P("span", {
210
- className: "tabular-nums text-text-secondary",
211
- children: e.weight == null ? "—" : l(e.weight)
212
- })
213
- }
214
- ],
215
- rows: G,
351
+ children: /* @__PURE__ */ F(g, {
352
+ columns: $,
353
+ rows: X,
216
354
  rowKey: (e) => e.date,
217
355
  defaultSort: {
218
356
  key: "date",
@@ -221,64 +359,29 @@ function B() {
221
359
  })
222
360
  })
223
361
  }),
224
- /* @__PURE__ */ P(f, {
225
- title: "Active goals",
226
- description: "Goals open during this period.",
227
- children: K.length === 0 ? /* @__PURE__ */ F(I, {
362
+ /* @__PURE__ */ F(h, {
363
+ title: C("mybodyshield.pages.insights.activeGoals", "Active goals"),
364
+ description: C("mybodyshield.pages.insights.activeGoalsDescription", "Goals open during this period."),
365
+ children: Z.length === 0 ? /* @__PURE__ */ I(R, {
228
366
  treatment: "plain",
229
367
  className: "p-8 text-center",
230
368
  children: [
231
- /* @__PURE__ */ P(j, { className: "mx-auto h-8 w-8 text-text-tertiary" }),
232
- /* @__PURE__ */ P("p", {
369
+ /* @__PURE__ */ F(M, { className: "mx-auto h-8 w-8 text-text-tertiary" }),
370
+ /* @__PURE__ */ F("p", {
233
371
  className: "mt-3 text-sm font-medium text-text-primary",
234
- children: "No active goals"
372
+ children: C("mybodyshield.pages.insights.noActiveGoals", "No active goals")
235
373
  }),
236
- /* @__PURE__ */ P("p", {
374
+ /* @__PURE__ */ F("p", {
237
375
  className: "mt-1 text-xs text-text-tertiary",
238
- children: "Create a goal to see progress here."
376
+ children: C("mybodyshield.pages.insights.noActiveGoalsDescription", "Create a goal to see progress here.")
239
377
  })
240
378
  ]
241
- }) : /* @__PURE__ */ P(I, {
379
+ }) : /* @__PURE__ */ F(R, {
242
380
  treatment: "plain",
243
381
  className: "overflow-hidden p-0",
244
- children: /* @__PURE__ */ P(p, {
245
- columns: [
246
- {
247
- key: "title",
248
- header: "Goal",
249
- render: (e) => /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("span", {
250
- className: "block text-sm text-text-primary",
251
- children: e.title
252
- }), /* @__PURE__ */ P("span", {
253
- className: "text-xs text-text-tertiary",
254
- children: i(e.type)
255
- })] })
256
- },
257
- {
258
- key: "status",
259
- header: "Status",
260
- render: (e) => /* @__PURE__ */ P("span", {
261
- className: `inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${e.status === "ACHIEVED" ? "bg-status-success-bg text-status-success-text" : "bg-status-warning-bg text-status-warning-text"}`,
262
- children: i(e.status)
263
- })
264
- },
265
- {
266
- key: "progress",
267
- header: "Progress",
268
- align: "right",
269
- render: (e) => /* @__PURE__ */ F("span", {
270
- className: "tabular-nums text-text-secondary",
271
- children: [
272
- s(e.currentValue),
273
- " / ",
274
- s(e.targetValue),
275
- " ",
276
- e.unit
277
- ]
278
- })
279
- }
280
- ],
281
- rows: K,
382
+ children: /* @__PURE__ */ F(g, {
383
+ columns: ee,
384
+ rows: Z,
282
385
  rowKey: (e) => e.id,
283
386
  defaultSort: {
284
387
  key: "status",
@@ -287,31 +390,35 @@ function B() {
287
390
  })
288
391
  })
289
392
  }),
290
- /* @__PURE__ */ F("div", {
393
+ /* @__PURE__ */ I("div", {
291
394
  className: "flex flex-wrap gap-4 text-xs text-text-tertiary",
292
395
  children: [
293
- /* @__PURE__ */ F("span", {
396
+ /* @__PURE__ */ I("span", {
294
397
  className: "inline-flex items-center gap-1.5",
295
- children: [/* @__PURE__ */ P(E, { className: "h-3.5 w-3.5" }), "Training data from completed sessions."]
398
+ children: [/* @__PURE__ */ F(D, { className: "h-3.5 w-3.5" }), C("mybodyshield.pages.insights.legendTraining", "Training data from completed sessions.")]
296
399
  }),
297
- /* @__PURE__ */ F("span", {
400
+ /* @__PURE__ */ I("span", {
298
401
  className: "inline-flex items-center gap-1.5",
299
- children: [/* @__PURE__ */ P(k, { className: "h-3.5 w-3.5" }), "Recovery data from recovery logs."]
402
+ children: [/* @__PURE__ */ F(A, { className: "h-3.5 w-3.5" }), C("mybodyshield.pages.insights.legendRecovery", "Recovery data from recovery logs.")]
300
403
  }),
301
- /* @__PURE__ */ F("span", {
404
+ /* @__PURE__ */ I("span", {
302
405
  className: "inline-flex items-center gap-1.5",
303
- children: [/* @__PURE__ */ P(A, { className: "h-3.5 w-3.5" }), "Body metrics from progress logs."]
406
+ children: [/* @__PURE__ */ F(j, { className: "h-3.5 w-3.5" }), C("mybodyshield.pages.insights.legendBody", "Body metrics from progress logs.")]
304
407
  }),
305
- /* @__PURE__ */ F("span", {
408
+ /* @__PURE__ */ I("span", {
306
409
  className: "inline-flex items-center gap-1.5",
307
- children: [/* @__PURE__ */ P(w, { className: "h-3.5 w-3.5" }), "Nutrition data from logged meals."]
410
+ children: [/* @__PURE__ */ F(T, { className: "h-3.5 w-3.5" }), C("mybodyshield.pages.insights.legendNutrition", "Nutrition data from logged meals.")]
308
411
  })
309
412
  ]
413
+ }),
414
+ /* @__PURE__ */ F("p", {
415
+ className: "mt-4 border-t border-border-seam pt-4 text-xs leading-relaxed text-text-tertiary",
416
+ children: C("mybodyshield.pages.insights.medicalDisclaimer", "General fitness information, not medical advice. MyBodyShield is not a medical device and does not diagnose, treat, cure or prevent any condition — talk to a qualified healthcare professional before changing how you train or eat.")
310
417
  })
311
418
  ]
312
419
  });
313
420
  }
314
421
  //#endregion
315
- export { B as InsightsPage };
422
+ export { K as InsightsPage };
316
423
 
317
424
  //# sourceMappingURL=InsightsPage.js.map