@burdenoff/microfe-comradecircle 2026.805.1 → 2026.827.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 (40) hide show
  1. package/dist/comradecircle/components/DraftsPanel.d.ts +32 -0
  2. package/dist/comradecircle/components/DraftsPanel.d.ts.map +1 -0
  3. package/dist/comradecircle/components/DraftsPanel.js +176 -0
  4. package/dist/comradecircle/components/DraftsPanel.js.map +1 -0
  5. package/dist/comradecircle/components/PostComposer.d.ts +11 -5
  6. package/dist/comradecircle/components/PostComposer.d.ts.map +1 -1
  7. package/dist/comradecircle/components/PostComposer.js +58 -46
  8. package/dist/comradecircle/components/PostComposer.js.map +1 -1
  9. package/dist/comradecircle/components/UpcomingEvents.d.ts +26 -0
  10. package/dist/comradecircle/components/UpcomingEvents.d.ts.map +1 -0
  11. package/dist/comradecircle/components/UpcomingEvents.js +126 -0
  12. package/dist/comradecircle/components/UpcomingEvents.js.map +1 -0
  13. package/dist/comradecircle/components/index.d.ts +2 -0
  14. package/dist/comradecircle/components/index.d.ts.map +1 -1
  15. package/dist/comradecircle/pages/FeedPage.d.ts +5 -0
  16. package/dist/comradecircle/pages/FeedPage.d.ts.map +1 -1
  17. package/dist/comradecircle/pages/FeedPage.js +54 -53
  18. package/dist/comradecircle/pages/FeedPage.js.map +1 -1
  19. package/dist/comradecircle/pages/circles/CircleDetailPage.d.ts.map +1 -1
  20. package/dist/comradecircle/pages/circles/CircleDetailPage.js +244 -237
  21. package/dist/comradecircle/pages/circles/CircleDetailPage.js.map +1 -1
  22. package/dist/comradecircle/utils/pageContext.d.ts.map +1 -1
  23. package/dist/comradecircle/utils/pageContext.js +3 -1
  24. package/dist/comradecircle/utils/pageContext.js.map +1 -1
  25. package/dist/stories/CircleCard.stories.d.ts +10 -0
  26. package/dist/stories/CircleCard.stories.d.ts.map +1 -0
  27. package/dist/stories/CommentThread.stories.d.ts +8 -0
  28. package/dist/stories/CommentThread.stories.d.ts.map +1 -0
  29. package/dist/stories/CreateCircleDialog.stories.d.ts +8 -0
  30. package/dist/stories/CreateCircleDialog.stories.d.ts.map +1 -0
  31. package/dist/stories/EmptyState.stories.d.ts.map +1 -1
  32. package/dist/stories/EventCard.stories.d.ts +10 -0
  33. package/dist/stories/EventCard.stories.d.ts.map +1 -0
  34. package/dist/stories/MetricsCard.stories.d.ts.map +1 -1
  35. package/dist/stories/PollCard.stories.d.ts +10 -0
  36. package/dist/stories/PollCard.stories.d.ts.map +1 -0
  37. package/dist/stories/PostCard.stories.d.ts +10 -0
  38. package/dist/stories/PostCard.stories.d.ts.map +1 -0
  39. package/dist/stories/StatusBadge.stories.d.ts.map +1 -1
  40. package/package.json +3 -2
@@ -12,84 +12,85 @@ import { formatDate as v, formatEnumLabel as y, formatNumber as b } from "../../
12
12
  import { PostCard as x } from "../../components/PostCard.js";
13
13
  import { EmptyState as S } from "../../components/EmptyState.js";
14
14
  import { ErrorView as C, LoadingView as w } from "../../components/StateViews.js";
15
- import { Pagination as ee } from "../../components/Pagination.js";
16
- import { slugify as T } from "../../utils/slug.js";
17
- import { StatusBadge as E } from "../../components/StatusBadge.js";
18
- import { Tabs as te } from "../../components/Tabs.js";
19
- import { PostComposer as ne } from "../../components/PostComposer.js";
15
+ import { Pagination as T } from "../../components/Pagination.js";
16
+ import { slugify as E } from "../../utils/slug.js";
17
+ import { StatusBadge as D } from "../../components/StatusBadge.js";
18
+ import { Tabs as ee } from "../../components/Tabs.js";
19
+ import { PostComposer as te } from "../../components/PostComposer.js";
20
+ import { DraftsPanel as ne } from "../../components/DraftsPanel.js";
20
21
  import { EventCard as re } from "../../components/EventCard.js";
21
22
  import { PollCard as ie } from "../../components/PollCard.js";
22
23
  import { CreateEventDialog as ae } from "../../components/CreateEventDialog.js";
23
- import { useMemo as D, useState as O } from "react";
24
- import { ArrowLeft as oe, BarChart3 as se, CalendarDays as k, Hash as A, Info as ce, Megaphone as j, MessageCircle as le, MessagesSquare as ue, Mic as M, Plus as N, Search as de, Users as P } from "lucide-react";
24
+ import { useMemo as O, useState as k } from "react";
25
+ import { ArrowLeft as oe, BarChart3 as A, CalendarDays as se, Hash as j, Info as ce, Megaphone as M, MessageCircle as le, MessagesSquare as ue, Mic as N, Plus as P, Search as de, Users as F } from "lucide-react";
25
26
  import { useParams as fe } from "react-router";
26
- import { Fragment as pe, jsx as F, jsxs as I } from "react/jsx-runtime";
27
- import { Button as L, GradientText as me, Input as R, Label as z, ResponsiveDialog as B, ResponsiveDialogContent as V, ResponsiveDialogDescription as H, ResponsiveDialogFooter as U, ResponsiveDialogHeader as W, ResponsiveDialogTitle as G, Select as K, SelectContent as q, SelectItem as J, SelectTrigger as Y, SelectValue as X, Switch as Z, Textarea as he } from "@burdenoff/fe-libs/ui";
27
+ import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
28
+ import { Button as z, GradientText as pe, Input as B, Label as V, ResponsiveDialog as H, ResponsiveDialogContent as U, ResponsiveDialogDescription as W, ResponsiveDialogFooter as G, ResponsiveDialogHeader as me, ResponsiveDialogTitle as K, Select as q, SelectContent as J, SelectItem as Y, SelectTrigger as X, SelectValue as Z, Switch as he, Textarea as ge } from "@burdenoff/fe-libs/ui";
28
29
  //#region src/comradecircle/pages/circles/CircleDetailPage.tsx
29
- var ge = {
30
- TEXT: A,
30
+ var _e = {
31
+ TEXT: j,
31
32
  FORUM: ue,
32
- ANNOUNCEMENT: j,
33
- VOICE: M
34
- }, _e = ["OWNER", "ADMIN"], Q = [
33
+ ANNOUNCEMENT: M,
34
+ VOICE: N
35
+ }, ve = ["OWNER", "ADMIN"], Q = [
35
36
  "OWNER",
36
37
  "ADMIN",
37
38
  "MODERATOR",
38
39
  "MEMBER"
39
- ], ve = 15;
40
- function ye() {
41
- let { id: t } = fe(), { currentUser: i, navigateTo: a } = e(), { data: o, isLoading: l, isError: u, refetch: d } = r(t), f = s(), p = c(), [h, v] = O("channels"), y = D(() => o?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [o, i]), x = !!y, S = y ? _e.includes(y.role) : !1;
42
- if (l) return /* @__PURE__ */ F(n, {
40
+ ], ye = 15;
41
+ function be() {
42
+ let { id: t } = fe(), { currentUser: i, navigateTo: a } = e(), { data: o, isLoading: l, isError: u, refetch: d } = r(t), f = s(), p = c(), [h, v] = k("channels"), y = O(() => o?.memberships?.find((e) => e.memberId === i?.id && e.status === "ACTIVE"), [o, i]), x = !!y, S = y ? ve.includes(y.role) : !1;
43
+ if (l) return /* @__PURE__ */ L(n, {
43
44
  title: "Circle",
44
- children: /* @__PURE__ */ F(w, { label: "Loading circle…" })
45
+ children: /* @__PURE__ */ L(w, { label: "Loading circle…" })
45
46
  });
46
- if (u || !o) return /* @__PURE__ */ F(n, {
47
+ if (u || !o) return /* @__PURE__ */ L(n, {
47
48
  title: "Circle",
48
- children: /* @__PURE__ */ F(C, {
49
+ children: /* @__PURE__ */ L(C, {
49
50
  title: "Circle not found",
50
51
  message: "This circle may have been archived or you may not have access.",
51
52
  onRetry: () => d()
52
53
  })
53
54
  });
54
- let ee = o.memberships?.filter((e) => e.status === "ACTIVE") ?? [], T = [
55
+ let T = o.memberships?.filter((e) => e.status === "ACTIVE") ?? [], E = [
55
56
  {
56
57
  value: "channels",
57
58
  label: "Channels",
58
- icon: /* @__PURE__ */ F(A, { className: "h-4 w-4" }),
59
+ icon: /* @__PURE__ */ L(j, { className: "h-4 w-4" }),
59
60
  count: o.channels?.length ?? 0
60
61
  },
61
62
  {
62
63
  value: "members",
63
64
  label: "Members",
64
- icon: /* @__PURE__ */ F(P, { className: "h-4 w-4" }),
65
- count: ee.length
65
+ icon: /* @__PURE__ */ L(F, { className: "h-4 w-4" }),
66
+ count: T.length
66
67
  },
67
68
  {
68
69
  value: "events",
69
70
  label: "Events",
70
- icon: /* @__PURE__ */ F(k, { className: "h-4 w-4" })
71
+ icon: /* @__PURE__ */ L(se, { className: "h-4 w-4" })
71
72
  },
72
73
  {
73
74
  value: "polls",
74
75
  label: "Polls",
75
- icon: /* @__PURE__ */ F(se, { className: "h-4 w-4" })
76
+ icon: /* @__PURE__ */ L(A, { className: "h-4 w-4" })
76
77
  },
77
78
  {
78
79
  value: "about",
79
80
  label: "About",
80
- icon: /* @__PURE__ */ F(ce, { className: "h-4 w-4" })
81
+ icon: /* @__PURE__ */ L(ce, { className: "h-4 w-4" })
81
82
  }
82
83
  ];
83
- return /* @__PURE__ */ I(n, {
84
- title: /* @__PURE__ */ I("span", {
84
+ return /* @__PURE__ */ R(n, {
85
+ title: /* @__PURE__ */ R("span", {
85
86
  className: "flex items-center gap-3",
86
- children: [/* @__PURE__ */ F(m, {
87
+ children: [/* @__PURE__ */ L(m, {
87
88
  name: o.name,
88
89
  size: "lg",
89
90
  fileId: o.avatar?.id,
90
91
  seed: o.id,
91
92
  ring: !0
92
- }), /* @__PURE__ */ F(me, {
93
+ }), /* @__PURE__ */ L(pe, {
93
94
  as: "span",
94
95
  className: "text-2xl font-semibold tracking-tight",
95
96
  children: o.name
@@ -97,35 +98,35 @@ function ye() {
97
98
  }),
98
99
  description: o.topic ?? void 0,
99
100
  aurora: !0,
100
- actions: /* @__PURE__ */ I("div", {
101
+ actions: /* @__PURE__ */ R("div", {
101
102
  className: "flex items-center gap-2",
102
- children: [/* @__PURE__ */ I(L, {
103
+ children: [/* @__PURE__ */ R(z, {
103
104
  variant: "ghost",
104
105
  size: "sm",
105
106
  onClick: () => a("circles"),
106
- children: [/* @__PURE__ */ F(oe, { className: "mr-1.5 h-4 w-4" }), " Back"]
107
- }), x ? /* @__PURE__ */ F(L, {
107
+ children: [/* @__PURE__ */ L(oe, { className: "mr-1.5 h-4 w-4" }), " Back"]
108
+ }), x ? /* @__PURE__ */ L(z, {
108
109
  variant: "outline",
109
110
  onClick: () => p.mutateAsync(o.id).then(() => _.success("Left circle")).catch((e) => _.error("Could not leave", g(e))),
110
111
  disabled: p.isPending,
111
112
  children: "Leave"
112
- }) : o.status === "ACTIVE" ? /* @__PURE__ */ F(L, {
113
+ }) : o.status === "ACTIVE" ? /* @__PURE__ */ L(z, {
113
114
  onClick: () => f.mutateAsync(o.id).then(() => _.success("Joined circle")).catch((e) => _.error("Could not join", g(e))),
114
115
  disabled: f.isPending,
115
116
  children: "Join circle"
116
117
  }) : null]
117
118
  }),
118
119
  children: [
119
- /* @__PURE__ */ I("div", {
120
+ /* @__PURE__ */ R("div", {
120
121
  className: "mb-4 flex flex-wrap items-center gap-2",
121
122
  children: [
122
- /* @__PURE__ */ F(E, { status: o.visibility }),
123
- o.status !== "ACTIVE" && /* @__PURE__ */ F(E, { status: o.status }),
124
- y && /* @__PURE__ */ F(E, { status: y.role }),
125
- /* @__PURE__ */ I("span", {
123
+ /* @__PURE__ */ L(D, { status: o.visibility }),
124
+ o.status !== "ACTIVE" && /* @__PURE__ */ L(D, { status: o.status }),
125
+ y && /* @__PURE__ */ L(D, { status: y.role }),
126
+ /* @__PURE__ */ R("span", {
126
127
  className: "inline-flex items-center gap-1 text-sm text-text-tertiary",
127
128
  children: [
128
- /* @__PURE__ */ F(P, { className: "h-4 w-4" }),
129
+ /* @__PURE__ */ L(F, { className: "h-4 w-4" }),
129
130
  " ",
130
131
  b(o.memberCount),
131
132
  " members"
@@ -133,76 +134,76 @@ function ye() {
133
134
  })
134
135
  ]
135
136
  }),
136
- /* @__PURE__ */ F(te, {
137
- items: T,
137
+ /* @__PURE__ */ L(ee, {
138
+ items: E,
138
139
  value: h,
139
140
  onChange: v,
140
141
  className: "mb-5"
141
142
  }),
142
- h === "channels" && /* @__PURE__ */ F(be, {
143
+ h === "channels" && /* @__PURE__ */ L(xe, {
143
144
  circle: o,
144
145
  isMember: x,
145
146
  canManage: S
146
147
  }),
147
- h === "members" && /* @__PURE__ */ F(Se, {
148
+ h === "members" && /* @__PURE__ */ L(Ce, {
148
149
  circle: o,
149
150
  canManage: S
150
151
  }),
151
- h === "events" && /* @__PURE__ */ F(Ce, {
152
+ h === "events" && /* @__PURE__ */ L(we, {
152
153
  circle: o,
153
154
  isMember: x
154
155
  }),
155
- h === "polls" && /* @__PURE__ */ F(we, {
156
+ h === "polls" && /* @__PURE__ */ L(Te, {
156
157
  circle: o,
157
158
  isMember: x,
158
159
  canManage: S
159
160
  }),
160
- h === "about" && /* @__PURE__ */ F(Te, { circle: o })
161
+ h === "about" && /* @__PURE__ */ L(Ee, { circle: o })
161
162
  ]
162
163
  });
163
164
  }
164
- function be({ circle: e, isMember: n, canManage: r }) {
165
- let i = D(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = O(i[0]?.id), [s, c] = O(!1), l = i.find((e) => e.id === a) ?? i[0];
166
- return i.length === 0 ? /* @__PURE__ */ I(pe, { children: [/* @__PURE__ */ F(S, {
167
- icon: /* @__PURE__ */ F(A, { className: "h-10 w-10" }),
165
+ function xe({ circle: e, isMember: n, canManage: r }) {
166
+ let i = O(() => [...e.channels ?? []].sort((e, t) => e.position - t.position), [e.channels]), [a, o] = k(i[0]?.id), [s, c] = k(!1), l = i.find((e) => e.id === a) ?? i[0];
167
+ return i.length === 0 ? /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(S, {
168
+ icon: /* @__PURE__ */ L(j, { className: "h-10 w-10" }),
168
169
  title: "No channels yet",
169
170
  description: r ? "Create the first channel to start conversations in this circle." : "This circle has no channels yet. Check back soon.",
170
- action: r ? /* @__PURE__ */ I(L, {
171
+ action: r ? /* @__PURE__ */ R(z, {
171
172
  onClick: () => c(!0),
172
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New channel"]
173
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New channel"]
173
174
  }) : void 0
174
- }), /* @__PURE__ */ F($, {
175
+ }), /* @__PURE__ */ L($, {
175
176
  circleId: e.id,
176
177
  open: s,
177
178
  onOpenChange: c,
178
179
  onCreated: (e) => o(e.id)
179
- })] }) : /* @__PURE__ */ I("div", {
180
+ })] }) : /* @__PURE__ */ R("div", {
180
181
  className: "grid gap-5 lg:grid-cols-[220px_1fr]",
181
182
  children: [
182
- /* @__PURE__ */ I("aside", {
183
+ /* @__PURE__ */ R("aside", {
183
184
  className: "hidden lg:block",
184
- children: [/* @__PURE__ */ I("div", {
185
+ children: [/* @__PURE__ */ R("div", {
185
186
  className: "mb-2 flex items-center justify-between",
186
- children: [/* @__PURE__ */ F("h3", {
187
+ children: [/* @__PURE__ */ L("h3", {
187
188
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
188
189
  children: "Channels"
189
- }), r && /* @__PURE__ */ F("button", {
190
+ }), r && /* @__PURE__ */ L("button", {
190
191
  type: "button",
191
192
  onClick: () => c(!0),
192
193
  "aria-label": "New channel",
193
194
  className: "rounded-md p-1 text-text-tertiary hover:bg-bg-sunken hover:text-text-primary",
194
- children: /* @__PURE__ */ F(N, { className: "h-4 w-4" })
195
+ children: /* @__PURE__ */ L(P, { className: "h-4 w-4" })
195
196
  })]
196
- }), /* @__PURE__ */ F("nav", {
197
+ }), /* @__PURE__ */ L("nav", {
197
198
  className: "flex flex-col gap-0.5",
198
199
  children: i.map((e) => {
199
- let n = ge[e.type], r = e.id === l?.id, i = e.type === "ANNOUNCEMENT";
200
- return /* @__PURE__ */ I("button", {
200
+ let n = _e[e.type], r = e.id === l?.id, i = e.type === "ANNOUNCEMENT";
201
+ return /* @__PURE__ */ R("button", {
201
202
  type: "button",
202
203
  onClick: () => o(e.id),
203
204
  "aria-current": r ? "true" : void 0,
204
205
  className: t("flex items-center gap-2 rounded-lg border-l-2 px-2.5 py-1.5 text-left text-sm transition-all", r ? "border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] font-medium text-text-primary shadow-sm" : i ? "border-transparent font-medium text-accent hover:bg-bg-sunken motion-safe:hover:translate-x-0.5" : "border-transparent text-text-secondary hover:bg-bg-sunken hover:text-text-primary motion-safe:hover:translate-x-0.5"),
205
- children: [/* @__PURE__ */ F(n, { className: t("h-4 w-4 shrink-0", r || i ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ F("span", {
206
+ children: [/* @__PURE__ */ L(n, { className: t("h-4 w-4 shrink-0", r || i ? "text-accent" : "text-text-tertiary") }), /* @__PURE__ */ L("span", {
206
207
  className: "truncate",
207
208
  children: e.name
208
209
  })]
@@ -210,35 +211,35 @@ function be({ circle: e, isMember: n, canManage: r }) {
210
211
  })
211
212
  })]
212
213
  }),
213
- /* @__PURE__ */ F("div", {
214
+ /* @__PURE__ */ L("div", {
214
215
  className: "lg:hidden",
215
- children: /* @__PURE__ */ I("div", {
216
+ children: /* @__PURE__ */ R("div", {
216
217
  className: "flex items-center gap-2",
217
- children: [/* @__PURE__ */ I(K, {
218
+ children: [/* @__PURE__ */ R(q, {
218
219
  value: l?.id,
219
220
  onValueChange: o,
220
- children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ F(X, { placeholder: "Select a channel" }) }), /* @__PURE__ */ F(q, { children: i.map((e) => /* @__PURE__ */ I(J, {
221
+ children: [/* @__PURE__ */ L(X, { children: /* @__PURE__ */ L(Z, { placeholder: "Select a channel" }) }), /* @__PURE__ */ L(J, { children: i.map((e) => /* @__PURE__ */ R(Y, {
221
222
  value: e.id,
222
223
  children: ["#", e.name]
223
224
  }, e.id)) })]
224
- }), r && /* @__PURE__ */ F(L, {
225
+ }), r && /* @__PURE__ */ L(z, {
225
226
  variant: "outline",
226
227
  size: "icon",
227
228
  onClick: () => c(!0),
228
229
  "aria-label": "New channel",
229
- children: /* @__PURE__ */ F(N, { className: "h-4 w-4" })
230
+ children: /* @__PURE__ */ L(P, { className: "h-4 w-4" })
230
231
  })]
231
232
  })
232
233
  }),
233
- /* @__PURE__ */ F("div", {
234
+ /* @__PURE__ */ L("div", {
234
235
  className: "min-w-0",
235
- children: l && /* @__PURE__ */ F(xe, {
236
+ children: l && /* @__PURE__ */ L(Se, {
236
237
  channel: l,
237
238
  canPost: n,
238
239
  canManage: r
239
240
  })
240
241
  }),
241
- /* @__PURE__ */ F($, {
242
+ /* @__PURE__ */ L($, {
242
243
  circleId: e.id,
243
244
  open: s,
244
245
  onOpenChange: c,
@@ -247,102 +248,108 @@ function be({ circle: e, isMember: n, canManage: r }) {
247
248
  ]
248
249
  });
249
250
  }
250
- function xe({ channel: e, canPost: t, canManage: n }) {
251
- let r = p(), { data: i, isLoading: a, isError: o, refetch: s } = d({
251
+ function Se({ channel: e, canPost: t, canManage: n }) {
252
+ let r = p(), [i, a] = k(!1), { data: o, isLoading: s, isError: c, refetch: l } = d({
252
253
  channelId: e.id,
253
254
  status: "PUBLISHED",
254
255
  pagination: {
255
- limit: ve,
256
+ limit: ye,
256
257
  cursor: r.cursor
257
258
  }
258
259
  });
259
260
  u(e.id);
260
- let c = i?.items ?? [], l = e.type === "ANNOUNCEMENT", f = e.type === "VOICE" ? !1 : l ? n : t, m = l && r.page === 0 && c.length > 0 ? c.find((e) => e.isPinned) ?? c[0] : void 0, h = m ? c.filter((e) => e.id !== m.id) : c;
261
- return /* @__PURE__ */ I("div", {
261
+ let f = o?.items ?? [], m = e.type === "ANNOUNCEMENT", h = e.type === "VOICE" ? !1 : m ? n : t, g = m && r.page === 0 && f.length > 0 ? f.find((e) => e.isPinned) ?? f[0] : void 0, _ = g ? f.filter((e) => e.id !== g.id) : f;
262
+ return /* @__PURE__ */ R("div", {
262
263
  className: "flex flex-col gap-4",
263
264
  children: [
264
- /* @__PURE__ */ I("div", {
265
+ /* @__PURE__ */ R("div", {
265
266
  className: "flex items-center gap-3",
266
267
  children: [(() => {
267
- let t = ge[e.type];
268
- return /* @__PURE__ */ F("span", {
268
+ let t = _e[e.type];
269
+ return /* @__PURE__ */ L("span", {
269
270
  className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)] text-accent",
270
- children: /* @__PURE__ */ F(t, { className: "h-5 w-5" })
271
+ children: /* @__PURE__ */ L(t, { className: "h-5 w-5" })
271
272
  });
272
- })(), /* @__PURE__ */ I("div", {
273
+ })(), /* @__PURE__ */ R("div", {
273
274
  className: "min-w-0",
274
- children: [/* @__PURE__ */ I("div", {
275
+ children: [/* @__PURE__ */ R("div", {
275
276
  className: "flex items-center gap-2",
276
- children: [/* @__PURE__ */ F("h2", {
277
+ children: [/* @__PURE__ */ L("h2", {
277
278
  className: "text-lg font-semibold text-text-primary",
278
279
  children: e.name
279
- }), l && /* @__PURE__ */ I("span", {
280
+ }), m && /* @__PURE__ */ R("span", {
280
281
  className: "inline-flex items-center gap-1 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium text-accent",
281
- children: [/* @__PURE__ */ F(j, { className: "h-3 w-3" }), " Broadcast"]
282
+ children: [/* @__PURE__ */ L(M, { className: "h-3 w-3" }), " Broadcast"]
282
283
  })]
283
- }), e.description && /* @__PURE__ */ F("p", {
284
+ }), e.description && /* @__PURE__ */ L("p", {
284
285
  className: "text-sm text-text-secondary",
285
286
  children: e.description
286
287
  })]
287
288
  })]
288
289
  }),
289
- f && /* @__PURE__ */ F(ne, {
290
+ h && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(te, {
290
291
  channelId: e.id,
291
292
  channelName: e.name,
292
293
  onPosted: () => r.reset(),
293
- variant: l ? "announcement" : "default"
294
- }),
295
- l && !f && /* @__PURE__ */ I("div", {
294
+ onDraftSaved: () => a(!0),
295
+ variant: m ? "announcement" : "default"
296
+ }), /* @__PURE__ */ L(ne, {
297
+ channelId: e.id,
298
+ open: i,
299
+ onOpenChange: a,
300
+ variant: m ? "announcement" : "default"
301
+ })] }),
302
+ m && !h && /* @__PURE__ */ R("div", {
296
303
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
297
- children: [/* @__PURE__ */ F(j, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Only circle managers can post in announcement channels."]
304
+ children: [/* @__PURE__ */ L(M, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Only circle managers can post in announcement channels."]
298
305
  }),
299
- e.type === "VOICE" && /* @__PURE__ */ I("div", {
306
+ e.type === "VOICE" && /* @__PURE__ */ R("div", {
300
307
  className: "rounded-xl border border-dashed border-border-seam p-6 text-center text-sm text-text-secondary",
301
- children: [/* @__PURE__ */ F(M, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Voice channels are for live audio. Text posting is disabled here."]
308
+ children: [/* @__PURE__ */ L(N, { className: "mx-auto mb-2 h-6 w-6 text-text-tertiary" }), "Voice channels are for live audio. Text posting is disabled here."]
302
309
  }),
303
- a ? /* @__PURE__ */ F(w, { label: "Loading posts…" }) : o ? /* @__PURE__ */ F(C, {
310
+ s ? /* @__PURE__ */ L(w, { label: "Loading posts…" }) : c ? /* @__PURE__ */ L(C, {
304
311
  message: "We couldn't load posts.",
305
- onRetry: () => s()
306
- }) : c.length === 0 ? /* @__PURE__ */ F(S, {
307
- icon: /* @__PURE__ */ F(le, { className: "h-9 w-9" }),
312
+ onRetry: () => l()
313
+ }) : f.length === 0 ? /* @__PURE__ */ L(S, {
314
+ icon: /* @__PURE__ */ L(le, { className: "h-9 w-9" }),
308
315
  title: "No posts yet",
309
- description: f ? "Be the first to post in this channel." : "Nothing has been posted here yet."
310
- }) : /* @__PURE__ */ I("div", {
316
+ description: h ? "Be the first to post in this channel." : "Nothing has been posted here yet."
317
+ }) : /* @__PURE__ */ R("div", {
311
318
  className: "flex flex-col gap-4",
312
319
  children: [
313
- m && /* @__PURE__ */ I("div", {
320
+ g && /* @__PURE__ */ R("div", {
314
321
  className: "rounded-2xl border-2 border-[color:var(--color-accent)] bg-[var(--color-accent-soft)] p-1",
315
- children: [/* @__PURE__ */ I("div", {
322
+ children: [/* @__PURE__ */ R("div", {
316
323
  className: "mb-1 flex items-center gap-1.5 px-3 pt-2 text-xs font-semibold uppercase tracking-wide text-accent",
317
- children: [/* @__PURE__ */ F(j, { className: "h-3.5 w-3.5" }), m.isPinned ? "Pinned announcement" : "Latest announcement"]
318
- }), /* @__PURE__ */ F(x, { post: m })]
324
+ children: [/* @__PURE__ */ L(M, { className: "h-3.5 w-3.5" }), g.isPinned ? "Pinned announcement" : "Latest announcement"]
325
+ }), /* @__PURE__ */ L(x, { post: g })]
319
326
  }),
320
- h.length > 0 && /* @__PURE__ */ I("div", {
327
+ _.length > 0 && /* @__PURE__ */ R("div", {
321
328
  className: "flex flex-col gap-4",
322
- children: [m && /* @__PURE__ */ F("p", {
329
+ children: [g && /* @__PURE__ */ L("p", {
323
330
  className: "text-xs font-semibold uppercase tracking-wide text-text-tertiary",
324
331
  children: "Earlier announcements"
325
- }), h.map((e) => /* @__PURE__ */ F(x, { post: e }, e.id))]
332
+ }), _.map((e) => /* @__PURE__ */ L(x, { post: e }, e.id))]
326
333
  }),
327
- /* @__PURE__ */ F(ee, {
334
+ /* @__PURE__ */ L(T, {
328
335
  page: r.page,
329
- pageSize: ve,
330
- itemCount: c.length,
331
- hasMore: i?.pageInfo.hasMore ?? !1,
332
- onPageChange: (e) => r.onPageChange(e, i?.pageInfo.cursor)
336
+ pageSize: ye,
337
+ itemCount: f.length,
338
+ hasMore: o?.pageInfo.hasMore ?? !1,
339
+ onPageChange: (e) => r.onPageChange(e, o?.pageInfo.cursor)
333
340
  })
334
341
  ]
335
342
  })
336
343
  ]
337
344
  });
338
345
  }
339
- function Se({ circle: e, canManage: n }) {
340
- let r = f(), [i, a] = O(""), o = D(() => [...e.memberships ?? []].sort((e, t) => Q.indexOf(e.role) - Q.indexOf(t.role)), [e.memberships]), s = D(() => {
346
+ function Ce({ circle: e, canManage: n }) {
347
+ let r = f(), [i, a] = k(""), o = O(() => [...e.memberships ?? []].sort((e, t) => Q.indexOf(e.role) - Q.indexOf(t.role)), [e.memberships]), s = O(() => {
341
348
  let e = i.trim().toLowerCase();
342
349
  return e ? o.filter((t) => y(t.role).toLowerCase().includes(e) || t.role.toLowerCase().includes(e) || y(t.status).toLowerCase().includes(e) || t.status.toLowerCase().includes(e)) : o;
343
350
  }, [o, i]);
344
- if (o.length === 0) return /* @__PURE__ */ F(S, {
345
- icon: /* @__PURE__ */ F(P, { className: "h-9 w-9" }),
351
+ if (o.length === 0) return /* @__PURE__ */ L(S, {
352
+ icon: /* @__PURE__ */ L(F, { className: "h-9 w-9" }),
346
353
  title: "No members yet"
347
354
  });
348
355
  let c = async (t, n) => {
@@ -356,59 +363,59 @@ function Se({ circle: e, canManage: n }) {
356
363
  _.error("Could not update role", g(e));
357
364
  }
358
365
  }, l = n ? "lg:grid-cols-[minmax(0,1fr)_120px_120px_190px]" : "lg:grid-cols-[minmax(0,1fr)_120px_120px]";
359
- return /* @__PURE__ */ I("div", {
366
+ return /* @__PURE__ */ R("div", {
360
367
  className: "flex flex-col gap-4",
361
- children: [/* @__PURE__ */ I("div", {
368
+ children: [/* @__PURE__ */ R("div", {
362
369
  className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
363
- children: [/* @__PURE__ */ I("div", {
370
+ children: [/* @__PURE__ */ R("div", {
364
371
  className: "relative w-full sm:max-w-xs",
365
- children: [/* @__PURE__ */ F(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ F(R, {
372
+ children: [/* @__PURE__ */ L(de, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ L(B, {
366
373
  value: i,
367
374
  onChange: (e) => a(e.target.value),
368
375
  placeholder: "Filter by role or status…",
369
376
  className: "pl-9",
370
377
  "aria-label": "Filter members by role or status"
371
378
  })]
372
- }), /* @__PURE__ */ F("span", {
379
+ }), /* @__PURE__ */ L("span", {
373
380
  className: "text-sm text-text-tertiary",
374
381
  children: s.length === o.length ? `${b(o.length)} member${o.length === 1 ? "" : "s"}` : `${b(s.length)} of ${b(o.length)}`
375
382
  })]
376
- }), /* @__PURE__ */ I("div", {
383
+ }), /* @__PURE__ */ R("div", {
377
384
  className: "overflow-hidden rounded-2xl border border-border-seam bg-bg-surface",
378
- children: [/* @__PURE__ */ I("div", {
385
+ children: [/* @__PURE__ */ R("div", {
379
386
  className: t("hidden border-b border-border-seam px-5 py-3 text-xs font-semibold uppercase tracking-wide text-text-tertiary lg:grid lg:items-center lg:gap-4", l),
380
387
  children: [
381
- /* @__PURE__ */ F("span", { children: "Member" }),
382
- /* @__PURE__ */ F("span", { children: "Status" }),
383
- /* @__PURE__ */ F("span", { children: "Role" }),
384
- n && /* @__PURE__ */ F("span", { children: "Manage role" })
388
+ /* @__PURE__ */ L("span", { children: "Member" }),
389
+ /* @__PURE__ */ L("span", { children: "Status" }),
390
+ /* @__PURE__ */ L("span", { children: "Role" }),
391
+ n && /* @__PURE__ */ L("span", { children: "Manage role" })
385
392
  ]
386
- }), s.length === 0 ? /* @__PURE__ */ I("div", {
393
+ }), s.length === 0 ? /* @__PURE__ */ R("div", {
387
394
  className: "px-5 py-10 text-center text-sm text-text-secondary",
388
395
  children: [
389
396
  "No members match “",
390
397
  i.trim(),
391
398
  "”."
392
399
  ]
393
- }) : s.map((e) => /* @__PURE__ */ I("div", {
400
+ }) : s.map((e) => /* @__PURE__ */ R("div", {
394
401
  className: t("flex flex-col gap-3 border-b border-border-seam px-5 py-4 last:border-b-0 motion-safe:transition-colors hover:bg-bg-sunken/60 lg:grid lg:items-center lg:gap-4", l),
395
- children: [/* @__PURE__ */ F(h, {
402
+ children: [/* @__PURE__ */ L(h, {
396
403
  memberId: e.memberId,
397
404
  variant: "row",
398
405
  size: "md",
399
406
  showPresence: !0
400
- }), /* @__PURE__ */ I("div", {
407
+ }), /* @__PURE__ */ R("div", {
401
408
  className: "flex flex-wrap items-center gap-2 lg:contents",
402
409
  children: [
403
- /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(E, { status: e.status }) }),
404
- /* @__PURE__ */ F("div", { children: /* @__PURE__ */ F(E, { status: e.role }) }),
405
- n && /* @__PURE__ */ I(K, {
410
+ /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(D, { status: e.status }) }),
411
+ /* @__PURE__ */ L("div", { children: /* @__PURE__ */ L(D, { status: e.role }) }),
412
+ n && /* @__PURE__ */ R(q, {
406
413
  value: e.role,
407
414
  onValueChange: (t) => c(e.id, t),
408
- children: [/* @__PURE__ */ F(Y, {
415
+ children: [/* @__PURE__ */ L(X, {
409
416
  className: "h-9 w-40 lg:w-full",
410
- children: /* @__PURE__ */ F(X, {})
411
- }), /* @__PURE__ */ F(q, { children: Q.map((e) => /* @__PURE__ */ F(J, {
417
+ children: /* @__PURE__ */ L(Z, {})
418
+ }), /* @__PURE__ */ L(J, { children: Q.map((e) => /* @__PURE__ */ L(Y, {
412
419
  value: e,
413
420
  children: y(e)
414
421
  }, e)) })]
@@ -419,119 +426,119 @@ function Se({ circle: e, canManage: n }) {
419
426
  })]
420
427
  });
421
428
  }
422
- function Ce({ circle: t, isMember: n }) {
423
- let { navigateTo: r } = e(), { data: i, isLoading: a, isError: s, refetch: c } = o({ circleId: t.id }), [l, u] = O(!1), d = i?.items ?? [];
424
- return /* @__PURE__ */ I("div", { children: [
425
- /* @__PURE__ */ F("div", {
429
+ function we({ circle: t, isMember: n }) {
430
+ let { navigateTo: r } = e(), { data: i, isLoading: a, isError: s, refetch: c } = o({ circleId: t.id }), [l, u] = k(!1), d = i?.items ?? [];
431
+ return /* @__PURE__ */ R("div", { children: [
432
+ /* @__PURE__ */ L("div", {
426
433
  className: "mb-4 flex items-center justify-end",
427
- children: n && /* @__PURE__ */ I(L, {
434
+ children: n && /* @__PURE__ */ R(z, {
428
435
  onClick: () => u(!0),
429
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New event"]
436
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New event"]
430
437
  })
431
438
  }),
432
- a ? /* @__PURE__ */ F(w, { label: "Loading events…" }) : s ? /* @__PURE__ */ F(C, { onRetry: () => c() }) : d.length === 0 ? /* @__PURE__ */ F(S, {
433
- icon: /* @__PURE__ */ F(k, { className: "h-9 w-9" }),
439
+ a ? /* @__PURE__ */ L(w, { label: "Loading events…" }) : s ? /* @__PURE__ */ L(C, { onRetry: () => c() }) : d.length === 0 ? /* @__PURE__ */ L(S, {
440
+ icon: /* @__PURE__ */ L(se, { className: "h-9 w-9" }),
434
441
  title: "No events scheduled",
435
442
  description: n ? "Schedule the first event for this circle." : "No upcoming events.",
436
- action: n ? /* @__PURE__ */ I(L, {
443
+ action: n ? /* @__PURE__ */ R(z, {
437
444
  onClick: () => u(!0),
438
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New event"]
445
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New event"]
439
446
  }) : void 0
440
- }) : /* @__PURE__ */ F("div", {
447
+ }) : /* @__PURE__ */ L("div", {
441
448
  className: "grid gap-4 md:grid-cols-2",
442
- children: d.map((e) => /* @__PURE__ */ F(re, {
449
+ children: d.map((e) => /* @__PURE__ */ L(re, {
443
450
  event: e,
444
451
  onOpen: () => r(`events/${e.id}`)
445
452
  }, e.id))
446
453
  }),
447
- /* @__PURE__ */ F(ae, {
454
+ /* @__PURE__ */ L(ae, {
448
455
  circleId: t.id,
449
456
  open: l,
450
457
  onOpenChange: u
451
458
  })
452
459
  ] });
453
460
  }
454
- function we({ circle: e, isMember: t, canManage: n }) {
455
- let { data: r, isLoading: i, isError: a, refetch: o } = l(e.id), [s, c] = O(!1);
456
- return /* @__PURE__ */ I("div", { children: [
457
- /* @__PURE__ */ F("div", {
461
+ function Te({ circle: e, isMember: t, canManage: n }) {
462
+ let { data: r, isLoading: i, isError: a, refetch: o } = l(e.id), [s, c] = k(!1);
463
+ return /* @__PURE__ */ R("div", { children: [
464
+ /* @__PURE__ */ L("div", {
458
465
  className: "mb-4 flex items-center justify-end",
459
- children: t && /* @__PURE__ */ I(L, {
466
+ children: t && /* @__PURE__ */ R(z, {
460
467
  onClick: () => c(!0),
461
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New poll"]
468
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New poll"]
462
469
  })
463
470
  }),
464
- i ? /* @__PURE__ */ F(w, { label: "Loading polls…" }) : a ? /* @__PURE__ */ F(C, { onRetry: () => o() }) : (r ?? []).length === 0 ? /* @__PURE__ */ F(S, {
465
- icon: /* @__PURE__ */ F(se, { className: "h-9 w-9" }),
471
+ i ? /* @__PURE__ */ L(w, { label: "Loading polls…" }) : a ? /* @__PURE__ */ L(C, { onRetry: () => o() }) : (r ?? []).length === 0 ? /* @__PURE__ */ L(S, {
472
+ icon: /* @__PURE__ */ L(A, { className: "h-9 w-9" }),
466
473
  title: "No polls yet",
467
474
  description: t ? "Ask the circle a question with a poll." : "No polls have been created.",
468
- action: t ? /* @__PURE__ */ I(L, {
475
+ action: t ? /* @__PURE__ */ R(z, {
469
476
  onClick: () => c(!0),
470
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " New poll"]
477
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " New poll"]
471
478
  }) : void 0
472
- }) : /* @__PURE__ */ F("div", {
479
+ }) : /* @__PURE__ */ L("div", {
473
480
  className: "mx-auto flex max-w-2xl flex-col gap-4",
474
- children: (r ?? []).map((e) => /* @__PURE__ */ F(ie, {
481
+ children: (r ?? []).map((e) => /* @__PURE__ */ L(ie, {
475
482
  poll: e,
476
483
  canManage: n
477
484
  }, e.id))
478
485
  }),
479
- /* @__PURE__ */ F(De, {
486
+ /* @__PURE__ */ L(Oe, {
480
487
  circleId: e.id,
481
488
  open: s,
482
489
  onOpenChange: c
483
490
  })
484
491
  ] });
485
492
  }
486
- function Te({ circle: e }) {
487
- return /* @__PURE__ */ F("div", {
493
+ function Ee({ circle: e }) {
494
+ return /* @__PURE__ */ L("div", {
488
495
  className: "mx-auto max-w-2xl",
489
- children: /* @__PURE__ */ I("div", {
496
+ children: /* @__PURE__ */ R("div", {
490
497
  className: "rounded-2xl border border-border-seam bg-bg-surface p-6",
491
498
  children: [
492
- /* @__PURE__ */ F("h2", {
499
+ /* @__PURE__ */ L("h2", {
493
500
  className: "text-lg font-semibold text-text-primary",
494
501
  children: "About this circle"
495
502
  }),
496
- /* @__PURE__ */ F("p", {
503
+ /* @__PURE__ */ L("p", {
497
504
  className: "mt-2 whitespace-pre-wrap text-sm text-text-secondary",
498
505
  children: e.description || "No description provided."
499
506
  }),
500
- e.tags.length > 0 && /* @__PURE__ */ F("div", {
507
+ e.tags.length > 0 && /* @__PURE__ */ L("div", {
501
508
  className: "mt-4 flex flex-wrap gap-1.5",
502
- children: e.tags.map((e) => /* @__PURE__ */ I("span", {
509
+ children: e.tags.map((e) => /* @__PURE__ */ R("span", {
503
510
  className: "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary",
504
511
  children: ["#", e]
505
512
  }, e))
506
513
  }),
507
- /* @__PURE__ */ I("dl", {
514
+ /* @__PURE__ */ R("dl", {
508
515
  className: "mt-6 grid grid-cols-2 gap-4 text-sm",
509
516
  children: [
510
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
517
+ /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
511
518
  className: "text-text-tertiary",
512
519
  children: "Visibility"
513
- }), /* @__PURE__ */ F("dd", {
520
+ }), /* @__PURE__ */ L("dd", {
514
521
  className: "mt-1 text-text-primary",
515
522
  children: y(e.visibility)
516
523
  })] }),
517
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
524
+ /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
518
525
  className: "text-text-tertiary",
519
526
  children: "Status"
520
- }), /* @__PURE__ */ F("dd", {
527
+ }), /* @__PURE__ */ L("dd", {
521
528
  className: "mt-1 text-text-primary",
522
529
  children: y(e.status)
523
530
  })] }),
524
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
531
+ /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
525
532
  className: "text-text-tertiary",
526
533
  children: "Members"
527
- }), /* @__PURE__ */ F("dd", {
534
+ }), /* @__PURE__ */ L("dd", {
528
535
  className: "mt-1 text-text-primary",
529
536
  children: b(e.memberCount)
530
537
  })] }),
531
- /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("dt", {
538
+ /* @__PURE__ */ R("div", { children: [/* @__PURE__ */ L("dt", {
532
539
  className: "text-text-tertiary",
533
540
  children: "Created"
534
- }), /* @__PURE__ */ F("dd", {
541
+ }), /* @__PURE__ */ L("dd", {
535
542
  className: "mt-1 text-text-primary",
536
543
  children: v(e.createdAt)
537
544
  })] })
@@ -541,70 +548,70 @@ function Te({ circle: e }) {
541
548
  })
542
549
  });
543
550
  }
544
- var Ee = [
551
+ var De = [
545
552
  "TEXT",
546
553
  "FORUM",
547
554
  "ANNOUNCEMENT",
548
555
  "VOICE"
549
556
  ];
550
557
  function $({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
551
- let a = i(), [o, s] = O(""), [c, l] = O(""), [u, d] = O("TEXT"), [f, p] = O(null);
552
- return /* @__PURE__ */ F(B, {
558
+ let a = i(), [o, s] = k(""), [c, l] = k(""), [u, d] = k("TEXT"), [f, p] = k(null);
559
+ return /* @__PURE__ */ L(H, {
553
560
  open: t,
554
561
  onOpenChange: n,
555
- children: /* @__PURE__ */ I(V, {
562
+ children: /* @__PURE__ */ R(U, {
556
563
  className: "sm:max-w-md",
557
564
  children: [
558
- /* @__PURE__ */ I(W, { children: [/* @__PURE__ */ F(G, { children: "Create a channel" }), /* @__PURE__ */ F(H, { children: "Channels organise conversations by topic or format." })] }),
559
- /* @__PURE__ */ I("div", {
565
+ /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(K, { children: "Create a channel" }), /* @__PURE__ */ L(W, { children: "Channels organise conversations by topic or format." })] }),
566
+ /* @__PURE__ */ R("div", {
560
567
  className: "flex flex-col gap-4 py-2",
561
568
  children: [
562
- /* @__PURE__ */ I("div", {
569
+ /* @__PURE__ */ R("div", {
563
570
  className: "grid gap-1.5",
564
- children: [/* @__PURE__ */ F(z, {
571
+ children: [/* @__PURE__ */ L(V, {
565
572
  htmlFor: "channel-name",
566
573
  children: "Name"
567
- }), /* @__PURE__ */ F(R, {
574
+ }), /* @__PURE__ */ L(B, {
568
575
  id: "channel-name",
569
576
  value: o,
570
577
  onChange: (e) => s(e.target.value),
571
578
  placeholder: "general"
572
579
  })]
573
580
  }),
574
- /* @__PURE__ */ I("div", {
581
+ /* @__PURE__ */ R("div", {
575
582
  className: "grid gap-1.5",
576
- children: [/* @__PURE__ */ F(z, { children: "Type" }), /* @__PURE__ */ I(K, {
583
+ children: [/* @__PURE__ */ L(V, { children: "Type" }), /* @__PURE__ */ R(q, {
577
584
  value: u,
578
585
  onValueChange: (e) => d(e),
579
- children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ F(X, {}) }), /* @__PURE__ */ F(q, { children: Ee.map((e) => /* @__PURE__ */ F(J, {
586
+ children: [/* @__PURE__ */ L(X, { children: /* @__PURE__ */ L(Z, {}) }), /* @__PURE__ */ L(J, { children: De.map((e) => /* @__PURE__ */ L(Y, {
580
587
  value: e,
581
588
  children: y(e)
582
589
  }, e)) })]
583
590
  })]
584
591
  }),
585
- /* @__PURE__ */ I("div", {
592
+ /* @__PURE__ */ R("div", {
586
593
  className: "grid gap-1.5",
587
- children: [/* @__PURE__ */ F(z, {
594
+ children: [/* @__PURE__ */ L(V, {
588
595
  htmlFor: "channel-desc",
589
596
  children: "Description"
590
- }), /* @__PURE__ */ F(he, {
597
+ }), /* @__PURE__ */ L(ge, {
591
598
  id: "channel-desc",
592
599
  value: c,
593
600
  onChange: (e) => l(e.target.value),
594
601
  rows: 2
595
602
  })]
596
603
  }),
597
- f && /* @__PURE__ */ F("p", {
604
+ f && /* @__PURE__ */ L("p", {
598
605
  className: "text-sm text-status-error-text",
599
606
  children: f
600
607
  })
601
608
  ]
602
609
  }),
603
- /* @__PURE__ */ I(U, { children: [/* @__PURE__ */ F(L, {
610
+ /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
604
611
  variant: "outline",
605
612
  onClick: () => n(!1),
606
613
  children: "Cancel"
607
- }), /* @__PURE__ */ F(L, {
614
+ }), /* @__PURE__ */ L(z, {
608
615
  onClick: async () => {
609
616
  if (!o.trim()) {
610
617
  p("Channel name is required.");
@@ -614,7 +621,7 @@ function $({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
614
621
  let t = await a.mutateAsync({
615
622
  circleId: e,
616
623
  name: o.trim(),
617
- slug: T(o),
624
+ slug: E(o),
618
625
  description: c.trim() || null,
619
626
  type: u
620
627
  });
@@ -630,127 +637,127 @@ function $({ circleId: e, open: t, onOpenChange: n, onCreated: r }) {
630
637
  })
631
638
  });
632
639
  }
633
- function De({ circleId: e, open: t, onOpenChange: n }) {
634
- let r = a(), [i, o] = O(""), [s, c] = O(["", ""]), [l, u] = O(!1), [d, f] = O(!1), [p, m] = O(""), [h, v] = O(null), y = D(() => {
640
+ function Oe({ circleId: e, open: t, onOpenChange: n }) {
641
+ let r = a(), [i, o] = k(""), [s, c] = k(["", ""]), [l, u] = k(!1), [d, f] = k(!1), [p, m] = k(""), [h, v] = k(null), y = O(() => {
635
642
  let e = /* @__PURE__ */ new Date();
636
643
  return e.setMinutes(e.getMinutes() - e.getTimezoneOffset()), e.toISOString().slice(0, 16);
637
644
  }, []), b = () => {
638
645
  o(""), c(["", ""]), u(!1), f(!1), m(""), v(null);
639
646
  };
640
- return /* @__PURE__ */ F(B, {
647
+ return /* @__PURE__ */ L(H, {
641
648
  open: t,
642
649
  onOpenChange: n,
643
- children: /* @__PURE__ */ I(V, {
650
+ children: /* @__PURE__ */ R(U, {
644
651
  className: "sm:max-w-md",
645
652
  children: [
646
- /* @__PURE__ */ I(W, { children: [/* @__PURE__ */ F(G, { children: "Create a poll" }), /* @__PURE__ */ F(H, { children: "Gather the circle's opinion." })] }),
647
- /* @__PURE__ */ I("div", {
653
+ /* @__PURE__ */ R(me, { children: [/* @__PURE__ */ L(K, { children: "Create a poll" }), /* @__PURE__ */ L(W, { children: "Gather the circle's opinion." })] }),
654
+ /* @__PURE__ */ R("div", {
648
655
  className: "flex flex-col gap-4 py-2",
649
656
  children: [
650
- /* @__PURE__ */ I("div", {
657
+ /* @__PURE__ */ R("div", {
651
658
  className: "grid gap-1.5",
652
- children: [/* @__PURE__ */ F(z, {
659
+ children: [/* @__PURE__ */ L(V, {
653
660
  htmlFor: "poll-q",
654
661
  children: "Question"
655
- }), /* @__PURE__ */ F(R, {
662
+ }), /* @__PURE__ */ L(B, {
656
663
  id: "poll-q",
657
664
  value: i,
658
665
  onChange: (e) => o(e.target.value),
659
666
  placeholder: "What should we build next?"
660
667
  })]
661
668
  }),
662
- /* @__PURE__ */ I("div", {
669
+ /* @__PURE__ */ R("div", {
663
670
  className: "grid gap-1.5",
664
- children: [/* @__PURE__ */ F(z, { children: "Options" }), /* @__PURE__ */ I("div", {
671
+ children: [/* @__PURE__ */ L(V, { children: "Options" }), /* @__PURE__ */ R("div", {
665
672
  className: "flex flex-col gap-2",
666
- children: [s.map((e, t) => /* @__PURE__ */ I("div", {
673
+ children: [s.map((e, t) => /* @__PURE__ */ R("div", {
667
674
  className: "flex items-center gap-2",
668
- children: [/* @__PURE__ */ F(R, {
675
+ children: [/* @__PURE__ */ L(B, {
669
676
  value: e,
670
677
  onChange: (e) => c((n) => n.map((n, r) => r === t ? e.target.value : n)),
671
678
  placeholder: `Option ${t + 1}`
672
- }), s.length > 2 && /* @__PURE__ */ F(L, {
679
+ }), s.length > 2 && /* @__PURE__ */ L(z, {
673
680
  variant: "ghost",
674
681
  size: "icon",
675
682
  onClick: () => c((e) => e.filter((e, n) => n !== t)),
676
683
  "aria-label": `Remove option ${t + 1}`,
677
684
  children: "✕"
678
685
  })]
679
- }, t)), s.length < 8 && /* @__PURE__ */ I(L, {
686
+ }, t)), s.length < 8 && /* @__PURE__ */ R(z, {
680
687
  variant: "outline",
681
688
  size: "sm",
682
689
  onClick: () => c((e) => [...e, ""]),
683
- children: [/* @__PURE__ */ F(N, { className: "mr-1.5 h-4 w-4" }), " Add option"]
690
+ children: [/* @__PURE__ */ L(P, { className: "mr-1.5 h-4 w-4" }), " Add option"]
684
691
  })]
685
692
  })]
686
693
  }),
687
- /* @__PURE__ */ I("div", {
694
+ /* @__PURE__ */ R("div", {
688
695
  className: "grid gap-1.5",
689
696
  children: [
690
- /* @__PURE__ */ F(z, {
697
+ /* @__PURE__ */ L(V, {
691
698
  htmlFor: "poll-closes",
692
699
  children: "Closes at"
693
700
  }),
694
- /* @__PURE__ */ F(R, {
701
+ /* @__PURE__ */ L(B, {
695
702
  id: "poll-closes",
696
703
  type: "datetime-local",
697
704
  min: y,
698
705
  value: p,
699
706
  onChange: (e) => m(e.target.value)
700
707
  }),
701
- /* @__PURE__ */ F("p", {
708
+ /* @__PURE__ */ L("p", {
702
709
  className: "text-xs text-text-tertiary",
703
710
  children: "Optional — leave empty to keep voting open indefinitely."
704
711
  })
705
712
  ]
706
713
  }),
707
- /* @__PURE__ */ I("div", {
714
+ /* @__PURE__ */ R("div", {
708
715
  className: "flex flex-col divide-y divide-border-seam rounded-xl border border-border-seam",
709
- children: [/* @__PURE__ */ I("div", {
716
+ children: [/* @__PURE__ */ R("div", {
710
717
  className: "flex items-center justify-between gap-4 px-3 py-3",
711
- children: [/* @__PURE__ */ I("div", {
718
+ children: [/* @__PURE__ */ R("div", {
712
719
  className: "min-w-0",
713
- children: [/* @__PURE__ */ F(z, {
720
+ children: [/* @__PURE__ */ L(V, {
714
721
  htmlFor: "poll-multi",
715
722
  children: "Allow multiple choices"
716
- }), /* @__PURE__ */ F("p", {
723
+ }), /* @__PURE__ */ L("p", {
717
724
  className: "text-xs text-text-tertiary",
718
725
  children: "Let voters pick more than one option."
719
726
  })]
720
- }), /* @__PURE__ */ F(Z, {
727
+ }), /* @__PURE__ */ L(he, {
721
728
  id: "poll-multi",
722
729
  checked: l,
723
730
  onCheckedChange: u
724
731
  })]
725
- }), /* @__PURE__ */ I("div", {
732
+ }), /* @__PURE__ */ R("div", {
726
733
  className: "flex items-center justify-between gap-4 px-3 py-3",
727
- children: [/* @__PURE__ */ I("div", {
734
+ children: [/* @__PURE__ */ R("div", {
728
735
  className: "min-w-0",
729
- children: [/* @__PURE__ */ F(z, {
736
+ children: [/* @__PURE__ */ L(V, {
730
737
  htmlFor: "poll-anon",
731
738
  children: "Anonymous voting"
732
- }), /* @__PURE__ */ F("p", {
739
+ }), /* @__PURE__ */ L("p", {
733
740
  className: "text-xs text-text-tertiary",
734
741
  children: "Hide who voted for each option."
735
742
  })]
736
- }), /* @__PURE__ */ F(Z, {
743
+ }), /* @__PURE__ */ L(he, {
737
744
  id: "poll-anon",
738
745
  checked: d,
739
746
  onCheckedChange: f
740
747
  })]
741
748
  })]
742
749
  }),
743
- h && /* @__PURE__ */ F("p", {
750
+ h && /* @__PURE__ */ L("p", {
744
751
  className: "text-sm text-status-error-text",
745
752
  children: h
746
753
  })
747
754
  ]
748
755
  }),
749
- /* @__PURE__ */ I(U, { children: [/* @__PURE__ */ F(L, {
756
+ /* @__PURE__ */ R(G, { children: [/* @__PURE__ */ L(z, {
750
757
  variant: "outline",
751
758
  onClick: () => n(!1),
752
759
  children: "Cancel"
753
- }), /* @__PURE__ */ F(L, {
760
+ }), /* @__PURE__ */ L(z, {
754
761
  onClick: async () => {
755
762
  let t = s.map((e) => e.trim()).filter(Boolean);
756
763
  if (!i.trim()) {
@@ -782,6 +789,6 @@ function De({ circleId: e, open: t, onOpenChange: n }) {
782
789
  });
783
790
  }
784
791
  //#endregion
785
- export { ye as CircleDetailPage };
792
+ export { be as CircleDetailPage };
786
793
 
787
794
  //# sourceMappingURL=CircleDetailPage.js.map