@burdenoff/microfe-timecampus 2026.1203.2 → 2026.1205.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/timecampus/components/EmptyState.d.ts +7 -0
  2. package/dist/timecampus/components/EmptyState.js +3 -2
  3. package/dist/timecampus/components/EmptyState.js.map +1 -1
  4. package/dist/timecampus/components/FilterBar.js +1 -0
  5. package/dist/timecampus/pages/admin/AdminPage.js +264 -264
  6. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  7. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +78 -78
  8. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  9. package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
  10. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  11. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
  12. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  13. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +107 -102
  14. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  15. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +129 -124
  16. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
  17. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
  18. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  19. package/dist/timecampus/pages/extend/TimeTriggersPage.js +97 -97
  20. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  21. package/dist/timecampus/pages/focus/FocusProtectionPage.js +120 -120
  22. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  23. package/dist/timecampus/pages/geofencing/GeofencingPage.js +343 -343
  24. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  25. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
  26. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  27. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +296 -296
  28. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  29. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
  30. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  31. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
  32. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  33. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +206 -206
  34. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  35. package/dist/timecampus/pages/meetings/MeetingFormModal.js +72 -71
  36. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  37. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
  38. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  39. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
  40. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  41. package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
  42. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  43. package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
  44. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  45. package/dist/timecampus/pages/projects/TasksPage.js +92 -92
  46. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  47. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +60 -60
  48. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  49. package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
  50. package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
  51. package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
  52. package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
  53. package/dist/timecampus/pages/time/TimeEntriesPage.js +163 -163
  54. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  55. package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
  56. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  57. package/dist/timecampus/pages/time/TimerPage.js +84 -84
  58. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  59. package/dist/timecampus/pages/timeline/TimelinePage.js +223 -223
  60. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  61. package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
  62. package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
  63. package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
  64. package/package.json +2 -2
@@ -9,101 +9,101 @@ import { formatDuration as c, formatTime as l } from "../../utils/helpers.js";
9
9
  import { calendarHoldLabel as u } from "../focus/focusHelpers.js";
10
10
  import { hasAiCategorizedSegment as d, segmentProvenance as ee } from "./timelineProvenance.js";
11
11
  import { driftLabel as f, focusStatusLabel as p, plannedDrift as m, protectedPercent as h } from "./timelineFocus.js";
12
- import { pendingSuggestion as g, pendingSuggestions as _ } from "./timelineSuggestions.js";
13
- import { awaitsCategoryApproval as te, canSplit as v, categoriesAwaitingApproval as y, categoryDropId as b, defaultSplitTime as x, mergeCandidate as ne, parseDropTarget as re, projectDropId as S, resolveSplitTime as ie } from "./timelineEditing.js";
14
- import { parseTimelineDateParam as ae } from "../lifetime/recommendationEvidence.js";
15
- import { useTimeCampus as oe } from "../../providers/TimeCampusProvider.js";
16
- import { useAcceptTimeCampusCaptureEventSuggestionMutation as se, useGetTimeCampusTimelineQuery as ce, useListProjectsQuery as le, useMergeTimeCampusCaptureEventsMutation as ue, useRecategorizeTimeCampusCaptureEventMutation as de, useRejectTimeCampusCaptureEventSuggestionMutation as fe, useSetTimeCampusCaptureEventProjectMutation as pe, useSplitTimeCampusCaptureEventMutation as me, useSuggestTimeCampusCaptureEventProjectMutation as he } from "../../../generated/wspace-operations.js";
12
+ import { pendingSuggestion as te, pendingSuggestions as g } from "./timelineSuggestions.js";
13
+ import { awaitsCategoryApproval as ne, canSplit as _, categoriesAwaitingApproval as v, categoryDropId as y, defaultSplitTime as b, mergeCandidate as re, parseDropTarget as ie, projectDropId as x, resolveSplitTime as ae } from "./timelineEditing.js";
14
+ import { parseTimelineDateParam as oe } from "../lifetime/recommendationEvidence.js";
15
+ import { useTimeCampus as se } from "../../providers/TimeCampusProvider.js";
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 C, useState as w } from "react";
19
- import { Activity as T, BadgeCheck as ge, Brain as E, Calendar as _e, CalendarClock as D, Check as ve, Coffee as ye, FolderOpen as O, Github as k, GripVertical as be, Merge as A, MessageSquare as j, Scissors as M, Shield as N, Sparkles as P, Users as F, X as xe, Zap as Se } from "lucide-react";
20
- import { useSearchParams as Ce } from "react-router";
21
- import { jsx as I, jsxs as L } from "react/jsx-runtime";
22
- import { GlassCard as R } from "@burdenoff/fe-libs/ui";
23
- import { DndContext as we, DragOverlay as Te, KeyboardSensor as Ee, PointerSensor as De, useDraggable as Oe, useDroppable as z, useSensor as ke, useSensors as Ae } from "@dnd-kit/core";
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";
24
24
  // src/timecampus/pages/timeline/TimelinePage.tsx
25
25
  var B = {
26
26
  DEEP_WORK: {
27
27
  label: "Deep work",
28
- icon: E,
28
+ icon: T,
29
29
  dot: "bg-status-success-bg",
30
30
  chip: "bg-status-success-bg text-status-success-text"
31
31
  },
32
32
  MEETING: {
33
33
  label: "Meeting",
34
- icon: F,
34
+ icon: P,
35
35
  dot: "bg-status-info-bg",
36
36
  chip: "bg-status-info-bg text-status-info-text"
37
37
  },
38
38
  COMMUNICATION: {
39
39
  label: "Communication",
40
- icon: j,
40
+ icon: A,
41
41
  dot: "bg-status-warning-bg",
42
42
  chip: "bg-status-warning-bg text-status-warning-text"
43
43
  },
44
44
  BREAK: {
45
45
  label: "Break",
46
- icon: ye,
46
+ icon: be,
47
47
  dot: "bg-bg-sunken",
48
48
  chip: "bg-bg-sunken text-text-secondary"
49
49
  },
50
50
  OTHER: {
51
51
  label: "Other",
52
- icon: T,
52
+ icon: w,
53
53
  dot: "bg-bg-sunken",
54
54
  chip: "bg-bg-sunken text-text-secondary"
55
55
  }
56
- }, je = {
57
- TIME_ENTRY: Se,
58
- MEETING: F,
59
- POMODORO: E,
60
- EMAIL: j,
61
- CAPTURE: k,
62
- FOCUS_SESSION: N,
63
- FOCUS_BLOCK: D
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
64
64
  };
65
- function Me(e) {
65
+ function Ne(e) {
66
66
  return e.source === "FOCUS_SESSION" || e.source === "FOCUS_BLOCK";
67
67
  }
68
- function Ne({ segment: e }) {
68
+ function Pe({ segment: e }) {
69
69
  let t = e.focus;
70
70
  if (!t) return null;
71
- let n = e.isPlanned, r = n ? D : N, 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__ */ L("li", {
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", {
73
73
  className: `flex items-start gap-3 p-4 ${n ? "bg-bg-sunken/30" : ""}`,
74
74
  "data-testid": n ? "timeline-focus-block" : "timeline-focus-session",
75
75
  children: [
76
- /* @__PURE__ */ L("div", {
76
+ /* @__PURE__ */ I("div", {
77
77
  className: "flex w-16 shrink-0 flex-col items-end pt-0.5 text-xs tabular-nums text-text-secondary",
78
- children: [/* @__PURE__ */ I("span", { children: l(e.startTime) }), /* @__PURE__ */ I("span", {
78
+ children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
79
79
  className: "text-text-tertiary",
80
80
  children: c(e.durationSeconds)
81
81
  })]
82
82
  }),
83
- /* @__PURE__ */ I("div", {
83
+ /* @__PURE__ */ F("div", {
84
84
  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-bg text-status-success-text"}`,
85
- children: /* @__PURE__ */ I(r, { className: "h-4 w-4" })
85
+ children: /* @__PURE__ */ F(r, { className: "h-4 w-4" })
86
86
  }),
87
- /* @__PURE__ */ L("div", {
87
+ /* @__PURE__ */ I("div", {
88
88
  className: "min-w-0 flex-1",
89
89
  children: [
90
- /* @__PURE__ */ I("p", {
90
+ /* @__PURE__ */ F("p", {
91
91
  className: "truncate text-sm font-medium text-text-primary",
92
92
  children: e.title || (n ? "Planned focus block" : "Focus session")
93
93
  }),
94
- /* @__PURE__ */ L("div", {
94
+ /* @__PURE__ */ I("div", {
95
95
  className: "mt-1 flex flex-wrap items-center gap-2",
96
96
  children: [
97
- /* @__PURE__ */ I("span", {
97
+ /* @__PURE__ */ F("span", {
98
98
  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-bg text-status-success-text"}`,
99
99
  "data-testid": "timeline-focus-status",
100
100
  children: i
101
101
  }),
102
- t.protectionLevel === "STRICT" && /* @__PURE__ */ I("span", {
102
+ t.protectionLevel === "STRICT" && /* @__PURE__ */ F("span", {
103
103
  className: "text-xs text-text-secondary",
104
104
  children: "Strict"
105
105
  }),
106
- t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */ L("span", {
106
+ t.plannedStartTime && t.plannedEndTime && /* @__PURE__ */ I("span", {
107
107
  className: "text-xs tabular-nums text-text-secondary",
108
108
  children: [
109
109
  "Planned ",
@@ -113,7 +113,7 @@ function Ne({ segment: e }) {
113
113
  l(t.plannedEndTime)
114
114
  ]
115
115
  }),
116
- !n && e.endTime && /* @__PURE__ */ L("span", {
116
+ !n && e.endTime && /* @__PURE__ */ I("span", {
117
117
  className: "text-xs tabular-nums text-text-secondary",
118
118
  children: [
119
119
  "Actual ",
@@ -123,7 +123,7 @@ function Ne({ segment: e }) {
123
123
  l(e.endTime)
124
124
  ]
125
125
  }),
126
- o && /* @__PURE__ */ L("span", {
126
+ o && /* @__PURE__ */ I("span", {
127
127
  className: "text-xs text-text-tertiary",
128
128
  children: [
129
129
  "Started ",
@@ -131,27 +131,27 @@ function Ne({ segment: e }) {
131
131
  o.endMinutes !== null && `, ended ${f(o.endMinutes, "over", "short")}`
132
132
  ]
133
133
  }),
134
- s && /* @__PURE__ */ I("span", {
134
+ s && /* @__PURE__ */ F("span", {
135
135
  className: "text-xs text-text-tertiary",
136
136
  children: s
137
137
  })
138
138
  ]
139
139
  }),
140
- !n && /* @__PURE__ */ L("div", {
140
+ !n && /* @__PURE__ */ I("div", {
141
141
  className: "mt-2",
142
142
  "data-testid": "timeline-focus-protection",
143
- children: [/* @__PURE__ */ L("div", {
143
+ children: [/* @__PURE__ */ I("div", {
144
144
  className: "flex h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-bg-sunken",
145
145
  role: "img",
146
146
  "aria-label": `${a ?? 0}% of this session stayed protected`,
147
- children: [/* @__PURE__ */ I("span", {
147
+ children: [/* @__PURE__ */ F("span", {
148
148
  className: "h-full bg-status-success-text",
149
149
  style: { width: `${a ?? 0}%` }
150
- }), /* @__PURE__ */ I("span", {
150
+ }), /* @__PURE__ */ F("span", {
151
151
  className: "h-full bg-status-warning-text",
152
152
  style: { width: `${a === null ? 0 : 100 - a}%` }
153
153
  })]
154
- }), /* @__PURE__ */ L("p", {
154
+ }), /* @__PURE__ */ I("p", {
155
155
  className: "mt-1 text-xs tabular-nums text-text-secondary",
156
156
  children: [
157
157
  "Protected ",
@@ -168,7 +168,7 @@ function Ne({ segment: e }) {
168
168
  ]
169
169
  })]
170
170
  }),
171
- n && /* @__PURE__ */ I("p", {
171
+ n && /* @__PURE__ */ F("p", {
172
172
  className: "mt-1 text-xs text-text-tertiary",
173
173
  children: "Not counted in the day's totals until you run it."
174
174
  })
@@ -184,21 +184,21 @@ var V = [
184
184
  "BREAK",
185
185
  "OTHER"
186
186
  ];
187
- function Pe({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
188
- return /* @__PURE__ */ L("div", {
187
+ function H({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
188
+ return /* @__PURE__ */ I("div", {
189
189
  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
190
  "data-testid": "timeline-project-suggestion",
191
191
  children: [
192
- /* @__PURE__ */ I(P, {
192
+ /* @__PURE__ */ F(N, {
193
193
  className: "h-3.5 w-3.5 shrink-0 text-primary",
194
194
  "aria-hidden": !0
195
195
  }),
196
- /* @__PURE__ */ L("span", {
196
+ /* @__PURE__ */ I("span", {
197
197
  className: "text-xs text-text-secondary",
198
198
  children: [
199
199
  "Suggested project",
200
200
  " ",
201
- /* @__PURE__ */ I("span", {
201
+ /* @__PURE__ */ F("span", {
202
202
  className: "font-medium text-text-primary",
203
203
  children: e.projectName
204
204
  }),
@@ -209,46 +209,46 @@ function Pe({ suggestion: e, busy: t, onAccept: n, onReject: r }) {
209
209
  e.reason
210
210
  ]
211
211
  }),
212
- /* @__PURE__ */ L("span", {
212
+ /* @__PURE__ */ I("span", {
213
213
  className: "ms-auto flex items-center gap-1",
214
- children: [/* @__PURE__ */ L("button", {
214
+ children: [/* @__PURE__ */ I("button", {
215
215
  type: "button",
216
216
  disabled: t,
217
217
  onClick: () => n(e),
218
218
  "aria-label": `Accept project ${e.projectName}`,
219
219
  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__ */ I(ve, { className: "h-3 w-3" }), "Accept"]
221
- }), /* @__PURE__ */ L("button", {
220
+ children: [/* @__PURE__ */ F(ye, { className: "h-3 w-3" }), "Accept"]
221
+ }), /* @__PURE__ */ I("button", {
222
222
  type: "button",
223
223
  disabled: t,
224
224
  onClick: () => r(e),
225
225
  "aria-label": `Dismiss suggested project ${e.projectName}`,
226
226
  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__ */ I(xe, { className: "h-3 w-3" }), "Dismiss"]
227
+ children: [/* @__PURE__ */ F(Se, { className: "h-3 w-3" }), "Dismiss"]
228
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: b(e) });
235
- return /* @__PURE__ */ L("div", {
234
+ let { isOver: i, setNodeRef: a } = z({ id: y(e) });
235
+ return /* @__PURE__ */ I("div", {
236
236
  ref: a,
237
237
  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
238
  children: [
239
- /* @__PURE__ */ I("span", {
239
+ /* @__PURE__ */ F("span", {
240
240
  className: `inline-block h-2.5 w-2.5 rounded-full ${n}`,
241
241
  "aria-hidden": !0
242
242
  }),
243
- /* @__PURE__ */ I("span", {
243
+ /* @__PURE__ */ F("span", {
244
244
  className: "text-sm font-medium text-text-primary",
245
245
  children: t
246
246
  }),
247
- /* @__PURE__ */ I("span", {
247
+ /* @__PURE__ */ F("span", {
248
248
  className: "text-sm tabular-nums text-text-secondary",
249
249
  children: c(r)
250
250
  }),
251
- i && /* @__PURE__ */ I("span", {
251
+ i && /* @__PURE__ */ F("span", {
252
252
  className: "text-xs font-medium text-primary",
253
253
  children: "Drop here"
254
254
  })
@@ -257,40 +257,40 @@ function Fe({ category: e, label: t, dotClassName: n, totalSeconds: r }) {
257
257
  }
258
258
  var Ie = 5;
259
259
  function Le({ projectId: e, label: t }) {
260
- let { isOver: n, setNodeRef: r } = z({ id: S(e) });
261
- return /* @__PURE__ */ L("div", {
260
+ let { isOver: n, setNodeRef: r } = z({ id: x(e) });
261
+ return /* @__PURE__ */ I("div", {
262
262
  ref: r,
263
263
  "data-testid": "timeline-project-drop",
264
264
  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
265
  children: [
266
- /* @__PURE__ */ I(O, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
267
- /* @__PURE__ */ I("span", {
266
+ /* @__PURE__ */ F(D, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary" }),
267
+ /* @__PURE__ */ F("span", {
268
268
  className: "truncate text-sm font-medium text-text-primary",
269
269
  children: t
270
270
  }),
271
- n && /* @__PURE__ */ I("span", {
271
+ n && /* @__PURE__ */ F("span", {
272
272
  className: "shrink-0 text-xs font-medium text-primary",
273
273
  children: "Drop here"
274
274
  })
275
275
  ]
276
276
  });
277
277
  }
278
- function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
279
- let [i, a] = w(() => x(e)), o = ie(e, i);
280
- return /* @__PURE__ */ L("form", {
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", {
281
281
  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
282
  "data-testid": "timeline-split-form",
283
283
  onSubmit: (e) => {
284
284
  e.preventDefault(), o.ok && n(o.at);
285
285
  },
286
286
  children: [
287
- /* @__PURE__ */ I(M, {
287
+ /* @__PURE__ */ F(j, {
288
288
  className: "h-3.5 w-3.5 shrink-0 text-text-tertiary",
289
289
  "aria-hidden": !0
290
290
  }),
291
- /* @__PURE__ */ L("label", {
291
+ /* @__PURE__ */ I("label", {
292
292
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
293
- children: ["Split at", /* @__PURE__ */ I("input", {
293
+ children: ["Split at", /* @__PURE__ */ F("input", {
294
294
  type: "time",
295
295
  value: i,
296
296
  onChange: (e) => a(e.target.value),
@@ -298,7 +298,7 @@ function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
298
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"
299
299
  })]
300
300
  }),
301
- /* @__PURE__ */ L("span", {
301
+ /* @__PURE__ */ I("span", {
302
302
  className: "text-xs text-text-tertiary",
303
303
  children: [
304
304
  l(e.startTime),
@@ -307,19 +307,19 @@ function H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
307
307
  e.endTime ? l(e.endTime) : "now"
308
308
  ]
309
309
  }),
310
- !o.ok && /* @__PURE__ */ I("span", {
310
+ !o.ok && /* @__PURE__ */ F("span", {
311
311
  className: "text-xs text-status-error-text",
312
312
  role: "alert",
313
313
  children: o.reason
314
314
  }),
315
- /* @__PURE__ */ L("span", {
315
+ /* @__PURE__ */ I("span", {
316
316
  className: "ms-auto flex items-center gap-1",
317
- children: [/* @__PURE__ */ L("button", {
317
+ children: [/* @__PURE__ */ I("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__ */ I(M, { className: "h-3 w-3" }), "Split"]
322
- }), /* @__PURE__ */ I("button", {
321
+ children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
322
+ }), /* @__PURE__ */ F("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 H({ segment: e, busy: t, onSplit: n, onCancel: r }) {
329
329
  ]
330
330
  });
331
331
  }
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 = B[t] ?? B.OTHER, m = te(e), h = v(e), g = je[e.source] ?? T, _ = ee(e), y = e.source === "CAPTURE", b = y && !e.projectId && !r && o.projects.length > 0, { attributes: x, listeners: ne, setNodeRef: re, isDragging: S } = Oe({
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({
334
334
  id: e.id,
335
335
  data: { segment: e },
336
336
  disabled: !e.isRecategorizable
337
337
  });
338
- return /* @__PURE__ */ L("li", {
339
- ref: re,
340
- className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${S ? "opacity-40" : ""}`,
338
+ return /* @__PURE__ */ I("li", {
339
+ ref: ie,
340
+ className: `flex items-start gap-3 p-4 transition-colors hover:bg-bg-sunken/50 ${x ? "opacity-40" : ""}`,
341
341
  children: [
342
- /* @__PURE__ */ L("div", {
342
+ /* @__PURE__ */ I("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__ */ I("span", { children: l(e.startTime) }), /* @__PURE__ */ I("span", {
344
+ children: [/* @__PURE__ */ F("span", { children: l(e.startTime) }), /* @__PURE__ */ F("span", {
345
345
  className: "text-text-tertiary",
346
346
  children: c(e.durationSeconds)
347
347
  })]
348
348
  }),
349
- e.isRecategorizable && /* @__PURE__ */ I("button", {
349
+ e.isRecategorizable && /* @__PURE__ */ F("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
- ...x,
354
- ...ne,
355
- children: /* @__PURE__ */ I(be, { className: "h-4 w-4" })
353
+ ...b,
354
+ ...re,
355
+ children: /* @__PURE__ */ F(xe, { className: "h-4 w-4" })
356
356
  }),
357
- /* @__PURE__ */ I("div", {
357
+ /* @__PURE__ */ F("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__ */ I(g, { className: "h-4 w-4" })
359
+ children: /* @__PURE__ */ F(te, { className: "h-4 w-4" })
360
360
  }),
361
- /* @__PURE__ */ L("div", {
361
+ /* @__PURE__ */ I("div", {
362
362
  className: "min-w-0 flex-1",
363
363
  children: [
364
- /* @__PURE__ */ I("p", {
364
+ /* @__PURE__ */ F("p", {
365
365
  className: "truncate text-sm font-medium text-text-primary",
366
366
  children: e.title || p.label
367
367
  }),
368
- /* @__PURE__ */ L("div", {
368
+ /* @__PURE__ */ I("div", {
369
369
  className: "mt-1 flex flex-wrap items-center gap-2",
370
370
  children: [
371
- /* @__PURE__ */ I("span", {
371
+ /* @__PURE__ */ F("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__ */ L("span", {
375
+ n !== void 0 && /* @__PURE__ */ I("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__ */ I(O, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ I("span", {
377
+ children: [/* @__PURE__ */ F(D, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ F("span", {
378
378
  className: "truncate",
379
379
  children: n
380
380
  })]
381
381
  }),
382
- e.app && /* @__PURE__ */ I("span", {
382
+ e.app && /* @__PURE__ */ F("span", {
383
383
  className: "text-xs text-text-secondary",
384
384
  children: e.app
385
385
  }),
386
- _ && (_.isAi ? /* @__PURE__ */ L("span", {
386
+ g && (g.isAi ? /* @__PURE__ */ I("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
- title: _.detail,
388
+ title: g.detail,
389
389
  "data-testid": "timeline-ai-provenance",
390
390
  children: [
391
- /* @__PURE__ */ I(P, {
391
+ /* @__PURE__ */ F(N, {
392
392
  className: "h-3 w-3 shrink-0",
393
393
  "aria-hidden": !0
394
394
  }),
395
- _.label,
396
- /* @__PURE__ */ L("span", {
395
+ g.label,
396
+ /* @__PURE__ */ I("span", {
397
397
  className: "sr-only",
398
- children: [". ", _.detail]
398
+ children: [". ", g.detail]
399
399
  })
400
400
  ]
401
- }) : /* @__PURE__ */ I("span", {
401
+ }) : /* @__PURE__ */ F("span", {
402
402
  className: "text-xs text-text-tertiary",
403
- title: _.detail,
404
- children: _.label
403
+ title: g.detail,
404
+ children: g.label
405
405
  })),
406
- m && /* @__PURE__ */ L("button", {
406
+ m && /* @__PURE__ */ I("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__ */ I(ge, { className: "h-3 w-3" }), "Approve"]
413
+ children: [/* @__PURE__ */ F(_e, { className: "h-3 w-3" }), "Approve"]
414
414
  })
415
415
  ]
416
416
  }),
417
- r && /* @__PURE__ */ I(Pe, {
417
+ r && /* @__PURE__ */ F(H, {
418
418
  suggestion: r,
419
419
  busy: o.busy,
420
420
  onAccept: o.onAccept,
421
421
  onReject: o.onReject
422
422
  }),
423
- d && /* @__PURE__ */ I(H, {
423
+ d && /* @__PURE__ */ F(Re, {
424
424
  segment: e,
425
425
  busy: u.busy,
426
426
  onSplit: (t) => {
@@ -430,58 +430,58 @@ function Re({ segment: e, category: t, projectName: n, suggestion: r, recategori
430
430
  })
431
431
  ]
432
432
  }),
433
- /* @__PURE__ */ L("div", {
433
+ /* @__PURE__ */ I("div", {
434
434
  className: "flex shrink-0 flex-col items-end gap-1.5",
435
435
  children: [
436
- e.isRecategorizable && /* @__PURE__ */ I("select", {
436
+ e.isRecategorizable && /* @__PURE__ */ F(R, {
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__ */ I("option", {
442
+ children: V.map((e) => /* @__PURE__ */ F("option", {
443
443
  value: e,
444
444
  children: B[e].label
445
445
  }, e))
446
446
  }),
447
- y && o.projects.length > 0 && /* @__PURE__ */ L("select", {
447
+ v && o.projects.length > 0 && /* @__PURE__ */ I(R, {
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__ */ I("option", {
453
+ children: [/* @__PURE__ */ F("option", {
454
454
  value: "",
455
455
  children: "No project"
456
- }), o.projects.map((e) => /* @__PURE__ */ I("option", {
456
+ }), o.projects.map((e) => /* @__PURE__ */ F("option", {
457
457
  value: e.id,
458
458
  children: e.name
459
459
  }, e.id))]
460
460
  }),
461
- b && /* @__PURE__ */ L("button", {
461
+ y && /* @__PURE__ */ I("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__ */ I(P, { className: "h-3 w-3" }), "Suggest project"]
466
+ children: [/* @__PURE__ */ F(N, { className: "h-3 w-3" }), "Suggest project"]
467
467
  }),
468
- (s || h) && /* @__PURE__ */ L("span", {
468
+ (s || h) && /* @__PURE__ */ I("span", {
469
469
  className: "flex items-center gap-2",
470
- children: [s && /* @__PURE__ */ L("button", {
470
+ children: [s && /* @__PURE__ */ I("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__ */ I(A, { className: "h-3 w-3" }), "Merge with next"]
478
- }), h && !d && /* @__PURE__ */ L("button", {
477
+ children: [/* @__PURE__ */ F(k, { className: "h-3 w-3" }), "Merge with next"]
478
+ }), h && !d && /* @__PURE__ */ I("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__ */ I(M, { className: "h-3 w-3" }), "Split"]
484
+ children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), "Split"]
485
485
  })]
486
486
  })
487
487
  ]
@@ -496,10 +496,10 @@ function W(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
- var ze = 14;
500
- function Be() {
499
+ var Be = 14;
500
+ function G() {
501
501
  let e = /* @__PURE__ */ new Date();
502
- return e.setDate(e.getDate() + ze), W(e);
502
+ return e.setDate(e.getDate() + Be), W(e);
503
503
  }
504
504
  function Ve(e) {
505
505
  let t = /* @__PURE__ */ new Date(`${e}T00:00:00`), n = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
@@ -508,30 +508,30 @@ function Ve(e) {
508
508
  to: n.toISOString()
509
509
  };
510
510
  }
511
- function G() {
512
- let { workspaceId: u = "" } = oe(), { toasts: ee, addToast: f, dismissToast: p } = a(), [m] = Ce(), [h, te] = w(() => {
513
- let e = ae(m.get("date"));
514
- return e !== null && e <= Be() ? e : W(/* @__PURE__ */ new Date());
515
- }), [v, b] = w(null), { from: x, to: S } = C(() => Ve(h), [h]), { data: ie, loading: D, error: ye, refetch: O } = ce({
511
+ function He() {
512
+ let { workspaceId: u = "" } = se(), { toasts: ee, addToast: f, dismissToast: p } = a(), [m] = we(), [h, ne] = C(() => {
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({
516
516
  variables: {
517
- from: x,
518
- to: S
517
+ from: b,
518
+ to: x
519
519
  },
520
520
  skip: !u,
521
521
  fetchPolicy: "cache-and-network"
522
- }), { data: k } = le({
522
+ }), { data: O } = ue({
523
523
  variables: { pagination: { limit: 200 } },
524
524
  skip: !u
525
- }), [A, { loading: j }] = de(), [M, { loading: N }] = se(), [F, { loading: xe }] = fe(), [Oe, { loading: z }] = pe(), [je, { loading: Pe }] = he(), H = N || xe || z || Pe, [ze, { loading: G }] = ue(), [He, { loading: Ue }] = me(), [We, Ge] = w(!1), Ke = G || Ue || We, qe = Ae(ke(De, { activationConstraint: { distance: 6 } }), ke(Ee)), K = ie?.timeCampusTimeline, q = C(() => K?.segments ?? [], [K]);
526
- s(!D && !!K, q.length > 0);
527
- let J = K?.summary, Y = C(() => {
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(() => {
528
528
  let e = /* @__PURE__ */ new Map();
529
- for (let t of k?.projects?.items ?? []) e.set(t.id, t.name);
529
+ for (let t of O?.projects?.items ?? []) e.set(t.id, t.name);
530
530
  return e;
531
- }, [k?.projects?.items]), X = C(() => Array.from(Y, ([e, t]) => ({
531
+ }, [O?.projects?.items]), X = S(() => Array.from(Y, ([e, t]) => ({
532
532
  id: e,
533
533
  name: t
534
- })), [Y]), Z = C(() => _(q, Y), [q, Y]), Je = C(() => {
534
+ })), [Y]), Z = S(() => g(q, Y), [q, Y]), Je = S(() => {
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,10 +540,10 @@ function G() {
540
540
  return e;
541
541
  }, [J]), Ye = async (e, t) => {
542
542
  if (e.isRecategorizable && e.category !== t) try {
543
- await A({ variables: {
543
+ await k({ variables: {
544
544
  id: e.sourceId,
545
545
  category: t
546
- } }), await O(), f({
546
+ } }), await D(), f({
547
547
  title: `Moved to ${B[t].label}`,
548
548
  variant: "success"
549
549
  });
@@ -553,12 +553,12 @@ function G() {
553
553
  variant: "error"
554
554
  });
555
555
  }
556
- }, Q = C(() => y(q), [q]), Xe = async (e) => {
556
+ }, Q = S(() => v(q), [q]), Xe = async (e) => {
557
557
  let t = 0, n = null;
558
558
  Ge(!0);
559
559
  try {
560
560
  for (let r = 0; r < e.length; r += Ie) {
561
- let i = await Promise.allSettled(e.slice(r, r + Ie).map((e) => A({ variables: {
561
+ let i = await Promise.allSettled(e.slice(r, r + Ie).map((e) => k({ variables: {
562
562
  id: e.sourceId,
563
563
  category: e.category
564
564
  } })));
@@ -575,12 +575,12 @@ function G() {
575
575
  } finally {
576
576
  Ge(!1);
577
577
  try {
578
- await O();
578
+ await D();
579
579
  } catch {}
580
580
  }
581
581
  }, Ze = async (e, t) => {
582
582
  try {
583
- await ze({ variables: { ids: [e.sourceId, t.sourceId] } }), await O(), f({
583
+ await Re({ variables: { ids: [e.sourceId, t.sourceId] } }), await D(), f({
584
584
  title: "Activities merged",
585
585
  description: "Gaps between them are not counted as tracked time.",
586
586
  variant: "success"
@@ -596,7 +596,7 @@ function G() {
596
596
  await He({ variables: {
597
597
  id: e.sourceId,
598
598
  at: t.toISOString()
599
- } }), await O(), f({
599
+ } }), await D(), f({
600
600
  title: `Split at ${l(t.toISOString())}`,
601
601
  variant: "success"
602
602
  });
@@ -613,7 +613,7 @@ function G() {
613
613
  onApprove: (e) => void Xe([e])
614
614
  }, $ = async (e, t) => {
615
615
  try {
616
- await e(), await O(), f({
616
+ await e(), await D(), f({
617
617
  title: t,
618
618
  variant: "success"
619
619
  });
@@ -623,17 +623,17 @@ function G() {
623
623
  variant: "error"
624
624
  });
625
625
  }
626
- }, et = (e) => $(() => M({ variables: { id: e.captureEventId } }), `Assigned to ${e.projectName}`), tt = (e) => $(() => F({ variables: { id: e.captureEventId } }), "Suggestion dismissed"), nt = (e, t) => {
626
+ }, et = (e) => $(() => j({ 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 $(() => Oe({ variables: {
629
+ return $(() => R({ 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 je({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
636
- await O(), f(t?.suggestedProjectId ? {
635
+ let t = (await z({ variables: { id: e.sourceId } })).data?.suggestTimeCampusCaptureEventCategory;
636
+ await D(), 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"
@@ -651,7 +651,7 @@ function G() {
651
651
  }, it = async () => {
652
652
  let e = 0;
653
653
  try {
654
- for (let t of Z) await M({ variables: { id: t.captureEventId } }), e++;
654
+ for (let t of Z) await j({ variables: { id: t.captureEventId } }), e++;
655
655
  f({
656
656
  title: `Accepted ${e} project ${e === 1 ? "suggestion" : "suggestions"}`,
657
657
  variant: "success"
@@ -663,7 +663,7 @@ function G() {
663
663
  variant: "error"
664
664
  });
665
665
  } finally {
666
- await O();
666
+ await D();
667
667
  }
668
668
  }, at = {
669
669
  projects: X,
@@ -674,113 +674,113 @@ function G() {
674
674
  onSuggest: (e) => void rt(e)
675
675
  }, ot = (e) => {
676
676
  let t = e.active.data.current?.segment;
677
- b(t ?? null);
677
+ y(t ?? null);
678
678
  }, st = (e) => {
679
679
  let t = e.active.data.current?.segment;
680
- b(null);
681
- let n = re(e.over?.id, V);
680
+ y(null);
681
+ let n = ie(e.over?.id, V);
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__ */ L(t, {
684
+ return /* @__PURE__ */ I(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__ */ L("div", {
688
+ actions: /* @__PURE__ */ I("div", {
689
689
  className: "flex flex-wrap items-center gap-3",
690
- children: [ut && /* @__PURE__ */ L("span", {
690
+ children: [ut && /* @__PURE__ */ I("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__ */ I(T, { className: "h-3.5 w-3.5" }), ut]
693
- }), /* @__PURE__ */ L("label", {
692
+ children: [/* @__PURE__ */ F(w, { className: "h-3.5 w-3.5" }), ut]
693
+ }), /* @__PURE__ */ I("label", {
694
694
  className: "flex items-center gap-2 text-sm text-text-secondary",
695
- children: [/* @__PURE__ */ I(_e, { className: "h-4 w-4" }), /* @__PURE__ */ I("input", {
695
+ children: [/* @__PURE__ */ F(ve, { className: "h-4 w-4" }), /* @__PURE__ */ F("input", {
696
696
  type: "date",
697
697
  value: h,
698
- max: Be(),
699
- onChange: (e) => te(e.target.value),
698
+ max: G(),
699
+ onChange: (e) => ne(e.target.value),
700
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
701
  })]
702
702
  })]
703
703
  }),
704
704
  children: [
705
- /* @__PURE__ */ I(e, { path: h === W(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${h}` }),
706
- D && !K ? /* @__PURE__ */ L("div", {
705
+ /* @__PURE__ */ F(e, { path: h === W(/* @__PURE__ */ new Date()) ? "/mobile/timeline" : `/mobile/timeline?date=${h}` }),
706
+ E && !K ? /* @__PURE__ */ I("div", {
707
707
  className: "space-y-6",
708
- children: [/* @__PURE__ */ I(o, {
708
+ children: [/* @__PURE__ */ F(o, {
709
709
  variant: "card",
710
710
  count: 4
711
- }), /* @__PURE__ */ I(o, {
711
+ }), /* @__PURE__ */ F(o, {
712
712
  variant: "list",
713
713
  count: 6
714
714
  })]
715
- }) : ye ? /* @__PURE__ */ I("div", {
715
+ }) : be ? /* @__PURE__ */ F("div", {
716
716
  className: "rounded-lg border border-status-error-bg/40 bg-status-error-bg p-4 text-sm text-status-error-text",
717
717
  children: "Failed to load your timeline. Please try again later."
718
- }) : /* @__PURE__ */ L(we, {
718
+ }) : /* @__PURE__ */ I(Te, {
719
719
  sensors: qe,
720
720
  onDragStart: ot,
721
721
  onDragEnd: st,
722
- children: [/* @__PURE__ */ L("div", {
722
+ children: [/* @__PURE__ */ I("div", {
723
723
  className: "space-y-6",
724
724
  children: [
725
- /* @__PURE__ */ L("div", {
725
+ /* @__PURE__ */ I("div", {
726
726
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
727
727
  children: [
728
- /* @__PURE__ */ I(n, {
728
+ /* @__PURE__ */ F(n, {
729
729
  featured: !0,
730
730
  title: "Tracked time",
731
731
  value: c(J?.totalTrackedSeconds ?? 0),
732
- icon: /* @__PURE__ */ I(T, { className: "h-5 w-5" }),
732
+ icon: /* @__PURE__ */ F(w, { className: "h-5 w-5" }),
733
733
  description: "Total activity across the day"
734
734
  }),
735
- /* @__PURE__ */ I(n, {
735
+ /* @__PURE__ */ F(n, {
736
736
  title: "Focus ratio",
737
737
  value: `${lt}%`,
738
- icon: /* @__PURE__ */ I(E, { className: "h-5 w-5" }),
738
+ icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
739
739
  description: "Share of time in deep work"
740
740
  }),
741
- /* @__PURE__ */ I(n, {
741
+ /* @__PURE__ */ F(n, {
742
742
  title: "Context switches",
743
743
  value: J?.contextSwitches ?? 0,
744
- icon: /* @__PURE__ */ I(Se, { className: "h-5 w-5" }),
744
+ icon: /* @__PURE__ */ F(Ce, { className: "h-5 w-5" }),
745
745
  description: "Category changes through the day"
746
746
  }),
747
- /* @__PURE__ */ I(n, {
747
+ /* @__PURE__ */ F(n, {
748
748
  title: "Longest focus block",
749
749
  value: c(J?.longestFocusBlockSeconds ?? 0),
750
- icon: /* @__PURE__ */ I(E, { className: "h-5 w-5" }),
750
+ icon: /* @__PURE__ */ F(T, { className: "h-5 w-5" }),
751
751
  description: "Your deepest uninterrupted stretch"
752
752
  })
753
753
  ]
754
754
  }),
755
- q.length > 0 && /* @__PURE__ */ L(R, {
755
+ q.length > 0 && /* @__PURE__ */ I(L, {
756
756
  treatment: "glass",
757
757
  className: "p-4 sm:p-6",
758
758
  children: [
759
- /* @__PURE__ */ I("h2", {
759
+ /* @__PURE__ */ F("h2", {
760
760
  className: "mb-1 text-sm font-semibold text-text-primary",
761
761
  children: "Where the time went"
762
762
  }),
763
- /* @__PURE__ */ I("p", {
763
+ /* @__PURE__ */ F("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__ */ L("p", {
767
+ d(q) && /* @__PURE__ */ I("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__ */ I(P, {
770
+ children: [/* @__PURE__ */ F(N, {
771
771
  className: "mt-0.5 h-3 w-3 shrink-0",
772
772
  "aria-hidden": !0
773
- }), /* @__PURE__ */ L("span", { children: [
773
+ }), /* @__PURE__ */ I("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__ */ I("div", {
779
+ /* @__PURE__ */ F("div", {
780
780
  className: "flex flex-wrap gap-4",
781
781
  children: V.map((e) => {
782
782
  let t = B[e], n = Je.get(e);
783
- return /* @__PURE__ */ I(Fe, {
783
+ return /* @__PURE__ */ F(Fe, {
784
784
  category: e,
785
785
  label: t.label,
786
786
  dotClassName: t.dot,
@@ -790,39 +790,39 @@ function G() {
790
790
  })
791
791
  ]
792
792
  }),
793
- ct && X.length > 0 && /* @__PURE__ */ L(R, {
793
+ ct && X.length > 0 && /* @__PURE__ */ I(L, {
794
794
  treatment: "glass",
795
795
  className: "p-4 sm:p-6",
796
796
  children: [
797
- /* @__PURE__ */ I("h2", {
797
+ /* @__PURE__ */ F("h2", {
798
798
  className: "mb-1 text-sm font-semibold text-text-primary",
799
799
  children: "Assign to a project"
800
800
  }),
801
- /* @__PURE__ */ I("p", {
801
+ /* @__PURE__ */ F("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__ */ L("div", {
805
+ /* @__PURE__ */ I("div", {
806
806
  className: "flex flex-wrap gap-3",
807
- children: [X.map((e) => /* @__PURE__ */ I(Le, {
807
+ children: [X.map((e) => /* @__PURE__ */ F(Le, {
808
808
  projectId: e.id,
809
809
  label: e.name
810
- }, e.id)), /* @__PURE__ */ I(Le, {
810
+ }, e.id)), /* @__PURE__ */ F(Le, {
811
811
  projectId: null,
812
812
  label: "No project"
813
813
  })]
814
814
  })
815
815
  ]
816
816
  }),
817
- Q.length > 0 && /* @__PURE__ */ L("div", {
817
+ Q.length > 0 && /* @__PURE__ */ I("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__ */ I(P, { className: "h-4 w-4 shrink-0 text-primary" }),
822
- /* @__PURE__ */ L("p", {
821
+ /* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
822
+ /* @__PURE__ */ I("p", {
823
823
  className: "text-sm text-text-secondary",
824
824
  children: [
825
- /* @__PURE__ */ L("span", {
825
+ /* @__PURE__ */ I("span", {
826
826
  className: "font-medium text-text-primary",
827
827
  children: [
828
828
  Q.length,
@@ -836,24 +836,24 @@ function G() {
836
836
  "Approve them as they are, or drag one onto another category to correct it."
837
837
  ]
838
838
  }),
839
- /* @__PURE__ */ L("button", {
839
+ /* @__PURE__ */ I("button", {
840
840
  type: "button",
841
- disabled: Ke || j,
841
+ disabled: Ke || A,
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__ */ I(ge, { className: "h-3.5 w-3.5" }), "Approve all"]
844
+ children: [/* @__PURE__ */ F(_e, { className: "h-3.5 w-3.5" }), "Approve all"]
845
845
  })
846
846
  ]
847
847
  }),
848
- Z.length > 0 && /* @__PURE__ */ L("div", {
848
+ Z.length > 0 && /* @__PURE__ */ I("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__ */ I(P, { className: "h-4 w-4 shrink-0 text-primary" }),
853
- /* @__PURE__ */ L("p", {
852
+ /* @__PURE__ */ F(N, { className: "h-4 w-4 shrink-0 text-primary" }),
853
+ /* @__PURE__ */ I("p", {
854
854
  className: "text-sm text-text-secondary",
855
855
  children: [
856
- /* @__PURE__ */ L("span", {
856
+ /* @__PURE__ */ I("span", {
857
857
  className: "font-medium text-text-primary",
858
858
  children: [
859
859
  Z.length,
@@ -866,54 +866,54 @@ function G() {
866
866
  "waiting for review. Nothing is assigned until you accept."
867
867
  ]
868
868
  }),
869
- /* @__PURE__ */ L("button", {
869
+ /* @__PURE__ */ I("button", {
870
870
  type: "button",
871
871
  disabled: H,
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__ */ I(ve, { className: "h-3.5 w-3.5" }), "Accept all"]
874
+ children: [/* @__PURE__ */ F(ye, { className: "h-3.5 w-3.5" }), "Accept all"]
875
875
  })
876
876
  ]
877
877
  }),
878
- q.length === 0 ? /* @__PURE__ */ I(r, {
878
+ q.length === 0 ? /* @__PURE__ */ F(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__ */ I(R, {
882
+ }) : /* @__PURE__ */ F(L, {
883
883
  treatment: "glass",
884
884
  glow: !0,
885
885
  className: "overflow-hidden",
886
- children: /* @__PURE__ */ I("ol", {
886
+ children: /* @__PURE__ */ F("ol", {
887
887
  className: "divide-y divide-border-seam",
888
- children: q.map((e, t) => Me(e) ? /* @__PURE__ */ I(Ne, { segment: e }, e.id) : /* @__PURE__ */ I(Re, {
888
+ children: q.map((e, t) => Ne(e) ? /* @__PURE__ */ F(Pe, { segment: e }, e.id) : /* @__PURE__ */ F(ze, {
889
889
  segment: e,
890
890
  category: e.category ?? "OTHER",
891
891
  projectName: e.projectId ? Y.get(e.projectId) : void 0,
892
- suggestion: g(e, Y),
893
- recategorizing: j,
892
+ suggestion: te(e, Y),
893
+ recategorizing: A,
894
894
  onRecategorize: Ye,
895
895
  projectActions: at,
896
- mergeTarget: ne(q, t),
896
+ mergeTarget: re(q, t),
897
897
  editActions: $e
898
898
  }, e.id))
899
899
  })
900
900
  })
901
901
  ]
902
- }), /* @__PURE__ */ I(Te, { children: v && /* @__PURE__ */ L("div", {
902
+ }), /* @__PURE__ */ F(Ee, { children: _ && /* @__PURE__ */ I("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__ */ I(be, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ I("span", {
904
+ children: [/* @__PURE__ */ F(xe, { className: "h-4 w-4 text-text-tertiary" }), /* @__PURE__ */ F("span", {
905
905
  className: "text-sm font-medium text-text-primary",
906
- children: v.title || B[v.category ?? "OTHER"].label
906
+ children: _.title || B[_.category ?? "OTHER"].label
907
907
  })]
908
908
  }) })]
909
909
  }),
910
- /* @__PURE__ */ I(i, {
910
+ /* @__PURE__ */ F(i, {
911
911
  toasts: ee,
912
912
  onDismiss: p
913
913
  })
914
914
  ]
915
915
  });
916
916
  }
917
- export { G as TimelinePage };
917
+ export { He as TimelinePage };
918
918
 
919
919
  //# sourceMappingURL=TimelinePage.js.map