@burdenoff/microfe-organization 2026.601.6 → 2026.601.8

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.
@@ -9,13 +9,14 @@ import { PERMISSIONS as s } from "../../../constants/permissions.js";
9
9
  import { MemberRoleBadge as c } from "../../members/components/MemberRoleBadge.js";
10
10
  import { useWorkspace as l } from "../hooks/useWorkspaces.js";
11
11
  import { WorkspaceStatusBadge as u } from "../components/WorkspaceStatusBadge.js";
12
- import { useRemoveWorkspaceMember as d, useWorkspaceMembers as f } from "../hooks/useWorkspaceMembers.js";
13
- import { AddWorkspaceMemberDialog as p } from "../components/AddWorkspaceMemberDialog.js";
14
- import { useMemo as m, useState as h } from "react";
15
- import { ArrowLeft as g, Briefcase as _, Edit as v, Trash2 as y, UserPlus as b, Users as x } from "lucide-react";
16
- import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
17
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
18
- import { useParams as E } from "react-router-dom";
12
+ import { useRemoveWorkspaceMember as ee, useWorkspaceMembers as te } from "../hooks/useWorkspaceMembers.js";
13
+ import { AddWorkspaceMemberDialog as d } from "../components/AddWorkspaceMemberDialog.js";
14
+ import { useMemo as f, useState as p } from "react";
15
+ import { ArrowLeft as m, Briefcase as h, Edit as ne, Trash2 as g, UserPlus as _, Users as v } from "lucide-react";
16
+ import { usePermissions as y } from "@burdenoff/fe-libs/shared/providers/shell";
17
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
18
+ import { useParams as C } from "react-router-dom";
19
+ import { ActorIdentity as w, buildActorFallback as T, useActorProfiles as E } from "@burdenoff/fe-libs/shared";
19
20
  //#region src/organization-management/modules/workspaces/pages/WorkspaceDetailPage.tsx
20
21
  function D(e) {
21
22
  return new Date(e).toLocaleDateString("en-US", {
@@ -27,14 +28,22 @@ function D(e) {
27
28
  });
28
29
  }
29
30
  function O() {
30
- let O = n(), { id: k } = E(), { navigate: A, basePath: j = "/organizations" } = e(), { hasPermission: M, isLoading: N } = S(), { workspace: P, loading: F, error: I } = l(k ?? ""), [L, R] = h("overview"), [z, B] = h(!1), { openConfirmDialog: V, ConfirmDialog: H } = o(), { members: U, loading: W, error: G, refetch: K } = f(L === "members" && k ? k ?? "" : "", 50, 0), { removeWorkspaceMember: q, loading: J } = d(), Y = U.length > 0 || L === "members" ? U.length : P?.memberCount ?? 0, X = m(() => [{
31
+ let O = n(), { id: k } = C(), { navigate: A, basePath: j = "/organizations", apiGatewayUrl: M, authToken: N } = e(), { hasPermission: P, isLoading: F } = y(), { workspace: I, loading: L, error: R } = l(k ?? ""), [z, B] = p("overview"), [V, H] = p(!1), { openConfirmDialog: U, ConfirmDialog: W } = o(), { members: G, loading: K, error: q, refetch: J } = te(z === "members" && k ? k ?? "" : "", 50, 0), { removeWorkspaceMember: Y, loading: X } = ee(), Z = G.length > 0 || z === "members" ? G.length : I?.memberCount ?? 0, Q = E(f(() => G.map((e) => ({
32
+ actorId: e.userId,
33
+ actorType: "user"
34
+ })), [G]), {
35
+ apiGatewayUrl: M,
36
+ authToken: N,
37
+ orgId: I?.organizationId,
38
+ workspaceId: k
39
+ }), re = f(() => [{
31
40
  id: "overview",
32
41
  label: O("workspaces.detail.tab.overview", "Overview")
33
42
  }, {
34
43
  id: "members",
35
- label: `${O("workspaces.detail.tab.members", "Members")} (${Y})`
36
- }], [Y, O]), Z = (e) => {
37
- k && V({
44
+ label: `${O("workspaces.detail.tab.members", "Members")} (${Z})`
45
+ }], [Z, O]), $ = (e) => {
46
+ k && U({
38
47
  title: O("workspaces.removeMember.title", "Remove workspace member"),
39
48
  description: `${O("workspaces.removeMember.prefix", "Remove")} ${e} ${O("workspaces.removeMember.suffix", "from this workspace? They will keep their organization membership.")}`,
40
49
  confirmText: O("common.remove", "Remove"),
@@ -42,9 +51,9 @@ function O() {
42
51
  onConfirm: () => {
43
52
  (async () => {
44
53
  try {
45
- let n = await q(k, e);
54
+ let n = await Y(k, e);
46
55
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? O("workspaces.removeMember.failed", "Failed to remove workspace member"));
47
- await K(), t.success(O("workspaces.removeMember.success", "Workspace member removed successfully"));
56
+ await J(), t.success(O("workspaces.removeMember.success", "Workspace member removed successfully"));
48
57
  } catch (e) {
49
58
  t.error(e instanceof Error ? e.message : O("workspaces.removeMember.failed", "Failed to remove workspace member"));
50
59
  }
@@ -52,253 +61,256 @@ function O() {
52
61
  }
53
62
  });
54
63
  };
55
- return N ? /* @__PURE__ */ w("div", {
64
+ return F ? /* @__PURE__ */ x("div", {
56
65
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
57
- children: /* @__PURE__ */ w(r, { message: O("common.loadingPermissions", "Loading permissions...") })
58
- }) : M(s.WORKSPACE_READ) ? F ? /* @__PURE__ */ w("div", {
66
+ children: /* @__PURE__ */ x(r, { message: O("common.loadingPermissions", "Loading permissions...") })
67
+ }) : P(s.WORKSPACE_READ) ? L ? /* @__PURE__ */ x("div", {
59
68
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
60
- children: /* @__PURE__ */ w(r, { message: O("workspaces.detail.loading", "Loading workspace details...") })
61
- }) : I || !P ? /* @__PURE__ */ w("div", {
69
+ children: /* @__PURE__ */ x(r, { message: O("workspaces.detail.loading", "Loading workspace details...") })
70
+ }) : R || !I ? /* @__PURE__ */ x("div", {
62
71
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
63
- children: /* @__PURE__ */ w(i, {
64
- message: I?.message || O("workspaces.detail.notFound", "Workspace not found"),
72
+ children: /* @__PURE__ */ x(i, {
73
+ message: R?.message || O("workspaces.detail.notFound", "Workspace not found"),
65
74
  action: {
66
75
  label: O("workspaces.create.backToWorkspaces", "Back to Workspaces"),
67
76
  onClick: () => A(`${j}/workspaces`)
68
77
  }
69
78
  })
70
- }) : /* @__PURE__ */ T("div", {
79
+ }) : /* @__PURE__ */ S("div", {
71
80
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-300",
72
81
  children: [
73
- /* @__PURE__ */ T("div", {
82
+ /* @__PURE__ */ S("div", {
74
83
  className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
75
- children: [/* @__PURE__ */ T("div", {
84
+ children: [/* @__PURE__ */ S("div", {
76
85
  className: "space-y-4",
77
- children: [/* @__PURE__ */ T("button", {
86
+ children: [/* @__PURE__ */ S("button", {
78
87
  type: "button",
79
88
  onClick: () => A(`${j}/workspaces`),
80
89
  className: "inline-flex min-h-10 items-center gap-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:text-[var(--color-text-primary)] active:scale-[0.98]",
81
- children: [/* @__PURE__ */ w(g, {
90
+ children: [/* @__PURE__ */ x(m, {
82
91
  size: 20,
83
92
  "aria-hidden": "true"
84
- }), /* @__PURE__ */ w("span", {
93
+ }), /* @__PURE__ */ x("span", {
85
94
  className: "text-sm font-medium",
86
95
  children: O("workspaces.create.backToWorkspaces", "Back to Workspaces")
87
96
  })]
88
- }), /* @__PURE__ */ T("div", {
97
+ }), /* @__PURE__ */ S("div", {
89
98
  className: "flex flex-col gap-4 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-5 shadow-[var(--shadow-elevation-1)] lg:flex-row lg:items-start lg:justify-between",
90
- children: [/* @__PURE__ */ T("div", {
99
+ children: [/* @__PURE__ */ S("div", {
91
100
  className: "flex min-w-0 items-start gap-4",
92
- children: [/* @__PURE__ */ w("div", {
101
+ children: [/* @__PURE__ */ x("div", {
93
102
  className: "flex size-16 items-center justify-center rounded-xl bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
94
- children: /* @__PURE__ */ w(_, {
103
+ children: /* @__PURE__ */ x(h, {
95
104
  size: 28,
96
105
  "aria-hidden": "true"
97
106
  })
98
- }), /* @__PURE__ */ T("div", {
107
+ }), /* @__PURE__ */ S("div", {
99
108
  className: "min-w-0 space-y-2",
100
- children: [/* @__PURE__ */ T("div", {
109
+ children: [/* @__PURE__ */ S("div", {
101
110
  className: "flex flex-wrap items-start gap-2",
102
111
  children: [
103
- /* @__PURE__ */ w("h1", {
112
+ /* @__PURE__ */ x("h1", {
104
113
  className: "text-3xl font-bold text-[var(--color-text-primary)]",
105
- children: P.name
114
+ children: I.name
106
115
  }),
107
- /* @__PURE__ */ w(u, { status: P.status }),
108
- /* @__PURE__ */ w("span", {
116
+ /* @__PURE__ */ x(u, { status: I.status }),
117
+ /* @__PURE__ */ x("span", {
109
118
  className: "inline-flex items-center rounded-md bg-[var(--color-bg-subtle)] px-2 py-1 text-xs font-medium text-[var(--color-text-secondary)]",
110
- children: P.type
119
+ children: I.type
111
120
  })
112
121
  ]
113
- }), /* @__PURE__ */ T("p", {
122
+ }), /* @__PURE__ */ S("p", {
114
123
  className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
115
- children: ["/", P.slug]
124
+ children: ["/", I.slug]
116
125
  })]
117
126
  })]
118
- }), /* @__PURE__ */ T("div", {
127
+ }), /* @__PURE__ */ S("div", {
119
128
  className: "flex flex-col gap-3 sm:flex-row",
120
- children: [/* @__PURE__ */ T("button", {
129
+ children: [/* @__PURE__ */ S("button", {
121
130
  type: "button",
122
- onClick: () => A(`${j}/${P.organizationId}`),
131
+ onClick: () => A(`${j}/${I.organizationId}`),
123
132
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-border-default)] px-4 py-2.5 text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
124
- children: [/* @__PURE__ */ w(x, {
133
+ children: [/* @__PURE__ */ x(v, {
125
134
  size: 16,
126
135
  "aria-hidden": "true"
127
- }), /* @__PURE__ */ w("span", { children: O("workspaces.detail.viewOrganization", "View Organization") })]
128
- }), M(s.WORKSPACE_UPDATE) && /* @__PURE__ */ T("button", {
136
+ }), /* @__PURE__ */ x("span", { children: O("workspaces.detail.viewOrganization", "View Organization") })]
137
+ }), P(s.WORKSPACE_UPDATE) && /* @__PURE__ */ S("button", {
129
138
  type: "button",
130
139
  onClick: () => A(`${j}/workspaces/${k}/edit`),
131
140
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90 active:scale-[0.98]",
132
- children: [/* @__PURE__ */ w(v, {
141
+ children: [/* @__PURE__ */ x(ne, {
133
142
  size: 16,
134
143
  "aria-hidden": "true"
135
- }), /* @__PURE__ */ w("span", { children: O("workspaces.edit.title", "Edit Workspace") })]
144
+ }), /* @__PURE__ */ x("span", { children: O("workspaces.edit.title", "Edit Workspace") })]
136
145
  })]
137
146
  })]
138
147
  })]
139
- }), /* @__PURE__ */ T("div", {
148
+ }), /* @__PURE__ */ S("div", {
140
149
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] shadow-[var(--shadow-elevation-1)]",
141
- children: [/* @__PURE__ */ w("div", {
150
+ children: [/* @__PURE__ */ x("div", {
142
151
  className: "overflow-x-auto border-b border-[var(--color-border-default)]",
143
- children: /* @__PURE__ */ w("div", {
152
+ children: /* @__PURE__ */ x("div", {
144
153
  className: "flex min-w-max gap-2 px-4 pt-4 sm:px-6",
145
- children: X.map((e) => {
146
- let t = L === e.id;
147
- return /* @__PURE__ */ w("button", {
154
+ children: re.map((e) => {
155
+ let t = z === e.id;
156
+ return /* @__PURE__ */ x("button", {
148
157
  type: "button",
149
- onClick: () => R(e.id),
158
+ onClick: () => B(e.id),
150
159
  className: `inline-flex min-h-11 items-center rounded-t-lg border-b-2 px-4 py-3 text-sm font-medium transition-colors ${t ? "border-[var(--color-action-primary-bg)] text-[var(--color-action-primary-bg)]" : "border-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}`,
151
160
  "aria-pressed": t,
152
161
  children: e.label
153
162
  }, e.id);
154
163
  })
155
164
  })
156
- }), /* @__PURE__ */ w("div", {
165
+ }), /* @__PURE__ */ x("div", {
157
166
  className: "p-4 sm:p-6",
158
- children: L === "overview" ? /* @__PURE__ */ T("div", {
167
+ children: z === "overview" ? /* @__PURE__ */ S("div", {
159
168
  className: "grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]",
160
- children: [/* @__PURE__ */ T("section", {
169
+ children: [/* @__PURE__ */ S("section", {
161
170
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-5",
162
- children: [/* @__PURE__ */ w("h2", {
171
+ children: [/* @__PURE__ */ x("h2", {
163
172
  className: "text-lg font-semibold text-[var(--color-text-primary)]",
164
173
  children: O("workspaces.detail.detailsSection", "Workspace details")
165
- }), /* @__PURE__ */ T("dl", {
174
+ }), /* @__PURE__ */ S("dl", {
166
175
  className: "mt-5 grid grid-cols-1 gap-4 sm:grid-cols-2",
167
176
  children: [
168
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
177
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
169
178
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
170
179
  children: O("common.name", "Name")
171
- }), /* @__PURE__ */ w("dd", {
180
+ }), /* @__PURE__ */ x("dd", {
172
181
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
173
- children: P.name
182
+ children: I.name
174
183
  })] }),
175
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
184
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
176
185
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
177
186
  children: O("common.slug", "Slug")
178
- }), /* @__PURE__ */ w("dd", {
187
+ }), /* @__PURE__ */ x("dd", {
179
188
  className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
180
- children: P.slug
189
+ children: I.slug
181
190
  })] }),
182
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
191
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
183
192
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
184
193
  children: O("common.status", "Status")
185
- }), /* @__PURE__ */ w("dd", {
194
+ }), /* @__PURE__ */ x("dd", {
186
195
  className: "mt-1",
187
- children: /* @__PURE__ */ w(u, { status: P.status })
196
+ children: /* @__PURE__ */ x(u, { status: I.status })
188
197
  })] }),
189
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
198
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
190
199
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
191
200
  children: O("workspaces.list.column.type", "Type")
192
- }), /* @__PURE__ */ w("dd", {
201
+ }), /* @__PURE__ */ x("dd", {
193
202
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
194
- children: P.type
203
+ children: I.type
195
204
  })] }),
196
- /* @__PURE__ */ T("div", {
205
+ /* @__PURE__ */ S("div", {
197
206
  className: "sm:col-span-2",
198
- children: [/* @__PURE__ */ w("dt", {
207
+ children: [/* @__PURE__ */ x("dt", {
199
208
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
200
209
  children: O("members.detail.orgId", "Organization ID")
201
- }), /* @__PURE__ */ w("dd", {
210
+ }), /* @__PURE__ */ x("dd", {
202
211
  className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
203
- children: P.organizationId
212
+ children: I.organizationId
204
213
  })]
205
214
  }),
206
- P.endpoint ? /* @__PURE__ */ T("div", {
215
+ I.endpoint ? /* @__PURE__ */ S("div", {
207
216
  className: "sm:col-span-2",
208
- children: [/* @__PURE__ */ w("dt", {
217
+ children: [/* @__PURE__ */ x("dt", {
209
218
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
210
219
  children: O("workspaces.detail.endpoint", "Endpoint")
211
- }), /* @__PURE__ */ w("dd", {
220
+ }), /* @__PURE__ */ x("dd", {
212
221
  className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
213
- children: P.endpoint
222
+ children: I.endpoint
214
223
  })]
215
224
  }) : null
216
225
  ]
217
226
  })]
218
- }), /* @__PURE__ */ T("aside", {
227
+ }), /* @__PURE__ */ S("aside", {
219
228
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-5",
220
- children: [/* @__PURE__ */ w("h2", {
229
+ children: [/* @__PURE__ */ x("h2", {
221
230
  className: "text-lg font-semibold text-[var(--color-text-primary)]",
222
231
  children: O("common.metadata", "Metadata")
223
- }), /* @__PURE__ */ T("dl", {
232
+ }), /* @__PURE__ */ S("dl", {
224
233
  className: "mt-5 space-y-4",
225
234
  children: [
226
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
235
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
227
236
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
228
237
  children: O("workspaces.list.members", "Members")
229
- }), /* @__PURE__ */ w("dd", {
238
+ }), /* @__PURE__ */ x("dd", {
230
239
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
231
- children: Y
240
+ children: Z
232
241
  })] }),
233
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
242
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
234
243
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
235
244
  children: O("common.created", "Created")
236
- }), /* @__PURE__ */ w("dd", {
245
+ }), /* @__PURE__ */ x("dd", {
237
246
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
238
- children: D(P.createdAt)
247
+ children: D(I.createdAt)
239
248
  })] }),
240
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
249
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
241
250
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
242
251
  children: O("common.lastUpdated", "Last updated")
243
- }), /* @__PURE__ */ w("dd", {
252
+ }), /* @__PURE__ */ x("dd", {
244
253
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
245
- children: D(P.updatedAt)
254
+ children: D(I.updatedAt)
246
255
  })] }),
247
- P.region ? /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
256
+ I.region ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
248
257
  className: "text-sm font-medium text-[var(--color-text-secondary)]",
249
258
  children: O("workspaces.detail.region", "Region")
250
- }), /* @__PURE__ */ w("dd", {
259
+ }), /* @__PURE__ */ x("dd", {
251
260
  className: "mt-1 text-sm text-[var(--color-text-primary)]",
252
- children: P.region
261
+ children: I.region
253
262
  })] }) : null
254
263
  ]
255
264
  })]
256
265
  })]
257
- }) : /* @__PURE__ */ T("section", {
266
+ }) : /* @__PURE__ */ S("section", {
258
267
  className: "space-y-4",
259
- children: [/* @__PURE__ */ T("div", {
268
+ children: [/* @__PURE__ */ S("div", {
260
269
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
261
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h2", {
270
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
262
271
  className: "text-lg font-semibold text-[var(--color-text-primary)]",
263
272
  children: O("workspaces.detail.membersTitle", "Workspace members")
264
- }), /* @__PURE__ */ w("p", {
273
+ }), /* @__PURE__ */ x("p", {
265
274
  className: "text-sm text-[var(--color-text-secondary)]",
266
275
  children: O("workspaces.detail.membersSubtitle", "Add organization members to this workspace and manage access.")
267
- })] }), M(s.MEMBER_INVITE) && /* @__PURE__ */ T("button", {
276
+ })] }), P(s.MEMBER_INVITE) && /* @__PURE__ */ S("button", {
268
277
  type: "button",
269
- onClick: () => B(!0),
278
+ onClick: () => H(!0),
270
279
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90 active:scale-[0.98]",
271
- children: [/* @__PURE__ */ w(b, {
280
+ children: [/* @__PURE__ */ x(_, {
272
281
  size: 16,
273
282
  "aria-hidden": "true"
274
- }), /* @__PURE__ */ w("span", { children: O("workspaces.detail.addMember", "Add Member") })]
283
+ }), /* @__PURE__ */ x("span", { children: O("workspaces.detail.addMember", "Add Member") })]
275
284
  })]
276
- }), W ? /* @__PURE__ */ w("div", {
285
+ }), K ? /* @__PURE__ */ x("div", {
277
286
  className: "py-8",
278
- children: /* @__PURE__ */ w(r, { message: O("workspaces.detail.loadingMembers", "Loading workspace members...") })
279
- }) : G ? /* @__PURE__ */ w(i, {
280
- message: G.message,
287
+ children: /* @__PURE__ */ x(r, { message: O("workspaces.detail.loadingMembers", "Loading workspace members...") })
288
+ }) : q ? /* @__PURE__ */ x(i, {
289
+ message: q.message,
281
290
  action: {
282
291
  label: O("common.retry", "Retry"),
283
292
  onClick: () => {
284
- K();
293
+ J();
285
294
  }
286
295
  }
287
- }) : U.length > 0 ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
296
+ }) : G.length > 0 ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", {
288
297
  className: "grid gap-4 md:hidden",
289
- children: U.map((e) => /* @__PURE__ */ w("article", {
298
+ children: G.map((e) => /* @__PURE__ */ x("article", {
290
299
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-4",
291
- children: /* @__PURE__ */ T("div", {
300
+ children: /* @__PURE__ */ S("div", {
292
301
  className: "space-y-3",
293
302
  children: [
294
- /* @__PURE__ */ T("div", {
303
+ /* @__PURE__ */ S("div", {
295
304
  className: "flex items-start justify-between gap-3",
296
- children: [/* @__PURE__ */ T("div", {
305
+ children: [/* @__PURE__ */ S("div", {
297
306
  className: "min-w-0",
298
- children: [/* @__PURE__ */ w("h3", {
299
- className: "break-all font-mono text-sm font-semibold text-[var(--color-text-primary)]",
300
- children: e.userId
301
- }), /* @__PURE__ */ T("p", {
307
+ children: [/* @__PURE__ */ x(w, {
308
+ profile: Q[e.userId] ?? T({
309
+ actorId: e.userId,
310
+ actorType: "user"
311
+ }),
312
+ variant: "inline"
313
+ }), /* @__PURE__ */ S("p", {
302
314
  className: "mt-1 text-sm text-[var(--color-text-secondary)]",
303
315
  children: [
304
316
  O("members.list.joined", "Joined"),
@@ -306,24 +318,24 @@ function O() {
306
318
  D(e.joinedAt)
307
319
  ]
308
320
  })]
309
- }), /* @__PURE__ */ w(c, { role: e.role })]
321
+ }), /* @__PURE__ */ x(c, { role: e.role })]
310
322
  }),
311
- /* @__PURE__ */ w("dl", {
323
+ /* @__PURE__ */ x("dl", {
312
324
  className: "grid grid-cols-1 gap-3 text-sm",
313
- children: /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
325
+ children: /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("dt", {
314
326
  className: "text-[var(--color-text-secondary)]",
315
327
  children: O("members.list.invitedBy", "Invited by")
316
- }), /* @__PURE__ */ w("dd", {
328
+ }), /* @__PURE__ */ x("dd", {
317
329
  className: "mt-1 break-all font-mono text-[var(--color-text-primary)]",
318
330
  children: e.invitedBy || "—"
319
331
  })] })
320
332
  }),
321
- /* @__PURE__ */ T("button", {
333
+ /* @__PURE__ */ S("button", {
322
334
  type: "button",
323
- onClick: () => Z(e.userId),
324
- disabled: J,
335
+ onClick: () => $(e.userId),
336
+ disabled: X,
325
337
  className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-status-error-border)] px-3 py-2 text-sm text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
326
- children: [/* @__PURE__ */ w(y, {
338
+ children: [/* @__PURE__ */ x(g, {
327
339
  size: 16,
328
340
  "aria-hidden": "true"
329
341
  }), O("common.remove", "Remove")]
@@ -331,67 +343,73 @@ function O() {
331
343
  ]
332
344
  })
333
345
  }, e.id))
334
- }), /* @__PURE__ */ w("div", {
346
+ }), /* @__PURE__ */ x("div", {
335
347
  className: "hidden overflow-hidden rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] md:block",
336
- children: /* @__PURE__ */ w("div", {
348
+ children: /* @__PURE__ */ x("div", {
337
349
  className: "overflow-x-auto",
338
- children: /* @__PURE__ */ T("table", {
350
+ children: /* @__PURE__ */ S("table", {
339
351
  className: "min-w-full",
340
- children: [/* @__PURE__ */ w("thead", {
352
+ children: [/* @__PURE__ */ x("thead", {
341
353
  className: "bg-[var(--color-bg-subtle)]",
342
- children: /* @__PURE__ */ T("tr", { children: [
343
- /* @__PURE__ */ w("th", {
354
+ children: /* @__PURE__ */ S("tr", { children: [
355
+ /* @__PURE__ */ x("th", {
344
356
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
345
357
  children: O("members.detail.userId", "User ID")
346
358
  }),
347
- /* @__PURE__ */ w("th", {
359
+ /* @__PURE__ */ x("th", {
348
360
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
349
361
  children: O("members.list.column.role", "Role")
350
362
  }),
351
- /* @__PURE__ */ w("th", {
363
+ /* @__PURE__ */ x("th", {
352
364
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
353
365
  children: O("members.list.joined", "Joined")
354
366
  }),
355
- /* @__PURE__ */ w("th", {
367
+ /* @__PURE__ */ x("th", {
356
368
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
357
369
  children: O("members.list.invitedBy", "Invited by")
358
370
  }),
359
- /* @__PURE__ */ w("th", {
371
+ /* @__PURE__ */ x("th", {
360
372
  className: "px-6 py-3 text-right text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
361
373
  children: O("common.actions", "Actions")
362
374
  })
363
375
  ] })
364
- }), /* @__PURE__ */ w("tbody", {
376
+ }), /* @__PURE__ */ x("tbody", {
365
377
  className: "divide-y divide-[var(--color-border-default)]",
366
- children: U.map((e) => /* @__PURE__ */ T("tr", {
378
+ children: G.map((e) => /* @__PURE__ */ S("tr", {
367
379
  className: "transition-colors hover:bg-[var(--color-bg-subtle)]",
368
380
  children: [
369
- /* @__PURE__ */ w("td", {
370
- className: "px-6 py-4 font-mono text-sm text-[var(--color-text-primary)]",
371
- children: e.userId
381
+ /* @__PURE__ */ x("td", {
382
+ className: "px-6 py-4",
383
+ children: /* @__PURE__ */ x(w, {
384
+ profile: Q[e.userId] ?? T({
385
+ actorId: e.userId,
386
+ actorType: "user"
387
+ }),
388
+ variant: "cell"
389
+ })
372
390
  }),
373
- /* @__PURE__ */ w("td", {
391
+ /* @__PURE__ */ x("td", {
374
392
  className: "px-6 py-4",
375
- children: /* @__PURE__ */ w(c, { role: e.role })
393
+ children: /* @__PURE__ */ x(c, { role: e.role })
376
394
  }),
377
- /* @__PURE__ */ w("td", {
395
+ /* @__PURE__ */ x("td", {
378
396
  className: "px-6 py-4 text-sm text-[var(--color-text-secondary)]",
379
397
  children: D(e.joinedAt)
380
398
  }),
381
- /* @__PURE__ */ w("td", {
399
+ /* @__PURE__ */ x("td", {
382
400
  className: "px-6 py-4 break-all font-mono text-sm text-[var(--color-text-secondary)]",
383
401
  children: e.invitedBy || "—"
384
402
  }),
385
- /* @__PURE__ */ w("td", {
403
+ /* @__PURE__ */ x("td", {
386
404
  className: "px-6 py-4 text-right",
387
- children: /* @__PURE__ */ w("button", {
405
+ children: /* @__PURE__ */ x("button", {
388
406
  type: "button",
389
- onClick: () => Z(e.userId),
390
- disabled: J,
407
+ onClick: () => $(e.userId),
408
+ disabled: X,
391
409
  className: "rounded-lg p-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
392
410
  "aria-label": `${O("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${O("workspaces.removeMember.ariaSuffix", "from workspace")}`,
393
411
  title: `${O("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${O("workspaces.removeMember.ariaSuffix", "from workspace")}`,
394
- children: /* @__PURE__ */ w(y, {
412
+ children: /* @__PURE__ */ x(g, {
395
413
  size: 18,
396
414
  "aria-hidden": "true"
397
415
  })
@@ -402,10 +420,10 @@ function O() {
402
420
  })]
403
421
  })
404
422
  })
405
- })] }) : /* @__PURE__ */ w("div", {
423
+ })] }) : /* @__PURE__ */ x("div", {
406
424
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-6",
407
- children: /* @__PURE__ */ w(a, {
408
- icon: /* @__PURE__ */ w(x, {
425
+ children: /* @__PURE__ */ x(a, {
426
+ icon: /* @__PURE__ */ x(v, {
409
427
  size: 40,
410
428
  "aria-hidden": "true"
411
429
  }),
@@ -413,7 +431,7 @@ function O() {
413
431
  description: O("workspaces.detail.emptyMembersDescription", "Add people from the parent organization to grant workspace access."),
414
432
  action: {
415
433
  label: O("workspaces.detail.addMember", "Add Member"),
416
- onClick: () => B(!0)
434
+ onClick: () => H(!0)
417
435
  }
418
436
  })
419
437
  })]
@@ -421,19 +439,19 @@ function O() {
421
439
  })]
422
440
  })]
423
441
  }),
424
- /* @__PURE__ */ w(p, {
425
- open: z,
426
- onOpenChange: B,
427
- workspaceId: P.id,
428
- organizationId: P.organizationId,
429
- existingMembers: U,
430
- onInviteOrganizationMember: () => A(`${j}/${P.organizationId}/members/invite`)
442
+ /* @__PURE__ */ x(d, {
443
+ open: V,
444
+ onOpenChange: H,
445
+ workspaceId: I.id,
446
+ organizationId: I.organizationId,
447
+ existingMembers: G,
448
+ onInviteOrganizationMember: () => A(`${j}/${I.organizationId}/members/invite`)
431
449
  }),
432
- H
450
+ W
433
451
  ]
434
- }) : /* @__PURE__ */ w("div", {
452
+ }) : /* @__PURE__ */ x("div", {
435
453
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
436
- children: /* @__PURE__ */ w("div", {
454
+ children: /* @__PURE__ */ x("div", {
437
455
  className: "p-8 text-center text-[var(--color-text-secondary)]",
438
456
  children: O("workspaces.detail.noPermission", "You don't have permission to view this workspace.")
439
457
  })