@burdenoff/microfe-mybodyshield 2026.706.2 → 2026.713.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.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/mybodyshield/MyBodyShieldRoot.d.ts +5 -0
- package/dist/mybodyshield/MyBodyShieldRoot.d.ts.map +1 -0
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts +4 -0
- package/dist/mybodyshield/MyBodyShieldRoutes.d.ts.map +1 -0
- package/dist/mybodyshield/MyBodyShieldRoutes.js +77 -36
- package/dist/mybodyshield/MyBodyShieldRoutes.js.map +1 -1
- package/dist/mybodyshield/components/DataTable.d.ts +28 -0
- package/dist/mybodyshield/components/DataTable.d.ts.map +1 -0
- package/dist/mybodyshield/components/EmptyState.d.ts +18 -0
- package/dist/mybodyshield/components/EmptyState.d.ts.map +1 -0
- package/dist/mybodyshield/components/EvidenceUpload.d.ts +14 -0
- package/dist/mybodyshield/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/mybodyshield/components/FeatureFlagGuard.d.ts +11 -0
- package/dist/mybodyshield/components/FeatureFlagGuard.d.ts.map +1 -0
- package/dist/mybodyshield/components/FeatureFlagGuard.js +27 -0
- package/dist/mybodyshield/components/FeatureFlagGuard.js.map +1 -0
- package/dist/mybodyshield/components/FileLink.d.ts +15 -0
- package/dist/mybodyshield/components/FileLink.d.ts.map +1 -0
- package/dist/mybodyshield/components/FilterTabs.d.ts +18 -0
- package/dist/mybodyshield/components/FilterTabs.d.ts.map +1 -0
- package/dist/mybodyshield/components/MetricsCard.d.ts +23 -0
- package/dist/mybodyshield/components/MetricsCard.d.ts.map +1 -0
- package/dist/mybodyshield/components/MiniBar.d.ts +16 -0
- package/dist/mybodyshield/components/MiniBar.d.ts.map +1 -0
- package/dist/mybodyshield/components/MybDiscussion.d.ts +18 -0
- package/dist/mybodyshield/components/MybDiscussion.d.ts.map +1 -0
- package/dist/mybodyshield/components/MybDiscussion.js +5 -5
- package/dist/mybodyshield/components/MybTags.d.ts +17 -0
- package/dist/mybodyshield/components/MybTags.d.ts.map +1 -0
- package/dist/mybodyshield/components/PageDisabled.d.ts +9 -0
- package/dist/mybodyshield/components/PageDisabled.d.ts.map +1 -0
- package/dist/mybodyshield/components/PageDisabled.js +17 -0
- package/dist/mybodyshield/components/PageDisabled.js.map +1 -0
- package/dist/mybodyshield/components/PageLayout.d.ts +16 -0
- package/dist/mybodyshield/components/PageLayout.d.ts.map +1 -0
- package/dist/mybodyshield/components/Pagination.d.ts +22 -0
- package/dist/mybodyshield/components/Pagination.d.ts.map +1 -0
- package/dist/mybodyshield/components/StateViews.d.ts +25 -0
- package/dist/mybodyshield/components/StateViews.d.ts.map +1 -0
- package/dist/mybodyshield/components/StateViews.js +2 -1
- package/dist/mybodyshield/components/StateViews.js.map +1 -1
- package/dist/mybodyshield/components/StatusBadge.d.ts +9 -0
- package/dist/mybodyshield/components/StatusBadge.d.ts.map +1 -0
- package/dist/mybodyshield/components/Tabs.d.ts +17 -0
- package/dist/mybodyshield/components/Tabs.d.ts.map +1 -0
- package/dist/mybodyshield/components/UserSearchSelect.d.ts +28 -0
- package/dist/mybodyshield/components/UserSearchSelect.d.ts.map +1 -0
- package/dist/mybodyshield/components/index.d.ts +22 -0
- package/dist/mybodyshield/components/index.d.ts.map +1 -0
- package/dist/mybodyshield/components/index.js +4 -2
- package/dist/mybodyshield/context/MyBodyShieldContext.d.ts +16 -0
- package/dist/mybodyshield/context/MyBodyShieldContext.d.ts.map +1 -0
- package/dist/mybodyshield/context/index.d.ts +6 -0
- package/dist/mybodyshield/context/index.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/index.d.ts +12 -0
- package/dist/mybodyshield/hooks/index.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/index.js +1 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.d.ts +21 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.js +35 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldAnalytics.js.map +1 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts +83 -0
- package/dist/mybodyshield/hooks/useMyBodyShieldApi.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useMybComments.d.ts +36 -0
- package/dist/mybodyshield/hooks/useMybComments.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useMybFiles.d.ts +47 -0
- package/dist/mybodyshield/hooks/useMybFiles.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useMybTags.d.ts +44 -0
- package/dist/mybodyshield/hooks/useMybTags.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/useMybUsers.d.ts +27 -0
- package/dist/mybodyshield/hooks/useMybUsers.d.ts.map +1 -0
- package/dist/mybodyshield/hooks/usePager.d.ts +29 -0
- package/dist/mybodyshield/hooks/usePager.d.ts.map +1 -0
- package/dist/mybodyshield/index.d.ts +9 -0
- package/dist/mybodyshield/index.d.ts.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.d.ts +10 -0
- package/dist/mybodyshield/pages/DashboardPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/DashboardPage.js +91 -86
- package/dist/mybodyshield/pages/DashboardPage.js.map +1 -1
- package/dist/mybodyshield/pages/_shared/visuals.d.ts +77 -0
- package/dist/mybodyshield/pages/_shared/visuals.d.ts.map +1 -0
- package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts +11 -0
- package/dist/mybodyshield/pages/coaching/CoachingPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/coaching/CoachingPage.js +60 -60
- package/dist/mybodyshield/pages/goals/GoalsPage.d.ts +11 -0
- package/dist/mybodyshield/pages/goals/GoalsPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/goals/GoalsPage.js +125 -125
- package/dist/mybodyshield/pages/goals/GoalsPage.js.map +1 -1
- package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts +13 -0
- package/dist/mybodyshield/pages/nutrition/NutritionPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js +129 -129
- package/dist/mybodyshield/pages/nutrition/NutritionPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts +10 -0
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js +218 -191
- package/dist/mybodyshield/pages/programs/ProgramDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts +11 -0
- package/dist/mybodyshield/pages/programs/ProgramsPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/programs/ProgramsPage.js +197 -193
- package/dist/mybodyshield/pages/programs/ProgramsPage.js.map +1 -1
- package/dist/mybodyshield/pages/progress/ProgressPage.d.ts +13 -0
- package/dist/mybodyshield/pages/progress/ProgressPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/progress/ProgressPage.js +143 -143
- package/dist/mybodyshield/pages/progress/ProgressPage.js.map +1 -1
- package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts +11 -0
- package/dist/mybodyshield/pages/recovery/RecoveryPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js +60 -60
- package/dist/mybodyshield/pages/recovery/RecoveryPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts +11 -0
- package/dist/mybodyshield/pages/train/SessionDetailPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/train/SessionDetailPage.js +184 -181
- package/dist/mybodyshield/pages/train/SessionDetailPage.js.map +1 -1
- package/dist/mybodyshield/pages/train/SessionsPage.d.ts +11 -0
- package/dist/mybodyshield/pages/train/SessionsPage.d.ts.map +1 -0
- package/dist/mybodyshield/pages/train/SessionsPage.js +119 -115
- package/dist/mybodyshield/pages/train/SessionsPage.js.map +1 -1
- package/dist/mybodyshield/services/createSandboxAssistantTransport.d.ts +24 -0
- package/dist/mybodyshield/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/mybodyshield/services/createSandboxAssistantTransport.js +14 -0
- package/dist/mybodyshield/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/mybodyshield/types/assistant.d.ts +55 -0
- package/dist/mybodyshield/types/assistant.d.ts.map +1 -0
- package/dist/mybodyshield/types/index.d.ts +419 -0
- package/dist/mybodyshield/types/index.d.ts.map +1 -0
- package/dist/mybodyshield/utils/cn.d.ts +4 -0
- package/dist/mybodyshield/utils/cn.d.ts.map +1 -0
- package/dist/mybodyshield/utils/formatters.d.ts +32 -0
- package/dist/mybodyshield/utils/formatters.d.ts.map +1 -0
- package/dist/mybodyshield/utils/i18n.d.ts +6 -0
- package/dist/mybodyshield/utils/i18n.d.ts.map +1 -0
- package/dist/mybodyshield/utils/index.d.ts +9 -0
- package/dist/mybodyshield/utils/index.d.ts.map +1 -0
- package/dist/mybodyshield/utils/navigation.d.ts +14 -0
- package/dist/mybodyshield/utils/navigation.d.ts.map +1 -0
- package/dist/mybodyshield/utils/pageContext.d.ts +28 -0
- package/dist/mybodyshield/utils/pageContext.d.ts.map +1 -0
- package/dist/mybodyshield/utils/pageContext.js +62 -0
- package/dist/mybodyshield/utils/pageContext.js.map +1 -0
- package/package.json +8 -2
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { useMybBodyMetrics as
|
|
10
|
-
import { useOffsetPager as
|
|
1
|
+
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
|
+
import { MetricsCard as t } from "../../components/MetricsCard.js";
|
|
3
|
+
import { formatDate as ee, formatDateTime as te, formatEnumLabel as n, formatNumber as r, formatRelativeTime as ne } from "../../utils/formatters.js";
|
|
4
|
+
import { EmptyState as i } from "../../components/EmptyState.js";
|
|
5
|
+
import { ErrorView as a, LoadingView as re, Section as ie } from "../../components/StateViews.js";
|
|
6
|
+
import { DataTable as ae } from "../../components/DataTable.js";
|
|
7
|
+
import { FilterTabs as oe } from "../../components/FilterTabs.js";
|
|
8
|
+
import { Pagination as se } from "../../components/Pagination.js";
|
|
9
|
+
import { useMybBodyMetrics as o, useMybRecordBodyMetric as ce } from "../../hooks/useMyBodyShieldApi.js";
|
|
10
|
+
import { useOffsetPager as le } from "../../hooks/usePager.js";
|
|
11
11
|
import "../../hooks/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Pagination as ue } from "../../components/Pagination.js";
|
|
15
|
-
import { EvidenceUpload as de } from "../../components/EvidenceUpload.js";
|
|
16
|
-
import { FileLink as fe } from "../../components/FileLink.js";
|
|
12
|
+
import { EvidenceUpload as ue } from "../../components/EvidenceUpload.js";
|
|
13
|
+
import { FileLink as de } from "../../components/FileLink.js";
|
|
17
14
|
import "../../components/index.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
15
|
+
import { motion as s } from "../../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
16
|
+
import { useReducedMotion as fe } from "../../../node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.js";
|
|
17
|
+
import { IconChip as c, METRIC_META as l, TrendPill as pe } from "../_shared/visuals.js";
|
|
18
|
+
import { Tooltip as me } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
19
|
+
import { ResponsiveContainer as he } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
20
|
+
import { ReferenceDot as u } from "../../../node_modules/recharts/es6/cartesian/ReferenceDot.js";
|
|
21
|
+
import { CartesianGrid as ge } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
22
|
+
import { Area as _e } from "../../../node_modules/recharts/es6/cartesian/Area.js";
|
|
23
|
+
import { XAxis as ve } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
24
|
+
import { YAxis as ye } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
25
|
+
import { AreaChart as be } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
26
|
+
import { useEffect as xe, useMemo as d, useState as f } from "react";
|
|
27
|
+
import { Activity as Se, ArrowDownUp as Ce, Plus as p, Sigma as we } from "lucide-react";
|
|
28
|
+
import { Fragment as Te, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
29
|
+
import { Button as g, GlassCard as _, Input as v, Label as y, ResponsiveDialog as Ee, ResponsiveDialogContent as De, ResponsiveDialogDescription as Oe, ResponsiveDialogFooter as ke, ResponsiveDialogHeader as Ae, ResponsiveDialogTitle as je, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as Me, SelectValue as Ne, Textarea as Pe } from "@burdenoff/fe-libs/ui";
|
|
30
30
|
//#region src/mybodyshield/pages/progress/ProgressPage.tsx
|
|
31
31
|
var C = [
|
|
32
32
|
"WEIGHT",
|
|
@@ -58,20 +58,20 @@ var C = [
|
|
|
58
58
|
photo: null
|
|
59
59
|
});
|
|
60
60
|
function k() {
|
|
61
|
-
let [D, k] =
|
|
62
|
-
|
|
61
|
+
let [D, k] = f("WEIGHT"), [Ie, A] = f(!1), [j, M] = f(() => O("WEIGHT")), [N, P] = f(null), F = le(T), I = F.reset;
|
|
62
|
+
xe(() => {
|
|
63
63
|
I();
|
|
64
64
|
}, [D, I]);
|
|
65
|
-
let L =
|
|
65
|
+
let L = o({
|
|
66
66
|
type: D,
|
|
67
67
|
pagination: { limit: w }
|
|
68
|
-
}), R =
|
|
68
|
+
}), R = o({
|
|
69
69
|
type: D,
|
|
70
70
|
pagination: {
|
|
71
71
|
limit: T,
|
|
72
72
|
offset: F.offset
|
|
73
73
|
}
|
|
74
|
-
}), z =
|
|
74
|
+
}), z = ce(), B = fe(), V = (e, t = !0) => B ? { initial: !1 } : {
|
|
75
75
|
initial: {
|
|
76
76
|
opacity: 0,
|
|
77
77
|
y: 14
|
|
@@ -93,10 +93,10 @@ function k() {
|
|
|
93
93
|
damping: 22
|
|
94
94
|
}
|
|
95
95
|
} } : {}
|
|
96
|
-
}, H = l[D], U = H.icon, Le = Fe[D], W =
|
|
97
|
-
label:
|
|
96
|
+
}, H = l[D], U = H.icon, Le = Fe[D], W = d(() => L.data?.items ?? [], [L.data]), G = d(() => [...W].sort((e, t) => new Date(e.measuredAt).getTime() - new Date(t.measuredAt).getTime()), [W]), K = G[G.length - 1], q = G[G.length - 2], J = K && q ? K.value - q.value : void 0, Y = d(() => G.map((e) => ({
|
|
97
|
+
label: ee(e.measuredAt),
|
|
98
98
|
value: e.value
|
|
99
|
-
})), [G]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z =
|
|
99
|
+
})), [G]), X = Y.length > 0 ? Y[Y.length - 1] : void 0, Z = d(() => {
|
|
100
100
|
if (G.length === 0) return null;
|
|
101
101
|
let e = G.map((e) => e.value);
|
|
102
102
|
return {
|
|
@@ -107,7 +107,7 @@ function k() {
|
|
|
107
107
|
};
|
|
108
108
|
}, [G]), Re = C.map((e) => ({
|
|
109
109
|
value: e,
|
|
110
|
-
label:
|
|
110
|
+
label: n(e)
|
|
111
111
|
})), Q = () => {
|
|
112
112
|
M(O(D)), P(null), A(!0);
|
|
113
113
|
}, ze = async () => {
|
|
@@ -136,9 +136,9 @@ function k() {
|
|
|
136
136
|
header: "Value",
|
|
137
137
|
align: "right",
|
|
138
138
|
sortValue: (e) => e.value,
|
|
139
|
-
render: (e) => /* @__PURE__ */
|
|
139
|
+
render: (e) => /* @__PURE__ */ h("span", {
|
|
140
140
|
className: "font-medium tabular-nums text-text-primary",
|
|
141
|
-
children: [
|
|
141
|
+
children: [r(e.value), /* @__PURE__ */ m("span", {
|
|
142
142
|
className: "ml-1 text-xs font-normal text-text-tertiary",
|
|
143
143
|
children: e.unit
|
|
144
144
|
})]
|
|
@@ -148,19 +148,19 @@ function k() {
|
|
|
148
148
|
key: "measuredAt",
|
|
149
149
|
header: "Measured",
|
|
150
150
|
sortValue: (e) => new Date(e.measuredAt).getTime(),
|
|
151
|
-
render: (e) => /* @__PURE__ */
|
|
151
|
+
render: (e) => /* @__PURE__ */ m("span", {
|
|
152
152
|
className: "whitespace-nowrap text-text-secondary",
|
|
153
|
-
children:
|
|
153
|
+
children: te(e.measuredAt)
|
|
154
154
|
})
|
|
155
155
|
},
|
|
156
156
|
{
|
|
157
157
|
key: "notes",
|
|
158
158
|
header: "Notes",
|
|
159
159
|
hideOnMobile: !0,
|
|
160
|
-
render: (e) => e.notes ? /* @__PURE__ */
|
|
160
|
+
render: (e) => e.notes ? /* @__PURE__ */ m("span", {
|
|
161
161
|
className: "text-text-secondary",
|
|
162
162
|
children: e.notes
|
|
163
|
-
}) : /* @__PURE__ */
|
|
163
|
+
}) : /* @__PURE__ */ m("span", {
|
|
164
164
|
className: "text-text-tertiary",
|
|
165
165
|
children: "—"
|
|
166
166
|
})
|
|
@@ -168,75 +168,75 @@ function k() {
|
|
|
168
168
|
{
|
|
169
169
|
key: "photo",
|
|
170
170
|
header: "Photo",
|
|
171
|
-
render: (e) => e.photo?.id ? /* @__PURE__ */
|
|
171
|
+
render: (e) => e.photo?.id ? /* @__PURE__ */ m(de, { fileId: e.photo.id }) : /* @__PURE__ */ m("span", {
|
|
172
172
|
className: "text-text-tertiary",
|
|
173
173
|
children: "—"
|
|
174
174
|
})
|
|
175
175
|
}
|
|
176
176
|
];
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ h(e, {
|
|
178
178
|
title: "Progress",
|
|
179
179
|
description: "Body metrics over time — weight, composition & measurements.",
|
|
180
|
-
actions: /* @__PURE__ */ g
|
|
180
|
+
actions: /* @__PURE__ */ h(g, {
|
|
181
181
|
onClick: Q,
|
|
182
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record measurement"]
|
|
183
183
|
}),
|
|
184
184
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ m("div", {
|
|
186
186
|
className: "mb-6 overflow-x-auto",
|
|
187
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ m(oe, {
|
|
188
188
|
options: Re,
|
|
189
189
|
value: D,
|
|
190
190
|
onChange: k
|
|
191
191
|
})
|
|
192
192
|
}),
|
|
193
|
-
L.isLoading && W.length === 0 ? /* @__PURE__ */
|
|
193
|
+
L.isLoading && W.length === 0 ? /* @__PURE__ */ m(re, { label: `Loading ${n(D).toLowerCase()} history…` }) : L.isError ? /* @__PURE__ */ m(a, {
|
|
194
194
|
message: "We couldn't load your body-metric history.",
|
|
195
195
|
onRetry: () => L.refetch()
|
|
196
|
-
}) : W.length === 0 ? /* @__PURE__ */
|
|
196
|
+
}) : W.length === 0 ? /* @__PURE__ */ m(i, {
|
|
197
197
|
illustration: "empty-data",
|
|
198
|
-
icon: /* @__PURE__ */
|
|
199
|
-
title: `No ${
|
|
198
|
+
icon: /* @__PURE__ */ m(U, { className: "h-10 w-10" }),
|
|
199
|
+
title: `No ${n(D).toLowerCase()} readings yet`,
|
|
200
200
|
description: "Record a measurement to start tracking this metric over time.",
|
|
201
|
-
action: /* @__PURE__ */ g
|
|
201
|
+
action: /* @__PURE__ */ h(g, {
|
|
202
202
|
onClick: Q,
|
|
203
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record measurement"]
|
|
204
204
|
})
|
|
205
|
-
}) : /* @__PURE__ */
|
|
205
|
+
}) : /* @__PURE__ */ h("div", {
|
|
206
206
|
className: "space-y-6",
|
|
207
207
|
children: [
|
|
208
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ m(s.div, {
|
|
209
209
|
...V(0),
|
|
210
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ h(_, {
|
|
211
211
|
treatment: "glass",
|
|
212
212
|
className: "rounded-2xl p-6 transition-shadow duration-300 hover:shadow-2xl",
|
|
213
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ h("div", {
|
|
214
214
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ h("div", {
|
|
216
216
|
className: "flex items-center gap-3",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
-
icon: /* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ m(c, {
|
|
218
|
+
icon: /* @__PURE__ */ m(U, { className: "h-5 w-5" }),
|
|
219
219
|
tint: H.tint
|
|
220
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h2", {
|
|
221
221
|
className: "text-base font-semibold text-text-primary",
|
|
222
|
-
children:
|
|
223
|
-
}), /* @__PURE__ */
|
|
222
|
+
children: n(D)
|
|
223
|
+
}), /* @__PURE__ */ m("p", {
|
|
224
224
|
className: "text-sm text-text-secondary",
|
|
225
225
|
children: K ? `Last measured ${ne(K.measuredAt)}` : "No measurements yet"
|
|
226
226
|
})] })]
|
|
227
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ h("div", {
|
|
228
228
|
className: "text-right",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ h("p", {
|
|
230
230
|
className: "text-3xl font-bold leading-none tracking-tight tabular-nums text-text-primary sm:text-4xl",
|
|
231
|
-
children: [K ?
|
|
231
|
+
children: [K ? r(K.value) : "—", K && /* @__PURE__ */ m("span", {
|
|
232
232
|
className: "ml-1 text-base font-medium text-text-tertiary",
|
|
233
233
|
children: H.unit
|
|
234
234
|
})]
|
|
235
|
-
}), J != null && /* @__PURE__ */
|
|
235
|
+
}), J != null && /* @__PURE__ */ m("div", {
|
|
236
236
|
className: "mt-2 flex justify-end",
|
|
237
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ m("span", {
|
|
238
238
|
className: "inline-flex items-center rounded-full bg-bg-sunken px-2.5 py-1 ring-1 ring-border-seam",
|
|
239
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ m(pe, {
|
|
240
240
|
delta: J,
|
|
241
241
|
unit: ` ${H.unit}`,
|
|
242
242
|
goodDirection: Le
|
|
@@ -244,12 +244,12 @@ function k() {
|
|
|
244
244
|
})
|
|
245
245
|
})]
|
|
246
246
|
})]
|
|
247
|
-
}), /* @__PURE__ */
|
|
247
|
+
}), /* @__PURE__ */ m("div", {
|
|
248
248
|
className: "mt-6 h-64 w-full",
|
|
249
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ m(he, {
|
|
250
250
|
width: "100%",
|
|
251
251
|
height: "100%",
|
|
252
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ h(be, {
|
|
253
253
|
data: Y,
|
|
254
254
|
margin: {
|
|
255
255
|
top: 8,
|
|
@@ -258,36 +258,36 @@ function k() {
|
|
|
258
258
|
left: -8
|
|
259
259
|
},
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ m("defs", { children: /* @__PURE__ */ h("linearGradient", {
|
|
262
262
|
id: "myb-progress-fill",
|
|
263
263
|
x1: "0",
|
|
264
264
|
y1: "0",
|
|
265
265
|
x2: "0",
|
|
266
266
|
y2: "1",
|
|
267
267
|
children: [
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ m("stop", {
|
|
269
269
|
offset: "0%",
|
|
270
270
|
stopColor: E,
|
|
271
271
|
stopOpacity: .38
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ m("stop", {
|
|
274
274
|
offset: "55%",
|
|
275
275
|
stopColor: E,
|
|
276
276
|
stopOpacity: .12
|
|
277
277
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ m("stop", {
|
|
279
279
|
offset: "100%",
|
|
280
280
|
stopColor: E,
|
|
281
281
|
stopOpacity: 0
|
|
282
282
|
})
|
|
283
283
|
]
|
|
284
284
|
}) }),
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ m(ge, {
|
|
286
286
|
stroke: "var(--color-border-seam)",
|
|
287
287
|
strokeDasharray: "4 4",
|
|
288
288
|
vertical: !1
|
|
289
289
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ m(ve, {
|
|
291
291
|
dataKey: "label",
|
|
292
292
|
stroke: "var(--color-border-seam)",
|
|
293
293
|
tickLine: !1,
|
|
@@ -299,7 +299,7 @@ function k() {
|
|
|
299
299
|
tickMargin: 8,
|
|
300
300
|
minTickGap: 24
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ m(ye, {
|
|
303
303
|
stroke: "var(--color-border-seam)",
|
|
304
304
|
tickLine: !1,
|
|
305
305
|
axisLine: !1,
|
|
@@ -310,7 +310,7 @@ function k() {
|
|
|
310
310
|
width: 44,
|
|
311
311
|
domain: ["auto", "auto"]
|
|
312
312
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ m(me, {
|
|
314
314
|
cursor: {
|
|
315
315
|
stroke: "var(--color-border-seam)",
|
|
316
316
|
strokeDasharray: "4 4"
|
|
@@ -323,12 +323,12 @@ function k() {
|
|
|
323
323
|
},
|
|
324
324
|
labelStyle: { color: "var(--color-text-tertiary)" },
|
|
325
325
|
itemStyle: { color: "var(--color-text-primary)" },
|
|
326
|
-
formatter: (e) => [`${
|
|
326
|
+
formatter: (e) => [`${r(Number(e))} ${H.unit}`, n(D)]
|
|
327
327
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ m(_e, {
|
|
329
329
|
type: "monotone",
|
|
330
330
|
dataKey: "value",
|
|
331
|
-
name:
|
|
331
|
+
name: n(D),
|
|
332
332
|
stroke: E,
|
|
333
333
|
strokeWidth: 2.5,
|
|
334
334
|
fill: "url(#myb-progress-fill)",
|
|
@@ -343,7 +343,7 @@ function k() {
|
|
|
343
343
|
isAnimationActive: !B,
|
|
344
344
|
animationDuration: 900
|
|
345
345
|
}),
|
|
346
|
-
X && /* @__PURE__ */
|
|
346
|
+
X && /* @__PURE__ */ m(u, {
|
|
347
347
|
x: X.label,
|
|
348
348
|
y: X.value,
|
|
349
349
|
r: 12,
|
|
@@ -353,7 +353,7 @@ function k() {
|
|
|
353
353
|
fillOpacity: .16,
|
|
354
354
|
stroke: "none"
|
|
355
355
|
}),
|
|
356
|
-
X && /* @__PURE__ */
|
|
356
|
+
X && /* @__PURE__ */ m(u, {
|
|
357
357
|
x: X.label,
|
|
358
358
|
y: X.value,
|
|
359
359
|
r: 5,
|
|
@@ -369,77 +369,77 @@ function k() {
|
|
|
369
369
|
})]
|
|
370
370
|
})
|
|
371
371
|
}),
|
|
372
|
-
Z && /* @__PURE__ */
|
|
372
|
+
Z && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
|
|
373
373
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
374
374
|
children: [
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ m(s.div, {
|
|
376
376
|
...V(.08),
|
|
377
|
-
children: /* @__PURE__ */
|
|
377
|
+
children: /* @__PURE__ */ m(t, {
|
|
378
378
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
379
|
-
icon: /* @__PURE__ */
|
|
380
|
-
icon: /* @__PURE__ */
|
|
379
|
+
icon: /* @__PURE__ */ m(c, {
|
|
380
|
+
icon: /* @__PURE__ */ m(Se, { className: "h-5 w-5" }),
|
|
381
381
|
tint: E
|
|
382
382
|
}),
|
|
383
|
-
value:
|
|
383
|
+
value: r(Z.count),
|
|
384
384
|
label: "Recent readings"
|
|
385
385
|
})
|
|
386
386
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ m(s.div, {
|
|
388
388
|
...V(.14),
|
|
389
|
-
children: /* @__PURE__ */
|
|
389
|
+
children: /* @__PURE__ */ m(t, {
|
|
390
390
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
391
|
-
icon: /* @__PURE__ */
|
|
392
|
-
icon: /* @__PURE__ */
|
|
391
|
+
icon: /* @__PURE__ */ m(c, {
|
|
392
|
+
icon: /* @__PURE__ */ m(we, { className: "h-5 w-5" }),
|
|
393
393
|
tint: E
|
|
394
394
|
}),
|
|
395
|
-
value: `${
|
|
396
|
-
label: `Window average ${
|
|
395
|
+
value: `${r(Z.avg, { maximumFractionDigits: 1 })} ${H.unit}`,
|
|
396
|
+
label: `Window average ${n(D).toLowerCase()}`
|
|
397
397
|
})
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ m(s.div, {
|
|
400
400
|
...V(.2),
|
|
401
|
-
children: /* @__PURE__ */
|
|
401
|
+
children: /* @__PURE__ */ m(t, {
|
|
402
402
|
className: "h-full rounded-2xl transition-shadow duration-300 hover:shadow-xl",
|
|
403
|
-
icon: /* @__PURE__ */
|
|
404
|
-
icon: /* @__PURE__ */
|
|
403
|
+
icon: /* @__PURE__ */ m(c, {
|
|
404
|
+
icon: /* @__PURE__ */ m(Ce, { className: "h-5 w-5" }),
|
|
405
405
|
tint: E
|
|
406
406
|
}),
|
|
407
|
-
value: `${
|
|
407
|
+
value: `${r(Z.min)}–${r(Z.max)}`,
|
|
408
408
|
label: `Window range (${H.unit})`
|
|
409
409
|
})
|
|
410
410
|
})
|
|
411
411
|
]
|
|
412
|
-
}), /* @__PURE__ */
|
|
412
|
+
}), /* @__PURE__ */ h("p", {
|
|
413
413
|
className: "mt-2 text-xs text-text-tertiary",
|
|
414
414
|
children: [
|
|
415
415
|
"Based on your most recent ",
|
|
416
|
-
|
|
416
|
+
r(Z.count),
|
|
417
417
|
" ",
|
|
418
|
-
|
|
418
|
+
n(D).toLowerCase(),
|
|
419
419
|
" reading",
|
|
420
420
|
Z.count === 1 ? "" : "s",
|
|
421
421
|
" (up to ",
|
|
422
|
-
|
|
422
|
+
r(w),
|
|
423
423
|
") — not a full-history total."
|
|
424
424
|
]
|
|
425
425
|
})] }),
|
|
426
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ m(s.div, {
|
|
427
427
|
...V(.26, !1),
|
|
428
|
-
children: /* @__PURE__ */
|
|
428
|
+
children: /* @__PURE__ */ m(ie, {
|
|
429
429
|
title: "Measurement log",
|
|
430
430
|
description: "Every recorded reading for this metric.",
|
|
431
|
-
children: R.isError ? /* @__PURE__ */
|
|
431
|
+
children: R.isError ? /* @__PURE__ */ m(a, {
|
|
432
432
|
message: "We couldn't load this page of measurements.",
|
|
433
433
|
onRetry: () => R.refetch()
|
|
434
|
-
}) : R.isLoading && $.length === 0 ? /* @__PURE__ */
|
|
434
|
+
}) : R.isLoading && $.length === 0 ? /* @__PURE__ */ m("div", {
|
|
435
435
|
className: "py-8 text-center text-sm text-text-secondary",
|
|
436
436
|
children: "Loading measurements…"
|
|
437
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
437
|
+
}) : $.length === 0 ? /* @__PURE__ */ m(i, {
|
|
438
438
|
illustration: "empty-data",
|
|
439
|
-
icon: /* @__PURE__ */
|
|
439
|
+
icon: /* @__PURE__ */ m(U, { className: "h-10 w-10" }),
|
|
440
440
|
title: "No measurements on this page",
|
|
441
441
|
description: "Go back a page or record a new measurement."
|
|
442
|
-
}) : /* @__PURE__ */
|
|
442
|
+
}) : /* @__PURE__ */ h(Te, { children: [/* @__PURE__ */ m(ae, {
|
|
443
443
|
columns: Be,
|
|
444
444
|
rows: $,
|
|
445
445
|
rowKey: (e) => e.id,
|
|
@@ -447,7 +447,7 @@ function k() {
|
|
|
447
447
|
key: "measuredAt",
|
|
448
448
|
dir: "desc"
|
|
449
449
|
}
|
|
450
|
-
}), /* @__PURE__ */
|
|
450
|
+
}), /* @__PURE__ */ m(se, {
|
|
451
451
|
page: F.page,
|
|
452
452
|
pageSize: T,
|
|
453
453
|
itemCount: $.length,
|
|
@@ -458,20 +458,20 @@ function k() {
|
|
|
458
458
|
})
|
|
459
459
|
]
|
|
460
460
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ m(Ee, {
|
|
462
462
|
open: Ie,
|
|
463
463
|
onOpenChange: A,
|
|
464
|
-
children: /* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
464
|
+
children: /* @__PURE__ */ h(De, { children: [
|
|
465
|
+
/* @__PURE__ */ h(Ae, { children: [/* @__PURE__ */ m(je, { children: "Record measurement" }), /* @__PURE__ */ m(Oe, { children: "Log a new body-metric reading to track your progress over time." })] }),
|
|
466
|
+
/* @__PURE__ */ h("div", {
|
|
467
467
|
className: "space-y-4 py-2",
|
|
468
468
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ h("div", {
|
|
470
470
|
className: "space-y-1.5",
|
|
471
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ m(y, {
|
|
472
472
|
htmlFor: "myb-metric-type",
|
|
473
473
|
children: "Metric"
|
|
474
|
-
}), /* @__PURE__ */
|
|
474
|
+
}), /* @__PURE__ */ h(b, {
|
|
475
475
|
value: j.type,
|
|
476
476
|
onValueChange: (e) => {
|
|
477
477
|
let t = e;
|
|
@@ -481,23 +481,23 @@ function k() {
|
|
|
481
481
|
unit: l[t].unit
|
|
482
482
|
}));
|
|
483
483
|
},
|
|
484
|
-
children: [/* @__PURE__ */
|
|
484
|
+
children: [/* @__PURE__ */ m(Me, {
|
|
485
485
|
id: "myb-metric-type",
|
|
486
|
-
children: /* @__PURE__ */
|
|
487
|
-
}), /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ m(Ne, { placeholder: "Select a metric" })
|
|
487
|
+
}), /* @__PURE__ */ m(x, { children: C.map((e) => /* @__PURE__ */ m(S, {
|
|
488
488
|
value: e,
|
|
489
|
-
children:
|
|
489
|
+
children: n(e)
|
|
490
490
|
}, e)) })]
|
|
491
491
|
})]
|
|
492
492
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ h("div", {
|
|
494
494
|
className: "grid grid-cols-2 gap-3",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ h("div", {
|
|
496
496
|
className: "space-y-1.5",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ m(y, {
|
|
498
498
|
htmlFor: "myb-metric-value",
|
|
499
499
|
children: "Value"
|
|
500
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ m(v, {
|
|
501
501
|
id: "myb-metric-value",
|
|
502
502
|
type: "number",
|
|
503
503
|
inputMode: "decimal",
|
|
@@ -509,12 +509,12 @@ function k() {
|
|
|
509
509
|
})),
|
|
510
510
|
placeholder: "0"
|
|
511
511
|
})]
|
|
512
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ h("div", {
|
|
513
513
|
className: "space-y-1.5",
|
|
514
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ m(y, {
|
|
515
515
|
htmlFor: "myb-metric-unit",
|
|
516
516
|
children: "Unit"
|
|
517
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ m(v, {
|
|
518
518
|
id: "myb-metric-unit",
|
|
519
519
|
value: j.unit,
|
|
520
520
|
onChange: (e) => M((t) => ({
|
|
@@ -525,12 +525,12 @@ function k() {
|
|
|
525
525
|
})]
|
|
526
526
|
})]
|
|
527
527
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ h("div", {
|
|
529
529
|
className: "space-y-1.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: [/* @__PURE__ */ m(y, {
|
|
531
531
|
htmlFor: "myb-metric-measured",
|
|
532
532
|
children: "Measured at"
|
|
533
|
-
}), /* @__PURE__ */
|
|
533
|
+
}), /* @__PURE__ */ m(v, {
|
|
534
534
|
id: "myb-metric-measured",
|
|
535
535
|
type: "datetime-local",
|
|
536
536
|
value: j.measuredAt,
|
|
@@ -540,12 +540,12 @@ function k() {
|
|
|
540
540
|
}))
|
|
541
541
|
})]
|
|
542
542
|
}),
|
|
543
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ h("div", {
|
|
544
544
|
className: "space-y-1.5",
|
|
545
|
-
children: [/* @__PURE__ */
|
|
545
|
+
children: [/* @__PURE__ */ m(y, {
|
|
546
546
|
htmlFor: "myb-metric-notes",
|
|
547
547
|
children: "Notes"
|
|
548
|
-
}), /* @__PURE__ */
|
|
548
|
+
}), /* @__PURE__ */ m(Pe, {
|
|
549
549
|
id: "myb-metric-notes",
|
|
550
550
|
value: j.notes,
|
|
551
551
|
onChange: (e) => M((t) => ({
|
|
@@ -556,7 +556,7 @@ function k() {
|
|
|
556
556
|
rows: 3
|
|
557
557
|
})]
|
|
558
558
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ m(ue, {
|
|
560
560
|
id: "myb-metric-photo",
|
|
561
561
|
label: "Progress photo (optional)",
|
|
562
562
|
value: j.photo,
|
|
@@ -568,18 +568,18 @@ function k() {
|
|
|
568
568
|
disabled: z.isPending,
|
|
569
569
|
hint: "Attach a progress photo for this reading."
|
|
570
570
|
}),
|
|
571
|
-
N && /* @__PURE__ */
|
|
571
|
+
N && /* @__PURE__ */ m("p", {
|
|
572
572
|
className: "text-sm text-status-error-text",
|
|
573
573
|
children: N
|
|
574
574
|
})
|
|
575
575
|
]
|
|
576
576
|
}),
|
|
577
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ h(ke, { children: [/* @__PURE__ */ m(g, {
|
|
578
578
|
variant: "outline",
|
|
579
579
|
onClick: () => A(!1),
|
|
580
580
|
disabled: z.isPending,
|
|
581
581
|
children: "Cancel"
|
|
582
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ m(g, {
|
|
583
583
|
onClick: ze,
|
|
584
584
|
disabled: z.isPending,
|
|
585
585
|
children: z.isPending ? "Recording…" : "Record"
|