@burdenoff/microfe-security 2026.624.2 → 2026.625.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.
@@ -6,49 +6,49 @@ import { Badge as i, Button as a, Card as o } from "../components/ui.js";
6
6
  import { translateWithFallback as ee } from "../utils/i18n.js";
7
7
  import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
8
8
  import { useGetSecretVersionsQuery as ne } from "../../generated/wspace-operations.js";
9
- import { useSecurityEventEmitter as s } from "../hooks/useSecurityEventEmitter.js";
10
- import { useDeleteSecret as re, useGetSecret as ie, useRollbackSecret as c, useRotateSecret as l } from "../hooks/useSecretQueries.js";
11
- import { nativeConfirm as u, nativeImpact as ae, nativeNotify as d } from "../../utils/nativeBridge.js";
12
- import { SecurityPermissionGuard as f } from "../components/SecurityPermissionGuard.js";
13
- import { SecretValueDisplay as oe } from "../components/SecretValueDisplay.js";
14
- import { SecretTypeBadge as se } from "../components/SecretTypeBadge.js";
15
- import { RotationStatusBadge as ce } from "../components/RotationStatusBadge.js";
16
- import { SecretShareDialog as le } from "../components/SecretShareDialog.js";
17
- import { useSecretValue as ue } from "../hooks/useSecretValue.js";
18
- import { useRef as de, useState as p } from "react";
19
- import { usePermission as m } from "@burdenoff/fe-libs/shared/providers/shell";
20
- import { useNavigate as fe, useParams as pe } from "react-router-dom";
9
+ import { useSecurityEventEmitter as re } from "../hooks/useSecurityEventEmitter.js";
10
+ import { useDeleteSecret as ie, useGetSecret as ae, useRollbackSecret as s, useRotateSecret as c } from "../hooks/useSecretQueries.js";
11
+ import { nativeConfirm as l, nativeImpact as u, nativeNotify as d } from "../../utils/nativeBridge.js";
12
+ import { SecurityPermissionGuard as oe } from "../components/SecurityPermissionGuard.js";
13
+ import { SecretValueDisplay as se } from "../components/SecretValueDisplay.js";
14
+ import { SecretTypeBadge as ce } from "../components/SecretTypeBadge.js";
15
+ import { RotationStatusBadge as le } from "../components/RotationStatusBadge.js";
16
+ import { SecretShareDialog as ue } from "../components/SecretShareDialog.js";
17
+ import { useSecretValue as de } from "../hooks/useSecretValue.js";
18
+ import { useRef as fe, useState as f } from "react";
19
+ import { useFeatureFlag as pe, usePermission as p } from "@burdenoff/fe-libs/shared/providers/shell";
20
+ import { useNavigate as me, useParams as m } from "react-router-dom";
21
21
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
22
- import { AlertTriangle as me, ArrowLeft as _, Calendar as he, Clock as v, History as y, KeyRound as ge, Loader2 as b, RefreshCw as x, Share2 as _e, Shield as ve, Trash2 as ye } from "lucide-react";
23
- import { Dialog as S, DialogContent as C, DialogHeader as w, DialogTitle as T } from "@burdenoff/fe-libs/ui";
24
- import { useI18n as E } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { AlertTriangle as he, ArrowLeft as _, Calendar as v, Clock as y, History as b, KeyRound as ge, Loader2 as x, RefreshCw as S, Share2 as _e, Shield as ve, Trash2 as ye } from "lucide-react";
23
+ import { CTAOverflowMenu as be, Dialog as C, DialogContent as w, DialogHeader as T, DialogTitle as E, GlassCard as D } from "@burdenoff/fe-libs/ui";
24
+ import { useI18n as O } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
25
25
  //#region src/security/pages/SecretDetailPage.tsx
26
- function D() {
27
- let { vaultId: D, secretId: O } = pe(), { basePath: k = "/", navigate: A } = e(), { t: j } = E(), M = fe(), { data: N, loading: P, error: F, refetch: I } = ie(O ?? null), L = N?.getSecret, { data: be, loading: xe } = ne({
26
+ function k() {
27
+ let { vaultId: k, secretId: A } = m(), { basePath: j = "/", navigate: M } = e(), { t: N } = O(), xe = me(), { data: Se, loading: Ce, error: P, refetch: F } = ae(A ?? null), I = Se?.getSecret, { data: we, loading: Te } = ne({
28
28
  variables: {
29
- secretId: O ?? "",
29
+ secretId: A ?? "",
30
30
  pagination: { limit: 50 }
31
31
  },
32
- skip: !O,
32
+ skip: !A,
33
33
  fetchPolicy: "network-only"
34
- }), Se = be?.getSecretVersionsPaginated?.items ?? [], { value: Ce, reveal: we, hide: R, loading: Te, isRevealed: z } = ue(O ?? ""), [Ee, { loading: De }] = re(), [Oe, { loading: B }] = l(), [ke, { loading: Ae }] = c(), { emit: V } = s(), je = m("secret:delete"), Me = m("secret:update"), Ne = m("secret:decrypt"), [Pe, H] = p(!1), [Fe, U] = p(!1), [Ie, W] = p(!1), G = de(null), Le = () => {
34
+ }), Ee = we?.getSecretVersionsPaginated?.items ?? [], { value: De, reveal: Oe, hide: ke, loading: L, isRevealed: R } = de(A ?? ""), [Ae, { loading: je }] = ie(), [Me, { loading: z }] = c(), [Ne, { loading: Pe }] = s(), { emit: B } = re(), Fe = p("secret:delete"), V = p("secret:update"), Ie = p("secret:decrypt"), Le = pe(t.SECRET_ROTATE, !1), [Re, H] = f(!1), [ze, U] = f(!1), [Be, W] = f(!1), G = fe(null), Ve = () => {
35
35
  W(!0), requestAnimationFrame(() => G.current?.focus());
36
- }, [Re, K] = p(!1), [q, J] = p(""), Y = (e, t, n) => ee(j, e, t, n), ze = (e) => {
37
- A ? A(e) : M(e);
36
+ }, [He, K] = f(!1), [q, J] = f(""), Y = (e, t, n) => ee(N, e, t, n), Ue = (e) => {
37
+ M ? M(e) : xe(e);
38
38
  }, X = () => {
39
- ze(`${k}/vaults/${D}`);
39
+ Ue(`${j}/vaults/${k}`);
40
40
  }, Z = async () => {
41
- if (O) try {
42
- await Ee({ variables: { id: O } }), V("secret.deleted", {
43
- secretId: O,
44
- vaultId: D
41
+ if (A) try {
42
+ await Ae({ variables: { id: A } }), B("secret.deleted", {
43
+ secretId: A,
44
+ vaultId: k
45
45
  }), H(!1), d("success"), X();
46
46
  } catch (e) {
47
47
  console.error("Failed to delete secret:", e), d("error");
48
48
  }
49
- }, Be = async () => {
50
- ae("medium");
51
- let e = await u({
49
+ }, We = async () => {
50
+ u("medium");
51
+ let e = await l({
52
52
  title: "Delete Secret",
53
53
  message: "Delete this secret? This cannot be undone.",
54
54
  okButtonTitle: "Delete",
@@ -59,47 +59,47 @@ function D() {
59
59
  return;
60
60
  }
61
61
  e && await Z();
62
- }, Ve = async () => {
63
- if (!(!O || !q.trim())) try {
64
- await Oe({ variables: {
65
- id: O,
62
+ }, Ge = async () => {
63
+ if (!(!A || !q.trim())) try {
64
+ await Me({ variables: {
65
+ id: A,
66
66
  newValue: q.trim()
67
- } }), V("secret.rotated", {
68
- secretId: O,
69
- vaultId: D
70
- }), W(!1), J(""), I();
67
+ } }), B("secret.rotated", {
68
+ secretId: A,
69
+ vaultId: k
70
+ }), W(!1), J(""), F();
71
71
  } catch (e) {
72
72
  console.error("Failed to rotate secret:", e);
73
73
  }
74
- }, He = async (e) => {
75
- if (O) try {
76
- await ke({ variables: {
77
- id: O,
74
+ }, Ke = async (e) => {
75
+ if (A) try {
76
+ await Ne({ variables: {
77
+ id: A,
78
78
  version: e
79
- } }), V("secret.rollback", {
80
- secretId: O,
81
- vaultId: D
82
- }), I(), K(!1);
79
+ } }), B("secret.rollback", {
80
+ secretId: A,
81
+ vaultId: k
82
+ }), F(), K(!1);
83
83
  } catch (e) {
84
84
  console.error("Failed to rollback secret:", e);
85
85
  }
86
86
  };
87
- if (P && !L) return /* @__PURE__ */ h(r, {
87
+ if (Ce && !I) return /* @__PURE__ */ h(r, {
88
88
  title: Y("security.secretDetail.loading.title", "Loading Secret..."),
89
89
  breadcrumbs: [{
90
90
  label: Y("security.common.breadcrumbs.security", "Security"),
91
- path: k
91
+ path: j
92
92
  }, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
93
93
  children: /* @__PURE__ */ h("div", {
94
94
  className: "flex items-center justify-center py-20",
95
- children: /* @__PURE__ */ h(b, { className: "size-10 animate-spin text-primary/60" })
95
+ children: /* @__PURE__ */ h(x, { className: "size-10 animate-spin text-primary/60" })
96
96
  })
97
97
  });
98
- if (F || !L) return /* @__PURE__ */ h(r, {
98
+ if (P || !I) return /* @__PURE__ */ h(r, {
99
99
  title: Y("security.common.errorPage.title", "Error"),
100
100
  breadcrumbs: [{
101
101
  label: Y("security.common.breadcrumbs.security", "Security"),
102
- path: k
102
+ path: j
103
103
  }, { label: Y("security.common.breadcrumbs.secret", "Secret") }],
104
104
  children: /* @__PURE__ */ h(o, {
105
105
  className: "p-8 text-center max-w-lg mx-auto mt-10",
@@ -108,14 +108,14 @@ function D() {
108
108
  children: [
109
109
  /* @__PURE__ */ h("div", {
110
110
  className: "p-3 rounded-full bg-status-error-bg/10",
111
- children: /* @__PURE__ */ h(me, { className: "size-8 text-status-error-text" })
111
+ children: /* @__PURE__ */ h(he, { className: "size-8 text-status-error-text" })
112
112
  }),
113
113
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
114
114
  className: "text-lg font-bold text-text-primary",
115
115
  children: Y("security.secretDetail.error.title", "Failed to load secret")
116
116
  }), /* @__PURE__ */ h("p", {
117
117
  className: "text-sm text-text-secondary mt-2",
118
- children: F?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
118
+ children: P?.message ?? Y("security.secretDetail.error.description", "Secret not found or access denied.")
119
119
  })] }),
120
120
  /* @__PURE__ */ g(a, {
121
121
  variant: "outline",
@@ -127,25 +127,39 @@ function D() {
127
127
  })
128
128
  })
129
129
  });
130
- let Q = L.versionCount ?? 0, $ = L.lastRotatedAt ? "healthy" : void 0;
130
+ let Q = I.versionCount ?? 0, $ = I.lastRotatedAt ? "healthy" : void 0;
131
131
  return /* @__PURE__ */ g(r, {
132
- title: L.name,
133
- description: L.description ?? Y("security.secretDetail.description", "View and manage this secret."),
132
+ title: I.name,
133
+ description: I.description ?? Y("security.secretDetail.description", "View and manage this secret."),
134
134
  breadcrumbs: [
135
135
  {
136
136
  label: Y("security.common.breadcrumbs.security", "Security"),
137
- path: k
137
+ path: j
138
138
  },
139
139
  {
140
140
  label: Y("security.common.breadcrumbs.vault", "Vault"),
141
- path: `${k}/vaults/${D}`
141
+ path: `${j}/vaults/${k}`
142
142
  },
143
- { label: L.name }
143
+ { label: I.name }
144
144
  ],
145
- actions: /* @__PURE__ */ g("div", {
146
- className: "flex flex-wrap items-center gap-2",
147
- children: [
148
- /* @__PURE__ */ g(a, {
145
+ actions: (() => {
146
+ let e = [];
147
+ return V && e.push({
148
+ label: Y("security.common.actions.share", "Share"),
149
+ icon: /* @__PURE__ */ h(_e, { className: "size-4" }),
150
+ onSelect: () => U(!0)
151
+ }), V && Le && e.push({
152
+ label: Y("security.secretDetail.actions.rotate", "Rotate"),
153
+ icon: /* @__PURE__ */ h(S, { className: "size-4" }),
154
+ onSelect: Ve
155
+ }), Fe && e.push({
156
+ label: Y("security.common.actions.delete", "Delete"),
157
+ icon: /* @__PURE__ */ h(ye, { className: "size-4" }),
158
+ intent: "destructive",
159
+ onSelect: () => void We()
160
+ }), /* @__PURE__ */ g("div", {
161
+ className: "flex flex-wrap items-center gap-2",
162
+ children: [/* @__PURE__ */ g(a, {
149
163
  variant: "outline",
150
164
  size: "sm",
151
165
  onClick: X,
@@ -160,47 +174,23 @@ function D() {
160
174
  children: Y("security.common.actions.back", "Back")
161
175
  })
162
176
  ]
163
- }),
164
- Me && /* @__PURE__ */ g(a, {
165
- variant: "outline",
166
- size: "sm",
167
- onClick: () => U(!0),
168
- children: [/* @__PURE__ */ h(_e, { className: "size-4" }), Y("security.common.actions.share", "Share")]
169
- }),
170
- /* @__PURE__ */ h(f, {
171
- permission: "secret:update",
172
- featureFlagKey: t.SECRET_ROTATE,
173
- featureFlagDefault: !1,
174
- children: /* @__PURE__ */ g(a, {
175
- variant: "outline",
176
- size: "sm",
177
- onClick: Le,
178
- children: [/* @__PURE__ */ h(x, { className: "size-4" }), Y("security.secretDetail.actions.rotate", "Rotate")]
179
- })
180
- }),
181
- je && /* @__PURE__ */ g(a, {
182
- variant: "outline",
183
- size: "sm",
184
- className: "text-status-error-text hover:bg-status-error-bg/10 border-status-error-border/20",
185
- onClick: () => void Be(),
186
- children: [/* @__PURE__ */ h(ye, { className: "size-4" }), Y("security.common.actions.delete", "Delete")]
187
- })
188
- ]
189
- }),
177
+ }), /* @__PURE__ */ h(be, { actions: e })]
178
+ });
179
+ })(),
190
180
  children: [
191
181
  /* @__PURE__ */ g("div", {
192
182
  className: "space-y-6",
193
183
  children: [/* @__PURE__ */ g("div", {
194
184
  className: "flex flex-wrap items-center gap-3",
195
185
  children: [
196
- /* @__PURE__ */ h(se, { type: L.type }),
197
- $ && /* @__PURE__ */ h(ce, { status: $ }),
186
+ /* @__PURE__ */ h(ce, { type: I.type }),
187
+ $ && /* @__PURE__ */ h(le, { status: $ }),
198
188
  /* @__PURE__ */ h(i, {
199
189
  variant: "outline",
200
190
  className: "bg-bg-surface/50",
201
- children: Y("security.secretDetail.status.label", "Status: {status}", { status: L.status })
191
+ children: Y("security.secretDetail.status.label", "Status: {status}", { status: I.status })
202
192
  }),
203
- L.labels?.map((e) => /* @__PURE__ */ h(i, {
193
+ I.labels?.map((e) => /* @__PURE__ */ h(i, {
204
194
  variant: "outline",
205
195
  className: "border-primary/20 text-primary",
206
196
  children: e.label
@@ -210,26 +200,27 @@ function D() {
210
200
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
211
201
  children: [/* @__PURE__ */ g("div", {
212
202
  className: "md:col-span-2 space-y-6",
213
- children: [/* @__PURE__ */ g(o, {
214
- className: "p-6 shadow-sm border-border-subtle/60",
203
+ children: [/* @__PURE__ */ g(D, {
204
+ treatment: "glass",
205
+ className: "p-6",
215
206
  children: [
216
207
  /* @__PURE__ */ g("div", {
217
208
  className: "flex items-center justify-between mb-4",
218
209
  children: [/* @__PURE__ */ g("h2", {
219
210
  className: "text-lg font-bold text-text-primary flex items-center gap-2",
220
211
  children: [/* @__PURE__ */ h(ge, { className: "size-5 text-primary" }), Y("security.secretDetail.value.title", "Secret Value")]
221
- }), L.expiresAt && /* @__PURE__ */ g("div", {
212
+ }), I.expiresAt && /* @__PURE__ */ g("div", {
222
213
  className: "flex items-center gap-1.5 text-xs text-warning",
223
- children: [/* @__PURE__ */ h(he, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(L.expiresAt).toLocaleDateString() })]
214
+ children: [/* @__PURE__ */ h(v, { className: "size-3.5" }), Y("security.secretDetail.value.expires", "Expires: {date}", { date: new Date(I.expiresAt).toLocaleDateString() })]
224
215
  })]
225
216
  }),
226
- /* @__PURE__ */ h(oe, {
227
- value: Ce ?? "",
228
- isRevealed: z,
229
- onToggleReveal: Ne ? () => {
230
- z ? R() : we();
217
+ /* @__PURE__ */ h(se, {
218
+ value: De ?? "",
219
+ isRevealed: R,
220
+ onToggleReveal: Ie ? () => {
221
+ R ? ke() : Oe();
231
222
  } : void 0,
232
- isLoading: Te
223
+ isLoading: L
233
224
  }),
234
225
  /* @__PURE__ */ h("p", {
235
226
  className: "text-xs text-text-secondary mt-4 italic",
@@ -242,7 +233,7 @@ function D() {
242
233
  className: "flex items-center justify-between mb-6",
243
234
  children: [/* @__PURE__ */ g("h2", {
244
235
  className: "text-lg font-bold text-text-primary flex items-center gap-2",
245
- children: [/* @__PURE__ */ h(y, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
236
+ children: [/* @__PURE__ */ h(b, { className: "size-5 text-primary" }), Y("security.secretDetail.history.title", "Version History")]
246
237
  }), /* @__PURE__ */ h(i, {
247
238
  variant: "outline",
248
239
  className: "bg-bg-sunken font-mono",
@@ -255,14 +246,14 @@ function D() {
255
246
  children: [/* @__PURE__ */ g("div", {
256
247
  className: "flex items-center gap-3",
257
248
  children: [/* @__PURE__ */ g("div", {
258
- className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold",
259
- children: ["v", L.version ?? Q]
249
+ className: "size-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-primary text-xs font-bold tabular-nums",
250
+ children: ["v", I.version ?? Q]
260
251
  }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
261
252
  className: "text-sm font-semibold",
262
253
  children: Y("security.secretDetail.history.currentVersion", "Current Active Version")
263
254
  }), /* @__PURE__ */ h("p", {
264
255
  className: "text-xs text-text-secondary",
265
- children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(L.updatedAt).toLocaleString() })
256
+ children: Y("security.secretDetail.history.lastUpdated", "Last updated {date}", { date: new Date(I.updatedAt).toLocaleString() })
266
257
  })] })]
267
258
  }), /* @__PURE__ */ h(i, {
268
259
  variant: "success",
@@ -299,33 +290,34 @@ function D() {
299
290
  children: Y("security.secretDetail.details.keyIdentifier", "Key Identifier")
300
291
  }), /* @__PURE__ */ h("code", {
301
292
  className: "text-xs font-mono bg-bg-sunken px-1.5 py-0.5 rounded block mt-1 overflow-hidden text-ellipsis whitespace-nowrap",
302
- children: L.key
293
+ children: I.key
303
294
  })] }),
304
295
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
305
296
  className: "text-xs text-text-secondary",
306
297
  children: Y("security.secretDetail.details.createdBy", "Created By")
307
298
  }), /* @__PURE__ */ h("p", {
308
299
  className: "text-sm font-medium mt-1",
309
- children: L.createdBy
300
+ children: I.createdBy
310
301
  })] }),
311
302
  /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
312
303
  className: "text-xs text-text-secondary",
313
304
  children: Y("security.secretDetail.details.createdAt", "Created At")
314
305
  }), /* @__PURE__ */ g("div", {
315
306
  className: "flex items-center gap-1.5 text-sm mt-1",
316
- children: [/* @__PURE__ */ h(v, { className: "size-3.5" }), new Date(L.createdAt).toLocaleDateString()]
307
+ children: [/* @__PURE__ */ h(y, { className: "size-3.5" }), new Date(I.createdAt).toLocaleDateString()]
317
308
  })] }),
318
- L.lastRotatedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
309
+ I.lastRotatedAt && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("p", {
319
310
  className: "text-xs text-text-secondary",
320
311
  children: Y("security.secretDetail.details.lastRotation", "Last Rotation")
321
312
  }), /* @__PURE__ */ h("p", {
322
313
  className: "text-sm mt-1",
323
- children: new Date(L.lastRotatedAt).toLocaleString()
314
+ children: new Date(I.lastRotatedAt).toLocaleString()
324
315
  })] })
325
316
  ]
326
317
  })]
327
- }), /* @__PURE__ */ g(o, {
328
- className: "p-6 shadow-sm border-border-subtle/60 space-y-4 bg-action-primary-bg/5 border-primary/10",
318
+ }), /* @__PURE__ */ g(D, {
319
+ treatment: "insight",
320
+ className: "p-6 space-y-4",
329
321
  children: [/* @__PURE__ */ g("h3", {
330
322
  className: "font-bold text-sm text-primary flex items-center gap-2",
331
323
  children: [/* @__PURE__ */ h(ve, { className: "size-4" }), Y("security.secretDetail.security.title", "Security")]
@@ -337,34 +329,34 @@ function D() {
337
329
  })]
338
330
  })]
339
331
  }),
340
- /* @__PURE__ */ h(S, {
341
- open: Re,
332
+ /* @__PURE__ */ h(C, {
333
+ open: He,
342
334
  onOpenChange: (e) => {
343
335
  e || K(!1);
344
336
  },
345
- children: /* @__PURE__ */ g(C, {
337
+ children: /* @__PURE__ */ g(w, {
346
338
  className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
347
- children: [/* @__PURE__ */ h(w, {
339
+ children: [/* @__PURE__ */ h(T, {
348
340
  className: "p-6 border-b border-border-subtle text-left",
349
341
  children: /* @__PURE__ */ g("div", {
350
342
  className: "flex items-center gap-3",
351
343
  children: [/* @__PURE__ */ h("div", {
352
344
  className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
353
- children: /* @__PURE__ */ h(y, { className: "size-5" })
354
- }), /* @__PURE__ */ h(T, {
345
+ children: /* @__PURE__ */ h(b, { className: "size-5" })
346
+ }), /* @__PURE__ */ h(E, {
355
347
  className: "text-xl font-bold",
356
348
  children: Y("security.secretDetail.history.modalTitle", "Version History")
357
349
  })]
358
350
  })
359
351
  }), /* @__PURE__ */ h("div", {
360
352
  className: "p-6 overflow-y-auto flex-1",
361
- children: xe ? /* @__PURE__ */ h("div", {
353
+ children: Te ? /* @__PURE__ */ h("div", {
362
354
  className: "flex justify-center py-8",
363
- children: /* @__PURE__ */ h(b, { className: "size-8 animate-spin text-primary/60" })
355
+ children: /* @__PURE__ */ h(x, { className: "size-8 animate-spin text-primary/60" })
364
356
  }) : /* @__PURE__ */ h("div", {
365
357
  className: "space-y-4",
366
- children: Se.map((e) => /* @__PURE__ */ h("div", {
367
- className: n("p-4 rounded-lg border", e.version === L.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
358
+ children: Ee.map((e) => /* @__PURE__ */ h("div", {
359
+ className: n("p-4 rounded-lg border", e.version === I.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
368
360
  children: /* @__PURE__ */ g("div", {
369
361
  className: "flex items-center justify-between",
370
362
  children: [/* @__PURE__ */ g("div", { children: [
@@ -373,7 +365,7 @@ function D() {
373
365
  children: [/* @__PURE__ */ h("span", {
374
366
  className: "font-semibold",
375
367
  children: Y("security.secretDetail.history.versionLabel", "Version {version}", { version: e.version })
376
- }), e.version === L.version && /* @__PURE__ */ h(i, {
368
+ }), e.version === I.version && /* @__PURE__ */ h(i, {
377
369
  variant: "success",
378
370
  className: "text-[10px] uppercase",
379
371
  children: Y("security.common.status.active", "Active")
@@ -390,15 +382,15 @@ function D() {
390
382
  className: "text-sm mt-2",
391
383
  children: e.changeReason
392
384
  })
393
- ] }), e.version !== L.version && /* @__PURE__ */ h(f, {
385
+ ] }), e.version !== I.version && /* @__PURE__ */ h(oe, {
394
386
  permission: "secret:update",
395
387
  featureFlagKey: t.SECRET_ROLLBACK,
396
388
  featureFlagDefault: !1,
397
389
  children: /* @__PURE__ */ h(a, {
398
390
  variant: "outline",
399
391
  size: "sm",
400
- onClick: () => He(e.version),
401
- disabled: Ae,
392
+ onClick: () => Ke(e.version),
393
+ disabled: Pe,
402
394
  children: Y("security.secretDetail.actions.rollback", "Rollback")
403
395
  })
404
396
  })]
@@ -409,32 +401,32 @@ function D() {
409
401
  })
410
402
  }),
411
403
  /* @__PURE__ */ h(te, {
412
- isOpen: Pe,
404
+ isOpen: Re,
413
405
  onClose: () => H(!1),
414
406
  onConfirm: Z,
415
407
  title: Y("security.secretDetail.delete.title", "Delete Secret"),
416
- description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: L.name }),
417
- confirmLabel: De ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
408
+ description: Y("security.secretDetail.delete.description", "Are you sure you want to delete \"{name}\"? This action cannot be undone and will permanently remove this secret from the vault.", { name: I.name }),
409
+ confirmLabel: je ? Y("security.secretDetail.delete.deleting", "Deleting...") : Y("security.secretDetail.delete.confirm", "Delete Secret"),
418
410
  variant: "destructive"
419
411
  }),
420
- /* @__PURE__ */ h(S, {
421
- open: Ie,
412
+ /* @__PURE__ */ h(C, {
413
+ open: Be,
422
414
  onOpenChange: (e) => {
423
415
  e || W(!1);
424
416
  },
425
- children: /* @__PURE__ */ h(C, {
417
+ children: /* @__PURE__ */ h(w, {
426
418
  className: "max-w-md border-primary/20",
427
419
  children: /* @__PURE__ */ g("div", {
428
420
  className: "space-y-4",
429
421
  children: [
430
- /* @__PURE__ */ h(w, {
422
+ /* @__PURE__ */ h(T, {
431
423
  className: "text-left",
432
424
  children: /* @__PURE__ */ g("div", {
433
425
  className: "flex items-center gap-3",
434
426
  children: [/* @__PURE__ */ h("div", {
435
427
  className: "p-2 rounded-full bg-action-primary-bg/10 text-primary",
436
- children: /* @__PURE__ */ h(x, { className: "size-5" })
437
- }), /* @__PURE__ */ h(T, {
428
+ children: /* @__PURE__ */ h(S, { className: "size-5" })
429
+ }), /* @__PURE__ */ h(E, {
438
430
  className: "text-xl font-bold",
439
431
  children: Y("security.secretDetail.rotate.title", "Rotate Secret")
440
432
  })]
@@ -442,7 +434,7 @@ function D() {
442
434
  }),
443
435
  /* @__PURE__ */ h("p", {
444
436
  className: "text-sm text-text-secondary",
445
- children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: L.name })
437
+ children: Y("security.secretDetail.rotate.description", "Enter a new value for {name}. The current value will be moved to version history.", { name: I.name })
446
438
  }),
447
439
  /* @__PURE__ */ g("div", {
448
440
  className: "space-y-2",
@@ -466,29 +458,29 @@ function D() {
466
458
  children: [/* @__PURE__ */ h(a, {
467
459
  variant: "outline",
468
460
  onClick: () => W(!1),
469
- disabled: B,
461
+ disabled: z,
470
462
  children: Y("security.common.actions.cancel", "Cancel")
471
463
  }), /* @__PURE__ */ g(a, {
472
- onClick: Ve,
473
- disabled: B || !q.trim(),
474
- children: [B ? /* @__PURE__ */ h(b, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(x, { className: "size-4" }), B ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
464
+ onClick: Ge,
465
+ disabled: z || !q.trim(),
466
+ children: [z ? /* @__PURE__ */ h(x, { className: "size-4 animate-spin" }) : /* @__PURE__ */ h(S, { className: "size-4" }), z ? Y("security.secretDetail.rotate.loading", "Rotating...") : Y("security.secretDetail.rotate.confirm", "Rotate Secret")]
475
467
  })]
476
468
  })
477
469
  ]
478
470
  })
479
471
  })
480
472
  }),
481
- D && O && /* @__PURE__ */ h(le, {
482
- isOpen: Fe,
473
+ k && A && /* @__PURE__ */ h(ue, {
474
+ isOpen: ze,
483
475
  onClose: () => U(!1),
484
- vaultId: D,
485
- secretId: O,
486
- name: L.name
476
+ vaultId: k,
477
+ secretId: A,
478
+ name: I.name
487
479
  })
488
480
  ]
489
481
  });
490
482
  }
491
483
  //#endregion
492
- export { D as SecretDetailPage };
484
+ export { k as SecretDetailPage };
493
485
 
494
486
  //# sourceMappingURL=SecretDetailPage.js.map