@burdenoff/microfe-botmanor 2026.1120.17 → 2026.1120.19

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.
@@ -1,32 +1,28 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { PageLayout as t } from "../components/PageLayout.js";
3
- import { Card as n, CardContent as r, CardDescription as i, CardHeader as a, CardTitle as o } from "../components/Card.js";
4
- import { BOTMANOR_PERMISSIONS as s } from "../permissions/botmanorPermissions.js";
5
- import { BotmanorPermissionGate as c } from "../permissions/useBotmanorPermissions.js";
6
- import { Button as l } from "../components/Button.js";
7
- import { Input as u } from "../components/Input.js";
8
- import { Badge as d } from "../components/Badge.js";
9
- import { EmptyState as f } from "../components/EmptyState.js";
10
- import { LoadMore as ee } from "../components/LoadMore.js";
11
- import { ErrorState as te } from "../components/ErrorState.js";
3
+ import { Card as n, CardContent as r, CardHeader as i, CardTitle as a } from "../components/Card.js";
4
+ import { BOTMANOR_PERMISSIONS as o } from "../permissions/botmanorPermissions.js";
5
+ import { BotmanorPermissionGate as s } from "../permissions/useBotmanorPermissions.js";
6
+ import { Button as c } from "../components/Button.js";
7
+ import { Input as l } from "../components/Input.js";
8
+ import { Badge as u } from "../components/Badge.js";
9
+ import { EmptyState as ee } from "../components/EmptyState.js";
10
+ import { LoadMore as te } from "../components/LoadMore.js";
11
+ import { ErrorState as d } from "../components/ErrorState.js";
12
12
  import "../hooks/index.js";
13
- import { formatRelativeTime as p } from "../utils/formatters.js";
13
+ import { formatRelativeTime as f } from "../utils/formatters.js";
14
14
  import "../permissions/index.js";
15
- import { storePackageName as m, useInstalledPackages as ne, usePinPackageVersion as re, useUninstallPackage as ie, useUpdateInstalledPackage as ae } from "../hooks/useStore.js";
16
- import { STORE_PACKAGE_KINDS as oe, UninstallPackageDialog as se, packageKindLabels as ce } from "../components/StoreDialogs.js";
17
- import { useTr as le } from "../../shared/hooks/useTr.js";
15
+ import { storePackageName as p, useInstalledPackages as ne, useUninstallPackage as re, useUpdateInstalledPackage as ie } from "../hooks/useStore.js";
16
+ import { STORE_PACKAGE_KINDS as ae, UninstallPackageDialog as oe, packageKindLabels as m } from "../components/StoreDialogs.js";
17
+ import { useTr as se } from "../../shared/hooks/useTr.js";
18
18
  import { useMemo as h, useState as g } from "react";
19
- import { GlassCard as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
20
- import { Fragment as ue, jsx as y, jsxs as b } from "react/jsx-runtime";
21
- import { Link as de } from "react-router";
22
- import { ArrowUpCircle as x, Copy as fe, Download as pe, ExternalLink as me, GitBranch as S, Link2 as C, Package as w, RefreshCw as he, Search as ge, Settings as _e, Trash2 as T } from "lucide-react";
19
+ import { GlassCard as _, PagePurpose as ce } from "@burdenoff/fe-libs/ui";
20
+ import { Fragment as le, jsx as v, jsxs as y } from "react/jsx-runtime";
21
+ import { Link as ue } from "react-router";
22
+ import { ArrowUpCircle as b, Copy as x, Download as S, ExternalLink as C, Link2 as de, Package as w, RefreshCw as fe, Search as pe, Trash2 as T } from "lucide-react";
23
23
  import { toast as E } from "sonner";
24
24
  // src/botlit/pages/InstalledPackagesPage.tsx
25
- var D = [
26
- "DEV",
27
- "STAGING",
28
- "PROD"
29
- ], O = {
25
+ var D = {
30
26
  APP: {
31
27
  label: "Bot",
32
28
  icon: "📱"
@@ -91,203 +87,163 @@ var D = [
91
87
  label: "Workflow",
92
88
  icon: "🔀"
93
89
  }
94
- }, k = {
90
+ }, O = {
95
91
  label: "Package",
96
92
  icon: "📦"
97
93
  };
98
- function A(e) {
94
+ function k(e) {
99
95
  return e.package?.slug ?? e.packageId;
100
96
  }
101
- function j(e) {
97
+ function A(e) {
102
98
  return e.package?.kind;
103
99
  }
100
+ function j(e) {
101
+ return p(e.package) || k(e);
102
+ }
104
103
  function M(e) {
105
- return m(e.package) || A(e);
104
+ let t = A(e);
105
+ return t && D[t] || O;
106
106
  }
107
107
  function N(e) {
108
- let t = j(e);
109
- return t && O[t] || k;
110
- }
111
- function P(e) {
112
108
  let t = e.package?.version;
113
109
  return !!(t && t !== e.installedVersion);
114
110
  }
115
- function F(e, t) {
116
- let n = e.pinnedByEnv?.[t];
117
- return typeof n == "string" && n !== "" ? n : void 0;
118
- }
119
- var I = () => {
120
- let { navigateTo: O, getPath: k } = e(), { data: I, loading: ve, error: L, refetch: R, hasMore: ye, loadingMore: be, loadMore: z } = ne(), { uninstall: xe, loading: Se } = ie(), { update: Ce, loading: we } = ae(), { pin: Te } = re(), [B, Ee] = g(""), [De, V] = g(!1), [H, Oe] = g("all"), [U, W] = g(null), [G, K] = g(null), q = le(), J = ce(q), Y = h(() => {
121
- let e = B.trim().toLowerCase();
122
- return I.filter((t) => {
123
- let n = !e || A(t).toLowerCase().includes(e) || m(t.package).toLowerCase().includes(e), r = H === "all" || j(t) === H;
111
+ var P = () => {
112
+ let { navigateTo: D, getPath: O } = e(), { data: P, loading: F, error: I, refetch: L, hasMore: R, loadingMore: z, loadMore: B } = ne(), { uninstall: me, loading: he } = re(), { update: ge, loading: _e } = ie(), [V, ve] = g(""), [ye, H] = g(!1), [U, be] = g("all"), [W, G] = g(null), [K, q] = g(null), J = se(), Y = m(J), X = h(() => {
113
+ let e = V.trim().toLowerCase();
114
+ return P.filter((t) => {
115
+ let n = !e || k(t).toLowerCase().includes(e) || p(t.package).toLowerCase().includes(e), r = U === "all" || A(t) === U;
124
116
  return n && r;
125
117
  });
126
118
  }, [
127
- I,
128
- B,
129
- H
130
- ]), X = h(() => I.find((e) => e.id === U) ?? null, [I, U]), ke = h(() => I.filter(P).length, [I]), Ae = async () => {
131
- V(!0);
119
+ P,
120
+ V,
121
+ U
122
+ ]), Z = h(() => P.find((e) => e.id === W) ?? null, [P, W]), xe = h(() => P.filter(N).length, [P]), Se = async () => {
123
+ H(!0);
132
124
  try {
133
- await R();
125
+ await L();
134
126
  } finally {
135
- V(!1);
127
+ H(!1);
136
128
  }
137
- }, Z = (e) => K(e), je = async () => {
138
- let e = G;
129
+ }, Q = (e) => q(e), Ce = async () => {
130
+ let e = K;
139
131
  if (e) {
140
132
  try {
141
- await xe(e.id);
133
+ await me(e.id);
142
134
  } catch (e) {
143
- E.error(e instanceof Error ? e.message : q("botlit.store.uninstall.error", "Could not uninstall the package."));
135
+ E.error(e instanceof Error ? e.message : J("botlit.store.uninstall.error", "Could not uninstall the package."));
144
136
  return;
145
137
  }
146
- E.success(q("botlit.store.uninstall.success", "Uninstalled \"{{name}}\"", { name: M(e) })), K(null), W(null), R();
138
+ E.success(J("botlit.store.uninstall.success", "Uninstalled \"{{name}}\"", { name: j(e) })), q(null), G(null), L();
147
139
  }
148
- }, Me = async (e) => {
140
+ }, we = async (e) => {
149
141
  let t = e.package?.version;
150
142
  if (t) try {
151
- await Ce({
143
+ await ge({
152
144
  installedId: e.id,
153
145
  input: { installedVersion: t }
154
- }), E.success(q("botlit.store.installed.updated", "Updated to v{{version}}", { version: t })), R();
155
- } catch (e) {
156
- E.error(e instanceof Error ? e.message : q("botlit.store.installed.updateError", "Could not update the package."));
157
- }
158
- }, Q = async (e, t, n) => {
159
- try {
160
- await Te({
161
- installedId: e.id,
162
- environment: t,
163
- version: n,
164
- pinnedByEnv: e.pinnedByEnv
165
- }), E.success(n ? q("botlit.store.installed.pinned", "Pinned {{env}} to v{{version}}", {
166
- env: t,
167
- version: n
168
- }) : q("botlit.store.installed.unpinned", "Unpinned {{env}}", { env: t })), R();
146
+ }), E.success(A(e) === "POLICY_BUNDLE" && e.mode === "LINKED" ? J("botlit.store.installed.updatedPolicies", "Updated to v{{version}} and refreshed its policies", { version: t }) : J("botlit.store.installed.updatedRecord", "Recorded v{{version}} as the installed version", { version: t })), L();
169
147
  } catch (e) {
170
- E.error(e instanceof Error ? e.message : q("botlit.store.installed.pinError", "Could not change the version pin."));
148
+ E.error(e instanceof Error ? e.message : J("botlit.store.installed.updateError", "Could not update the package."));
171
149
  }
172
- }, $ = (e) => e === "LINKED" ? /* @__PURE__ */ y(C, { className: "h-4 w-4 text-status-info-text" }) : /* @__PURE__ */ y(fe, { className: "h-4 w-4 text-status-warning-text" }), Ne = ({ pkg: e }) => {
173
- let t = N(e), i = A(e), a = P(e), o = D.filter((t) => F(e, t));
174
- return /* @__PURE__ */ y(n, {
150
+ }, $ = (e) => e === "LINKED" ? /* @__PURE__ */ v(de, { className: "h-4 w-4 text-status-info-text" }) : /* @__PURE__ */ v(x, { className: "h-4 w-4 text-status-warning-text" }), Te = ({ pkg: e }) => {
151
+ let t = M(e), i = k(e), a = N(e);
152
+ return /* @__PURE__ */ v(n, {
175
153
  className: "hover:shadow-md transition-shadow cursor-pointer",
176
- onClick: () => W(e.id),
177
- children: /* @__PURE__ */ b(r, {
154
+ onClick: () => G(e.id),
155
+ children: /* @__PURE__ */ y(r, {
178
156
  className: "pt-6",
179
157
  children: [
180
- /* @__PURE__ */ b("div", {
158
+ /* @__PURE__ */ y("div", {
181
159
  className: "flex items-start justify-between",
182
- children: [/* @__PURE__ */ b("div", {
160
+ children: [/* @__PURE__ */ y("div", {
183
161
  className: "flex items-start gap-3",
184
- children: [/* @__PURE__ */ y("div", {
162
+ children: [/* @__PURE__ */ v("div", {
185
163
  className: "p-2 rounded-lg bg-bg-sunken text-2xl",
186
164
  children: t.icon
187
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
165
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
188
166
  className: "flex items-center gap-2",
189
- children: [/* @__PURE__ */ y("h3", {
167
+ children: [/* @__PURE__ */ v("h3", {
190
168
  className: "font-semibold",
191
- children: m(e.package) || i
192
- }), a && /* @__PURE__ */ b(d, {
169
+ children: p(e.package) || i
170
+ }), a && /* @__PURE__ */ y(u, {
193
171
  variant: "warning",
194
172
  className: "gap-1",
195
- children: [/* @__PURE__ */ y(x, { className: "h-3 w-3" }), q("botlit.store.installed.updateBadge", "Update")]
173
+ children: [/* @__PURE__ */ v(b, { className: "h-3 w-3" }), J("botlit.store.installed.updateBadge", "Update")]
196
174
  })]
197
- }), /* @__PURE__ */ y("p", {
175
+ }), /* @__PURE__ */ v("p", {
198
176
  className: "text-sm text-text-secondary font-mono",
199
177
  children: i
200
178
  })] })]
201
- }), /* @__PURE__ */ b("div", {
179
+ }), /* @__PURE__ */ y("div", {
202
180
  className: "flex items-center gap-2",
203
- children: [$(e.mode), /* @__PURE__ */ y(d, {
181
+ children: [$(e.mode), /* @__PURE__ */ v(u, {
204
182
  variant: "outline",
205
- children: J[j(e) ?? ""] ?? t.label
183
+ children: Y[A(e) ?? ""] ?? t.label
206
184
  })]
207
185
  })]
208
186
  }),
209
- /* @__PURE__ */ b("div", {
187
+ /* @__PURE__ */ y("div", {
210
188
  className: "mt-4 grid grid-cols-3 gap-4 text-sm",
211
189
  children: [
212
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
190
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
213
191
  className: "text-text-secondary",
214
- children: q("botlit.store.installed.installedVersion", "Installed version")
215
- }), /* @__PURE__ */ b("p", {
192
+ children: J("botlit.store.installed.installedVersion", "Installed version")
193
+ }), /* @__PURE__ */ y("p", {
216
194
  className: "font-medium font-mono",
217
195
  children: ["v", e.installedVersion]
218
196
  })] }),
219
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
197
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
220
198
  className: "text-text-secondary",
221
- children: q("botlit.store.installed.mode", "Mode")
222
- }), /* @__PURE__ */ b("p", {
199
+ children: J("botlit.store.installed.mode", "Mode")
200
+ }), /* @__PURE__ */ y("p", {
223
201
  className: "font-medium flex items-center gap-1",
224
202
  children: [$(e.mode), e.mode]
225
203
  })] }),
226
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
204
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
227
205
  className: "text-text-secondary",
228
- children: q("botlit.store.installed.installed", "Installed")
229
- }), /* @__PURE__ */ y("p", {
206
+ children: J("botlit.store.installed.installed", "Installed")
207
+ }), /* @__PURE__ */ v("p", {
230
208
  className: "font-medium",
231
- children: p(e.installedAt)
209
+ children: f(e.installedAt)
232
210
  })] })
233
211
  ]
234
212
  }),
235
- o.length > 0 && /* @__PURE__ */ b("div", {
236
- className: "mt-4 pt-4 border-t border-border-subtle",
237
- children: [/* @__PURE__ */ y("p", {
238
- className: "text-xs text-text-secondary mb-2",
239
- children: q("botlit.store.installed.pinnedVersions", "Pinned versions")
240
- }), /* @__PURE__ */ y("div", {
241
- className: "flex gap-2",
242
- children: D.map((t) => {
243
- let n = F(e, t);
244
- return /* @__PURE__ */ b(d, {
245
- variant: n ? "default" : "outline",
246
- className: "text-xs",
247
- children: [
248
- t,
249
- ":",
250
- " ",
251
- n ?? q("botlit.store.installed.notPinnedShort", "not pinned")
252
- ]
253
- }, t);
254
- })
255
- })]
256
- }),
257
- /* @__PURE__ */ b("div", {
213
+ /* @__PURE__ */ y("div", {
258
214
  className: "mt-4 flex justify-end gap-2",
259
215
  children: [
260
- /* @__PURE__ */ b(l, {
216
+ /* @__PURE__ */ y(c, {
261
217
  variant: "ghost",
262
218
  size: "sm",
263
219
  onClick: (e) => {
264
- e.stopPropagation(), O(`store/package/${i}`);
220
+ e.stopPropagation(), D(`store/package/${i}`);
265
221
  },
266
- children: [/* @__PURE__ */ y(me, { className: "h-4 w-4 mr-1" }), q("botlit.store.installed.viewInStore", "View in Store")]
222
+ children: [/* @__PURE__ */ v(C, { className: "h-4 w-4 mr-1" }), J("botlit.store.installed.viewInStore", "View in Store")]
267
223
  }),
268
- a && /* @__PURE__ */ y(c, {
269
- permission: s.STORE_UPDATE,
270
- children: /* @__PURE__ */ b(l, {
224
+ a && /* @__PURE__ */ v(s, {
225
+ permission: o.STORE_UPDATE,
226
+ children: /* @__PURE__ */ y(c, {
271
227
  variant: "outline",
272
228
  size: "sm",
273
229
  onClick: (t) => {
274
- t.stopPropagation(), Me(e);
230
+ t.stopPropagation(), we(e);
275
231
  },
276
- isLoading: we,
277
- children: [/* @__PURE__ */ y(x, { className: "h-4 w-4 mr-1" }), q("botlit.store.installed.update", "Update")]
232
+ isLoading: _e,
233
+ children: [/* @__PURE__ */ v(b, { className: "h-4 w-4 mr-1" }), J("botlit.store.installed.update", "Update")]
278
234
  })
279
235
  }),
280
- /* @__PURE__ */ y(c, {
281
- permission: s.STORE_DELETE,
282
- children: /* @__PURE__ */ y(l, {
236
+ /* @__PURE__ */ v(s, {
237
+ permission: o.STORE_DELETE,
238
+ children: /* @__PURE__ */ v(c, {
283
239
  variant: "ghost",
284
240
  size: "sm",
285
241
  "aria-label": "Uninstall package",
286
242
  className: "text-status-error-text hover:text-status-error-text",
287
243
  onClick: (t) => {
288
- t.stopPropagation(), Z(e);
244
+ t.stopPropagation(), Q(e);
289
245
  },
290
- children: /* @__PURE__ */ y(T, { className: "h-4 w-4" })
246
+ children: /* @__PURE__ */ v(T, { className: "h-4 w-4" })
291
247
  })
292
248
  })
293
249
  ]
@@ -296,173 +252,173 @@ var I = () => {
296
252
  })
297
253
  });
298
254
  };
299
- return ve ? /* @__PURE__ */ y(t, {
300
- title: q("botlit.store.installed.title", "Installed packages"),
301
- description: q("botlit.store.installed.subtitle", "Packages installed from the BotManor Store"),
302
- children: /* @__PURE__ */ y("div", {
255
+ return F ? /* @__PURE__ */ v(t, {
256
+ title: J("botlit.store.installed.title", "Installed packages"),
257
+ description: J("botlit.store.installed.subtitle", "Packages installed from the BotManor Store"),
258
+ children: /* @__PURE__ */ v("div", {
303
259
  className: "space-y-4",
304
260
  children: [
305
261
  1,
306
262
  2,
307
263
  3
308
- ].map((e) => /* @__PURE__ */ y("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
264
+ ].map((e) => /* @__PURE__ */ v("div", { className: "h-48 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
309
265
  })
310
- }) : /* @__PURE__ */ b(t, {
311
- title: q("botlit.store.installed.title", "Installed packages"),
312
- description: q("botlit.store.installed.subtitle", "Packages installed from the BotManor Store"),
313
- actions: /* @__PURE__ */ b("div", {
266
+ }) : /* @__PURE__ */ y(t, {
267
+ title: J("botlit.store.installed.title", "Installed packages"),
268
+ description: J("botlit.store.installed.subtitle", "Packages installed from the BotManor Store"),
269
+ actions: /* @__PURE__ */ y("div", {
314
270
  className: "flex gap-2",
315
- children: [/* @__PURE__ */ y(l, {
271
+ children: [/* @__PURE__ */ v(c, {
316
272
  variant: "outline",
317
- leftIcon: /* @__PURE__ */ y(he, { size: 16 }),
318
- onClick: () => void Ae(),
319
- isLoading: De,
320
- children: q("botlit.store.installed.checkUpdates", "Check updates")
321
- }), /* @__PURE__ */ y(l, {
322
- leftIcon: /* @__PURE__ */ y(w, { size: 16 }),
323
- onClick: () => O("store"),
324
- children: q("botlit.store.installed.browseStore", "Browse Store")
273
+ leftIcon: /* @__PURE__ */ v(fe, { size: 16 }),
274
+ onClick: () => void Se(),
275
+ isLoading: ye,
276
+ children: J("botlit.store.installed.checkUpdates", "Check updates")
277
+ }), /* @__PURE__ */ v(c, {
278
+ leftIcon: /* @__PURE__ */ v(w, { size: 16 }),
279
+ onClick: () => D("store"),
280
+ children: J("botlit.store.installed.browseStore", "Browse Store")
325
281
  })]
326
282
  }),
327
283
  children: [
328
- /* @__PURE__ */ y(v, {
284
+ /* @__PURE__ */ v(ce, {
329
285
  className: "mb-6",
330
- icon: /* @__PURE__ */ y(w, { size: 18 }),
331
- children: q("botlit.store.installed.purpose", "These are the packages this workspace installed from the BotManor Store. See which version each one is on and whether it is linked to the store listing or a forked copy, update linked packages when a newer version is published, and uninstall what you no longer need.")
286
+ icon: /* @__PURE__ */ v(w, { size: 18 }),
287
+ children: J("botlit.store.installed.purpose", "These are the packages this workspace installed from the BotManor Store. See which version each one is on and whether it is linked to the store listing or a forked copy, update linked packages when a newer version is published, and uninstall what you no longer need.")
332
288
  }),
333
- L ? /* @__PURE__ */ y(te, {
289
+ I ? /* @__PURE__ */ v(d, {
334
290
  resource: "installed packages",
335
- error: L,
336
- onRetry: () => void R()
337
- }) : /* @__PURE__ */ b(ue, { children: [
338
- /* @__PURE__ */ b("div", {
291
+ error: I,
292
+ onRetry: () => void L()
293
+ }) : /* @__PURE__ */ y(le, { children: [
294
+ /* @__PURE__ */ y("div", {
339
295
  className: "grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",
340
296
  children: [
341
- /* @__PURE__ */ b(_, {
297
+ /* @__PURE__ */ y(_, {
342
298
  treatment: "glass",
343
299
  glow: !0,
344
300
  className: "p-6 text-center",
345
- children: [/* @__PURE__ */ y("p", {
301
+ children: [/* @__PURE__ */ v("p", {
346
302
  className: "text-3xl font-bold tabular-nums text-text-primary",
347
- children: I.length
348
- }), /* @__PURE__ */ y("p", {
303
+ children: P.length
304
+ }), /* @__PURE__ */ v("p", {
349
305
  className: "text-sm text-text-secondary",
350
- children: q("botlit.store.installed.totalInstalled", "Total installed")
306
+ children: J("botlit.store.installed.totalInstalled", "Total installed")
351
307
  })]
352
308
  }),
353
- /* @__PURE__ */ b(_, {
309
+ /* @__PURE__ */ y(_, {
354
310
  treatment: "metric",
355
311
  className: "p-6 text-center",
356
- children: [/* @__PURE__ */ y("p", {
312
+ children: [/* @__PURE__ */ v("p", {
357
313
  className: "text-3xl font-bold tabular-nums text-text-primary",
358
- children: I.filter((e) => e.mode === "LINKED").length
359
- }), /* @__PURE__ */ y("p", {
314
+ children: P.filter((e) => e.mode === "LINKED").length
315
+ }), /* @__PURE__ */ v("p", {
360
316
  className: "text-sm text-text-secondary",
361
- children: q("botlit.store.installed.linked", "Linked")
317
+ children: J("botlit.store.installed.linked", "Linked")
362
318
  })]
363
319
  }),
364
- /* @__PURE__ */ b(_, {
320
+ /* @__PURE__ */ y(_, {
365
321
  treatment: "metric",
366
322
  className: "p-6 text-center",
367
- children: [/* @__PURE__ */ y("p", {
323
+ children: [/* @__PURE__ */ v("p", {
368
324
  className: "text-3xl font-bold tabular-nums text-text-primary",
369
- children: I.filter((e) => e.mode === "FORKED").length
370
- }), /* @__PURE__ */ y("p", {
325
+ children: P.filter((e) => e.mode === "FORKED").length
326
+ }), /* @__PURE__ */ v("p", {
371
327
  className: "text-sm text-text-secondary",
372
- children: q("botlit.store.installed.forked", "Forked")
328
+ children: J("botlit.store.installed.forked", "Forked")
373
329
  })]
374
330
  }),
375
- /* @__PURE__ */ b(_, {
331
+ /* @__PURE__ */ y(_, {
376
332
  treatment: "metric",
377
333
  className: "p-6 text-center",
378
- children: [/* @__PURE__ */ y("p", {
334
+ children: [/* @__PURE__ */ v("p", {
379
335
  className: "text-3xl font-bold tabular-nums text-text-primary",
380
- children: ke
381
- }), /* @__PURE__ */ y("p", {
336
+ children: xe
337
+ }), /* @__PURE__ */ v("p", {
382
338
  className: "text-sm text-text-secondary",
383
- children: q("botlit.store.installed.updatesAvailable", "Updates available")
339
+ children: J("botlit.store.installed.updatesAvailable", "Updates available")
384
340
  })]
385
341
  })
386
342
  ]
387
343
  }),
388
- /* @__PURE__ */ b("div", {
344
+ /* @__PURE__ */ y("div", {
389
345
  className: "flex flex-col md:flex-row gap-4 mb-6",
390
- children: [/* @__PURE__ */ b("div", {
346
+ children: [/* @__PURE__ */ y("div", {
391
347
  className: "relative flex-1",
392
- children: [/* @__PURE__ */ y(ge, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y(u, {
393
- placeholder: q("botlit.store.installed.searchPlaceholder", "Search packages…"),
394
- value: B,
395
- onChange: (e) => Ee(e.target.value),
348
+ children: [/* @__PURE__ */ v(pe, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ v(l, {
349
+ placeholder: J("botlit.store.installed.searchPlaceholder", "Search packages…"),
350
+ value: V,
351
+ onChange: (e) => ve(e.target.value),
396
352
  className: "pl-9"
397
353
  })]
398
- }), /* @__PURE__ */ y("div", {
354
+ }), /* @__PURE__ */ v("div", {
399
355
  className: "flex gap-2",
400
- children: /* @__PURE__ */ b("select", {
356
+ children: /* @__PURE__ */ y("select", {
401
357
  "aria-label": "Filter by package type",
402
358
  className: "flex h-10 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm",
403
- value: H,
404
- onChange: (e) => Oe(e.target.value),
405
- children: [/* @__PURE__ */ y("option", {
359
+ value: U,
360
+ onChange: (e) => be(e.target.value),
361
+ children: [/* @__PURE__ */ v("option", {
406
362
  value: "all",
407
- children: q("botlit.store.filters.allTypes", "All types")
408
- }), oe.map((e) => /* @__PURE__ */ y("option", {
363
+ children: J("botlit.store.filters.allTypes", "All types")
364
+ }), ae.map((e) => /* @__PURE__ */ v("option", {
409
365
  value: e,
410
- children: J[e] ?? e
366
+ children: Y[e] ?? e
411
367
  }, e))]
412
368
  })
413
369
  })]
414
370
  }),
415
- Y.length > 0 ? /* @__PURE__ */ y("div", {
371
+ X.length > 0 ? /* @__PURE__ */ v("div", {
416
372
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
417
- children: Y.map((e) => /* @__PURE__ */ y(Ne, { pkg: e }, e.id))
418
- }) : /* @__PURE__ */ y(f, {
373
+ children: X.map((e) => /* @__PURE__ */ v(Te, { pkg: e }, e.id))
374
+ }) : /* @__PURE__ */ v(ee, {
419
375
  illustration: "empty-generic",
420
- title: B || H !== "all" ? q("botlit.store.installed.noMatches", "No matching packages") : q("botlit.store.installed.empty", "No packages installed"),
421
- description: B || H !== "all" ? q("botlit.store.installed.noMatchesBody", "Try adjusting your search or type filter.") : q("botlit.store.installed.emptyBody", "Browse the BotManor Store to find agents, skills and tools to install."),
422
- action: /* @__PURE__ */ y(l, {
423
- onClick: () => O("store"),
424
- leftIcon: /* @__PURE__ */ y(pe, { className: "h-4 w-4" }),
425
- children: q("botlit.store.installed.browseStore", "Browse Store")
376
+ title: V || U !== "all" ? J("botlit.store.installed.noMatches", "No matching packages") : J("botlit.store.installed.empty", "No packages installed"),
377
+ description: V || U !== "all" ? J("botlit.store.installed.noMatchesBody", "Try adjusting your search or type filter.") : J("botlit.store.installed.emptyBody", "Browse the BotManor Store to find agents, skills and tools to install."),
378
+ action: /* @__PURE__ */ v(c, {
379
+ onClick: () => D("store"),
380
+ leftIcon: /* @__PURE__ */ v(S, { className: "h-4 w-4" }),
381
+ children: J("botlit.store.installed.browseStore", "Browse Store")
426
382
  })
427
383
  }),
428
- /* @__PURE__ */ y(ee, {
429
- hasMore: ye,
430
- loadingMore: be,
431
- onLoadMore: () => void z(),
432
- loadedCount: I.length
384
+ /* @__PURE__ */ v(te, {
385
+ hasMore: R,
386
+ loadingMore: z,
387
+ onLoadMore: () => void B(),
388
+ loadedCount: P.length
433
389
  })
434
390
  ] }),
435
- /* @__PURE__ */ y(se, {
436
- name: G ? M(G) : null,
437
- version: G?.installedVersion,
438
- uninstalling: Se,
439
- onConfirm: () => void je(),
440
- onClose: () => K(null)
391
+ /* @__PURE__ */ v(oe, {
392
+ name: K ? j(K) : null,
393
+ version: K?.installedVersion,
394
+ uninstalling: he,
395
+ onConfirm: () => void Ce(),
396
+ onClose: () => q(null)
441
397
  }),
442
- X && /* @__PURE__ */ y(({ pkg: e, onClose: t }) => {
443
- let u = N(e), d = A(e), f = e.bindings ?? {};
444
- return /* @__PURE__ */ y("div", {
398
+ Z && /* @__PURE__ */ v(({ pkg: e, onClose: t }) => {
399
+ let l = M(e), u = k(e);
400
+ return /* @__PURE__ */ v("div", {
445
401
  className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50",
446
- children: /* @__PURE__ */ b("div", {
402
+ children: /* @__PURE__ */ y("div", {
447
403
  className: "bg-bg-surface rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[90vh] overflow-y-auto",
448
404
  children: [
449
- /* @__PURE__ */ y("div", {
405
+ /* @__PURE__ */ v("div", {
450
406
  className: "p-6 border-b border-border-subtle",
451
- children: /* @__PURE__ */ b("div", {
407
+ children: /* @__PURE__ */ y("div", {
452
408
  className: "flex items-start justify-between",
453
- children: [/* @__PURE__ */ b("div", {
409
+ children: [/* @__PURE__ */ y("div", {
454
410
  className: "flex items-start gap-3",
455
- children: [/* @__PURE__ */ y("div", {
411
+ children: [/* @__PURE__ */ v("div", {
456
412
  className: "p-3 rounded-lg bg-bg-sunken text-3xl",
457
- children: u.icon
458
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
413
+ children: l.icon
414
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h2", {
459
415
  className: "text-xl font-bold",
460
- children: m(e.package) || d
461
- }), /* @__PURE__ */ y("p", {
416
+ children: p(e.package) || u
417
+ }), /* @__PURE__ */ v("p", {
462
418
  className: "text-sm text-text-secondary font-mono",
463
- children: d
419
+ children: u
464
420
  })] })]
465
- }), /* @__PURE__ */ y(l, {
421
+ }), /* @__PURE__ */ v(c, {
466
422
  variant: "ghost",
467
423
  size: "sm",
468
424
  "aria-label": "Close",
@@ -471,160 +427,103 @@ var I = () => {
471
427
  })]
472
428
  })
473
429
  }),
474
- /* @__PURE__ */ b("div", {
430
+ /* @__PURE__ */ y("div", {
475
431
  className: "p-6 space-y-6",
476
- children: [
477
- /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(a, { children: /* @__PURE__ */ y(o, {
478
- className: "text-base",
479
- children: q("botlit.store.installed.versionInfo", "Version information")
480
- }) }), /* @__PURE__ */ b(r, {
481
- className: "space-y-4",
482
- children: [/* @__PURE__ */ b("div", {
483
- className: "grid grid-cols-2 gap-4",
484
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
485
- className: "text-sm text-text-secondary",
486
- children: q("botlit.store.installed.installedVersion", "Installed version")
487
- }), /* @__PURE__ */ b("p", {
488
- className: "font-mono font-medium",
489
- children: ["v", e.installedVersion]
490
- })] }), e.package && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
491
- className: "text-sm text-text-secondary",
492
- children: q("botlit.store.installed.latestVersion", "Latest version")
493
- }), /* @__PURE__ */ b("p", {
494
- className: "font-mono font-medium",
495
- children: ["v", e.package.version]
496
- })] })]
497
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
498
- className: "text-sm text-text-secondary mb-2",
499
- children: q("botlit.store.installed.installMode", "Installation mode")
500
- }), /* @__PURE__ */ b("div", {
501
- className: "flex items-center gap-2",
502
- children: [
503
- $(e.mode),
504
- /* @__PURE__ */ y("span", {
505
- className: "font-medium",
506
- children: e.mode
507
- }),
508
- /* @__PURE__ */ y("span", {
509
- className: "text-sm text-text-secondary",
510
- children: e.mode === "LINKED" ? q("botlit.store.installed.linkedHint", "Tracks the store listing; update when a newer version is published") : q("botlit.store.installed.forkedHint", "Your own copy; store updates are not offered")
511
- })
512
- ]
432
+ children: [/* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(a, {
433
+ className: "text-base",
434
+ children: J("botlit.store.installed.versionInfo", "Version information")
435
+ }) }), /* @__PURE__ */ y(r, {
436
+ className: "space-y-4",
437
+ children: [/* @__PURE__ */ y("div", {
438
+ className: "grid grid-cols-2 gap-4",
439
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
440
+ className: "text-sm text-text-secondary",
441
+ children: J("botlit.store.installed.installedVersion", "Installed version")
442
+ }), /* @__PURE__ */ y("p", {
443
+ className: "font-mono font-medium",
444
+ children: ["v", e.installedVersion]
445
+ })] }), e.package && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
446
+ className: "text-sm text-text-secondary",
447
+ children: J("botlit.store.installed.latestVersion", "Latest version")
448
+ }), /* @__PURE__ */ y("p", {
449
+ className: "font-mono font-medium",
450
+ children: ["v", e.package.version]
513
451
  })] })]
514
- })] }),
515
- /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ b(o, {
516
- className: "text-base flex items-center gap-2",
517
- children: [/* @__PURE__ */ y(S, { className: "h-4 w-4" }), q("botlit.store.installed.pinsTitle", "Environment version pins")]
518
- }), /* @__PURE__ */ y(i, { children: q("botlit.store.pins.description", "Pins are a record for your release process. Bots do not yet load a different version per environment; every environment runs the installed version.") })] }), /* @__PURE__ */ y(r, { children: /* @__PURE__ */ y("div", {
519
- className: "space-y-3",
520
- children: D.map((t) => {
521
- let n = F(e, t);
522
- return /* @__PURE__ */ b("div", {
523
- className: "flex items-center justify-between p-3 bg-bg-sunken rounded-lg",
524
- children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
525
- className: "font-medium",
526
- children: t
527
- }), /* @__PURE__ */ y("p", {
528
- className: "text-sm text-text-secondary font-mono",
529
- children: n ? `v${n}` : q("botlit.store.installed.notPinned", "Not pinned")
530
- })] }), /* @__PURE__ */ y("div", {
531
- className: "flex gap-2",
532
- children: n ? /* @__PURE__ */ y(c, {
533
- permission: s.STORE_UPDATE,
534
- children: /* @__PURE__ */ y(l, {
535
- variant: "outline",
536
- size: "sm",
537
- onClick: () => void Q(e, t, ""),
538
- children: q("botlit.store.installed.unpin", "Unpin")
539
- })
540
- }) : /* @__PURE__ */ y(c, {
541
- permission: s.STORE_UPDATE,
542
- children: /* @__PURE__ */ y(l, {
543
- variant: "outline",
544
- size: "sm",
545
- onClick: () => void Q(e, t, e.installedVersion),
546
- children: q("botlit.store.installed.pinCurrent", "Pin current")
547
- })
548
- })
549
- })]
550
- }, t);
551
- })
552
- }) })] }),
553
- Object.keys(f).length > 0 && /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ b(a, { children: [/* @__PURE__ */ b(o, {
554
- className: "text-base flex items-center gap-2",
555
- children: [/* @__PURE__ */ y(_e, { className: "h-4 w-4" }), q("botlit.store.installed.bindingsTitle", "Configuration bindings")]
556
- }), /* @__PURE__ */ y(i, { children: q("botlit.store.bindings.description", "Values saved with this installation. They are shown for reference and are not applied to your bots automatically.") })] }), /* @__PURE__ */ y(r, { children: /* @__PURE__ */ y("div", {
557
- className: "space-y-2",
558
- children: Object.entries(f).map(([e, t]) => /* @__PURE__ */ b("div", {
559
- className: "flex justify-between p-2 bg-bg-sunken rounded",
560
- children: [/* @__PURE__ */ y("span", {
561
- className: "font-mono text-sm",
562
- children: e
563
- }), /* @__PURE__ */ y("span", {
564
- className: "font-mono text-sm text-text-secondary",
565
- children: typeof t == "string" ? t : JSON.stringify(t)
566
- })]
567
- }, e))
568
- }) })] }),
569
- /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(a, { children: /* @__PURE__ */ y(o, {
570
- className: "text-base",
571
- children: q("botlit.store.installed.metadata", "Metadata")
572
- }) }), /* @__PURE__ */ y(r, { children: /* @__PURE__ */ b("div", {
573
- className: "grid grid-cols-2 gap-4 text-sm",
452
+ }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
453
+ className: "text-sm text-text-secondary mb-2",
454
+ children: J("botlit.store.installed.installMode", "Installation mode")
455
+ }), /* @__PURE__ */ y("div", {
456
+ className: "flex items-center gap-2",
574
457
  children: [
575
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
576
- className: "text-text-secondary",
577
- children: q("botlit.store.installed.installedAt", "Installed at")
578
- }), /* @__PURE__ */ y("p", {
458
+ $(e.mode),
459
+ /* @__PURE__ */ v("span", {
579
460
  className: "font-medium",
580
- children: p(e.installedAt)
581
- })] }),
582
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
583
- className: "text-text-secondary",
584
- children: q("botlit.store.installed.installedBy", "Installed by")
585
- }), /* @__PURE__ */ y("p", {
586
- className: "font-medium",
587
- children: e.installedBy
588
- })] }),
589
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
590
- className: "text-text-secondary",
591
- children: q("botlit.store.installed.packageId", "Package id")
592
- }), /* @__PURE__ */ y("p", {
593
- className: "font-mono text-xs",
594
- children: e.packageId
595
- })] }),
596
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
597
- className: "text-text-secondary",
598
- children: q("botlit.store.installed.installationId", "Installation id")
599
- }), /* @__PURE__ */ y("p", {
600
- className: "font-mono text-xs",
601
- children: e.id
602
- })] })
461
+ children: e.mode
462
+ }),
463
+ /* @__PURE__ */ v("span", {
464
+ className: "text-sm text-text-secondary",
465
+ children: e.mode === "LINKED" ? J("botlit.store.installed.linkedHint", "Tracks the store listing; update when a newer version is published") : J("botlit.store.installed.forkedHint", "Your own copy; store updates are not offered")
466
+ })
603
467
  ]
604
- }) })] })
605
- ]
468
+ })] })]
469
+ })] }), /* @__PURE__ */ y(n, { children: [/* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(a, {
470
+ className: "text-base",
471
+ children: J("botlit.store.installed.metadata", "Metadata")
472
+ }) }), /* @__PURE__ */ v(r, { children: /* @__PURE__ */ y("div", {
473
+ className: "grid grid-cols-2 gap-4 text-sm",
474
+ children: [
475
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
476
+ className: "text-text-secondary",
477
+ children: J("botlit.store.installed.installedAt", "Installed at")
478
+ }), /* @__PURE__ */ v("p", {
479
+ className: "font-medium",
480
+ children: f(e.installedAt)
481
+ })] }),
482
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
483
+ className: "text-text-secondary",
484
+ children: J("botlit.store.installed.installedBy", "Installed by")
485
+ }), /* @__PURE__ */ v("p", {
486
+ className: "font-medium",
487
+ children: e.installedBy
488
+ })] }),
489
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
490
+ className: "text-text-secondary",
491
+ children: J("botlit.store.installed.packageId", "Package id")
492
+ }), /* @__PURE__ */ v("p", {
493
+ className: "font-mono text-xs",
494
+ children: e.packageId
495
+ })] }),
496
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
497
+ className: "text-text-secondary",
498
+ children: J("botlit.store.installed.installationId", "Installation id")
499
+ }), /* @__PURE__ */ v("p", {
500
+ className: "font-mono text-xs",
501
+ children: e.id
502
+ })] })
503
+ ]
504
+ }) })] })]
606
505
  }),
607
- /* @__PURE__ */ b("div", {
506
+ /* @__PURE__ */ y("div", {
608
507
  className: "p-6 border-t border-border-subtle flex justify-between",
609
- children: [/* @__PURE__ */ y(c, {
610
- permission: s.STORE_DELETE,
611
- children: /* @__PURE__ */ b(l, {
508
+ children: [/* @__PURE__ */ v(s, {
509
+ permission: o.STORE_DELETE,
510
+ children: /* @__PURE__ */ y(c, {
612
511
  variant: "destructive",
613
- onClick: () => Z(e),
614
- children: [/* @__PURE__ */ y(T, { className: "h-4 w-4 mr-2" }), q("botlit.store.installed.uninstall", "Uninstall")]
512
+ onClick: () => Q(e),
513
+ children: [/* @__PURE__ */ v(T, { className: "h-4 w-4 mr-2" }), J("botlit.store.installed.uninstall", "Uninstall")]
615
514
  })
616
- }), /* @__PURE__ */ b("div", {
515
+ }), /* @__PURE__ */ y("div", {
617
516
  className: "flex gap-2",
618
- children: [/* @__PURE__ */ y(de, {
619
- to: k(`store/package/${d}`),
620
- children: /* @__PURE__ */ y(l, {
517
+ children: [/* @__PURE__ */ v(ue, {
518
+ to: O(`store/package/${u}`),
519
+ children: /* @__PURE__ */ v(c, {
621
520
  variant: "outline",
622
- children: q("botlit.store.installed.viewInStore", "View in Store")
521
+ children: J("botlit.store.installed.viewInStore", "View in Store")
623
522
  })
624
- }), /* @__PURE__ */ y(l, {
523
+ }), /* @__PURE__ */ v(c, {
625
524
  variant: "outline",
626
525
  onClick: t,
627
- children: q("botlit.store.installed.close", "Close")
526
+ children: J("botlit.store.installed.close", "Close")
628
527
  })]
629
528
  })]
630
529
  })
@@ -632,12 +531,12 @@ var I = () => {
632
531
  })
633
532
  });
634
533
  }, {
635
- pkg: X,
636
- onClose: () => W(null)
534
+ pkg: Z,
535
+ onClose: () => G(null)
637
536
  })
638
537
  ]
639
538
  });
640
539
  };
641
- export { I as InstalledPackagesPage };
540
+ export { P as InstalledPackagesPage };
642
541
 
643
542
  //# sourceMappingURL=InstalledPackagesPage.js.map