@burdenoff/microfe-security 2026.1113.2 → 2026.1114.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.
@@ -5,3 +5,4 @@ export declare function useCreateSecret(): import('@apollo/client/react').useMut
5
5
  export declare function useDeleteSecret(): import('@apollo/client/react').useMutation.ResultTuple<Types.DeleteSecretMutation, any, import('@apollo/client').ApolloCache, undefined>;
6
6
  export declare function useRotateSecret(): import('@apollo/client/react').useMutation.ResultTuple<Types.RotateSecretMutation, any, import('@apollo/client').ApolloCache, undefined>;
7
7
  export declare function useRollbackSecret(): import('@apollo/client/react').useMutation.ResultTuple<Types.RollbackSecretMutation, any, import('@apollo/client').ApolloCache, undefined>;
8
+ export declare function useUpdateSecret(): import('@apollo/client/react').useMutation.ResultTuple<Types.UpdateSecretMutation, any, import('@apollo/client').ApolloCache, undefined>;
@@ -1,6 +1,6 @@
1
- import { useCreateSecretMutation as e, useDeleteSecretMutation as t, useGetSecretQuery as n, useGetSecretsQuery as r, useRollbackSecretMutation as i, useRotateSecretMutation as a } from "../../generated/wspace-operations.js";
1
+ import { useCreateSecretMutation as e, useDeleteSecretMutation as t, useGetSecretQuery as n, useGetSecretsQuery as r, useRollbackSecretMutation as i, useRotateSecretMutation as a, useUpdateSecretMutation as o } from "../../generated/wspace-operations.js";
2
2
  // src/security/hooks/useSecretQueries.ts
3
- function o(e, t, n) {
3
+ function s(e, t, n) {
4
4
  return r({
5
5
  variables: {
6
6
  vaultId: e ?? "",
@@ -11,25 +11,28 @@ function o(e, t, n) {
11
11
  fetchPolicy: "network-only"
12
12
  });
13
13
  }
14
- function s(e) {
14
+ function c(e) {
15
15
  return n({
16
16
  variables: { id: e ?? "" },
17
17
  skip: !e,
18
18
  fetchPolicy: "network-only"
19
19
  });
20
20
  }
21
- function c() {
22
- return e({ refetchQueries: ["GetSecrets"] });
23
- }
24
21
  function l() {
25
- return t({ refetchQueries: ["GetSecrets"] });
22
+ return e({ refetchQueries: ["GetSecrets"] });
26
23
  }
27
24
  function u() {
28
- return a();
25
+ return t({ refetchQueries: ["GetSecrets"] });
29
26
  }
30
27
  function d() {
28
+ return a({ refetchQueries: ["GetSecretVersions"] });
29
+ }
30
+ function f() {
31
31
  return i();
32
32
  }
33
- export { c as useCreateSecret, l as useDeleteSecret, s as useGetSecret, o as useGetSecrets, d as useRollbackSecret, u as useRotateSecret };
33
+ function p() {
34
+ return o({ refetchQueries: ["GetSecretVersions"] });
35
+ }
36
+ export { l as useCreateSecret, u as useDeleteSecret, c as useGetSecret, s as useGetSecrets, f as useRollbackSecret, d as useRotateSecret, p as useUpdateSecret };
34
37
 
35
38
  //# sourceMappingURL=useSecretQueries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSecretQueries.js","names":["useGetSecrets","useGetSecretsQuery","vaultId","useGetSecret","useGetSecretQuery","id","useCreateSecret","useCreateSecretMutation","useDeleteSecret","useDeleteSecretMutation","useRotateSecret","useRotateSecretMutation","useRollbackSecret","useRollbackSecretMutation"],"sources":["../../../src/security/hooks/useSecretQueries.ts"],"sourcesContent":["import {\n useGetSecretsQuery,\n useGetSecretQuery,\n useCreateSecretMutation,\n useDeleteSecretMutation,\n useRotateSecretMutation,\n useRollbackSecretMutation,\n} from '../../generated/wspace-operations';\nimport type { SecretFilterInput, SecurityPaginationInput } from '../../generated/wspace-types';\n\nexport function useGetSecrets(\n vaultId: string | undefined,\n filter?: SecretFilterInput,\n pagination?: SecurityPaginationInput\n) {\n return useGetSecretsQuery({\n variables: { vaultId: vaultId ?? '', filter, pagination },\n skip: !vaultId,\n fetchPolicy: 'network-only',\n });\n}\n\nexport function useGetSecret(id: string | null) {\n return useGetSecretQuery({\n variables: { id: id ?? '' },\n skip: !id,\n fetchPolicy: 'network-only',\n });\n}\n\nexport function useCreateSecret() {\n return useCreateSecretMutation({\n refetchQueries: ['GetSecrets'],\n });\n}\n\nexport function useDeleteSecret() {\n return useDeleteSecretMutation({\n refetchQueries: ['GetSecrets'],\n });\n}\n\nexport function useRotateSecret() {\n return useRotateSecretMutation();\n}\n\nexport function useRollbackSecret() {\n return useRollbackSecretMutation();\n}\n"],"mappings":";;AAUA,SAAgBA,EACd,GACA,GACA,GACA;CACA,OAAOC,EAAmB;EACxB,WAAW;GAAE,SAASC,KAAW;GAAI;GAAQ;EAAW;EACxD,MAAM,CAACA;EACP,aAAa;CACf,CAAC;AACH;AAEA,SAAgBC,EAAa,GAAmB;CAC9C,OAAOC,EAAkB;EACvB,WAAW,EAAE,IAAIC,KAAM,GAAG;EAC1B,MAAM,CAACA;EACP,aAAa;CACf,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB,EAC7B,gBAAgB,CAAC,YAAY,EAC/B,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB,EAC7B,gBAAgB,CAAC,YAAY,EAC/B,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB;AACjC;AAEA,SAAgBC,IAAoB;CAClC,OAAOC,EAA0B;AACnC"}
1
+ {"version":3,"file":"useSecretQueries.js","names":["useGetSecrets","useGetSecretsQuery","vaultId","useGetSecret","useGetSecretQuery","id","useCreateSecret","useCreateSecretMutation","useDeleteSecret","useDeleteSecretMutation","useRotateSecret","useRotateSecretMutation","useRollbackSecret","useRollbackSecretMutation","useUpdateSecret","useUpdateSecretMutation"],"sources":["../../../src/security/hooks/useSecretQueries.ts"],"sourcesContent":["import {\n useGetSecretsQuery,\n useGetSecretQuery,\n useCreateSecretMutation,\n useDeleteSecretMutation,\n useRotateSecretMutation,\n useUpdateSecretMutation,\n useRollbackSecretMutation,\n} from '../../generated/wspace-operations';\nimport type { SecretFilterInput, SecurityPaginationInput } from '../../generated/wspace-types';\n\nexport function useGetSecrets(\n vaultId: string | undefined,\n filter?: SecretFilterInput,\n pagination?: SecurityPaginationInput\n) {\n return useGetSecretsQuery({\n variables: { vaultId: vaultId ?? '', filter, pagination },\n skip: !vaultId,\n fetchPolicy: 'network-only',\n });\n}\n\nexport function useGetSecret(id: string | null) {\n return useGetSecretQuery({\n variables: { id: id ?? '' },\n skip: !id,\n fetchPolicy: 'network-only',\n });\n}\n\nexport function useCreateSecret() {\n return useCreateSecretMutation({\n refetchQueries: ['GetSecrets'],\n });\n}\n\nexport function useDeleteSecret() {\n return useDeleteSecretMutation({\n refetchQueries: ['GetSecrets'],\n });\n}\n\nexport function useRotateSecret() {\n // The version list refreshes after a rotation too, not only after an update.\n return useRotateSecretMutation({ refetchQueries: ['GetSecretVersions'] });\n}\n\nexport function useRollbackSecret() {\n return useRollbackSecretMutation();\n}\n\nexport function useUpdateSecret() {\n return useUpdateSecretMutation({ refetchQueries: ['GetSecretVersions'] });\n}\n"],"mappings":";;AAWA,SAAgBA,EACd,GACA,GACA,GACA;CACA,OAAOC,EAAmB;EACxB,WAAW;GAAE,SAASC,KAAW;GAAI;GAAQ;EAAW;EACxD,MAAM,CAACA;EACP,aAAa;CACf,CAAC;AACH;AAEA,SAAgBC,EAAa,GAAmB;CAC9C,OAAOC,EAAkB;EACvB,WAAW,EAAE,IAAIC,KAAM,GAAG;EAC1B,MAAM,CAACA;EACP,aAAa;CACf,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB,EAC7B,gBAAgB,CAAC,YAAY,EAC/B,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB,EAC7B,gBAAgB,CAAC,YAAY,EAC/B,CAAC;AACH;AAEA,SAAgBC,IAAkB;CAEhC,OAAOC,EAAwB,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,CAAC;AAC1E;AAEA,SAAgBC,IAAoB;CAClC,OAAOC,EAA0B;AACnC;AAEA,SAAgBC,IAAkB;CAChC,OAAOC,EAAwB,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,CAAC;AAC1E"}
@@ -5,84 +5,93 @@ import { RotationStatusBadge as n } from "../components/RotationStatusBadge.js";
5
5
  import { ConfirmDialog as te } from "../components/ConfirmDialog.js";
6
6
  import { SecretShareDialog as ne } from "../components/SecretShareDialog.js";
7
7
  import { Badge as r, Button as i, Card as a } from "../components/ui.js";
8
- import { useDeleteSecret as re, useGetSecret as ie, useRollbackSecret as ae, useRotateSecret as oe } from "../hooks/useSecretQueries.js";
9
- import { useSecurityEventEmitter as se } from "../hooks/useSecurityEventEmitter.js";
10
- import { useGetSecretVersionsQuery as ce } from "../../generated/wspace-operations.js";
11
- import { useSecretValue as le } from "../hooks/useSecretValue.js";
12
- import { useSecurity as ue } from "../providers/SecurityProvider.js";
13
- import { SecurityPermissionGuard as de } from "../components/SecurityPermissionGuard.js";
8
+ import { useDeleteSecret as re, useGetSecret as ie, useRollbackSecret as ae, useRotateSecret as oe, useUpdateSecret as se } from "../hooks/useSecretQueries.js";
9
+ import { useSecurityEventEmitter as ce } from "../hooks/useSecurityEventEmitter.js";
10
+ import { useGetSecretVersionsQuery as le } from "../../generated/wspace-operations.js";
11
+ import { useSecretValue as ue } from "../hooks/useSecretValue.js";
12
+ import { useSecurity as de } from "../providers/SecurityProvider.js";
13
+ import { SecurityPermissionGuard as fe } from "../components/SecurityPermissionGuard.js";
14
14
  import { cn as o } from "../utils/cn.js";
15
- import { useTr as fe } from "../hooks/useTr.js";
16
- import { useIsFluidgridsVariant as pe } from "../hooks/useSecurityVariant.js";
17
- import { useActorLabel as me } from "../hooks/useActorLabel.js";
18
- import { getRotationStatus as he } from "../utils/rotationStatus.js";
19
- import { nativeConfirm as ge, nativeImpact as _e, nativeNotify as s } from "../../utils/nativeBridge.js";
15
+ import { useTr as pe } from "../hooks/useTr.js";
16
+ import { useIsFluidgridsVariant as me } from "../hooks/useSecurityVariant.js";
17
+ import { useActorLabel as he } from "../hooks/useActorLabel.js";
18
+ import { getRotationStatus as ge } from "../utils/rotationStatus.js";
19
+ import { nativeConfirm as _e, nativeImpact as ve, nativeNotify as s } from "../../utils/nativeBridge.js";
20
20
  import { SECURITY_FEATURE_FLAGS as c } from "../constants/featureFlags.js";
21
- import { useRef as ve, useState as l } from "react";
22
- import { useFeatureFlag as ye, usePermission as u } from "@burdenoff/fe-libs/shared/providers/shell";
23
- import { useNavigate as be, useParams as xe } from "react-router";
21
+ import { useRef as ye, useState as l } from "react";
22
+ import { useFeatureFlag as be, usePermission as u } from "@burdenoff/fe-libs/shared/providers/shell";
23
+ import { useNavigate as xe, useParams as Se } from "react-router";
24
24
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
25
- import { AlertTriangle as Se, ArrowLeft as p, Calendar as Ce, Clock as we, History as m, KeyRound as h, Loader2 as g, RefreshCw as _, Share2 as v, Shield as Te, Trash2 as Ee } from "lucide-react";
26
- import { CTAOverflowMenu as De, Dialog as y, DialogContent as b, DialogHeader as x, DialogTitle as S, GlassCard as C, NextSteps as Oe, OptionalFields as ke, PagePurpose as w, ShowTechnicalDetails as Ae } from "@burdenoff/fe-libs/ui";
25
+ import { AlertTriangle as Ce, ArrowLeft as p, Calendar as we, Clock as Te, History as m, KeyRound as h, Loader2 as g, RefreshCw as _, Share2 as v, Shield as Ee, Trash2 as De } from "lucide-react";
26
+ import { CTAOverflowMenu as Oe, Dialog as y, DialogContent as b, DialogHeader as x, DialogTitle as S, GlassCard as C, NextSteps as ke, OptionalFields as Ae, PagePurpose as je, ShowTechnicalDetails as w } from "@burdenoff/fe-libs/ui";
27
27
  // src/security/pages/SecretDetailPage.tsx
28
28
  function T() {
29
- let { vaultId: T, secretId: E } = xe(), { basePath: D = "/", navigate: O } = ue(), je = me(), Me = be(), k = fe(), A = pe(), { data: Ne, loading: Pe, error: j, refetch: M } = ie(E ?? null), N = Ne?.getSecret, { data: Fe, loading: Ie } = ce({
29
+ let { vaultId: T, secretId: E } = Se(), { basePath: D = "/", navigate: O } = de(), Me = he(), Ne = xe(), k = pe(), A = me(), { data: Pe, loading: Fe, error: j, refetch: M } = ie(E ?? null), N = Pe?.getSecret, { data: Ie, loading: Le } = le({
30
30
  variables: {
31
31
  secretId: E ?? "",
32
32
  pagination: { limit: 50 }
33
33
  },
34
34
  skip: !E,
35
35
  fetchPolicy: "network-only"
36
- }), Le = Fe?.getSecretVersionsPaginated?.items ?? [], { value: Re, reveal: P, hide: ze, loading: F, isRevealed: I } = le(E ?? ""), [Be, { loading: Ve }] = re(), [He, { loading: L }] = oe(), [Ue, { loading: We }] = ae(), { emit: R } = se(), Ge = u("secret:delete"), z = u("secret:update"), B = u("secret:decrypt"), Ke = ye(c.SECRET_ROTATE, !1), V = z && (A || Ke), [qe, H] = l(!1), [Je, U] = l(!1), [Ye, W] = l(!1), G = ve(null), K = () => {
37
- W(!0), requestAnimationFrame(() => G.current?.focus());
38
- }, [Xe, q] = l(!1), [J, Y] = l(""), Ze = (e) => {
39
- O ? O(e) : Me(e);
36
+ }), Re = Ie?.getSecretVersionsPaginated?.items ?? [], { value: ze, reveal: P, hide: Be, loading: Ve, isRevealed: F } = ue(E ?? ""), [He, { loading: Ue }] = re(), [We, { loading: Ge }] = oe(), [Ke, { loading: qe }] = se(), I = Ge || qe, [L, R] = l(null), [Je, { loading: Ye }] = ae(), { emit: z } = ce(), Xe = u("secret:delete"), B = u("secret:update"), V = u("secret:decrypt"), Ze = be(c.SECRET_ROTATE, !1), H = B && (A || Ze), [Qe, U] = l(!1), [$e, W] = l(!1), [et, G] = l(!1), K = ye(null), q = () => {
37
+ R(null), G(!0), requestAnimationFrame(() => K.current?.focus());
38
+ }, [tt, J] = l(!1), [Y, nt] = l(""), rt = (e) => {
39
+ O ? O(e) : Ne(e);
40
40
  }, X = () => {
41
- Ze(`${D}/vaults/${T}`);
41
+ rt(`${D}/vaults/${T}`);
42
42
  }, Z = async () => {
43
43
  if (E) try {
44
- await Be({ variables: { id: E } }), R("secret.deleted", {
44
+ await He({ variables: { id: E } }), z("secret.deleted", {
45
45
  secretId: E,
46
46
  vaultId: T
47
- }), H(!1), s("success"), X();
47
+ }), U(!1), s("success"), X();
48
48
  } catch (e) {
49
49
  console.error("Failed to delete secret:", e), s("error");
50
50
  }
51
- }, Qe = async () => {
52
- _e("medium");
53
- let e = await ge({
51
+ }, it = async () => {
52
+ ve("medium");
53
+ let e = await _e({
54
54
  title: "Delete Secret",
55
55
  message: "Delete this secret? This cannot be undone.",
56
56
  okButtonTitle: "Delete",
57
57
  cancelButtonTitle: "Cancel"
58
58
  });
59
- e === null ? H(!0) : e && await Z();
60
- }, $e = async () => {
61
- if (E && J.trim()) try {
62
- await He({ variables: {
63
- id: E,
64
- newValue: J.trim()
65
- } }), R("secret.rotated", {
66
- secretId: E,
67
- vaultId: T
68
- }), W(!1), Y(""), M();
69
- } catch (e) {
70
- console.error("Failed to rotate secret:", e);
59
+ e === null ? U(!0) : e && await Z();
60
+ }, at = async () => {
61
+ if (E && Y.trim()) {
62
+ R(null);
63
+ try {
64
+ A ? (await Ke({ variables: {
65
+ id: E,
66
+ input: { value: Y.trim() }
67
+ } }), z("secret.updated", {
68
+ secretId: E,
69
+ vaultId: T
70
+ })) : (await We({ variables: {
71
+ id: E,
72
+ newValue: Y.trim()
73
+ } }), z("secret.rotated", {
74
+ secretId: E,
75
+ vaultId: T
76
+ })), G(!1), nt(""), M();
77
+ } catch (e) {
78
+ console.error("Failed to rotate secret:", e), R(e instanceof Error && e.message ? e.message : "");
79
+ }
71
80
  }
72
- }, et = async (e) => {
81
+ }, ot = async (e) => {
73
82
  if (E) try {
74
- await Ue({ variables: {
83
+ await Je({ variables: {
75
84
  id: E,
76
85
  version: e
77
- } }), R("secret.rollback", {
86
+ } }), z("secret.rollback", {
78
87
  secretId: E,
79
88
  vaultId: T
80
- }), M(), q(!1);
89
+ }), M(), J(!1);
81
90
  } catch (e) {
82
91
  console.error("Failed to rollback secret:", e);
83
92
  }
84
93
  };
85
- if (Pe && !N) return /* @__PURE__ */ d(e, {
94
+ if (Fe && !N) return /* @__PURE__ */ d(e, {
86
95
  title: k("security.secretDetail.loading.title", "Loading Secret..."),
87
96
  breadcrumbs: [{
88
97
  label: k("security.common.breadcrumbs.security", "Security"),
@@ -106,7 +115,7 @@ function T() {
106
115
  children: [
107
116
  /* @__PURE__ */ d("div", {
108
117
  className: "p-3 rounded-full bg-status-error-bg/10",
109
- children: /* @__PURE__ */ d(Se, { className: "size-8 text-status-error-text" })
118
+ children: /* @__PURE__ */ d(Ce, { className: "size-8 text-status-error-text" })
110
119
  }),
111
120
  /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
112
121
  className: "text-lg font-bold text-text-primary",
@@ -125,7 +134,7 @@ function T() {
125
134
  })
126
135
  })
127
136
  });
128
- let Q = N.versionCount ?? 0, $ = he(N.expiresAt), tt = je(N.createdBy);
137
+ let Q = N.versionCount ?? 0, $ = ge(N.expiresAt), st = Me(N.createdBy);
129
138
  return /* @__PURE__ */ f(e, {
130
139
  title: N.name,
131
140
  description: N.description ?? k("security.secretDetail.description", "View and manage this secret."),
@@ -142,19 +151,19 @@ function T() {
142
151
  ],
143
152
  actions: (() => {
144
153
  let e = [];
145
- return z && e.push({
154
+ return B && e.push({
146
155
  label: k("security.common.actions.share", "Share"),
147
156
  icon: /* @__PURE__ */ d(v, { className: "size-4" }),
148
- onSelect: () => U(!0)
149
- }), V && e.push({
157
+ onSelect: () => W(!0)
158
+ }), H && e.push({
150
159
  label: k("security.secretDetail.actions.rotate", "Rotate"),
151
160
  icon: /* @__PURE__ */ d(_, { className: "size-4" }),
152
- onSelect: K
153
- }), Ge && e.push({
161
+ onSelect: q
162
+ }), Xe && e.push({
154
163
  label: k("security.common.actions.delete", "Delete"),
155
- icon: /* @__PURE__ */ d(Ee, { className: "size-4" }),
164
+ icon: /* @__PURE__ */ d(De, { className: "size-4" }),
156
165
  intent: "destructive",
157
- onSelect: () => void Qe()
166
+ onSelect: () => void it()
158
167
  }), /* @__PURE__ */ f("div", {
159
168
  className: "flex flex-wrap items-center gap-2",
160
169
  children: [/* @__PURE__ */ f(i, {
@@ -172,41 +181,41 @@ function T() {
172
181
  children: k("security.common.actions.back", "Back")
173
182
  })
174
183
  ]
175
- }), /* @__PURE__ */ d(De, { actions: e })]
184
+ }), /* @__PURE__ */ d(Oe, { actions: e })]
176
185
  });
177
186
  })(),
178
187
  children: [
179
188
  /* @__PURE__ */ f("div", {
180
189
  className: "space-y-6",
181
190
  children: [
182
- /* @__PURE__ */ d(w, {
191
+ /* @__PURE__ */ d(je, {
183
192
  icon: /* @__PURE__ */ d(h, { className: "size-4" }),
184
193
  children: k("security.secretDetail.purpose", "This is a single secret — an encrypted credential such as an API key, password or connection string. Reveal and copy its value when you need it (every reveal is logged), rotate it to a new value while keeping the old one in version history, roll back to a previous version, or share it securely with someone outside this vault.")
185
194
  }),
186
- (B || z) && /* @__PURE__ */ d(Oe, {
195
+ (V || B) && /* @__PURE__ */ d(ke, {
187
196
  storageKey: "security-secret-detail",
188
197
  steps: [
189
- ...B ? [{
198
+ ...V ? [{
190
199
  id: "reveal",
191
200
  label: k("security.secretDetail.next.reveal", "Reveal the value"),
192
201
  description: k("security.secretDetail.next.revealDesc", "Decrypt and copy this secret when you need it."),
193
202
  icon: /* @__PURE__ */ d(h, { className: "size-4" }),
194
- onClick: I ? void 0 : () => void P(),
195
- done: I
203
+ onClick: F ? void 0 : () => void P(),
204
+ done: F
196
205
  }] : [],
197
- ...z && !A ? [{
206
+ ...B && !A ? [{
198
207
  id: "share",
199
208
  label: k("security.secretDetail.next.share", "Share this secret"),
200
209
  description: k("security.secretDetail.next.shareDesc", "Send a confidential, expiring link to someone."),
201
210
  icon: /* @__PURE__ */ d(v, { className: "size-4" }),
202
- onClick: () => U(!0)
211
+ onClick: () => W(!0)
203
212
  }] : [],
204
- ...V && !A ? [{
213
+ ...H && !A ? [{
205
214
  id: "rotate",
206
215
  label: k("security.secretDetail.next.rotate", "Rotate the value"),
207
216
  description: k("security.secretDetail.next.rotateDesc", "Replace the value and keep the old one in history."),
208
217
  icon: /* @__PURE__ */ d(_, { className: "size-4" }),
209
- onClick: K
218
+ onClick: q
210
219
  }] : []
211
220
  ]
212
221
  }),
@@ -244,16 +253,16 @@ function T() {
244
253
  children: [/* @__PURE__ */ d(h, { className: "size-5 text-primary" }), k("security.secretDetail.value.title", "Secret Value")]
245
254
  }), N.expiresAt && /* @__PURE__ */ f("div", {
246
255
  className: "flex items-center gap-1.5 text-xs text-warning",
247
- children: [/* @__PURE__ */ d(Ce, { className: "size-3.5" }), k("security.secretDetail.value.expires", "Expires: {{date}}", { date: new Date(N.expiresAt).toLocaleDateString() })]
256
+ children: [/* @__PURE__ */ d(we, { className: "size-3.5" }), k("security.secretDetail.value.expires", "Expires: {{date}}", { date: new Date(N.expiresAt).toLocaleDateString() })]
248
257
  })]
249
258
  }),
250
259
  /* @__PURE__ */ d(ee, {
251
- value: Re ?? "",
252
- isRevealed: I,
253
- onToggleReveal: B ? () => {
254
- I ? ze() : P();
260
+ value: ze ?? "",
261
+ isRevealed: F,
262
+ onToggleReveal: V ? () => {
263
+ F ? Be() : P();
255
264
  } : void 0,
256
- isLoading: F
265
+ isLoading: Ve
257
266
  }),
258
267
  /* @__PURE__ */ d("p", {
259
268
  className: "text-xs text-text-secondary mt-4 italic",
@@ -303,13 +312,13 @@ function T() {
303
312
  variant: "outline",
304
313
  size: "sm",
305
314
  className: "mt-3",
306
- onClick: () => q(!0),
315
+ onClick: () => J(!0),
307
316
  children: k("security.secretDetail.history.viewFull", "View Full History")
308
317
  })]
309
318
  })]
310
319
  })]
311
320
  }),
312
- A && /* @__PURE__ */ d(ke, {
321
+ A && /* @__PURE__ */ d(Ae, {
313
322
  storageKey: "security.secretDetail.moreDetails",
314
323
  label: k("security.secretDetail.moreDetails", "More details"),
315
324
  children: /* @__PURE__ */ f("div", {
@@ -338,7 +347,7 @@ function T() {
338
347
  })] }), /* @__PURE__ */ d(i, {
339
348
  variant: "outline",
340
349
  size: "sm",
341
- onClick: () => q(!0),
350
+ onClick: () => J(!0),
342
351
  children: k("security.secretDetail.history.viewFull", "View Full History")
343
352
  })]
344
353
  }),
@@ -352,11 +361,11 @@ function T() {
352
361
  " ",
353
362
  /* @__PURE__ */ d("span", {
354
363
  className: "break-all",
355
- children: tt
364
+ children: st
356
365
  })
357
366
  ]
358
367
  }),
359
- /* @__PURE__ */ d(Ae, {
368
+ /* @__PURE__ */ d(w, {
360
369
  copyable: !0,
361
370
  children: [
362
371
  `${k("security.secretDetail.details.keyIdentifier", "Key Identifier")}: ${N.key}`,
@@ -399,7 +408,7 @@ function T() {
399
408
  children: k("security.secretDetail.details.createdAt", "Created At")
400
409
  }), /* @__PURE__ */ f("div", {
401
410
  className: "flex items-center gap-1.5 text-sm mt-1",
402
- children: [/* @__PURE__ */ d(we, { className: "size-3.5" }), new Date(N.createdAt).toLocaleDateString()]
411
+ children: [/* @__PURE__ */ d(Te, { className: "size-3.5" }), new Date(N.createdAt).toLocaleDateString()]
403
412
  })] }),
404
413
  N.lastRotatedAt && !A && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
405
414
  className: "text-xs text-text-secondary",
@@ -415,7 +424,7 @@ function T() {
415
424
  className: "p-6 space-y-4",
416
425
  children: [/* @__PURE__ */ f("h3", {
417
426
  className: "font-bold text-sm text-primary flex items-center gap-2",
418
- children: [/* @__PURE__ */ d(Te, { className: "size-4" }), k("security.secretDetail.security.title", "Security")]
427
+ children: [/* @__PURE__ */ d(Ee, { className: "size-4" }), k("security.secretDetail.security.title", "Security")]
419
428
  }), /* @__PURE__ */ d("p", {
420
429
  className: "text-xs text-text-secondary leading-relaxed",
421
430
  children: k("security.secretDetail.security.description", "This secret is protected by 256-bit encryption. All access is logged and monitored for suspicious activity.")
@@ -426,9 +435,9 @@ function T() {
426
435
  ]
427
436
  }),
428
437
  /* @__PURE__ */ d(y, {
429
- open: Xe,
438
+ open: tt,
430
439
  onOpenChange: (e) => {
431
- e || q(!1);
440
+ e || J(!1);
432
441
  },
433
442
  children: /* @__PURE__ */ f(b, {
434
443
  className: "max-w-2xl border-primary/20 max-h-[80vh] flex flex-col gap-0 p-0",
@@ -446,12 +455,12 @@ function T() {
446
455
  })
447
456
  }), /* @__PURE__ */ d("div", {
448
457
  className: "p-6 overflow-y-auto flex-1",
449
- children: Ie ? /* @__PURE__ */ d("div", {
458
+ children: Le ? /* @__PURE__ */ d("div", {
450
459
  className: "flex justify-center py-8",
451
460
  children: /* @__PURE__ */ d(g, { className: "size-8 animate-spin text-primary/60" })
452
461
  }) : /* @__PURE__ */ d("div", {
453
462
  className: "space-y-4",
454
- children: Le.map((e) => /* @__PURE__ */ d("div", {
463
+ children: Re.map((e) => /* @__PURE__ */ d("div", {
455
464
  className: o("p-4 rounded-lg border", e.version === N.version ? "bg-action-primary-bg/5 border-primary/20" : "bg-bg-surface border-border-subtle"),
456
465
  children: /* @__PURE__ */ f("div", {
457
466
  className: "flex items-center justify-between",
@@ -478,15 +487,15 @@ function T() {
478
487
  className: "text-sm mt-2",
479
488
  children: e.changeReason
480
489
  })
481
- ] }), e.version !== N.version && /* @__PURE__ */ d(de, {
490
+ ] }), e.version !== N.version && /* @__PURE__ */ d(fe, {
482
491
  permission: "secret:update",
483
492
  featureFlagKey: c.SECRET_ROLLBACK,
484
493
  featureFlagDefault: !1,
485
494
  children: /* @__PURE__ */ d(i, {
486
495
  variant: "outline",
487
496
  size: "sm",
488
- onClick: () => et(e.version),
489
- disabled: We,
497
+ onClick: () => ot(e.version),
498
+ disabled: Ye,
490
499
  children: k("security.secretDetail.actions.rollback", "Rollback")
491
500
  })
492
501
  })]
@@ -497,18 +506,18 @@ function T() {
497
506
  })
498
507
  }),
499
508
  /* @__PURE__ */ d(te, {
500
- isOpen: qe,
501
- onClose: () => H(!1),
509
+ isOpen: Qe,
510
+ onClose: () => U(!1),
502
511
  onConfirm: Z,
503
512
  title: k("security.secretDetail.delete.title", "Delete Secret"),
504
513
  description: k("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: N.name }),
505
- confirmLabel: Ve ? k("security.secretDetail.delete.deleting", "Deleting...") : k("security.secretDetail.delete.confirm", "Delete Secret"),
514
+ confirmLabel: Ue ? k("security.secretDetail.delete.deleting", "Deleting...") : k("security.secretDetail.delete.confirm", "Delete Secret"),
506
515
  variant: "destructive"
507
516
  }),
508
517
  /* @__PURE__ */ d(y, {
509
- open: Ye,
518
+ open: et,
510
519
  onOpenChange: (e) => {
511
- e || W(!1);
520
+ e || G(!1);
512
521
  },
513
522
  children: /* @__PURE__ */ d(b, {
514
523
  className: "max-w-md border-primary/20",
@@ -541,25 +550,36 @@ function T() {
541
550
  }), /* @__PURE__ */ d("textarea", {
542
551
  id: "new-secret-value",
543
552
  "aria-label": k("security.secretDetail.rotate.newValue", "New Secret Value"),
544
- ref: G,
545
- value: J,
546
- onChange: (e) => Y(e.target.value),
553
+ ref: K,
554
+ value: Y,
555
+ onChange: (e) => nt(e.target.value),
547
556
  placeholder: k("security.secretDetail.rotate.placeholder", "Enter new secret value..."),
548
557
  rows: 4,
549
558
  className: o("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")
550
559
  })]
551
560
  }),
561
+ L !== null && /* @__PURE__ */ f("div", {
562
+ role: "alert",
563
+ className: "space-y-2",
564
+ children: [/* @__PURE__ */ d("p", {
565
+ className: "text-sm text-status-error-text",
566
+ children: k("security.secretDetail.rotate.failed", "The value could not be updated. Try again.")
567
+ }), L && /* @__PURE__ */ d(w, {
568
+ copyable: !0,
569
+ children: L
570
+ })]
571
+ }),
552
572
  /* @__PURE__ */ f("div", {
553
573
  className: "flex justify-end gap-3 pt-2",
554
574
  children: [/* @__PURE__ */ d(i, {
555
575
  variant: "outline",
556
- onClick: () => W(!1),
557
- disabled: L,
576
+ onClick: () => G(!1),
577
+ disabled: I,
558
578
  children: k("security.common.actions.cancel", "Cancel")
559
579
  }), /* @__PURE__ */ f(i, {
560
- onClick: $e,
561
- disabled: L || !J.trim(),
562
- children: [L ? /* @__PURE__ */ d(g, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(_, { className: "size-4" }), L ? k("security.secretDetail.rotate.loading", "Rotating...") : k("security.secretDetail.rotate.confirm", "Rotate Secret")]
580
+ onClick: at,
581
+ disabled: I || !Y.trim(),
582
+ children: [I ? /* @__PURE__ */ d(g, { className: "size-4 animate-spin" }) : /* @__PURE__ */ d(_, { className: "size-4" }), I ? k("security.secretDetail.rotate.loading", "Rotating...") : k("security.secretDetail.rotate.confirm", "Rotate Secret")]
563
583
  })]
564
584
  })
565
585
  ]
@@ -567,8 +587,8 @@ function T() {
567
587
  })
568
588
  }),
569
589
  T && E && /* @__PURE__ */ d(ne, {
570
- isOpen: Je,
571
- onClose: () => U(!1),
590
+ isOpen: $e,
591
+ onClose: () => W(!1),
572
592
  vaultId: T,
573
593
  secretId: E,
574
594
  name: N.name