@tangle-network/agent-app 0.60.114 → 0.60.116
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.
- package/dist/VaultPane-OWOPGPXP.js +7 -0
- package/dist/assistant/index.js +8 -8
- package/dist/chat-react/index.js +2 -2
- package/dist/chat-routes/index.js +2 -2
- package/dist/{chunk-Y4WLCFDZ.js → chunk-2FLSODOX.js} +6 -6
- package/dist/chunk-BTEVD7HG.js +198 -0
- package/dist/chunk-BTEVD7HG.js.map +1 -0
- package/dist/chunk-FVI2MHUL.js +1152 -0
- package/dist/chunk-FVI2MHUL.js.map +1 -0
- package/dist/{chunk-RQSYR4AV.js → chunk-GHUQ5HXU.js} +4 -4
- package/dist/{chunk-Q7M3GVLL.js → chunk-JCSHTJT6.js} +36 -2
- package/dist/chunk-JCSHTJT6.js.map +1 -0
- package/dist/{chunk-OGDEUCNW.js → chunk-JGLK5RDK.js} +176 -1
- package/dist/chunk-JGLK5RDK.js.map +1 -0
- package/dist/{chunk-AB63T2LM.js → chunk-KBJZMR4E.js} +8 -1
- package/dist/chunk-KBJZMR4E.js.map +1 -0
- package/dist/{chunk-RQSNTJTW.js → chunk-MO7PDQRZ.js} +526 -187
- package/dist/chunk-MO7PDQRZ.js.map +1 -0
- package/dist/{chunk-MEUNTJL5.js → chunk-N3CYCSKK.js} +6 -1
- package/dist/chunk-N3CYCSKK.js.map +1 -0
- package/dist/{chunk-56GPDCOJ.js → chunk-TSGWACTC.js} +5 -5
- package/dist/eval/index.d.ts +2 -0
- package/dist/eval/index.js +64 -0
- package/dist/eval/index.js.map +1 -1
- package/dist/eval/parity.d.ts +74 -0
- package/dist/journeys/cli.d.ts +2 -0
- package/dist/journeys/cli.js +165 -0
- package/dist/journeys/cli.js.map +1 -0
- package/dist/journeys/config.d.ts +96 -0
- package/dist/journeys/index.d.ts +18 -0
- package/dist/journeys/index.js +731 -0
- package/dist/journeys/index.js.map +1 -0
- package/dist/journeys/journey.d.ts +173 -0
- package/dist/journeys/page-reading.d.ts +42 -0
- package/dist/journeys/report.d.ts +51 -0
- package/dist/journeys/score.d.ts +115 -0
- package/dist/journeys/scrub.d.ts +21 -0
- package/dist/journeys/send.d.ts +46 -0
- package/dist/journeys/session.d.ts +27 -0
- package/dist/journeys/trace-zip.d.ts +28 -0
- package/dist/journeys/video.d.ts +53 -0
- package/dist/public-consultation/index.d.ts +1 -1
- package/dist/runtime/index.js +9 -3
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/router-turn.d.ts +8 -1
- package/dist/runtime/router-turn.js +9 -3
- package/dist/runtime/turn-knowledge.d.ts +50 -0
- package/dist/sandbox/index.d.ts +2 -0
- package/dist/sandbox/index.js +13 -1
- package/dist/sandbox/sandbox-exec-tool.d.ts +68 -0
- package/dist/sandbox/sandbox-run-tool.d.ts +70 -0
- package/dist/studio-react/index.js +2 -2
- package/dist/teams/index.js +10 -6
- package/dist/teams/invitations-api.js +6 -3
- package/dist/teams/invitations-api.js.map +1 -1
- package/dist/teams/invitations.d.ts +4 -0
- package/dist/teams/members-api.js +2 -1
- package/dist/teams-react/components/InviteForm.d.ts +20 -0
- package/dist/teams-react/contracts.d.ts +2 -0
- package/dist/teams-react/index.js +196 -217
- package/dist/teams-react/index.js.map +1 -1
- package/dist/vault/VaultContentResults.d.ts +29 -0
- package/dist/vault/VaultHistoryPanel.d.ts +20 -0
- package/dist/vault/VaultPane.d.ts +3 -1
- package/dist/vault/contracts.d.ts +38 -0
- package/dist/vault/index.js +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/index.js +22 -22
- package/dist/workspace-export/index.js +4 -193
- package/dist/workspace-export/index.js.map +1 -1
- package/dist/workspace-react/index.js +9 -7
- package/dist/workspace-react/index.js.map +1 -1
- package/dist/workspace-react/workspace-list.d.ts +7 -1
- package/package.json +8 -2
- package/dist/VaultPane-JUSNGOV7.js +0 -7
- package/dist/chunk-AB63T2LM.js.map +0 -1
- package/dist/chunk-MEUNTJL5.js.map +0 -1
- package/dist/chunk-OGDEUCNW.js.map +0 -1
- package/dist/chunk-Q7M3GVLL.js.map +0 -1
- package/dist/chunk-RQSNTJTW.js.map +0 -1
- /package/dist/{VaultPane-JUSNGOV7.js.map → VaultPane-OWOPGPXP.js.map} +0 -0
- /package/dist/{chunk-Y4WLCFDZ.js.map → chunk-2FLSODOX.js.map} +0 -0
- /package/dist/{chunk-RQSYR4AV.js.map → chunk-GHUQ5HXU.js.map} +0 -0
- /package/dist/{chunk-56GPDCOJ.js.map → chunk-TSGWACTC.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/
|
|
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-
|
|
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-
|
|
62
|
-
children: ASSIGNABLE_ROLES.map((option) => /* @__PURE__ */
|
|
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-
|
|
73
|
-
children:
|
|
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
|
|
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
|
|
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(
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
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__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
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__ */
|
|
143
|
-
members.map((member) => /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
label,
|
|
205
|
-
pending && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
211
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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-
|
|
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__ */
|
|
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
|
|
237
|
-
var BADGE_BASE = "inline-flex items-center rounded border px-2 py-0.5 text-
|
|
238
|
-
var
|
|
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
|
|
270
|
-
const email = inviteEmail.trim();
|
|
271
|
-
if (!email || inviting) return;
|
|
272
|
-
setInviting(true);
|
|
299
|
+
async function invite(input) {
|
|
273
300
|
try {
|
|
274
|
-
await onInvite(
|
|
275
|
-
notify("success", `Invitation sent to ${email}`);
|
|
276
|
-
|
|
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
|
-
|
|
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__ */
|
|
315
|
-
canManage && /* @__PURE__ */
|
|
316
|
-
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
|
|
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__ */
|
|
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
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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__ */
|
|
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__ */
|
|
399
|
-
/* @__PURE__ */
|
|
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-
|
|
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__ */
|
|
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-
|
|
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__ */
|
|
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-
|
|
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
|
|
417
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
439
418
|
function MarkSpacer({ size }) {
|
|
440
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
479
|
-
/* @__PURE__ */
|
|
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__ */
|
|
461
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
|
|
483
462
|
roleSuffix,
|
|
484
463
|
"."
|
|
485
464
|
] }),
|
|
486
|
-
details.inviteEmail && /* @__PURE__ */
|
|
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__ */
|
|
468
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: details.inviteEmail }),
|
|
490
469
|
" to accept."
|
|
491
470
|
] }),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
536
|
-
/* @__PURE__ */
|
|
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__ */
|
|
518
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: workspaceName }),
|
|
540
519
|
roleSuffix,
|
|
541
520
|
"."
|
|
542
521
|
] }),
|
|
543
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ jsxs5("p", { className: "mb-4 text-sm text-[var(--text-secondary)]", children: [
|
|
544
523
|
"Signed in as ",
|
|
545
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ jsx6("span", { className: "font-medium text-[var(--text-primary)]", children: details.currentUserEmail })
|
|
546
525
|
] }),
|
|
547
|
-
expiryLabel && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
emailMismatch ? /* @__PURE__ */
|
|
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__ */
|
|
582
|
-
/* @__PURE__ */
|
|
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__ */
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
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__ */
|
|
593
|
-
body && /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
589
|
+
return /* @__PURE__ */ jsx6(
|
|
611
590
|
"button",
|
|
612
591
|
{
|
|
613
592
|
type: "button",
|