@tangle-network/agent-app 1.0.25 → 2.0.0
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/assistant/index.js +9 -9
- package/dist/catalog/index.js +1 -1
- package/dist/chat-react/index.js +6 -6
- package/dist/chat-routes/index.js +6 -6
- package/dist/{chunk-HWWER7G6.js → chunk-2ARZ4Y7D.js} +2 -2
- package/dist/{chunk-MM2GG3IX.js → chunk-4W6MDZQH.js} +3 -3
- package/dist/{chunk-SLXJZGXE.js → chunk-6CDNITEO.js} +3 -3
- package/dist/chunk-6CDNITEO.js.map +1 -0
- package/dist/{chunk-3VEXCVZB.js → chunk-6VRM2RVY.js} +3 -3
- package/dist/{chunk-GOPBMDCQ.js → chunk-7IVRHG3L.js} +5 -5
- package/dist/chunk-7IVRHG3L.js.map +1 -0
- package/dist/{chunk-XCUT52I3.js → chunk-GLZMHETS.js} +2 -2
- package/dist/chunk-GLZMHETS.js.map +1 -0
- package/dist/{chunk-MK7VUZU7.js → chunk-HFCPHY5D.js} +4 -4
- package/dist/{chunk-OZWHBH4T.js → chunk-HFWKZHTZ.js} +21 -5
- package/dist/chunk-HFWKZHTZ.js.map +1 -0
- package/dist/{chunk-VLMXVCDQ.js → chunk-KSLTD4FI.js} +8 -2
- package/dist/chunk-KSLTD4FI.js.map +1 -0
- package/dist/{chunk-K7HE6EM4.js → chunk-MS5S4IVF.js} +3 -3
- package/dist/{chunk-IQZSV5YG.js → chunk-PKBNDVGR.js} +15 -13
- package/dist/{chunk-IQZSV5YG.js.map → chunk-PKBNDVGR.js.map} +1 -1
- package/dist/{chunk-X7PYE5C5.js → chunk-RTJJYBVV.js} +2 -2
- package/dist/{chunk-RCSAAWOH.js → chunk-SUWAECFT.js} +2 -1
- package/dist/chunk-SUWAECFT.js.map +1 -0
- package/dist/{chunk-G37LZ2FN.js → chunk-UN3PDU3M.js} +2 -2
- package/dist/harness/index.js +1 -1
- package/dist/hosted-agent/react/index.js +1 -1
- package/dist/hosted-agent/react/index.js.map +1 -1
- package/dist/{mention-editor-HLEB37RK.js → mention-editor-XB4LGO3X.js} +3 -3
- package/dist/public-consultation/index.js +5 -5
- package/dist/runtime/index.js +5 -3
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/model-catalog.d.ts +5 -0
- package/dist/runtime/router-turn.js +2 -2
- package/dist/sandbox/index.js +2 -2
- package/dist/sandbox/prompt-profile.d.ts +1 -1
- package/dist/settings-react/index.js +148 -95
- package/dist/settings-react/index.js.map +1 -1
- package/dist/skills-placement/box.js +2 -2
- package/dist/skills-placement/index.js +2 -2
- package/dist/studio-react/index.js +2 -2
- package/dist/teams/index.d.ts +2 -2
- package/dist/teams-react/components/index.d.ts +0 -2
- package/dist/teams-react/components/invitation-detail.d.ts +1 -1
- package/dist/teams-react/components/member-access.d.ts +2 -2
- package/dist/teams-react/contracts.d.ts +3 -68
- package/dist/teams-react/index.d.ts +5 -6
- package/dist/teams-react/index.js +46 -335
- package/dist/teams-react/index.js.map +1 -1
- package/dist/web-react/agent-profile-editor.js +6 -6
- package/dist/web-react/agent-session-controls.d.ts +6 -4
- package/dist/web-react/effort-picker.d.ts +7 -6
- package/dist/web-react/index.js +9 -9
- package/dist/web-react/picker-presentation.d.ts +2 -2
- package/dist/workspace-react/index.js +4 -4
- package/package.json +3 -3
- package/dist/chunk-GOPBMDCQ.js.map +0 -1
- package/dist/chunk-OZWHBH4T.js.map +0 -1
- package/dist/chunk-RCSAAWOH.js.map +0 -1
- package/dist/chunk-SLXJZGXE.js.map +0 -1
- package/dist/chunk-VLMXVCDQ.js.map +0 -1
- package/dist/chunk-XCUT52I3.js.map +0 -1
- package/dist/chunk-YL5JDX7K.js +0 -70
- package/dist/chunk-YL5JDX7K.js.map +0 -1
- package/dist/stories/settings/team-panels-demo.d.ts +0 -21
- package/dist/teams-react/components/InvitationsPanel.d.ts +0 -13
- package/dist/teams-react/components/InviteForm.d.ts +0 -20
- package/dist/teams-react/components/MembersPanel.d.ts +0 -18
- /package/dist/{chunk-HWWER7G6.js.map → chunk-2ARZ4Y7D.js.map} +0 -0
- /package/dist/{chunk-MM2GG3IX.js.map → chunk-4W6MDZQH.js.map} +0 -0
- /package/dist/{chunk-3VEXCVZB.js.map → chunk-6VRM2RVY.js.map} +0 -0
- /package/dist/{chunk-MK7VUZU7.js.map → chunk-HFCPHY5D.js.map} +0 -0
- /package/dist/{chunk-K7HE6EM4.js.map → chunk-MS5S4IVF.js.map} +0 -0
- /package/dist/{chunk-X7PYE5C5.js.map → chunk-RTJJYBVV.js.map} +0 -0
- /package/dist/{chunk-G37LZ2FN.js.map → chunk-UN3PDU3M.js.map} +0 -0
- /package/dist/{mention-editor-HLEB37RK.js.map → mention-editor-XB4LGO3X.js.map} +0 -0
package/dist/sandbox/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
warmKey,
|
|
113
113
|
warmReceiptId,
|
|
114
114
|
warmWeekdayOf
|
|
115
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-HFWKZHTZ.js";
|
|
116
116
|
import {
|
|
117
117
|
createWarmCache
|
|
118
118
|
} from "../chunk-F4TUZYMX.js";
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
splitDeferredProfileFiles,
|
|
180
180
|
writeProfileFilesToBox
|
|
181
181
|
} from "../chunk-67CSI5PU.js";
|
|
182
|
-
import "../chunk-
|
|
182
|
+
import "../chunk-SUWAECFT.js";
|
|
183
183
|
import {
|
|
184
184
|
readSandboxBinaryBytes,
|
|
185
185
|
shellQuote,
|
|
@@ -42,7 +42,7 @@ export declare function resolveSandboxPromptBackend(shell: SandboxPromptConfig,
|
|
|
42
42
|
apiKey?: string;
|
|
43
43
|
apiKeyEnv?: string;
|
|
44
44
|
baseUrl?: string;
|
|
45
|
-
type:
|
|
45
|
+
type: import("@tangle-network/sandbox").BackendType;
|
|
46
46
|
profile: AgentProfile;
|
|
47
47
|
runtimeAttachments?: {
|
|
48
48
|
mcp: Record<string, AgentProfileMcpServer>;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
RoleSelect,
|
|
3
|
-
canManageMember,
|
|
4
|
-
invitationDetail,
|
|
5
|
-
isCurrentMember,
|
|
6
|
-
memberRoleLabel
|
|
7
|
-
} from "../chunk-YL5JDX7K.js";
|
|
8
1
|
import {
|
|
9
2
|
INVITATION_EMAIL_HINT,
|
|
10
3
|
INVITATION_EXPIRY_DAYS,
|
|
11
4
|
isInvitationEmail
|
|
12
5
|
} from "../chunk-Y5WTAHWY.js";
|
|
13
6
|
import {
|
|
7
|
+
ASSIGNABLE_WORKSPACE_ROLES,
|
|
14
8
|
hasWorkspaceRole
|
|
15
9
|
} from "../chunk-6XIAPIW6.js";
|
|
16
10
|
import {
|
|
@@ -20,7 +14,7 @@ import {
|
|
|
20
14
|
fieldPickerTriggerClass,
|
|
21
15
|
useBrowserLayoutEffect,
|
|
22
16
|
usePopover
|
|
23
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-6CDNITEO.js";
|
|
24
18
|
import {
|
|
25
19
|
bindSearchPickerNavigation
|
|
26
20
|
} from "../chunk-ZAMHLXNS.js";
|
|
@@ -33,7 +27,7 @@ import {
|
|
|
33
27
|
import {
|
|
34
28
|
useWorkspaceExport
|
|
35
29
|
} from "../chunk-EZFBGW23.js";
|
|
36
|
-
import "../chunk-
|
|
30
|
+
import "../chunk-KSLTD4FI.js";
|
|
37
31
|
|
|
38
32
|
// src/settings-react/settings-layout.tsx
|
|
39
33
|
import { Button, PageHeader, PageShell } from "@tangle-network/ui/primitives";
|
|
@@ -768,12 +762,71 @@ import {
|
|
|
768
762
|
} from "@tangle-network/ui/primitives";
|
|
769
763
|
import { ChevronDown } from "lucide-react";
|
|
770
764
|
import { Fragment as Fragment3, useEffect as useEffect5, useId as useId2, useState as useState5 } from "react";
|
|
771
|
-
|
|
765
|
+
|
|
766
|
+
// src/teams-react/components/RoleSelect.tsx
|
|
767
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@tangle-network/ui/primitives";
|
|
768
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
769
|
+
var ROLE_CAPABILITY = {
|
|
770
|
+
viewer: "Can view",
|
|
771
|
+
editor: "Can edit",
|
|
772
|
+
admin: "Can manage settings and people",
|
|
773
|
+
owner: "Owner"
|
|
774
|
+
};
|
|
775
|
+
var ROLE_DESCRIPTION = {
|
|
776
|
+
viewer: "Reads everything; can\u2019t chat or edit",
|
|
777
|
+
editor: "Also chats with the agent and edits",
|
|
778
|
+
admin: "Also invites people and sets roles"
|
|
779
|
+
};
|
|
780
|
+
function RoleSelect({ value, onChange, ariaLabel, id, disabled }) {
|
|
781
|
+
return /* @__PURE__ */ jsxs5(Select, { value, onValueChange: (role) => onChange(role), disabled, children: [
|
|
782
|
+
/* @__PURE__ */ jsx6(SelectTrigger, { id, "aria-label": ariaLabel, children: /* @__PURE__ */ jsx6(SelectValue, { children: ROLE_CAPABILITY[value] }) }),
|
|
783
|
+
/* @__PURE__ */ jsx6(SelectContent, { children: ASSIGNABLE_WORKSPACE_ROLES.map((role) => /* @__PURE__ */ jsxs5(SelectItem, { value: role, textValue: ROLE_CAPABILITY[role], children: [
|
|
784
|
+
/* @__PURE__ */ jsx6("span", { className: "block", children: ROLE_CAPABILITY[role] }),
|
|
785
|
+
/* @__PURE__ */ jsx6("span", { className: "block font-normal text-muted-foreground", "data-role-description": true, children: ROLE_DESCRIPTION[role] })
|
|
786
|
+
] }, role)) })
|
|
787
|
+
] });
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// src/teams-react/components/invitation-detail.ts
|
|
791
|
+
function shortDate(value) {
|
|
792
|
+
return new Date(value).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" });
|
|
793
|
+
}
|
|
794
|
+
function invitationDetail(invitation, delivery = "email") {
|
|
795
|
+
const role = ROLE_CAPABILITY[invitation.permissions];
|
|
796
|
+
switch (invitation.status) {
|
|
797
|
+
case "accepted":
|
|
798
|
+
return invitation.acceptedAt ? `${role} \xB7 joined ${shortDate(invitation.acceptedAt)}` : `${role} \xB7 joined`;
|
|
799
|
+
case "pending": {
|
|
800
|
+
const sent = delivery === "link" ? null : invitation.emailStatus === "sent" ? "email sent" : invitation.emailStatus === "not_sent" ? "email not sent yet" : null;
|
|
801
|
+
return [role, sent, `expires ${shortDate(invitation.expiresAt)}`].filter(Boolean).join(" \xB7 ");
|
|
802
|
+
}
|
|
803
|
+
case "expired":
|
|
804
|
+
return `${role} \xB7 expired ${shortDate(invitation.expiresAt)}`;
|
|
805
|
+
case "revoked":
|
|
806
|
+
return `${role} \xB7 revoked`;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// src/teams-react/components/member-access.ts
|
|
811
|
+
function canManageMember(member, currentRole, currentUserId) {
|
|
812
|
+
if (!hasWorkspaceRole(currentRole, "admin") || member.role === "owner" || member.inherited) return false;
|
|
813
|
+
return !isCurrentMember(member, currentUserId);
|
|
814
|
+
}
|
|
815
|
+
function isCurrentMember(member, currentUserId) {
|
|
816
|
+
return currentUserId != null && member.userId === currentUserId;
|
|
817
|
+
}
|
|
818
|
+
function memberRoleLabel(member) {
|
|
819
|
+
if (member.role === "owner") return member.inherited ? "Organization admin" : "Owner";
|
|
820
|
+
return ROLE_CAPABILITY[member.role];
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
// src/settings-react/members-section.tsx
|
|
824
|
+
import { Fragment as Fragment4, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
772
825
|
function breakable(address) {
|
|
773
826
|
const parts = address.split(/(?<=[@.\-_])/);
|
|
774
|
-
return parts.map((part, index) => /* @__PURE__ */
|
|
827
|
+
return parts.map((part, index) => /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
775
828
|
part,
|
|
776
|
-
index < parts.length - 1 && /* @__PURE__ */
|
|
829
|
+
index < parts.length - 1 && /* @__PURE__ */ jsx7("wbr", {})
|
|
777
830
|
] }, index));
|
|
778
831
|
}
|
|
779
832
|
function displayName(member) {
|
|
@@ -793,7 +846,7 @@ function useMemberRole(member, onChangeRole) {
|
|
|
793
846
|
return outcome.succeeded ? confirmWrite(role) : outcome;
|
|
794
847
|
}
|
|
795
848
|
});
|
|
796
|
-
return { field, select: /* @__PURE__ */
|
|
849
|
+
return { field, select: /* @__PURE__ */ jsx7(RoleSelect, { id: `role-${member.id}`, value: field.draft, ariaLabel: `Role for ${displayName(member)}`, onChange: field.setDraft }) };
|
|
797
850
|
}
|
|
798
851
|
function MemberItem({ member, editable, self, noun, onChangeRole, onRemove, extraMenu }) {
|
|
799
852
|
const [removing, setRemoving] = useState5(false);
|
|
@@ -802,19 +855,19 @@ function MemberItem({ member, editable, self, noun, onChangeRole, onRemove, extr
|
|
|
802
855
|
const pending = member.acceptedAt == null;
|
|
803
856
|
const email = member.name && member.email ? member.email : null;
|
|
804
857
|
const status = field.rowProps.status;
|
|
805
|
-
return /* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */
|
|
858
|
+
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
859
|
+
/* @__PURE__ */ jsx7(
|
|
807
860
|
SettingsListItem,
|
|
808
861
|
{
|
|
809
|
-
title: /* @__PURE__ */
|
|
810
|
-
/* @__PURE__ */
|
|
811
|
-
/* @__PURE__ */
|
|
812
|
-
/* @__PURE__ */
|
|
862
|
+
title: /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 items-center gap-3", children: [
|
|
863
|
+
/* @__PURE__ */ jsx7(Avatar, { size: "sm", children: /* @__PURE__ */ jsx7(AvatarFallback, { children: initials(member) }) }),
|
|
864
|
+
/* @__PURE__ */ jsxs6("span", { className: "min-w-0", children: [
|
|
865
|
+
/* @__PURE__ */ jsxs6("span", { className: "block", children: [
|
|
813
866
|
name,
|
|
814
|
-
self && /* @__PURE__ */
|
|
867
|
+
self && /* @__PURE__ */ jsx7("span", { className: "font-normal text-muted-foreground", children: " (you)" })
|
|
815
868
|
] }),
|
|
816
|
-
(email || pending || status) && /* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
869
|
+
(email || pending || status) && /* @__PURE__ */ jsxs6("span", { className: "flex flex-wrap items-center gap-x-2 font-normal text-muted-foreground", children: [
|
|
870
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
818
871
|
email && breakable(email),
|
|
819
872
|
email && pending && " \xB7 ",
|
|
820
873
|
pending && "Hasn\u2019t joined yet"
|
|
@@ -823,12 +876,12 @@ function MemberItem({ member, editable, self, noun, onChangeRole, onRemove, extr
|
|
|
823
876
|
] })
|
|
824
877
|
] })
|
|
825
878
|
] }),
|
|
826
|
-
status: editable ? select : /* @__PURE__ */
|
|
879
|
+
status: editable ? select : /* @__PURE__ */ jsx7("span", { className: "text-foreground", children: memberRoleLabel(member) }),
|
|
827
880
|
error: field.rowProps.error,
|
|
828
881
|
menu: editable ? [...extraMenu, { label: `Remove from ${noun}\u2026`, tone: "danger", onSelect: () => setRemoving(true) }] : void 0
|
|
829
882
|
}
|
|
830
883
|
),
|
|
831
|
-
editable && /* @__PURE__ */
|
|
884
|
+
editable && /* @__PURE__ */ jsx7(
|
|
832
885
|
ConfirmAction,
|
|
833
886
|
{
|
|
834
887
|
open: removing,
|
|
@@ -844,7 +897,7 @@ function MemberItem({ member, editable, self, noun, onChangeRole, onRemove, extr
|
|
|
844
897
|
}
|
|
845
898
|
function plansAction(href, Link) {
|
|
846
899
|
if (!href) return void 0;
|
|
847
|
-
return (failure) => failure.code === "plan_limit" ? /* @__PURE__ */
|
|
900
|
+
return (failure) => failure.code === "plan_limit" ? /* @__PURE__ */ jsx7(Link, { href, className: "font-medium text-[var(--accent-text)] underline-offset-4 hover:underline", children: "View plans" }) : null;
|
|
848
901
|
}
|
|
849
902
|
var INVITE_DIALOG = {
|
|
850
903
|
email: { consequence: `They get an email with a link to join. The link works for ${INVITATION_EXPIRY_DAYS} days.`, confirmLabel: "Send invite" },
|
|
@@ -863,7 +916,7 @@ function InviteDialog({ onInvite, delivery, onMinted, plansHref, LinkComponent,
|
|
|
863
916
|
}, [open]);
|
|
864
917
|
const valid = isInvitationEmail(email);
|
|
865
918
|
const showHint = checked && email.trim() !== "" && !valid;
|
|
866
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsxs6(
|
|
867
920
|
ConfirmAction,
|
|
868
921
|
{
|
|
869
922
|
open,
|
|
@@ -878,9 +931,9 @@ function InviteDialog({ onInvite, delivery, onMinted, plansHref, LinkComponent,
|
|
|
878
931
|
},
|
|
879
932
|
refusalAction: plansAction(plansHref, LinkComponent),
|
|
880
933
|
children: [
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ jsxs6("div", { className: "grid gap-2", children: [
|
|
935
|
+
/* @__PURE__ */ jsx7(Label2, { htmlFor: `${id}-email`, children: "Email" }),
|
|
936
|
+
/* @__PURE__ */ jsx7(
|
|
884
937
|
Input2,
|
|
885
938
|
{
|
|
886
939
|
id: `${id}-email`,
|
|
@@ -894,11 +947,11 @@ function InviteDialog({ onInvite, delivery, onMinted, plansHref, LinkComponent,
|
|
|
894
947
|
onBlur: () => setChecked(true)
|
|
895
948
|
}
|
|
896
949
|
),
|
|
897
|
-
showHint && /* @__PURE__ */
|
|
950
|
+
showHint && /* @__PURE__ */ jsx7("p", { id: `${id}-hint`, role: "alert", className: "text-sm text-[var(--surface-danger-text)]", children: INVITATION_EMAIL_HINT })
|
|
898
951
|
] }),
|
|
899
|
-
/* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
/* @__PURE__ */
|
|
952
|
+
/* @__PURE__ */ jsxs6("div", { className: "grid gap-2", children: [
|
|
953
|
+
/* @__PURE__ */ jsx7(Label2, { htmlFor: `${id}-role`, children: "Role" }),
|
|
954
|
+
/* @__PURE__ */ jsx7(RoleSelect, { id: `${id}-role`, value: role, ariaLabel: "Role", onChange: setRole })
|
|
902
955
|
] })
|
|
903
956
|
]
|
|
904
957
|
}
|
|
@@ -907,7 +960,7 @@ function InviteDialog({ onInvite, delivery, onMinted, plansHref, LinkComponent,
|
|
|
907
960
|
function MintedLinkRow({ email, inviteUrl }) {
|
|
908
961
|
const id = useId2();
|
|
909
962
|
const { note, error, copy } = useCopyLink();
|
|
910
|
-
return /* @__PURE__ */
|
|
963
|
+
return /* @__PURE__ */ jsx7(
|
|
911
964
|
SettingsRow,
|
|
912
965
|
{
|
|
913
966
|
label: `Invite link for ${email}`,
|
|
@@ -916,9 +969,9 @@ function MintedLinkRow({ email, inviteUrl }) {
|
|
|
916
969
|
status: note,
|
|
917
970
|
error: error ?? void 0,
|
|
918
971
|
layout: "stacked",
|
|
919
|
-
children: /* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
972
|
+
children: /* @__PURE__ */ jsxs6("div", { className: "flex min-w-0 gap-2", children: [
|
|
973
|
+
/* @__PURE__ */ jsx7(Input2, { id, readOnly: true, value: inviteUrl, className: "min-w-0 flex-1", onFocus: (event) => event.currentTarget.select() }),
|
|
974
|
+
/* @__PURE__ */ jsx7(Button4, { type: "button", variant: "outline", onClick: () => void copy(inviteUrl), children: "Copy link" })
|
|
922
975
|
] })
|
|
923
976
|
}
|
|
924
977
|
);
|
|
@@ -942,17 +995,17 @@ function MembersSection({
|
|
|
942
995
|
const [inviting, setInviting] = useState5(false);
|
|
943
996
|
const [minted, setMinted] = useState5(null);
|
|
944
997
|
const canManage = hasWorkspaceRole(currentRole, "admin");
|
|
945
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ jsxs6(
|
|
946
999
|
SettingsSection,
|
|
947
1000
|
{
|
|
948
1001
|
id,
|
|
949
1002
|
title,
|
|
950
1003
|
description,
|
|
951
|
-
actions: canManage && onInvite ? /* @__PURE__ */
|
|
1004
|
+
actions: canManage && onInvite ? /* @__PURE__ */ jsx7(Button4, { type: "button", onClick: () => setInviting(true), children: "Invite" }) : void 0,
|
|
952
1005
|
children: [
|
|
953
|
-
members.length === 0 ? /* @__PURE__ */
|
|
1006
|
+
members.length === 0 ? /* @__PURE__ */ jsx7(SettingsRow, { label: "No members yet", description: "Invite someone to work on this with you.", layout: "compact" }) : /* @__PURE__ */ jsx7(SettingsList, { "aria-label": title, columns: MEMBER_COLUMNS, children: members.map((member) => {
|
|
954
1007
|
const editable = canManageMember(member, currentRole, currentUserId);
|
|
955
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ jsx7(
|
|
956
1009
|
MemberItem,
|
|
957
1010
|
{
|
|
958
1011
|
member,
|
|
@@ -966,8 +1019,8 @@ function MembersSection({
|
|
|
966
1019
|
member.id
|
|
967
1020
|
);
|
|
968
1021
|
}) }),
|
|
969
|
-
minted && /* @__PURE__ */
|
|
970
|
-
onInvite && /* @__PURE__ */
|
|
1022
|
+
minted && /* @__PURE__ */ jsx7(MintedLinkRow, { ...minted }, minted.inviteUrl),
|
|
1023
|
+
onInvite && /* @__PURE__ */ jsx7(InviteDialog, { onInvite, delivery, onMinted: setMinted, plansHref, LinkComponent, open: inviting, onOpenChange: setInviting })
|
|
971
1024
|
]
|
|
972
1025
|
}
|
|
973
1026
|
);
|
|
@@ -988,7 +1041,7 @@ function useCopyLink(onCopy) {
|
|
|
988
1041
|
setError(null);
|
|
989
1042
|
setNote("Link copied");
|
|
990
1043
|
} catch {
|
|
991
|
-
setError(/* @__PURE__ */
|
|
1044
|
+
setError(/* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
992
1045
|
"Couldn\u2019t copy the link. Select it here instead: ",
|
|
993
1046
|
breakable(inviteUrl)
|
|
994
1047
|
] }));
|
|
@@ -1007,14 +1060,14 @@ function PendingInvitation({ invitation, canManage, delivery, onResend, onRevoke
|
|
|
1007
1060
|
} else setError(outcome.message);
|
|
1008
1061
|
} : null;
|
|
1009
1062
|
const undelivered = delivery === "email" && invitation.emailStatus === "failed" ? "The email wasn\u2019t delivered. Copy the link and send it yourself." : null;
|
|
1010
|
-
return /* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1063
|
+
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
1064
|
+
/* @__PURE__ */ jsx7(
|
|
1012
1065
|
SettingsListItem,
|
|
1013
1066
|
{
|
|
1014
1067
|
title: breakable(invitation.email),
|
|
1015
|
-
meta: /* @__PURE__ */
|
|
1068
|
+
meta: /* @__PURE__ */ jsxs6("span", { className: "inline-flex flex-wrap items-center gap-x-2", children: [
|
|
1016
1069
|
invitationDetail(invitation, delivery),
|
|
1017
|
-
note && /* @__PURE__ */
|
|
1070
|
+
note && /* @__PURE__ */ jsx7("span", { className: "text-[var(--surface-success-text)]", children: note })
|
|
1018
1071
|
] }),
|
|
1019
1072
|
error: error ?? undelivered ?? void 0,
|
|
1020
1073
|
action: canManage ? { label: "Copy link", onSelect: () => void copy(invitation.inviteUrl) } : void 0,
|
|
@@ -1024,7 +1077,7 @@ function PendingInvitation({ invitation, canManage, delivery, onResend, onRevoke
|
|
|
1024
1077
|
] : void 0
|
|
1025
1078
|
}
|
|
1026
1079
|
),
|
|
1027
|
-
canManage && /* @__PURE__ */
|
|
1080
|
+
canManage && /* @__PURE__ */ jsx7(
|
|
1028
1081
|
ConfirmAction,
|
|
1029
1082
|
{
|
|
1030
1083
|
open: revoking,
|
|
@@ -1052,14 +1105,14 @@ function InvitationsSection({
|
|
|
1052
1105
|
const canManage = hasWorkspaceRole(currentRole, "admin");
|
|
1053
1106
|
const pending = invitations.filter((invitation) => invitation.status === "pending");
|
|
1054
1107
|
const past = invitations.filter((invitation) => invitation.status !== "pending");
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
pending.length === 0 ? /* @__PURE__ */
|
|
1057
|
-
past.length > 0 && /* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1108
|
+
return /* @__PURE__ */ jsxs6(SettingsSection, { id, title, children: [
|
|
1109
|
+
pending.length === 0 ? /* @__PURE__ */ jsx7(SettingsRow, { label: "No pending invitations", layout: "compact" }) : /* @__PURE__ */ jsx7(SettingsList, { "aria-label": "Pending invitations", columns: INVITATION_COLUMNS, children: pending.map((invitation) => /* @__PURE__ */ jsx7(PendingInvitation, { invitation, canManage, delivery, onResend, onRevoke, onCopy }, invitation.id)) }),
|
|
1110
|
+
past.length > 0 && /* @__PURE__ */ jsxs6(Collapsible, { open: showPast, onOpenChange: setShowPast, children: [
|
|
1111
|
+
/* @__PURE__ */ jsx7("div", { className: "border-t border-[color:var(--border-subtle)] px-5 py-3 @max-[34rem]/settings-section:px-4", children: /* @__PURE__ */ jsx7(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(Button4, { type: "button", variant: "ghost", className: "-ml-4", children: [
|
|
1059
1112
|
showPast ? "Hide past invitations" : `Show ${past.length} past ${past.length === 1 ? "invitation" : "invitations"}`,
|
|
1060
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ jsx7(ChevronDown, { "aria-hidden": "true", className: showPast ? "rotate-180" : void 0 })
|
|
1061
1114
|
] }) }) }),
|
|
1062
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ jsx7(CollapsibleContent, { children: /* @__PURE__ */ jsx7(SettingsList, { "aria-label": "Past invitations", columns: {}, children: past.map((invitation) => /* @__PURE__ */ jsx7(SettingsListItem, { title: breakable(invitation.email), meta: invitationDetail(invitation) }, invitation.id)) }) })
|
|
1063
1116
|
] })
|
|
1064
1117
|
] });
|
|
1065
1118
|
}
|
|
@@ -1076,7 +1129,7 @@ import {
|
|
|
1076
1129
|
} from "@tangle-network/ui/primitives";
|
|
1077
1130
|
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1078
1131
|
import { useState as useState6 } from "react";
|
|
1079
|
-
import { Fragment as Fragment5, jsx as
|
|
1132
|
+
import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1080
1133
|
var BYTE_UNITS = ["B", "KB", "MB", "GB", "TB"];
|
|
1081
1134
|
function formatBytes(bytes) {
|
|
1082
1135
|
let value = bytes;
|
|
@@ -1107,34 +1160,34 @@ function LatestExport({ latest, continuesInBackground }) {
|
|
|
1107
1160
|
const [open, setOpen] = useState6(false);
|
|
1108
1161
|
const percent = latest.unitsTotal ? Math.round(latest.unitsDone / latest.unitsTotal * 100) : 0;
|
|
1109
1162
|
const label = latest.status === "running" ? "Preparing your export" : latest.status === "complete" ? "Your export is ready" : "The export failed";
|
|
1110
|
-
return /* @__PURE__ */
|
|
1163
|
+
return /* @__PURE__ */ jsx8(
|
|
1111
1164
|
SettingsRow2,
|
|
1112
1165
|
{
|
|
1113
1166
|
label,
|
|
1114
1167
|
layout: "stacked",
|
|
1115
1168
|
description: latest.status === "failed" ? void 0 : progressLine(latest),
|
|
1116
1169
|
error: latest.status === "failed" ? `${latest.error ?? "A source could not be read."} Start a new export to try again.` : void 0,
|
|
1117
|
-
children: /* @__PURE__ */
|
|
1118
|
-
latest.status === "running" && /* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
continuesInBackground && /* @__PURE__ */
|
|
1170
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "grid w-full min-w-0 gap-3 text-sm", children: [
|
|
1171
|
+
latest.status === "running" && /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
1172
|
+
/* @__PURE__ */ jsx8(Progress, { value: percent, "aria-label": "Export progress" }),
|
|
1173
|
+
continuesInBackground && /* @__PURE__ */ jsx8("p", { className: "text-muted-foreground", children: "You can close this page. The export keeps going, and the download is here when you return." })
|
|
1121
1174
|
] }),
|
|
1122
|
-
latest.downloadUrl && /* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1175
|
+
latest.downloadUrl && /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2", children: [
|
|
1176
|
+
/* @__PURE__ */ jsx8(Button5, { asChild: true, variant: "outline", children: /* @__PURE__ */ jsx8("a", { href: latest.downloadUrl, download: true, children: "Download zip" }) }),
|
|
1177
|
+
/* @__PURE__ */ jsxs7("span", { className: "text-muted-foreground", children: [
|
|
1125
1178
|
"Link expires ",
|
|
1126
1179
|
latest.downloadExpiresAt ? new Date(latest.downloadExpiresAt).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : "soon",
|
|
1127
1180
|
"; reload for a new one."
|
|
1128
1181
|
] })
|
|
1129
1182
|
] }),
|
|
1130
|
-
/* @__PURE__ */
|
|
1131
|
-
/* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ jsxs7(Collapsible2, { open, onOpenChange: setOpen, children: [
|
|
1184
|
+
/* @__PURE__ */ jsx8(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs7(Button5, { type: "button", variant: "ghost", className: "-ml-4", children: [
|
|
1132
1185
|
open ? "Hide sources" : `Show ${latest.units.length} sources`,
|
|
1133
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ jsx8(ChevronDown2, { "aria-hidden": "true", className: open ? "rotate-180" : void 0 })
|
|
1134
1187
|
] }) }),
|
|
1135
|
-
/* @__PURE__ */
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ jsx8(CollapsibleContent2, { children: /* @__PURE__ */ jsx8("ul", { className: "mt-1 divide-y divide-[color:var(--border-subtle)] rounded-lg border border-border", children: latest.units.map((unit) => /* @__PURE__ */ jsxs7("li", { className: "flex flex-wrap items-center justify-between gap-x-3 gap-y-1 px-3 py-2", children: [
|
|
1189
|
+
/* @__PURE__ */ jsx8("span", { className: "min-w-0 [overflow-wrap:anywhere]", children: unit.name }),
|
|
1190
|
+
/* @__PURE__ */ jsx8("span", { className: unit.status === "failed" ? "text-[var(--surface-danger-text)]" : "text-muted-foreground", children: unitState(unit) })
|
|
1138
1191
|
] }, unit.name)) }) })
|
|
1139
1192
|
] })
|
|
1140
1193
|
] })
|
|
@@ -1155,8 +1208,8 @@ function ExportSection({
|
|
|
1155
1208
|
const { latest, error, loading, starting, running, start, retry } = useWorkspaceExport({ endpoint, enabled: canExport, fetcher });
|
|
1156
1209
|
const showExport = canExport || disabledReason != null;
|
|
1157
1210
|
if (!showExport && children == null) return null;
|
|
1158
|
-
return /* @__PURE__ */
|
|
1159
|
-
showExport && /* @__PURE__ */
|
|
1211
|
+
return /* @__PURE__ */ jsxs7(SettingsSection2, { id, title, children: [
|
|
1212
|
+
showExport && /* @__PURE__ */ jsx8(
|
|
1160
1213
|
SettingsRow2,
|
|
1161
1214
|
{
|
|
1162
1215
|
label: "Export everything",
|
|
@@ -1165,17 +1218,17 @@ function ExportSection({
|
|
|
1165
1218
|
disabledReason: canExport ? void 0 : disabledReason,
|
|
1166
1219
|
error: canExport ? error ?? void 0 : void 0,
|
|
1167
1220
|
onRetry: canExport && error ? retry : void 0,
|
|
1168
|
-
children: /* @__PURE__ */
|
|
1221
|
+
children: /* @__PURE__ */ jsx8(Button5, { type: "button", variant: "outline", disabled: !canExport || loading || starting || running, loading: starting, onClick: () => void start(), children: running ? "Exporting\u2026" : "Export" })
|
|
1169
1222
|
}
|
|
1170
1223
|
),
|
|
1171
|
-
canExport && latest && /* @__PURE__ */
|
|
1224
|
+
canExport && latest && /* @__PURE__ */ jsx8(LatestExport, { latest, continuesInBackground }),
|
|
1172
1225
|
children
|
|
1173
1226
|
] });
|
|
1174
1227
|
}
|
|
1175
1228
|
|
|
1176
1229
|
// src/settings-react/delete-workspace-section.tsx
|
|
1177
1230
|
import { Button as Button6, SettingsRow as SettingsRow3, SettingsSection as SettingsSection3 } from "@tangle-network/ui/primitives";
|
|
1178
|
-
import { jsx as
|
|
1231
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1179
1232
|
function listCounts(counts) {
|
|
1180
1233
|
const shown = counts.filter((entry) => entry.count > 0).map((entry) => `${entry.count.toLocaleString()} ${entry.label}`);
|
|
1181
1234
|
if (shown.length === 0) return null;
|
|
@@ -1193,18 +1246,18 @@ function DeleteWorkspaceSection({
|
|
|
1193
1246
|
}) {
|
|
1194
1247
|
const title = `Delete ${noun}`;
|
|
1195
1248
|
const removed = listCounts(counts);
|
|
1196
|
-
const trigger = /* @__PURE__ */
|
|
1249
|
+
const trigger = /* @__PURE__ */ jsxs8(Button6, { type: "button", variant: "destructive-outline", disabled: disabledReason != null, children: [
|
|
1197
1250
|
title,
|
|
1198
1251
|
"\u2026"
|
|
1199
1252
|
] });
|
|
1200
|
-
return /* @__PURE__ */
|
|
1253
|
+
return /* @__PURE__ */ jsx9(SettingsSection3, { id, title, tone: "danger", children: /* @__PURE__ */ jsx9(
|
|
1201
1254
|
SettingsRow3,
|
|
1202
1255
|
{
|
|
1203
1256
|
label: `Delete this ${noun} for everyone`,
|
|
1204
1257
|
description: "This can\u2019t be undone.",
|
|
1205
1258
|
disabledReason,
|
|
1206
1259
|
layout: "compact",
|
|
1207
|
-
children: disabledReason != null ? trigger : /* @__PURE__ */
|
|
1260
|
+
children: disabledReason != null ? trigger : /* @__PURE__ */ jsx9(
|
|
1208
1261
|
ConfirmAction,
|
|
1209
1262
|
{
|
|
1210
1263
|
trigger,
|
|
@@ -1226,7 +1279,7 @@ function DeleteWorkspaceSection({
|
|
|
1226
1279
|
import { Button as Button7, Input as Input3 } from "@tangle-network/ui/primitives";
|
|
1227
1280
|
import { Check as Check2, ChevronDown as ChevronDown3 } from "lucide-react";
|
|
1228
1281
|
import { useCallback as useCallback4, useEffect as useEffect6, useId as useId3, useMemo as useMemo2, useRef as useRef4, useState as useState7 } from "react";
|
|
1229
|
-
import { jsx as
|
|
1282
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1230
1283
|
var REGIONS = [
|
|
1231
1284
|
["America", "Americas"],
|
|
1232
1285
|
["Europe", "Europe"],
|
|
@@ -1361,8 +1414,8 @@ function TimezonePicker({ id, value, onChange, disabled = false, "aria-described
|
|
|
1361
1414
|
triggerRef.current?.focus();
|
|
1362
1415
|
if (zone !== value) onChange(zone);
|
|
1363
1416
|
};
|
|
1364
|
-
return /* @__PURE__ */
|
|
1365
|
-
/* @__PURE__ */
|
|
1417
|
+
return /* @__PURE__ */ jsxs9("div", { ref: containerRef, className: "relative flex w-full min-w-0", children: [
|
|
1418
|
+
/* @__PURE__ */ jsxs9(
|
|
1366
1419
|
Button7,
|
|
1367
1420
|
{
|
|
1368
1421
|
type: "button",
|
|
@@ -1384,15 +1437,15 @@ function TimezonePicker({ id, value, onChange, disabled = false, "aria-described
|
|
|
1384
1437
|
},
|
|
1385
1438
|
className: fieldPickerTriggerClass({ interactive: !disabled }),
|
|
1386
1439
|
children: [
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
selected && /* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ jsxs9("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
1441
|
+
/* @__PURE__ */ jsx10("span", { className: "min-w-0 truncate", children: selected?.city ?? (value || "Choose a timezone") }),
|
|
1442
|
+
selected && /* @__PURE__ */ jsx10("span", { className: "shrink-0 text-muted-foreground tabular-nums", children: selected.offsetLabel })
|
|
1390
1443
|
] }),
|
|
1391
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ jsx10(ChevronDown3, { "aria-hidden": "true", className: "size-4 shrink-0 text-muted-foreground" })
|
|
1392
1445
|
]
|
|
1393
1446
|
}
|
|
1394
1447
|
),
|
|
1395
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ jsxs9(
|
|
1396
1449
|
PopoverSurface,
|
|
1397
1450
|
{
|
|
1398
1451
|
open: expanded,
|
|
@@ -1406,7 +1459,7 @@ function TimezonePicker({ id, value, onChange, disabled = false, "aria-described
|
|
|
1406
1459
|
contentKey: q,
|
|
1407
1460
|
className: `flex w-[22rem] max-w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-xl border border-card-edge bg-popover text-foreground ${OVERLAY_SHADOW}`,
|
|
1408
1461
|
children: [
|
|
1409
|
-
/* @__PURE__ */
|
|
1462
|
+
/* @__PURE__ */ jsx10("div", { className: "shrink-0 border-b border-border p-2", children: /* @__PURE__ */ jsx10(
|
|
1410
1463
|
Input3,
|
|
1411
1464
|
{
|
|
1412
1465
|
ref: inputRef,
|
|
@@ -1419,17 +1472,17 @@ function TimezonePicker({ id, value, onChange, disabled = false, "aria-described
|
|
|
1419
1472
|
spellCheck: false
|
|
1420
1473
|
}
|
|
1421
1474
|
) }),
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
groups.length === 0 && /* @__PURE__ */
|
|
1475
|
+
/* @__PURE__ */ jsxs9("div", { className: "min-h-0 overflow-y-auto p-1 pb-2", "data-zone-list": true, children: [
|
|
1476
|
+
groups.length === 0 && /* @__PURE__ */ jsxs9("p", { role: "status", className: "px-3 py-4 text-center text-sm text-muted-foreground", children: [
|
|
1424
1477
|
"No timezone matches \u201C",
|
|
1425
1478
|
query.trim(),
|
|
1426
1479
|
"\u201D"
|
|
1427
1480
|
] }),
|
|
1428
|
-
groups.map((group) => /* @__PURE__ */
|
|
1429
|
-
/* @__PURE__ */
|
|
1481
|
+
groups.map((group) => /* @__PURE__ */ jsxs9("div", { role: "group", "aria-label": group.region, children: [
|
|
1482
|
+
/* @__PURE__ */ jsx10("p", { className: "px-3 pb-1 pt-3 text-sm font-semibold text-muted-foreground", children: group.region }),
|
|
1430
1483
|
group.zones.map((zone) => {
|
|
1431
1484
|
const current = zone.id === (CURRENT_NAME[value] ?? value);
|
|
1432
|
-
return /* @__PURE__ */
|
|
1485
|
+
return /* @__PURE__ */ jsxs9(
|
|
1433
1486
|
Button7,
|
|
1434
1487
|
{
|
|
1435
1488
|
type: "button",
|
|
@@ -1440,9 +1493,9 @@ function TimezonePicker({ id, value, onChange, disabled = false, "aria-described
|
|
|
1440
1493
|
onClick: () => pick(zone.id),
|
|
1441
1494
|
className: `flex w-full items-center gap-3 rounded-md px-3 py-2 text-left text-sm ${POPOVER_OPTION_FOCUS}`,
|
|
1442
1495
|
children: [
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */
|
|
1496
|
+
/* @__PURE__ */ jsx10("span", { className: "min-w-0 flex-1 truncate", children: zone.city }),
|
|
1497
|
+
/* @__PURE__ */ jsx10("span", { className: "shrink-0 text-muted-foreground tabular-nums", children: zone.offsetLabel }),
|
|
1498
|
+
/* @__PURE__ */ jsx10(Check2, { "aria-hidden": "true", className: `size-4 shrink-0 text-[var(--accent-text)] ${current ? "" : "invisible"}` })
|
|
1446
1499
|
]
|
|
1447
1500
|
},
|
|
1448
1501
|
zone.id
|