@burdenoff/microfe-security 2026.624.1 → 2026.624.2

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