@burdenoff/microfe-botmanor 2026.813.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/botlit/BotlitRoutes.js +357 -0
- package/dist/botlit/BotlitRoutes.js.map +1 -0
- package/dist/botlit/BotmanorRoot.js +12 -0
- package/dist/botlit/BotmanorRoot.js.map +1 -0
- package/dist/botlit/BotmanorRootInner.js +101 -0
- package/dist/botlit/BotmanorRootInner.js.map +1 -0
- package/dist/botlit/components/Badge.js +39 -0
- package/dist/botlit/components/Badge.js.map +1 -0
- package/dist/botlit/components/Button.js +46 -0
- package/dist/botlit/components/Button.js.map +1 -0
- package/dist/botlit/components/Card.js +31 -0
- package/dist/botlit/components/Card.js.map +1 -0
- package/dist/botlit/components/ChannelSelectorSheet.js +130 -0
- package/dist/botlit/components/ChannelSelectorSheet.js.map +1 -0
- package/dist/botlit/components/EmptyState.js +35 -0
- package/dist/botlit/components/EmptyState.js.map +1 -0
- package/dist/botlit/components/ErrorState.js +33 -0
- package/dist/botlit/components/ErrorState.js.map +1 -0
- package/dist/botlit/components/Input.js +59 -0
- package/dist/botlit/components/Input.js.map +1 -0
- package/dist/botlit/components/PageLayout.js +34 -0
- package/dist/botlit/components/PageLayout.js.map +1 -0
- package/dist/botlit/components/QuotaExhaustedDialog.js +20 -0
- package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -0
- package/dist/botlit/components/RouteLoader.js +52 -0
- package/dist/botlit/components/RouteLoader.js.map +1 -0
- package/dist/botlit/components/VersionHistoryPanel.js +144 -0
- package/dist/botlit/components/VersionHistoryPanel.js.map +1 -0
- package/dist/botlit/components/WorkspaceRequired.js +70 -0
- package/dist/botlit/components/WorkspaceRequired.js.map +1 -0
- package/dist/botlit/hooks/index.js +16 -0
- package/dist/botlit/hooks/internal/mutationInput.js +16 -0
- package/dist/botlit/hooks/internal/mutationInput.js.map +1 -0
- package/dist/botlit/hooks/internal/workspaceGateway.js +99 -0
- package/dist/botlit/hooks/internal/workspaceGateway.js.map +1 -0
- package/dist/botlit/hooks/useA2A.js +184 -0
- package/dist/botlit/hooks/useA2A.js.map +1 -0
- package/dist/botlit/hooks/useAgents.js +469 -0
- package/dist/botlit/hooks/useAgents.js.map +1 -0
- package/dist/botlit/hooks/useBots.js +306 -0
- package/dist/botlit/hooks/useBots.js.map +1 -0
- package/dist/botlit/hooks/useBuckets.js +119 -0
- package/dist/botlit/hooks/useBuckets.js.map +1 -0
- package/dist/botlit/hooks/useChannels.js +213 -0
- package/dist/botlit/hooks/useChannels.js.map +1 -0
- package/dist/botlit/hooks/useConversations.js +64 -0
- package/dist/botlit/hooks/useConversations.js.map +1 -0
- package/dist/botlit/hooks/useExecutions.js +86 -0
- package/dist/botlit/hooks/useExecutions.js.map +1 -0
- package/dist/botlit/hooks/useKnowledgeBases.js +113 -0
- package/dist/botlit/hooks/useKnowledgeBases.js.map +1 -0
- package/dist/botlit/hooks/useLLMProviders.js +83 -0
- package/dist/botlit/hooks/useLLMProviders.js.map +1 -0
- package/dist/botlit/hooks/useMCPServers.js +134 -0
- package/dist/botlit/hooks/useMCPServers.js.map +1 -0
- package/dist/botlit/hooks/usePolicies.js +120 -0
- package/dist/botlit/hooks/usePolicies.js.map +1 -0
- package/dist/botlit/hooks/usePromptTemplates.js +161 -0
- package/dist/botlit/hooks/usePromptTemplates.js.map +1 -0
- package/dist/botlit/hooks/useRetrievalProfiles.js +146 -0
- package/dist/botlit/hooks/useRetrievalProfiles.js.map +1 -0
- package/dist/botlit/hooks/useSkills.js +132 -0
- package/dist/botlit/hooks/useSkills.js.map +1 -0
- package/dist/botlit/hooks/useStore.js +167 -0
- package/dist/botlit/hooks/useStore.js.map +1 -0
- package/dist/botlit/hooks/useUserPlatformConnection.js +172 -0
- package/dist/botlit/hooks/useUserPlatformConnection.js.map +1 -0
- package/dist/botlit/index.js +11 -0
- package/dist/botlit/pages/A2AAgentDetailPage.js +589 -0
- package/dist/botlit/pages/A2AAgentDetailPage.js.map +1 -0
- package/dist/botlit/pages/A2ARegistryPage.js +240 -0
- package/dist/botlit/pages/A2ARegistryPage.js.map +1 -0
- package/dist/botlit/pages/AgentBuilderPage.js +486 -0
- package/dist/botlit/pages/AgentBuilderPage.js.map +1 -0
- package/dist/botlit/pages/AgentDetailPage.js +517 -0
- package/dist/botlit/pages/AgentDetailPage.js.map +1 -0
- package/dist/botlit/pages/AgentsListPage.js +294 -0
- package/dist/botlit/pages/AgentsListPage.js.map +1 -0
- package/dist/botlit/pages/BotChannelsTab.js +530 -0
- package/dist/botlit/pages/BotChannelsTab.js.map +1 -0
- package/dist/botlit/pages/BotDetailPage.js +872 -0
- package/dist/botlit/pages/BotDetailPage.js.map +1 -0
- package/dist/botlit/pages/BotWorkflowTab.js +229 -0
- package/dist/botlit/pages/BotWorkflowTab.js.map +1 -0
- package/dist/botlit/pages/BotsListPage.js +313 -0
- package/dist/botlit/pages/BotsListPage.js.map +1 -0
- package/dist/botlit/pages/BucketsPage.js +604 -0
- package/dist/botlit/pages/BucketsPage.js.map +1 -0
- package/dist/botlit/pages/ChannelDetailPage.js +955 -0
- package/dist/botlit/pages/ChannelDetailPage.js.map +1 -0
- package/dist/botlit/pages/ChannelRoutesPage.js +218 -0
- package/dist/botlit/pages/ChannelRoutesPage.js.map +1 -0
- package/dist/botlit/pages/ChannelsPage.js +304 -0
- package/dist/botlit/pages/ChannelsPage.js.map +1 -0
- package/dist/botlit/pages/ChatPage.js +247 -0
- package/dist/botlit/pages/ChatPage.js.map +1 -0
- package/dist/botlit/pages/DashboardPage.js +318 -0
- package/dist/botlit/pages/DashboardPage.js.map +1 -0
- package/dist/botlit/pages/ExecutionDetailPage.js +313 -0
- package/dist/botlit/pages/ExecutionDetailPage.js.map +1 -0
- package/dist/botlit/pages/ExecutionsPage.js +294 -0
- package/dist/botlit/pages/ExecutionsPage.js.map +1 -0
- package/dist/botlit/pages/InstalledPackagesPage.js +619 -0
- package/dist/botlit/pages/InstalledPackagesPage.js.map +1 -0
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js +473 -0
- package/dist/botlit/pages/KnowledgeBaseDetailPage.js.map +1 -0
- package/dist/botlit/pages/KnowledgeBasesPage.js +150 -0
- package/dist/botlit/pages/KnowledgeBasesPage.js.map +1 -0
- package/dist/botlit/pages/MCPServerDetailPage.js +550 -0
- package/dist/botlit/pages/MCPServerDetailPage.js.map +1 -0
- package/dist/botlit/pages/MCPServersPage.js +321 -0
- package/dist/botlit/pages/MCPServersPage.js.map +1 -0
- package/dist/botlit/pages/PoliciesPage.js +224 -0
- package/dist/botlit/pages/PoliciesPage.js.map +1 -0
- package/dist/botlit/pages/PolicyDetailPage.js +861 -0
- package/dist/botlit/pages/PolicyDetailPage.js.map +1 -0
- package/dist/botlit/pages/PromptStudioPage.js +236 -0
- package/dist/botlit/pages/PromptStudioPage.js.map +1 -0
- package/dist/botlit/pages/PromptTemplateDetailPage.js +812 -0
- package/dist/botlit/pages/PromptTemplateDetailPage.js.map +1 -0
- package/dist/botlit/pages/PromptTemplatesPage.js +269 -0
- package/dist/botlit/pages/PromptTemplatesPage.js.map +1 -0
- package/dist/botlit/pages/RetrievalProfileDetailPage.js +559 -0
- package/dist/botlit/pages/RetrievalProfileDetailPage.js.map +1 -0
- package/dist/botlit/pages/RetrievalProfilesPage.js +219 -0
- package/dist/botlit/pages/RetrievalProfilesPage.js.map +1 -0
- package/dist/botlit/pages/SettingsPage.js +655 -0
- package/dist/botlit/pages/SettingsPage.js.map +1 -0
- package/dist/botlit/pages/SkillDetailPage.js +778 -0
- package/dist/botlit/pages/SkillDetailPage.js.map +1 -0
- package/dist/botlit/pages/SkillsPage.js +206 -0
- package/dist/botlit/pages/SkillsPage.js.map +1 -0
- package/dist/botlit/pages/StorePackageDetailPage.js +462 -0
- package/dist/botlit/pages/StorePackageDetailPage.js.map +1 -0
- package/dist/botlit/pages/StorePage.js +315 -0
- package/dist/botlit/pages/StorePage.js.map +1 -0
- package/dist/botlit/providers/BotlitProvider.js +93 -0
- package/dist/botlit/providers/BotlitProvider.js.map +1 -0
- package/dist/botlit/store/botlitStore.js +101 -0
- package/dist/botlit/store/botlitStore.js.map +1 -0
- package/dist/botlit/utils/cn.js +10 -0
- package/dist/botlit/utils/cn.js.map +1 -0
- package/dist/botlit/utils/formatters.js +37 -0
- package/dist/botlit/utils/formatters.js.map +1 -0
- package/dist/botlit/utils/navigation.js +9 -0
- package/dist/botlit/utils/navigation.js.map +1 -0
- package/dist/botlit/utils/unions.js +14 -0
- package/dist/botlit/utils/unions.js.map +1 -0
- package/dist/generated/global-operations.js +66 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.js +8 -0
- package/dist/generated/global-types.js.map +1 -0
- package/dist/generated/wspace-operations.js +1591 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.js +12 -0
- package/dist/generated/wspace-types.js.map +1 -0
- package/dist/index.js +13 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/package.json +133 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
import { useBotlit as e } from "../providers/BotlitProvider.js";
|
|
2
|
+
import { formatRelativeTime as t } from "../utils/formatters.js";
|
|
3
|
+
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
+
import { Card as r, CardContent as i, CardDescription as a, CardHeader as o, CardTitle as s } from "../components/Card.js";
|
|
5
|
+
import { Button as c } from "../components/Button.js";
|
|
6
|
+
import { isNative as l, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
|
|
7
|
+
import { EmptyState as f } from "../components/EmptyState.js";
|
|
8
|
+
import { FormField as p, Input as m, Textarea as h } from "../components/Input.js";
|
|
9
|
+
import { ErrorState as g } from "../components/ErrorState.js";
|
|
10
|
+
import { useBucketTree as ee, useBuckets as te, useCreateBucket as ne, useDeleteBucket as re, useUpdateBucket as ie } from "../hooks/useBuckets.js";
|
|
11
|
+
import "../hooks/index.js";
|
|
12
|
+
import { useState as _ } from "react";
|
|
13
|
+
import { GlassCard as v, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
15
|
+
import { Link as S } from "react-router";
|
|
16
|
+
import { ChevronDown as C, ChevronRight as w, Edit as T, Folder as E, FolderOpen as D, FolderTree as O, MoreHorizontal as k, Plus as A, Save as j, Search as oe, Settings as se, Trash2 as M, X as N } from "lucide-react";
|
|
17
|
+
import { toast as P } from "sonner";
|
|
18
|
+
//#region src/botlit/pages/BucketsPage.tsx
|
|
19
|
+
var F = ({ bucket: e, level: t, expanded: n, onToggle: r, getPath: i, onEdit: a, onDelete: o, onCreateChild: s, activeMenu: l, setActiveMenu: u }) => {
|
|
20
|
+
let d = n.has(e.id), f = e.children.length > 0, p = l === e.id;
|
|
21
|
+
return /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(S, {
|
|
22
|
+
to: i(`buckets/${e.id}`),
|
|
23
|
+
children: /* @__PURE__ */ x("div", {
|
|
24
|
+
className: "flex items-center gap-2 px-3 py-2 hover:bg-accent rounded-md transition-colors cursor-pointer group",
|
|
25
|
+
style: { paddingLeft: `${t * 24 + 12}px` },
|
|
26
|
+
children: [
|
|
27
|
+
f ? /* @__PURE__ */ b("button", {
|
|
28
|
+
onClick: (t) => {
|
|
29
|
+
t.preventDefault(), r(e.id);
|
|
30
|
+
},
|
|
31
|
+
className: "p-0.5 hover:bg-bg-sunken rounded",
|
|
32
|
+
children: b(d ? C : w, {
|
|
33
|
+
size: 16,
|
|
34
|
+
className: "text-text-secondary"
|
|
35
|
+
})
|
|
36
|
+
}) : /* @__PURE__ */ b("div", { className: "w-5" }),
|
|
37
|
+
d ? /* @__PURE__ */ b(D, {
|
|
38
|
+
size: 18,
|
|
39
|
+
className: "text-primary"
|
|
40
|
+
}) : /* @__PURE__ */ b(E, {
|
|
41
|
+
size: 18,
|
|
42
|
+
className: "text-text-secondary"
|
|
43
|
+
}),
|
|
44
|
+
/* @__PURE__ */ b("span", {
|
|
45
|
+
className: "flex-1 font-medium",
|
|
46
|
+
children: e.name
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ x("div", {
|
|
49
|
+
className: "relative",
|
|
50
|
+
children: [/* @__PURE__ */ b(c, {
|
|
51
|
+
variant: "ghost",
|
|
52
|
+
size: "icon",
|
|
53
|
+
className: "h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
54
|
+
onClick: (t) => {
|
|
55
|
+
t.preventDefault(), t.stopPropagation(), u(p ? null : e.id);
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ b(k, { size: 14 })
|
|
58
|
+
}), p && /* @__PURE__ */ x("div", {
|
|
59
|
+
className: "absolute right-0 top-8 bg-popover border rounded-md shadow-lg z-50 py-1 min-w-[160px]",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ x("button", {
|
|
62
|
+
className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-left",
|
|
63
|
+
onClick: (t) => {
|
|
64
|
+
t.preventDefault(), t.stopPropagation(), s(e.id);
|
|
65
|
+
},
|
|
66
|
+
children: [/* @__PURE__ */ b(A, { size: 14 }), "Add Sub-Bucket"]
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ x("button", {
|
|
69
|
+
className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-left",
|
|
70
|
+
onClick: (t) => {
|
|
71
|
+
t.preventDefault(), t.stopPropagation(), a(e);
|
|
72
|
+
},
|
|
73
|
+
children: [/* @__PURE__ */ b(T, { size: 14 }), "Edit"]
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ x("button", {
|
|
76
|
+
className: "w-full flex items-center gap-2 px-3 py-2 text-sm hover:bg-accent text-status-error-text text-left",
|
|
77
|
+
onClick: (t) => {
|
|
78
|
+
t.preventDefault(), t.stopPropagation(), o(e.id);
|
|
79
|
+
},
|
|
80
|
+
children: [/* @__PURE__ */ b(M, { size: 14 }), "Delete"]
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
})]
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
}), d && e.children.map((e) => /* @__PURE__ */ b(F, {
|
|
88
|
+
bucket: e,
|
|
89
|
+
level: t + 1,
|
|
90
|
+
expanded: n,
|
|
91
|
+
onToggle: r,
|
|
92
|
+
getPath: i,
|
|
93
|
+
onEdit: a,
|
|
94
|
+
onDelete: o,
|
|
95
|
+
onCreateChild: s,
|
|
96
|
+
activeMenu: l,
|
|
97
|
+
setActiveMenu: u
|
|
98
|
+
}, e.id))] });
|
|
99
|
+
}, I = () => {
|
|
100
|
+
let { getPath: C } = e(), [w, T] = _(""), [D, k] = _("tree"), [I, L] = _(new Set(["bucket-1"])), [ce, R] = _(!1), [z, B] = _(null), [V, H] = _(null), [le, U] = _(null), [W, G] = _({
|
|
101
|
+
name: "",
|
|
102
|
+
description: "",
|
|
103
|
+
visibility: "PRIVATE",
|
|
104
|
+
parentBucketId: void 0
|
|
105
|
+
}), { data: K, loading: ue, error: de, refetch: q } = te({ search: w }), { data: J, loading: fe, error: pe, refetch: Y } = ee(), [me, he] = ne(), [ge, _e] = ie(), [ve, ye] = re(), be = (e) => {
|
|
106
|
+
L((t) => {
|
|
107
|
+
let n = new Set(t);
|
|
108
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
109
|
+
});
|
|
110
|
+
}, xe = () => {
|
|
111
|
+
if (J) {
|
|
112
|
+
let e = /* @__PURE__ */ new Set(), t = (n) => {
|
|
113
|
+
for (let r of n) e.add(r.id), r.children && t(r.children);
|
|
114
|
+
};
|
|
115
|
+
t(J), L(e);
|
|
116
|
+
}
|
|
117
|
+
}, Se = () => {
|
|
118
|
+
L(/* @__PURE__ */ new Set());
|
|
119
|
+
}, X = D === "tree" ? fe : ue, Z = D === "tree" ? pe : de, Q = D === "tree" ? Y : q, Ce = async () => {
|
|
120
|
+
if (W.name) {
|
|
121
|
+
try {
|
|
122
|
+
await me({
|
|
123
|
+
name: W.name,
|
|
124
|
+
slug: W.name.toLowerCase().replace(/\s+/g, "-"),
|
|
125
|
+
description: W.description,
|
|
126
|
+
parentBucketId: W.parentBucketId,
|
|
127
|
+
metadata: { visibility: W.visibility }
|
|
128
|
+
});
|
|
129
|
+
} catch (e) {
|
|
130
|
+
P.error(e instanceof Error ? e.message : "Failed to create bucket");
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
P.success(`Bucket "${W.name}" created`), q(), Y(), R(!1), G({
|
|
134
|
+
name: "",
|
|
135
|
+
description: "",
|
|
136
|
+
visibility: "PRIVATE",
|
|
137
|
+
parentBucketId: void 0
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}, we = async () => {
|
|
141
|
+
if (!(!V || !W.name)) {
|
|
142
|
+
try {
|
|
143
|
+
await ge({
|
|
144
|
+
bucketId: V.id,
|
|
145
|
+
input: {
|
|
146
|
+
name: W.name,
|
|
147
|
+
description: W.description
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
} catch (e) {
|
|
151
|
+
P.error(e instanceof Error ? e.message : "Failed to update bucket");
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
P.success("Bucket updated"), q(), Y(), H(null);
|
|
155
|
+
}
|
|
156
|
+
}, Te = async (e) => {
|
|
157
|
+
try {
|
|
158
|
+
await ve(e), l() && d("success"), P.success("Bucket deleted"), q(), Y();
|
|
159
|
+
} catch (e) {
|
|
160
|
+
l() && d("error"), P.error(e instanceof Error ? e.message : "Failed to delete bucket");
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
B(null);
|
|
164
|
+
}, Ee = (e) => {
|
|
165
|
+
G({
|
|
166
|
+
name: e.name,
|
|
167
|
+
description: e.description ?? "",
|
|
168
|
+
visibility: "PRIVATE",
|
|
169
|
+
parentBucketId: void 0
|
|
170
|
+
}), H(e), U(null);
|
|
171
|
+
}, $ = (e) => {
|
|
172
|
+
G({
|
|
173
|
+
name: "",
|
|
174
|
+
description: "",
|
|
175
|
+
visibility: "PRIVATE",
|
|
176
|
+
parentBucketId: e
|
|
177
|
+
}), R(!0);
|
|
178
|
+
};
|
|
179
|
+
return /* @__PURE__ */ b(n, {
|
|
180
|
+
title: "Buckets",
|
|
181
|
+
description: "Organize your agents, apps, and resources into hierarchical folders",
|
|
182
|
+
actions: /* @__PURE__ */ b(c, {
|
|
183
|
+
leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
|
|
184
|
+
onClick: () => $(),
|
|
185
|
+
children: "Create Bucket"
|
|
186
|
+
}),
|
|
187
|
+
children: /* @__PURE__ */ x("div", {
|
|
188
|
+
className: "space-y-6",
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ b(ae, {
|
|
191
|
+
icon: /* @__PURE__ */ b(O, { size: 18 }),
|
|
192
|
+
children: "Buckets are folders for everything you build in Botlit — agents, bots, skills, knowledge and more — arranged in a hierarchy that mirrors how your team works. Group resources by team, project or environment so they stay organised, easy to find and simple to share as your account grows. Browse the tree or list view to manage that structure."
|
|
193
|
+
}),
|
|
194
|
+
K.length > 0 ? /* @__PURE__ */ x("div", {
|
|
195
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-2",
|
|
196
|
+
children: [/* @__PURE__ */ x(v, {
|
|
197
|
+
treatment: "glass",
|
|
198
|
+
glow: !0,
|
|
199
|
+
className: "p-4",
|
|
200
|
+
children: [/* @__PURE__ */ b("p", {
|
|
201
|
+
className: "text-sm text-text-secondary",
|
|
202
|
+
children: "Total buckets"
|
|
203
|
+
}), /* @__PURE__ */ b("p", {
|
|
204
|
+
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
205
|
+
children: K.length
|
|
206
|
+
})]
|
|
207
|
+
}), /* @__PURE__ */ x(v, {
|
|
208
|
+
treatment: "metric",
|
|
209
|
+
className: "p-4",
|
|
210
|
+
children: [/* @__PURE__ */ b("p", {
|
|
211
|
+
className: "text-sm text-text-secondary",
|
|
212
|
+
children: "Top-level buckets"
|
|
213
|
+
}), /* @__PURE__ */ b("p", {
|
|
214
|
+
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
215
|
+
children: J.length
|
|
216
|
+
})]
|
|
217
|
+
})]
|
|
218
|
+
}) : null,
|
|
219
|
+
/* @__PURE__ */ x("div", {
|
|
220
|
+
className: "flex items-center justify-between gap-4",
|
|
221
|
+
children: [/* @__PURE__ */ x("div", {
|
|
222
|
+
className: "relative flex-1 max-w-md",
|
|
223
|
+
children: [/* @__PURE__ */ b(oe, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ b(m, {
|
|
224
|
+
placeholder: "Search buckets...",
|
|
225
|
+
value: w,
|
|
226
|
+
onChange: (e) => T(e.target.value),
|
|
227
|
+
className: "pl-9"
|
|
228
|
+
})]
|
|
229
|
+
}), /* @__PURE__ */ x("div", {
|
|
230
|
+
className: "flex items-center gap-2",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ b(c, {
|
|
233
|
+
variant: "outline",
|
|
234
|
+
size: "sm",
|
|
235
|
+
onClick: xe,
|
|
236
|
+
children: "Expand All"
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ b(c, {
|
|
239
|
+
variant: "outline",
|
|
240
|
+
size: "sm",
|
|
241
|
+
onClick: Se,
|
|
242
|
+
children: "Collapse All"
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ x("div", {
|
|
245
|
+
className: "flex border border-border-subtle rounded-md overflow-hidden",
|
|
246
|
+
children: [/* @__PURE__ */ b(c, {
|
|
247
|
+
variant: D === "tree" ? "default" : "ghost",
|
|
248
|
+
size: "sm",
|
|
249
|
+
className: "rounded-none",
|
|
250
|
+
onClick: () => k("tree"),
|
|
251
|
+
children: /* @__PURE__ */ b(O, { size: 16 })
|
|
252
|
+
}), /* @__PURE__ */ b(c, {
|
|
253
|
+
variant: D === "list" ? "default" : "ghost",
|
|
254
|
+
size: "sm",
|
|
255
|
+
className: "rounded-none",
|
|
256
|
+
onClick: () => k("list"),
|
|
257
|
+
children: /* @__PURE__ */ b(se, { size: 16 })
|
|
258
|
+
})]
|
|
259
|
+
})
|
|
260
|
+
]
|
|
261
|
+
})]
|
|
262
|
+
}),
|
|
263
|
+
D === "tree" && /* @__PURE__ */ b(r, { children: /* @__PURE__ */ b(i, {
|
|
264
|
+
className: "p-2",
|
|
265
|
+
children: X ? /* @__PURE__ */ b("div", {
|
|
266
|
+
className: "space-y-2 p-4",
|
|
267
|
+
children: [
|
|
268
|
+
1,
|
|
269
|
+
2,
|
|
270
|
+
3,
|
|
271
|
+
4
|
|
272
|
+
].map((e) => /* @__PURE__ */ b("div", { className: "h-10 bg-bg-sunken motion-safe:animate-vc-shimmer rounded" }, e))
|
|
273
|
+
}) : Z ? /* @__PURE__ */ b(g, {
|
|
274
|
+
resource: "buckets",
|
|
275
|
+
error: Z,
|
|
276
|
+
onRetry: () => void Q()
|
|
277
|
+
}) : J.length > 0 ? /* @__PURE__ */ b("div", {
|
|
278
|
+
className: "py-2",
|
|
279
|
+
onClick: () => U(null),
|
|
280
|
+
children: J.map((e) => /* @__PURE__ */ b(F, {
|
|
281
|
+
bucket: e,
|
|
282
|
+
level: 0,
|
|
283
|
+
expanded: I,
|
|
284
|
+
onToggle: be,
|
|
285
|
+
getPath: C,
|
|
286
|
+
onEdit: Ee,
|
|
287
|
+
onDelete: (e) => B(e),
|
|
288
|
+
onCreateChild: (e) => $(e),
|
|
289
|
+
activeMenu: le,
|
|
290
|
+
setActiveMenu: U
|
|
291
|
+
}, e.id))
|
|
292
|
+
}) : /* @__PURE__ */ b(f, {
|
|
293
|
+
illustration: "empty-files",
|
|
294
|
+
title: "No buckets created",
|
|
295
|
+
description: "Create buckets to organize your Botlit resources.",
|
|
296
|
+
action: /* @__PURE__ */ b(c, {
|
|
297
|
+
leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
|
|
298
|
+
onClick: () => $(),
|
|
299
|
+
children: "Create Bucket"
|
|
300
|
+
})
|
|
301
|
+
})
|
|
302
|
+
}) }),
|
|
303
|
+
D === "list" && /* @__PURE__ */ b(y, { children: X ? /* @__PURE__ */ b("div", {
|
|
304
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
305
|
+
children: [
|
|
306
|
+
1,
|
|
307
|
+
2,
|
|
308
|
+
3
|
|
309
|
+
].map((e) => /* @__PURE__ */ b("div", { className: "h-32 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
|
|
310
|
+
}) : Z ? /* @__PURE__ */ b(g, {
|
|
311
|
+
resource: "buckets",
|
|
312
|
+
error: Z,
|
|
313
|
+
onRetry: () => void Q()
|
|
314
|
+
}) : K.length > 0 ? /* @__PURE__ */ b("div", {
|
|
315
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
316
|
+
children: K.map((e) => /* @__PURE__ */ b(S, {
|
|
317
|
+
to: C(`buckets/${e.id}`),
|
|
318
|
+
children: /* @__PURE__ */ x(r, {
|
|
319
|
+
className: "h-full hover:border-primary/50 transition-colors cursor-pointer",
|
|
320
|
+
children: [/* @__PURE__ */ b(o, {
|
|
321
|
+
className: "pb-2",
|
|
322
|
+
children: /* @__PURE__ */ b("div", {
|
|
323
|
+
className: "flex items-start justify-between",
|
|
324
|
+
children: /* @__PURE__ */ x("div", {
|
|
325
|
+
className: "flex items-center gap-3",
|
|
326
|
+
children: [/* @__PURE__ */ b(E, { className: "h-5 w-5 text-primary" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(s, {
|
|
327
|
+
className: "text-base",
|
|
328
|
+
children: e.name
|
|
329
|
+
}), /* @__PURE__ */ b(a, {
|
|
330
|
+
className: "text-xs",
|
|
331
|
+
children: e.path
|
|
332
|
+
})] })]
|
|
333
|
+
})
|
|
334
|
+
})
|
|
335
|
+
}), /* @__PURE__ */ b(i, { children: /* @__PURE__ */ x("div", {
|
|
336
|
+
className: "flex items-center justify-between text-sm",
|
|
337
|
+
children: [/* @__PURE__ */ b("span", {
|
|
338
|
+
className: "text-text-secondary",
|
|
339
|
+
children: e.slug
|
|
340
|
+
}), /* @__PURE__ */ b("span", {
|
|
341
|
+
className: "text-xs text-text-secondary",
|
|
342
|
+
children: t(e.createdAt)
|
|
343
|
+
})]
|
|
344
|
+
}) })]
|
|
345
|
+
})
|
|
346
|
+
}, e.id))
|
|
347
|
+
}) : /* @__PURE__ */ b(f, {
|
|
348
|
+
illustration: "empty-search",
|
|
349
|
+
title: "No buckets found",
|
|
350
|
+
description: "Create buckets to organize your Botlit resources.",
|
|
351
|
+
action: /* @__PURE__ */ b(c, {
|
|
352
|
+
leftIcon: /* @__PURE__ */ b(A, { size: 16 }),
|
|
353
|
+
onClick: () => $(),
|
|
354
|
+
children: "Create Bucket"
|
|
355
|
+
})
|
|
356
|
+
}) }),
|
|
357
|
+
/* @__PURE__ */ x(r, { children: [/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
|
|
358
|
+
className: "flex items-center gap-2",
|
|
359
|
+
children: [/* @__PURE__ */ b(O, { size: 18 }), "Organizing with Buckets"]
|
|
360
|
+
}), /* @__PURE__ */ b(a, { children: "Buckets help you organize and manage permissions for your resources" })] }), /* @__PURE__ */ b(i, { children: /* @__PURE__ */ x("div", {
|
|
361
|
+
className: "grid grid-cols-1 md:grid-cols-3 gap-6",
|
|
362
|
+
children: [
|
|
363
|
+
/* @__PURE__ */ x("div", {
|
|
364
|
+
className: "space-y-2",
|
|
365
|
+
children: [/* @__PURE__ */ b("h4", {
|
|
366
|
+
className: "font-medium",
|
|
367
|
+
children: "Hierarchical Organization"
|
|
368
|
+
}), /* @__PURE__ */ b("p", {
|
|
369
|
+
className: "text-sm text-text-secondary",
|
|
370
|
+
children: "Create nested folder structures to organize apps, agents, and other resources by team, project, or domain."
|
|
371
|
+
})]
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ x("div", {
|
|
374
|
+
className: "space-y-2",
|
|
375
|
+
children: [/* @__PURE__ */ b("h4", {
|
|
376
|
+
className: "font-medium",
|
|
377
|
+
children: "Inherited Permissions"
|
|
378
|
+
}), /* @__PURE__ */ b("p", {
|
|
379
|
+
className: "text-sm text-text-secondary",
|
|
380
|
+
children: "Set owners, editors, and viewers at the bucket level. Permissions cascade to all items within."
|
|
381
|
+
})]
|
|
382
|
+
}),
|
|
383
|
+
/* @__PURE__ */ x("div", {
|
|
384
|
+
className: "space-y-2",
|
|
385
|
+
children: [/* @__PURE__ */ b("h4", {
|
|
386
|
+
className: "font-medium",
|
|
387
|
+
children: "Default Policies"
|
|
388
|
+
}), /* @__PURE__ */ b("p", {
|
|
389
|
+
className: "text-sm text-text-secondary",
|
|
390
|
+
children: "Configure default policy bindings for buckets. All new items inherit these policies automatically."
|
|
391
|
+
})]
|
|
392
|
+
})
|
|
393
|
+
]
|
|
394
|
+
}) })] }),
|
|
395
|
+
ce && /* @__PURE__ */ b("div", {
|
|
396
|
+
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
397
|
+
children: /* @__PURE__ */ x(r, {
|
|
398
|
+
className: "w-full max-w-md mx-4",
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
|
|
401
|
+
className: "flex items-center justify-between",
|
|
402
|
+
children: [/* @__PURE__ */ b("span", { children: "Create Bucket" }), /* @__PURE__ */ b(c, {
|
|
403
|
+
variant: "ghost",
|
|
404
|
+
size: "icon",
|
|
405
|
+
onClick: () => R(!1),
|
|
406
|
+
children: /* @__PURE__ */ b(N, { size: 16 })
|
|
407
|
+
})]
|
|
408
|
+
}), /* @__PURE__ */ b(a, { children: W.parentBucketId ? "Create a new sub-bucket" : "Create a new root bucket" })] }),
|
|
409
|
+
/* @__PURE__ */ x(i, {
|
|
410
|
+
className: "space-y-4",
|
|
411
|
+
children: [
|
|
412
|
+
/* @__PURE__ */ b(p, {
|
|
413
|
+
label: "Bucket Name",
|
|
414
|
+
required: !0,
|
|
415
|
+
children: /* @__PURE__ */ b(m, {
|
|
416
|
+
placeholder: "e.g., Marketing Team",
|
|
417
|
+
value: W.name,
|
|
418
|
+
onChange: (e) => G({
|
|
419
|
+
...W,
|
|
420
|
+
name: e.target.value
|
|
421
|
+
})
|
|
422
|
+
})
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ b(p, {
|
|
425
|
+
label: "Description",
|
|
426
|
+
children: /* @__PURE__ */ b(h, {
|
|
427
|
+
placeholder: "What is this bucket for?",
|
|
428
|
+
value: W.description,
|
|
429
|
+
onChange: (e) => G({
|
|
430
|
+
...W,
|
|
431
|
+
description: e.target.value
|
|
432
|
+
}),
|
|
433
|
+
rows: 2
|
|
434
|
+
})
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ b(p, {
|
|
437
|
+
label: "Visibility",
|
|
438
|
+
children: /* @__PURE__ */ x("select", {
|
|
439
|
+
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
440
|
+
value: W.visibility,
|
|
441
|
+
onChange: (e) => G({
|
|
442
|
+
...W,
|
|
443
|
+
visibility: e.target.value
|
|
444
|
+
}),
|
|
445
|
+
children: [
|
|
446
|
+
/* @__PURE__ */ b("option", {
|
|
447
|
+
value: "PRIVATE",
|
|
448
|
+
children: "Private"
|
|
449
|
+
}),
|
|
450
|
+
/* @__PURE__ */ b("option", {
|
|
451
|
+
value: "WORKSPACE",
|
|
452
|
+
children: "Workspace"
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ b("option", {
|
|
455
|
+
value: "PUBLIC",
|
|
456
|
+
children: "Public"
|
|
457
|
+
})
|
|
458
|
+
]
|
|
459
|
+
})
|
|
460
|
+
})
|
|
461
|
+
]
|
|
462
|
+
}),
|
|
463
|
+
/* @__PURE__ */ x("div", {
|
|
464
|
+
className: "flex justify-end gap-2 p-4 border-t",
|
|
465
|
+
children: [/* @__PURE__ */ b(c, {
|
|
466
|
+
variant: "outline",
|
|
467
|
+
onClick: () => R(!1),
|
|
468
|
+
children: "Cancel"
|
|
469
|
+
}), /* @__PURE__ */ b(c, {
|
|
470
|
+
onClick: Ce,
|
|
471
|
+
isLoading: he.loading,
|
|
472
|
+
disabled: !W.name,
|
|
473
|
+
leftIcon: /* @__PURE__ */ b(j, { size: 16 }),
|
|
474
|
+
children: "Create Bucket"
|
|
475
|
+
})]
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
})
|
|
479
|
+
}),
|
|
480
|
+
V && /* @__PURE__ */ b("div", {
|
|
481
|
+
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
482
|
+
children: /* @__PURE__ */ x(r, {
|
|
483
|
+
className: "w-full max-w-md mx-4",
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
|
|
486
|
+
className: "flex items-center justify-between",
|
|
487
|
+
children: [/* @__PURE__ */ b("span", { children: "Edit Bucket" }), /* @__PURE__ */ b(c, {
|
|
488
|
+
variant: "ghost",
|
|
489
|
+
size: "icon",
|
|
490
|
+
onClick: () => H(null),
|
|
491
|
+
children: /* @__PURE__ */ b(N, { size: 16 })
|
|
492
|
+
})]
|
|
493
|
+
}), /* @__PURE__ */ b(a, { children: "Update bucket details" })] }),
|
|
494
|
+
/* @__PURE__ */ x(i, {
|
|
495
|
+
className: "space-y-4",
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ b(p, {
|
|
498
|
+
label: "Bucket Name",
|
|
499
|
+
required: !0,
|
|
500
|
+
children: /* @__PURE__ */ b(m, {
|
|
501
|
+
placeholder: "e.g., Marketing Team",
|
|
502
|
+
value: W.name,
|
|
503
|
+
onChange: (e) => G({
|
|
504
|
+
...W,
|
|
505
|
+
name: e.target.value
|
|
506
|
+
})
|
|
507
|
+
})
|
|
508
|
+
}),
|
|
509
|
+
/* @__PURE__ */ b(p, {
|
|
510
|
+
label: "Description",
|
|
511
|
+
children: /* @__PURE__ */ b(h, {
|
|
512
|
+
placeholder: "What is this bucket for?",
|
|
513
|
+
value: W.description,
|
|
514
|
+
onChange: (e) => G({
|
|
515
|
+
...W,
|
|
516
|
+
description: e.target.value
|
|
517
|
+
}),
|
|
518
|
+
rows: 2
|
|
519
|
+
})
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ b(p, {
|
|
522
|
+
label: "Visibility",
|
|
523
|
+
children: /* @__PURE__ */ x("select", {
|
|
524
|
+
className: "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
|
|
525
|
+
value: W.visibility,
|
|
526
|
+
onChange: (e) => G({
|
|
527
|
+
...W,
|
|
528
|
+
visibility: e.target.value
|
|
529
|
+
}),
|
|
530
|
+
children: [
|
|
531
|
+
/* @__PURE__ */ b("option", {
|
|
532
|
+
value: "PRIVATE",
|
|
533
|
+
children: "Private"
|
|
534
|
+
}),
|
|
535
|
+
/* @__PURE__ */ b("option", {
|
|
536
|
+
value: "WORKSPACE",
|
|
537
|
+
children: "Workspace"
|
|
538
|
+
}),
|
|
539
|
+
/* @__PURE__ */ b("option", {
|
|
540
|
+
value: "PUBLIC",
|
|
541
|
+
children: "Public"
|
|
542
|
+
})
|
|
543
|
+
]
|
|
544
|
+
})
|
|
545
|
+
})
|
|
546
|
+
]
|
|
547
|
+
}),
|
|
548
|
+
/* @__PURE__ */ x("div", {
|
|
549
|
+
className: "flex justify-end gap-2 p-4 border-t",
|
|
550
|
+
children: [/* @__PURE__ */ b(c, {
|
|
551
|
+
variant: "outline",
|
|
552
|
+
onClick: () => H(null),
|
|
553
|
+
children: "Cancel"
|
|
554
|
+
}), /* @__PURE__ */ b(c, {
|
|
555
|
+
onClick: we,
|
|
556
|
+
isLoading: _e.loading,
|
|
557
|
+
disabled: !W.name,
|
|
558
|
+
leftIcon: /* @__PURE__ */ b(j, { size: 16 }),
|
|
559
|
+
children: "Save Changes"
|
|
560
|
+
})]
|
|
561
|
+
})
|
|
562
|
+
]
|
|
563
|
+
})
|
|
564
|
+
}),
|
|
565
|
+
z && /* @__PURE__ */ b("div", {
|
|
566
|
+
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
567
|
+
children: /* @__PURE__ */ x(r, {
|
|
568
|
+
className: "w-full max-w-md mx-4",
|
|
569
|
+
children: [
|
|
570
|
+
/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x(s, {
|
|
571
|
+
className: "flex items-center gap-2 text-status-error-text",
|
|
572
|
+
children: [/* @__PURE__ */ b(M, { size: 18 }), "Delete Bucket"]
|
|
573
|
+
}), /* @__PURE__ */ b(a, { children: "Are you sure you want to delete this bucket? This action cannot be undone." })] }),
|
|
574
|
+
/* @__PURE__ */ b(i, { children: /* @__PURE__ */ b("p", {
|
|
575
|
+
className: "text-sm text-text-secondary",
|
|
576
|
+
children: "Note: Buckets with children or items cannot be deleted. You must delete or move all contents first."
|
|
577
|
+
}) }),
|
|
578
|
+
/* @__PURE__ */ x("div", {
|
|
579
|
+
className: "flex justify-end gap-2 p-4 border-t",
|
|
580
|
+
children: [/* @__PURE__ */ b(c, {
|
|
581
|
+
variant: "outline",
|
|
582
|
+
onClick: () => B(null),
|
|
583
|
+
children: "Cancel"
|
|
584
|
+
}), /* @__PURE__ */ b(c, {
|
|
585
|
+
variant: "destructive",
|
|
586
|
+
onClick: () => {
|
|
587
|
+
u("medium"), Te(z);
|
|
588
|
+
},
|
|
589
|
+
isLoading: ye.loading,
|
|
590
|
+
leftIcon: /* @__PURE__ */ b(M, { size: 16 }),
|
|
591
|
+
children: "Delete Bucket"
|
|
592
|
+
})]
|
|
593
|
+
})
|
|
594
|
+
]
|
|
595
|
+
})
|
|
596
|
+
})
|
|
597
|
+
]
|
|
598
|
+
})
|
|
599
|
+
});
|
|
600
|
+
};
|
|
601
|
+
//#endregion
|
|
602
|
+
export { I as BucketsPage };
|
|
603
|
+
|
|
604
|
+
//# sourceMappingURL=BucketsPage.js.map
|