@tangle-network/agent-app 1.0.26 → 2.0.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 (68) hide show
  1. package/dist/assistant/index.js +8 -8
  2. package/dist/chat-react/index.js +3 -3
  3. package/dist/chat-routes/index.js +8 -8
  4. package/dist/chat-store/index.js +3 -3
  5. package/dist/{chunk-H3XWDX4Z.js → chunk-4YZKDWMB.js} +2 -2
  6. package/dist/{chunk-NZMP7PFG.js → chunk-7IVRHG3L.js} +3 -3
  7. package/dist/{chunk-OVVVGEF6.js → chunk-CTQQGPHT.js} +6 -6
  8. package/dist/{chunk-XCUT52I3.js → chunk-GLZMHETS.js} +2 -2
  9. package/dist/chunk-GLZMHETS.js.map +1 -0
  10. package/dist/{chunk-Z5Y6OYAP.js → chunk-HFCPHY5D.js} +2 -2
  11. package/dist/{chunk-OZWHBH4T.js → chunk-HFWKZHTZ.js} +21 -5
  12. package/dist/chunk-HFWKZHTZ.js.map +1 -0
  13. package/dist/{chunk-YHA6W3OW.js → chunk-JGPSBTUH.js} +3 -3
  14. package/dist/{chunk-U4F6NHAA.js → chunk-JM6ANMOA.js} +2 -2
  15. package/dist/{chunk-6VRM2RVY.js → chunk-KWF4NL6R.js} +3 -3
  16. package/dist/{chunk-Q54SXI57.js → chunk-ORBPOLBM.js} +3 -3
  17. package/dist/{chunk-B2X2GGV5.js → chunk-PKBNDVGR.js} +2 -2
  18. package/dist/{chunk-RCSAAWOH.js → chunk-SUWAECFT.js} +2 -1
  19. package/dist/chunk-SUWAECFT.js.map +1 -0
  20. package/dist/{chunk-4PIN6QYQ.js → chunk-T3C2BX7N.js} +22 -1
  21. package/dist/chunk-T3C2BX7N.js.map +1 -0
  22. package/dist/harness/index.js +1 -1
  23. package/dist/hosted-agent/react/index.js +1 -1
  24. package/dist/hosted-agent/react/index.js.map +1 -1
  25. package/dist/plans/drizzle.js +1 -1
  26. package/dist/plans/index.d.ts +1 -0
  27. package/dist/plans/index.js +7 -1
  28. package/dist/plans/plan-mode.d.ts +42 -0
  29. package/dist/preset-cloudflare/index.js +5 -5
  30. package/dist/public-consultation/index.d.ts +1 -1
  31. package/dist/public-consultation/index.js +7 -7
  32. package/dist/sandbox/index.js +2 -2
  33. package/dist/sandbox/prompt-profile.d.ts +1 -1
  34. package/dist/settings-react/index.js +146 -93
  35. package/dist/settings-react/index.js.map +1 -1
  36. package/dist/skills-placement/box.js +2 -2
  37. package/dist/skills-placement/index.js +2 -2
  38. package/dist/stream/index.js +2 -2
  39. package/dist/teams/index.d.ts +2 -2
  40. package/dist/teams-react/components/index.d.ts +0 -2
  41. package/dist/teams-react/components/invitation-detail.d.ts +1 -1
  42. package/dist/teams-react/components/member-access.d.ts +2 -2
  43. package/dist/teams-react/contracts.d.ts +3 -68
  44. package/dist/teams-react/index.d.ts +5 -6
  45. package/dist/teams-react/index.js +46 -335
  46. package/dist/teams-react/index.js.map +1 -1
  47. package/dist/web-react/agent-profile-editor.js +3 -3
  48. package/dist/web-react/index.js +8 -8
  49. package/package.json +3 -3
  50. package/dist/chunk-4PIN6QYQ.js.map +0 -1
  51. package/dist/chunk-OZWHBH4T.js.map +0 -1
  52. package/dist/chunk-RCSAAWOH.js.map +0 -1
  53. package/dist/chunk-XCUT52I3.js.map +0 -1
  54. package/dist/chunk-YL5JDX7K.js +0 -70
  55. package/dist/chunk-YL5JDX7K.js.map +0 -1
  56. package/dist/stories/settings/team-panels-demo.d.ts +0 -21
  57. package/dist/teams-react/components/InvitationsPanel.d.ts +0 -13
  58. package/dist/teams-react/components/InviteForm.d.ts +0 -20
  59. package/dist/teams-react/components/MembersPanel.d.ts +0 -18
  60. /package/dist/{chunk-H3XWDX4Z.js.map → chunk-4YZKDWMB.js.map} +0 -0
  61. /package/dist/{chunk-NZMP7PFG.js.map → chunk-7IVRHG3L.js.map} +0 -0
  62. /package/dist/{chunk-OVVVGEF6.js.map → chunk-CTQQGPHT.js.map} +0 -0
  63. /package/dist/{chunk-Z5Y6OYAP.js.map → chunk-HFCPHY5D.js.map} +0 -0
  64. /package/dist/{chunk-YHA6W3OW.js.map → chunk-JGPSBTUH.js.map} +0 -0
  65. /package/dist/{chunk-U4F6NHAA.js.map → chunk-JM6ANMOA.js.map} +0 -0
  66. /package/dist/{chunk-6VRM2RVY.js.map → chunk-KWF4NL6R.js.map} +0 -0
  67. /package/dist/{chunk-Q54SXI57.js.map → chunk-ORBPOLBM.js.map} +0 -0
  68. /package/dist/{chunk-B2X2GGV5.js.map → chunk-PKBNDVGR.js.map} +0 -0
@@ -1,343 +1,56 @@
1
- import {
2
- RoleSelect,
3
- canManageMember,
4
- invitationDetail,
5
- isCurrentMember,
6
- memberRoleLabel
7
- } from "../chunk-YL5JDX7K.js";
8
- import {
9
- INVITATION_EMAIL_HINT,
10
- isInvitationEmail
11
- } from "../chunk-Y5WTAHWY.js";
12
- import {
13
- hasWorkspaceRole
14
- } from "../chunk-6XIAPIW6.js";
15
1
  import {
16
2
  BrandMark
17
3
  } from "../chunk-7PULOECS.js";
18
4
 
19
- // src/teams-react/components/MembersPanel.tsx
20
- import { Button as Button2, Heading } from "@tangle-network/ui/primitives";
21
-
22
- // src/teams-react/components/InviteForm.tsx
23
- import { Button, Input } from "@tangle-network/ui/primitives";
24
- import { useId, useState } from "react";
25
- import { jsx, jsxs } from "react/jsx-runtime";
26
- function InviteForm({ label, placeholder, onInvite }) {
27
- const id = useId();
28
- const [email, setEmail] = useState("");
29
- const [role, setRole] = useState("editor");
30
- const [inviting, setInviting] = useState(false);
31
- const [checked, setChecked] = useState(false);
32
- const valid = isInvitationEmail(email);
33
- const showHint = checked && email.trim() !== "" && !valid;
34
- async function submit() {
35
- if (inviting) return;
36
- if (!valid) {
37
- setChecked(true);
38
- return;
39
- }
40
- setInviting(true);
41
- try {
42
- if (await onInvite({ email: email.trim(), role })) {
43
- setEmail("");
44
- setChecked(false);
45
- }
46
- } finally {
47
- setInviting(false);
48
- }
49
- }
50
- return /* @__PURE__ */ jsxs("div", { className: "@container/invite flex flex-col gap-1.5", children: [
51
- /* @__PURE__ */ jsx("label", { htmlFor: `${id}-email`, className: "text-sm font-medium text-[var(--text-secondary)]", children: label }),
52
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
53
- /* @__PURE__ */ jsx(
54
- Input,
55
- {
56
- id: `${id}-email`,
57
- type: "email",
58
- inputMode: "email",
59
- autoComplete: "off",
60
- placeholder,
61
- value: email,
62
- variant: showHint ? "error" : void 0,
63
- "aria-describedby": showHint ? `${id}-hint` : void 0,
64
- onChange: (event) => setEmail(event.target.value),
65
- onBlur: () => setChecked(true),
66
- onKeyDown: (event) => {
67
- if (event.key === "Enter") {
68
- event.preventDefault();
69
- void submit();
70
- }
71
- },
72
- className: "min-w-[12rem] flex-1"
73
- }
74
- ),
75
- /* @__PURE__ */ jsx("div", { className: "w-72 shrink-0 @max-[36rem]/invite:w-full", children: /* @__PURE__ */ jsx(RoleSelect, { value: role, ariaLabel: "Invite role", onChange: setRole }) }),
76
- /* @__PURE__ */ jsx(Button, { type: "button", className: "ml-auto", onClick: () => void submit(), disabled: inviting || !valid, children: inviting ? "Inviting\u2026" : "Invite" })
77
- ] }),
78
- showHint && /* @__PURE__ */ jsx("p", { id: `${id}-hint`, role: "alert", className: "text-sm text-[var(--surface-danger-text)]", children: INVITATION_EMAIL_HINT })
79
- ] });
80
- }
81
-
82
- // src/teams-react/components/MembersPanel.tsx
83
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
84
- function MembersPanel({
85
- members,
86
- currentRole,
87
- currentUserId,
88
- onInvite,
89
- onChangeRole,
90
- onRemove,
91
- onNotice,
92
- showInviteForm = true
93
- }) {
94
- const canManage = hasWorkspaceRole(currentRole, "admin");
95
- function notify(kind, message) {
96
- onNotice?.({ kind, message });
97
- }
98
- async function invite(input) {
99
- try {
100
- const result = await onInvite(input);
101
- notify("success", result && "inviteUrl" in result && result.inviteUrl ? `Invite link ready for ${input.email}` : `Invited ${input.email}`);
102
- return true;
103
- } catch (err) {
104
- notify("error", err instanceof Error ? err.message : "Failed to invite");
105
- return false;
106
- }
107
- }
108
- async function changeRole(memberId, role) {
109
- try {
110
- await onChangeRole({ memberId, role });
111
- notify("success", "Role updated");
112
- } catch (err) {
113
- notify("error", err instanceof Error ? err.message : "Failed to update role");
114
- }
115
- }
116
- async function remove(memberId) {
117
- try {
118
- await onRemove({ memberId });
119
- notify("success", "Member removed");
120
- } catch (err) {
121
- notify("error", err instanceof Error ? err.message : "Failed to remove member");
122
- }
123
- }
124
- return /* @__PURE__ */ jsxs2("section", { className: "@container/members flex flex-col gap-4", children: [
125
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between", children: [
126
- /* @__PURE__ */ jsx2(Heading, { as: "h4", variant: "subsection", children: "Members" }),
127
- /* @__PURE__ */ jsxs2("span", { className: "text-sm text-[var(--text-muted)]", children: [
128
- members.length,
129
- " total"
130
- ] })
131
- ] }),
132
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2", children: [
133
- members.map((member) => /* @__PURE__ */ jsx2(
134
- MemberRow,
135
- {
136
- member,
137
- editable: canManageMember(member, currentRole, currentUserId),
138
- self: isCurrentMember(member, currentUserId),
139
- onChangeRole: changeRole,
140
- onRemove: remove
141
- },
142
- member.id
143
- )),
144
- members.length === 0 && /* @__PURE__ */ jsx2("p", { className: "text-sm text-[var(--text-muted)]", children: "No team members yet." })
145
- ] }),
146
- canManage && showInviteForm && /* @__PURE__ */ jsx2("div", { className: "border-t border-[var(--border-default)] pt-3", children: /* @__PURE__ */ jsx2(InviteForm, { label: "Invite member", placeholder: "Email address", onInvite: invite }) })
147
- ] });
148
- }
149
- function MemberRow({ member, editable, self, onChangeRole, onRemove }) {
150
- const pending = member.acceptedAt == null;
151
- const label = member.name ?? member.email ?? "Unknown";
152
- const initial = (member.name?.[0] ?? member.email?.[0] ?? "?").toUpperCase();
153
- return /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2 border-b border-[var(--border-default)] py-2 last:border-0", children: [
154
- /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 items-center gap-3 @max-[36rem]/members:basis-40", children: [
155
- /* @__PURE__ */ jsx2("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-[var(--bg-input)] text-sm font-semibold text-[var(--text-secondary)]", children: initial }),
156
- /* @__PURE__ */ jsxs2("div", { className: "min-w-0", children: [
157
- /* @__PURE__ */ jsxs2("p", { className: "flex flex-wrap items-center gap-x-2 text-sm font-medium text-[var(--text-primary)]", children: [
158
- /* @__PURE__ */ jsxs2("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: [
159
- label,
160
- self && /* @__PURE__ */ jsx2("span", { className: "font-normal text-[var(--text-muted)]", children: " (you)" })
161
- ] }),
162
- pending && /* @__PURE__ */ jsx2("span", { className: "rounded border border-[var(--border-default)] px-1.5 py-0.5 text-sm font-medium text-[var(--text-muted)]", children: "Pending" })
163
- ] }),
164
- member.name && member.email && /* @__PURE__ */ jsx2("p", { className: "text-sm text-[var(--text-muted)] [overflow-wrap:anywhere]", children: member.email })
165
- ] })
166
- ] }),
167
- editable ? /* @__PURE__ */ jsxs2(Fragment, { children: [
168
- /* @__PURE__ */ jsx2("div", { className: "w-72 shrink-0 @max-[36rem]/members:order-last @max-[36rem]/members:w-full", children: /* @__PURE__ */ jsx2(
169
- RoleSelect,
170
- {
171
- value: member.role,
172
- ariaLabel: `Role for ${label}`,
173
- onChange: (role) => onChangeRole(member.id, role)
174
- }
175
- ) }),
176
- /* @__PURE__ */ jsx2(Button2, { type: "button", variant: "destructive-outline", "aria-label": `Remove ${label}`, onClick: () => onRemove(member.id), children: "Remove" })
177
- ] }) : /* @__PURE__ */ jsx2("span", { className: "ml-auto rounded border border-[var(--border-default)] px-2 py-0.5 text-sm text-[var(--text-secondary)]", children: memberRoleLabel(member) })
178
- ] });
179
- }
180
-
181
- // src/teams-react/components/InvitationsPanel.tsx
182
- import { Button as Button3, Heading as Heading2 } from "@tangle-network/ui/primitives";
183
- import { useState as useState2 } from "react";
184
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
185
- var BADGE_BASE = "inline-flex items-center rounded border px-2 py-0.5 text-sm font-medium";
186
- var STATUS = {
187
- accepted: { label: "Joined", tone: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" },
188
- pending: { label: "Pending", tone: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]" },
189
- revoked: { label: "Revoked", tone: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]" },
190
- expired: { label: "Expired", tone: "border-[var(--border-default)] text-[var(--text-muted)]" }
191
- };
192
- function InvitationsPanel({
193
- invitations,
194
- currentRole,
195
- onInvite,
196
- onResend,
197
- onRevoke,
198
- onCopy,
199
- onNotice
200
- }) {
201
- const [busyId, setBusyId] = useState2(null);
202
- const canManage = hasWorkspaceRole(currentRole, "admin");
203
- function notify(kind, message) {
204
- onNotice?.({ kind, message });
205
- }
206
- async function invite(input) {
207
- try {
208
- await onInvite(input);
209
- notify("success", `Invitation sent to ${input.email}`);
210
- return true;
211
- } catch (err) {
212
- notify("error", err instanceof Error ? err.message : "Failed to invite");
213
- return false;
214
- }
215
- }
216
- async function copyLink(inviteUrl) {
217
- try {
218
- if (onCopy) await onCopy({ inviteUrl });
219
- else await navigator.clipboard.writeText(inviteUrl);
220
- notify("success", "Invite link copied");
221
- } catch (err) {
222
- notify("error", err instanceof Error ? err.message : "Failed to copy link");
223
- }
224
- }
225
- async function resend(invitationId) {
226
- setBusyId(invitationId);
227
- try {
228
- await onResend({ invitationId });
229
- notify("success", "Invitation resent");
230
- } catch (err) {
231
- notify("error", err instanceof Error ? err.message : "Failed to resend invitation");
232
- } finally {
233
- setBusyId(null);
234
- }
235
- }
236
- async function revoke(invitationId) {
237
- setBusyId(invitationId);
238
- try {
239
- await onRevoke({ invitationId });
240
- notify("success", "Invitation revoked");
241
- } catch (err) {
242
- notify("error", err instanceof Error ? err.message : "Failed to revoke invitation");
243
- } finally {
244
- setBusyId(null);
245
- }
246
- }
247
- return /* @__PURE__ */ jsxs3("section", { className: "flex flex-col gap-4", children: [
248
- canManage && /* @__PURE__ */ jsx3(InviteForm, { label: "Invite by email", placeholder: "colleague@example.com", onInvite: invite }),
249
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 border-t border-[var(--border-default)] pt-3", children: [
250
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
251
- /* @__PURE__ */ jsx3(Heading2, { as: "h4", variant: "subsection", children: "Invitation history" }),
252
- /* @__PURE__ */ jsxs3("span", { className: "text-sm text-[var(--text-muted)]", children: [
253
- invitations.length,
254
- " total"
255
- ] })
256
- ] }),
257
- invitations.length === 0 ? /* @__PURE__ */ jsx3("p", { className: "text-sm text-[var(--text-muted)]", children: "No invitations yet." }) : invitations.map((invitation) => /* @__PURE__ */ jsx3(
258
- InvitationRow,
259
- {
260
- invitation,
261
- canManage,
262
- busy: busyId === invitation.id,
263
- onCopy: () => void copyLink(invitation.inviteUrl),
264
- onResend: () => void resend(invitation.id),
265
- onRevoke: () => void revoke(invitation.id)
266
- },
267
- invitation.id
268
- ))
269
- ] })
270
- ] });
271
- }
272
- function InvitationRow({ invitation, canManage, busy, onCopy, onResend, onRevoke }) {
273
- const isPending = invitation.status === "pending";
274
- const status = STATUS[invitation.status];
275
- return /* @__PURE__ */ jsxs3("div", { className: "rounded-lg border border-[var(--border-default)] bg-[var(--bg-input)] p-3", children: [
276
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between gap-3", children: [
277
- /* @__PURE__ */ jsxs3("div", { className: "min-w-0", children: [
278
- /* @__PURE__ */ jsx3("p", { className: "truncate text-sm font-medium text-[var(--text-primary)]", title: invitation.email, children: invitation.email }),
279
- /* @__PURE__ */ jsx3("p", { className: "text-sm text-[var(--text-muted)]", children: invitationDetail(invitation) }),
280
- isPending && invitation.emailStatus === "failed" && /* @__PURE__ */ jsx3("p", { className: "mt-1 text-sm text-[var(--surface-danger-text)]", children: "The email was not delivered. Copy the link and send it yourself." })
281
- ] }),
282
- /* @__PURE__ */ jsx3("span", { className: `${BADGE_BASE} ${status.tone} shrink-0`, children: status.label })
283
- ] }),
284
- canManage && isPending && /* @__PURE__ */ jsxs3("div", { className: "mt-3 flex flex-wrap items-center justify-end gap-2", children: [
285
- /* @__PURE__ */ jsx3(Button3, { type: "button", variant: "outline", onClick: onCopy, disabled: busy, children: "Copy link" }),
286
- /* @__PURE__ */ jsx3(Button3, { type: "button", variant: "outline", onClick: onResend, disabled: busy, children: busy ? "Working\u2026" : "Resend" }),
287
- /* @__PURE__ */ jsx3(Button3, { type: "button", variant: "destructive-outline", onClick: onRevoke, disabled: busy, children: "Revoke" })
288
- ] })
289
- ] });
290
- }
291
-
292
5
  // src/teams-react/components/InviteAcceptPage.tsx
293
- import { useState as useState3 } from "react";
294
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
6
+ import { useState } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
295
8
  function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification }) {
296
- const [accepting, setAccepting] = useState3(false);
297
- const [acceptError, setAcceptError] = useState3(null);
298
- const [accepted, setAccepted] = useState3(false);
299
- const [resendingVerification, setResendingVerification] = useState3(false);
300
- const [verificationSent, setVerificationSent] = useState3(false);
9
+ const [accepting, setAccepting] = useState(false);
10
+ const [acceptError, setAcceptError] = useState(null);
11
+ const [accepted, setAccepted] = useState(false);
12
+ const [resendingVerification, setResendingVerification] = useState(false);
13
+ const [verificationSent, setVerificationSent] = useState(false);
301
14
  if (details.status === "invalid") {
302
- return /* @__PURE__ */ jsx4(Shell, { title: "Invalid invitation", body: "This link is invalid or already used. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
15
+ return /* @__PURE__ */ jsx(Shell, { title: "Invalid invitation", body: "This link is invalid or already used. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
303
16
  }
304
17
  if (details.status === "already-accepted") {
305
- return /* @__PURE__ */ jsx4(Shell, { title: "Already accepted", body: "This invitation has already been accepted.", children: /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open workspace" }) });
18
+ return /* @__PURE__ */ jsx(Shell, { title: "Already accepted", body: "This invitation has already been accepted.", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open workspace" }) });
306
19
  }
307
20
  if (details.status === "expired") {
308
- return /* @__PURE__ */ jsx4(Shell, { title: "Invitation expired", body: "This invitation has expired. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
21
+ return /* @__PURE__ */ jsx(Shell, { title: "Invitation expired", body: "This invitation has expired. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
309
22
  }
310
23
  if (details.status === "revoked") {
311
- return /* @__PURE__ */ jsx4(Shell, { title: "Invitation revoked", body: "This invitation has been revoked. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
24
+ return /* @__PURE__ */ jsx(Shell, { title: "Invitation revoked", body: "This invitation has been revoked. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
312
25
  }
313
26
  const workspaceName = details.workspaceName ?? "a workspace";
314
27
  const inviterPrefix = details.inviterName ? `${details.inviterName} invited you` : "You've been invited";
315
28
  const roleSuffix = details.role ? ` as ${details.role}` : "";
316
29
  if (!details.currentUserEmail) {
317
- return /* @__PURE__ */ jsxs4(Shell, { title: "You've been invited", children: [
318
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
30
+ return /* @__PURE__ */ jsxs(Shell, { title: "You've been invited", children: [
31
+ /* @__PURE__ */ jsxs("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
319
32
  inviterPrefix,
320
33
  " to join ",
321
- /* @__PURE__ */ jsx4("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
34
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
322
35
  roleSuffix,
323
36
  "."
324
37
  ] }),
325
- details.inviteEmail && /* @__PURE__ */ jsxs4("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: [
38
+ details.inviteEmail && /* @__PURE__ */ jsxs("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: [
326
39
  "Sign in or create an account with",
327
40
  " ",
328
- /* @__PURE__ */ jsx4("span", { className: "font-medium text-[var(--text-primary)]", children: details.inviteEmail }),
41
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: details.inviteEmail }),
329
42
  " to accept."
330
43
  ] }),
331
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-2", children: [
332
- /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Sign in" }),
333
- /* @__PURE__ */ jsx4(SecondaryButton, { onClick: () => onNavigate({ kind: "sign-up" }), children: "Create account" })
44
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
45
+ /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Sign in" }),
46
+ /* @__PURE__ */ jsx(SecondaryButton, { onClick: () => onNavigate({ kind: "sign-up" }), children: "Create account" })
334
47
  ] })
335
48
  ] });
336
49
  }
337
50
  if (accepted) {
338
- return /* @__PURE__ */ jsx4(Shell, { title: "Welcome!", children: /* @__PURE__ */ jsxs4("p", { className: "text-sm text-[var(--text-secondary)]", children: [
51
+ return /* @__PURE__ */ jsx(Shell, { title: "Welcome!", children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-[var(--text-secondary)]", children: [
339
52
  "You've joined ",
340
- /* @__PURE__ */ jsx4("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
53
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
341
54
  "."
342
55
  ] }) });
343
56
  }
@@ -371,36 +84,36 @@ function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification
371
84
  setResendingVerification(false);
372
85
  }
373
86
  }
374
- return /* @__PURE__ */ jsxs4(Shell, { title: "Join workspace", children: [
375
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
87
+ return /* @__PURE__ */ jsxs(Shell, { title: "Join workspace", children: [
88
+ /* @__PURE__ */ jsxs("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
376
89
  inviterPrefix,
377
90
  " to join ",
378
- /* @__PURE__ */ jsx4("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
91
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
379
92
  roleSuffix,
380
93
  "."
381
94
  ] }),
382
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
95
+ /* @__PURE__ */ jsxs("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
383
96
  "Signed in as ",
384
- /* @__PURE__ */ jsx4("span", { className: "font-medium text-[var(--text-primary)]", children: details.currentUserEmail })
97
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: details.currentUserEmail })
385
98
  ] }),
386
- expiryLabel && /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-xs text-[var(--text-muted)]", children: [
99
+ expiryLabel && /* @__PURE__ */ jsxs("p", { className: "mb-4 text-xs text-[var(--text-muted)]", children: [
387
100
  "This invitation expires on ",
388
101
  expiryLabel,
389
102
  "."
390
103
  ] }),
391
- emailMismatch && /* @__PURE__ */ jsxs4(
104
+ emailMismatch && /* @__PURE__ */ jsxs(
392
105
  "div",
393
106
  {
394
107
  role: "alert",
395
108
  className: "mb-4 rounded-md border border-[var(--border-default)] px-4 py-2 text-sm text-[var(--text-warning)]",
396
109
  children: [
397
110
  "This invitation was sent to ",
398
- /* @__PURE__ */ jsx4("span", { className: "font-medium", children: details.inviteEmail }),
111
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: details.inviteEmail }),
399
112
  ". Switch to that account to accept it."
400
113
  ]
401
114
  }
402
115
  ),
403
- needsVerification && /* @__PURE__ */ jsx4(
116
+ needsVerification && /* @__PURE__ */ jsx(
404
117
  "div",
405
118
  {
406
119
  role: "alert",
@@ -408,33 +121,33 @@ function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification
408
121
  children: verificationSent ? "Verification email sent \u2014 check your inbox, then refresh this page to accept." : "Verify your email address before you can accept this invitation."
409
122
  }
410
123
  ),
411
- acceptError && /* @__PURE__ */ jsx4("p", { role: "alert", className: "mb-4 text-sm text-[var(--text-danger)]", children: acceptError }),
412
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-2", children: [
413
- emailMismatch ? /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "switch-account" }), children: "Switch account" }) : needsVerification ? onResendVerification ? /* @__PURE__ */ jsx4(
124
+ acceptError && /* @__PURE__ */ jsx("p", { role: "alert", className: "mb-4 text-sm text-[var(--text-danger)]", children: acceptError }),
125
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
126
+ emailMismatch ? /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "switch-account" }), children: "Switch account" }) : needsVerification ? onResendVerification ? /* @__PURE__ */ jsx(
414
127
  PrimaryButton,
415
128
  {
416
129
  onClick: () => void handleResendVerification(),
417
130
  disabled: resendingVerification || verificationSent,
418
131
  children: verificationSent ? "Verification sent" : resendingVerification ? "Sending\u2026" : "Resend verification email"
419
132
  }
420
- ) : /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open app" }) : /* @__PURE__ */ jsx4(PrimaryButton, { onClick: () => void handleAccept(), disabled: accepting, children: accepting ? "Accepting\u2026" : "Accept invitation" }),
421
- /* @__PURE__ */ jsx4(SecondaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Not now" })
133
+ ) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open app" }) : /* @__PURE__ */ jsx(PrimaryButton, { onClick: () => void handleAccept(), disabled: accepting, children: accepting ? "Accepting\u2026" : "Accept invitation" }),
134
+ /* @__PURE__ */ jsx(SecondaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Not now" })
422
135
  ] })
423
136
  ] });
424
137
  }
425
138
  function Shell({ title, body, children }) {
426
- return /* @__PURE__ */ jsxs4("div", { className: "mx-auto flex w-full max-w-sm flex-col", children: [
427
- /* @__PURE__ */ jsxs4("span", { className: "mb-4 flex items-center gap-2 text-[var(--text-muted)]", children: [
428
- /* @__PURE__ */ jsx4(BrandMark, { size: 22, className: "shrink-0" }),
429
- /* @__PURE__ */ jsx4("span", { className: "text-xs font-semibold uppercase tracking-[0.05em]", children: "Tangle Teams" })
139
+ return /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-sm flex-col", children: [
140
+ /* @__PURE__ */ jsxs("span", { className: "mb-4 flex items-center gap-2 text-[var(--text-muted)]", children: [
141
+ /* @__PURE__ */ jsx(BrandMark, { size: 22, className: "shrink-0" }),
142
+ /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase tracking-[0.05em]", children: "Tangle Teams" })
430
143
  ] }),
431
- /* @__PURE__ */ jsx4("h1", { className: "mb-1 text-xl font-semibold tracking-tight text-[var(--text-primary)]", children: title }),
432
- body && /* @__PURE__ */ jsx4("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: body }),
144
+ /* @__PURE__ */ jsx("h1", { className: "mb-1 text-xl font-semibold tracking-tight text-[var(--text-primary)]", children: title }),
145
+ body && /* @__PURE__ */ jsx("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: body }),
433
146
  children
434
147
  ] });
435
148
  }
436
149
  function PrimaryButton({ children, onClick, disabled }) {
437
- return /* @__PURE__ */ jsx4(
150
+ return /* @__PURE__ */ jsx(
438
151
  "button",
439
152
  {
440
153
  type: "button",
@@ -446,7 +159,7 @@ function PrimaryButton({ children, onClick, disabled }) {
446
159
  );
447
160
  }
448
161
  function SecondaryButton({ children, onClick }) {
449
- return /* @__PURE__ */ jsx4(
162
+ return /* @__PURE__ */ jsx(
450
163
  "button",
451
164
  {
452
165
  type: "button",
@@ -458,7 +171,7 @@ function SecondaryButton({ children, onClick }) {
458
171
  }
459
172
 
460
173
  // src/teams-react/components/InviteTokenPage.tsx
461
- import { jsx as jsx5 } from "react/jsx-runtime";
174
+ import { jsx as jsx2 } from "react/jsx-runtime";
462
175
  function InviteTokenPage({
463
176
  details,
464
177
  token,
@@ -470,7 +183,7 @@ function InviteTokenPage({
470
183
  appPath = (workspaceId) => workspaceId ? `/app/${workspaceId}` : "/app"
471
184
  }) {
472
185
  const back = `/invite/${token}`;
473
- return /* @__PURE__ */ jsx5("div", { className: "flex min-h-screen items-center justify-center p-6", children: /* @__PURE__ */ jsx5("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx5(
186
+ return /* @__PURE__ */ jsx2("div", { className: "flex min-h-screen items-center justify-center p-6", children: /* @__PURE__ */ jsx2("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx2(
474
187
  InviteAcceptPage,
475
188
  {
476
189
  details,
@@ -496,9 +209,7 @@ function InviteTokenPage({
496
209
  ) }) });
497
210
  }
498
211
  export {
499
- InvitationsPanel,
500
212
  InviteAcceptPage,
501
- InviteTokenPage,
502
- MembersPanel
213
+ InviteTokenPage
503
214
  };
504
215
  //# sourceMappingURL=index.js.map