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