@burdenoff/microfe-security 2026.1113.1 → 2026.1113.3

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