@burdenoff/microfe-timecampus 2026.1031.1 → 2026.1031.3

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 (40) hide show
  1. package/dist/generated/wspace-operations.d.ts +449 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +1429 -1188
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/index.js +7 -7
  6. package/dist/timecampus/TimeCampusRoutes.d.ts.map +1 -1
  7. package/dist/timecampus/TimeCampusRoutes.js +38 -26
  8. package/dist/timecampus/TimeCampusRoutes.js.map +1 -1
  9. package/dist/timecampus/index.js +7 -7
  10. package/dist/timecampus/pages/extend/AppletStorePage.d.ts +2 -0
  11. package/dist/timecampus/pages/extend/AppletStorePage.d.ts.map +1 -0
  12. package/dist/timecampus/pages/extend/AppletStorePage.js +248 -0
  13. package/dist/timecampus/pages/extend/AppletStorePage.js.map +1 -0
  14. package/dist/timecampus/pages/extend/TemplateGalleryPage.d.ts +2 -0
  15. package/dist/timecampus/pages/extend/TemplateGalleryPage.d.ts.map +1 -0
  16. package/dist/timecampus/pages/extend/TemplateGalleryPage.js +339 -0
  17. package/dist/timecampus/pages/extend/TemplateGalleryPage.js.map +1 -0
  18. package/dist/timecampus/pages/extend/WidgetDashboardPage.d.ts +2 -0
  19. package/dist/timecampus/pages/extend/WidgetDashboardPage.d.ts.map +1 -0
  20. package/dist/timecampus/pages/extend/WidgetDashboardPage.js +434 -0
  21. package/dist/timecampus/pages/extend/WidgetDashboardPage.js.map +1 -0
  22. package/dist/timecampus/pages/extend/extendHelpers.d.ts +36 -0
  23. package/dist/timecampus/pages/extend/extendHelpers.d.ts.map +1 -0
  24. package/dist/timecampus/pages/extend/extendHelpers.js +105 -0
  25. package/dist/timecampus/pages/extend/extendHelpers.js.map +1 -0
  26. package/dist/timecampus/pages/extend/useOpenRoute.d.ts +7 -0
  27. package/dist/timecampus/pages/extend/useOpenRoute.d.ts.map +1 -0
  28. package/dist/timecampus/pages/extend/useOpenRoute.js +19 -0
  29. package/dist/timecampus/pages/extend/useOpenRoute.js.map +1 -0
  30. package/dist/timecampus/pages/lifetime/RecommendationsPage.d.ts.map +1 -1
  31. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +337 -314
  32. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  33. package/dist/timecampus/pages/lifetime/recommendationEvidence.d.ts +18 -0
  34. package/dist/timecampus/pages/lifetime/recommendationEvidence.d.ts.map +1 -1
  35. package/dist/timecampus/pages/lifetime/recommendationEvidence.js +21 -1
  36. package/dist/timecampus/pages/lifetime/recommendationEvidence.js.map +1 -1
  37. package/dist/timecampus/pages/timeline/TimelinePage.d.ts.map +1 -1
  38. package/dist/timecampus/pages/timeline/TimelinePage.js +212 -207
  39. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  40. package/package.json +1 -1
@@ -1,23 +1,23 @@
1
- import { useTimeCampus as e } from "../../providers/TimeCampusProvider.js";
2
- import { cn as t } from "../../utils/helpers.js";
3
- import { StatCard as n } from "../../components/StatCard.js";
4
- import { LoadingSkeleton as r } from "../../components/LoadingSkeleton.js";
5
- import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { useAcceptRecommendationMutation as a, useDismissRecommendationMutation as o, useGenerateMyRecommendationsMutation as s, useMyRecommendationPreferencesQuery as c, useMyRecommendationsQuery as l, useSnoozeRecommendationMutation as u, useUpdateMyRecommendationPreferencesMutation as d } from "../../../generated/wspace-operations.js";
7
- import { PageLayout as f } from "../../components/PageLayout.js";
8
- import { StatusBadge as ee } from "../../components/StatusBadge.js";
9
- import { Modal as p } from "../../components/Modal.js";
10
- import { ToastContainer as m, useToast as h } from "../../components/Toast.js";
1
+ import { useTimeCampus as e, useTimeCampusNavigate as t } from "../../providers/TimeCampusProvider.js";
2
+ import { cn as n } from "../../utils/helpers.js";
3
+ import { StatCard as r } from "../../components/StatCard.js";
4
+ import { LoadingSkeleton as i } from "../../components/LoadingSkeleton.js";
5
+ import { EmptyState as a } from "../../components/EmptyState.js";
6
+ import { useAcceptRecommendationMutation as o, useDismissRecommendationMutation as s, useGenerateMyRecommendationsMutation as c, useMyRecommendationPreferencesQuery as l, useMyRecommendationsQuery as u, useSnoozeRecommendationMutation as d, useUpdateMyRecommendationPreferencesMutation as f } from "../../../generated/wspace-operations.js";
7
+ import { PageLayout as p } from "../../components/PageLayout.js";
8
+ import { StatusBadge as m } from "../../components/StatusBadge.js";
9
+ import { Modal as h } from "../../components/Modal.js";
10
+ import { ToastContainer as g, useToast as _ } from "../../components/Toast.js";
11
11
  import "../../components/index.js";
12
- import { TimeCampusLifeDomain as g } from "../../../generated/wspace-types.js";
13
- import { lifeDomainLabel as _ } from "./domains.js";
14
- import { formatEvidenceRef as v, formatHourOfDay as y, humaniseToken as b, parseEvidenceRefs as x, parseSuggestedAction as S } from "./recommendationEvidence.js";
15
- import { useMemo as C, useState as w } from "react";
16
- import { BellOff as T, Briefcase as E, Bus as D, CalendarClock as O, Check as k, CheckCircle2 as te, ChevronDown as ne, Circle as re, Clock as A, Coffee as j, GraduationCap as ie, Handshake as ae, Heart as oe, HeartPulse as se, Home as M, Hourglass as ce, Lightbulb as N, Microscope as le, Moon as ue, ShieldCheck as P, Sparkles as F, Users as I, Wallet as L, X as R } from "lucide-react";
17
- import { Fragment as de, jsx as z, jsxs as B } from "react/jsx-runtime";
18
- import { GlassCard as V } from "@burdenoff/fe-libs/ui";
12
+ import { TimeCampusLifeDomain as v } from "../../../generated/wspace-types.js";
13
+ import { lifeDomainLabel as y } from "./domains.js";
14
+ import { evidenceWeeks as b, formatEvidenceRef as x, formatHourOfDay as S, humaniseToken as C, parseEvidenceRefs as w, parseSuggestedAction as T } from "./recommendationEvidence.js";
15
+ import { useMemo as E, useState as D } from "react";
16
+ import { BellOff as O, Briefcase as k, Bus as A, CalendarClock as ee, Check as te, CheckCircle2 as ne, ChevronDown as j, Circle as re, Clock as M, Coffee as ie, ExternalLink as ae, GraduationCap as oe, Handshake as N, Heart as se, HeartPulse as ce, Home as le, Hourglass as ue, Lightbulb as P, Microscope as F, Moon as I, ShieldCheck as L, Sparkles as R, Users as z, Wallet as B, X as V } from "lucide-react";
17
+ import { Fragment as de, jsx as H, jsxs as U } from "react/jsx-runtime";
18
+ import { GlassCard as W } from "@burdenoff/fe-libs/ui";
19
19
  //#region src/timecampus/pages/lifetime/RecommendationsPage.tsx
20
- var H = {
20
+ var G = "Raised by TimeCampus's built-in rules from your own tracked time. It can be wrong for your week, so judge it before you accept.", K = {
21
21
  New: "NEW",
22
22
  Snoozed: "SNOOZED",
23
23
  Accepted: "ACCEPTED",
@@ -25,70 +25,70 @@ var H = {
25
25
  Expired: "EXPIRED"
26
26
  }, fe = [
27
27
  {
28
- key: H.New,
28
+ key: K.New,
29
29
  label: "New"
30
30
  },
31
31
  {
32
- key: H.Snoozed,
32
+ key: K.Snoozed,
33
33
  label: "Snoozed"
34
34
  },
35
35
  {
36
- key: H.Accepted,
36
+ key: K.Accepted,
37
37
  label: "Accepted"
38
38
  },
39
39
  {
40
- key: H.Dismissed,
40
+ key: K.Dismissed,
41
41
  label: "Dismissed"
42
42
  }
43
43
  ];
44
- function U(e) {
45
- return e === H.New || e === H.Snoozed;
44
+ function pe(e) {
45
+ return e === K.New || e === K.Snoozed;
46
46
  }
47
- function pe() {
47
+ function me() {
48
48
  return new Date(Date.now() + 6048e5).toISOString();
49
49
  }
50
- var W = (e) => Math.min(1, Math.max(0, e)), G = (e) => `${Math.round(W(e) * 100)}%`;
51
- function K(e) {
50
+ var he = (e) => Math.min(1, Math.max(0, e)), q = (e) => `${Math.round(he(e) * 100)}%`;
51
+ function J(e) {
52
52
  return new Date(e).toLocaleDateString(void 0, {
53
53
  month: "short",
54
54
  day: "numeric",
55
55
  year: "numeric"
56
56
  });
57
57
  }
58
- var q = Array.from({ length: 24 }, (e, t) => t), me = {
59
- [g.Work]: E,
60
- [g.Sleep]: ue,
61
- [g.Health]: se,
62
- [g.Family]: I,
63
- [g.Learning]: ie,
64
- [g.Leisure]: j,
65
- [g.Commute]: D,
66
- [g.Waiting]: ce,
67
- [g.Chores]: M,
68
- [g.SelfCare]: oe,
69
- [g.Social]: ae,
70
- [g.FinanceAdmin]: L,
71
- [g.Reflection]: F,
72
- [g.Other]: re
58
+ var Y = Array.from({ length: 24 }, (e, t) => t), ge = {
59
+ [v.Work]: k,
60
+ [v.Sleep]: I,
61
+ [v.Health]: ce,
62
+ [v.Family]: z,
63
+ [v.Learning]: oe,
64
+ [v.Leisure]: ie,
65
+ [v.Commute]: A,
66
+ [v.Waiting]: ue,
67
+ [v.Chores]: le,
68
+ [v.SelfCare]: se,
69
+ [v.Social]: N,
70
+ [v.FinanceAdmin]: B,
71
+ [v.Reflection]: R,
72
+ [v.Other]: re
73
73
  };
74
- function he(e) {
75
- return e ? me[e] ?? N : N;
74
+ function _e(e) {
75
+ return e ? ge[e] ?? P : P;
76
76
  }
77
- function ge(e) {
77
+ function ve(e) {
78
78
  switch (e) {
79
- case H.Accepted: return {
79
+ case K.Accepted: return {
80
80
  variant: "success",
81
81
  label: "Accepted"
82
82
  };
83
- case H.Snoozed: return {
83
+ case K.Snoozed: return {
84
84
  variant: "warning",
85
85
  label: "Snoozed"
86
86
  };
87
- case H.Dismissed: return {
87
+ case K.Dismissed: return {
88
88
  variant: "muted",
89
89
  label: "Dismissed"
90
90
  };
91
- case H.Expired: return {
91
+ case K.Expired: return {
92
92
  variant: "muted",
93
93
  label: "Expired"
94
94
  };
@@ -98,104 +98,109 @@ function ge(e) {
98
98
  };
99
99
  }
100
100
  }
101
- var J = "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", Y = "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", X = "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary";
102
- function _e({ checked: e, onChange: n, label: r, disabled: i }) {
103
- return /* @__PURE__ */ z("button", {
101
+ var ye = "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 px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken/50 disabled:opacity-50", Z = "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary";
102
+ function be({ checked: e, onChange: t, label: r, disabled: i }) {
103
+ return /* @__PURE__ */ H("button", {
104
104
  type: "button",
105
105
  role: "switch",
106
106
  "aria-checked": e,
107
107
  "aria-label": r,
108
108
  disabled: i,
109
- onClick: () => n(!e),
110
- className: t("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
111
- children: /* @__PURE__ */ z("span", { className: t("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
109
+ onClick: () => t(!e),
110
+ className: n("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50", e ? "border-transparent bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
111
+ children: /* @__PURE__ */ H("span", { className: n("inline-block h-3.5 w-3.5 transform rounded-full shadow-sm transition-transform", e ? "translate-x-4 bg-action-primary-text" : "translate-x-0.5 bg-text-secondary") })
112
112
  });
113
113
  }
114
- function ve({ rec: e, busy: n, muted: r, onAccept: i, onSnooze: a, onDismiss: o, onMuteKind: s }) {
115
- let c = he(e.domain), l = U(e.state), u = ge(e.state), [d, f] = w(!1), p = x(e.evidenceRefs), m = S(e.suggestedAction), h = `rec-evidence-${e.id}`;
116
- return /* @__PURE__ */ B(V, {
114
+ function xe({ rec: e, busy: r, muted: i, onAccept: a, onSnooze: o, onDismiss: s, onMuteKind: c }) {
115
+ let l = _e(e.domain), u = pe(e.state), d = ve(e.state), [f, p] = D(!1), h = w(e.evidenceRefs), g = T(e.suggestedAction), _ = `rec-evidence-${e.id}`, v = b(e.createdAt, h), S = t();
116
+ return /* @__PURE__ */ U(W, {
117
117
  treatment: "glass",
118
118
  className: "flex flex-col gap-3 p-4 sm:p-5",
119
119
  children: [
120
- /* @__PURE__ */ B("div", {
120
+ /* @__PURE__ */ U("div", {
121
121
  className: "flex items-start justify-between gap-3",
122
- children: [/* @__PURE__ */ B("div", {
122
+ children: [/* @__PURE__ */ U("div", {
123
123
  className: "flex min-w-0 items-center gap-3",
124
- children: [/* @__PURE__ */ z("span", {
124
+ children: [/* @__PURE__ */ H("span", {
125
125
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
126
- children: /* @__PURE__ */ z(c, { className: "h-5 w-5" })
127
- }), /* @__PURE__ */ B("div", {
126
+ children: /* @__PURE__ */ H(l, { className: "h-5 w-5" })
127
+ }), /* @__PURE__ */ U("div", {
128
128
  className: "min-w-0",
129
- children: [/* @__PURE__ */ z("p", {
129
+ children: [/* @__PURE__ */ H("p", {
130
130
  className: "truncate text-xs font-medium uppercase tracking-wide text-text-secondary",
131
- children: b(e.kind)
132
- }), /* @__PURE__ */ z("h3", {
131
+ children: C(e.kind)
132
+ }), /* @__PURE__ */ H("h3", {
133
133
  className: "mt-0.5 text-base font-semibold text-text-primary",
134
134
  children: e.title
135
135
  })]
136
136
  })]
137
- }), e.confidence != null && /* @__PURE__ */ z(ee, {
137
+ }), e.confidence != null && /* @__PURE__ */ H(m, {
138
138
  variant: "info",
139
- label: `${G(e.confidence)} confident`,
139
+ label: `${q(e.confidence)} confident`,
140
140
  className: "shrink-0"
141
141
  })]
142
142
  }),
143
- /* @__PURE__ */ z("p", {
143
+ /* @__PURE__ */ H("p", {
144
144
  className: "text-sm text-text-secondary",
145
145
  children: e.rationale
146
146
  }),
147
- /* @__PURE__ */ B("div", {
147
+ /* @__PURE__ */ H("p", {
148
+ className: "text-xs text-text-tertiary",
149
+ "data-testid": "rec-provenance",
150
+ children: G
151
+ }),
152
+ /* @__PURE__ */ U("div", {
148
153
  className: "flex flex-wrap items-center gap-1.5",
149
154
  children: [
150
- e.domain && /* @__PURE__ */ z("span", {
151
- className: X,
152
- children: _(e.domain)
155
+ e.domain && /* @__PURE__ */ H("span", {
156
+ className: Z,
157
+ children: y(e.domain)
153
158
  }),
154
- e.valueAlignment != null && /* @__PURE__ */ B("span", {
155
- className: X,
159
+ e.valueAlignment != null && /* @__PURE__ */ U("span", {
160
+ className: Z,
156
161
  children: [
157
- /* @__PURE__ */ z(P, { className: "h-3 w-3" }),
162
+ /* @__PURE__ */ H(L, { className: "h-3 w-3" }),
158
163
  "Aligns with your values · ",
159
- G(e.valueAlignment)
164
+ q(e.valueAlignment)
160
165
  ]
161
166
  }),
162
- e.state === H.Snoozed && e.snoozeUntil && /* @__PURE__ */ B("span", {
163
- className: X,
167
+ e.state === K.Snoozed && e.snoozeUntil && /* @__PURE__ */ U("span", {
168
+ className: Z,
164
169
  children: [
165
- /* @__PURE__ */ z(A, { className: "h-3 w-3" }),
170
+ /* @__PURE__ */ H(M, { className: "h-3 w-3" }),
166
171
  "Snoozed until ",
167
- K(e.snoozeUntil)
172
+ J(e.snoozeUntil)
168
173
  ]
169
174
  }),
170
- l && e.expiresAt && /* @__PURE__ */ B("span", {
171
- className: X,
175
+ u && e.expiresAt && /* @__PURE__ */ U("span", {
176
+ className: Z,
172
177
  children: [
173
- /* @__PURE__ */ z(O, { className: "h-3 w-3" }),
178
+ /* @__PURE__ */ H(ee, { className: "h-3 w-3" }),
174
179
  "Expires ",
175
- K(e.expiresAt)
180
+ J(e.expiresAt)
176
181
  ]
177
182
  })
178
183
  ]
179
184
  }),
180
- m && /* @__PURE__ */ B("div", {
185
+ g && /* @__PURE__ */ U("div", {
181
186
  className: "rounded-lg border border-border-seam bg-bg-sunken/40 p-3",
182
187
  children: [
183
- /* @__PURE__ */ z("p", {
188
+ /* @__PURE__ */ H("p", {
184
189
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
185
190
  children: "Suggested action"
186
191
  }),
187
- /* @__PURE__ */ z("p", {
192
+ /* @__PURE__ */ H("p", {
188
193
  className: "mt-1 text-sm font-medium text-text-primary",
189
- children: b(m.type)
194
+ children: C(g.type)
190
195
  }),
191
- m.details.length > 0 && /* @__PURE__ */ z("dl", {
196
+ g.details.length > 0 && /* @__PURE__ */ H("dl", {
192
197
  className: "mt-1.5 flex flex-wrap gap-x-4 gap-y-1",
193
- children: m.details.map((e) => /* @__PURE__ */ B("div", {
198
+ children: g.details.map((e) => /* @__PURE__ */ U("div", {
194
199
  className: "flex items-center gap-1.5",
195
- children: [/* @__PURE__ */ z("dt", {
200
+ children: [/* @__PURE__ */ H("dt", {
196
201
  className: "text-xs text-text-secondary",
197
202
  children: e.key
198
- }), /* @__PURE__ */ z("dd", {
203
+ }), /* @__PURE__ */ H("dd", {
199
204
  className: "text-xs font-medium tabular-nums text-text-primary",
200
205
  children: e.value
201
206
  })]
@@ -203,88 +208,106 @@ function ve({ rec: e, busy: n, muted: r, onAccept: i, onSnooze: a, onDismiss: o,
203
208
  })
204
209
  ]
205
210
  }),
206
- p.length > 0 && /* @__PURE__ */ B("div", {
211
+ h.length > 0 && /* @__PURE__ */ U("div", {
207
212
  className: "rounded-lg border border-border-seam bg-bg-sunken/40",
208
- children: [/* @__PURE__ */ B("button", {
213
+ children: [/* @__PURE__ */ U("button", {
209
214
  type: "button",
210
- onClick: () => f((e) => !e),
211
- "aria-expanded": d,
212
- "aria-controls": h,
215
+ onClick: () => p((e) => !e),
216
+ "aria-expanded": f,
217
+ "aria-controls": _,
213
218
  className: "flex w-full items-center justify-between gap-2 px-3 py-2 text-left",
214
- children: [/* @__PURE__ */ B("span", {
219
+ children: [/* @__PURE__ */ U("span", {
215
220
  className: "flex min-w-0 items-center gap-2",
216
- children: [/* @__PURE__ */ z(le, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary" }), /* @__PURE__ */ B("span", {
221
+ children: [/* @__PURE__ */ H(F, { className: "h-3.5 w-3.5 shrink-0 text-text-secondary" }), /* @__PURE__ */ U("span", {
217
222
  className: "truncate text-xs text-text-secondary",
218
223
  children: [
219
224
  "Evidence: ",
220
- v(p[0]),
221
- p.length > 1 ? ` · +${p.length - 1} more` : ""
225
+ x(h[0]),
226
+ h.length > 1 ? ` · +${h.length - 1} more` : ""
222
227
  ]
223
228
  })]
224
- }), /* @__PURE__ */ z(ne, { className: t("h-4 w-4 shrink-0 text-text-secondary transition-transform", d && "rotate-180") })]
225
- }), d && /* @__PURE__ */ B("dl", {
226
- id: h,
229
+ }), /* @__PURE__ */ H(j, { className: n("h-4 w-4 shrink-0 text-text-secondary transition-transform", f && "rotate-180") })]
230
+ }), f && /* @__PURE__ */ U("dl", {
231
+ id: _,
227
232
  className: "space-y-1.5 border-t border-border-seam px-3 py-2.5",
228
- children: [p.map((e, t) => /* @__PURE__ */ B("div", {
229
- className: "flex items-baseline justify-between gap-3",
230
- children: [/* @__PURE__ */ z("dt", {
231
- className: "text-xs text-text-secondary",
232
- children: v(e).split(": ")[0]
233
- }), /* @__PURE__ */ z("dd", {
234
- className: "text-xs font-medium tabular-nums text-text-primary",
235
- children: v(e).split(": ").slice(1).join(": ")
236
- })]
237
- }, `${e.metric}-${e.period ?? e.domain ?? t}`)), /* @__PURE__ */ z("p", {
238
- className: "pt-1 text-xs text-text-tertiary",
239
- children: "Measured from your own tracked week. Nothing is applied until you accept."
240
- })]
233
+ children: [
234
+ h.map((e, t) => /* @__PURE__ */ U("div", {
235
+ className: "flex items-baseline justify-between gap-3",
236
+ children: [/* @__PURE__ */ H("dt", {
237
+ className: "text-xs text-text-secondary",
238
+ children: x(e).split(": ")[0]
239
+ }), /* @__PURE__ */ H("dd", {
240
+ className: "text-xs font-medium tabular-nums text-text-primary",
241
+ children: x(e).split(": ").slice(1).join(": ")
242
+ })]
243
+ }, `${e.metric}-${e.period ?? e.domain ?? t}`)),
244
+ v.length > 0 && /* @__PURE__ */ H("div", {
245
+ className: "flex flex-wrap gap-2 pt-1",
246
+ children: v.map((e) => /* @__PURE__ */ U("button", {
247
+ type: "button",
248
+ onClick: () => S(`/timeline?date=${encodeURIComponent(e)}`),
249
+ "data-testid": "rec-evidence-timeline-link",
250
+ className: "inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/40",
251
+ children: [
252
+ /* @__PURE__ */ H(ae, { className: "h-3 w-3" }),
253
+ "Open the week of ",
254
+ J(`${e}T12:00:00`),
255
+ " on your timeline"
256
+ ]
257
+ }, e))
258
+ }),
259
+ /* @__PURE__ */ H("p", {
260
+ className: "pt-1 text-xs text-text-tertiary",
261
+ children: "Measured from your own tracked week. Nothing is applied until you accept."
262
+ })
263
+ ]
241
264
  })]
242
265
  }),
243
- l ? /* @__PURE__ */ B("div", {
266
+ u ? /* @__PURE__ */ U("div", {
244
267
  className: "flex flex-wrap items-center gap-2 pt-1",
245
268
  children: [
246
- /* @__PURE__ */ B("button", {
269
+ /* @__PURE__ */ U("button", {
247
270
  type: "button",
248
- onClick: () => i(e.id),
249
- disabled: n,
250
- className: J,
251
- children: [/* @__PURE__ */ z(k, { className: "h-4 w-4" }), "Accept"]
271
+ onClick: () => a(e.id),
272
+ disabled: r,
273
+ className: ye,
274
+ children: [/* @__PURE__ */ H(te, { className: "h-4 w-4" }), "Accept"]
252
275
  }),
253
- /* @__PURE__ */ B("button", {
276
+ /* @__PURE__ */ U("button", {
254
277
  type: "button",
255
- onClick: () => a(e.id),
256
- disabled: n,
257
- className: Y,
258
- children: [/* @__PURE__ */ z(A, { className: "h-4 w-4" }), "Snooze"]
278
+ onClick: () => o(e.id),
279
+ disabled: r,
280
+ className: X,
281
+ children: [/* @__PURE__ */ H(M, { className: "h-4 w-4" }), "Snooze"]
259
282
  }),
260
- /* @__PURE__ */ B("button", {
283
+ /* @__PURE__ */ U("button", {
261
284
  type: "button",
262
- onClick: () => o(e),
263
- disabled: n,
264
- className: Y,
265
- children: [/* @__PURE__ */ z(R, { className: "h-4 w-4" }), "Dismiss"]
285
+ onClick: () => s(e),
286
+ disabled: r,
287
+ className: X,
288
+ children: [/* @__PURE__ */ H(V, { className: "h-4 w-4" }), "Dismiss"]
266
289
  }),
267
- /* @__PURE__ */ B("button", {
290
+ /* @__PURE__ */ U("button", {
268
291
  type: "button",
269
- onClick: () => s(e.kind),
270
- disabled: n || r,
271
- className: Y,
272
- title: r ? `${b(e.kind)} suggestions are already muted` : `Stop generating ${b(e.kind)} suggestions`,
273
- children: [/* @__PURE__ */ z(T, { className: "h-4 w-4" }), r ? "Muted" : "Mute this kind"]
292
+ onClick: () => c(e.kind),
293
+ disabled: r || i,
294
+ className: X,
295
+ title: i ? `${C(e.kind)} suggestions are already muted` : `Stop generating ${C(e.kind)} suggestions`,
296
+ children: [/* @__PURE__ */ H(O, { className: "h-4 w-4" }), i ? "Muted" : "Mute this kind"]
274
297
  })
275
298
  ]
276
- }) : /* @__PURE__ */ B("div", {
299
+ }) : /* @__PURE__ */ U("div", {
277
300
  className: "flex flex-col gap-2 pt-1",
278
- children: [/* @__PURE__ */ B("div", {
301
+ children: [/* @__PURE__ */ U("div", {
279
302
  className: "flex items-center justify-between gap-2",
280
- children: [/* @__PURE__ */ z(ee, {
281
- variant: u.variant,
282
- label: u.label
283
- }), /* @__PURE__ */ z("span", {
303
+ children: [/* @__PURE__ */ H(m, {
304
+ variant: d.variant,
305
+ label: d.label
306
+ }), /* @__PURE__ */ H("span", {
284
307
  className: "text-xs text-text-secondary",
285
- children: K(e.createdAt)
308
+ children: J(e.createdAt)
286
309
  })]
287
- }), e.state === H.Dismissed && e.dismissReason && /* @__PURE__ */ B("p", {
310
+ }), e.state === K.Dismissed && e.dismissReason && /* @__PURE__ */ U("p", {
288
311
  className: "text-xs text-text-secondary",
289
312
  children: ["Reason given: ", e.dismissReason]
290
313
  })]
@@ -292,104 +315,104 @@ function ve({ rec: e, busy: n, muted: r, onAccept: i, onSnooze: a, onDismiss: o,
292
315
  ]
293
316
  });
294
317
  }
295
- function ye({ prefs: e, loading: n, saving: i, onToggleOutputGuard: a, onQuietHoursChange: o, onUnmuteKind: s }) {
296
- if (n) return /* @__PURE__ */ z(r, {
318
+ function Se({ prefs: e, loading: t, saving: r, onToggleOutputGuard: a, onQuietHoursChange: o, onUnmuteKind: s }) {
319
+ if (t) return /* @__PURE__ */ H(i, {
297
320
  variant: "card",
298
321
  count: 1
299
322
  });
300
323
  if (!e) return null;
301
- let c = y(e.quietHoursStart), l = y(e.quietHoursEnd), u = c !== null && l !== null, d = "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40 disabled:opacity-50";
302
- return /* @__PURE__ */ B(V, {
324
+ let c = S(e.quietHoursStart), l = S(e.quietHoursEnd), u = c !== null && l !== null, d = "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/40 disabled:opacity-50";
325
+ return /* @__PURE__ */ U(W, {
303
326
  treatment: "glass",
304
327
  className: "p-4 sm:p-5",
305
328
  children: [
306
- /* @__PURE__ */ B("div", {
329
+ /* @__PURE__ */ U("div", {
307
330
  className: "flex items-center gap-2",
308
- children: [/* @__PURE__ */ z(P, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ z("h3", {
331
+ children: [/* @__PURE__ */ H(L, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ H("h3", {
309
332
  className: "text-sm font-semibold text-text-primary",
310
333
  children: "Guardrails"
311
334
  })]
312
335
  }),
313
- /* @__PURE__ */ z("p", {
336
+ /* @__PURE__ */ H("p", {
314
337
  className: "mt-1 text-xs text-text-secondary",
315
338
  children: "What TimeCampus is allowed to suggest, and when."
316
339
  }),
317
- /* @__PURE__ */ B("div", {
340
+ /* @__PURE__ */ U("div", {
318
341
  className: "mt-4 space-y-4",
319
342
  children: [
320
- /* @__PURE__ */ B("div", {
343
+ /* @__PURE__ */ U("div", {
321
344
  className: "flex items-start justify-between gap-3",
322
- children: [/* @__PURE__ */ B("div", {
345
+ children: [/* @__PURE__ */ U("div", {
323
346
  className: "min-w-0",
324
- children: [/* @__PURE__ */ z("p", {
347
+ children: [/* @__PURE__ */ H("p", {
325
348
  className: "text-sm font-medium text-text-primary",
326
349
  children: "Never suggest more work"
327
- }), /* @__PURE__ */ z("p", {
350
+ }), /* @__PURE__ */ H("p", {
328
351
  className: "mt-0.5 text-xs text-text-secondary",
329
352
  children: "Output-increasing suggestions are filtered out before they reach you."
330
353
  })]
331
- }), /* @__PURE__ */ z(_e, {
354
+ }), /* @__PURE__ */ H(be, {
332
355
  checked: e.neverOptimiseForOutput,
333
- disabled: i,
356
+ disabled: r,
334
357
  label: "Never suggest more work",
335
358
  onChange: a
336
359
  })]
337
360
  }),
338
- /* @__PURE__ */ B("div", {
361
+ /* @__PURE__ */ U("div", {
339
362
  className: "border-t border-border-seam pt-4",
340
363
  children: [
341
- /* @__PURE__ */ B("div", {
364
+ /* @__PURE__ */ U("div", {
342
365
  className: "flex items-center justify-between gap-3",
343
- children: [/* @__PURE__ */ z("p", {
366
+ children: [/* @__PURE__ */ H("p", {
344
367
  className: "text-sm font-medium text-text-primary",
345
368
  children: "Quiet hours"
346
- }), /* @__PURE__ */ z("span", {
369
+ }), /* @__PURE__ */ H("span", {
347
370
  className: "text-xs text-text-secondary",
348
371
  children: u ? `${c}–${l}` : "Not set"
349
372
  })]
350
373
  }),
351
- /* @__PURE__ */ z("p", {
374
+ /* @__PURE__ */ H("p", {
352
375
  className: "mt-0.5 text-xs text-text-secondary",
353
376
  children: "No nudges are sent inside this window."
354
377
  }),
355
- /* @__PURE__ */ B("div", {
378
+ /* @__PURE__ */ U("div", {
356
379
  className: "mt-2 flex flex-wrap items-center gap-2",
357
380
  children: [
358
- /* @__PURE__ */ B("label", {
381
+ /* @__PURE__ */ U("label", {
359
382
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
360
- children: ["From", /* @__PURE__ */ B("select", {
383
+ children: ["From", /* @__PURE__ */ U("select", {
361
384
  className: d,
362
- disabled: i,
385
+ disabled: r,
363
386
  value: e.quietHoursStart ?? "",
364
387
  onChange: (t) => o(t.target.value === "" ? null : Number(t.target.value), e.quietHoursEnd ?? null),
365
- children: [/* @__PURE__ */ z("option", {
388
+ children: [/* @__PURE__ */ H("option", {
366
389
  value: "",
367
390
  children: "—"
368
- }), q.map((e) => /* @__PURE__ */ z("option", {
391
+ }), Y.map((e) => /* @__PURE__ */ H("option", {
369
392
  value: e,
370
- children: y(e)
393
+ children: S(e)
371
394
  }, e))]
372
395
  })]
373
396
  }),
374
- /* @__PURE__ */ B("label", {
397
+ /* @__PURE__ */ U("label", {
375
398
  className: "flex items-center gap-1.5 text-xs text-text-secondary",
376
- children: ["To", /* @__PURE__ */ B("select", {
399
+ children: ["To", /* @__PURE__ */ U("select", {
377
400
  className: d,
378
- disabled: i,
401
+ disabled: r,
379
402
  value: e.quietHoursEnd ?? "",
380
403
  onChange: (t) => o(e.quietHoursStart ?? null, t.target.value === "" ? null : Number(t.target.value)),
381
- children: [/* @__PURE__ */ z("option", {
404
+ children: [/* @__PURE__ */ H("option", {
382
405
  value: "",
383
406
  children: "—"
384
- }), q.map((e) => /* @__PURE__ */ z("option", {
407
+ }), Y.map((e) => /* @__PURE__ */ H("option", {
385
408
  value: e,
386
- children: y(e)
409
+ children: S(e)
387
410
  }, e))]
388
411
  })]
389
412
  }),
390
- u && /* @__PURE__ */ z("button", {
413
+ u && /* @__PURE__ */ H("button", {
391
414
  type: "button",
392
- disabled: i,
415
+ disabled: r,
393
416
  onClick: () => o(null, null),
394
417
  className: "text-xs font-medium text-text-secondary underline-offset-2 hover:text-text-primary hover:underline disabled:opacity-50",
395
418
  children: "Clear"
@@ -398,51 +421,51 @@ function ye({ prefs: e, loading: n, saving: i, onToggleOutputGuard: a, onQuietHo
398
421
  })
399
422
  ]
400
423
  }),
401
- /* @__PURE__ */ B("div", {
424
+ /* @__PURE__ */ U("div", {
402
425
  className: "border-t border-border-seam pt-4",
403
- children: [/* @__PURE__ */ B("div", {
426
+ children: [/* @__PURE__ */ U("div", {
404
427
  className: "flex items-center justify-between gap-3",
405
- children: [/* @__PURE__ */ z("p", {
428
+ children: [/* @__PURE__ */ H("p", {
406
429
  className: "text-sm font-medium text-text-primary",
407
430
  children: "Muted kinds"
408
- }), /* @__PURE__ */ z("span", {
409
- className: X,
431
+ }), /* @__PURE__ */ H("span", {
432
+ className: Z,
410
433
  children: e.mutedKinds.length
411
434
  })]
412
- }), e.mutedKinds.length === 0 ? /* @__PURE__ */ z("p", {
435
+ }), e.mutedKinds.length === 0 ? /* @__PURE__ */ H("p", {
413
436
  className: "mt-0.5 text-xs text-text-secondary",
414
437
  children: "Nothing muted — mute a kind from any suggestion to stop it coming back."
415
- }) : /* @__PURE__ */ z("div", {
438
+ }) : /* @__PURE__ */ H("div", {
416
439
  className: "mt-2 flex flex-wrap gap-1.5",
417
- children: e.mutedKinds.map((e) => /* @__PURE__ */ B("button", {
440
+ children: e.mutedKinds.map((e) => /* @__PURE__ */ U("button", {
418
441
  type: "button",
419
- disabled: i,
442
+ disabled: r,
420
443
  onClick: () => s(e),
421
- className: t(X, "hover:text-text-primary disabled:opacity-50"),
422
- title: `Unmute ${b(e)} suggestions`,
423
- children: [b(e), /* @__PURE__ */ z(R, { className: "h-3 w-3" })]
444
+ className: n(Z, "hover:text-text-primary disabled:opacity-50"),
445
+ title: `Unmute ${C(e)} suggestions`,
446
+ children: [C(e), /* @__PURE__ */ H(V, { className: "h-3 w-3" })]
424
447
  }, e))
425
448
  })]
426
449
  }),
427
- /* @__PURE__ */ B("div", {
450
+ /* @__PURE__ */ U("div", {
428
451
  className: "border-t border-border-seam pt-4",
429
- children: [/* @__PURE__ */ B("div", {
452
+ children: [/* @__PURE__ */ U("div", {
430
453
  className: "flex items-center justify-between gap-3",
431
- children: [/* @__PURE__ */ z("p", {
454
+ children: [/* @__PURE__ */ H("p", {
432
455
  className: "text-sm font-medium text-text-primary",
433
456
  children: "Cadence"
434
- }), /* @__PURE__ */ z("span", {
457
+ }), /* @__PURE__ */ H("span", {
435
458
  className: "text-xs text-text-secondary",
436
- children: b(e.cadence)
459
+ children: C(e.cadence)
437
460
  })]
438
- }), e.optedInDomains.length > 0 && /* @__PURE__ */ B(de, { children: [/* @__PURE__ */ z("p", {
461
+ }), e.optedInDomains.length > 0 && /* @__PURE__ */ U(de, { children: [/* @__PURE__ */ H("p", {
439
462
  className: "mt-3 text-sm font-medium text-text-primary",
440
463
  children: "Opted-in domains"
441
- }), /* @__PURE__ */ z("div", {
464
+ }), /* @__PURE__ */ H("div", {
442
465
  className: "mt-1.5 flex flex-wrap gap-1.5",
443
- children: e.optedInDomains.map((e) => /* @__PURE__ */ z("span", {
444
- className: X,
445
- children: _(e)
466
+ children: e.optedInDomains.map((e) => /* @__PURE__ */ H("span", {
467
+ className: Z,
468
+ children: y(e)
446
469
  }, e))
447
470
  })] })]
448
471
  })
@@ -451,17 +474,17 @@ function ye({ prefs: e, loading: n, saving: i, onToggleOutputGuard: a, onQuietHo
451
474
  ]
452
475
  });
453
476
  }
454
- function be(e) {
477
+ function Ce(e) {
455
478
  switch (e) {
456
- case H.Snoozed: return {
479
+ case K.Snoozed: return {
457
480
  title: "Nothing snoozed",
458
481
  description: "Suggestions you snooze for later will wait here quietly until they're worth another look."
459
482
  };
460
- case H.Accepted: return {
483
+ case K.Accepted: return {
461
484
  title: "Nothing accepted yet",
462
485
  description: "When you accept a suggestion it moves here, so you can see the changes you chose to make."
463
486
  };
464
- case H.Dismissed: return {
487
+ case K.Dismissed: return {
465
488
  title: "Nothing dismissed",
466
489
  description: "Suggestions you dismiss are kept here — TimeCampus learns from them and won't keep nagging."
467
490
  };
@@ -471,80 +494,80 @@ function be(e) {
471
494
  };
472
495
  }
473
496
  }
474
- function xe() {
475
- let { workspaceId: t } = e(), { toasts: ee, addToast: g, dismissToast: _ } = h(), [v, y] = w(H.New), [x, S] = w(null), [T, E] = w(null), [D, O] = w(""), { data: k, loading: ne, error: re, refetch: j } = l({
497
+ function we() {
498
+ let { workspaceId: t } = e(), { toasts: n, addToast: m, dismissToast: v } = _(), [y, b] = D(K.New), [x, S] = D(null), [w, T] = D(null), [O, k] = D(""), { data: A, loading: ee, error: te, refetch: j } = u({
476
499
  variables: { state: null },
477
500
  skip: !t
478
- }), { data: ie, loading: ae, refetch: oe } = c({ skip: !t }), [se, { loading: M }] = s(), [ce] = a(), [N] = o(), [le] = u(), [ue, { loading: I }] = d(), L = ie?.myRecommendationPreferences, U = C(() => new Set(L?.mutedKinds ?? []), [L?.mutedKinds]), W = C(() => k?.myRecommendations ?? [], [k?.myRecommendations]), G = C(() => {
501
+ }), { data: re, loading: ie, refetch: ae } = l({ skip: !t }), [oe, { loading: N }] = c(), [se] = o(), [ce] = s(), [le] = d(), [ue, { loading: P }] = f(), F = re?.myRecommendationPreferences, I = E(() => new Set(F?.mutedKinds ?? []), [F?.mutedKinds]), z = E(() => A?.myRecommendations ?? [], [A?.myRecommendations]), B = E(() => {
479
502
  let e = {};
480
- for (let t of W) e[t.state] = (e[t.state] ?? 0) + 1;
503
+ for (let t of z) e[t.state] = (e[t.state] ?? 0) + 1;
481
504
  return e;
482
- }, [W]), K = C(() => W.filter((e) => e.state === v), [W, v]), q = G[H.New] ?? 0, me = G[H.Accepted] ?? 0, he = G[H.Snoozed] ?? 0, ge = async () => {
505
+ }, [z]), G = E(() => z.filter((e) => e.state === y), [z, y]), pe = B[K.New] ?? 0, he = B[K.Accepted] ?? 0, q = B[K.Snoozed] ?? 0, J = async () => {
483
506
  try {
484
- let e = (await se()).data?.generateMyRecommendations ?? [];
485
- g({
507
+ let e = (await oe()).data?.generateMyRecommendations ?? [];
508
+ m({
486
509
  title: e.length > 0 ? `${e.length} suggestion${e.length === 1 ? "" : "s"} ready` : "No new suggestions",
487
510
  description: e.length > 0 ? "Fresh, values-aware ideas are in your New feed." : "You're all caught up — nothing new to suggest right now.",
488
511
  variant: e.length > 0 ? "success" : "info"
489
- }), y(H.New), await j();
512
+ }), b(K.New), await j();
490
513
  } catch {
491
- g({
514
+ m({
492
515
  title: "Couldn't generate recommendations",
493
516
  description: "Please try again in a moment.",
494
517
  variant: "error"
495
518
  });
496
519
  }
497
- }, X = async (e) => {
520
+ }, Y = async (e) => {
498
521
  S(e);
499
522
  try {
500
- await ce({ variables: { id: e } }), g({
523
+ await se({ variables: { id: e } }), m({
501
524
  title: "Accepted — nice",
502
525
  variant: "success"
503
526
  }), await j();
504
527
  } catch {
505
- g({
528
+ m({
506
529
  title: "Couldn't accept that one",
507
530
  variant: "error"
508
531
  });
509
532
  } finally {
510
533
  S(null);
511
534
  }
512
- }, _e = async (e) => {
535
+ }, ge = async (e) => {
513
536
  S(e);
514
537
  try {
515
538
  await le({ variables: {
516
539
  id: e,
517
- until: pe()
518
- } }), g({
540
+ until: me()
541
+ } }), m({
519
542
  title: "Snoozed for a week",
520
543
  description: "It'll resurface later — no nagging in between.",
521
544
  variant: "info"
522
545
  }), await j();
523
546
  } catch {
524
- g({
547
+ m({
525
548
  title: "Couldn't snooze that one",
526
549
  variant: "error"
527
550
  });
528
551
  } finally {
529
552
  S(null);
530
553
  }
531
- }, xe = (e) => {
532
- O(""), E(e);
533
- }, Se = async () => {
534
- let e = T;
554
+ }, _e = (e) => {
555
+ k(""), T(e);
556
+ }, ve = async () => {
557
+ let e = w;
535
558
  if (!e) return;
536
- let t = D.trim();
559
+ let t = O.trim();
537
560
  S(e.id);
538
561
  try {
539
- await N({ variables: {
562
+ await ce({ variables: {
540
563
  id: e.id,
541
564
  reason: t.length > 0 ? t : null
542
- } }), g({
565
+ } }), m({
543
566
  title: "Dismissed",
544
567
  variant: "success"
545
- }), E(null), O(""), await j();
568
+ }), T(null), k(""), await j();
546
569
  } catch {
547
- g({
570
+ m({
548
571
  title: "Couldn't dismiss that one",
549
572
  variant: "error"
550
573
  });
@@ -553,126 +576,126 @@ function xe() {
553
576
  }
554
577
  }, Z = async (e, t) => {
555
578
  try {
556
- await ue({ variables: { input: e } }), g({
579
+ await ue({ variables: { input: e } }), m({
557
580
  title: t,
558
581
  variant: "success"
559
- }), await oe();
582
+ }), await ae();
560
583
  } catch {
561
- g({
584
+ m({
562
585
  title: "Couldn't save that guardrail",
563
586
  description: "Please try again in a moment.",
564
587
  variant: "error"
565
588
  });
566
589
  }
567
- }, Ce = (e) => void Z({ neverOptimiseForOutput: e }, e ? "Output-increasing suggestions are off" : "Output-increasing suggestions allowed"), we = (e, t) => void Z({
590
+ }, be = (e) => void Z({ neverOptimiseForOutput: e }, e ? "Output-increasing suggestions are off" : "Output-increasing suggestions allowed"), we = (e, t) => void Z({
568
591
  quietHoursStart: e,
569
592
  quietHoursEnd: t
570
593
  }, e === null && t === null ? "Quiet hours cleared" : "Quiet hours saved"), Te = (e) => {
571
- U.has(e) || Z({ mutedKinds: [...U, e] }, `${b(e)} suggestions muted`);
572
- }, Ee = /* @__PURE__ */ z(ye, {
573
- prefs: L,
574
- loading: ae,
575
- saving: I,
576
- onToggleOutputGuard: Ce,
594
+ I.has(e) || Z({ mutedKinds: [...I, e] }, `${C(e)} suggestions muted`);
595
+ }, Ee = /* @__PURE__ */ H(Se, {
596
+ prefs: F,
597
+ loading: ie,
598
+ saving: P,
599
+ onToggleOutputGuard: be,
577
600
  onQuietHoursChange: we,
578
- onUnmuteKind: (e) => void Z({ mutedKinds: [...U].filter((t) => t !== e) }, `${b(e)} suggestions unmuted`)
579
- }), Q = /* @__PURE__ */ B("button", {
601
+ onUnmuteKind: (e) => void Z({ mutedKinds: [...I].filter((t) => t !== e) }, `${C(e)} suggestions unmuted`)
602
+ }), Q = /* @__PURE__ */ U("button", {
580
603
  type: "button",
581
- onClick: ge,
582
- disabled: M || !t,
583
- className: J,
584
- children: [/* @__PURE__ */ z(F, { className: "h-4 w-4" }), M ? "Generating…" : "Generate recommendations"]
585
- }), $ = "Gentle, values-aware nudges built from your real timeline — protect a focus block, reclaim a commute, guard family time. Accept the ones that fit, snooze the rest, and dismiss what doesn't. TimeCampus never optimises for more output — only for time that matches what you value.", De = /* @__PURE__ */ z(V, {
604
+ onClick: J,
605
+ disabled: N || !t,
606
+ className: ye,
607
+ children: [/* @__PURE__ */ H(R, { className: "h-4 w-4" }), N ? "Generating…" : "Generate recommendations"]
608
+ }), $ = "Gentle, values-aware nudges built from your real timeline — protect a focus block, reclaim a commute, guard family time. Accept the ones that fit, snooze the rest, and dismiss what doesn't. TimeCampus never optimises for more output — only for time that matches what you value.", De = /* @__PURE__ */ H(W, {
586
609
  treatment: "insight",
587
610
  className: "mt-6 p-4 sm:p-5",
588
- children: /* @__PURE__ */ B("div", {
611
+ children: /* @__PURE__ */ U("div", {
589
612
  className: "flex items-start gap-3",
590
- children: [/* @__PURE__ */ z("span", {
613
+ children: [/* @__PURE__ */ H("span", {
591
614
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-status-info-bg text-status-info-text",
592
- children: /* @__PURE__ */ z(P, { className: "h-5 w-5" })
593
- }), /* @__PURE__ */ B("div", {
615
+ children: /* @__PURE__ */ H(L, { className: "h-5 w-5" })
616
+ }), /* @__PURE__ */ U("div", {
594
617
  className: "min-w-0",
595
- children: [/* @__PURE__ */ z("h3", {
618
+ children: [/* @__PURE__ */ H("h3", {
596
619
  className: "text-sm font-semibold text-text-primary",
597
620
  children: "Never optimises for more output."
598
- }), /* @__PURE__ */ z("p", {
621
+ }), /* @__PURE__ */ H("p", {
599
622
  className: "mt-1 text-sm text-text-secondary",
600
623
  children: "Every suggestion protects something you value — rest, focus, relationships — not your throughput. Snooze or dismiss freely; TimeCampus takes the hint and won't keep nagging."
601
624
  })]
602
625
  })]
603
626
  })
604
627
  });
605
- if (!t || ne) return /* @__PURE__ */ z(f, {
628
+ if (!t || ee) return /* @__PURE__ */ H(p, {
606
629
  title: "Recommendations",
607
630
  description: "Values-aware suggestions from your real timeline",
608
631
  purpose: $,
609
632
  actions: Q,
610
- children: /* @__PURE__ */ z(r, {
633
+ children: /* @__PURE__ */ H(i, {
611
634
  variant: "list",
612
635
  count: 4
613
636
  })
614
637
  });
615
- if (re) return /* @__PURE__ */ z(f, {
638
+ if (te) return /* @__PURE__ */ H(p, {
616
639
  title: "Recommendations",
617
640
  description: "Values-aware suggestions from your real timeline",
618
641
  purpose: $,
619
642
  actions: Q,
620
- children: /* @__PURE__ */ z("div", {
643
+ children: /* @__PURE__ */ H("div", {
621
644
  className: "rounded-xl border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
622
645
  children: "Couldn't load your recommendations right now. Please try again in a moment."
623
646
  })
624
647
  });
625
- let Oe = W.length > 0, ke = be(v);
626
- return /* @__PURE__ */ B(f, {
648
+ let Oe = z.length > 0, ke = Ce(y);
649
+ return /* @__PURE__ */ U(p, {
627
650
  title: "Recommendations",
628
651
  description: "Values-aware suggestions from your real timeline",
629
652
  purpose: $,
630
653
  actions: Q,
631
654
  children: [
632
- Oe ? /* @__PURE__ */ B("div", {
655
+ Oe ? /* @__PURE__ */ U("div", {
633
656
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]",
634
- children: [/* @__PURE__ */ B("div", {
657
+ children: [/* @__PURE__ */ U("div", {
635
658
  className: "min-w-0 space-y-6",
636
659
  children: [
637
- /* @__PURE__ */ B("div", {
660
+ /* @__PURE__ */ U("div", {
638
661
  className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
639
662
  children: [
640
- /* @__PURE__ */ z(n, {
663
+ /* @__PURE__ */ H(r, {
641
664
  featured: !0,
642
665
  title: "New for you",
643
- value: String(q),
644
- icon: /* @__PURE__ */ z(F, { className: "h-5 w-5" }),
666
+ value: String(pe),
667
+ icon: /* @__PURE__ */ H(R, { className: "h-5 w-5" }),
645
668
  description: "Awaiting your call"
646
669
  }),
647
- /* @__PURE__ */ z(n, {
670
+ /* @__PURE__ */ H(r, {
648
671
  title: "Accepted",
649
- value: String(me),
650
- icon: /* @__PURE__ */ z(te, { className: "h-5 w-5" }),
672
+ value: String(he),
673
+ icon: /* @__PURE__ */ H(ne, { className: "h-5 w-5" }),
651
674
  description: "Changes you chose to make"
652
675
  }),
653
- /* @__PURE__ */ z(n, {
676
+ /* @__PURE__ */ H(r, {
654
677
  title: "Snoozed",
655
- value: String(he),
656
- icon: /* @__PURE__ */ z(A, { className: "h-5 w-5" }),
678
+ value: String(q),
679
+ icon: /* @__PURE__ */ H(M, { className: "h-5 w-5" }),
657
680
  description: "Waiting for a better moment"
658
681
  })
659
682
  ]
660
683
  }),
661
- /* @__PURE__ */ z("div", {
684
+ /* @__PURE__ */ H("div", {
662
685
  className: "overflow-x-auto",
663
- children: /* @__PURE__ */ z("div", {
686
+ children: /* @__PURE__ */ H("div", {
664
687
  className: "inline-flex items-center rounded-lg border border-border-subtle bg-bg-sunken/50 p-0.5",
665
688
  role: "tablist",
666
689
  "aria-label": "Filter recommendations by state",
667
690
  children: fe.map((e) => {
668
- let t = e.key === v, n = G[e.key] ?? 0;
669
- return /* @__PURE__ */ B("button", {
691
+ let t = e.key === y, n = B[e.key] ?? 0;
692
+ return /* @__PURE__ */ U("button", {
670
693
  type: "button",
671
694
  role: "tab",
672
695
  "aria-selected": t,
673
- onClick: () => y(e.key),
696
+ onClick: () => b(e.key),
674
697
  className: t ? "flex items-center gap-1.5 rounded-md bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary shadow-sm" : "flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:text-text-primary",
675
- children: [e.label, /* @__PURE__ */ z("span", {
698
+ children: [e.label, /* @__PURE__ */ H("span", {
676
699
  className: t ? "rounded-full bg-action-primary-bg/15 px-1.5 text-xs font-semibold text-primary" : "rounded-full bg-bg-sunken px-1.5 text-xs font-semibold text-text-secondary",
677
700
  children: n
678
701
  })]
@@ -680,88 +703,88 @@ function xe() {
680
703
  })
681
704
  })
682
705
  }),
683
- K.length === 0 ? /* @__PURE__ */ z(i, {
706
+ G.length === 0 ? /* @__PURE__ */ H(a, {
684
707
  illustration: "empty-data",
685
708
  title: ke.title,
686
709
  description: ke.description,
687
- action: v === H.New ? Q : void 0
688
- }) : /* @__PURE__ */ z("div", {
710
+ action: y === K.New ? Q : void 0
711
+ }) : /* @__PURE__ */ H("div", {
689
712
  className: "space-y-4",
690
- children: K.map((e) => /* @__PURE__ */ z(ve, {
713
+ children: G.map((e) => /* @__PURE__ */ H(xe, {
691
714
  rec: e,
692
- busy: x === e.id || I,
693
- muted: U.has(e.kind),
694
- onAccept: X,
695
- onSnooze: _e,
696
- onDismiss: xe,
715
+ busy: x === e.id || P,
716
+ muted: I.has(e.kind),
717
+ onAccept: Y,
718
+ onSnooze: ge,
719
+ onDismiss: _e,
697
720
  onMuteKind: Te
698
721
  }, e.id))
699
722
  }),
700
723
  De
701
724
  ]
702
- }), /* @__PURE__ */ z("div", { children: Ee })]
703
- }) : /* @__PURE__ */ B("div", {
725
+ }), /* @__PURE__ */ H("div", { children: Ee })]
726
+ }) : /* @__PURE__ */ U("div", {
704
727
  className: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]",
705
- children: [/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z(i, {
728
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H(a, {
706
729
  illustration: "empty-data",
707
730
  title: "No recommendations yet",
708
731
  description: "TimeCampus turns your real timeline into gentle, values-aware suggestions — like protecting a focus block or reclaiming a commute. Generate your first set to see what it notices.",
709
732
  action: Q
710
- }), De] }), /* @__PURE__ */ z("div", { children: Ee })]
733
+ }), De] }), /* @__PURE__ */ H("div", { children: Ee })]
711
734
  }),
712
- /* @__PURE__ */ B(p, {
713
- open: T !== null,
714
- onClose: () => E(null),
735
+ /* @__PURE__ */ U(h, {
736
+ open: w !== null,
737
+ onClose: () => T(null),
715
738
  title: "Dismiss this suggestion",
716
- description: T?.title,
739
+ description: w?.title,
717
740
  size: "sm",
718
- footer: /* @__PURE__ */ B(de, { children: [/* @__PURE__ */ z("button", {
741
+ footer: /* @__PURE__ */ U(de, { children: [/* @__PURE__ */ H("button", {
719
742
  type: "button",
720
- onClick: () => E(null),
721
- className: Y,
743
+ onClick: () => T(null),
744
+ className: X,
722
745
  children: "Cancel"
723
- }), /* @__PURE__ */ B("button", {
746
+ }), /* @__PURE__ */ U("button", {
724
747
  type: "button",
725
- onClick: () => void Se(),
748
+ onClick: () => void ve(),
726
749
  disabled: x !== null,
727
- className: J,
728
- children: [/* @__PURE__ */ z(R, { className: "h-4 w-4" }), "Dismiss"]
750
+ className: ye,
751
+ children: [/* @__PURE__ */ H(V, { className: "h-4 w-4" }), "Dismiss"]
729
752
  })] }),
730
753
  children: [
731
- /* @__PURE__ */ B("label", {
754
+ /* @__PURE__ */ U("label", {
732
755
  htmlFor: "rec-dismiss-reason",
733
756
  className: "block text-sm font-medium text-text-primary",
734
757
  children: [
735
758
  "Why isn't this one for you?",
736
759
  " ",
737
- /* @__PURE__ */ z("span", {
760
+ /* @__PURE__ */ H("span", {
738
761
  className: "font-normal text-text-secondary",
739
762
  children: "(optional)"
740
763
  })
741
764
  ]
742
765
  }),
743
- /* @__PURE__ */ z("textarea", {
766
+ /* @__PURE__ */ H("textarea", {
744
767
  id: "rec-dismiss-reason",
745
768
  rows: 3,
746
- value: D,
747
- onChange: (e) => O(e.target.value),
769
+ value: O,
770
+ onChange: (e) => k(e.target.value),
748
771
  placeholder: "e.g. already handled, not the right week",
749
772
  className: "mt-1.5 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary"
750
773
  }),
751
- /* @__PURE__ */ z("p", {
774
+ /* @__PURE__ */ H("p", {
752
775
  className: "mt-2 text-xs text-text-secondary",
753
776
  children: "Saved with the suggestion so you can see why you passed on it later. To stop this kind of suggestion entirely, use Mute this kind."
754
777
  })
755
778
  ]
756
779
  }),
757
- /* @__PURE__ */ z(m, {
758
- toasts: ee,
759
- onDismiss: _
780
+ /* @__PURE__ */ H(g, {
781
+ toasts: n,
782
+ onDismiss: v
760
783
  })
761
784
  ]
762
785
  });
763
786
  }
764
787
  //#endregion
765
- export { xe as RecommendationsPage };
788
+ export { we as RecommendationsPage };
766
789
 
767
790
  //# sourceMappingURL=RecommendationsPage.js.map