@burdenoff/microfe-timecampus 2026.1028.1 → 2026.1030.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 (27) hide show
  1. package/dist/generated/wspace-operations.d.ts +102 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +477 -425
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +67 -3
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js.map +1 -1
  8. package/dist/index.js +7 -7
  9. package/dist/timecampus/index.js +7 -7
  10. package/dist/timecampus/pages/focus/FocusProtectionPage.d.ts.map +1 -1
  11. package/dist/timecampus/pages/focus/FocusProtectionPage.js +341 -280
  12. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  13. package/dist/timecampus/pages/focus/focusHelpers.d.ts +19 -0
  14. package/dist/timecampus/pages/focus/focusHelpers.d.ts.map +1 -1
  15. package/dist/timecampus/pages/focus/focusHelpers.js +61 -1
  16. package/dist/timecampus/pages/focus/focusHelpers.js.map +1 -1
  17. package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
  18. package/dist/timecampus/pages/timeline/TimelinePage.js +245 -120
  19. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  20. package/dist/timecampus/pages/timeline/timelineFocus.d.ts +33 -0
  21. package/dist/timecampus/pages/timeline/timelineFocus.d.ts.map +1 -0
  22. package/dist/timecampus/pages/timeline/timelineFocus.js +26 -0
  23. package/dist/timecampus/pages/timeline/timelineFocus.js.map +1 -0
  24. package/dist/utils/pageContext.d.ts.map +1 -1
  25. package/dist/utils/pageContext.js +12 -6
  26. package/dist/utils/pageContext.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,24 +1,24 @@
1
1
  import { useTimeCampus as e } from "../../providers/TimeCampusProvider.js";
2
2
  import { StatCard as t } from "../../components/StatCard.js";
3
3
  import { LoadingSkeleton as ee } from "../../components/LoadingSkeleton.js";
4
- import { useCancelFocusBlockMutation as te, useEndFocusSessionMutation as ne, useGetActiveFocusSessionQuery as re, useGetFocusBlockSuggestionsQuery as ie, useGetFocusPreferencesQuery as ae, useGetFocusProtectionSummaryQuery as oe, useListFocusBlocksQuery as se, useLogFocusInterruptionMutation as ce, useRespondToFocusBlockSuggestionMutation as le, useStartFocusSessionMutation as ue, useUpdateFocusPreferencesMutation as de } from "../../../generated/wspace-operations.js";
4
+ import { useCancelFocusBlockMutation as te, useEndFocusSessionMutation as ne, useGetActiveFocusSessionQuery as re, useGetFocusBlockSuggestionsQuery as ie, useGetFocusCalendarConnectionQuery as ae, useGetFocusPreferencesQuery as oe, useGetFocusProtectionSummaryQuery as se, useListFocusBlocksQuery as ce, useLogFocusInterruptionMutation as le, useRespondToFocusBlockSuggestionMutation as ue, useStartFocusSessionMutation as de, useUpdateFocusPreferencesMutation as fe } from "../../../generated/wspace-operations.js";
5
5
  import { PageLayout as n } from "../../components/PageLayout.js";
6
6
  import { StatusBadge as r } from "../../components/StatusBadge.js";
7
- import { ToastContainer as fe, useToast as pe } from "../../components/Toast.js";
7
+ import { ToastContainer as pe, useToast as me } from "../../components/Toast.js";
8
8
  import { TimeCampusFocusBlockResponse as i, TimeCampusFocusProtectionLevel as a, TimeCampusFocusSessionStatus as o } from "../../../generated/wspace-types.js";
9
- import { useDesktopFocusStatus as me } from "./useDesktopFocusStatus.js";
10
- import { DAY_MS as s, announceFocusChange as he, canStartBlock as ge, formatDuration as c, formatRange as l, localDayStart as _e, minutesLeft as ve, minutesToTime as ye, parseAppList as be, parseSiteList as xe, reasonLabel as Se, timeToMinutes as Ce } from "./focusHelpers.js";
11
- import { useEffect as we, useMemo as u, useState as d } from "react";
12
- import { AlarmClock as Te, Ban as f, CalendarClock as Ee, Check as De, Play as p, Shield as m, ShieldCheck as Oe, Square as ke, Target as h, X as Ae } from "lucide-react";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { GlassCard as je } from "@burdenoff/fe-libs/ui";
9
+ import { useDesktopFocusStatus as he } from "./useDesktopFocusStatus.js";
10
+ import { DAY_MS as s, announceFocusChange as ge, calendarHoldLabel as _e, calendarProviderLabel as ve, canStartBlock as ye, formatDuration as c, formatRange as be, localDayStart as xe, minutesLeft as Se, minutesToTime as l, parseAppList as Ce, parseSiteList as we, readStartBlockParam as Te, reasonLabel as Ee, startNudgeOptions as De, timeToMinutes as Oe, withoutStartBlockParam as ke } from "./focusHelpers.js";
11
+ import { useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
12
+ import { AlarmClock as Ae, Ban as je, CalendarClock as Me, Check as Ne, Play as Pe, Shield as Fe, ShieldCheck as Ie, Square as Le, Target as Re, X as ze } from "lucide-react";
13
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
14
+ import { GlassCard as Be } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/timecampus/pages/focus/FocusProtectionPage.tsx
16
- var y = "Focus Protection", b = "Adaptive focus blocks and distraction blocking during focus sessions", Me = [
16
+ var _ = "Focus Protection", v = "Adaptive focus blocks and distraction blocking during focus sessions", Ve = [
17
17
  "GetActiveFocusSession",
18
18
  "GetFocusBlockSuggestions",
19
19
  "ListFocusBlocks",
20
20
  "GetFocusProtectionSummary"
21
- ], x = "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", S = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", C = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50", w = {
21
+ ], y = "rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm text-text-primary", b = "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", x = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50", S = {
22
22
  on: "on",
23
23
  off: "off",
24
24
  running: "on",
@@ -27,312 +27,335 @@ var y = "Focus Protection", b = "Adaptive focus blocks and distraction blocking
27
27
  "needs-setup": "needs a one-time setup",
28
28
  error: "not working"
29
29
  };
30
- function T(e) {
31
- return w[e] ?? e;
30
+ function He(e) {
31
+ return S[e] ?? e;
32
32
  }
33
- function E(e) {
33
+ function C(e) {
34
34
  return e instanceof Error ? e.message : "Something went wrong";
35
35
  }
36
- function D() {
37
- let { workspaceId: w = "" } = e(), { toasts: D, addToast: O, dismissToast: Ne } = pe(), [k, Pe] = d(0), [A, Fe] = d(() => Date.now());
38
- we(() => {
39
- let e = window.setInterval(() => Fe(Date.now()), 6e4);
36
+ function Ue() {
37
+ let { workspaceId: S = "" } = e(), { toasts: Ue, addToast: w, dismissToast: We } = me(), [T, Ge] = p(0), [E, Ke] = p(() => Date.now());
38
+ u(() => {
39
+ let e = window.setInterval(() => Ke(Date.now()), 6e4);
40
40
  return () => window.clearInterval(e);
41
41
  }, []);
42
- let j = u(() => _e(/* @__PURE__ */ new Date(), k), [k]), Ie = u(() => new Date(j.getTime() + s), [j]), Le = u(() => {
42
+ let D = d(() => xe(/* @__PURE__ */ new Date(), T), [T]), qe = d(() => new Date(D.getTime() + s), [D]), Je = d(() => {
43
43
  let e = /* @__PURE__ */ new Date();
44
44
  return {
45
45
  from: (/* @__PURE__ */ new Date(e.getTime() - 7 * s)).toISOString(),
46
46
  to: e.toISOString()
47
47
  };
48
- }, []), M = re({ skip: !w }), N = ie({
49
- variables: { dayStart: j.toISOString() },
50
- skip: !w
51
- }), P = se({
48
+ }, []), O = re({ skip: !S }), k = ie({
49
+ variables: { dayStart: D.toISOString() },
50
+ skip: !S
51
+ }), Ye = ce({
52
52
  variables: {
53
- from: j.toISOString(),
54
- to: Ie.toISOString()
53
+ from: D.toISOString(),
54
+ to: qe.toISOString()
55
55
  },
56
- skip: !w
57
- }), F = ae({ skip: !w }), Re = oe({
58
- variables: Le,
59
- skip: !w
60
- }), I = { refetchQueries: Me }, [ze, { loading: L }] = ue(I), [Be, { loading: R }] = ne(I), [Ve] = ce(I), [He, { loading: z }] = le(I), [Ue] = te(I), [We, { loading: B }] = de({ refetchQueries: ["GetFocusPreferences", "GetFocusBlockSuggestions"] }), [V, Ge] = d(50), [H, Ke] = d(!1), U = F.data?.timeCampusFocusPreferences, [W, G] = d("09:00"), [K, qe] = d("18:00"), [q, Je] = d(90), [Ye, Xe] = d(2), [Ze, Qe] = d(10), [$e, et] = d(!0), [tt, nt] = d(""), [rt, it] = d(""), [at, ot] = d(!0), J = me();
61
- we(() => {
62
- U && (G(ye(U.workdayStartMinute)), qe(ye(U.workdayEndMinute)), Je(U.preferredBlockMinutes), Xe(U.maxBlocksPerDay), Qe(U.meetingBufferMinutes), et(U.blockingEnabled), nt(U.blockedDomains.join("\n")), it(U.blockedApps.join("\n")), ot(U.doNotDisturb));
63
- }, [U]);
64
- let Y = M.data?.timeCampusActiveFocusSession ?? null, st = N.data?.timeCampusFocusBlockSuggestions ?? [], ct = P.data?.timeCampusFocusBlocks ?? [], X = Re.data?.timeCampusFocusSummary, lt = !M.data && M.loading || !F.data && F.loading, ut = M.error ?? F.error;
56
+ skip: !S
57
+ }), A = oe({ skip: !S }), Xe = ae({ skip: !S }), Ze = se({
58
+ variables: Je,
59
+ skip: !S
60
+ }), j = { refetchQueries: Ve }, [M, { loading: N }] = de(j), [Qe, { loading: P }] = ne(j), [$e] = le(j), [et, { loading: F }] = ue(j), [tt] = te(j), [nt, { loading: I }] = fe({ refetchQueries: [
61
+ "GetFocusPreferences",
62
+ "GetFocusBlockSuggestions",
63
+ "GetFocusCalendarConnection"
64
+ ] }), [L, rt] = p(50), [R, it] = p(!1), z = A.data?.timeCampusFocusPreferences, [B, V] = p("09:00"), [H, U] = p("18:00"), [W, G] = p(90), [at, ot] = p(2), [st, ct] = p(10), [lt, ut] = p(!0), [dt, ft] = p(""), [pt, mt] = p(""), [ht, gt] = p(!0), [_t, vt] = p(!0), [K, yt] = p(5), q = he();
65
+ u(() => {
66
+ z && (V(l(z.workdayStartMinute)), U(l(z.workdayEndMinute)), G(z.preferredBlockMinutes), ot(z.maxBlocksPerDay), ct(z.meetingBufferMinutes), ut(z.blockingEnabled), ft(z.blockedDomains.join("\n")), mt(z.blockedApps.join("\n")), gt(z.doNotDisturb), vt(z.calendarHoldEnabled), yt(z.startNudgeMinutes));
67
+ }, [z]);
68
+ let J = O.data?.timeCampusActiveFocusSession ?? null, bt = k.data?.timeCampusFocusBlockSuggestions ?? [], xt = Ye.data?.timeCampusFocusBlocks ?? [], Y = Ze.data?.timeCampusFocusSummary, X = Xe.data?.timeCampusFocusCalendarConnection, St = ve(X?.provider), Ct = !O.data && O.loading || !A.data && A.loading, wt = O.error ?? A.error;
65
69
  async function Z(e, t) {
66
70
  try {
67
- await e(), he(), O({
71
+ await e(), ge(), w({
68
72
  title: t,
69
73
  variant: "success"
70
74
  });
71
75
  } catch (e) {
72
- O({
73
- title: E(e),
76
+ w({
77
+ title: C(e),
74
78
  variant: "error"
75
79
  });
76
80
  }
77
81
  }
78
- let dt = (e) => Z(() => ze({ variables: {
79
- plannedDurationSeconds: e ? void 0 : V * 60,
80
- protectionLevel: H ? a.Strict : a.Standard,
82
+ let Tt = (e) => Z(() => M({ variables: {
83
+ plannedDurationSeconds: e ? void 0 : L * 60,
84
+ protectionLevel: R ? a.Strict : a.Standard,
81
85
  focusBlockId: e
82
- } }), "Focus session started"), ft = (e) => Y ? Z(() => Be({ variables: {
83
- id: Y.id,
86
+ } }), "Focus session started"), Et = f(!1), Dt = f(() => void 0);
87
+ u(() => {
88
+ Dt.current = (e, t) => {
89
+ if (t) {
90
+ w({
91
+ title: "A focus session is already running",
92
+ variant: "info"
93
+ });
94
+ return;
95
+ }
96
+ Z(() => M({ variables: { focusBlockId: e } }), "Focus block started");
97
+ };
98
+ }), u(() => {
99
+ if (Et.current || !S || !O.data) return;
100
+ let e = Te(window.location.search);
101
+ e && (Et.current = !0, window.history.replaceState(window.history.state, "", ke(window.location.href)), Dt.current(e, !!O.data.timeCampusActiveFocusSession));
102
+ }, [S, O.data]);
103
+ let Ot = (e) => J ? Z(() => Qe({ variables: {
104
+ id: J.id,
84
105
  status: e
85
- } }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0, Q = (e, t) => Z(() => He({ variables: { input: {
106
+ } }), e === o.Completed ? "Focus session completed" : "Focus session abandoned") : void 0, Q = (e, t) => Z(() => et({ variables: { input: {
86
107
  startTime: e.startTime,
87
108
  endTime: e.endTime,
88
109
  response: t,
89
- dayStart: j.toISOString(),
110
+ dayStart: D.toISOString(),
90
111
  snoozeMinutes: t === i.Snooze ? 30 : null
91
- } } }), t === i.Accept ? "Focus block scheduled" : t === i.Snooze ? "Snoozed for 30 minutes" : "Suggestion dismissed"), pt = () => {
92
- let e = Ce(W), t = Ce(K);
112
+ } } }), t === i.Accept ? "Focus block scheduled" : t === i.Snooze ? "Snoozed for 30 minutes" : "Suggestion dismissed"), kt = () => {
113
+ let e = Oe(B), t = Oe(H);
93
114
  if (e === null || t === null) {
94
- O({
115
+ w({
95
116
  title: "Use HH:MM for the workday",
96
117
  variant: "error"
97
118
  });
98
119
  return;
99
120
  }
100
- Z(() => We({ variables: { input: {
121
+ Z(() => nt({ variables: { input: {
101
122
  workdayStartMinute: e,
102
123
  workdayEndMinute: t,
103
- preferredBlockMinutes: q,
104
- minBlockMinutes: Math.min(45, q),
105
- maxBlocksPerDay: Ye,
106
- meetingBufferMinutes: Ze,
107
- blockingEnabled: $e,
108
- blockedDomains: xe(tt),
109
- blockedApps: be(rt),
110
- doNotDisturb: at
124
+ preferredBlockMinutes: W,
125
+ minBlockMinutes: Math.min(45, W),
126
+ maxBlocksPerDay: at,
127
+ meetingBufferMinutes: st,
128
+ blockingEnabled: lt,
129
+ blockedDomains: we(dt),
130
+ blockedApps: Ce(pt),
131
+ doNotDisturb: ht,
132
+ calendarHoldEnabled: _t,
133
+ startNudgeMinutes: K
111
134
  } } }), "Focus settings saved");
112
135
  };
113
- if (lt) return /* @__PURE__ */ _(n, {
114
- title: y,
115
- description: b,
116
- children: /* @__PURE__ */ _(ee, {
136
+ if (Ct) return /* @__PURE__ */ h(n, {
137
+ title: _,
138
+ description: v,
139
+ children: /* @__PURE__ */ h(ee, {
117
140
  variant: "card",
118
141
  count: 4
119
142
  })
120
143
  });
121
- if (ut && !M.data) return /* @__PURE__ */ _(n, {
122
- title: y,
123
- description: b,
124
- children: /* @__PURE__ */ _("div", {
144
+ if (wt && !O.data) return /* @__PURE__ */ h(n, {
145
+ title: _,
146
+ description: v,
147
+ children: /* @__PURE__ */ h("div", {
125
148
  className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
126
149
  children: "Failed to load focus protection. Please try again later."
127
150
  })
128
151
  });
129
- let $ = Y ? ve(Y.startTime, Y.plannedDurationSeconds, A) : null, mt = X ? Math.round(X.averageProtectionRatio * 100) : null;
130
- return /* @__PURE__ */ v(n, {
131
- title: y,
132
- description: b,
152
+ let $ = J ? Se(J.startTime, J.plannedDurationSeconds, E) : null, At = Y ? Math.round(Y.averageProtectionRatio * 100) : null;
153
+ return /* @__PURE__ */ g(n, {
154
+ title: _,
155
+ description: v,
133
156
  purpose: "Protect the hours that matter: TimeCampus suggests focus blocks around your meetings and the times you focus best, and blocks distracting sites in your browser, and in the desktop app turns on Do Not Disturb and hides distracting apps while a session runs.",
134
157
  children: [
135
- /* @__PURE__ */ _(fe, {
136
- toasts: D,
137
- onDismiss: Ne
158
+ /* @__PURE__ */ h(pe, {
159
+ toasts: Ue,
160
+ onDismiss: We
138
161
  }),
139
- /* @__PURE__ */ v("div", {
162
+ /* @__PURE__ */ g("div", {
140
163
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
141
164
  children: [
142
- /* @__PURE__ */ _(t, {
165
+ /* @__PURE__ */ h(t, {
143
166
  featured: !0,
144
167
  title: "Protected Time",
145
- value: X ? c(X.totalProtectedSeconds) : "--",
146
- icon: /* @__PURE__ */ _(Oe, { className: "h-5 w-5" }),
168
+ value: Y ? c(Y.totalProtectedSeconds) : "--",
169
+ icon: /* @__PURE__ */ h(Ie, { className: "h-5 w-5" }),
147
170
  description: "Last 7 days"
148
171
  }),
149
- /* @__PURE__ */ _(t, {
172
+ /* @__PURE__ */ h(t, {
150
173
  title: "Protection Ratio",
151
- value: mt === null ? "--" : `${mt}%`,
152
- icon: /* @__PURE__ */ _(m, { className: "h-5 w-5" }),
174
+ value: At === null ? "--" : `${At}%`,
175
+ icon: /* @__PURE__ */ h(Fe, { className: "h-5 w-5" }),
153
176
  description: "Protected vs interrupted"
154
177
  }),
155
- /* @__PURE__ */ _(t, {
178
+ /* @__PURE__ */ h(t, {
156
179
  title: "Sessions",
157
- value: X ? String(X.totalSessions) : "--",
158
- icon: /* @__PURE__ */ _(h, { className: "h-5 w-5" }),
159
- description: X ? `${X.completedSessions} completed` : "Last 7 days"
180
+ value: Y ? String(Y.totalSessions) : "--",
181
+ icon: /* @__PURE__ */ h(Re, { className: "h-5 w-5" }),
182
+ description: Y ? `${Y.completedSessions} completed` : "Last 7 days"
160
183
  }),
161
- /* @__PURE__ */ _(t, {
184
+ /* @__PURE__ */ h(t, {
162
185
  title: "Interruptions",
163
- value: X ? String(X.totalInterruptionCount) : "--",
164
- icon: /* @__PURE__ */ _(f, { className: "h-5 w-5" }),
186
+ value: Y ? String(Y.totalInterruptionCount) : "--",
187
+ icon: /* @__PURE__ */ h(je, { className: "h-5 w-5" }),
165
188
  description: "Logged, detected or bypassed"
166
189
  })
167
190
  ]
168
191
  }),
169
- /* @__PURE__ */ _("div", {
192
+ /* @__PURE__ */ h("div", {
170
193
  className: "mt-6",
171
194
  "data-testid": "focus-session-card",
172
- children: /* @__PURE__ */ v(je, {
195
+ children: /* @__PURE__ */ g(Be, {
173
196
  treatment: "glass",
174
197
  glow: !0,
175
198
  className: "p-6",
176
- children: [/* @__PURE__ */ v("div", {
199
+ children: [/* @__PURE__ */ g("div", {
177
200
  className: "flex flex-wrap items-start justify-between gap-4",
178
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("h3", {
201
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("h3", {
179
202
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
180
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), "Focus session"]
181
- }), Y ? /* @__PURE__ */ v("p", {
203
+ children: [/* @__PURE__ */ h(Fe, { className: "h-4 w-4" }), "Focus session"]
204
+ }), J ? /* @__PURE__ */ g("p", {
182
205
  className: "mt-1 text-sm text-text-secondary",
183
206
  "data-testid": "focus-session-status",
184
207
  children: [
185
208
  $ === null ? "Open-ended session in progress." : $ === 0 ? "Planned time is up — finish when you're ready." : `${$} minute${$ === 1 ? "" : "s"} left.`,
186
209
  " ",
187
- Y.interruptionCount,
210
+ J.interruptionCount,
188
211
  " interruption",
189
- Y.interruptionCount === 1 ? "" : "s",
212
+ J.interruptionCount === 1 ? "" : "s",
190
213
  ",",
191
214
  " ",
192
- Y.blockedAttemptCount,
215
+ J.blockedAttemptCount,
193
216
  " distraction",
194
- Y.blockedAttemptCount === 1 ? "" : "s",
217
+ J.blockedAttemptCount === 1 ? "" : "s",
195
218
  " blocked."
196
219
  ]
197
- }) : /* @__PURE__ */ _("p", {
220
+ }) : /* @__PURE__ */ h("p", {
198
221
  className: "mt-1 text-sm text-text-secondary",
199
222
  children: "No session running. While one is active, the TimeCampus browser extension blocks the sites listed below and the TimeCampus desktop app hides or flags the apps listed below."
200
- })] }), Y && /* @__PURE__ */ _(r, {
201
- variant: Y.protectionLevel === a.Strict ? "warning" : "success",
202
- label: Y.protectionLevel === a.Strict ? "Strict" : "Standard"
223
+ })] }), J && /* @__PURE__ */ h(r, {
224
+ variant: J.protectionLevel === a.Strict ? "warning" : "success",
225
+ label: J.protectionLevel === a.Strict ? "Strict" : "Standard"
203
226
  })]
204
- }), /* @__PURE__ */ _("div", {
227
+ }), /* @__PURE__ */ h("div", {
205
228
  className: "mt-4 flex flex-wrap items-center gap-3",
206
- children: Y ? /* @__PURE__ */ v(g, { children: [
207
- /* @__PURE__ */ v("button", {
229
+ children: J ? /* @__PURE__ */ g(m, { children: [
230
+ /* @__PURE__ */ g("button", {
208
231
  type: "button",
209
- className: S,
210
- disabled: R,
211
- onClick: () => ft(o.Completed),
232
+ className: b,
233
+ disabled: P,
234
+ onClick: () => Ot(o.Completed),
212
235
  "data-testid": "focus-end",
213
- children: [/* @__PURE__ */ _(ke, { className: "h-4 w-4" }), " End session"]
236
+ children: [/* @__PURE__ */ h(Le, { className: "h-4 w-4" }), " End session"]
214
237
  }),
215
- /* @__PURE__ */ _("button", {
238
+ /* @__PURE__ */ h("button", {
216
239
  type: "button",
217
- className: C,
218
- disabled: R,
219
- onClick: () => ft(o.Abandoned),
240
+ className: x,
241
+ disabled: P,
242
+ onClick: () => Ot(o.Abandoned),
220
243
  children: "Abandon"
221
244
  }),
222
- /* @__PURE__ */ _("button", {
245
+ /* @__PURE__ */ h("button", {
223
246
  type: "button",
224
- className: C,
225
- onClick: () => Z(() => Ve({ variables: { focusSessionId: Y.id } }), "Interruption logged"),
247
+ className: x,
248
+ onClick: () => Z(() => $e({ variables: { focusSessionId: J.id } }), "Interruption logged"),
226
249
  "data-testid": "focus-log-interruption",
227
250
  children: "Log an interruption"
228
251
  })
229
- ] }) : /* @__PURE__ */ v(g, { children: [
230
- /* @__PURE__ */ v("label", {
252
+ ] }) : /* @__PURE__ */ g(m, { children: [
253
+ /* @__PURE__ */ g("label", {
231
254
  className: "flex items-center gap-2 text-sm text-text-secondary",
232
- children: ["Length", /* @__PURE__ */ v("select", {
233
- className: x,
234
- value: V,
235
- onChange: (e) => Ge(Number(e.target.value)),
255
+ children: ["Length", /* @__PURE__ */ g("select", {
256
+ className: y,
257
+ value: L,
258
+ onChange: (e) => rt(Number(e.target.value)),
236
259
  "data-testid": "focus-length",
237
260
  children: [
238
- /* @__PURE__ */ _("option", {
261
+ /* @__PURE__ */ h("option", {
239
262
  value: 25,
240
263
  children: "25 min"
241
264
  }),
242
- /* @__PURE__ */ _("option", {
265
+ /* @__PURE__ */ h("option", {
243
266
  value: 50,
244
267
  children: "50 min"
245
268
  }),
246
- /* @__PURE__ */ _("option", {
269
+ /* @__PURE__ */ h("option", {
247
270
  value: 90,
248
271
  children: "90 min"
249
272
  }),
250
- /* @__PURE__ */ _("option", {
273
+ /* @__PURE__ */ h("option", {
251
274
  value: 120,
252
275
  children: "2 hours"
253
276
  })
254
277
  ]
255
278
  })]
256
279
  }),
257
- /* @__PURE__ */ v("label", {
280
+ /* @__PURE__ */ g("label", {
258
281
  className: "flex items-center gap-2 text-sm text-text-secondary",
259
- children: [/* @__PURE__ */ _("input", {
282
+ children: [/* @__PURE__ */ h("input", {
260
283
  type: "checkbox",
261
- checked: H,
262
- onChange: (e) => Ke(e.target.checked),
284
+ checked: R,
285
+ onChange: (e) => it(e.target.checked),
263
286
  className: "h-4 w-4 rounded border-border-subtle"
264
287
  }), "Strict (no “continue anyway”)"]
265
288
  }),
266
- /* @__PURE__ */ v("button", {
289
+ /* @__PURE__ */ g("button", {
267
290
  type: "button",
268
- className: S,
269
- disabled: L,
270
- onClick: () => dt(),
291
+ className: b,
292
+ disabled: N,
293
+ onClick: () => Tt(),
271
294
  "data-testid": "focus-start",
272
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4" }), " Start focus session"]
295
+ children: [/* @__PURE__ */ h(Pe, { className: "h-4 w-4" }), " Start focus session"]
273
296
  })
274
297
  ] })
275
298
  })]
276
299
  })
277
300
  }),
278
- /* @__PURE__ */ v("div", {
301
+ /* @__PURE__ */ g("div", {
279
302
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
280
- children: [/* @__PURE__ */ v("div", {
303
+ children: [/* @__PURE__ */ g("div", {
281
304
  className: "rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
282
305
  "data-testid": "focus-suggestions",
283
306
  children: [
284
- /* @__PURE__ */ v("div", {
307
+ /* @__PURE__ */ g("div", {
285
308
  className: "flex flex-wrap items-center justify-between gap-2",
286
- children: [/* @__PURE__ */ v("h3", {
309
+ children: [/* @__PURE__ */ g("h3", {
287
310
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
288
- children: [/* @__PURE__ */ _(Ee, { className: "h-4 w-4" }), "Suggested focus blocks"]
289
- }), /* @__PURE__ */ _("div", {
311
+ children: [/* @__PURE__ */ h(Me, { className: "h-4 w-4" }), "Suggested focus blocks"]
312
+ }), /* @__PURE__ */ h("div", {
290
313
  className: "flex gap-1",
291
314
  role: "group",
292
315
  "aria-label": "Day to plan",
293
- children: ["Today", "Tomorrow"].map((e, t) => /* @__PURE__ */ _("button", {
316
+ children: ["Today", "Tomorrow"].map((e, t) => /* @__PURE__ */ h("button", {
294
317
  type: "button",
295
- "aria-pressed": k === t,
296
- className: k === t ? S : C,
297
- onClick: () => Pe(t),
318
+ "aria-pressed": T === t,
319
+ className: T === t ? b : x,
320
+ onClick: () => Ge(t),
298
321
  children: e
299
322
  }, e))
300
323
  })]
301
324
  }),
302
- /* @__PURE__ */ _("p", {
325
+ /* @__PURE__ */ h("p", {
303
326
  className: "mt-1 text-xs text-text-secondary",
304
327
  children: "Ranked from your peak hours, meetings and how well past sessions held up. Snoozed and dismissed slots are planned around."
305
328
  }),
306
- /* @__PURE__ */ v("div", {
329
+ /* @__PURE__ */ g("div", {
307
330
  className: "mt-4 space-y-3",
308
331
  children: [
309
- N.error && /* @__PURE__ */ _("p", {
332
+ k.error && /* @__PURE__ */ h("p", {
310
333
  className: "text-sm text-status-error-text",
311
- children: E(N.error)
334
+ children: C(k.error)
312
335
  }),
313
- !N.error && N.data && st.length === 0 && /* @__PURE__ */ v("p", {
336
+ !k.error && k.data && bt.length === 0 && /* @__PURE__ */ g("p", {
314
337
  className: "text-sm text-text-secondary",
315
338
  "data-testid": "focus-suggestions-empty",
316
339
  children: [
317
340
  "No free window left for",
318
341
  " ",
319
- k === 0 ? "today" : "tomorrow",
342
+ T === 0 ? "today" : "tomorrow",
320
343
  " — your day is full or you have scheduled your maximum blocks."
321
344
  ]
322
345
  }),
323
- st.map((e) => /* @__PURE__ */ v("div", {
346
+ bt.map((e) => /* @__PURE__ */ g("div", {
324
347
  className: "rounded-lg border border-border-subtle p-3",
325
348
  "data-testid": "focus-suggestion",
326
349
  children: [
327
- /* @__PURE__ */ v("div", {
350
+ /* @__PURE__ */ g("div", {
328
351
  className: "flex flex-wrap items-center justify-between gap-2",
329
- children: [/* @__PURE__ */ v("span", {
352
+ children: [/* @__PURE__ */ g("span", {
330
353
  className: "text-sm font-medium text-text-primary",
331
- children: [l(e.startTime, e.endTime), /* @__PURE__ */ _("span", {
354
+ children: [be(e.startTime, e.endTime), /* @__PURE__ */ h("span", {
332
355
  className: "ml-2 text-xs text-text-secondary",
333
356
  children: c(e.durationMinutes * 60)
334
357
  })]
335
- }), /* @__PURE__ */ v("span", {
358
+ }), /* @__PURE__ */ g("span", {
336
359
  className: "text-xs text-text-secondary",
337
360
  children: [
338
361
  "Fit ",
@@ -341,39 +364,39 @@ function D() {
341
364
  ]
342
365
  })]
343
366
  }),
344
- /* @__PURE__ */ _("div", {
367
+ /* @__PURE__ */ h("div", {
345
368
  className: "mt-2 flex flex-wrap gap-1.5",
346
- children: e.reasons.map((e) => /* @__PURE__ */ _(r, {
369
+ children: e.reasons.map((e) => /* @__PURE__ */ h(r, {
347
370
  variant: "info",
348
- label: Se(e)
371
+ label: Ee(e)
349
372
  }, e))
350
373
  }),
351
- /* @__PURE__ */ v("div", {
374
+ /* @__PURE__ */ g("div", {
352
375
  className: "mt-3 flex flex-wrap gap-2",
353
376
  children: [
354
- /* @__PURE__ */ v("button", {
377
+ /* @__PURE__ */ g("button", {
355
378
  type: "button",
356
- className: S,
357
- disabled: z,
379
+ className: b,
380
+ disabled: F,
358
381
  onClick: () => Q(e, i.Accept),
359
382
  "data-testid": "focus-suggestion-accept",
360
- children: [/* @__PURE__ */ _(De, { className: "h-4 w-4" }), " Accept"]
383
+ children: [/* @__PURE__ */ h(Ne, { className: "h-4 w-4" }), " Accept"]
361
384
  }),
362
- /* @__PURE__ */ v("button", {
385
+ /* @__PURE__ */ g("button", {
363
386
  type: "button",
364
- className: C,
365
- disabled: z,
387
+ className: x,
388
+ disabled: F,
366
389
  onClick: () => Q(e, i.Snooze),
367
390
  "data-testid": "focus-suggestion-snooze",
368
- children: [/* @__PURE__ */ _(Te, { className: "h-4 w-4" }), " Snooze 30 min"]
391
+ children: [/* @__PURE__ */ h(Ae, { className: "h-4 w-4" }), " Snooze 30 min"]
369
392
  }),
370
- /* @__PURE__ */ v("button", {
393
+ /* @__PURE__ */ g("button", {
371
394
  type: "button",
372
- className: C,
373
- disabled: z,
395
+ className: x,
396
+ disabled: F,
374
397
  onClick: () => Q(e, i.Dismiss),
375
398
  "data-testid": "focus-suggestion-dismiss",
376
- children: [/* @__PURE__ */ _(Ae, { className: "h-4 w-4" }), " Dismiss"]
399
+ children: [/* @__PURE__ */ h(ze, { className: "h-4 w-4" }), " Dismiss"]
377
400
  })
378
401
  ]
379
402
  })
@@ -382,218 +405,256 @@ function D() {
382
405
  ]
383
406
  })
384
407
  ]
385
- }), /* @__PURE__ */ v("div", {
408
+ }), /* @__PURE__ */ g("div", {
386
409
  className: "rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
387
410
  "data-testid": "focus-scheduled",
388
- children: [/* @__PURE__ */ v("h3", {
389
- className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
390
- children: [
391
- /* @__PURE__ */ _(h, { className: "h-4 w-4" }),
392
- "Scheduled (",
393
- k === 0 ? "today" : "tomorrow",
394
- ")"
395
- ]
396
- }), /* @__PURE__ */ v("div", {
397
- className: "mt-4 space-y-3",
398
- children: [P.data && ct.length === 0 && /* @__PURE__ */ _("p", {
399
- className: "text-sm text-text-secondary",
400
- children: "Accept a suggestion to put a focus block on your schedule."
401
- }), ct.map((e) => /* @__PURE__ */ v("div", {
402
- className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-subtle p-3",
403
- "data-testid": "focus-scheduled-block",
404
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
405
- className: "text-sm font-medium text-text-primary",
406
- children: l(e.startTime, e.endTime)
407
- }), /* @__PURE__ */ v("p", {
408
- className: "text-xs text-text-secondary",
409
- children: [
410
- e.source === "ADAPTIVE" ? "Suggested" : "Manual",
411
- " ·",
412
- " ",
413
- c(e.durationMinutes * 60)
414
- ]
415
- })] }), e.status === "STARTED" ? /* @__PURE__ */ _(r, {
416
- variant: "success",
417
- label: "Started"
418
- }) : /* @__PURE__ */ v("div", {
419
- className: "flex gap-2",
420
- children: [!Y && ge(e.endTime, A) && /* @__PURE__ */ v("button", {
421
- type: "button",
422
- className: S,
423
- disabled: L,
424
- onClick: () => dt(e.id),
425
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4" }), " Start"]
426
- }), /* @__PURE__ */ _("button", {
427
- type: "button",
428
- className: C,
429
- onClick: () => Z(() => Ue({ variables: { id: e.id } }), "Focus block canceled"),
430
- "data-testid": "focus-block-cancel",
431
- children: "Cancel"
432
- })]
411
+ children: [
412
+ /* @__PURE__ */ g("h3", {
413
+ className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
414
+ children: [
415
+ /* @__PURE__ */ h(Re, { className: "h-4 w-4" }),
416
+ "Scheduled (",
417
+ T === 0 ? "today" : "tomorrow",
418
+ ")"
419
+ ]
420
+ }),
421
+ X && /* @__PURE__ */ h("p", {
422
+ className: "mt-1 text-xs text-text-secondary",
423
+ "data-testid": "focus-calendar-connection",
424
+ children: X.holdsEnabled ? X.connected ? `Accepted blocks are held as busy "Focus" time on ${X.calendarName ?? "your calendar"}${St ? ` and sync to ${St}` : ""}.` : X.reachable ? "No personal calendar yet. Create one in Calendar to hold accepted blocks there and plan around its events." : "Your calendar could not be reached just now; blocks are still scheduled here." : "Calendar holds are off — accepted blocks stay in TimeCampus only."
425
+ }),
426
+ /* @__PURE__ */ g("div", {
427
+ className: "mt-4 space-y-3",
428
+ children: [Ye.data && xt.length === 0 && /* @__PURE__ */ h("p", {
429
+ className: "text-sm text-text-secondary",
430
+ children: "Accept a suggestion to put a focus block on your schedule."
431
+ }), xt.map((e) => {
432
+ let t = _e(e.calendarHoldStatus, e.calendarId && e.calendarId === X?.calendarId ? X?.calendarName : null);
433
+ return /* @__PURE__ */ g("div", {
434
+ className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-subtle p-3",
435
+ "data-testid": "focus-scheduled-block",
436
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
437
+ className: "text-sm font-medium text-text-primary",
438
+ children: be(e.startTime, e.endTime)
439
+ }), /* @__PURE__ */ g("p", {
440
+ className: "text-xs text-text-secondary",
441
+ children: [
442
+ e.source === "ADAPTIVE" ? "Suggested" : "Manual",
443
+ " ·",
444
+ " ",
445
+ c(e.durationMinutes * 60),
446
+ t && /* @__PURE__ */ g("span", {
447
+ "data-testid": "focus-block-calendar-hold",
448
+ children: [" · ", t]
449
+ })
450
+ ]
451
+ })] }), e.status === "STARTED" ? /* @__PURE__ */ h(r, {
452
+ variant: "success",
453
+ label: "Started"
454
+ }) : /* @__PURE__ */ g("div", {
455
+ className: "flex gap-2",
456
+ children: [!J && ye(e.endTime, E) && /* @__PURE__ */ g("button", {
457
+ type: "button",
458
+ className: b,
459
+ disabled: N,
460
+ onClick: () => Tt(e.id),
461
+ children: [/* @__PURE__ */ h(Pe, { className: "h-4 w-4" }), " Start"]
462
+ }), /* @__PURE__ */ h("button", {
463
+ type: "button",
464
+ className: x,
465
+ onClick: () => Z(() => tt({ variables: { id: e.id } }), "Focus block canceled"),
466
+ "data-testid": "focus-block-cancel",
467
+ children: "Cancel"
468
+ })]
469
+ })]
470
+ }, e.id);
433
471
  })]
434
- }, e.id))]
435
- })]
472
+ })
473
+ ]
436
474
  })]
437
475
  }),
438
- /* @__PURE__ */ v("div", {
476
+ /* @__PURE__ */ g("div", {
439
477
  className: "mt-6 rounded-xl border border-border-seam bg-bg-surface p-6 shadow-elevation-1",
440
478
  "data-testid": "focus-settings",
441
479
  children: [
442
- /* @__PURE__ */ v("h3", {
480
+ /* @__PURE__ */ g("h3", {
443
481
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
444
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), "Distraction blocking and planning"]
482
+ children: [/* @__PURE__ */ h(je, { className: "h-4 w-4" }), "Distraction blocking and planning"]
445
483
  }),
446
- /* @__PURE__ */ v("div", {
484
+ /* @__PURE__ */ g("div", {
447
485
  className: "mt-4 grid grid-cols-1 gap-6 lg:grid-cols-2",
448
- children: [/* @__PURE__ */ v("div", {
486
+ children: [/* @__PURE__ */ g("div", {
449
487
  className: "space-y-3",
450
488
  children: [
451
- /* @__PURE__ */ v("label", {
489
+ /* @__PURE__ */ g("label", {
452
490
  className: "flex items-center justify-between gap-4 text-sm text-text-primary",
453
- children: ["Block sites and apps during focus sessions", /* @__PURE__ */ _("input", {
491
+ children: ["Block sites and apps during focus sessions", /* @__PURE__ */ h("input", {
454
492
  type: "checkbox",
455
- checked: $e,
456
- onChange: (e) => et(e.target.checked),
493
+ checked: lt,
494
+ onChange: (e) => ut(e.target.checked),
457
495
  className: "h-4 w-4 rounded border-border-subtle",
458
496
  "data-testid": "focus-blocking-enabled"
459
497
  })]
460
498
  }),
461
- /* @__PURE__ */ v("label", {
499
+ /* @__PURE__ */ g("label", {
462
500
  className: "block text-sm text-text-primary",
463
- children: ["Blocked sites", /* @__PURE__ */ _("textarea", {
501
+ children: ["Blocked sites", /* @__PURE__ */ h("textarea", {
464
502
  rows: 6,
465
- value: tt,
466
- onChange: (e) => nt(e.target.value),
467
- className: `${x} mt-1 w-full font-mono`,
503
+ value: dt,
504
+ onChange: (e) => ft(e.target.value),
505
+ className: `${y} mt-1 w-full font-mono`,
468
506
  "aria-describedby": "focus-sites-help",
469
507
  "data-testid": "focus-blocked-sites"
470
508
  })]
471
509
  }),
472
- /* @__PURE__ */ _("p", {
510
+ /* @__PURE__ */ h("p", {
473
511
  id: "focus-sites-help",
474
512
  className: "text-xs text-text-secondary",
475
513
  children: "One site per line (subdomains are included). Blocking is enforced by the TimeCampus browser extension while a session is active; allow-listed apps on a session are never blocked."
476
514
  }),
477
- /* @__PURE__ */ v("label", {
515
+ /* @__PURE__ */ g("label", {
478
516
  className: "block text-sm text-text-primary",
479
- children: ["Blocked desktop apps", /* @__PURE__ */ _("textarea", {
517
+ children: ["Blocked desktop apps", /* @__PURE__ */ h("textarea", {
480
518
  rows: 5,
481
- value: rt,
482
- onChange: (e) => it(e.target.value),
483
- className: `${x} mt-1 w-full font-mono`,
519
+ value: pt,
520
+ onChange: (e) => mt(e.target.value),
521
+ className: `${y} mt-1 w-full font-mono`,
484
522
  "aria-describedby": "focus-apps-help",
485
523
  "data-testid": "focus-blocked-apps"
486
524
  })]
487
525
  }),
488
- /* @__PURE__ */ _("p", {
526
+ /* @__PURE__ */ h("p", {
489
527
  id: "focus-apps-help",
490
528
  className: "text-xs text-text-secondary",
491
529
  children: "One app per line, as your computer names it (for example Discord or Steam). In the TimeCampus desktop app, strict sessions hide these apps and standard sessions warn you and count the time as an interruption."
492
530
  }),
493
- /* @__PURE__ */ v("label", {
531
+ /* @__PURE__ */ g("label", {
494
532
  className: "flex items-center justify-between gap-4 text-sm text-text-primary",
495
- children: ["Turn on Do Not Disturb during focus sessions", /* @__PURE__ */ _("input", {
533
+ children: ["Turn on Do Not Disturb during focus sessions", /* @__PURE__ */ h("input", {
496
534
  type: "checkbox",
497
- checked: at,
498
- onChange: (e) => ot(e.target.checked),
535
+ checked: ht,
536
+ onChange: (e) => gt(e.target.checked),
499
537
  className: "h-4 w-4 rounded border-border-subtle",
500
538
  "data-testid": "focus-do-not-disturb"
501
539
  })]
502
540
  }),
503
- J && /* @__PURE__ */ v("p", {
541
+ q && /* @__PURE__ */ g("p", {
504
542
  className: "text-xs text-text-secondary",
505
543
  "data-testid": "focus-desktop-status",
506
544
  children: [
507
545
  "This computer: Do Not Disturb",
508
546
  " ",
509
- T(J.doNotDisturb),
547
+ He(q.doNotDisturb),
510
548
  ", app blocking",
511
549
  " ",
512
- T(J.appWatcher),
550
+ He(q.appWatcher),
513
551
  ".",
514
- J.detail ? ` ${J.detail}` : ""
552
+ q.detail ? ` ${q.detail}` : ""
515
553
  ]
516
554
  })
517
555
  ]
518
- }), /* @__PURE__ */ v("div", {
556
+ }), /* @__PURE__ */ g("div", {
519
557
  className: "space-y-3",
520
558
  children: [
521
- /* @__PURE__ */ v("div", {
559
+ /* @__PURE__ */ g("div", {
522
560
  className: "flex items-center justify-between gap-4",
523
- children: [/* @__PURE__ */ _("span", {
561
+ children: [/* @__PURE__ */ h("span", {
524
562
  className: "text-sm text-text-primary",
525
563
  children: "Workday"
526
- }), /* @__PURE__ */ v("span", {
564
+ }), /* @__PURE__ */ g("span", {
527
565
  className: "flex items-center gap-2",
528
566
  children: [
529
- /* @__PURE__ */ _("input", {
567
+ /* @__PURE__ */ h("input", {
530
568
  type: "time",
531
- value: W,
532
- onChange: (e) => G(e.target.value),
533
- className: x,
569
+ value: B,
570
+ onChange: (e) => V(e.target.value),
571
+ className: y,
534
572
  "aria-label": "Workday start"
535
573
  }),
536
- /* @__PURE__ */ _("span", {
574
+ /* @__PURE__ */ h("span", {
537
575
  className: "text-text-secondary",
538
576
  children: "to"
539
577
  }),
540
- /* @__PURE__ */ _("input", {
578
+ /* @__PURE__ */ h("input", {
541
579
  type: "time",
542
- value: K === "24:00" ? "23:59" : K,
543
- onChange: (e) => qe(e.target.value),
544
- className: x,
580
+ value: H === "24:00" ? "23:59" : H,
581
+ onChange: (e) => U(e.target.value),
582
+ className: y,
545
583
  "aria-label": "Workday end"
546
584
  })
547
585
  ]
548
586
  })]
549
587
  }),
550
- /* @__PURE__ */ v("label", {
588
+ /* @__PURE__ */ g("label", {
551
589
  className: "flex items-center justify-between gap-4 text-sm text-text-primary",
552
- children: ["Preferred block length (minutes)", /* @__PURE__ */ _("input", {
590
+ children: ["Preferred block length (minutes)", /* @__PURE__ */ h("input", {
553
591
  type: "number",
554
592
  min: 15,
555
593
  max: 240,
556
594
  step: 15,
557
- value: q,
558
- onChange: (e) => Je(Number(e.target.value)),
559
- className: `${x} w-24 text-right`
595
+ value: W,
596
+ onChange: (e) => G(Number(e.target.value)),
597
+ className: `${y} w-24 text-right`
560
598
  })]
561
599
  }),
562
- /* @__PURE__ */ v("label", {
600
+ /* @__PURE__ */ g("label", {
563
601
  className: "flex items-center justify-between gap-4 text-sm text-text-primary",
564
- children: ["Focus blocks per day", /* @__PURE__ */ _("input", {
602
+ children: ["Focus blocks per day", /* @__PURE__ */ h("input", {
565
603
  type: "number",
566
604
  min: 1,
567
605
  max: 6,
568
- value: Ye,
569
- onChange: (e) => Xe(Number(e.target.value)),
570
- className: `${x} w-24 text-right`
606
+ value: at,
607
+ onChange: (e) => ot(Number(e.target.value)),
608
+ className: `${y} w-24 text-right`
609
+ })]
610
+ }),
611
+ /* @__PURE__ */ g("label", {
612
+ className: "flex items-center justify-between gap-4 text-sm text-text-primary",
613
+ children: ["Hold accepted blocks on my calendar", /* @__PURE__ */ h("input", {
614
+ type: "checkbox",
615
+ checked: _t,
616
+ onChange: (e) => vt(e.target.checked),
617
+ className: "h-4 w-4 rounded border-border-subtle",
618
+ "data-testid": "focus-calendar-hold"
619
+ })]
620
+ }),
621
+ /* @__PURE__ */ g("label", {
622
+ className: "flex items-center justify-between gap-4 text-sm text-text-primary",
623
+ children: ["Remind me before a block starts", /* @__PURE__ */ h("select", {
624
+ value: K,
625
+ onChange: (e) => yt(Number(e.target.value)),
626
+ className: y,
627
+ "data-testid": "focus-start-nudge",
628
+ children: De(K).map((e) => /* @__PURE__ */ h("option", {
629
+ value: e.value,
630
+ children: e.label
631
+ }, e.value))
571
632
  })]
572
633
  }),
573
- /* @__PURE__ */ v("label", {
634
+ /* @__PURE__ */ g("label", {
574
635
  className: "flex items-center justify-between gap-4 text-sm text-text-primary",
575
- children: ["Buffer around meetings (minutes)", /* @__PURE__ */ _("input", {
636
+ children: ["Buffer around meetings (minutes)", /* @__PURE__ */ h("input", {
576
637
  type: "number",
577
638
  min: 0,
578
639
  max: 60,
579
640
  step: 5,
580
- value: Ze,
581
- onChange: (e) => Qe(Number(e.target.value)),
582
- className: `${x} w-24 text-right`
641
+ value: st,
642
+ onChange: (e) => ct(Number(e.target.value)),
643
+ className: `${y} w-24 text-right`
583
644
  })]
584
645
  })
585
646
  ]
586
647
  })]
587
648
  }),
588
- /* @__PURE__ */ _("div", {
649
+ /* @__PURE__ */ h("div", {
589
650
  className: "mt-4 flex justify-end",
590
- children: /* @__PURE__ */ _("button", {
651
+ children: /* @__PURE__ */ h("button", {
591
652
  type: "button",
592
- className: S,
593
- disabled: B,
594
- onClick: pt,
653
+ className: b,
654
+ disabled: I,
655
+ onClick: kt,
595
656
  "data-testid": "focus-save-settings",
596
- children: B ? "Saving..." : "Save focus settings"
657
+ children: I ? "Saving..." : "Save focus settings"
597
658
  })
598
659
  })
599
660
  ]
@@ -602,6 +663,6 @@ function D() {
602
663
  });
603
664
  }
604
665
  //#endregion
605
- export { D as FocusProtectionPage };
666
+ export { Ue as FocusProtectionPage };
606
667
 
607
668
  //# sourceMappingURL=FocusProtectionPage.js.map