@burdenoff/microfe-timecampus 2026.1206.1 → 2026.1206.2

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 (39) hide show
  1. package/dist/timecampus/components/DateFields.d.ts +53 -0
  2. package/dist/timecampus/components/DateFields.js +87 -0
  3. package/dist/timecampus/components/DateFields.js.map +1 -0
  4. package/dist/timecampus/components/dateFieldValues.d.ts +39 -0
  5. package/dist/timecampus/components/dateFieldValues.js +49 -0
  6. package/dist/timecampus/components/dateFieldValues.js.map +1 -0
  7. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js +112 -111
  8. package/dist/timecampus/pages/email-tracking/EmailTrackingPage.js.map +1 -1
  9. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +65 -65
  10. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  11. package/dist/timecampus/pages/focus/FocusProtectionPage.js +250 -253
  12. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  13. package/dist/timecampus/pages/invoicing/InvoicingPage.js +259 -258
  14. package/dist/timecampus/pages/invoicing/InvoicingPage.js.map +1 -1
  15. package/dist/timecampus/pages/lifetime/FiniteLifePage.js +103 -103
  16. package/dist/timecampus/pages/lifetime/FiniteLifePage.js.map +1 -1
  17. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +38 -38
  18. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  19. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +218 -216
  20. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  21. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +64 -63
  22. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  23. package/dist/timecampus/pages/meetings/MeetingCreatePage.js +54 -54
  24. package/dist/timecampus/pages/meetings/MeetingCreatePage.js.map +1 -1
  25. package/dist/timecampus/pages/meetings/MeetingFormModal.js +98 -96
  26. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  27. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +150 -149
  28. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  29. package/dist/timecampus/pages/projects/TasksPage.js +183 -182
  30. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  31. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +346 -351
  32. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  33. package/dist/timecampus/pages/time/TimeEntriesPage.js +129 -127
  34. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  35. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +46 -47
  36. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  37. package/dist/timecampus/pages/timeline/TimelinePage.js +231 -231
  38. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  39. package/package.json +1 -1
@@ -15,95 +15,96 @@ import { parseTimelineDateParam as oe } from "../lifetime/recommendationEvidence
15
15
  import { useTimeCampus as se } from "../../providers/TimeCampusProvider.js";
16
16
  import { useAcceptTimeCampusCaptureEventSuggestionMutation as ce, useGetTimeCampusTimelineQuery as le, useListProjectsQuery as ue, useMergeTimeCampusCaptureEventsMutation as de, useRecategorizeTimeCampusCaptureEventMutation as fe, useRejectTimeCampusCaptureEventSuggestionMutation as pe, useSetTimeCampusCaptureEventProjectMutation as me, useSplitTimeCampusCaptureEventMutation as he, useSuggestTimeCampusCaptureEventProjectMutation as ge } from "../../../generated/wspace-operations.js";
17
17
  import "../../analytics/index.js";
18
- import { useMemo as S, useState as C } from "react";
19
- import { Activity as w, BadgeCheck as _e, Brain as T, Calendar as ve, CalendarClock as E, Check as ye, Coffee as be, FolderOpen as D, Github as O, GripVertical as xe, Merge as k, MessageSquare as A, Scissors as j, Shield as M, Sparkles as N, Users as P, X as Se, Zap as Ce } from "lucide-react";
20
- import { useSearchParams as we } from "react-router";
21
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
22
- import { GlassCard as L, ThemedSelect as R } from "@burdenoff/fe-libs/ui";
23
- import { DndContext as Te, DragOverlay as Ee, KeyboardSensor as De, PointerSensor as Oe, useDraggable as ke, useDroppable as z, useSensor as Ae, useSensors as je } from "@dnd-kit/core";
18
+ import { DateField as _e, TimeField as S } from "../../components/DateFields.js";
19
+ import { useMemo as C, useState as w } from "react";
20
+ import { Activity as T, BadgeCheck as ve, Brain as E, CalendarClock as D, Check as ye, Coffee as O, FolderOpen as k, Github as A, GripVertical as be, Merge as j, MessageSquare as M, Scissors as N, Shield as P, Sparkles as F, Users as I, X as xe, Zap as Se } from "lucide-react";
21
+ import { useSearchParams as Ce } from "react-router";
22
+ import { jsx as L, jsxs as R } from "react/jsx-runtime";
23
+ import { GlassCard as z, ThemedSelect as B } from "@burdenoff/fe-libs/ui";
24
+ import { DndContext as we, DragOverlay as Te, KeyboardSensor as Ee, PointerSensor as De, useDraggable as Oe, useDroppable as V, useSensor as ke, useSensors as Ae } from "@dnd-kit/core";
24
25
  // src/timecampus/pages/timeline/TimelinePage.tsx
25
- var B = {
26
+ var H = {
26
27
  DEEP_WORK: {
27
28
  label: "Deep work",
28
- icon: T,
29
+ icon: E,
29
30
  dot: "bg-status-success-bg",
30
31
  chip: "bg-status-success-bgSubtle text-status-success-text"
31
32
  },
32
33
  MEETING: {
33
34
  label: "Meeting",
34
- icon: P,
35
+ icon: I,
35
36
  dot: "bg-status-info-bg",
36
37
  chip: "bg-status-info-bgSubtle text-status-info-text"
37
38
  },
38
39
  COMMUNICATION: {
39
40
  label: "Communication",
40
- icon: A,
41
+ icon: M,
41
42
  dot: "bg-status-warning-bg",
42
43
  chip: "bg-status-warning-bgSubtle text-status-warning-text"
43
44
  },
44
45
  BREAK: {
45
46
  label: "Break",
46
- icon: be,
47
+ icon: O,
47
48
  dot: "bg-bg-sunken",
48
49
  chip: "bg-bg-sunken text-text-secondary"
49
50
  },
50
51
  OTHER: {
51
52
  label: "Other",
52
- icon: w,
53
+ icon: T,
53
54
  dot: "bg-bg-sunken",
54
55
  chip: "bg-bg-sunken text-text-secondary"
55
56
  }
56
- }, Me = {
57
- TIME_ENTRY: Ce,
58
- MEETING: P,
59
- POMODORO: T,
60
- EMAIL: A,
61
- CAPTURE: O,
62
- FOCUS_SESSION: M,
63
- FOCUS_BLOCK: E
57
+ }, U = {
58
+ TIME_ENTRY: Se,
59
+ MEETING: I,
60
+ POMODORO: E,
61
+ EMAIL: M,
62
+ CAPTURE: A,
63
+ FOCUS_SESSION: P,
64
+ FOCUS_BLOCK: D
64
65
  };
65
- function Ne(e) {
66
+ function je(e) {
66
67
  return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
67
68
  }
68
- function Pe({ segment: e }) {
69
+ function Me({ segment: e }) {
69
70
  let t = e.focus;
70
71
  if (!t) return null;
71
- let n = e.isPlanned, r = n ? E : M, i = p(n, t, e.endTime), a = n ? null : h(t), o = n ? null : m(e.startTime, e.endTime, t), s = u(t.calendarHoldStatus);
72
- return /* @__PURE__ */ I("li", {
72
+ let n = e.isPlanned, r = n ? D : P, i = p(n, t, e.endTime), a = n ? null : h(t), o = n ? null : m(e.startTime, e.endTime, t), s = u(t.calendarHoldStatus);
73
+ return /* @__PURE__ */ R("li", {
73
74
  className: `flex items-start gap-3 p-4 ${n ? "bg-bg-sunken/30" : ""}`,
74
75
  "data-testid": n ? "timeline-focus-block" : "timeline-focus-session",
75
76
  children: [
76
- /* @__PURE__ */ I("div", {
77
+ /* @__PURE__ */ R("div", {
77
78
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
78
- children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
79
+ children: [/* @__PURE__ */ L("span", { children: l(e.startTime) }), /* @__PURE__ */ L("span", {
79
80
  className: "text-text-tertiary",
80
81
  children: c(e.durationSeconds)
81
82
  })]
82
83
  }),
83
- /* @__PURE__ */ F("div", {
84
+ /* @__PURE__ */ L("div", {
84
85
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${n ? "border border-dashed border-status-success-text/60 text-status-success-text" : "bg-status-success-bgSubtle text-status-success-text"}`,
85
- children: /* @__PURE__ */ F(r, { className: "h-4 w-4" })
86
+ children: /* @__PURE__ */ L(r, { className: "h-4 w-4" })
86
87
  }),
87
- /* @__PURE__ */ I("div", {
88
+ /* @__PURE__ */ R("div", {
88
89
  className: "min-w-0 flex-1",
89
90
  children: [
90
- /* @__PURE__ */ F("p", {
91
+ /* @__PURE__ */ L("p", {
91
92
  className: "truncate text-sm font-medium text-text-primary",
92
93
  children: e.title || (n ? "Planned focus block" : "Focus session")
93
94
  }),
94
- /* @__PURE__ */ I("div", {
95
+ /* @__PURE__ */ R("div", {
95
96
  className: "mt-1 flex flex-wrap items-center gap-2",
96
97
  children: [
97
- /* @__PURE__ */ F("span", {
98
+ /* @__PURE__ */ L("span", {
98
99
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${n ? "border border-dashed border-border-seam text-text-secondary" : "bg-status-success-bgSubtle text-status-success-text"}`,
99
100
  "data-testid": "timeline-focus-status",
100
101
  children: i
101
102
  }),
102
- t.protectionLevel === "STRICT" && /* @__PURE__ */ F("span", {
103
+ t.protectionLevel === "STRICT" && /* @__PURE__ */ L("span", {
103
104
  className: "text-xs text-text-secondary",
104
105
  children: "Strict"
105
106
  }),
106
- t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */ I("span", {
107
+ t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */ R("span", {
107
108
  className: "text-xs tabular-nums text-text-secondary",
108
109
  children: [
109
110
  "Planned ",
@@ -113,7 +114,7 @@ function Pe({ segment: e }) {
113
114
  l(t.plannedEndTime)
114
115
  ]
115
116
  }),
116
- !n && e.endTime && /* @__PURE__ */ I("span", {
117
+ !n && e.endTime && /* @__PURE__ */ R("span", {
117
118
  className: "text-xs tabular-nums text-text-secondary",
118
119
  children: [
119
120
  "Actual ",
@@ -123,7 +124,7 @@ function Pe({ segment: e }) {
123
124
  l(e.endTime)
124
125
  ]
125
126
  }),
126
- o && /* @__PURE__ */ I("span", {
127
+ o && /* @__PURE__ */ R("span", {
127
128
  className: "text-xs text-text-tertiary",
128
129
  children: [
129
130
  "Started ",
@@ -131,27 +132,27 @@ function Pe({ segment: e }) {
131
132
  o.endMinutes !== null && `, ended ${f(o.endMinutes, "over", "short")}`
132
133
  ]
133
134
  }),
134
- s && /* @__PURE__ */ F("span", {
135
+ s && /* @__PURE__ */ L("span", {
135
136
  className: "text-xs text-text-tertiary",
136
137
  children: s
137
138
  })
138
139
  ]
139
140
  }),
140
- !n && /* @__PURE__ */ I("div", {
141
+ !n && /* @__PURE__ */ R("div", {
141
142
  className: "mt-2",
142
143
  "data-testid": "timeline-focus-protection",
143
- children: [/* @__PURE__ */ I("div", {
144
+ children: [/* @__PURE__ */ R("div", {
144
145
  className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
145
146
  role: "img",
146
147
  "aria-label": `${a ?? 0}% of this session stayed protected`,
147
- children: [/* @__PURE__ */ F("span", {
148
+ children: [/* @__PURE__ */ L("span", {
148
149
  className: "h-full bg-status-success-text",
149
150
  style: { width: `${a ?? 0}%` }
150
- }), /* @__PURE__ */ F("span", {
151
+ }), /* @__PURE__ */ L("span", {
151
152
  className: "h-full bg-status-warning-text",
152
153
  style: { width: `${a === null ? 0 : 100 - a}%` }
153
154
  })]
154
- }), /* @__PURE__ */ I("p", {
155
+ }), /* @__PURE__ */ R("p", {
155
156
  className: "mt-1 text-xs tabular-nums text-text-secondary",
156
157
  children: [
157
158
  "Protected ",
@@ -168,7 +169,7 @@ function Pe({ segment: e }) {
168
169
  ]
169
170
  })]
170
171
  }),
171
- n && /* @__PURE__ */ F("p", {
172
+ n && /* @__PURE__ */ L("p", {
172
173
  className: "mt-1 text-xs text-text-tertiary",
173
174
  children: "Not counted in the day's totals until you run it."
174
175
  })
@@ -177,28 +178,28 @@ function Pe({ segment: e }) {
177
178
  ]
178
179
  });
179
180
  }
180
- var V = [
181
+ var W = [
181
182
  "DEEP_WORK",
182
183
  "MEETING",
183
184
  "COMMUNICATION",
184
185
  "BREAK",
185
186
  "OTHER"
186
187
  ];
187
- function H({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
188
- return /* @__PURE__ */ I("div", {
188
+ function Ne({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
189
+ return /* @__PURE__ */ R("div", {
189
190
  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",
190
191
  "data-testid": "timeline-project-suggestion",
191
192
  children: [
192
- /* @__PURE__ */ F(N, {
193
+ /* @__PURE__ */ L(F, {
193
194
  className: "h-3.5 w-3.5 shrink-0 text-primary",
194
195
  "aria-hidden": !0
195
196
  }),
196
- /* @__PURE__ */ I("span", {
197
+ /* @__PURE__ */ R("span", {
197
198
  className: "text-xs text-text-secondary",
198
199
  children: [
199
200
  "Suggested project",
200
201
  " ",
201
- /* @__PURE__ */ F("span", {
202
+ /* @__PURE__ */ L("span", {
202
203
  className: "font-medium text-text-primary",
203
204
  children: e.projectName
204
205
  }),
@@ -209,96 +210,95 @@ function H({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
209
210
  e.reason
210
211
  ]
211
212
  }),
212
- /* @__PURE__ */ I("span", {
213
+ /* @__PURE__ */ R("span", {
213
214
  className: "ms-auto flex items-center gap-1",
214
- children: [/* @__PURE__ */ I("button", {
215
+ children: [/* @__PURE__ */ R("button", {
215
216
  type: "button",
216
217
  disabled: t,
217
218
  onClick: () => n(e),
218
219
  "aria-label": `Accept project ${e.projectName}`,
219
220
  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",
220
- children: [/* @__PURE__ */ F(ye, { className: "h-3 w-3" }), "Accept"]
221
- }), /* @__PURE__ */ I("button", {
221
+ children: [/* @__PURE__ */ L(ye, { className: "h-3 w-3" }), "Accept"]
222
+ }), /* @__PURE__ */ R("button", {
222
223
  type: "button",
223
224
  disabled: t,
224
225
  onClick: () => r(e),
225
226
  "aria-label": `Dismiss suggested project ${e.projectName}`,
226
227
  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",
227
- children: [/* @__PURE__ */ F(Se, { className: "h-3 w-3" }), "Dismiss"]
228
+ children: [/* @__PURE__ */ L(xe, { className: "h-3 w-3" }), "Dismiss"]
228
229
  })]
229
230
  })
230
231
  ]
231
232
  });
232
233
  }
233
- function Fe({ category: e, label: t, dotClassName: n, totalSeconds: r }) {
234
- let { isOver: i, setNodeRef: a } = z({ id: y(e) });
235
- return /* @__PURE__ */ I("div", {
234
+ function Pe({ category: e, label: t, dotClassName: n, totalSeconds: r }) {
235
+ let { isOver: i, setNodeRef: a } = V({ id: y(e) });
236
+ return /* @__PURE__ */ R("div", {
236
237
  ref: a,
237
238
  className: `flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors ${i ? "border-action-primary-bg bg-action-primary-bg/10" : "border-border-seam bg-bg-surface"}`,
238
239
  children: [
239
- /* @__PURE__ */ F("span", {
240
+ /* @__PURE__ */ L("span", {
240
241
  className: `inline-block h-2.5 w-2.5 rounded-full ${n}`,
241
242
  "aria-hidden": !0
242
243
  }),
243
- /* @__PURE__ */ F("span", {
244
+ /* @__PURE__ */ L("span", {
244
245
  className: "text-sm font-medium text-text-primary",
245
246
  children: t
246
247
  }),
247
- /* @__PURE__ */ F("span", {
248
+ /* @__PURE__ */ L("span", {
248
249
  className: "text-sm tabular-nums text-text-secondary",
249
250
  children: c(r)
250
251
  }),
251
- i && /* @__PURE__ */ F("span", {
252
+ i && /* @__PURE__ */ L("span", {
252
253
  className: "text-xs font-medium text-primary",
253
254
  children: "Drop here"
254
255
  })
255
256
  ]
256
257
  });
257
258
  }
258
- var Ie = 5;
259
- function Le({ projectId: e, label: t }) {
260
- let { isOver: n, setNodeRef: r } = z({ id: x(e) });
261
- return /* @__PURE__ */ I("div", {
259
+ var Fe = 5;
260
+ function Ie({ projectId: e, label: t }) {
261
+ let { isOver: n, setNodeRef: r } = V({ id: x(e) });
262
+ return /* @__PURE__ */ R("div", {
262
263
  ref: r,
263
264
  "data-testid": "timeline-project-drop",
264
265
  className: `flex max-w-[14rem] items-center gap-1.5 rounded-lg border px-3 py-2 transition-colors ${n ? "border-action-primary-bg bg-action-primary-bg/10" : e ? "border-border-seam bg-bg-surface" : "border-dashed border-border-seam bg-bg-surface"}`,
265
266
  children: [
266
- /* @__PURE__ */ F(D, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
267
- /* @__PURE__ */ F("span", {
267
+ /* @__PURE__ */ L(k, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
268
+ /* @__PURE__ */ L("span", {
268
269
  className: "truncate text-sm font-medium text-text-primary",
269
270
  children: t
270
271
  }),
271
- n && /* @__PURE__ */ F("span", {
272
+ n && /* @__PURE__ */ L("span", {
272
273
  className: "shrink-0 text-xs font-medium text-primary",
273
274
  children: "Drop here"
274
275
  })
275
276
  ]
276
277
  });
277
278
  }
278
- function Re({ segment: e, busy: t, onSplit: n, onCancel: r }) {
279
- let [i, a] = C(() => b(e)), o = ae(e, i);
280
- return /* @__PURE__ */ I("form", {
279
+ function Le({ segment: e, busy: t, onSplit: n, onCancel: r }) {
280
+ let [i, a] = w(() => b(e)), o = ae(e, i);
281
+ return /* @__PURE__ */ R("form", {
281
282
  className: "mt-2 flex flex-wrap items-center gap-2 rounded-lg border border-border-seam bg-bg-sunken/40 px-2.5 py-1.5",
282
283
  "data-testid": "timeline-split-form",
283
284
  onSubmit: (e) => {
284
285
  e.preventDefault(), o.ok && n(o.at);
285
286
  },
286
287
  children: [
287
- /* @__PURE__ */ F(j, {
288
+ /* @__PURE__ */ L(N, {
288
289
  className: "h-3.5 w-3.5 shrink-0 text-text-tertiary",
289
290
  "aria-hidden": !0
290
291
  }),
291
- /* @__PURE__ */ I("label", {
292
+ /* @__PURE__ */ R("label", {
292
293
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
293
- children: ["Split at", /* @__PURE__ */ F("input", {
294
- type: "time",
294
+ children: ["Split at", /* @__PURE__ */ L(S, {
295
295
  value: i,
296
- onChange: (e) => a(e.target.value),
297
- "aria-label": "Split time",
298
- className: "rounded-md border border-border-seam bg-bg-surface px-2 py-0.5 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40"
296
+ onChange: a,
297
+ label: "Split time",
298
+ step: 5
299
299
  })]
300
300
  }),
301
- /* @__PURE__ */ I("span", {
301
+ /* @__PURE__ */ R("span", {
302
302
  className: "text-xs text-text-tertiary",
303
303
  children: [
304
304
  l(e.startTime),
@@ -307,19 +307,19 @@ function Re({ segment: e, busy: t, onSplit: n, onCancel: r }) {
307
307
  e.endTime ? l(e.endTime) : "now"
308
308
  ]
309
309
  }),
310
- !o.ok && /* @__PURE__ */ F("span", {
310
+ !o.ok && /* @__PURE__ */ L("span", {
311
311
  className: "text-xs text-status-error-text",
312
312
  role: "alert",
313
313
  children: o.reason
314
314
  }),
315
- /* @__PURE__ */ I("span", {
315
+ /* @__PURE__ */ R("span", {
316
316
  className: "ms-auto flex items-center gap-1",
317
- children: [/* @__PURE__ */ I("button", {
317
+ children: [/* @__PURE__ */ R("button", {
318
318
  type: "submit",
319
319
  disabled: t || !o.ok,
320
320
  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",
321
- children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
322
- }), /* @__PURE__ */ F("button", {
321
+ children: [/* @__PURE__ */ L(N, { className: "h-3 w-3" }), "Split"]
322
+ }), /* @__PURE__ */ L("button", {
323
323
  type: "button",
324
324
  onClick: r,
325
325
  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",
@@ -329,98 +329,98 @@ function Re({ segment: e, busy: t, onSplit: n, onCancel: r }) {
329
329
  ]
330
330
  });
331
331
  }
332
- function ze({ segment: e, category: t, projectName: n, suggestion: r, recategorizing: i, onRecategorize: a, projectActions: o, mergeTarget: s, editActions: u }) {
333
- let [d, f] = C(!1), p = B[t] ?? B.OTHER, m = ne(e), h = _(e), te = Me[e.source] ?? w, g = ee(e), v = e.source === "CAPTURE", y = v && !e.projectId && !r && o.projects.length > 0, { attributes: b, listeners: re, setNodeRef: ie, isDragging: x } = ke({
332
+ function Re({ segment: e, category: t, projectName: n, suggestion: r, recategorizing: i, onRecategorize: a, projectActions: o, mergeTarget: s, editActions: u }) {
333
+ let [d, f] = w(!1), p = H[t] ?? H.OTHER, m = ne(e), h = _(e), te = U[e.source] ?? T, g = ee(e), v = e.source === "CAPTURE", y = v && !e.projectId && !r && o.projects.length > 0, { attributes: b, listeners: re, setNodeRef: ie, isDragging: x } = Oe({
334
334
  id: e.id,
335
335
  data: { segment: e },
336
336
  disabled: !e.isRecategorizable
337
337
  });
338
- return /* @__PURE__ */ I("li", {
338
+ return /* @__PURE__ */ R("li", {
339
339
  ref: ie,
340
340
  className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${x ? "opacity-40" : ""}`,
341
341
  children: [
342
- /* @__PURE__ */ I("div", {
342
+ /* @__PURE__ */ R("div", {
343
343
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
344
- children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
344
+ children: [/* @__PURE__ */ L("span", { children: l(e.startTime) }), /* @__PURE__ */ L("span", {
345
345
  className: "text-text-tertiary",
346
346
  children: c(e.durationSeconds)
347
347
  })]
348
348
  }),
349
- e.isRecategorizable && /* @__PURE__ */ F("button", {
349
+ e.isRecategorizable && /* @__PURE__ */ L("button", {
350
350
  type: "button",
351
351
  "aria-label": `Drag ${e.title || p.label} onto a category or project`,
352
352
  className: "mt-1.5 shrink-0 cursor-grab touch-none text-text-tertiary hover:text-text-secondary active:cursor-grabbing",
353
353
  ...b,
354
354
  ...re,
355
- children: /* @__PURE__ */ F(xe, { className: "h-4 w-4" })
355
+ children: /* @__PURE__ */ L(be, { className: "h-4 w-4" })
356
356
  }),
357
- /* @__PURE__ */ F("div", {
357
+ /* @__PURE__ */ L("div", {
358
358
  className: `mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg ${p.chip}`,
359
- children: /* @__PURE__ */ F(te, { className: "h-4 w-4" })
359
+ children: /* @__PURE__ */ L(te, { className: "h-4 w-4" })
360
360
  }),
361
- /* @__PURE__ */ I("div", {
361
+ /* @__PURE__ */ R("div", {
362
362
  className: "min-w-0 flex-1",
363
363
  children: [
364
- /* @__PURE__ */ F("p", {
364
+ /* @__PURE__ */ L("p", {
365
365
  className: "truncate text-sm font-medium text-text-primary",
366
366
  children: e.title || p.label
367
367
  }),
368
- /* @__PURE__ */ I("div", {
368
+ /* @__PURE__ */ R("div", {
369
369
  className: "mt-1 flex flex-wrap items-center gap-2",
370
370
  children: [
371
- /* @__PURE__ */ F("span", {
371
+ /* @__PURE__ */ L("span", {
372
372
  className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${p.chip}`,
373
373
  children: p.label
374
374
  }),
375
- n !== void 0 && /* @__PURE__ */ I("span", {
375
+ n !== void 0 && /* @__PURE__ */ R("span", {
376
376
  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",
377
- children: [/* @__PURE__ */ F(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ F("span", {
377
+ children: [/* @__PURE__ */ L(k, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ L("span", {
378
378
  className: "truncate",
379
379
  children: n
380
380
  })]
381
381
  }),
382
- e.app && /* @__PURE__ */ F("span", {
382
+ e.app && /* @__PURE__ */ L("span", {
383
383
  className: "text-xs text-text-secondary",
384
384
  children: e.app
385
385
  }),
386
- g && (g.isAi ? /* @__PURE__ */ I("span", {
386
+ g && (g.isAi ? /* @__PURE__ */ R("span", {
387
387
  className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
388
388
  title: g.detail,
389
389
  "data-testid": "timeline-ai-provenance",
390
390
  children: [
391
- /* @__PURE__ */ F(N, {
391
+ /* @__PURE__ */ L(F, {
392
392
  className: "h-3 w-3 shrink-0",
393
393
  "aria-hidden": !0
394
394
  }),
395
395
  g.label,
396
- /* @__PURE__ */ I("span", {
396
+ /* @__PURE__ */ R("span", {
397
397
  className: "sr-only",
398
398
  children: [". ", g.detail]
399
399
  })
400
400
  ]
401
- }) : /* @__PURE__ */ F("span", {
401
+ }) : /* @__PURE__ */ L("span", {
402
402
  className: "text-xs text-text-tertiary",
403
403
  title: g.detail,
404
404
  children: g.label
405
405
  })),
406
- m && /* @__PURE__ */ I("button", {
406
+ m && /* @__PURE__ */ R("button", {
407
407
  type: "button",
408
408
  disabled: u.busy || i,
409
409
  onClick: () => u.onApprove(e),
410
410
  "aria-label": `Approve the AI category ${p.label} for ${e.title || "this activity"}`,
411
411
  "data-testid": "timeline-approve-category",
412
412
  className: "inline-flex items-center gap-1 rounded-full 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",
413
- children: [/* @__PURE__ */ F(_e, { className: "h-3 w-3" }), "Approve"]
413
+ children: [/* @__PURE__ */ L(ve, { className: "h-3 w-3" }), "Approve"]
414
414
  })
415
415
  ]
416
416
  }),
417
- r && /* @__PURE__ */ F(H, {
417
+ r && /* @__PURE__ */ L(Ne, {
418
418
  suggestion: r,
419
419
  busy: o.busy,
420
420
  onAccept: o.onAccept,
421
421
  onReject: o.onReject
422
422
  }),
423
- d && /* @__PURE__ */ F(Re, {
423
+ d && /* @__PURE__ */ L(Le, {
424
424
  segment: e,
425
425
  busy: u.busy,
426
426
  onSplit: (t) => {
@@ -430,58 +430,58 @@ function ze({ segment: e, category: t, projectName: n, suggestion: r, recategori
430
430
  })
431
431
  ]
432
432
  }),
433
- /* @__PURE__ */ I("div", {
433
+ /* @__PURE__ */ R("div", {
434
434
  className: "flex shrink-0 flex-col items-end gap-1.5",
435
435
  children: [
436
- e.isRecategorizable && /* @__PURE__ */ F(R, {
436
+ e.isRecategorizable && /* @__PURE__ */ L(B, {
437
437
  "aria-label": "Recategorize activity",
438
438
  disabled: i,
439
439
  value: t,
440
440
  onChange: (t) => a(e, t.target.value),
441
441
  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",
442
- children: V.map((e) => /* @__PURE__ */ F("option", {
442
+ children: W.map((e) => /* @__PURE__ */ L("option", {
443
443
  value: e,
444
- children: B[e].label
444
+ children: H[e].label
445
445
  }, e))
446
446
  }),
447
- v && o.projects.length > 0 && /* @__PURE__ */ I(R, {
447
+ v && o.projects.length > 0 && /* @__PURE__ */ R(B, {
448
448
  "aria-label": "Assign project",
449
449
  disabled: o.busy,
450
450
  value: e.projectId ?? "",
451
451
  onChange: (t) => o.onSetProject(e, t.target.value || null),
452
452
  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",
453
- children: [/* @__PURE__ */ F("option", {
453
+ children: [/* @__PURE__ */ L("option", {
454
454
  value: "",
455
455
  children: "No project"
456
- }), o.projects.map((e) => /* @__PURE__ */ F("option", {
456
+ }), o.projects.map((e) => /* @__PURE__ */ L("option", {
457
457
  value: e.id,
458
458
  children: e.name
459
459
  }, e.id))]
460
460
  }),
461
- y && /* @__PURE__ */ I("button", {
461
+ y && /* @__PURE__ */ R("button", {
462
462
  type: "button",
463
463
  disabled: o.busy,
464
464
  onClick: () => o.onSuggest(e),
465
465
  className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline disabled:opacity-50",
466
- children: [/* @__PURE__ */ F(N, { className: "h-3 w-3" }), "Suggest project"]
466
+ children: [/* @__PURE__ */ L(F, { className: "h-3 w-3" }), "Suggest project"]
467
467
  }),
468
- (s || h) && /* @__PURE__ */ I("span", {
468
+ (s || h) && /* @__PURE__ */ R("span", {
469
469
  className: "flex items-center gap-2",
470
- children: [s && /* @__PURE__ */ I("button", {
470
+ children: [s && /* @__PURE__ */ R("button", {
471
471
  type: "button",
472
472
  disabled: u.busy,
473
473
  onClick: () => u.onMerge(e, s),
474
474
  title: `Merge with ${s.title || "the next activity"} (${l(s.startTime)})`,
475
475
  "data-testid": "timeline-merge-next",
476
476
  className: "inline-flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary disabled:opacity-50",
477
- children: [/* @__PURE__ */ F(k, { className: "h-3 w-3" }), "Merge with next"]
478
- }), h && !d && /* @__PURE__ */ I("button", {
477
+ children: [/* @__PURE__ */ L(j, { className: "h-3 w-3" }), "Merge with next"]
478
+ }), h && !d && /* @__PURE__ */ R("button", {
479
479
  type: "button",
480
480
  disabled: u.busy,
481
481
  onClick: () => f(!0),
482
482
  "data-testid": "timeline-split",
483
483
  className: "inline-flex items-center gap-1 text-xs font-medium text-text-secondary hover:text-text-primary disabled:opacity-50",
484
- children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
484
+ children: [/* @__PURE__ */ L(N, { className: "h-3 w-3" }), "Split"]
485
485
  })]
486
486
  })
487
487
  ]
@@ -489,49 +489,49 @@ function ze({ segment: e, category: t, projectName: n, suggestion: r, recategori
489
489
  ]
490
490
  });
491
491
  }
492
- function U(e) {
492
+ function G(e) {
493
493
  return e instanceof Error ? e.message : "Something went wrong";
494
494
  }
495
- function W(e) {
495
+ function ze(e) {
496
496
  let t = e.getTimezoneOffset();
497
497
  return (/* @__PURE__ */ new Date(e.getTime() - t * 60 * 1e3)).toISOString().slice(0, 10);
498
498
  }
499
499
  var Be = 14;
500
- function G() {
500
+ function Ve() {
501
501
  let e = /* @__PURE__ */ new Date();
502
- return e.setDate(e.getDate() + Be), W(e);
502
+ return e.setDate(e.getDate() + Be), ze(e);
503
503
  }
504
- function Ve(e) {
504
+ function He(e) {
505
505
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
506
506
  return {
507
507
  from: t.toISOString(),
508
508
  to: n.toISOString()
509
509
  };
510
510
  }
511
- function He() {
512
- let { workspaceId: u = "" } = se(), { toasts: ee, addToast: f, dismissToast: p } = a(), [m] = we(), [h, ne] = C(() => {
511
+ function Ue() {
512
+ let { workspaceId: u = "" } = se(), { toasts: ee, addToast: f, dismissToast: p } = a(), [m] = Ce(), [h, ne] = w(() => {
513
513
  let e = oe(m.get("date"));
514
- return e !== null && e <= G() ? e : W(/* @__PURE__ */ new Date());
515
- }), [_, y] = C(null), { from: b, to: x } = S(() => Ve(h), [h]), { data: ae, loading: E, error: be, refetch: D } = le({
514
+ return e !== null && e <= Ve() ? e : ze(/* @__PURE__ */ new Date());
515
+ }), [_, y] = w(null), { from: b, to: x } = C(() => He(h), [h]), { data: ae, loading: S, error: D, refetch: O } = le({
516
516
  variables: {
517
517
  from: b,
518
518
  to: x
519
519
  },
520
520
  skip: !u,
521
521
  fetchPolicy: "cache-and-network"
522
- }), { data: O } = ue({
522
+ }), { data: k } = ue({
523
523
  variables: { pagination: { limit: 200 } },
524
524
  skip: !u
525
- }), [k, { loading: A }] = fe(), [j, { loading: M }] = ce(), [P, { loading: Se }] = pe(), [R, { loading: ke }] = me(), [z, { loading: Me }] = ge(), H = M || Se || ke || Me, [Re, { loading: Be }] = de(), [He, { loading: Ue }] = he(), [We, Ge] = C(!1), Ke = Be || Ue || We, qe = je(Ae(Oe, { activationConstraint: { distance: 6 } }), Ae(De)), K = ae?.timeCampusTimeline, q = S(() => K?.segments ?? [], [K]);
526
- s(!E && !!K, q.length > 0);
527
- let J = K?.summary, Y = S(() => {
525
+ }), [A, { loading: j }] = fe(), [M, { loading: N }] = ce(), [P, { loading: I }] = pe(), [xe, { loading: B }] = me(), [Oe, { loading: V }] = ge(), U = N || I || B || V, [Ne, { loading: Le }] = de(), [Be, { loading: Ue }] = he(), [We, Ge] = w(!1), Ke = Le || Ue || We, qe = Ae(ke(De, { activationConstraint: { distance: 6 } }), ke(Ee)), K = ae?.timeCampusTimeline, q = C(() => K?.segments ?? [], [K]);
526
+ s(!S && !!K, q.length > 0);
527
+ let J = K?.summary, Y = C(() => {
528
528
  let e = /* @__PURE__ */ new Map();
529
- for (let t of O?.projects?.items ?? []) e.set(t.id, t.name);
529
+ for (let t of k?.projects?.items ?? []) e.set(t.id, t.name);
530
530
  return e;
531
- }, [O?.projects?.items]), X = S(() => Array.from(Y, ([e, t]) => ({
531
+ }, [k?.projects?.items]), X = C(() => Array.from(Y, ([e, t]) => ({
532
532
  id: e,
533
533
  name: t
534
- })), [Y]), Z = S(() => g(q, Y), [q, Y]), Je = S(() => {
534
+ })), [Y]), Z = C(() => g(q, Y), [q, Y]), Je = C(() => {
535
535
  let e = /* @__PURE__ */ new Map();
536
536
  for (let t of J?.byCategory ?? []) e.set(t.category, {
537
537
  totalSeconds: t.totalSeconds,
@@ -540,25 +540,25 @@ function He() {
540
540
  return e;
541
541
  }, [J]), Ye = async (e, t) => {
542
542
  if (e.isRecategorizable && e.category !== t) try {
543
- await k({ variables: {
543
+ await A({ variables: {
544
544
  id: e.sourceId,
545
545
  category: t
546
- } }), await D(), f({
547
- title: `Moved to ${B[t].label}`,
546
+ } }), await O(), f({
547
+ title: `Moved to ${H[t].label}`,
548
548
  variant: "success"
549
549
  });
550
550
  } catch (e) {
551
551
  f({
552
- title: U(e),
552
+ title: G(e),
553
553
  variant: "error"
554
554
  });
555
555
  }
556
- }, Q = S(() => v(q), [q]), Xe = async (e) => {
556
+ }, Q = C(() => v(q), [q]), Xe = async (e) => {
557
557
  let t = 0, n = null;
558
558
  Ge(!0);
559
559
  try {
560
- for (let r = 0; r < e.length; r += Ie) {
561
- let i = await Promise.allSettled(e.slice(r, r + Ie).map((e) => k({ variables: {
560
+ for (let r = 0; r < e.length; r += Fe) {
561
+ let i = await Promise.allSettled(e.slice(r, r + Fe).map((e) => A({ variables: {
562
562
  id: e.sourceId,
563
563
  category: e.category
564
564
  } })));
@@ -569,40 +569,40 @@ function He() {
569
569
  variant: "success"
570
570
  } : {
571
571
  title: `Approved ${t} of ${e.length}`,
572
- description: U(n),
572
+ description: G(n),
573
573
  variant: "error"
574
574
  });
575
575
  } finally {
576
576
  Ge(!1);
577
577
  try {
578
- await D();
578
+ await O();
579
579
  } catch {}
580
580
  }
581
581
  }, Ze = async (e, t) => {
582
582
  try {
583
- await Re({ variables: { ids: [e.sourceId, t.sourceId] } }), await D(), f({
583
+ await Ne({ variables: { ids: [e.sourceId, t.sourceId] } }), await O(), f({
584
584
  title: "Activities merged",
585
585
  description: "Gaps between them are not counted as tracked time.",
586
586
  variant: "success"
587
587
  });
588
588
  } catch (e) {
589
589
  f({
590
- title: U(e),
590
+ title: G(e),
591
591
  variant: "error"
592
592
  });
593
593
  }
594
594
  }, Qe = async (e, t) => {
595
595
  try {
596
- await He({ variables: {
596
+ await Be({ variables: {
597
597
  id: e.sourceId,
598
598
  at: t.toISOString()
599
- } }), await D(), f({
599
+ } }), await O(), f({
600
600
  title: `Split at ${l(t.toISOString())}`,
601
601
  variant: "success"
602
602
  });
603
603
  } catch (e) {
604
604
  f({
605
- title: U(e),
605
+ title: G(e),
606
606
  variant: "error"
607
607
  });
608
608
  }
@@ -613,27 +613,27 @@ function He() {
613
613
  onApprove: (e) => void Xe([e])
614
614
  }, $ = async (e, t) => {
615
615
  try {
616
- await e(), await D(), f({
616
+ await e(), await O(), f({
617
617
  title: t,
618
618
  variant: "success"
619
619
  });
620
620
  } catch (e) {
621
621
  f({
622
- title: U(e),
622
+ title: G(e),
623
623
  variant: "error"
624
624
  });
625
625
  }
626
- }, et = (e) => $(() => j({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), tt = (e) => $(() => P({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), nt = (e, t) => {
626
+ }, et = (e) => $(() => M({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), tt = (e) => $(() => P({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), nt = (e, t) => {
627
627
  if ((e.projectId ?? null) === t) return;
628
628
  let n = t ? Y.get(t) : void 0;
629
- return $(() => R({ variables: {
629
+ return $(() => xe({ variables: {
630
630
  id: e.sourceId,
631
631
  projectId: t
632
632
  } }), n ? `Assigned to ${n}` : "Project removed");
633
633
  }, rt = async (e) => {
634
634
  try {
635
- let t = (await z({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
636
- await D(), f(t?.suggestedProjectId ? {
635
+ let t = (await Oe({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
636
+ await O(), f(t?.suggestedProjectId ? {
637
637
  title: `Suggested ${t.suggestedProjectName ?? "a project"}`,
638
638
  description: "Accept or dismiss it on the activity.",
639
639
  variant: "info"
@@ -644,14 +644,14 @@ function He() {
644
644
  });
645
645
  } catch (e) {
646
646
  f({
647
- title: U(e),
647
+ title: G(e),
648
648
  variant: "error"
649
649
  });
650
650
  }
651
651
  }, it = async () => {
652
652
  let e = 0;
653
653
  try {
654
- for (let t of Z) await j({ variables: { id: t.captureEventId } }), e++;
654
+ for (let t of Z) await M({ variables: { id: t.captureEventId } }), e++;
655
655
  f({
656
656
  title: `Accepted ${e} project ${e === 1 ? "suggestion" : "suggestions"}`,
657
657
  variant: "success"
@@ -659,15 +659,15 @@ function He() {
659
659
  } catch (t) {
660
660
  f({
661
661
  title: `Accepted ${e} of ${Z.length}`,
662
- description: U(t),
662
+ description: G(t),
663
663
  variant: "error"
664
664
  });
665
665
  } finally {
666
- await D();
666
+ await O();
667
667
  }
668
668
  }, at = {
669
669
  projects: X,
670
- busy: H,
670
+ busy: U,
671
671
  onAccept: (e) => void et(e),
672
672
  onReject: (e) => void tt(e),
673
673
  onSetProject: (e, t) => void nt(e, t),
@@ -678,109 +678,109 @@ function He() {
678
678
  }, st = (e) => {
679
679
  let t = e.active.data.current?.segment;
680
680
  y(null);
681
- let n = ie(e.over?.id, V);
681
+ let n = ie(e.over?.id, W);
682
682
  t && n && (n.kind === "category" ? Ye(t, n.category) : t.source === "CAPTURE" && nt(t, n.projectId));
683
683
  }, ct = q.some((e) => e.source === "CAPTURE" && e.isRecategorizable), lt = J && J.focusRatio != null ? Math.round(J.focusRatio * 100) : 0, ut = J?.firstActivityAt && J?.lastActivityAt ? `${l(J.firstActivityAt)} – ${l(J.lastActivityAt)}` : null;
684
- return /* @__PURE__ */ I(t, {
684
+ return /* @__PURE__ */ R(t, {
685
685
  title: "Timeline",
686
686
  description: "Your day, assembled automatically",
687
687
  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.",
688
- actions: /* @__PURE__ */ I("div", {
688
+ actions: /* @__PURE__ */ R("div", {
689
689
  className: "flex flex-wrap items-center gap-3",
690
- children: [ut && /* @__PURE__ */ I("span", {
690
+ children: [ut && /* @__PURE__ */ R("span", {
691
691
  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",
692
- children: [/* @__PURE__ */ F(w, { className: "h-3.5 w-3.5" }), ut]
693
- }), /* @__PURE__ */ I("label", {
692
+ children: [/* @__PURE__ */ L(T, { className: "h-3.5 w-3.5" }), ut]
693
+ }), /* @__PURE__ */ L("label", {
694
694
  className: "flex items-center gap-2 text-sm text-text-secondary",
695
- children: [/* @__PURE__ */ F(ve, { className: "h-4 w-4" }), /* @__PURE__ */ F("input", {
696
- type: "date",
695
+ children: /* @__PURE__ */ L(_e, {
697
696
  value: h,
698
- max: G(),
699
- onChange: (e) => ne(e.target.value),
700
- 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"
701
- })]
697
+ max: Ve(),
698
+ onChange: ne,
699
+ label: "Timeline day",
700
+ inline: !0
701
+ })
702
702
  })]
703
703
  }),
704
704
  children: [
705
- /* @__PURE__ */ F(e, { path: h === W(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${h}` }),
706
- E && !K ? /* @__PURE__ */ I("div", {
705
+ /* @__PURE__ */ L(e, { path: h === ze(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${h}` }),
706
+ S && !K ? /* @__PURE__ */ R("div", {
707
707
  className: "space-y-6",
708
- children: [/* @__PURE__ */ F(o, {
708
+ children: [/* @__PURE__ */ L(o, {
709
709
  variant: "card",
710
710
  count: 4
711
- }), /* @__PURE__ */ F(o, {
711
+ }), /* @__PURE__ */ L(o, {
712
712
  variant: "list",
713
713
  count: 6
714
714
  })]
715
- }) : be ? /* @__PURE__ */ F("div", {
715
+ }) : D ? /* @__PURE__ */ L("div", {
716
716
  className: "rounded-lg border border-status-error-border bg-status-error-bgSubtle p-4 text-sm text-status-error-text",
717
717
  children: "Failed to load your timeline. Please try again later."
718
- }) : /* @__PURE__ */ I(Te, {
718
+ }) : /* @__PURE__ */ R(we, {
719
719
  sensors: qe,
720
720
  onDragStart: ot,
721
721
  onDragEnd: st,
722
- children: [/* @__PURE__ */ I("div", {
722
+ children: [/* @__PURE__ */ R("div", {
723
723
  className: "space-y-6",
724
724
  children: [
725
- /* @__PURE__ */ I("div", {
725
+ /* @__PURE__ */ R("div", {
726
726
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
727
727
  children: [
728
- /* @__PURE__ */ F(n, {
728
+ /* @__PURE__ */ L(n, {
729
729
  featured: !0,
730
730
  title: "Tracked time",
731
731
  value: c(J?.totalTrackedSeconds ?? 0),
732
- icon: /* @__PURE__ */ F(w, { className: "h-5 w-5" }),
732
+ icon: /* @__PURE__ */ L(T, { className: "h-5 w-5" }),
733
733
  description: "Total activity across the day"
734
734
  }),
735
- /* @__PURE__ */ F(n, {
735
+ /* @__PURE__ */ L(n, {
736
736
  title: "Focus ratio",
737
737
  value: `${lt}%`,
738
- icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
738
+ icon: /* @__PURE__ */ L(E, { className: "h-5 w-5" }),
739
739
  description: "Share of time in deep work"
740
740
  }),
741
- /* @__PURE__ */ F(n, {
741
+ /* @__PURE__ */ L(n, {
742
742
  title: "Context switches",
743
743
  value: J?.contextSwitches ?? 0,
744
- icon: /* @__PURE__ */ F(Ce, { className: "h-5 w-5" }),
744
+ icon: /* @__PURE__ */ L(Se, { className: "h-5 w-5" }),
745
745
  description: "Category changes through the day"
746
746
  }),
747
- /* @__PURE__ */ F(n, {
747
+ /* @__PURE__ */ L(n, {
748
748
  title: "Longest focus block",
749
749
  value: c(J?.longestFocusBlockSeconds ?? 0),
750
- icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
750
+ icon: /* @__PURE__ */ L(E, { className: "h-5 w-5" }),
751
751
  description: "Your deepest uninterrupted stretch"
752
752
  })
753
753
  ]
754
754
  }),
755
- q.length > 0 && /* @__PURE__ */ I(L, {
755
+ q.length > 0 && /* @__PURE__ */ R(z, {
756
756
  treatment: "glass",
757
757
  className: "p-4 sm:p-6",
758
758
  children: [
759
- /* @__PURE__ */ F("h2", {
759
+ /* @__PURE__ */ L("h2", {
760
760
  className: "mb-1 text-sm font-semibold text-text-primary",
761
761
  children: "Where the time went"
762
762
  }),
763
- /* @__PURE__ */ F("p", {
763
+ /* @__PURE__ */ L("p", {
764
764
  className: "mb-4 text-xs text-text-secondary",
765
765
  children: "Drag a segment from the timeline below onto a category to recategorize it, or onto a project to assign it — or use its dropdowns."
766
766
  }),
767
- d(q) && /* @__PURE__ */ I("p", {
767
+ d(q) && /* @__PURE__ */ R("p", {
768
768
  className: "mb-4 flex items-start gap-1.5 text-xs text-text-secondary",
769
769
  "data-testid": "timeline-ai-disclaimer",
770
- children: [/* @__PURE__ */ F(N, {
770
+ children: [/* @__PURE__ */ L(F, {
771
771
  className: "mt-0.5 h-3 w-3 shrink-0",
772
772
  "aria-hidden": !0
773
- }), /* @__PURE__ */ I("span", { children: [
773
+ }), /* @__PURE__ */ R("span", { children: [
774
774
  "Some activities here were categorized by AI.",
775
775
  " ",
776
776
  "AI can get this wrong. Pick another category to correct it, and TimeCampus will use your choice for this app from now on."
777
777
  ] })]
778
778
  }),
779
- /* @__PURE__ */ F("div", {
779
+ /* @__PURE__ */ L("div", {
780
780
  className: "flex flex-wrap gap-4",
781
- children: V.map((e) => {
782
- let t = B[e], n = Je.get(e);
783
- return /* @__PURE__ */ F(Fe, {
781
+ children: W.map((e) => {
782
+ let t = H[e], n = Je.get(e);
783
+ return /* @__PURE__ */ L(Pe, {
784
784
  category: e,
785
785
  label: t.label,
786
786
  dotClassName: t.dot,
@@ -790,39 +790,39 @@ function He() {
790
790
  })
791
791
  ]
792
792
  }),
793
- ct && X.length > 0 && /* @__PURE__ */ I(L, {
793
+ ct && X.length > 0 && /* @__PURE__ */ R(z, {
794
794
  treatment: "glass",
795
795
  className: "p-4 sm:p-6",
796
796
  children: [
797
- /* @__PURE__ */ F("h2", {
797
+ /* @__PURE__ */ L("h2", {
798
798
  className: "mb-1 text-sm font-semibold text-text-primary",
799
799
  children: "Assign to a project"
800
800
  }),
801
- /* @__PURE__ */ F("p", {
801
+ /* @__PURE__ */ L("p", {
802
802
  className: "mb-4 text-xs text-text-secondary",
803
803
  children: "Drag a captured activity onto a project to assign it."
804
804
  }),
805
- /* @__PURE__ */ I("div", {
805
+ /* @__PURE__ */ R("div", {
806
806
  className: "flex flex-wrap gap-3",
807
- children: [X.map((e) => /* @__PURE__ */ F(Le, {
807
+ children: [X.map((e) => /* @__PURE__ */ L(Ie, {
808
808
  projectId: e.id,
809
809
  label: e.name
810
- }, e.id)), /* @__PURE__ */ F(Le, {
810
+ }, e.id)), /* @__PURE__ */ L(Ie, {
811
811
  projectId: null,
812
812
  label: "No project"
813
813
  })]
814
814
  })
815
815
  ]
816
816
  }),
817
- Q.length > 0 && /* @__PURE__ */ I("div", {
817
+ Q.length > 0 && /* @__PURE__ */ R("div", {
818
818
  className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
819
819
  "data-testid": "timeline-approval-banner",
820
820
  children: [
821
- /* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
822
- /* @__PURE__ */ I("p", {
821
+ /* @__PURE__ */ L(F, { className: "h-4 w-4 shrink-0 text-primary" }),
822
+ /* @__PURE__ */ R("p", {
823
823
  className: "text-sm text-text-secondary",
824
824
  children: [
825
- /* @__PURE__ */ I("span", {
825
+ /* @__PURE__ */ R("span", {
826
826
  className: "font-medium text-text-primary",
827
827
  children: [
828
828
  Q.length,
@@ -836,24 +836,24 @@ function He() {
836
836
  "Approve them as they are, or drag one onto another category to correct it."
837
837
  ]
838
838
  }),
839
- /* @__PURE__ */ I("button", {
839
+ /* @__PURE__ */ R("button", {
840
840
  type: "button",
841
- disabled: Ke || A,
841
+ disabled: Ke || j,
842
842
  onClick: () => void Xe(Q),
843
843
  className: "ms-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",
844
- children: [/* @__PURE__ */ F(_e, { className: "h-3.5 w-3.5" }), "Approve all"]
844
+ children: [/* @__PURE__ */ L(ve, { className: "h-3.5 w-3.5" }), "Approve all"]
845
845
  })
846
846
  ]
847
847
  }),
848
- Z.length > 0 && /* @__PURE__ */ I("div", {
848
+ Z.length > 0 && /* @__PURE__ */ R("div", {
849
849
  className: "flex flex-wrap items-center gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3",
850
850
  "data-testid": "timeline-suggestions-banner",
851
851
  children: [
852
- /* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
853
- /* @__PURE__ */ I("p", {
852
+ /* @__PURE__ */ L(F, { className: "h-4 w-4 shrink-0 text-primary" }),
853
+ /* @__PURE__ */ R("p", {
854
854
  className: "text-sm text-text-secondary",
855
855
  children: [
856
- /* @__PURE__ */ I("span", {
856
+ /* @__PURE__ */ R("span", {
857
857
  className: "font-medium text-text-primary",
858
858
  children: [
859
859
  Z.length,
@@ -866,31 +866,31 @@ function He() {
866
866
  "waiting for review. Nothing is assigned until you accept."
867
867
  ]
868
868
  }),
869
- /* @__PURE__ */ I("button", {
869
+ /* @__PURE__ */ R("button", {
870
870
  type: "button",
871
- disabled: H,
871
+ disabled: U,
872
872
  onClick: () => void it(),
873
873
  className: "ms-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",
874
- children: [/* @__PURE__ */ F(ye, { className: "h-3.5 w-3.5" }), "Accept all"]
874
+ children: [/* @__PURE__ */ L(ye, { className: "h-3.5 w-3.5" }), "Accept all"]
875
875
  })
876
876
  ]
877
877
  }),
878
- q.length === 0 ? /* @__PURE__ */ F(r, {
878
+ q.length === 0 ? /* @__PURE__ */ L(r, {
879
879
  illustration: "empty-generic",
880
880
  title: "No activity captured for this day",
881
881
  description: "As you track time, hold meetings, run focus sessions, and connect shared integrations, your day assembles here automatically — categorized and in order."
882
- }) : /* @__PURE__ */ F(L, {
882
+ }) : /* @__PURE__ */ L(z, {
883
883
  treatment: "glass",
884
884
  glow: !0,
885
885
  className: "overflow-hidden",
886
- children: /* @__PURE__ */ F("ol", {
886
+ children: /* @__PURE__ */ L("ol", {
887
887
  className: "divide-y divide-border-seam",
888
- children: q.map((e, t) => Ne(e) ? /* @__PURE__ */ F(Pe, { segment: e }, e.id) : /* @__PURE__ */ F(ze, {
888
+ children: q.map((e, t) => je(e) ? /* @__PURE__ */ L(Me, { segment: e }, e.id) : /* @__PURE__ */ L(Re, {
889
889
  segment: e,
890
890
  category: e.category ?? "OTHER",
891
891
  projectName: e.projectId ? Y.get(e.projectId) : void 0,
892
892
  suggestion: te(e, Y),
893
- recategorizing: A,
893
+ recategorizing: j,
894
894
  onRecategorize: Ye,
895
895
  projectActions: at,
896
896
  mergeTarget: re(q, t),
@@ -899,21 +899,21 @@ function He() {
899
899
  })
900
900
  })
901
901
  ]
902
- }), /* @__PURE__ */ F(Ee, { children: _ && /* @__PURE__ */ I("div", {
902
+ }), /* @__PURE__ */ L(Te, { children: _ && /* @__PURE__ */ R("div", {
903
903
  className: "flex items-center gap-2 rounded-lg border border-border-seam bg-bg-surface px-3 py-2 shadow-pop",
904
- children: [/* @__PURE__ */ F(xe, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ F("span", {
904
+ children: [/* @__PURE__ */ L(be, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ L("span", {
905
905
  className: "text-sm font-medium text-text-primary",
906
- children: _.title || B[_.category ?? "OTHER"].label
906
+ children: _.title || H[_.category ?? "OTHER"].label
907
907
  })]
908
908
  }) })]
909
909
  }),
910
- /* @__PURE__ */ F(i, {
910
+ /* @__PURE__ */ L(i, {
911
911
  toasts: ee,
912
912
  onDismiss: p
913
913
  })
914
914
  ]
915
915
  });
916
916
  }
917
- export { He as TimelinePage };
917
+ export { Ue as TimelinePage };
918
918
 
919
919
  //# sourceMappingURL=TimelinePage.js.map