@burdenoff/microfe-timecampus 2026.1031.11 → 2026.1031.12

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 (41) hide show
  1. package/dist/timecampus/TimeCampusRoot.d.ts.map +1 -1
  2. package/dist/timecampus/TimeCampusRoot.js +121 -80
  3. package/dist/timecampus/TimeCampusRoot.js.map +1 -1
  4. package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
  5. package/dist/timecampus/TimeCampusRoutes.js +24 -5
  6. package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
  7. package/dist/timecampus/pages/lifetime/LifeBalancePage.d.ts.map +1 -1
  8. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +34 -31
  9. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  10. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts +8 -0
  11. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts.map +1 -0
  12. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +224 -0
  13. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -0
  14. package/dist/timecampus/pages/mobile/MobileScreen.d.ts +32 -0
  15. package/dist/timecampus/pages/mobile/MobileScreen.d.ts.map +1 -0
  16. package/dist/timecampus/pages/mobile/MobileScreen.js +89 -0
  17. package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -0
  18. package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts +8 -0
  19. package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts.map +1 -0
  20. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +341 -0
  21. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -0
  22. package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts +8 -0
  23. package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts.map +1 -0
  24. package/dist/timecampus/pages/mobile/MobileTimerPage.js +226 -0
  25. package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -0
  26. package/dist/timecampus/pages/mobile/mobileModel.d.ts +121 -0
  27. package/dist/timecampus/pages/mobile/mobileModel.d.ts.map +1 -0
  28. package/dist/timecampus/pages/mobile/mobileModel.js +127 -0
  29. package/dist/timecampus/pages/mobile/mobileModel.js.map +1 -0
  30. package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
  31. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +46 -44
  32. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  33. package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
  34. package/dist/timecampus/pages/time/TimerPage.js +34 -32
  35. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  36. package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
  37. package/dist/timecampus/pages/timeline/TimelinePage.js +324 -319
  38. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  39. package/dist/timecampus/types/index.d.ts +5 -0
  40. package/dist/timecampus/types/index.d.ts.map +1 -1
  41. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ import { useTimeCampus as e, useTimeCampusNavigate as t } from "../../providers/TimeCampusProvider.js";
2
+ import { cn as n } from "../../utils/helpers.js";
3
+ import { LoadingSkeleton as r } from "../../components/LoadingSkeleton.js";
4
+ import { EmptyState as i } from "../../components/EmptyState.js";
5
+ import { useMyBalanceTargetsQuery as a, useMyLifeBalanceQuery as o } from "../../../generated/wspace-operations.js";
6
+ import { useTr as s } from "../../shared/hooks/useTr.js";
7
+ import "../../hooks/index.js";
8
+ import { seriesColor as c } from "../../components/charts/chartTheme.js";
9
+ import { DonutChart as l } from "../../components/charts/DonutChart.js";
10
+ import { ProgressMeter as u } from "../../components/charts/ProgressMeter.js";
11
+ import "../../components/index.js";
12
+ import { ALL_LIFE_DOMAINS as d, lifeDomainLabel as f } from "../lifetime/domains.js";
13
+ import { MobileScreen as p } from "./MobileScreen.js";
14
+ import { balanceScore as m, balanceStatus as h, biggestShortfall as g, compactDuration as _, domainRows as v, longDayLabel as y, toLocalDateKey as b } from "./mobileModel.js";
15
+ import { useMemo as x, useState as S } from "react";
16
+ import { BookOpen as C, Briefcase as w, Bus as T, Circle as E, Heart as D, Hourglass as O, Lightbulb as k, Moon as A, Smile as j, Sparkles as M, Star as N, Users as P, Wallet as F, Wrench as I } from "lucide-react";
17
+ import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
18
+ import { GlassCard as B } from "@burdenoff/fe-libs/ui";
19
+ //#region src/timecampus/pages/mobile/MobileLifeBalancePage.tsx
20
+ var V = {
21
+ WORK: w,
22
+ SLEEP: A,
23
+ HEALTH: D,
24
+ FAMILY: P,
25
+ LEARNING: C,
26
+ LEISURE: N,
27
+ COMMUTE: T,
28
+ WAITING: O,
29
+ CHORES: I,
30
+ SELF_CARE: j,
31
+ SOCIAL: P,
32
+ FINANCE_ADMIN: F,
33
+ REFLECTION: M
34
+ }, H = [{
35
+ days: 1,
36
+ key: "timecampus.mobile.balance.today",
37
+ label: "Today"
38
+ }, {
39
+ days: 7,
40
+ key: "timecampus.mobile.balance.week",
41
+ label: "7 days"
42
+ }], U = {
43
+ "on-track": {
44
+ key: "timecampus.mobile.balance.onTrack",
45
+ label: "On track",
46
+ tone: "text-status-success-text"
47
+ },
48
+ drifting: {
49
+ key: "timecampus.mobile.balance.drifting",
50
+ label: "Drifting",
51
+ tone: "text-status-warning-text"
52
+ },
53
+ "off-balance": {
54
+ key: "timecampus.mobile.balance.offBalance",
55
+ label: "Off balance",
56
+ tone: "text-status-error-text"
57
+ }
58
+ };
59
+ function W(e) {
60
+ let t = /* @__PURE__ */ new Date();
61
+ return new Date(t.getFullYear(), t.getMonth(), t.getDate() - (e - 1)).toISOString();
62
+ }
63
+ function G() {
64
+ let { workspaceId: C = "" } = e(), w = t(), T = s(), [D, O] = S(1), A = x(() => ({
65
+ from: W(D),
66
+ to: (/* @__PURE__ */ new Date()).toISOString()
67
+ }), [D]), { data: j, loading: M, error: N } = o({
68
+ variables: A,
69
+ skip: !C,
70
+ fetchPolicy: "cache-and-network"
71
+ }), { data: P } = a({ skip: !C }), F = j?.myLifeBalance, I = x(() => F?.byDomain ?? [], [F]), G = F?.hasTargets ?? !1, K = x(() => {
72
+ let e = {};
73
+ for (let t of P?.myBalanceTargets ?? []) e[t.domain] = t.desiredHoursPerWeek;
74
+ return e;
75
+ }, [P]), q = x(() => v(I, K, D), [
76
+ I,
77
+ K,
78
+ D
79
+ ]), J = m(I, G), Y = g(q), X = F?.coveredSeconds ?? 0, Z = x(() => I.filter((e) => e.actualSeconds > 0).map((e) => ({
80
+ name: f(e.domain),
81
+ value: e.actualSeconds,
82
+ color: c(Math.max(0, d.indexOf(e.domain)))
83
+ })), [I]), Q = J === null ? null : U[h(J)];
84
+ return /* @__PURE__ */ z(p, {
85
+ active: "life-balance",
86
+ title: T("timecampus.mobile.balance.title", "Life balance"),
87
+ fullViewPath: "/life-balance",
88
+ trailing: /* @__PURE__ */ R("button", {
89
+ type: "button",
90
+ onClick: () => w("/life-balance"),
91
+ className: "min-h-11 rounded-lg px-2 text-sm font-medium text-primary",
92
+ children: T("timecampus.mobile.balance.targets", "Targets")
93
+ }),
94
+ children: [/* @__PURE__ */ z("div", {
95
+ className: "flex items-end justify-between gap-3",
96
+ children: [/* @__PURE__ */ z("div", {
97
+ className: "min-w-0",
98
+ children: [/* @__PURE__ */ R("h2", {
99
+ className: "text-xl font-bold uppercase tracking-tight text-text-primary",
100
+ children: D === 1 ? T("timecampus.mobile.balance.todayHeading", "Today") : T("timecampus.mobile.balance.weekHeading", "This week")
101
+ }), /* @__PURE__ */ R("p", {
102
+ className: "truncate text-sm text-text-secondary",
103
+ children: y(b(/* @__PURE__ */ new Date()))
104
+ })]
105
+ }), /* @__PURE__ */ R("div", {
106
+ role: "radiogroup",
107
+ "aria-label": T("timecampus.mobile.balance.range", "Range"),
108
+ className: "flex rounded-full border border-border-subtle bg-bg-sunken/50 p-1",
109
+ children: H.map((e) => /* @__PURE__ */ R("button", {
110
+ type: "button",
111
+ role: "radio",
112
+ "aria-checked": D === e.days,
113
+ onClick: () => O(e.days),
114
+ className: n("min-h-10 rounded-full px-3 text-sm font-medium", D === e.days ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary"),
115
+ children: T(e.key, e.label)
116
+ }, e.days))
117
+ })]
118
+ }), N ? /* @__PURE__ */ R("p", {
119
+ className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text",
120
+ children: T("timecampus.mobile.balance.error", "Couldn't load your balance right now. Please try again in a moment.")
121
+ }) : M && !F ? /* @__PURE__ */ R(r, {
122
+ variant: "card",
123
+ count: 3
124
+ }) : X <= 0 ? /* @__PURE__ */ R(i, {
125
+ title: T("timecampus.mobile.balance.emptyTitle", "Nothing tracked yet"),
126
+ description: T("timecampus.mobile.balance.emptyHint", "Log sleep, workouts or family time, or start the timer — your balance ring fills in as the day goes."),
127
+ action: /* @__PURE__ */ R("button", {
128
+ type: "button",
129
+ onClick: () => w("/life-timeline"),
130
+ className: "min-h-11 rounded-xl bg-action-primary-bg px-4 text-sm font-medium text-action-primary-text",
131
+ children: T("timecampus.mobile.balance.logTime", "Log life time")
132
+ })
133
+ }) : /* @__PURE__ */ z(L, { children: [
134
+ /* @__PURE__ */ z(B, {
135
+ treatment: "glass",
136
+ glow: !0,
137
+ className: "p-4",
138
+ "data-testid": "mobile-balance-ring",
139
+ children: [/* @__PURE__ */ R(l, {
140
+ data: Z,
141
+ height: 260,
142
+ thickness: .24,
143
+ centerValue: J === null ? _(X) : `${J}%`,
144
+ centerLabel: J === null ? T("timecampus.mobile.balance.tracked", "tracked") : T("timecampus.mobile.balance.balanced", "balanced"),
145
+ valueFormat: (e) => _(e),
146
+ ariaLabel: T("timecampus.mobile.balance.ringAria", "Where your time went by life domain")
147
+ }), Q ? /* @__PURE__ */ R("p", {
148
+ className: n("mt-2 text-center text-sm font-semibold", Q.tone),
149
+ children: T(Q.key, Q.label)
150
+ }) : /* @__PURE__ */ R("p", {
151
+ className: "mt-2 text-center text-sm text-text-secondary",
152
+ children: T("timecampus.mobile.balance.noTargets", "Set targets to see how balanced this is.")
153
+ })]
154
+ }),
155
+ /* @__PURE__ */ z("section", {
156
+ "aria-labelledby": "mobile-balance-so-far",
157
+ children: [/* @__PURE__ */ R("h3", {
158
+ id: "mobile-balance-so-far",
159
+ className: "mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary",
160
+ children: D === 1 ? T("timecampus.mobile.balance.todaySoFar", "Today so far") : T("timecampus.mobile.balance.weekSoFar", "Last 7 days")
161
+ }), /* @__PURE__ */ R("ul", {
162
+ className: "space-y-2",
163
+ "data-testid": "mobile-balance-rows",
164
+ children: q.map((e) => {
165
+ let t = V[e.domain] ?? E;
166
+ return /* @__PURE__ */ z("li", {
167
+ className: "flex items-center gap-3 rounded-2xl border border-border-subtle bg-bg-surface/60 p-3",
168
+ children: [/* @__PURE__ */ R("span", {
169
+ className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-primary",
170
+ children: /* @__PURE__ */ R(t, { className: "h-5 w-5" })
171
+ }), /* @__PURE__ */ z("div", {
172
+ className: "min-w-0 flex-1",
173
+ children: [
174
+ /* @__PURE__ */ z("div", {
175
+ className: "flex items-baseline justify-between gap-2",
176
+ children: [/* @__PURE__ */ R("p", {
177
+ className: "truncate text-sm font-semibold text-text-primary",
178
+ children: f(e.domain)
179
+ }), e.percentOfTarget !== null && /* @__PURE__ */ z("span", {
180
+ className: "shrink-0 text-sm font-semibold tabular-nums text-text-primary",
181
+ children: [e.percentOfTarget, "%"]
182
+ })]
183
+ }),
184
+ /* @__PURE__ */ z("p", {
185
+ className: "text-xs tabular-nums text-text-secondary",
186
+ children: [_(e.actualSeconds), e.targetSeconds === null ? ` · ${Math.round(e.actualShare * 100)}%` : ` / ${_(e.targetSeconds)}`]
187
+ }),
188
+ e.targetSeconds !== null && /* @__PURE__ */ R(u, {
189
+ className: "mt-1.5",
190
+ value: Math.min(e.actualSeconds, e.targetSeconds),
191
+ max: e.targetSeconds,
192
+ higherIsWorse: !1,
193
+ showValue: !1,
194
+ size: "sm"
195
+ })
196
+ ]
197
+ })]
198
+ }, e.domain);
199
+ })
200
+ })]
201
+ }),
202
+ Y && /* @__PURE__ */ z(B, {
203
+ treatment: "glass",
204
+ className: "flex items-start gap-3 p-4",
205
+ "data-testid": "mobile-balance-nudge",
206
+ children: [/* @__PURE__ */ R(k, { className: "mt-0.5 h-5 w-5 shrink-0 text-primary" }), /* @__PURE__ */ z("p", {
207
+ className: "text-sm text-text-primary",
208
+ children: [
209
+ /* @__PURE__ */ R("span", {
210
+ className: "font-semibold",
211
+ children: T("timecampus.mobile.balance.nudgeTitle", "Make room for {{domain}}:", { domain: f(Y.domain) })
212
+ }),
213
+ " ",
214
+ T("timecampus.mobile.balance.nudgeBody", "{{missing}} short of your target for this period.", { missing: _(Y.missingSeconds) })
215
+ ]
216
+ })]
217
+ })
218
+ ] })]
219
+ });
220
+ }
221
+ //#endregion
222
+ export { G as MobileLifeBalancePage };
223
+
224
+ //# sourceMappingURL=MobileLifeBalancePage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileLifeBalancePage.js","names":[],"sources":["../../../../src/timecampus/pages/mobile/MobileLifeBalancePage.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport {\n BookOpen,\n Briefcase,\n Bus,\n Circle,\n Heart,\n Hourglass,\n Lightbulb,\n Moon,\n Smile,\n Sparkles,\n Star,\n Users,\n Wallet,\n Wrench,\n} from \"lucide-react\";\nimport { GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport {\n DonutChart,\n EmptyState,\n LoadingSkeleton,\n ProgressMeter,\n} from \"../../components\";\nimport { seriesColor } from \"../../components/charts/chartTheme\";\nimport {\n useTimeCampus,\n useTimeCampusNavigate,\n} from \"../../providers/TimeCampusProvider\";\nimport { useTr } from \"../../hooks\";\nimport { cn } from \"../../utils/helpers\";\nimport {\n useMyBalanceTargetsQuery,\n useMyLifeBalanceQuery,\n type MyLifeBalanceQuery,\n} from \"@/generated/wspace-operations\";\nimport { ALL_LIFE_DOMAINS, lifeDomainLabel } from \"../lifetime/domains\";\nimport { MobileScreen } from \"./MobileScreen\";\nimport {\n balanceScore,\n balanceStatus,\n biggestShortfall,\n compactDuration,\n domainRows,\n longDayLabel,\n toLocalDateKey,\n type BalanceStatus,\n} from \"./mobileModel\";\n\ntype DomainBalance = MyLifeBalanceQuery[\"myLifeBalance\"][\"byDomain\"][number];\n\nconst DOMAIN_ICON: Record<string, typeof Briefcase> = {\n WORK: Briefcase,\n SLEEP: Moon,\n HEALTH: Heart,\n FAMILY: Users,\n LEARNING: BookOpen,\n LEISURE: Star,\n COMMUTE: Bus,\n WAITING: Hourglass,\n CHORES: Wrench,\n SELF_CARE: Smile,\n SOCIAL: Users,\n FINANCE_ADMIN: Wallet,\n REFLECTION: Sparkles,\n};\n\nconst RANGES = [\n { days: 1, key: \"timecampus.mobile.balance.today\", label: \"Today\" },\n { days: 7, key: \"timecampus.mobile.balance.week\", label: \"7 days\" },\n] as const;\n\nconst STATUS_COPY: Record<\n BalanceStatus,\n { key: string; label: string; tone: string }\n> = {\n \"on-track\": {\n key: \"timecampus.mobile.balance.onTrack\",\n label: \"On track\",\n tone: \"text-status-success-text\",\n },\n drifting: {\n key: \"timecampus.mobile.balance.drifting\",\n label: \"Drifting\",\n tone: \"text-status-warning-text\",\n },\n \"off-balance\": {\n key: \"timecampus.mobile.balance.offBalance\",\n label: \"Off balance\",\n tone: \"text-status-error-text\",\n },\n};\n\n/** Start of the range: local midnight `days - 1` days ago (1 = today). */\nfunction rangeStart(days: number): string {\n const now = new Date();\n return new Date(\n now.getFullYear(),\n now.getMonth(),\n now.getDate() - (days - 1),\n ).toISOString();\n}\n\n/**\n * Phone life-balance: a ring of where today's (or this week's) time went, a\n * balance score against the targets the user declared, one row per life\n * domain with progress toward its pro-rated target, and a single nudge toward\n * the domain furthest behind.\n */\nexport function MobileLifeBalancePage() {\n const { workspaceId = \"\" } = useTimeCampus();\n const navigate = useTimeCampusNavigate();\n const t = useTr();\n const [rangeDays, setRangeDays] = useState<number>(1);\n\n // Recomputed per range switch; \"now\" is fixed for the life of the query.\n const range = useMemo(\n () => ({ from: rangeStart(rangeDays), to: new Date().toISOString() }),\n [rangeDays],\n );\n\n const { data, loading, error } = useMyLifeBalanceQuery({\n variables: range,\n skip: !workspaceId,\n fetchPolicy: \"cache-and-network\",\n });\n const { data: targetsData } = useMyBalanceTargetsQuery({\n skip: !workspaceId,\n });\n\n const balance = data?.myLifeBalance;\n const byDomain = useMemo<DomainBalance[]>(\n () => balance?.byDomain ?? [],\n [balance],\n );\n const hasTargets = balance?.hasTargets ?? false;\n\n const targetHours = useMemo(() => {\n const map: Record<string, number> = {};\n for (const target of targetsData?.myBalanceTargets ?? []) {\n map[target.domain] = target.desiredHoursPerWeek;\n }\n return map;\n }, [targetsData]);\n\n const rows = useMemo(\n () => domainRows(byDomain, targetHours, rangeDays),\n [byDomain, targetHours, rangeDays],\n );\n const score = balanceScore(byDomain, hasTargets);\n const shortfall = biggestShortfall(rows);\n const coveredSeconds = balance?.coveredSeconds ?? 0;\n\n const slices = useMemo(\n () =>\n byDomain\n .filter((d) => d.actualSeconds > 0)\n .map((d) => ({\n name: lifeDomainLabel(d.domain),\n value: d.actualSeconds,\n color: seriesColor(Math.max(0, ALL_LIFE_DOMAINS.indexOf(d.domain))),\n })),\n [byDomain],\n );\n\n const status = score === null ? null : STATUS_COPY[balanceStatus(score)];\n\n return (\n <MobileScreen\n active=\"life-balance\"\n title={t(\"timecampus.mobile.balance.title\", \"Life balance\")}\n fullViewPath=\"/life-balance\"\n trailing={\n <button\n type=\"button\"\n onClick={() => navigate(\"/life-balance\")}\n className=\"min-h-11 rounded-lg px-2 text-sm font-medium text-primary\"\n >\n {t(\"timecampus.mobile.balance.targets\", \"Targets\")}\n </button>\n }\n >\n <div className=\"flex items-end justify-between gap-3\">\n <div className=\"min-w-0\">\n <h2 className=\"text-xl font-bold uppercase tracking-tight text-text-primary\">\n {rangeDays === 1\n ? t(\"timecampus.mobile.balance.todayHeading\", \"Today\")\n : t(\"timecampus.mobile.balance.weekHeading\", \"This week\")}\n </h2>\n <p className=\"truncate text-sm text-text-secondary\">\n {longDayLabel(toLocalDateKey(new Date()))}\n </p>\n </div>\n <div\n role=\"radiogroup\"\n aria-label={t(\"timecampus.mobile.balance.range\", \"Range\")}\n className=\"flex rounded-full border border-border-subtle bg-bg-sunken/50 p-1\"\n >\n {RANGES.map((option) => (\n <button\n key={option.days}\n type=\"button\"\n role=\"radio\"\n aria-checked={rangeDays === option.days}\n onClick={() => setRangeDays(option.days)}\n className={cn(\n \"min-h-10 rounded-full px-3 text-sm font-medium\",\n rangeDays === option.days\n ? \"bg-bg-surface text-text-primary shadow-sm\"\n : \"text-text-secondary\",\n )}\n >\n {t(option.key, option.label)}\n </button>\n ))}\n </div>\n </div>\n\n {error ? (\n <p className=\"rounded-lg border border-status-error-bg/40 bg-status-error-bg p-3 text-sm text-status-error-text\">\n {t(\n \"timecampus.mobile.balance.error\",\n \"Couldn't load your balance right now. Please try again in a moment.\",\n )}\n </p>\n ) : loading && !balance ? (\n <LoadingSkeleton variant=\"card\" count={3} />\n ) : coveredSeconds <= 0 ? (\n <EmptyState\n title={t(\n \"timecampus.mobile.balance.emptyTitle\",\n \"Nothing tracked yet\",\n )}\n description={t(\n \"timecampus.mobile.balance.emptyHint\",\n \"Log sleep, workouts or family time, or start the timer — your balance ring fills in as the day goes.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate(\"/life-timeline\")}\n className=\"min-h-11 rounded-xl bg-action-primary-bg px-4 text-sm font-medium text-action-primary-text\"\n >\n {t(\"timecampus.mobile.balance.logTime\", \"Log life time\")}\n </button>\n }\n />\n ) : (\n <>\n <GlassCard\n treatment=\"glass\"\n glow\n className=\"p-4\"\n data-testid=\"mobile-balance-ring\"\n >\n <DonutChart\n data={slices}\n height={260}\n thickness={0.24}\n centerValue={\n score === null ? compactDuration(coveredSeconds) : `${score}%`\n }\n centerLabel={\n score === null\n ? t(\"timecampus.mobile.balance.tracked\", \"tracked\")\n : t(\"timecampus.mobile.balance.balanced\", \"balanced\")\n }\n valueFormat={(value) => compactDuration(value)}\n ariaLabel={t(\n \"timecampus.mobile.balance.ringAria\",\n \"Where your time went by life domain\",\n )}\n />\n {status ? (\n <p\n className={cn(\n \"mt-2 text-center text-sm font-semibold\",\n status.tone,\n )}\n >\n {t(status.key, status.label)}\n </p>\n ) : (\n <p className=\"mt-2 text-center text-sm text-text-secondary\">\n {t(\n \"timecampus.mobile.balance.noTargets\",\n \"Set targets to see how balanced this is.\",\n )}\n </p>\n )}\n </GlassCard>\n\n <section aria-labelledby=\"mobile-balance-so-far\">\n <h3\n id=\"mobile-balance-so-far\"\n className=\"mb-2 text-xs font-semibold uppercase tracking-wide text-text-secondary\"\n >\n {rangeDays === 1\n ? t(\"timecampus.mobile.balance.todaySoFar\", \"Today so far\")\n : t(\"timecampus.mobile.balance.weekSoFar\", \"Last 7 days\")}\n </h3>\n <ul className=\"space-y-2\" data-testid=\"mobile-balance-rows\">\n {rows.map((row) => {\n const Icon = DOMAIN_ICON[row.domain] ?? Circle;\n return (\n <li\n key={row.domain}\n className=\"flex items-center gap-3 rounded-2xl border border-border-subtle bg-bg-surface/60 p-3\"\n >\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-bg-sunken text-text-primary\">\n <Icon className=\"h-5 w-5\" />\n </span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-baseline justify-between gap-2\">\n <p className=\"truncate text-sm font-semibold text-text-primary\">\n {lifeDomainLabel(row.domain)}\n </p>\n {row.percentOfTarget !== null && (\n <span className=\"shrink-0 text-sm font-semibold tabular-nums text-text-primary\">\n {row.percentOfTarget}%\n </span>\n )}\n </div>\n <p className=\"text-xs tabular-nums text-text-secondary\">\n {compactDuration(row.actualSeconds)}\n {row.targetSeconds !== null\n ? ` / ${compactDuration(row.targetSeconds)}`\n : ` · ${Math.round(row.actualShare * 100)}%`}\n </p>\n {row.targetSeconds !== null && (\n <ProgressMeter\n className=\"mt-1.5\"\n value={Math.min(row.actualSeconds, row.targetSeconds)}\n max={row.targetSeconds}\n higherIsWorse={false}\n showValue={false}\n size=\"sm\"\n />\n )}\n </div>\n </li>\n );\n })}\n </ul>\n </section>\n\n {shortfall && (\n <GlassCard\n treatment=\"glass\"\n className=\"flex items-start gap-3 p-4\"\n data-testid=\"mobile-balance-nudge\"\n >\n <Lightbulb className=\"mt-0.5 h-5 w-5 shrink-0 text-primary\" />\n <p className=\"text-sm text-text-primary\">\n <span className=\"font-semibold\">\n {t(\n \"timecampus.mobile.balance.nudgeTitle\",\n \"Make room for {{domain}}:\",\n {\n domain: lifeDomainLabel(shortfall.domain),\n },\n )}\n </span>{\" \"}\n {t(\n \"timecampus.mobile.balance.nudgeBody\",\n \"{{missing}} short of your target for this period.\",\n { missing: compactDuration(shortfall.missingSeconds) },\n )}\n </p>\n </GlassCard>\n )}\n </>\n )}\n </MobileScreen>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmDA,IAAM,IAAgD;CACpD,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,SAAS;CACT,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,eAAe;CACf,YAAY;AACd,GAEM,IAAS,CACb;CAAE,MAAM;CAAG,KAAK;CAAmC,OAAO;AAAQ,GAClE;CAAE,MAAM;CAAG,KAAK;CAAkC,OAAO;AAAS,CACpE,GAEM,IAGF;CACF,YAAY;EACV,KAAK;EACL,OAAO;EACP,MAAM;CACR;CACA,UAAU;EACR,KAAK;EACL,OAAO;EACP,MAAM;CACR;CACA,eAAe;EACb,KAAK;EACL,OAAO;EACP,MAAM;CACR;AACF;AAGA,SAAS,EAAW,GAAsB;CACxC,IAA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D;UAAG,WAAU;UAAb,UAAA,CACG,EAAgB,EAAI,aAAa,GACjC,EAAI,kBAAkB,OAEnB,MAAM,KAAK,MAAM,EAAI,cAAc,GAAG,EAAE,KADxC,MAAM,EAAgB,EAAI,aAAa,GAE1C;;SACF,EAAI,kBAAkB,QACrB,kBAAC,GAAD;UACE,WAAU;UACV,OAAO,KAAK,IAAI,EAAI,eAAe,EAAI,aAAa;UACpD,KAAK,EAAI;UACT,eAAe;UACf,WAAW;UACX,MAAK;SACN,CAAA;QAEA;OACH,CAAA,CAAA;MAlCG,GAAA,EAAI,MAkCP;KAER,CAAC;IACC,CAAA,CACG;;GAER,KACC,kBAAC,GAAD;IACE,WAAU;IACV,WAAU;IACV,eAAY;IAHd,UAAA,CAKE,kBAAC,GAAD,EAAW,WAAU,uCAAwC,CAAA,GAC7D,kBAAC,KAAD;KAAG,WAAU;KAAb,UAAA;MACE,kBAAC,QAAD;OAAM,WAAU;OACb,UAAA,EACC,wCACA,6BACA,EACE,QAAQ,EAAgB,EAAU,MAAM,EAC1C,CACF;MACI,CAAA;MAAE;MACP,EACC,uCACA,qDACA,EAAE,SAAS,EAAgB,EAAU,cAAc,EAAE,CACvD;KACC;IACM,CAAA,CAAA;;EAEb,EAAA,CAAA,CAEQ;;AAElB"}
@@ -0,0 +1,32 @@
1
+ import { ReactNode } from 'react';
2
+ export type MobileScreenId = "timer" | "timeline" | "life-balance";
3
+ interface MobileScreenProps {
4
+ /** Which phone screen is showing (drives the switcher highlight). */
5
+ active: MobileScreenId;
6
+ title: string;
7
+ /** Route of the full (desktop) page this screen is the phone view of. */
8
+ fullViewPath: string;
9
+ /** Optional control on the right of the title bar. */
10
+ trailing?: ReactNode;
11
+ children: ReactNode;
12
+ }
13
+ /**
14
+ * Frame for the phone-optimised screens: a compact title bar, a one-handed
15
+ * switcher between the three phone screens and safe-area padding so content
16
+ * clears the notch and home indicator.
17
+ *
18
+ * Inside the installed app the shell's bottom tab bar already carries these
19
+ * three screens (they register with a `mobilePriority`), so the in-page
20
+ * switcher is only shown in a mobile browser, where the shell keeps its
21
+ * desktop chrome.
22
+ */
23
+ export declare function MobileScreen({ active, title, fullViewPath, trailing, children, }: MobileScreenProps): import("react").JSX.Element;
24
+ /**
25
+ * A small "Phone view" link that the desktop pages show only below the `md`
26
+ * breakpoint, so a mobile-browser user can jump to the phone-optimised screen.
27
+ */
28
+ export declare function PhoneViewLink({ path }: {
29
+ path: string;
30
+ }): import("react").JSX.Element;
31
+ export {};
32
+ //# sourceMappingURL=MobileScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileScreen.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/mobile/MobileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,CAAC;AAEnE,UAAU,iBAAiB;IACzB,qEAAqE;IACrE,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAgCD;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,EAAE,iBAAiB,+BA0DnB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,+BAavD"}
@@ -0,0 +1,89 @@
1
+ import { useTimeCampusNavigate as e } from "../../providers/TimeCampusProvider.js";
2
+ import { cn as t } from "../../utils/helpers.js";
3
+ import { useTr as n } from "../../shared/hooks/useTr.js";
4
+ import "../../hooks/index.js";
5
+ import { CalendarDays as r, ChevronLeft as i, PieChart as a, Timer as o } from "lucide-react";
6
+ import { useMobileTabBarVisible as s } from "@burdenoff/fe-libs/chrome/mobileTabBar/useMobileTabBarVisible";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ //#region src/timecampus/pages/mobile/MobileScreen.tsx
9
+ var u = [
10
+ {
11
+ id: "timeline",
12
+ path: "/mobile/timeline",
13
+ icon: r,
14
+ labelKey: "timecampus.mobile.nav.timeline",
15
+ label: "Timeline"
16
+ },
17
+ {
18
+ id: "timer",
19
+ path: "/mobile/timer",
20
+ icon: o,
21
+ labelKey: "timecampus.mobile.nav.timer",
22
+ label: "Timer"
23
+ },
24
+ {
25
+ id: "life-balance",
26
+ path: "/mobile/life-balance",
27
+ icon: a,
28
+ labelKey: "timecampus.mobile.nav.balance",
29
+ label: "Balance"
30
+ }
31
+ ];
32
+ function d({ active: r, title: a, fullViewPath: o, trailing: d, children: f }) {
33
+ let p = e(), m = n(), h = s();
34
+ return /* @__PURE__ */ l("div", {
35
+ className: "mx-auto flex w-full max-w-md flex-col gap-4 px-4 pb-[calc(env(safe-area-inset-bottom)+1.5rem)] pt-3",
36
+ "data-testid": `mobile-screen-${r}`,
37
+ children: [
38
+ /* @__PURE__ */ l("header", {
39
+ className: "flex items-center gap-2",
40
+ children: [
41
+ /* @__PURE__ */ l("button", {
42
+ type: "button",
43
+ onClick: () => p(o),
44
+ className: "-ml-2 inline-flex min-h-11 items-center gap-1 rounded-lg px-2 text-sm text-text-secondary hover:text-text-primary",
45
+ "aria-label": m("timecampus.mobile.fullViewAria", "Open the full page"),
46
+ children: [/* @__PURE__ */ c(i, { className: "h-5 w-5" }), m("timecampus.mobile.fullView", "Full view")]
47
+ }),
48
+ /* @__PURE__ */ c("h1", {
49
+ className: "flex-1 truncate text-center text-lg font-semibold text-text-primary",
50
+ children: a
51
+ }),
52
+ /* @__PURE__ */ c("div", {
53
+ className: "flex min-w-[5.5rem] justify-end",
54
+ children: d
55
+ })
56
+ ]
57
+ }),
58
+ !h && /* @__PURE__ */ c("nav", {
59
+ "aria-label": m("timecampus.mobile.nav.aria", "Phone screens"),
60
+ className: "grid grid-cols-3 gap-1 rounded-2xl border border-border-subtle bg-bg-sunken/50 p-1",
61
+ children: u.map((e) => {
62
+ let n = e.icon, i = e.id === r;
63
+ return /* @__PURE__ */ l("button", {
64
+ type: "button",
65
+ onClick: () => p(e.path),
66
+ "aria-current": i ? "page" : void 0,
67
+ className: t("flex min-h-11 items-center justify-center gap-1.5 rounded-xl text-sm font-medium transition-colors", i ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"),
68
+ children: [/* @__PURE__ */ c(n, { className: "h-4 w-4" }), m(e.labelKey, e.label)]
69
+ }, e.id);
70
+ })
71
+ }),
72
+ f
73
+ ]
74
+ });
75
+ }
76
+ function f({ path: t }) {
77
+ let r = e(), i = n();
78
+ return /* @__PURE__ */ c("button", {
79
+ type: "button",
80
+ onClick: () => r(t),
81
+ className: "mb-4 inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-xl border border-border-subtle bg-bg-surface px-4 text-sm font-medium text-text-primary md:hidden",
82
+ "data-testid": "phone-view-link",
83
+ children: i("timecampus.mobile.openPhoneView", "Open the phone view")
84
+ });
85
+ }
86
+ //#endregion
87
+ export { d as MobileScreen, f as PhoneViewLink };
88
+
89
+ //# sourceMappingURL=MobileScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileScreen.js","names":[],"sources":["../../../../src/timecampus/pages/mobile/MobileScreen.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { CalendarDays, ChevronLeft, PieChart, Timer } from \"lucide-react\";\nimport { useMobileTabBarVisible } from \"@burdenoff/fe-libs/chrome/mobileTabBar/useMobileTabBarVisible\";\nimport { useTimeCampusNavigate } from \"../../providers/TimeCampusProvider\";\nimport { useTr } from \"../../hooks\";\nimport { cn } from \"../../utils/helpers\";\n\nexport type MobileScreenId = \"timer\" | \"timeline\" | \"life-balance\";\n\ninterface MobileScreenProps {\n /** Which phone screen is showing (drives the switcher highlight). */\n active: MobileScreenId;\n title: string;\n /** Route of the full (desktop) page this screen is the phone view of. */\n fullViewPath: string;\n /** Optional control on the right of the title bar. */\n trailing?: ReactNode;\n children: ReactNode;\n}\n\nconst SCREENS: {\n id: MobileScreenId;\n path: string;\n icon: typeof Timer;\n labelKey: string;\n label: string;\n}[] = [\n {\n id: \"timeline\",\n path: \"/mobile/timeline\",\n icon: CalendarDays,\n labelKey: \"timecampus.mobile.nav.timeline\",\n label: \"Timeline\",\n },\n {\n id: \"timer\",\n path: \"/mobile/timer\",\n icon: Timer,\n labelKey: \"timecampus.mobile.nav.timer\",\n label: \"Timer\",\n },\n {\n id: \"life-balance\",\n path: \"/mobile/life-balance\",\n icon: PieChart,\n labelKey: \"timecampus.mobile.nav.balance\",\n label: \"Balance\",\n },\n];\n\n/**\n * Frame for the phone-optimised screens: a compact title bar, a one-handed\n * switcher between the three phone screens and safe-area padding so content\n * clears the notch and home indicator.\n *\n * Inside the installed app the shell's bottom tab bar already carries these\n * three screens (they register with a `mobilePriority`), so the in-page\n * switcher is only shown in a mobile browser, where the shell keeps its\n * desktop chrome.\n */\nexport function MobileScreen({\n active,\n title,\n fullViewPath,\n trailing,\n children,\n}: MobileScreenProps) {\n const navigate = useTimeCampusNavigate();\n const t = useTr();\n const nativeChrome = useMobileTabBarVisible();\n\n return (\n <div\n className=\"mx-auto flex w-full max-w-md flex-col gap-4 px-4 pb-[calc(env(safe-area-inset-bottom)+1.5rem)] pt-3\"\n data-testid={`mobile-screen-${active}`}\n >\n <header className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => navigate(fullViewPath)}\n className=\"-ml-2 inline-flex min-h-11 items-center gap-1 rounded-lg px-2 text-sm text-text-secondary hover:text-text-primary\"\n aria-label={t(\"timecampus.mobile.fullViewAria\", \"Open the full page\")}\n >\n <ChevronLeft className=\"h-5 w-5\" />\n {t(\"timecampus.mobile.fullView\", \"Full view\")}\n </button>\n <h1 className=\"flex-1 truncate text-center text-lg font-semibold text-text-primary\">\n {title}\n </h1>\n <div className=\"flex min-w-[5.5rem] justify-end\">{trailing}</div>\n </header>\n\n {!nativeChrome && (\n <nav\n aria-label={t(\"timecampus.mobile.nav.aria\", \"Phone screens\")}\n className=\"grid grid-cols-3 gap-1 rounded-2xl border border-border-subtle bg-bg-sunken/50 p-1\"\n >\n {SCREENS.map((screen) => {\n const Icon = screen.icon;\n const isActive = screen.id === active;\n return (\n <button\n key={screen.id}\n type=\"button\"\n onClick={() => navigate(screen.path)}\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n \"flex min-h-11 items-center justify-center gap-1.5 rounded-xl text-sm font-medium transition-colors\",\n isActive\n ? \"bg-bg-surface text-text-primary shadow-sm\"\n : \"text-text-secondary hover:text-text-primary\",\n )}\n >\n <Icon className=\"h-4 w-4\" />\n {t(screen.labelKey, screen.label)}\n </button>\n );\n })}\n </nav>\n )}\n\n {children}\n </div>\n );\n}\n\n/**\n * A small \"Phone view\" link that the desktop pages show only below the `md`\n * breakpoint, so a mobile-browser user can jump to the phone-optimised screen.\n */\nexport function PhoneViewLink({ path }: { path: string }) {\n const navigate = useTimeCampusNavigate();\n const t = useTr();\n return (\n <button\n type=\"button\"\n onClick={() => navigate(path)}\n className=\"mb-4 inline-flex min-h-11 w-full items-center justify-center gap-2 rounded-xl border border-border-subtle bg-bg-surface px-4 text-sm font-medium text-text-primary md:hidden\"\n data-testid=\"phone-view-link\"\n >\n {t(\"timecampus.mobile.openPhoneView\", \"Open the phone view\")}\n </button>\n );\n}\n"],"mappings":";;;;;;;;AAoBA,IAAM,IAMA;CACJ;EACE,IAAI;EACJ,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO;CACT;CACA;EACE,IAAI;EACJ,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO;CACT;CACA;EACE,IAAI;EACJ,MAAM;EACN,MAAM;EACN,UAAU;EACV,OAAO;CACT;AACF;AAYA,SAAgB,EAAa,EAC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umb-sized cards on a time
3
+ * rail, a focus summary on top, search, day paging, and a bottom sheet with a
4
+ * segment's details. Editing (recategorise, assign project, drag) stays on the
5
+ * full timeline, which the sheet links to.
6
+ */
7
+ export declare function MobileTimelinePage(): import("react").JSX.Element;
8
+ //# sourceMappingURL=MobileTimelinePage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileTimelinePage.d.ts","sourceRoot":"","sources":["../../../../src/timecampus/pages/mobile/MobileTimelinePage.tsx"],"names":[],"mappings":"AAuGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,gCAmQjC"}