@coffre/ui 0.0.0 → 0.1.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 (168) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -3
  3. package/dist/client/.assetsignore +2 -0
  4. package/dist/client/_coffre/assets/account-C3Zo1l5A.js +1 -0
  5. package/dist/client/_coffre/assets/account-C4bNbeO7.js +2 -0
  6. package/dist/client/_coffre/assets/affordances-DiuJIiR2.js +1 -0
  7. package/dist/client/_coffre/assets/audit-1xLyuxGz.js +2 -0
  8. package/dist/client/_coffre/assets/audit-Dab2GuRj.js +1 -0
  9. package/dist/client/_coffre/assets/auth.device-BfCfeBWe.js +2 -0
  10. package/dist/client/_coffre/assets/auth.device-D2pCLF-X.js +1 -0
  11. package/dist/client/_coffre/assets/coffre-C7qL3HGR.js +1 -0
  12. package/dist/client/_coffre/assets/directory-C2Ou4SQv.js +1 -0
  13. package/dist/client/_coffre/assets/globals-Dgq4Jy0x.css +1 -0
  14. package/dist/client/_coffre/assets/grants-fqTtJ-aW.js +1 -0
  15. package/dist/client/_coffre/assets/index-BpGwbjmM.js +12 -0
  16. package/dist/client/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
  17. package/dist/client/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
  18. package/dist/client/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
  19. package/dist/client/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
  20. package/dist/client/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
  21. package/dist/client/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
  22. package/dist/client/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
  23. package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  24. package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  25. package/dist/client/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  26. package/dist/client/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  27. package/dist/client/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  28. package/dist/client/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  29. package/dist/client/_coffre/assets/login-CR9CBXlw.js +2 -0
  30. package/dist/client/_coffre/assets/login-DZizFxa4.js +1 -0
  31. package/dist/client/_coffre/assets/offboarding-DOLJQcXU.js +1 -0
  32. package/dist/client/_coffre/assets/page-BxW2MwaX.js +1 -0
  33. package/dist/client/_coffre/assets/preload-helper-BHuP8_FL.js +46 -0
  34. package/dist/client/_coffre/assets/principal-page-xnBZVURr.js +1 -0
  35. package/dist/client/_coffre/assets/project-environments-CfIH5kFM.js +1 -0
  36. package/dist/client/_coffre/assets/projects._project._environment-CrWjQmIA.js +2 -0
  37. package/dist/client/_coffre/assets/projects._project._environment-CwRVG9Ne.js +3 -0
  38. package/dist/client/_coffre/assets/projects._project.index-CCDEuE-z.js +2 -0
  39. package/dist/client/_coffre/assets/projects._project.index-DCJsmnD7.js +1 -0
  40. package/dist/client/_coffre/assets/projects.index-B8eV8JIn.js +1 -0
  41. package/dist/client/_coffre/assets/projects.index-BNEC7Oz8.js +2 -0
  42. package/dist/client/_coffre/assets/settings-2BPsenNM.js +2 -0
  43. package/dist/client/_coffre/assets/settings-BrS0-wEt.js +1 -0
  44. package/dist/client/_coffre/assets/signin-errors-CroZWZgm.js +1 -0
  45. package/dist/client/_coffre/assets/tokens._token-B3-YwuKp.js +2 -0
  46. package/dist/client/_coffre/assets/tokens._token-D_hsbHx6.js +1 -0
  47. package/dist/client/_coffre/assets/tokens.index-BdKE2Jv8.js +2 -0
  48. package/dist/client/_coffre/assets/tokens.index-XvA4XRxh.js +1 -0
  49. package/dist/client/_coffre/assets/unregistered-CTRMtBIy.js +1 -0
  50. package/dist/client/_coffre/assets/use-action-DgAf-tiX.js +1 -0
  51. package/dist/client/_coffre/assets/users._user-BFPXcJ4y.js +2 -0
  52. package/dist/client/_coffre/assets/users._user-DEtMeSoh.js +1 -0
  53. package/dist/client/_coffre/assets/users.index-B03beUHq.js +1 -0
  54. package/dist/client/_coffre/assets/users.index-D8hwzM6P.js +2 -0
  55. package/dist/client/_coffre/assets/validation-9Cl_XS-l.js +1 -0
  56. package/dist/index.d.ts +19 -0
  57. package/dist/server/.vite/manifest.json +572 -0
  58. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-B6CZDfrB.js +133 -0
  59. package/dist/server/_coffre/assets/account-B71_b5xc.js +296 -0
  60. package/dist/server/_coffre/assets/account-BoO6ZqMc.js +176 -0
  61. package/dist/server/_coffre/assets/affordances-BNaXjMOb.js +46 -0
  62. package/dist/server/_coffre/assets/async-local-storage-C0cwgkEr.js +3107 -0
  63. package/dist/server/_coffre/assets/audit-CwRFnSAY.js +74 -0
  64. package/dist/server/_coffre/assets/audit-t1sYjtrf.js +964 -0
  65. package/dist/server/_coffre/assets/auth.device-1IcJ475s.js +208 -0
  66. package/dist/server/_coffre/assets/auth.device-CJwZYYtn.js +29 -0
  67. package/dist/server/_coffre/assets/coffre-1hxT2E_U.js +278 -0
  68. package/dist/server/_coffre/assets/directory-wm_JQUfk.js +396 -0
  69. package/dist/server/_coffre/assets/empty-plugin-adapters-Cq4--YW-.js +5 -0
  70. package/dist/server/_coffre/assets/globals-Dgq4Jy0x.css +1 -0
  71. package/dist/server/_coffre/assets/grants-BmhEY1vz.js +243 -0
  72. package/dist/server/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
  73. package/dist/server/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
  74. package/dist/server/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
  75. package/dist/server/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
  76. package/dist/server/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
  77. package/dist/server/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
  78. package/dist/server/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
  79. package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
  80. package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  81. package/dist/server/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  82. package/dist/server/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  83. package/dist/server/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  84. package/dist/server/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  85. package/dist/server/_coffre/assets/login-B5O5LPXV.js +100 -0
  86. package/dist/server/_coffre/assets/login-Bvc4gp0X.js +22 -0
  87. package/dist/server/_coffre/assets/offboarding-CvSilnSm.js +330 -0
  88. package/dist/server/_coffre/assets/page-BjXk0Ehu.js +2003 -0
  89. package/dist/server/_coffre/assets/principal-page-DkwNGzM2.js +617 -0
  90. package/dist/server/_coffre/assets/project-environments-lEzFHUt4.js +9 -0
  91. package/dist/server/_coffre/assets/projects._project._environment-7grhqlgq.js +2227 -0
  92. package/dist/server/_coffre/assets/projects._project._environment-ByEf6pmz.js +55 -0
  93. package/dist/server/_coffre/assets/projects._project.index-B1bjowP-.js +932 -0
  94. package/dist/server/_coffre/assets/projects._project.index-DU8wtoHD.js +22 -0
  95. package/dist/server/_coffre/assets/projects.index-B0DoHbCz.js +280 -0
  96. package/dist/server/_coffre/assets/projects.index-kMDA6pMy.js +54 -0
  97. package/dist/server/_coffre/assets/react-dom-qCTiwGGR.js +1352 -0
  98. package/dist/server/_coffre/assets/router-ChU_CwCX.js +2028 -0
  99. package/dist/server/_coffre/assets/settings-CM9-h7in.js +18 -0
  100. package/dist/server/_coffre/assets/settings-Cg5qOGij.js +60 -0
  101. package/dist/server/_coffre/assets/signin-errors-BEFlVDbQ.js +28 -0
  102. package/dist/server/_coffre/assets/start-DR3rN0St.js +4 -0
  103. package/dist/server/_coffre/assets/tokens._token-CCpaPMAk.js +268 -0
  104. package/dist/server/_coffre/assets/tokens._token-Di4OZdAA.js +18 -0
  105. package/dist/server/_coffre/assets/tokens.index-Do3OHR31.js +34 -0
  106. package/dist/server/_coffre/assets/tokens.index-tDKq4AFh.js +10 -0
  107. package/dist/server/_coffre/assets/ui-BNzhIAQP.js +15710 -0
  108. package/dist/server/_coffre/assets/unregistered-BqaWYFJK.js +51 -0
  109. package/dist/server/_coffre/assets/use-action-BkJXC5JM.js +953 -0
  110. package/dist/server/_coffre/assets/useStore-DWGPqzXR.js +892 -0
  111. package/dist/server/_coffre/assets/users._user-BenYva93.js +15 -0
  112. package/dist/server/_coffre/assets/users._user-Cp039Va-.js +10 -0
  113. package/dist/server/_coffre/assets/users.index-BrzG1Ecq.js +10 -0
  114. package/dist/server/_coffre/assets/users.index-DQ_45DQl.js +34 -0
  115. package/dist/server/_coffre/assets/validation-BQtqPe2V.js +27 -0
  116. package/dist/server/index.js +13910 -0
  117. package/package.json +58 -5
  118. package/src/components/affordances.ts +80 -0
  119. package/src/components/agentation.tsx +34 -0
  120. package/src/components/command-palette.tsx +271 -0
  121. package/src/components/directory.tsx +448 -0
  122. package/src/components/grants.tsx +204 -0
  123. package/src/components/icons.tsx +283 -0
  124. package/src/components/offboarding.tsx +286 -0
  125. package/src/components/page.tsx +128 -0
  126. package/src/components/principal-page.tsx +549 -0
  127. package/src/components/principal-picker.tsx +168 -0
  128. package/src/components/principal.tsx +53 -0
  129. package/src/components/route-states.tsx +60 -0
  130. package/src/components/service-tokens.tsx +212 -0
  131. package/src/components/shell.tsx +641 -0
  132. package/src/components/syncs.tsx +581 -0
  133. package/src/components/theme.tsx +141 -0
  134. package/src/components/tile.tsx +22 -0
  135. package/src/components/ui.tsx +440 -0
  136. package/src/entry.ts +19 -0
  137. package/src/lib/access-plan.ts +201 -0
  138. package/src/lib/audit-sentences.ts +468 -0
  139. package/src/lib/capabilities.ts +45 -0
  140. package/src/lib/coffre.ts +57 -0
  141. package/src/lib/project-access.ts +95 -0
  142. package/src/lib/project-environments.ts +23 -0
  143. package/src/lib/reveal.ts +21 -0
  144. package/src/lib/secret-edit-batch.ts +181 -0
  145. package/src/lib/signin-errors.ts +33 -0
  146. package/src/lib/use-action.ts +50 -0
  147. package/src/lib/validation.ts +27 -0
  148. package/src/routeTree.gen.ts +367 -0
  149. package/src/router.tsx +84 -0
  150. package/src/routes/__root.tsx +192 -0
  151. package/src/routes/access.tsx +11 -0
  152. package/src/routes/account.tsx +359 -0
  153. package/src/routes/audit.tsx +545 -0
  154. package/src/routes/auth.device.tsx +200 -0
  155. package/src/routes/index.tsx +15 -0
  156. package/src/routes/login.tsx +129 -0
  157. package/src/routes/projects.$project.$environment.tsx +1659 -0
  158. package/src/routes/projects.$project.index.tsx +917 -0
  159. package/src/routes/projects.index.tsx +353 -0
  160. package/src/routes/settings.tsx +72 -0
  161. package/src/routes/tokens.$token.tsx +35 -0
  162. package/src/routes/tokens.index.tsx +37 -0
  163. package/src/routes/unregistered.tsx +59 -0
  164. package/src/routes/users.$user.tsx +13 -0
  165. package/src/routes/users.index.tsx +37 -0
  166. package/src/shared/models.ts +55 -0
  167. package/src/styles/globals.css +4118 -0
  168. package/src/types.ts +21 -0
@@ -0,0 +1,330 @@
1
+ import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
+ import { E as Link, i as EmptyState, l as Timestamp, s as Notice } from "./ui-BNzhIAQP.js";
3
+ import { C as Key, J as SyncMark, Z as User, f as ChevronRight, t as Card } from "./page-BjXk0Ehu.js";
4
+ import { c as PrincipalLink } from "./directory-wm_JQUfk.js";
5
+ //#region src/components/offboarding.tsx
6
+ var import_jsx_runtime = require_jsx_runtime();
7
+ /**
8
+ * The part of a user's or token's page that answers "if they left, what would
9
+ * we have to change?". Owners only, and most useful once someone is removed:
10
+ * everything that let them in is gone by then, but what they saw is not.
11
+ */
12
+ function PrincipalReportCards({ report }) {
13
+ const removed = report.status === "removed";
14
+ const person = report.principalType === "user";
15
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
16
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SeenValues, {
17
+ report,
18
+ removed,
19
+ person
20
+ }),
21
+ report.syncs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CreatedSyncs, {
22
+ report,
23
+ person
24
+ }),
25
+ report.issuedTokens.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IssuedTokens, { report })
26
+ ] });
27
+ }
28
+ function RemovedNotice({ report }) {
29
+ const person = report.principalType === "user";
30
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
31
+ className: "report-notice",
32
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Notice, { children: [
33
+ "Removed",
34
+ report.removedBy !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
35
+ " ",
36
+ "by ",
37
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
38
+ className: "mono",
39
+ children: report.removedBy
40
+ })
41
+ ] }),
42
+ report.removedAt !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
43
+ " ",
44
+ "on ",
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, { iso: report.removedAt })
46
+ ] }),
47
+ ".",
48
+ " ",
49
+ person ? "Their project access, sessions, CLI logins and linked sign-in accounts were revoked at the same time, so adding them again starts from nothing." : "Its project access and every token issued to it were revoked at the same time, so adding it again starts from nothing."
50
+ ] })
51
+ });
52
+ }
53
+ /**
54
+ * The people or tokens removed from the directory, under the live ones.
55
+ * Removal ends their access but not the work it leaves, so they stay one click
56
+ * away until every value they saw has been rotated.
57
+ */
58
+ function RemovedList({ principalType, removed }) {
59
+ const users = principalType === "user";
60
+ const rows = removed.filter((principal) => principal.principalType === principalType);
61
+ if (rows.length === 0) return null;
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", {
64
+ className: "section-title",
65
+ children: "Removed"
66
+ }),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", {
68
+ className: "card",
69
+ "aria-label": users ? "Removed users" : "Removed tokens",
70
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
71
+ className: "dt-wrap",
72
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
73
+ className: "dt directory stacks",
74
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
76
+ className: "n",
77
+ children: "#"
78
+ }),
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
80
+ className: "col-principal",
81
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
82
+ className: "th",
83
+ children: [users ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(User, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Key, { size: 14 }), users ? "Email" : "Name"]
84
+ })
85
+ }),
86
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
87
+ className: "col-role",
88
+ children: "Still to rotate"
89
+ }),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
91
+ className: "col-actions",
92
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
93
+ className: "visually-hidden",
94
+ children: "Report"
95
+ })
96
+ })
97
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: rows.map((principal, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", {
98
+ className: "row-link",
99
+ children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
101
+ className: "n",
102
+ children: index + 1
103
+ }),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
105
+ className: "col-lead",
106
+ "data-label": users ? "Email" : "Name",
107
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrincipalLink, {
108
+ type: principal.principalType,
109
+ id: principal.principalId,
110
+ stretch: true
111
+ })
112
+ }),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
114
+ className: "col-role",
115
+ "data-label": "Still to rotate",
116
+ children: principal.toRotate === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
117
+ className: "cell-muted",
118
+ children: "Nothing"
119
+ }) : `${principal.toRotate} ${principal.toRotate === 1 ? "value" : "values"}`
120
+ }),
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
122
+ className: "col-actions col-open cell-muted",
123
+ "aria-hidden": "true",
124
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronRight, { size: 16 })
125
+ })
126
+ ]
127
+ }, principal.principalId)) })]
128
+ })
129
+ })
130
+ }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
132
+ className: "hint section-foot",
133
+ children: [
134
+ users ? "They" : "These",
135
+ " can no longer sign in. Each page lists the values",
136
+ " ",
137
+ users ? "they" : "it",
138
+ " saw that nobody has changed since."
139
+ ]
140
+ })
141
+ ] });
142
+ }
143
+ function SeenValues({ report, removed, person }) {
144
+ const they = person ? "they" : "it";
145
+ const description = removed ? `Values ${they} read or wrote that nobody has changed since, so ${they} may still hold them. Rotate each where it comes from, such as a new API key or database password, then save the new value here and it leaves this list.` : `Current values ${they} ${person ? "have" : "has"} read or written: the ones to rotate if ${they} ${person ? "leave" : "is retired"}. Saving a new version takes a value off.`;
146
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
147
+ labelledBy: "seen-values",
148
+ title: removed ? "Still to rotate" : "Values seen",
149
+ description,
150
+ actions: report.rotated > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
151
+ className: "card-aside",
152
+ children: [report.rotated, " already rotated"]
153
+ }),
154
+ children: report.exposed.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, {
155
+ title: removed ? "Nothing left to rotate" : "No current values seen",
156
+ children: report.rotated > 0 ? `Every value ${they} saw has had a new version since.` : `${person ? "They have" : "It has"} not read or written a value that is still current.`
157
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
158
+ className: "dt-wrap",
159
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
160
+ className: "dt report-values",
161
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Secret" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
164
+ className: "col-shrink",
165
+ children: "Version"
166
+ }),
167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
168
+ className: "col-shrink",
169
+ children: "Last seen"
170
+ })
171
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: report.exposed.map((secret) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
173
+ className: "cell-link mono",
174
+ to: "/projects/$project/$environment",
175
+ params: {
176
+ project: secret.project,
177
+ environment: secret.environment
178
+ },
179
+ search: { filter: secret.key },
180
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
181
+ className: "report-path",
182
+ children: [
183
+ secret.project,
184
+ "/",
185
+ secret.environment,
186
+ "/"
187
+ ]
188
+ }), secret.key]
189
+ }) }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", {
191
+ className: "col-shrink cell-mono cell-muted",
192
+ children: ["v", secret.version]
193
+ }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("td", {
195
+ className: "col-shrink nowrap",
196
+ children: [
197
+ secret.how === "wrote" ? "Wrote" : "Read",
198
+ " ",
199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
200
+ iso: secret.at,
201
+ display: "relative"
202
+ })
203
+ ]
204
+ })
205
+ ] }, `${secret.project}/${secret.environment}/${secret.key}`)) })]
206
+ })
207
+ })
208
+ });
209
+ }
210
+ function CreatedSyncs({ report, person }) {
211
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
212
+ labelledBy: "created-syncs",
213
+ title: person ? "Syncs they set up" : "Syncs it set up",
214
+ description: "A sync keeps pushing every change to the destination it names, whoever set it up. Check each one still points somewhere you control.",
215
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
216
+ className: "dt-wrap",
217
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
218
+ className: "dt syncs",
219
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
220
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Destination" }),
221
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
222
+ className: "col-shrink",
223
+ children: "From"
224
+ }),
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
226
+ className: "col-shrink col-hide-narrow",
227
+ children: "Token"
228
+ })
229
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: report.syncs.map((sync) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
230
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
231
+ className: "cell-account",
232
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SyncMark, {
233
+ brand: sync.brand,
234
+ size: 15
235
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
236
+ className: "cell-stack",
237
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [sync.providerLabel, sync.paused && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
238
+ className: "tag",
239
+ children: "Paused"
240
+ })] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", {
241
+ className: "mono",
242
+ children: sync.destination
243
+ })]
244
+ })]
245
+ }) }),
246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
247
+ className: "col-shrink",
248
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Link, {
249
+ className: "cell-link mono",
250
+ to: "/projects/$project/$environment",
251
+ params: {
252
+ project: sync.project,
253
+ environment: sync.environment
254
+ },
255
+ children: [
256
+ sync.project,
257
+ "/",
258
+ sync.environment
259
+ ]
260
+ })
261
+ }),
262
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
263
+ className: "col-shrink col-hide-narrow cell-mono cell-muted",
264
+ children: sync.credential
265
+ })
266
+ ] }, sync.id)) })]
267
+ })
268
+ })
269
+ });
270
+ }
271
+ function IssuedTokens({ report }) {
272
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Card, {
273
+ labelledBy: "issued-tokens",
274
+ title: "Tokens they issued",
275
+ description: "Service tokens they created that still work. Each was shown to them once, when it was made; revoke any they may have kept a copy of.",
276
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
277
+ className: "dt-wrap",
278
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", {
279
+ className: "dt report-tokens",
280
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
281
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", { children: "Token" }),
282
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
283
+ className: "col-shrink",
284
+ children: "Expires"
285
+ }),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("th", {
287
+ className: "col-shrink col-hide-narrow",
288
+ children: "Last used"
289
+ })
290
+ ] }) }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: report.issuedTokens.map((token) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("tr", { children: [
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
292
+ className: "cell-stack",
293
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link, {
294
+ className: "cell-link mono",
295
+ to: "/tokens/$token",
296
+ params: { token: token.service },
297
+ children: token.service
298
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("small", { children: [
299
+ token.label ?? "No label",
300
+ " · ",
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
302
+ className: "mono",
303
+ children: token.hint
304
+ })
305
+ ] })]
306
+ }) }),
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
308
+ className: "col-shrink nowrap",
309
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
310
+ iso: token.expiresAt,
311
+ display: "relative"
312
+ })
313
+ }),
314
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", {
315
+ className: "col-shrink col-hide-narrow nowrap",
316
+ children: token.lastUsedAt === null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
317
+ className: "cell-muted",
318
+ children: "Never"
319
+ }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Timestamp, {
320
+ iso: token.lastUsedAt,
321
+ display: "relative"
322
+ })
323
+ })
324
+ ] }, token.id)) })]
325
+ })
326
+ })
327
+ });
328
+ }
329
+ //#endregion
330
+ export { RemovedList as n, RemovedNotice as r, PrincipalReportCards as t };