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