@burdenoff/microfe-timecampus 2026.1031.10 → 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 (108) hide show
  1. package/dist/generated/wspace-operations.d.ts +45 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +710 -672
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +731 -0
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +14 -12
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/index.js +7 -7
  10. package/dist/timecampus/TimeCampusRoot.d.ts.map +1 -1
  11. package/dist/timecampus/TimeCampusRoot.js +121 -80
  12. package/dist/timecampus/TimeCampusRoot.js.map +1 -1
  13. package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
  14. package/dist/timecampus/TimeCampusRoutes.js +24 -5
  15. package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
  16. package/dist/timecampus/analytics/index.d.ts +3 -0
  17. package/dist/timecampus/analytics/index.d.ts.map +1 -0
  18. package/dist/timecampus/analytics/index.js +3 -0
  19. package/dist/timecampus/analytics/timecampusAnalytics.d.ts +83 -0
  20. package/dist/timecampus/analytics/timecampusAnalytics.d.ts.map +1 -0
  21. package/dist/timecampus/analytics/timecampusAnalytics.js +175 -0
  22. package/dist/timecampus/analytics/timecampusAnalytics.js.map +1 -0
  23. package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts +16 -0
  24. package/dist/timecampus/analytics/useTimeCampusAnalytics.d.ts.map +1 -0
  25. package/dist/timecampus/analytics/useTimeCampusAnalytics.js +48 -0
  26. package/dist/timecampus/analytics/useTimeCampusAnalytics.js.map +1 -0
  27. package/dist/timecampus/components/ActivationCard.d.ts +3 -0
  28. package/dist/timecampus/components/ActivationCard.d.ts.map +1 -0
  29. package/dist/timecampus/components/ActivationCard.js +156 -0
  30. package/dist/timecampus/components/ActivationCard.js.map +1 -0
  31. package/dist/timecampus/index.js +7 -7
  32. package/dist/timecampus/pages/HomePage.d.ts.map +1 -1
  33. package/dist/timecampus/pages/HomePage.js +142 -139
  34. package/dist/timecampus/pages/HomePage.js.map +1 -1
  35. package/dist/timecampus/pages/client-portal/ClientPortalPage.d.ts.map +1 -1
  36. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +244 -228
  37. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  38. package/dist/timecampus/pages/dashboard/AnalyticsPage.d.ts.map +1 -1
  39. package/dist/timecampus/pages/dashboard/AnalyticsPage.js +117 -112
  40. package/dist/timecampus/pages/dashboard/AnalyticsPage.js.map +1 -1
  41. package/dist/timecampus/pages/dashboard/ReportsPage.d.ts.map +1 -1
  42. package/dist/timecampus/pages/dashboard/ReportsPage.js +105 -102
  43. package/dist/timecampus/pages/dashboard/ReportsPage.js.map +1 -1
  44. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.d.ts.map +1 -1
  45. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +209 -192
  46. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  47. package/dist/timecampus/pages/focus-score/FocusScorePage.d.ts.map +1 -1
  48. package/dist/timecampus/pages/focus-score/FocusScorePage.js +71 -68
  49. package/dist/timecampus/pages/focus-score/FocusScorePage.js.map +1 -1
  50. package/dist/timecampus/pages/invoicing/InvoicingPage.d.ts.map +1 -1
  51. package/dist/timecampus/pages/invoicing/InvoicingPage.js +157 -150
  52. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  53. package/dist/timecampus/pages/lifetime/LifeBalancePage.d.ts.map +1 -1
  54. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +34 -31
  55. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  56. package/dist/timecampus/pages/meetings/MeetingCreatePage.d.ts.map +1 -1
  57. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +58 -52
  58. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  59. package/dist/timecampus/pages/meetings/MeetingsPage.d.ts.map +1 -1
  60. package/dist/timecampus/pages/meetings/MeetingsPage.js +51 -45
  61. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  62. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts +8 -0
  63. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.d.ts.map +1 -0
  64. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js +224 -0
  65. package/dist/timecampus/pages/mobile/MobileLifeBalancePage.js.map +1 -0
  66. package/dist/timecampus/pages/mobile/MobileScreen.d.ts +32 -0
  67. package/dist/timecampus/pages/mobile/MobileScreen.d.ts.map +1 -0
  68. package/dist/timecampus/pages/mobile/MobileScreen.js +89 -0
  69. package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -0
  70. package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts +8 -0
  71. package/dist/timecampus/pages/mobile/MobileTimelinePage.d.ts.map +1 -0
  72. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +341 -0
  73. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -0
  74. package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts +8 -0
  75. package/dist/timecampus/pages/mobile/MobileTimerPage.d.ts.map +1 -0
  76. package/dist/timecampus/pages/mobile/MobileTimerPage.js +226 -0
  77. package/dist/timecampus/pages/mobile/MobileTimerPage.js.map +1 -0
  78. package/dist/timecampus/pages/mobile/mobileModel.d.ts +121 -0
  79. package/dist/timecampus/pages/mobile/mobileModel.d.ts.map +1 -0
  80. package/dist/timecampus/pages/mobile/mobileModel.js +127 -0
  81. package/dist/timecampus/pages/mobile/mobileModel.js.map +1 -0
  82. package/dist/timecampus/pages/pomodoro/PomodoroPage.d.ts.map +1 -1
  83. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +57 -51
  84. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  85. package/dist/timecampus/pages/projects/ProjectCreatePage.d.ts.map +1 -1
  86. package/dist/timecampus/pages/projects/ProjectCreatePage.js +59 -49
  87. package/dist/timecampus/pages/projects/ProjectCreatePage.js.map +1 -1
  88. package/dist/timecampus/pages/projects/ProjectsPage.d.ts.map +1 -1
  89. package/dist/timecampus/pages/projects/ProjectsPage.js +165 -155
  90. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  91. package/dist/timecampus/pages/time/TimeEntriesPage.d.ts.map +1 -1
  92. package/dist/timecampus/pages/time/TimeEntriesPage.js +194 -186
  93. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  94. package/dist/timecampus/pages/time/TimeTrackingPage.d.ts.map +1 -1
  95. package/dist/timecampus/pages/time/TimeTrackingPage.js +139 -126
  96. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  97. package/dist/timecampus/pages/time/TimerPage.d.ts.map +1 -1
  98. package/dist/timecampus/pages/time/TimerPage.js +54 -39
  99. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  100. package/dist/timecampus/pages/time-approval/TimeApprovalPage.d.ts.map +1 -1
  101. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js +60 -50
  102. package/dist/timecampus/pages/time-approval/TimeApprovalPage.js.map +1 -1
  103. package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
  104. package/dist/timecampus/pages/timeline/TimelinePage.js +306 -297
  105. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  106. package/dist/timecampus/types/index.d.ts +5 -0
  107. package/dist/timecampus/types/index.d.ts.map +1 -1
  108. package/package.json +1 -1
@@ -4,21 +4,24 @@ import { StatCard as r } from "../../components/StatCard.js";
4
4
  import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
5
5
  import { EmptyState as a } from "../../components/EmptyState.js";
6
6
  import { useAcceptTimeCampusCaptureEventSuggestionMutation as o, useGetTimeCampusTimelineQuery as s, useListProjectsQuery as c, useRecategorizeTimeCampusCaptureEventMutation as l, useRejectTimeCampusCaptureEventSuggestionMutation as u, useSetTimeCampusCaptureEventProjectMutation as d, useSuggestTimeCampusCaptureEventProjectMutation as f } from "../../../generated/wspace-operations.js";
7
+ import { useTimelineViewed as ee } from "../../analytics/useTimeCampusAnalytics.js";
8
+ import "../../analytics/index.js";
7
9
  import { PageLayout as p } from "../../components/PageLayout.js";
8
- import { ToastContainer as ee, useToast as te } from "../../components/Toast.js";
9
- import { calendarHoldLabel as m } from "../focus/focusHelpers.js";
10
- import { parseTimelineDateParam as h } from "../lifetime/recommendationEvidence.js";
11
- import { hasAiCategorizedSegment as ne, segmentProvenance as g } from "./timelineProvenance.js";
12
- import { driftLabel as _, focusStatusLabel as v, plannedDrift as y, protectedPercent as b } from "./timelineFocus.js";
13
- import { pendingSuggestion as re, pendingSuggestions as ie } from "./timelineSuggestions.js";
14
- import { useMemo as x, useState as ae } from "react";
15
- import { Activity as S, Brain as C, Calendar as oe, CalendarClock as w, Check as T, Coffee as E, FolderOpen as D, Github as se, GripVertical as O, MessageSquare as k, Shield as A, Sparkles as j, Users as M, X as N, Zap as P } from "lucide-react";
16
- import { useSearchParams as ce } from "react-router";
17
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
18
- import { GlassCard as L } from "@burdenoff/fe-libs/ui";
19
- import { DndContext as le, DragOverlay as ue, KeyboardSensor as de, PointerSensor as fe, useDraggable as R, useDroppable as z, useSensor as B, useSensors as pe } from "@dnd-kit/core";
10
+ import { ToastContainer as m, useToast as h } from "../../components/Toast.js";
11
+ import { calendarHoldLabel as g } from "../focus/focusHelpers.js";
12
+ import { PhoneViewLink as te } from "../mobile/MobileScreen.js";
13
+ import { parseTimelineDateParam as ne } from "../lifetime/recommendationEvidence.js";
14
+ import { hasAiCategorizedSegment as re, segmentProvenance as ie } from "./timelineProvenance.js";
15
+ import { driftLabel as _, focusStatusLabel as ae, plannedDrift as v, protectedPercent as y } from "./timelineFocus.js";
16
+ import { pendingSuggestion as oe, pendingSuggestions as se } from "./timelineSuggestions.js";
17
+ import { useMemo as b, useState as x } from "react";
18
+ import { Activity as S, Brain as C, Calendar as ce, CalendarClock as w, Check as T, Coffee as E, FolderOpen as D, Github as le, GripVertical as ue, MessageSquare as O, Shield as k, Sparkles as A, Users as j, X as M, Zap as N } from "lucide-react";
19
+ import { useSearchParams as de } from "react-router";
20
+ import { jsx as P, jsxs as F } from "react/jsx-runtime";
21
+ import { GlassCard as I } from "@burdenoff/fe-libs/ui";
22
+ import { DndContext as fe, DragOverlay as pe, KeyboardSensor as me, PointerSensor as he, useDraggable as L, useDroppable as R, useSensor as z, useSensors as ge } from "@dnd-kit/core";
20
23
  //#region src/timecampus/pages/timeline/TimelinePage.tsx
21
- var V = {
24
+ var B = {
22
25
  DEEP_WORK: {
23
26
  label: "Deep work",
24
27
  icon: C,
@@ -27,13 +30,13 @@ var V = {
27
30
  },
28
31
  MEETING: {
29
32
  label: "Meeting",
30
- icon: M,
33
+ icon: j,
31
34
  dot: "bg-status-info-bg",
32
35
  chip: "bg-status-info-bg text-status-info-text"
33
36
  },
34
37
  COMMUNICATION: {
35
38
  label: "Communication",
36
- icon: k,
39
+ icon: O,
37
40
  dot: "bg-status-warning-bg",
38
41
  chip: "bg-status-warning-bg text-status-warning-text"
39
42
  },
@@ -49,57 +52,57 @@ var V = {
49
52
  dot: "bg-bg-sunken",
50
53
  chip: "bg-bg-sunken text-text-secondary"
51
54
  }
52
- }, H = {
53
- TIME_ENTRY: P,
54
- MEETING: M,
55
+ }, V = {
56
+ TIME_ENTRY: N,
57
+ MEETING: j,
55
58
  POMODORO: C,
56
- EMAIL: k,
57
- CAPTURE: se,
58
- FOCUS_SESSION: A,
59
+ EMAIL: O,
60
+ CAPTURE: le,
61
+ FOCUS_SESSION: k,
59
62
  FOCUS_BLOCK: w
60
63
  };
61
- function me(e) {
64
+ function _e(e) {
62
65
  return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
63
66
  }
64
- function he({ segment: e }) {
67
+ function ve({ segment: e }) {
65
68
  let r = e.focus;
66
69
  if (!r) return null;
67
- let i = e.isPlanned, a = i ? w : A, o = v(i, r, e.endTime), s = i ? null : b(r), c = i ? null : y(e.startTime, e.endTime, r), l = m(r.calendarHoldStatus);
68
- return /* @__PURE__ */ I("li", {
70
+ let i = e.isPlanned, a = i ? w : k, o = ae(i, r, e.endTime), s = i ? null : y(r), c = i ? null : v(e.startTime, e.endTime, r), l = g(r.calendarHoldStatus);
71
+ return /* @__PURE__ */ F("li", {
69
72
  className: `flex items-start gap-3 p-4 ${i ? "bg-bg-sunken/30" : ""}`,
70
73
  "data-testid": i ? "timeline-focus-block" : "timeline-focus-session",
71
74
  children: [
72
- /* @__PURE__ */ I("div", {
75
+ /* @__PURE__ */ F("div", {
73
76
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
74
- children: [/* @__PURE__ */ F("span", { children: n(e.startTime) }), /* @__PURE__ */ F("span", {
77
+ children: [/* @__PURE__ */ P("span", { children: n(e.startTime) }), /* @__PURE__ */ P("span", {
75
78
  className: "text-text-tertiary",
76
79
  children: t(e.durationSeconds)
77
80
  })]
78
81
  }),
79
- /* @__PURE__ */ F("div", {
82
+ /* @__PURE__ */ P("div", {
80
83
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${i ? "border border-dashed border-status-success-text/60 text-status-success-text" : "bg-status-success-bg text-status-success-text"}`,
81
- children: /* @__PURE__ */ F(a, { className: "h-4 w-4" })
84
+ children: /* @__PURE__ */ P(a, { className: "h-4 w-4" })
82
85
  }),
83
- /* @__PURE__ */ I("div", {
86
+ /* @__PURE__ */ F("div", {
84
87
  className: "min-w-0 flex-1",
85
88
  children: [
86
- /* @__PURE__ */ F("p", {
89
+ /* @__PURE__ */ P("p", {
87
90
  className: "truncate text-sm font-medium text-text-primary",
88
91
  children: e.title || (i ? "Planned focus block" : "Focus session")
89
92
  }),
90
- /* @__PURE__ */ I("div", {
93
+ /* @__PURE__ */ F("div", {
91
94
  className: "mt-1 flex flex-wrap items-center gap-2",
92
95
  children: [
93
- /* @__PURE__ */ F("span", {
96
+ /* @__PURE__ */ P("span", {
94
97
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${i ? "border border-dashed border-border-seam text-text-secondary" : "bg-status-success-bg text-status-success-text"}`,
95
98
  "data-testid": "timeline-focus-status",
96
99
  children: o
97
100
  }),
98
- r.protectionLevel === "STRICT" && /* @__PURE__ */ F("span", {
101
+ r.protectionLevel === "STRICT" && /* @__PURE__ */ P("span", {
99
102
  className: "text-xs text-text-secondary",
100
103
  children: "Strict"
101
104
  }),
102
- r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */ I("span", {
105
+ r.plannedStartTime && r.plannedEndTime && /* @__PURE__ */ F("span", {
103
106
  className: "text-xs tabular-nums text-text-secondary",
104
107
  children: [
105
108
  "Planned ",
@@ -109,7 +112,7 @@ function he({ segment: e }) {
109
112
  n(r.plannedEndTime)
110
113
  ]
111
114
  }),
112
- !i && e.endTime && /* @__PURE__ */ I("span", {
115
+ !i && e.endTime && /* @__PURE__ */ F("span", {
113
116
  className: "text-xs tabular-nums text-text-secondary",
114
117
  children: [
115
118
  "Actual ",
@@ -119,7 +122,7 @@ function he({ segment: e }) {
119
122
  n(e.endTime)
120
123
  ]
121
124
  }),
122
- c && /* @__PURE__ */ I("span", {
125
+ c && /* @__PURE__ */ F("span", {
123
126
  className: "text-xs text-text-tertiary",
124
127
  children: [
125
128
  "Started ",
@@ -127,27 +130,27 @@ function he({ segment: e }) {
127
130
  c.endMinutes !== null && `, ended ${_(c.endMinutes, "over", "short")}`
128
131
  ]
129
132
  }),
130
- l && /* @__PURE__ */ F("span", {
133
+ l && /* @__PURE__ */ P("span", {
131
134
  className: "text-xs text-text-tertiary",
132
135
  children: l
133
136
  })
134
137
  ]
135
138
  }),
136
- !i && /* @__PURE__ */ I("div", {
139
+ !i && /* @__PURE__ */ F("div", {
137
140
  className: "mt-2",
138
141
  "data-testid": "timeline-focus-protection",
139
- children: [/* @__PURE__ */ I("div", {
142
+ children: [/* @__PURE__ */ F("div", {
140
143
  className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
141
144
  role: "img",
142
145
  "aria-label": `${s ?? 0}% of this session stayed protected`,
143
- children: [/* @__PURE__ */ F("span", {
146
+ children: [/* @__PURE__ */ P("span", {
144
147
  className: "h-full bg-status-success-text",
145
148
  style: { width: `${s ?? 0}%` }
146
- }), /* @__PURE__ */ F("span", {
149
+ }), /* @__PURE__ */ P("span", {
147
150
  className: "h-full bg-status-warning-text",
148
151
  style: { width: `${s === null ? 0 : 100 - s}%` }
149
152
  })]
150
- }), /* @__PURE__ */ I("p", {
153
+ }), /* @__PURE__ */ F("p", {
151
154
  className: "mt-1 text-xs tabular-nums text-text-secondary",
152
155
  children: [
153
156
  "Protected ",
@@ -164,7 +167,7 @@ function he({ segment: e }) {
164
167
  ]
165
168
  })]
166
169
  }),
167
- i && /* @__PURE__ */ F("p", {
170
+ i && /* @__PURE__ */ P("p", {
168
171
  className: "mt-1 text-xs text-text-tertiary",
169
172
  children: "Not counted in the day's totals until you run it."
170
173
  })
@@ -173,28 +176,28 @@ function he({ segment: e }) {
173
176
  ]
174
177
  });
175
178
  }
176
- var U = [
179
+ var H = [
177
180
  "DEEP_WORK",
178
181
  "MEETING",
179
182
  "COMMUNICATION",
180
183
  "BREAK",
181
184
  "OTHER"
182
185
  ];
183
- function W({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
184
- return /* @__PURE__ */ I("div", {
186
+ function U({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
187
+ return /* @__PURE__ */ F("div", {
185
188
  className: "mt-2 flex flex-wrap items-center gap-2 rounded-lg border border-dashed border-border-seam bg-bg-sunken/40 px-2.5 py-1.5",
186
189
  "data-testid": "timeline-project-suggestion",
187
190
  children: [
188
- /* @__PURE__ */ F(j, {
191
+ /* @__PURE__ */ P(A, {
189
192
  className: "h-3.5 w-3.5 shrink-0 text-primary",
190
193
  "aria-hidden": !0
191
194
  }),
192
- /* @__PURE__ */ I("span", {
195
+ /* @__PURE__ */ F("span", {
193
196
  className: "text-xs text-text-secondary",
194
197
  children: [
195
198
  "Suggested project",
196
199
  " ",
197
- /* @__PURE__ */ F("span", {
200
+ /* @__PURE__ */ P("span", {
198
201
  className: "font-medium text-text-primary",
199
202
  children: e.projectName
200
203
  }),
@@ -205,129 +208,129 @@ function W({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
205
208
  e.reason
206
209
  ]
207
210
  }),
208
- /* @__PURE__ */ I("span", {
211
+ /* @__PURE__ */ F("span", {
209
212
  className: "ml-auto flex items-center gap-1",
210
- children: [/* @__PURE__ */ I("button", {
213
+ children: [/* @__PURE__ */ F("button", {
211
214
  type: "button",
212
215
  disabled: t,
213
216
  onClick: () => n(e),
214
217
  "aria-label": `Accept project ${e.projectName}`,
215
218
  className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-2 py-0.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
216
- children: [/* @__PURE__ */ F(T, { className: "h-3 w-3" }), "Accept"]
217
- }), /* @__PURE__ */ I("button", {
219
+ children: [/* @__PURE__ */ P(T, { className: "h-3 w-3" }), "Accept"]
220
+ }), /* @__PURE__ */ F("button", {
218
221
  type: "button",
219
222
  disabled: t,
220
223
  onClick: () => r(e),
221
224
  "aria-label": `Dismiss suggested project ${e.projectName}`,
222
225
  className: "inline-flex items-center gap-1 rounded-md border border-border-seam bg-bg-surface px-2 py-0.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken disabled:opacity-50",
223
- children: [/* @__PURE__ */ F(N, { className: "h-3 w-3" }), "Dismiss"]
226
+ children: [/* @__PURE__ */ P(M, { className: "h-3 w-3" }), "Dismiss"]
224
227
  })]
225
228
  })
226
229
  ]
227
230
  });
228
231
  }
229
- function ge({ category: e, label: n, dotClassName: r, totalSeconds: i }) {
230
- let { isOver: a, setNodeRef: o } = z({ id: `category:${e}` });
231
- return /* @__PURE__ */ I("div", {
232
+ function ye({ category: e, label: n, dotClassName: r, totalSeconds: i }) {
233
+ let { isOver: a, setNodeRef: o } = R({ id: `category:${e}` });
234
+ return /* @__PURE__ */ F("div", {
232
235
  ref: o,
233
236
  className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors ${a ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-seam bg-bg-surface"}`,
234
237
  children: [
235
- /* @__PURE__ */ F("span", {
238
+ /* @__PURE__ */ P("span", {
236
239
  className: `inline-block h-2.5 w-2.5 rounded-full ${r}`,
237
240
  "aria-hidden": !0
238
241
  }),
239
- /* @__PURE__ */ F("span", {
242
+ /* @__PURE__ */ P("span", {
240
243
  className: "text-sm font-medium text-text-primary",
241
244
  children: n
242
245
  }),
243
- /* @__PURE__ */ F("span", {
246
+ /* @__PURE__ */ P("span", {
244
247
  className: "text-sm tabular-nums text-text-secondary",
245
248
  children: t(i)
246
249
  }),
247
- a && /* @__PURE__ */ F("span", {
250
+ a && /* @__PURE__ */ P("span", {
248
251
  className: "text-xs font-medium text-primary",
249
252
  children: "Drop here"
250
253
  })
251
254
  ]
252
255
  });
253
256
  }
254
- function _e({ segment: e, category: r, projectName: i, suggestion: a, recategorizing: o, onRecategorize: s, projectActions: c }) {
255
- let l = V[r] ?? V.OTHER, u = H[e.source] ?? S, d = g(e), f = e.source === "CAPTURE", p = f && !e.projectId && !a && c.projects.length > 0, { attributes: ee, listeners: te, setNodeRef: m, isDragging: h } = R({
257
+ function be({ segment: e, category: r, projectName: i, suggestion: a, recategorizing: o, onRecategorize: s, projectActions: c }) {
258
+ let l = B[r] ?? B.OTHER, u = V[e.source] ?? S, d = ie(e), f = e.source === "CAPTURE", ee = f && !e.projectId && !a && c.projects.length > 0, { attributes: p, listeners: m, setNodeRef: h, isDragging: g } = L({
256
259
  id: e.id,
257
260
  data: { segment: e },
258
261
  disabled: !e.isRecategorizable
259
262
  });
260
- return /* @__PURE__ */ I("li", {
261
- ref: m,
262
- className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${h ? "opacity-40" : ""}`,
263
+ return /* @__PURE__ */ F("li", {
264
+ ref: h,
265
+ className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${g ? "opacity-40" : ""}`,
263
266
  children: [
264
- /* @__PURE__ */ I("div", {
267
+ /* @__PURE__ */ F("div", {
265
268
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
266
- children: [/* @__PURE__ */ F("span", { children: n(e.startTime) }), /* @__PURE__ */ F("span", {
269
+ children: [/* @__PURE__ */ P("span", { children: n(e.startTime) }), /* @__PURE__ */ P("span", {
267
270
  className: "text-text-tertiary",
268
271
  children: t(e.durationSeconds)
269
272
  })]
270
273
  }),
271
- e.isRecategorizable && /* @__PURE__ */ F("button", {
274
+ e.isRecategorizable && /* @__PURE__ */ P("button", {
272
275
  type: "button",
273
276
  "aria-label": `Drag to recategorize ${e.title || l.label}`,
274
277
  className: "mt-1.5 shrink-0 cursor-grab touch-none text-text-tertiary hover:text-text-secondary active:cursor-grabbing",
275
- ...ee,
276
- ...te,
277
- children: /* @__PURE__ */ F(O, { className: "h-4 w-4" })
278
+ ...p,
279
+ ...m,
280
+ children: /* @__PURE__ */ P(ue, { className: "h-4 w-4" })
278
281
  }),
279
- /* @__PURE__ */ F("div", {
282
+ /* @__PURE__ */ P("div", {
280
283
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${l.chip}`,
281
- children: /* @__PURE__ */ F(u, { className: "h-4 w-4" })
284
+ children: /* @__PURE__ */ P(u, { className: "h-4 w-4" })
282
285
  }),
283
- /* @__PURE__ */ I("div", {
286
+ /* @__PURE__ */ F("div", {
284
287
  className: "min-w-0 flex-1",
285
288
  children: [
286
- /* @__PURE__ */ F("p", {
289
+ /* @__PURE__ */ P("p", {
287
290
  className: "truncate text-sm font-medium text-text-primary",
288
291
  children: e.title || l.label
289
292
  }),
290
- /* @__PURE__ */ I("div", {
293
+ /* @__PURE__ */ F("div", {
291
294
  className: "mt-1 flex flex-wrap items-center gap-2",
292
295
  children: [
293
- /* @__PURE__ */ F("span", {
296
+ /* @__PURE__ */ P("span", {
294
297
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${l.chip}`,
295
298
  children: l.label
296
299
  }),
297
- i !== void 0 && /* @__PURE__ */ I("span", {
300
+ i !== void 0 && /* @__PURE__ */ F("span", {
298
301
  className: "inline-flex max-w-[12rem] items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
299
- children: [/* @__PURE__ */ F(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ F("span", {
302
+ children: [/* @__PURE__ */ P(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ P("span", {
300
303
  className: "truncate",
301
304
  children: i
302
305
  })]
303
306
  }),
304
- e.app && /* @__PURE__ */ F("span", {
307
+ e.app && /* @__PURE__ */ P("span", {
305
308
  className: "text-xs text-text-secondary",
306
309
  children: e.app
307
310
  }),
308
- d && (d.isAi ? /* @__PURE__ */ I("span", {
311
+ d && (d.isAi ? /* @__PURE__ */ F("span", {
309
312
  className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
310
313
  title: d.detail,
311
314
  "data-testid": "timeline-ai-provenance",
312
315
  children: [
313
- /* @__PURE__ */ F(j, {
316
+ /* @__PURE__ */ P(A, {
314
317
  className: "h-3 w-3 shrink-0",
315
318
  "aria-hidden": !0
316
319
  }),
317
320
  d.label,
318
- /* @__PURE__ */ I("span", {
321
+ /* @__PURE__ */ F("span", {
319
322
  className: "sr-only",
320
323
  children: [". ", d.detail]
321
324
  })
322
325
  ]
323
- }) : /* @__PURE__ */ F("span", {
326
+ }) : /* @__PURE__ */ P("span", {
324
327
  className: "text-xs text-text-tertiary",
325
328
  title: d.detail,
326
329
  children: d.label
327
330
  }))
328
331
  ]
329
332
  }),
330
- a && /* @__PURE__ */ F(W, {
333
+ a && /* @__PURE__ */ P(U, {
331
334
  suggestion: a,
332
335
  busy: c.busy,
333
336
  onAccept: c.onAccept,
@@ -335,121 +338,123 @@ function _e({ segment: e, category: r, projectName: i, suggestion: a, recategori
335
338
  })
336
339
  ]
337
340
  }),
338
- /* @__PURE__ */ I("div", {
341
+ /* @__PURE__ */ F("div", {
339
342
  className: "flex shrink-0 flex-col items-end gap-1.5",
340
343
  children: [
341
- e.isRecategorizable && /* @__PURE__ */ F("select", {
344
+ e.isRecategorizable && /* @__PURE__ */ P("select", {
342
345
  "aria-label": "Recategorize activity",
343
346
  disabled: o,
344
347
  value: r,
345
348
  onChange: (t) => s(e, t.target.value),
346
349
  className: "rounded-md border border-border-seam bg-bg-surface px-2 py-1 text-xs text-text-secondary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40",
347
- children: U.map((e) => /* @__PURE__ */ F("option", {
350
+ children: H.map((e) => /* @__PURE__ */ P("option", {
348
351
  value: e,
349
- children: V[e].label
352
+ children: B[e].label
350
353
  }, e))
351
354
  }),
352
- f && c.projects.length > 0 && /* @__PURE__ */ I("select", {
355
+ f && c.projects.length > 0 && /* @__PURE__ */ F("select", {
353
356
  "aria-label": "Assign project",
354
357
  disabled: c.busy,
355
358
  value: e.projectId ?? "",
356
359
  onChange: (t) => c.onSetProject(e, t.target.value || null),
357
360
  className: "max-w-[10rem] rounded-md border border-border-seam bg-bg-surface px-2 py-1 text-xs text-text-secondary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40",
358
- children: [/* @__PURE__ */ F("option", {
361
+ children: [/* @__PURE__ */ P("option", {
359
362
  value: "",
360
363
  children: "No project"
361
- }), c.projects.map((e) => /* @__PURE__ */ F("option", {
364
+ }), c.projects.map((e) => /* @__PURE__ */ P("option", {
362
365
  value: e.id,
363
366
  children: e.name
364
367
  }, e.id))]
365
368
  }),
366
- p && /* @__PURE__ */ I("button", {
369
+ ee && /* @__PURE__ */ F("button", {
367
370
  type: "button",
368
371
  disabled: c.busy,
369
372
  onClick: () => c.onSuggest(e),
370
373
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-50",
371
- children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Suggest project"]
374
+ children: [/* @__PURE__ */ P(A, { className: "h-3 w-3" }), "Suggest project"]
372
375
  })
373
376
  ]
374
377
  })
375
378
  ]
376
379
  });
377
380
  }
378
- function G(e) {
381
+ function W(e) {
379
382
  return e instanceof Error ? e.message : "Something went wrong";
380
383
  }
381
- function K(e) {
384
+ function G(e) {
382
385
  let t = e.getTimezoneOffset();
383
386
  return (/* @__PURE__ */ new Date(e.getTime() - t * 60 * 1e3)).toISOString().slice(0, 10);
384
387
  }
385
- var q = 14;
386
- function ve() {
388
+ var K = 14;
389
+ function q() {
387
390
  let e = /* @__PURE__ */ new Date();
388
- return e.setDate(e.getDate() + q), K(e);
391
+ return e.setDate(e.getDate() + K), G(e);
389
392
  }
390
- function ye(e) {
393
+ function xe(e) {
391
394
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
392
395
  return {
393
396
  from: t.toISOString(),
394
397
  to: n.toISOString()
395
398
  };
396
399
  }
397
- function be() {
398
- let { workspaceId: m = "" } = e(), { toasts: g, addToast: _, dismissToast: v } = te(), [y] = ce(), [b, w] = ae(() => {
399
- let e = h(y.get("date"));
400
- return e !== null && e <= ve() ? e : K(/* @__PURE__ */ new Date());
401
- }), [E, D] = ae(null), { from: se, to: k } = x(() => ye(b), [b]), { data: A, loading: M, error: N, refetch: R } = s({
400
+ function Se() {
401
+ let { workspaceId: g = "" } = e(), { toasts: ie, addToast: _, dismissToast: ae } = h(), [v] = de(), [y, w] = x(() => {
402
+ let e = ne(v.get("date"));
403
+ return e !== null && e <= q() ? e : G(/* @__PURE__ */ new Date());
404
+ }), [E, D] = x(null), { from: le, to: O } = b(() => xe(y), [y]), { data: k, loading: j, error: M, refetch: L } = s({
402
405
  variables: {
403
- from: se,
404
- to: k
406
+ from: le,
407
+ to: O
405
408
  },
406
- skip: !m,
409
+ skip: !g,
407
410
  fetchPolicy: "cache-and-network"
408
- }), { data: z } = c({
411
+ }), { data: R } = c({
409
412
  variables: { pagination: { limit: 200 } },
410
- skip: !m
411
- }), [H, { loading: W }] = l(), [q, { loading: be }] = o(), [xe, { loading: Se }] = u(), [Ce, { loading: we }] = d(), [Te, { loading: Ee }] = f(), De = be || Se || we || Ee, Oe = pe(B(fe, { activationConstraint: { distance: 6 } }), B(de)), J = A?.timeCampusTimeline, Y = x(() => J?.segments ?? [], [J]), X = J?.summary, Z = x(() => {
413
+ skip: !g
414
+ }), [V, { loading: U }] = l(), [K, { loading: Se }] = o(), [Ce, { loading: we }] = u(), [Te, { loading: Ee }] = d(), [De, { loading: Oe }] = f(), ke = Se || we || Ee || Oe, Ae = ge(z(he, { activationConstraint: { distance: 6 } }), z(me)), J = k?.timeCampusTimeline, Y = b(() => J?.segments ?? [], [J]);
415
+ ee(!j && !!J, Y.length > 0);
416
+ let X = J?.summary, Z = b(() => {
412
417
  let e = /* @__PURE__ */ new Map();
413
- for (let t of z?.projects?.items ?? []) e.set(t.id, t.name);
418
+ for (let t of R?.projects?.items ?? []) e.set(t.id, t.name);
414
419
  return e;
415
- }, [z?.projects?.items]), ke = x(() => Array.from(Z, ([e, t]) => ({
420
+ }, [R?.projects?.items]), je = b(() => Array.from(Z, ([e, t]) => ({
416
421
  id: e,
417
422
  name: t
418
- })), [Z]), Q = x(() => ie(Y, Z), [Y, Z]), Ae = x(() => {
423
+ })), [Z]), Q = b(() => se(Y, Z), [Y, Z]), Me = b(() => {
419
424
  let e = /* @__PURE__ */ new Map();
420
425
  for (let t of X?.byCategory ?? []) e.set(t.category, {
421
426
  totalSeconds: t.totalSeconds,
422
427
  segmentCount: t.segmentCount
423
428
  });
424
429
  return e;
425
- }, [X]), je = async (e, t) => {
426
- !e.isRecategorizable || e.category === t || (await H({ variables: {
430
+ }, [X]), Ne = async (e, t) => {
431
+ !e.isRecategorizable || e.category === t || (await V({ variables: {
427
432
  id: e.sourceId,
428
433
  category: t
429
- } }), await R());
434
+ } }), await L());
430
435
  }, $ = async (e, t) => {
431
436
  try {
432
- await e(), await R(), _({
437
+ await e(), await L(), _({
433
438
  title: t,
434
439
  variant: "success"
435
440
  });
436
441
  } catch (e) {
437
442
  _({
438
- title: G(e),
443
+ title: W(e),
439
444
  variant: "error"
440
445
  });
441
446
  }
442
- }, Me = (e) => $(() => q({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), Ne = (e) => $(() => xe({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), Pe = (e, t) => {
447
+ }, Pe = (e) => $(() => K({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), Fe = (e) => $(() => Ce({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), Ie = (e, t) => {
443
448
  if ((e.projectId ?? null) === t) return;
444
449
  let n = t ? Z.get(t) : void 0;
445
- return $(() => Ce({ variables: {
450
+ return $(() => Te({ variables: {
446
451
  id: e.sourceId,
447
452
  projectId: t
448
453
  } }), n ? `Assigned to ${n}` : "Project removed");
449
- }, Fe = async (e) => {
454
+ }, Le = async (e) => {
450
455
  try {
451
- let t = (await Te({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
452
- await R(), _(t?.suggestedProjectId ? {
456
+ let t = (await De({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
457
+ await L(), _(t?.suggestedProjectId ? {
453
458
  title: `Suggested ${t.suggestedProjectName ?? "a project"}`,
454
459
  description: "Accept or dismiss it on the activity.",
455
460
  variant: "info"
@@ -460,14 +465,14 @@ function be() {
460
465
  });
461
466
  } catch (e) {
462
467
  _({
463
- title: G(e),
468
+ title: W(e),
464
469
  variant: "error"
465
470
  });
466
471
  }
467
- }, Ie = async () => {
472
+ }, Re = async () => {
468
473
  let e = 0;
469
474
  try {
470
- for (let t of Q) await q({ variables: { id: t.captureEventId } }), e++;
475
+ for (let t of Q) await K({ variables: { id: t.captureEventId } }), e++;
471
476
  _({
472
477
  title: `Accepted ${e} project ${e === 1 ? "suggestion" : "suggestions"}`,
473
478
  variant: "success"
@@ -475,203 +480,207 @@ function be() {
475
480
  } catch (t) {
476
481
  _({
477
482
  title: `Accepted ${e} of ${Q.length}`,
478
- description: G(t),
483
+ description: W(t),
479
484
  variant: "error"
480
485
  });
481
486
  } finally {
482
- await R();
487
+ await L();
483
488
  }
484
- }, Le = {
485
- projects: ke,
486
- busy: De,
487
- onAccept: (e) => void Me(e),
488
- onReject: (e) => void Ne(e),
489
- onSetProject: (e, t) => void Pe(e, t),
490
- onSuggest: (e) => void Fe(e)
491
- }, Re = (e) => {
489
+ }, ze = {
490
+ projects: je,
491
+ busy: ke,
492
+ onAccept: (e) => void Pe(e),
493
+ onReject: (e) => void Fe(e),
494
+ onSetProject: (e, t) => void Ie(e, t),
495
+ onSuggest: (e) => void Le(e)
496
+ }, Be = (e) => {
492
497
  let t = e.active.data.current?.segment;
493
498
  D(t ?? null);
494
- }, ze = (e) => {
499
+ }, Ve = (e) => {
495
500
  let t = e.active.data.current?.segment;
496
501
  D(null);
497
502
  let n = e.over?.id;
498
503
  if (!t || typeof n != "string") return;
499
504
  let r = n.replace(/^category:/, "");
500
- U.includes(r) && je(t, r);
501
- }, Be = X && X.focusRatio != null ? Math.round(X.focusRatio * 100) : 0, Ve = X?.firstActivityAt && X?.lastActivityAt ? `${n(X.firstActivityAt)} – ${n(X.lastActivityAt)}` : null;
502
- return /* @__PURE__ */ I(p, {
505
+ H.includes(r) && Ne(t, r);
506
+ }, He = X && X.focusRatio != null ? Math.round(X.focusRatio * 100) : 0, Ue = X?.firstActivityAt && X?.lastActivityAt ? `${n(X.firstActivityAt)} – ${n(X.lastActivityAt)}` : null;
507
+ return /* @__PURE__ */ F(p, {
503
508
  title: "Timeline",
504
509
  description: "Your day, assembled automatically",
505
510
  purpose: "See where your time actually went — meetings, deep work, communication and breaks stitched into one honest, chronological view from everything TimeCampus captures, so you can spot the patterns worth changing.",
506
- actions: /* @__PURE__ */ I("div", {
511
+ actions: /* @__PURE__ */ F("div", {
507
512
  className: "flex flex-wrap items-center gap-3",
508
- children: [Ve && /* @__PURE__ */ I("span", {
513
+ children: [Ue && /* @__PURE__ */ F("span", {
509
514
  className: "inline-flex items-center gap-1.5 rounded-full bg-bg-sunken px-2.5 py-1 text-xs font-medium tabular-nums text-text-secondary",
510
- children: [/* @__PURE__ */ F(S, { className: "h-3.5 w-3.5" }), Ve]
511
- }), /* @__PURE__ */ I("label", {
515
+ children: [/* @__PURE__ */ P(S, { className: "h-3.5 w-3.5" }), Ue]
516
+ }), /* @__PURE__ */ F("label", {
512
517
  className: "flex items-center gap-2 text-sm text-text-secondary",
513
- children: [/* @__PURE__ */ F(oe, { className: "h-4 w-4" }), /* @__PURE__ */ F("input", {
518
+ children: [/* @__PURE__ */ P(ce, { className: "h-4 w-4" }), /* @__PURE__ */ P("input", {
514
519
  type: "date",
515
- value: b,
516
- max: ve(),
520
+ value: y,
521
+ max: q(),
517
522
  onChange: (e) => w(e.target.value),
518
523
  className: "rounded-md border border-border-seam bg-bg-surface px-3 py-1.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40"
519
524
  })]
520
525
  })]
521
526
  }),
522
- children: [M && !J ? /* @__PURE__ */ I("div", {
523
- className: "space-y-6",
524
- children: [/* @__PURE__ */ F(i, {
525
- variant: "card",
526
- count: 4
527
- }), /* @__PURE__ */ F(i, {
528
- variant: "list",
529
- count: 6
530
- })]
531
- }) : N ? /* @__PURE__ */ F("div", {
532
- className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
533
- children: "Failed to load your timeline. Please try again later."
534
- }) : /* @__PURE__ */ I(le, {
535
- sensors: Oe,
536
- onDragStart: Re,
537
- onDragEnd: ze,
538
- children: [/* @__PURE__ */ I("div", {
527
+ children: [
528
+ /* @__PURE__ */ P(te, { path: y === G(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${y}` }),
529
+ j && !J ? /* @__PURE__ */ F("div", {
539
530
  className: "space-y-6",
540
- children: [
541
- /* @__PURE__ */ I("div", {
542
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
543
- children: [
544
- /* @__PURE__ */ F(r, {
545
- featured: !0,
546
- title: "Tracked time",
547
- value: t(X?.totalTrackedSeconds ?? 0),
548
- icon: /* @__PURE__ */ F(S, { className: "h-5 w-5" }),
549
- description: "Total activity across the day"
550
- }),
551
- /* @__PURE__ */ F(r, {
552
- title: "Focus ratio",
553
- value: `${Be}%`,
554
- icon: /* @__PURE__ */ F(C, { className: "h-5 w-5" }),
555
- description: "Share of time in deep work"
556
- }),
557
- /* @__PURE__ */ F(r, {
558
- title: "Context switches",
559
- value: X?.contextSwitches ?? 0,
560
- icon: /* @__PURE__ */ F(P, { className: "h-5 w-5" }),
561
- description: "Category changes through the day"
562
- }),
563
- /* @__PURE__ */ F(r, {
564
- title: "Longest focus block",
565
- value: t(X?.longestFocusBlockSeconds ?? 0),
566
- icon: /* @__PURE__ */ F(C, { className: "h-5 w-5" }),
567
- description: "Your deepest uninterrupted stretch"
568
- })
569
- ]
570
- }),
571
- Y.length > 0 && /* @__PURE__ */ I(L, {
572
- treatment: "glass",
573
- className: "p-4 sm:p-6",
574
- children: [
575
- /* @__PURE__ */ F("h2", {
576
- className: "mb-1 text-sm font-semibold text-text-primary",
577
- children: "Where the time went"
578
- }),
579
- /* @__PURE__ */ F("p", {
580
- className: "mb-4 text-xs text-text-secondary",
581
- children: "Drag a segment from the timeline below onto a category to recategorize it — or use its dropdown."
582
- }),
583
- ne(Y) && /* @__PURE__ */ I("p", {
584
- className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
585
- "data-testid": "timeline-ai-disclaimer",
586
- children: [/* @__PURE__ */ F(j, {
587
- className: "mt-0.5 h-3 w-3 shrink-0",
588
- "aria-hidden": !0
589
- }), /* @__PURE__ */ I("span", { children: [
590
- "Some activities here were categorized by AI.",
591
- " ",
592
- "AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
593
- ] })]
594
- }),
595
- /* @__PURE__ */ F("div", {
596
- className: "flex flex-wrap gap-4",
597
- children: U.map((e) => {
598
- let t = V[e], n = Ae.get(e);
599
- return /* @__PURE__ */ F(ge, {
600
- category: e,
601
- label: t.label,
602
- dotClassName: t.dot,
603
- totalSeconds: n?.totalSeconds ?? 0
604
- }, e);
531
+ children: [/* @__PURE__ */ P(i, {
532
+ variant: "card",
533
+ count: 4
534
+ }), /* @__PURE__ */ P(i, {
535
+ variant: "list",
536
+ count: 6
537
+ })]
538
+ }) : M ? /* @__PURE__ */ P("div", {
539
+ className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
540
+ children: "Failed to load your timeline. Please try again later."
541
+ }) : /* @__PURE__ */ F(fe, {
542
+ sensors: Ae,
543
+ onDragStart: Be,
544
+ onDragEnd: Ve,
545
+ children: [/* @__PURE__ */ F("div", {
546
+ className: "space-y-6",
547
+ children: [
548
+ /* @__PURE__ */ F("div", {
549
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
550
+ children: [
551
+ /* @__PURE__ */ P(r, {
552
+ featured: !0,
553
+ title: "Tracked time",
554
+ value: t(X?.totalTrackedSeconds ?? 0),
555
+ icon: /* @__PURE__ */ P(S, { className: "h-5 w-5" }),
556
+ description: "Total activity across the day"
557
+ }),
558
+ /* @__PURE__ */ P(r, {
559
+ title: "Focus ratio",
560
+ value: `${He}%`,
561
+ icon: /* @__PURE__ */ P(C, { className: "h-5 w-5" }),
562
+ description: "Share of time in deep work"
563
+ }),
564
+ /* @__PURE__ */ P(r, {
565
+ title: "Context switches",
566
+ value: X?.contextSwitches ?? 0,
567
+ icon: /* @__PURE__ */ P(N, { className: "h-5 w-5" }),
568
+ description: "Category changes through the day"
569
+ }),
570
+ /* @__PURE__ */ P(r, {
571
+ title: "Longest focus block",
572
+ value: t(X?.longestFocusBlockSeconds ?? 0),
573
+ icon: /* @__PURE__ */ P(C, { className: "h-5 w-5" }),
574
+ description: "Your deepest uninterrupted stretch"
605
575
  })
576
+ ]
577
+ }),
578
+ Y.length > 0 && /* @__PURE__ */ F(I, {
579
+ treatment: "glass",
580
+ className: "p-4 sm:p-6",
581
+ children: [
582
+ /* @__PURE__ */ P("h2", {
583
+ className: "mb-1 text-sm font-semibold text-text-primary",
584
+ children: "Where the time went"
585
+ }),
586
+ /* @__PURE__ */ P("p", {
587
+ className: "mb-4 text-xs text-text-secondary",
588
+ children: "Drag a segment from the timeline below onto a category to recategorize it — or use its dropdown."
589
+ }),
590
+ re(Y) && /* @__PURE__ */ F("p", {
591
+ className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
592
+ "data-testid": "timeline-ai-disclaimer",
593
+ children: [/* @__PURE__ */ P(A, {
594
+ className: "mt-0.5 h-3 w-3 shrink-0",
595
+ "aria-hidden": !0
596
+ }), /* @__PURE__ */ F("span", { children: [
597
+ "Some activities here were categorized by AI.",
598
+ " ",
599
+ "AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
600
+ ] })]
601
+ }),
602
+ /* @__PURE__ */ P("div", {
603
+ className: "flex flex-wrap gap-4",
604
+ children: H.map((e) => {
605
+ let t = B[e], n = Me.get(e);
606
+ return /* @__PURE__ */ P(ye, {
607
+ category: e,
608
+ label: t.label,
609
+ dotClassName: t.dot,
610
+ totalSeconds: n?.totalSeconds ?? 0
611
+ }, e);
612
+ })
613
+ })
614
+ ]
615
+ }),
616
+ Q.length > 0 && /* @__PURE__ */ F("div", {
617
+ className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
618
+ "data-testid": "timeline-suggestions-banner",
619
+ children: [
620
+ /* @__PURE__ */ P(A, { className: "h-4 w-4 shrink-0 text-primary" }),
621
+ /* @__PURE__ */ F("p", {
622
+ className: "text-sm text-text-secondary",
623
+ children: [
624
+ /* @__PURE__ */ F("span", {
625
+ className: "font-medium text-text-primary",
626
+ children: [
627
+ Q.length,
628
+ " project",
629
+ " ",
630
+ Q.length === 1 ? "suggestion" : "suggestions"
631
+ ]
632
+ }),
633
+ " ",
634
+ "waiting for review. Nothing is assigned until you accept."
635
+ ]
636
+ }),
637
+ /* @__PURE__ */ F("button", {
638
+ type: "button",
639
+ disabled: ke,
640
+ onClick: () => void Re(),
641
+ className: "ml-auto inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
642
+ children: [/* @__PURE__ */ P(T, { className: "h-3.5 w-3.5" }), "Accept all"]
643
+ })
644
+ ]
645
+ }),
646
+ Y.length === 0 ? /* @__PURE__ */ P(a, {
647
+ illustration: "empty-generic",
648
+ title: "No activity captured for this day",
649
+ description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
650
+ }) : /* @__PURE__ */ P(I, {
651
+ treatment: "glass",
652
+ glow: !0,
653
+ className: "overflow-hidden",
654
+ children: /* @__PURE__ */ P("ol", {
655
+ className: "divide-y divide-border-seam",
656
+ children: Y.map((e) => _e(e) ? /* @__PURE__ */ P(ve, { segment: e }, e.id) : /* @__PURE__ */ P(be, {
657
+ segment: e,
658
+ category: e.category ?? "OTHER",
659
+ projectName: e.projectId ? Z.get(e.projectId) : void 0,
660
+ suggestion: oe(e, Z),
661
+ recategorizing: U,
662
+ onRecategorize: Ne,
663
+ projectActions: ze
664
+ }, e.id))
606
665
  })
607
- ]
608
- }),
609
- Q.length > 0 && /* @__PURE__ */ I("div", {
610
- className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
611
- "data-testid": "timeline-suggestions-banner",
612
- children: [
613
- /* @__PURE__ */ F(j, { className: "h-4 w-4 shrink-0 text-primary" }),
614
- /* @__PURE__ */ I("p", {
615
- className: "text-sm text-text-secondary",
616
- children: [
617
- /* @__PURE__ */ I("span", {
618
- className: "font-medium text-text-primary",
619
- children: [
620
- Q.length,
621
- " project",
622
- " ",
623
- Q.length === 1 ? "suggestion" : "suggestions"
624
- ]
625
- }),
626
- " ",
627
- "waiting for review. Nothing is assigned until you accept."
628
- ]
629
- }),
630
- /* @__PURE__ */ I("button", {
631
- type: "button",
632
- disabled: De,
633
- onClick: () => void Ie(),
634
- className: "ml-auto inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
635
- children: [/* @__PURE__ */ F(T, { className: "h-3.5 w-3.5" }), "Accept all"]
636
- })
637
- ]
638
- }),
639
- Y.length === 0 ? /* @__PURE__ */ F(a, {
640
- illustration: "empty-generic",
641
- title: "No activity captured for this day",
642
- description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
643
- }) : /* @__PURE__ */ F(L, {
644
- treatment: "glass",
645
- glow: !0,
646
- className: "overflow-hidden",
647
- children: /* @__PURE__ */ F("ol", {
648
- className: "divide-y divide-border-seam",
649
- children: Y.map((e) => me(e) ? /* @__PURE__ */ F(he, { segment: e }, e.id) : /* @__PURE__ */ F(_e, {
650
- segment: e,
651
- category: e.category ?? "OTHER",
652
- projectName: e.projectId ? Z.get(e.projectId) : void 0,
653
- suggestion: re(e, Z),
654
- recategorizing: W,
655
- onRecategorize: je,
656
- projectActions: Le
657
- }, e.id))
658
666
  })
659
- })
660
- ]
661
- }), /* @__PURE__ */ F(ue, { children: E && /* @__PURE__ */ I("div", {
662
- className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
663
- children: [/* @__PURE__ */ F(O, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ F("span", {
664
- className: "text-sm font-medium text-text-primary",
665
- children: E.title || V[E.category ?? "OTHER"].label
666
- })]
667
- }) })]
668
- }), /* @__PURE__ */ F(ee, {
669
- toasts: g,
670
- onDismiss: v
671
- })]
667
+ ]
668
+ }), /* @__PURE__ */ P(pe, { children: E && /* @__PURE__ */ F("div", {
669
+ className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
670
+ children: [/* @__PURE__ */ P(ue, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ P("span", {
671
+ className: "text-sm font-medium text-text-primary",
672
+ children: E.title || B[E.category ?? "OTHER"].label
673
+ })]
674
+ }) })]
675
+ }),
676
+ /* @__PURE__ */ P(m, {
677
+ toasts: ie,
678
+ onDismiss: ae
679
+ })
680
+ ]
672
681
  });
673
682
  }
674
683
  //#endregion
675
- export { be as TimelinePage };
684
+ export { Se as TimelinePage };
676
685
 
677
686
  //# sourceMappingURL=TimelinePage.js.map