@tangle-network/agent-app 0.60.115 → 0.60.117

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 (91) hide show
  1. package/dist/VaultPane-OWOPGPXP.js +7 -0
  2. package/dist/assistant/index.js +11 -11
  3. package/dist/chat-react/index.js +4 -4
  4. package/dist/chat-routes/index.js +13 -6
  5. package/dist/chat-routes/index.js.map +1 -1
  6. package/dist/chat-routes/wire.d.ts +3 -1
  7. package/dist/chat-store/index.js +2 -2
  8. package/dist/{chunk-Y4WLCFDZ.js → chunk-2FLSODOX.js} +6 -6
  9. package/dist/{chunk-6XE77PTT.js → chunk-2NHJNINW.js} +1 -1
  10. package/dist/chunk-2NHJNINW.js.map +1 -0
  11. package/dist/{chunk-56GPDCOJ.js → chunk-7DXRHQZO.js} +7 -7
  12. package/dist/chunk-BTEVD7HG.js +198 -0
  13. package/dist/chunk-BTEVD7HG.js.map +1 -0
  14. package/dist/{chunk-RQSYR4AV.js → chunk-CLB4IQEG.js} +5 -5
  15. package/dist/{chunk-F2FH354I.js → chunk-D52LB6UQ.js} +2 -2
  16. package/dist/chunk-FVI2MHUL.js +1152 -0
  17. package/dist/chunk-FVI2MHUL.js.map +1 -0
  18. package/dist/{chunk-4G7HH6WQ.js → chunk-GU7OZFU7.js} +2 -2
  19. package/dist/{chunk-OGDEUCNW.js → chunk-JGLK5RDK.js} +176 -1
  20. package/dist/chunk-JGLK5RDK.js.map +1 -0
  21. package/dist/{chunk-FJQUMIM6.js → chunk-JZUSVGRJ.js} +3 -3
  22. package/dist/{chunk-AB63T2LM.js → chunk-KBJZMR4E.js} +8 -1
  23. package/dist/chunk-KBJZMR4E.js.map +1 -0
  24. package/dist/{chunk-JCSHTJT6.js → chunk-MGON3FE6.js} +22 -3
  25. package/dist/chunk-MGON3FE6.js.map +1 -0
  26. package/dist/{chunk-RQSNTJTW.js → chunk-MO7PDQRZ.js} +526 -187
  27. package/dist/chunk-MO7PDQRZ.js.map +1 -0
  28. package/dist/{chunk-MEUNTJL5.js → chunk-N3CYCSKK.js} +6 -1
  29. package/dist/chunk-N3CYCSKK.js.map +1 -0
  30. package/dist/journeys/cli.d.ts +2 -0
  31. package/dist/journeys/cli.js +165 -0
  32. package/dist/journeys/cli.js.map +1 -0
  33. package/dist/journeys/config.d.ts +96 -0
  34. package/dist/journeys/index.d.ts +18 -0
  35. package/dist/journeys/index.js +731 -0
  36. package/dist/journeys/index.js.map +1 -0
  37. package/dist/journeys/journey.d.ts +173 -0
  38. package/dist/journeys/page-reading.d.ts +42 -0
  39. package/dist/journeys/report.d.ts +51 -0
  40. package/dist/journeys/score.d.ts +115 -0
  41. package/dist/journeys/scrub.d.ts +21 -0
  42. package/dist/journeys/send.d.ts +46 -0
  43. package/dist/journeys/session.d.ts +27 -0
  44. package/dist/journeys/trace-zip.d.ts +28 -0
  45. package/dist/journeys/video.d.ts +53 -0
  46. package/dist/public-consultation/index.d.ts +2 -2
  47. package/dist/public-consultation/index.js +3 -3
  48. package/dist/runtime/index.js +1 -1
  49. package/dist/runtime/router-turn.d.ts +23 -2
  50. package/dist/runtime/router-turn.js +1 -1
  51. package/dist/sandbox/index.d.ts +2 -0
  52. package/dist/sandbox/index.js +13 -1
  53. package/dist/sandbox/sandbox-exec-tool.d.ts +68 -0
  54. package/dist/sandbox/sandbox-run-tool.d.ts +70 -0
  55. package/dist/studio-react/index.js +2 -2
  56. package/dist/teams/index.js +10 -6
  57. package/dist/teams/invitations-api.js +6 -3
  58. package/dist/teams/invitations-api.js.map +1 -1
  59. package/dist/teams/invitations.d.ts +4 -0
  60. package/dist/teams/members-api.js +2 -1
  61. package/dist/teams-react/components/InviteForm.d.ts +20 -0
  62. package/dist/teams-react/contracts.d.ts +2 -0
  63. package/dist/teams-react/index.js +196 -217
  64. package/dist/teams-react/index.js.map +1 -1
  65. package/dist/vault/VaultContentResults.d.ts +29 -0
  66. package/dist/vault/VaultHistoryPanel.d.ts +20 -0
  67. package/dist/vault/VaultPane.d.ts +3 -1
  68. package/dist/vault/contracts.d.ts +38 -0
  69. package/dist/vault/index.js +1 -1
  70. package/dist/vault/lazy.js +1 -1
  71. package/dist/web-react/index.js +25 -25
  72. package/dist/workspace-export/index.js +4 -193
  73. package/dist/workspace-export/index.js.map +1 -1
  74. package/dist/workspace-react/index.js +9 -7
  75. package/dist/workspace-react/index.js.map +1 -1
  76. package/dist/workspace-react/workspace-list.d.ts +7 -1
  77. package/package.json +8 -2
  78. package/dist/VaultPane-JUSNGOV7.js +0 -7
  79. package/dist/chunk-6XE77PTT.js.map +0 -1
  80. package/dist/chunk-AB63T2LM.js.map +0 -1
  81. package/dist/chunk-JCSHTJT6.js.map +0 -1
  82. package/dist/chunk-MEUNTJL5.js.map +0 -1
  83. package/dist/chunk-OGDEUCNW.js.map +0 -1
  84. package/dist/chunk-RQSNTJTW.js.map +0 -1
  85. /package/dist/{VaultPane-JUSNGOV7.js.map → VaultPane-OWOPGPXP.js.map} +0 -0
  86. /package/dist/{chunk-Y4WLCFDZ.js.map → chunk-2FLSODOX.js.map} +0 -0
  87. /package/dist/{chunk-56GPDCOJ.js.map → chunk-7DXRHQZO.js.map} +0 -0
  88. /package/dist/{chunk-RQSYR4AV.js.map → chunk-CLB4IQEG.js.map} +0 -0
  89. /package/dist/{chunk-F2FH354I.js.map → chunk-D52LB6UQ.js.map} +0 -0
  90. /package/dist/{chunk-4G7HH6WQ.js.map → chunk-GU7OZFU7.js.map} +0 -0
  91. /package/dist/{chunk-FJQUMIM6.js.map → chunk-JZUSVGRJ.js.map} +0 -0
@@ -1,18 +1,22 @@
1
+ import {
2
+ INVITATION_EMAIL_HINT,
3
+ isInvitationEmail
4
+ } from "../chunk-KBJZMR4E.js";
1
5
  import {
2
6
  hasWorkspaceRole
3
7
  } from "../chunk-6XIAPIW6.js";
4
8
 
5
- // src/teams-react/components/MembersPanel.tsx
9
+ // src/teams-react/components/InviteForm.tsx
6
10
  import { Button, Input } from "@tangle-network/ui/primitives";
7
- import { useState as useState2 } from "react";
11
+ import { useId, useState as useState2 } from "react";
8
12
 
9
13
  // src/teams-react/components/RoleSelect.tsx
10
14
  import { useEffect, useRef, useState } from "react";
11
15
  import { jsx, jsxs } from "react/jsx-runtime";
12
16
  var ASSIGNABLE_ROLES = [
13
- { value: "viewer", label: "Viewer" },
14
- { value: "editor", label: "Editor" },
15
- { value: "admin", label: "Admin" }
17
+ { value: "viewer", label: "Viewer", description: "Can read everything" },
18
+ { value: "editor", label: "Editor", description: "Can also chat and edit" },
19
+ { value: "admin", label: "Admin", description: "Can also manage settings and people" }
16
20
  ];
17
21
  function ChevronDownGlyph({ className }) {
18
22
  return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) });
@@ -46,7 +50,7 @@ function RoleSelect({ value, onChange, ariaLabel, disabled }) {
46
50
  "aria-expanded": open,
47
51
  "aria-label": ariaLabel,
48
52
  onClick: () => setOpen((v) => !v),
49
- className: "flex items-center justify-between gap-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-1.5 text-xs text-[var(--text-secondary)] hover:border-[var(--brand-primary)] disabled:cursor-default disabled:opacity-40",
53
+ className: "flex items-center justify-between gap-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-1.5 text-sm text-[var(--text-secondary)] hover:border-[var(--brand-primary)] disabled:cursor-default disabled:opacity-40",
50
54
  children: [
51
55
  /* @__PURE__ */ jsx("span", { children: current?.label ?? value }),
52
56
  /* @__PURE__ */ jsx(ChevronDownGlyph, { className: "h-3 w-3 text-[var(--text-muted)]" })
@@ -58,8 +62,8 @@ function RoleSelect({ value, onChange, ariaLabel, disabled }) {
58
62
  {
59
63
  role: "listbox",
60
64
  "aria-label": ariaLabel,
61
- className: "absolute right-0 top-full z-50 mt-1 flex w-32 flex-col rounded border border-[var(--card-edge)] bg-[hsl(var(--popover))] py-1 shadow-[var(--shadow-overlay)]",
62
- children: ASSIGNABLE_ROLES.map((option) => /* @__PURE__ */ jsx(
65
+ className: "absolute right-0 top-full z-50 mt-1 flex w-64 flex-col rounded border border-[var(--card-edge)] bg-[hsl(var(--popover))] py-1 shadow-[var(--shadow-overlay)]",
66
+ children: ASSIGNABLE_ROLES.map((option) => /* @__PURE__ */ jsxs(
63
67
  "button",
64
68
  {
65
69
  type: "button",
@@ -69,8 +73,11 @@ function RoleSelect({ value, onChange, ariaLabel, disabled }) {
69
73
  onChange(option.value);
70
74
  setOpen(false);
71
75
  },
72
- className: `px-3 py-1.5 text-left text-xs hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)] ${option.value === value ? "text-[var(--brand-primary)]" : "text-[var(--text-primary)]"}`,
73
- children: option.label
76
+ className: `flex flex-col px-3 py-2 text-left text-sm hover:bg-[color-mix(in_srgb,var(--brand-primary)_10%,transparent)] ${option.value === value ? "text-[var(--brand-primary)]" : "text-[var(--text-primary)]"}`,
77
+ children: [
78
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: option.label }),
79
+ /* @__PURE__ */ jsx("span", { className: "text-[var(--text-muted)]", children: option.description })
80
+ ]
74
81
  },
75
82
  option.value
76
83
  ))
@@ -79,8 +86,68 @@ function RoleSelect({ value, onChange, ariaLabel, disabled }) {
79
86
  ] });
80
87
  }
81
88
 
89
+ // src/teams-react/components/InviteForm.tsx
90
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
91
+ function InviteForm({ label, placeholder, onInvite }) {
92
+ const id = useId();
93
+ const [email, setEmail] = useState2("");
94
+ const [role, setRole] = useState2("editor");
95
+ const [inviting, setInviting] = useState2(false);
96
+ const [checked, setChecked] = useState2(false);
97
+ const valid = isInvitationEmail(email);
98
+ const showHint = checked && email.trim() !== "" && !valid;
99
+ async function submit() {
100
+ if (inviting) return;
101
+ if (!valid) {
102
+ setChecked(true);
103
+ return;
104
+ }
105
+ setInviting(true);
106
+ try {
107
+ if (await onInvite({ email: email.trim(), role })) {
108
+ setEmail("");
109
+ setChecked(false);
110
+ }
111
+ } finally {
112
+ setInviting(false);
113
+ }
114
+ }
115
+ return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1.5", children: [
116
+ /* @__PURE__ */ jsx2("label", { htmlFor: `${id}-email`, className: "text-sm font-medium text-[var(--text-secondary)]", children: label }),
117
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap gap-2", children: [
118
+ /* @__PURE__ */ jsx2(
119
+ Input,
120
+ {
121
+ id: `${id}-email`,
122
+ type: "email",
123
+ inputMode: "email",
124
+ autoComplete: "off",
125
+ placeholder,
126
+ value: email,
127
+ variant: showHint ? "error" : void 0,
128
+ "aria-describedby": showHint ? `${id}-hint` : void 0,
129
+ onChange: (event) => setEmail(event.target.value),
130
+ onBlur: () => setChecked(true),
131
+ onKeyDown: (event) => {
132
+ if (event.key === "Enter") {
133
+ event.preventDefault();
134
+ void submit();
135
+ }
136
+ },
137
+ className: "min-w-[12rem] flex-1"
138
+ }
139
+ ),
140
+ /* @__PURE__ */ jsxs2("div", { className: "ml-auto flex shrink-0 gap-2", children: [
141
+ /* @__PURE__ */ jsx2(RoleSelect, { value: role, ariaLabel: "Invite role", onChange: setRole }),
142
+ /* @__PURE__ */ jsx2(Button, { type: "button", onClick: () => void submit(), disabled: inviting || !valid, children: inviting ? "Inviting\u2026" : "Invite" })
143
+ ] })
144
+ ] }),
145
+ showHint && /* @__PURE__ */ jsx2("p", { id: `${id}-hint`, role: "alert", className: "text-sm text-[var(--surface-danger-text)]", children: INVITATION_EMAIL_HINT })
146
+ ] });
147
+ }
148
+
82
149
  // src/teams-react/components/MembersPanel.tsx
83
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
150
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
84
151
  function MembersPanel({
85
152
  members,
86
153
  currentRole,
@@ -90,29 +157,18 @@ function MembersPanel({
90
157
  onNotice,
91
158
  showInviteForm = true
92
159
  }) {
93
- const [inviteEmail, setInviteEmail] = useState2("");
94
- const [inviteRole, setInviteRole] = useState2("editor");
95
- const [inviting, setInviting] = useState2(false);
96
160
  const canManage = hasWorkspaceRole(currentRole, "admin");
97
161
  function notify(kind, message) {
98
162
  onNotice?.({ kind, message });
99
163
  }
100
- async function submitInvite() {
101
- const email = inviteEmail.trim();
102
- if (!email || inviting) return;
103
- setInviting(true);
164
+ async function invite(input) {
104
165
  try {
105
- const result = await onInvite({ email, role: inviteRole });
106
- if (result && "inviteUrl" in result && result.inviteUrl) {
107
- notify("success", `Invite link ready for ${email}`);
108
- } else {
109
- notify("success", `Invited ${email}`);
110
- }
111
- setInviteEmail("");
166
+ const result = await onInvite(input);
167
+ notify("success", result && "inviteUrl" in result && result.inviteUrl ? `Invite link ready for ${input.email}` : `Invited ${input.email}`);
168
+ return true;
112
169
  } catch (err) {
113
170
  notify("error", err instanceof Error ? err.message : "Failed to invite");
114
- } finally {
115
- setInviting(false);
171
+ return false;
116
172
  }
117
173
  }
118
174
  async function changeRole(memberId, role) {
@@ -131,16 +187,16 @@ function MembersPanel({
131
187
  notify("error", err instanceof Error ? err.message : "Failed to remove member");
132
188
  }
133
189
  }
134
- return /* @__PURE__ */ jsxs2("section", { className: "flex flex-col gap-4", children: [
135
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between", children: [
136
- /* @__PURE__ */ jsx2("h4", { className: "text-xs font-semibold text-[var(--text-primary)]", children: "Members" }),
137
- /* @__PURE__ */ jsxs2("span", { className: "text-xs text-[var(--text-muted)]", children: [
190
+ return /* @__PURE__ */ jsxs3("section", { className: "flex flex-col gap-4", children: [
191
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
192
+ /* @__PURE__ */ jsx3("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Members" }),
193
+ /* @__PURE__ */ jsxs3("span", { className: "text-sm text-[var(--text-muted)]", children: [
138
194
  members.length,
139
195
  " total"
140
196
  ] })
141
197
  ] }),
142
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2", children: [
143
- members.map((member) => /* @__PURE__ */ jsx2(
198
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2", children: [
199
+ members.map((member) => /* @__PURE__ */ jsx3(
144
200
  MemberRow,
145
201
  {
146
202
  member,
@@ -150,44 +206,9 @@ function MembersPanel({
150
206
  },
151
207
  member.id
152
208
  )),
153
- members.length === 0 && /* @__PURE__ */ jsx2("p", { className: "text-sm text-[var(--text-muted)]", children: "No team members yet." })
209
+ members.length === 0 && /* @__PURE__ */ jsx3("p", { className: "text-sm text-[var(--text-muted)]", children: "No team members yet." })
154
210
  ] }),
155
- canManage && showInviteForm && /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1.5 border-t border-[var(--border-default)] pt-3", children: [
156
- /* @__PURE__ */ jsx2("label", { className: "text-xs font-medium text-[var(--text-muted)]", children: "Invite member" }),
157
- /* @__PURE__ */ jsxs2("div", { className: "flex gap-2", children: [
158
- /* @__PURE__ */ jsx2(
159
- Input,
160
- {
161
- type: "email",
162
- placeholder: "Email address",
163
- value: inviteEmail,
164
- "aria-label": "Invite email address",
165
- onChange: (event) => setInviteEmail(event.target.value),
166
- onKeyDown: (event) => {
167
- if (event.key === "Enter") void submitInvite();
168
- },
169
- className: "min-w-0 flex-1"
170
- }
171
- ),
172
- /* @__PURE__ */ jsx2(
173
- RoleSelect,
174
- {
175
- value: inviteRole,
176
- ariaLabel: "Invite role",
177
- onChange: setInviteRole
178
- }
179
- ),
180
- /* @__PURE__ */ jsx2(
181
- Button,
182
- {
183
- type: "button",
184
- onClick: () => void submitInvite(),
185
- disabled: inviting || !inviteEmail.trim(),
186
- children: inviting ? "Inviting\u2026" : "Invite"
187
- }
188
- )
189
- ] })
190
- ] })
211
+ canManage && showInviteForm && /* @__PURE__ */ jsx3("div", { className: "border-t border-[var(--border-default)] pt-3", children: /* @__PURE__ */ jsx3(InviteForm, { label: "Invite member", placeholder: "Email address", onInvite: invite }) })
191
212
  ] });
192
213
  }
193
214
  function MemberRow({ member, canManage, onChangeRole, onRemove }) {
@@ -196,19 +217,19 @@ function MemberRow({ member, canManage, onChangeRole, onRemove }) {
196
217
  const initial = (member.name?.[0] ?? member.email?.[0] ?? "?").toUpperCase();
197
218
  const isOwner = member.role === "owner";
198
219
  const editable = canManage && !isOwner && !member.inherited;
199
- return /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between border-b border-[var(--border-default)] py-2 last:border-0", children: [
200
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
201
- /* @__PURE__ */ jsx2("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-[var(--bg-input)] text-xs font-semibold text-[var(--text-secondary)]", children: initial }),
202
- /* @__PURE__ */ jsxs2("div", { children: [
203
- /* @__PURE__ */ jsxs2("p", { className: "flex items-center gap-2 text-sm font-medium text-[var(--text-primary)]", children: [
204
- label,
205
- pending && /* @__PURE__ */ jsx2("span", { className: "rounded border border-[var(--border-default)] px-1.5 py-0.5 text-xs font-semibold uppercase tracking-[0.05em] text-[var(--text-muted)]", children: "Pending" })
220
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b border-[var(--border-default)] py-2 last:border-0", children: [
221
+ /* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
222
+ /* @__PURE__ */ jsx3("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 }),
223
+ /* @__PURE__ */ jsxs3("div", { className: "min-w-0", children: [
224
+ /* @__PURE__ */ jsxs3("p", { className: "flex flex-wrap items-center gap-x-2 text-sm font-medium text-[var(--text-primary)]", children: [
225
+ /* @__PURE__ */ jsx3("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: label }),
226
+ pending && /* @__PURE__ */ jsx3("span", { className: "rounded border border-[var(--border-default)] px-1.5 py-0.5 text-sm font-medium text-[var(--text-muted)]", children: "Pending" })
206
227
  ] }),
207
- member.name && member.email && /* @__PURE__ */ jsx2("p", { className: "text-xs text-[var(--text-muted)]", children: member.email })
228
+ member.name && member.email && /* @__PURE__ */ jsx3("p", { className: "text-sm text-[var(--text-muted)] [overflow-wrap:anywhere]", children: member.email })
208
229
  ] })
209
230
  ] }),
210
- /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-2", children: isOwner ? /* @__PURE__ */ jsx2("span", { className: "rounded border border-[var(--border-default)] px-2 py-0.5 text-xs text-[var(--text-secondary)]", children: member.inherited ? "Org Admin" : "Owner" }) : editable ? /* @__PURE__ */ jsxs2(Fragment, { children: [
211
- /* @__PURE__ */ jsx2(
231
+ /* @__PURE__ */ jsx3("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: isOwner ? /* @__PURE__ */ jsx3("span", { className: "rounded border border-[var(--border-default)] px-2 py-0.5 text-sm text-[var(--text-secondary)]", children: member.inherited ? "Org Admin" : "Owner" }) : editable ? /* @__PURE__ */ jsxs3(Fragment, { children: [
232
+ /* @__PURE__ */ jsx3(
212
233
  RoleSelect,
213
234
  {
214
235
  value: member.role,
@@ -216,39 +237,51 @@ function MemberRow({ member, canManage, onChangeRole, onRemove }) {
216
237
  onChange: (role) => onChangeRole(member.id, role)
217
238
  }
218
239
  ),
219
- /* @__PURE__ */ jsx2(
240
+ /* @__PURE__ */ jsx3(
220
241
  "button",
221
242
  {
222
243
  type: "button",
223
244
  "aria-label": `Remove ${label}`,
224
245
  onClick: () => onRemove(member.id),
225
- className: "rounded px-2 py-1 text-xs text-[var(--text-danger)] hover:bg-[var(--border-default)]",
246
+ className: "rounded px-2 py-1 text-sm text-[var(--text-danger)] hover:bg-[var(--border-default)]",
226
247
  children: "Remove"
227
248
  }
228
249
  )
229
- ] }) : /* @__PURE__ */ jsx2("span", { className: "rounded border border-[var(--border-default)] px-2 py-0.5 text-xs capitalize text-[var(--text-secondary)]", children: member.role }) })
250
+ ] }) : /* @__PURE__ */ jsx3("span", { className: "rounded border border-[var(--border-default)] px-2 py-0.5 text-sm capitalize text-[var(--text-secondary)]", children: member.role }) })
230
251
  ] });
231
252
  }
232
253
 
233
254
  // src/teams-react/components/InvitationsPanel.tsx
234
- import { Button as Button2, Input as Input2 } from "@tangle-network/ui/primitives";
235
255
  import { useState as useState3 } from "react";
236
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
237
- var BADGE_BASE = "inline-flex items-center rounded border px-2 py-0.5 text-xs font-semibold uppercase tracking-[0.05em]";
238
- var STATUS_BADGE = {
239
- accepted: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]",
240
- pending: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]",
241
- revoked: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]",
242
- expired: "border-[var(--border-default)] text-[var(--text-muted)]"
243
- };
244
- var EMAIL_BADGE = {
245
- sent: "border-[var(--border-default)] text-[var(--text-muted)]",
246
- not_sent: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]",
247
- failed: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]"
256
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
257
+ var BADGE_BASE = "inline-flex items-center rounded border px-2 py-0.5 text-sm font-medium";
258
+ var STATUS = {
259
+ accepted: { label: "Joined", tone: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" },
260
+ pending: { label: "Pending", tone: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]" },
261
+ revoked: { label: "Revoked", tone: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]" },
262
+ expired: { label: "Expired", tone: "border-[var(--border-default)] text-[var(--text-muted)]" }
248
263
  };
249
264
  function capitalize(text) {
250
265
  return text.length === 0 ? text : text[0].toUpperCase() + text.slice(1);
251
266
  }
267
+ function shortDate(value) {
268
+ return new Date(value).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
269
+ }
270
+ function invitationDetail(invitation) {
271
+ const role = capitalize(invitation.permissions);
272
+ switch (invitation.status) {
273
+ case "accepted":
274
+ return invitation.acceptedAt ? `${role} \xB7 joined ${shortDate(invitation.acceptedAt)}` : role;
275
+ case "pending": {
276
+ const delivery = invitation.emailStatus === "sent" ? "email sent" : invitation.emailStatus === "not_sent" ? "email not sent yet" : null;
277
+ return [role, delivery, `expires ${shortDate(invitation.expiresAt)}`].filter(Boolean).join(" \xB7 ");
278
+ }
279
+ case "expired":
280
+ return `${role} \xB7 expired ${shortDate(invitation.expiresAt)}`;
281
+ case "revoked":
282
+ return role;
283
+ }
284
+ }
252
285
  function InvitationsPanel({
253
286
  invitations,
254
287
  currentRole,
@@ -258,26 +291,19 @@ function InvitationsPanel({
258
291
  onCopy,
259
292
  onNotice
260
293
  }) {
261
- const [inviteEmail, setInviteEmail] = useState3("");
262
- const [inviteRole, setInviteRole] = useState3("editor");
263
- const [inviting, setInviting] = useState3(false);
264
294
  const [busyId, setBusyId] = useState3(null);
265
295
  const canManage = hasWorkspaceRole(currentRole, "admin");
266
296
  function notify(kind, message) {
267
297
  onNotice?.({ kind, message });
268
298
  }
269
- async function submitInvite() {
270
- const email = inviteEmail.trim();
271
- if (!email || inviting) return;
272
- setInviting(true);
299
+ async function invite(input) {
273
300
  try {
274
- await onInvite({ email, role: inviteRole });
275
- notify("success", `Invitation sent to ${email}`);
276
- setInviteEmail("");
301
+ await onInvite(input);
302
+ notify("success", `Invitation sent to ${input.email}`);
303
+ return true;
277
304
  } catch (err) {
278
305
  notify("error", err instanceof Error ? err.message : "Failed to invite");
279
- } finally {
280
- setInviting(false);
306
+ return false;
281
307
  }
282
308
  }
283
309
  async function copyLink(inviteUrl) {
@@ -311,52 +337,17 @@ function InvitationsPanel({
311
337
  setBusyId(null);
312
338
  }
313
339
  }
314
- return /* @__PURE__ */ jsxs3("section", { className: "flex flex-col gap-4", children: [
315
- canManage && /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-1.5", children: [
316
- /* @__PURE__ */ jsx3("label", { className: "text-xs font-medium text-[var(--text-muted)]", children: "Invite by email" }),
317
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-2", children: [
318
- /* @__PURE__ */ jsx3(
319
- Input2,
320
- {
321
- type: "email",
322
- placeholder: "colleague@example.com",
323
- value: inviteEmail,
324
- "aria-label": "Invite email address",
325
- onChange: (event) => setInviteEmail(event.target.value),
326
- onKeyDown: (event) => {
327
- if (event.key === "Enter") void submitInvite();
328
- },
329
- className: "min-w-0 flex-1"
330
- }
331
- ),
332
- /* @__PURE__ */ jsx3(
333
- RoleSelect,
334
- {
335
- value: inviteRole,
336
- ariaLabel: "Invite role",
337
- onChange: setInviteRole
338
- }
339
- ),
340
- /* @__PURE__ */ jsx3(
341
- Button2,
342
- {
343
- type: "button",
344
- onClick: () => void submitInvite(),
345
- disabled: inviting || !inviteEmail.trim(),
346
- children: inviting ? "Inviting\u2026" : "Invite"
347
- }
348
- )
349
- ] })
350
- ] }),
351
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-2 border-t border-[var(--border-default)] pt-3", children: [
352
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", children: [
353
- /* @__PURE__ */ jsx3("h4", { className: "text-xs font-semibold text-[var(--text-primary)]", children: "Invitation history" }),
354
- /* @__PURE__ */ jsxs3("span", { className: "text-xs text-[var(--text-muted)]", children: [
340
+ return /* @__PURE__ */ jsxs4("section", { className: "flex flex-col gap-4", children: [
341
+ canManage && /* @__PURE__ */ jsx4(InviteForm, { label: "Invite by email", placeholder: "colleague@example.com", onInvite: invite }),
342
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2 border-t border-[var(--border-default)] pt-3", children: [
343
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between", children: [
344
+ /* @__PURE__ */ jsx4("h4", { className: "text-sm font-semibold text-[var(--text-primary)]", children: "Invitation history" }),
345
+ /* @__PURE__ */ jsxs4("span", { className: "text-sm text-[var(--text-muted)]", children: [
355
346
  invitations.length,
356
347
  " total"
357
348
  ] })
358
349
  ] }),
359
- invitations.length === 0 ? /* @__PURE__ */ jsx3("p", { className: "text-sm text-[var(--text-muted)]", children: "No invitations yet." }) : invitations.map((invitation) => /* @__PURE__ */ jsx3(
350
+ invitations.length === 0 ? /* @__PURE__ */ jsx4("p", { className: "text-sm text-[var(--text-muted)]", children: "No invitations yet." }) : invitations.map((invitation) => /* @__PURE__ */ jsx4(
360
351
  InvitationRow,
361
352
  {
362
353
  invitation,
@@ -373,56 +364,44 @@ function InvitationsPanel({
373
364
  }
374
365
  function InvitationRow({ invitation, canManage, busy, onCopy, onResend, onRevoke }) {
375
366
  const isPending = invitation.status === "pending";
376
- const emailFailed = invitation.emailStatus === "failed";
377
- const expiry = new Date(invitation.expiresAt).toLocaleDateString("en-US", {
378
- month: "short",
379
- day: "numeric",
380
- year: "numeric"
381
- });
382
- return /* @__PURE__ */ jsxs3("div", { className: "rounded-lg border border-[var(--border-default)] bg-[var(--bg-input)] p-3", children: [
383
- /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between gap-3", children: [
384
- /* @__PURE__ */ jsxs3("div", { className: "min-w-0", children: [
385
- /* @__PURE__ */ jsx3("p", { className: "truncate text-sm font-medium text-[var(--text-primary)]", children: invitation.email }),
386
- /* @__PURE__ */ jsxs3("p", { className: "text-xs text-[var(--text-muted)]", children: [
387
- capitalize(invitation.permissions),
388
- " \xB7 expires ",
389
- expiry
390
- ] }),
391
- emailFailed && /* @__PURE__ */ jsx3("p", { className: "mt-1 text-xs text-[var(--surface-danger-text)]", children: "Email was not sent \u2014 copy the link to share it." })
367
+ const status = STATUS[invitation.status];
368
+ return /* @__PURE__ */ jsxs4("div", { className: "rounded-lg border border-[var(--border-default)] bg-[var(--bg-input)] p-3", children: [
369
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-start justify-between gap-3", children: [
370
+ /* @__PURE__ */ jsxs4("div", { className: "min-w-0", children: [
371
+ /* @__PURE__ */ jsx4("p", { className: "truncate text-sm font-medium text-[var(--text-primary)]", title: invitation.email, children: invitation.email }),
372
+ /* @__PURE__ */ jsx4("p", { className: "text-sm text-[var(--text-muted)]", children: invitationDetail(invitation) }),
373
+ isPending && invitation.emailStatus === "failed" && /* @__PURE__ */ jsx4("p", { className: "mt-1 text-sm text-[var(--surface-danger-text)]", children: "The email was not delivered. Copy the link and send it yourself." })
392
374
  ] }),
393
- /* @__PURE__ */ jsxs3("div", { className: "flex shrink-0 items-center gap-2", children: [
394
- /* @__PURE__ */ jsx3("span", { className: `${BADGE_BASE} ${STATUS_BADGE[invitation.status]}`, children: invitation.status }),
395
- /* @__PURE__ */ jsx3("span", { className: `${BADGE_BASE} ${EMAIL_BADGE[invitation.emailStatus]}`, children: invitation.emailStatus.replace("_", " ") })
396
- ] })
375
+ /* @__PURE__ */ jsx4("span", { className: `${BADGE_BASE} ${status.tone} shrink-0`, children: status.label })
397
376
  ] }),
398
- canManage && isPending && /* @__PURE__ */ jsxs3("div", { className: "mt-3 flex items-center justify-end gap-2", children: [
399
- /* @__PURE__ */ jsx3(
377
+ canManage && isPending && /* @__PURE__ */ jsxs4("div", { className: "mt-3 flex flex-wrap items-center justify-end gap-2", children: [
378
+ /* @__PURE__ */ jsx4(
400
379
  "button",
401
380
  {
402
381
  type: "button",
403
382
  onClick: onCopy,
404
383
  disabled: busy,
405
- className: "rounded border border-[var(--border-default)] px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50",
384
+ className: "rounded border border-[var(--border-default)] px-2.5 py-1 text-sm text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50",
406
385
  children: "Copy link"
407
386
  }
408
387
  ),
409
- /* @__PURE__ */ jsx3(
388
+ /* @__PURE__ */ jsx4(
410
389
  "button",
411
390
  {
412
391
  type: "button",
413
392
  onClick: onResend,
414
393
  disabled: busy,
415
- className: "rounded border border-[var(--border-default)] px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50",
394
+ className: "rounded border border-[var(--border-default)] px-2.5 py-1 text-sm text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50",
416
395
  children: busy ? "Working\u2026" : "Resend"
417
396
  }
418
397
  ),
419
- /* @__PURE__ */ jsx3(
398
+ /* @__PURE__ */ jsx4(
420
399
  "button",
421
400
  {
422
401
  type: "button",
423
402
  onClick: onRevoke,
424
403
  disabled: busy,
425
- className: "rounded px-2 py-1 text-xs text-[var(--text-danger)] hover:bg-[var(--border-default)] disabled:opacity-50",
404
+ className: "rounded px-2.5 py-1 text-sm text-[var(--text-danger)] hover:bg-[var(--border-default)] disabled:opacity-50",
426
405
  children: "Revoke"
427
406
  }
428
407
  )
@@ -435,9 +414,9 @@ import { useState as useState4 } from "react";
435
414
 
436
415
  // src/teams-react/components/BrandMark.tsx
437
416
  import { lazy, Suspense } from "react";
438
- import { jsx as jsx4 } from "react/jsx-runtime";
417
+ import { jsx as jsx5 } from "react/jsx-runtime";
439
418
  function MarkSpacer({ size }) {
440
- return /* @__PURE__ */ jsx4("span", { "aria-hidden": true, style: { display: "inline-block", width: size, height: size } });
419
+ return /* @__PURE__ */ jsx5("span", { "aria-hidden": true, style: { display: "inline-block", width: size, height: size } });
441
420
  }
442
421
  var LazyKnot = lazy(async () => {
443
422
  try {
@@ -448,11 +427,11 @@ var LazyKnot = lazy(async () => {
448
427
  }
449
428
  });
450
429
  function BrandMark({ size, className }) {
451
- return /* @__PURE__ */ jsx4(Suspense, { fallback: /* @__PURE__ */ jsx4(MarkSpacer, { size }), children: /* @__PURE__ */ jsx4(LazyKnot, { size, className }) });
430
+ return /* @__PURE__ */ jsx5(Suspense, { fallback: /* @__PURE__ */ jsx5(MarkSpacer, { size }), children: /* @__PURE__ */ jsx5(LazyKnot, { size, className }) });
452
431
  }
453
432
 
454
433
  // src/teams-react/components/InviteAcceptPage.tsx
455
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
434
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
456
435
  function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification }) {
457
436
  const [accepting, setAccepting] = useState4(false);
458
437
  const [acceptError, setAcceptError] = useState4(null);
@@ -460,45 +439,45 @@ function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification
460
439
  const [resendingVerification, setResendingVerification] = useState4(false);
461
440
  const [verificationSent, setVerificationSent] = useState4(false);
462
441
  if (details.status === "invalid") {
463
- return /* @__PURE__ */ jsx5(Shell, { title: "Invalid invitation", body: "This link is invalid or already used. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
442
+ return /* @__PURE__ */ jsx6(Shell, { title: "Invalid invitation", body: "This link is invalid or already used. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
464
443
  }
465
444
  if (details.status === "already-accepted") {
466
- return /* @__PURE__ */ jsx5(Shell, { title: "Already accepted", body: "This invitation has already been accepted.", children: /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open workspace" }) });
445
+ return /* @__PURE__ */ jsx6(Shell, { title: "Already accepted", body: "This invitation has already been accepted.", children: /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open workspace" }) });
467
446
  }
468
447
  if (details.status === "expired") {
469
- return /* @__PURE__ */ jsx5(Shell, { title: "Invitation expired", body: "This invitation has expired. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
448
+ return /* @__PURE__ */ jsx6(Shell, { title: "Invitation expired", body: "This invitation has expired. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
470
449
  }
471
450
  if (details.status === "revoked") {
472
- return /* @__PURE__ */ jsx5(Shell, { title: "Invitation revoked", body: "This invitation has been revoked. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
451
+ return /* @__PURE__ */ jsx6(Shell, { title: "Invitation revoked", body: "This invitation has been revoked. Ask the workspace admin to send a new one.", children: /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Go to sign in" }) });
473
452
  }
474
453
  const workspaceName = details.workspaceName ?? "a workspace";
475
454
  const inviterPrefix = details.inviterName ? `${details.inviterName} invited you` : "You've been invited";
476
455
  const roleSuffix = details.role ? ` as ${details.role}` : "";
477
456
  if (!details.currentUserEmail) {
478
- return /* @__PURE__ */ jsxs4(Shell, { title: "You've been invited", children: [
479
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
457
+ return /* @__PURE__ */ jsxs5(Shell, { title: "You've been invited", children: [
458
+ /* @__PURE__ */ jsxs5("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
480
459
  inviterPrefix,
481
460
  " to join ",
482
- /* @__PURE__ */ jsx5("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
461
+ /* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
483
462
  roleSuffix,
484
463
  "."
485
464
  ] }),
486
- details.inviteEmail && /* @__PURE__ */ jsxs4("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: [
465
+ details.inviteEmail && /* @__PURE__ */ jsxs5("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: [
487
466
  "Sign in or create an account with",
488
467
  " ",
489
- /* @__PURE__ */ jsx5("span", { className: "font-medium text-[var(--text-primary)]", children: details.inviteEmail }),
468
+ /* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: details.inviteEmail }),
490
469
  " to accept."
491
470
  ] }),
492
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-2", children: [
493
- /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Sign in" }),
494
- /* @__PURE__ */ jsx5(SecondaryButton, { onClick: () => onNavigate({ kind: "sign-up" }), children: "Create account" })
471
+ /* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
472
+ /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "sign-in" }), children: "Sign in" }),
473
+ /* @__PURE__ */ jsx6(SecondaryButton, { onClick: () => onNavigate({ kind: "sign-up" }), children: "Create account" })
495
474
  ] })
496
475
  ] });
497
476
  }
498
477
  if (accepted) {
499
- return /* @__PURE__ */ jsx5(Shell, { title: "Welcome!", children: /* @__PURE__ */ jsxs4("p", { className: "text-sm text-[var(--text-secondary)]", children: [
478
+ return /* @__PURE__ */ jsx6(Shell, { title: "Welcome!", children: /* @__PURE__ */ jsxs5("p", { className: "text-sm text-[var(--text-secondary)]", children: [
500
479
  "You've joined ",
501
- /* @__PURE__ */ jsx5("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
480
+ /* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
502
481
  "."
503
482
  ] }) });
504
483
  }
@@ -532,36 +511,36 @@ function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification
532
511
  setResendingVerification(false);
533
512
  }
534
513
  }
535
- return /* @__PURE__ */ jsxs4(Shell, { title: "Join workspace", children: [
536
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
514
+ return /* @__PURE__ */ jsxs5(Shell, { title: "Join workspace", children: [
515
+ /* @__PURE__ */ jsxs5("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
537
516
  inviterPrefix,
538
517
  " to join ",
539
- /* @__PURE__ */ jsx5("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
518
+ /* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
540
519
  roleSuffix,
541
520
  "."
542
521
  ] }),
543
- /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
522
+ /* @__PURE__ */ jsxs5("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
544
523
  "Signed in as ",
545
- /* @__PURE__ */ jsx5("span", { className: "font-medium text-[var(--text-primary)]", children: details.currentUserEmail })
524
+ /* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: details.currentUserEmail })
546
525
  ] }),
547
- expiryLabel && /* @__PURE__ */ jsxs4("p", { className: "mb-4 text-xs text-[var(--text-muted)]", children: [
526
+ expiryLabel && /* @__PURE__ */ jsxs5("p", { className: "mb-4 text-xs text-[var(--text-muted)]", children: [
548
527
  "This invitation expires on ",
549
528
  expiryLabel,
550
529
  "."
551
530
  ] }),
552
- emailMismatch && /* @__PURE__ */ jsxs4(
531
+ emailMismatch && /* @__PURE__ */ jsxs5(
553
532
  "div",
554
533
  {
555
534
  role: "alert",
556
535
  className: "mb-4 rounded-md border border-[var(--border-default)] px-4 py-2 text-sm text-[var(--text-warning)]",
557
536
  children: [
558
537
  "This invitation was sent to ",
559
- /* @__PURE__ */ jsx5("span", { className: "font-medium", children: details.inviteEmail }),
538
+ /* @__PURE__ */ jsx6("span", { className: "font-medium", children: details.inviteEmail }),
560
539
  ". Switch to that account to accept it."
561
540
  ]
562
541
  }
563
542
  ),
564
- needsVerification && /* @__PURE__ */ jsx5(
543
+ needsVerification && /* @__PURE__ */ jsx6(
565
544
  "div",
566
545
  {
567
546
  role: "alert",
@@ -569,33 +548,33 @@ function InviteAcceptPage({ details, onAccept, onNavigate, onResendVerification
569
548
  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."
570
549
  }
571
550
  ),
572
- acceptError && /* @__PURE__ */ jsx5("p", { role: "alert", className: "mb-4 text-sm text-[var(--text-danger)]", children: acceptError }),
573
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-2", children: [
574
- emailMismatch ? /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "switch-account" }), children: "Switch account" }) : needsVerification ? onResendVerification ? /* @__PURE__ */ jsx5(
551
+ acceptError && /* @__PURE__ */ jsx6("p", { role: "alert", className: "mb-4 text-sm text-[var(--text-danger)]", children: acceptError }),
552
+ /* @__PURE__ */ jsxs5("div", { className: "flex gap-2", children: [
553
+ emailMismatch ? /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "switch-account" }), children: "Switch account" }) : needsVerification ? onResendVerification ? /* @__PURE__ */ jsx6(
575
554
  PrimaryButton,
576
555
  {
577
556
  onClick: () => void handleResendVerification(),
578
557
  disabled: resendingVerification || verificationSent,
579
558
  children: verificationSent ? "Verification sent" : resendingVerification ? "Sending\u2026" : "Resend verification email"
580
559
  }
581
- ) : /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open app" }) : /* @__PURE__ */ jsx5(PrimaryButton, { onClick: () => void handleAccept(), disabled: accepting, children: accepting ? "Accepting\u2026" : "Accept invitation" }),
582
- /* @__PURE__ */ jsx5(SecondaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Not now" })
560
+ ) : /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Open app" }) : /* @__PURE__ */ jsx6(PrimaryButton, { onClick: () => void handleAccept(), disabled: accepting, children: accepting ? "Accepting\u2026" : "Accept invitation" }),
561
+ /* @__PURE__ */ jsx6(SecondaryButton, { onClick: () => onNavigate({ kind: "open-app" }), children: "Not now" })
583
562
  ] })
584
563
  ] });
585
564
  }
586
565
  function Shell({ title, body, children }) {
587
- return /* @__PURE__ */ jsxs4("div", { className: "mx-auto flex w-full max-w-sm flex-col", children: [
588
- /* @__PURE__ */ jsxs4("span", { className: "mb-4 flex items-center gap-2 text-[var(--text-muted)]", children: [
589
- /* @__PURE__ */ jsx5(BrandMark, { size: 22, className: "shrink-0" }),
590
- /* @__PURE__ */ jsx5("span", { className: "text-xs font-semibold uppercase tracking-[0.05em]", children: "Tangle Teams" })
566
+ return /* @__PURE__ */ jsxs5("div", { className: "mx-auto flex w-full max-w-sm flex-col", children: [
567
+ /* @__PURE__ */ jsxs5("span", { className: "mb-4 flex items-center gap-2 text-[var(--text-muted)]", children: [
568
+ /* @__PURE__ */ jsx6(BrandMark, { size: 22, className: "shrink-0" }),
569
+ /* @__PURE__ */ jsx6("span", { className: "text-xs font-semibold uppercase tracking-[0.05em]", children: "Tangle Teams" })
591
570
  ] }),
592
- /* @__PURE__ */ jsx5("h1", { className: "mb-1 text-xl font-semibold tracking-tight text-[var(--text-primary)]", children: title }),
593
- body && /* @__PURE__ */ jsx5("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: body }),
571
+ /* @__PURE__ */ jsx6("h1", { className: "mb-1 text-xl font-semibold tracking-tight text-[var(--text-primary)]", children: title }),
572
+ body && /* @__PURE__ */ jsx6("p", { className: "mb-6 text-sm text-[var(--text-secondary)]", children: body }),
594
573
  children
595
574
  ] });
596
575
  }
597
576
  function PrimaryButton({ children, onClick, disabled }) {
598
- return /* @__PURE__ */ jsx5(
577
+ return /* @__PURE__ */ jsx6(
599
578
  "button",
600
579
  {
601
580
  type: "button",
@@ -607,7 +586,7 @@ function PrimaryButton({ children, onClick, disabled }) {
607
586
  );
608
587
  }
609
588
  function SecondaryButton({ children, onClick }) {
610
- return /* @__PURE__ */ jsx5(
589
+ return /* @__PURE__ */ jsx6(
611
590
  "button",
612
591
  {
613
592
  type: "button",