@coffre/ui 0.1.3 → 0.1.5

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 (98) hide show
  1. package/dist/client/_coffre/assets/account-BIyXNVE7.js +1 -0
  2. package/dist/client/_coffre/assets/{account-C4bNbeO7.js → account-aO-xPRzC.js} +2 -2
  3. package/dist/client/_coffre/assets/{affordances-DiuJIiR2.js → affordances-CmoY-8Xf.js} +1 -1
  4. package/dist/client/_coffre/assets/audit-BOhJ99zA.js +1 -0
  5. package/dist/client/_coffre/assets/{audit-Dzj5DyKt.js → audit-SvZcBu5r.js} +2 -2
  6. package/dist/client/_coffre/assets/{auth.device-D2pCLF-X.js → auth.device-DKOf08ug.js} +1 -1
  7. package/dist/client/_coffre/assets/{auth.device-BfCfeBWe.js → auth.device-u__CNnL_.js} +2 -2
  8. package/dist/client/_coffre/assets/{coffre-C7qL3HGR.js → coffre-B0SRYkyG.js} +1 -1
  9. package/dist/client/_coffre/assets/directory--9Q70fmm.js +1 -0
  10. package/dist/client/_coffre/assets/globals-BvlyrLi8.css +1 -0
  11. package/dist/client/_coffre/assets/{grants-fqTtJ-aW.js → grants-BxXkQT0q.js} +1 -1
  12. package/dist/client/_coffre/assets/index-CBgc7lsY.js +12 -0
  13. package/dist/client/_coffre/assets/login-C-wTm_t1.js +2 -0
  14. package/dist/client/_coffre/assets/{login-DZizFxa4.js → login-CLLv1om9.js} +1 -1
  15. package/dist/client/_coffre/assets/{offboarding-DOLJQcXU.js → offboarding-BmFuQEv1.js} +1 -1
  16. package/dist/client/_coffre/assets/{page-BxW2MwaX.js → page-DbSS7pYH.js} +1 -1
  17. package/dist/client/_coffre/assets/{preload-helper-BHuP8_FL.js → preload-helper-DduCCcmc.js} +3 -3
  18. package/dist/client/_coffre/assets/principal-page-CaAlOB_1.js +1 -0
  19. package/dist/client/_coffre/assets/projects._project._environment-CAHNmhje.js +2 -0
  20. package/dist/client/_coffre/assets/{projects._project._environment-CwRVG9Ne.js → projects._project._environment-D5vWbgMo.js} +3 -3
  21. package/dist/client/_coffre/assets/projects._project.index-BQw4N8k-.js +1 -0
  22. package/dist/client/_coffre/assets/projects._project.index-CnqMmMG7.js +2 -0
  23. package/dist/client/_coffre/assets/{projects.index-B8eV8JIn.js → projects.index-9RVSbXjb.js} +1 -1
  24. package/dist/client/_coffre/assets/{projects.index-BNEC7Oz8.js → projects.index-DHIeFVLP.js} +2 -2
  25. package/dist/client/_coffre/assets/settings-BHtK75j4.js +2 -0
  26. package/dist/client/_coffre/assets/{settings-BrS0-wEt.js → settings-DYc9gBwr.js} +1 -1
  27. package/dist/client/_coffre/assets/tokens._token-D69aJAyr.js +2 -0
  28. package/dist/client/_coffre/assets/tokens._token-Yb0ESFen.js +1 -0
  29. package/dist/client/_coffre/assets/{tokens.index-XvA4XRxh.js → tokens.index-Cl6jAaG1.js} +1 -1
  30. package/dist/client/_coffre/assets/tokens.index-T5bax16J.js +2 -0
  31. package/dist/client/_coffre/assets/{unregistered-CTRMtBIy.js → unregistered-D5go1AfR.js} +1 -1
  32. package/dist/client/_coffre/assets/{use-action-DgAf-tiX.js → use-action-LiHC8kKH.js} +1 -1
  33. package/dist/client/_coffre/assets/users._user-5op2n3T0.js +2 -0
  34. package/dist/client/_coffre/assets/users._user-Dd--epXf.js +1 -0
  35. package/dist/client/_coffre/assets/{users.index-B03beUHq.js → users.index-CBnyTZ5s.js} +1 -1
  36. package/dist/client/_coffre/assets/users.index-D2wC7VUt.js +2 -0
  37. package/dist/server/.vite/manifest.json +141 -141
  38. package/dist/server/_coffre/assets/{_tanstack-start-manifest_v-CQrSBuAx.js → _tanstack-start-manifest_v-DxrPXbxf.js} +39 -39
  39. package/dist/server/_coffre/assets/{account-B71_b5xc.js → account-BCWiHL02.js} +4 -4
  40. package/dist/server/_coffre/assets/{account-BoO6ZqMc.js → account-o6Aa9ewL.js} +3 -3
  41. package/dist/server/_coffre/assets/{audit-mGcuoCZV.js → audit-DErFBScb.js} +3 -3
  42. package/dist/server/_coffre/assets/{audit-BsLd3asn.js → audit-LnICjwY-.js} +2 -2
  43. package/dist/server/_coffre/assets/{auth.device-1IcJ475s.js → auth.device-MPFjFR1J.js} +3 -3
  44. package/dist/server/_coffre/assets/{auth.device-CJwZYYtn.js → auth.device-SSruoUMA.js} +2 -2
  45. package/dist/server/_coffre/assets/{directory-wm_JQUfk.js → directory-CRoVBkX-.js} +2 -2
  46. package/dist/server/_coffre/assets/globals-BvlyrLi8.css +1 -0
  47. package/dist/server/_coffre/assets/{grants-BmhEY1vz.js → grants-ahmQsPAJ.js} +2 -2
  48. package/dist/server/_coffre/assets/{login-B5O5LPXV.js → login-CQw_o6Gr.js} +3 -3
  49. package/dist/server/_coffre/assets/{login-Bvc4gp0X.js → login-SfzjEmZT.js} +2 -2
  50. package/dist/server/_coffre/assets/{offboarding-CvSilnSm.js → offboarding-uVHZUfo4.js} +3 -3
  51. package/dist/server/_coffre/assets/{page-BjXk0Ehu.js → page-DiOsIrE3.js} +42 -31
  52. package/dist/server/_coffre/assets/{principal-page-DkwNGzM2.js → principal-page-DtNYUrPB.js} +5 -5
  53. package/dist/server/_coffre/assets/{projects._project._environment-7grhqlgq.js → projects._project._environment-B32fcj4E.js} +3 -3
  54. package/dist/server/_coffre/assets/{projects._project._environment-ByEf6pmz.js → projects._project._environment-DX0oRk5K.js} +2 -2
  55. package/dist/server/_coffre/assets/{projects._project.index-B1bjowP-.js → projects._project.index-CVXek833.js} +5 -5
  56. package/dist/server/_coffre/assets/{projects._project.index-DU8wtoHD.js → projects._project.index-DolB6jZJ.js} +3 -3
  57. package/dist/server/_coffre/assets/{projects.index-kMDA6pMy.js → projects.index-DRUvHYRZ.js} +2 -2
  58. package/dist/server/_coffre/assets/{projects.index-B0DoHbCz.js → projects.index-JE5sEeRy.js} +3 -3
  59. package/dist/server/_coffre/assets/{router-xk2rumMi.js → router-C8HpE1F2.js} +44 -29
  60. package/dist/server/_coffre/assets/{settings-Cg5qOGij.js → settings-BI5qwClp.js} +3 -3
  61. package/dist/server/_coffre/assets/{settings-CM9-h7in.js → settings-RcERS7mp.js} +3 -3
  62. package/dist/server/_coffre/assets/{tokens._token-Di4OZdAA.js → tokens._token-BuCKWsUv.js} +3 -3
  63. package/dist/server/_coffre/assets/{tokens._token-CCpaPMAk.js → tokens._token-DAWPmrdO.js} +4 -4
  64. package/dist/server/_coffre/assets/{tokens.index-tDKq4AFh.js → tokens.index-BLOTM9hK.js} +3 -3
  65. package/dist/server/_coffre/assets/{tokens.index-Do3OHR31.js → tokens.index-C31-24r3.js} +4 -4
  66. package/dist/server/_coffre/assets/{ui-BNzhIAQP.js → ui-LHVjaG5-.js} +1 -1
  67. package/dist/server/_coffre/assets/{unregistered-BqaWYFJK.js → unregistered-DRza-1nD.js} +1 -1
  68. package/dist/server/_coffre/assets/{users._user-Cp039Va-.js → users._user-CC9cDYJq.js} +3 -3
  69. package/dist/server/_coffre/assets/{users._user-BenYva93.js → users._user-CTNj1X5H.js} +2 -2
  70. package/dist/server/_coffre/assets/{users.index-DQ_45DQl.js → users.index-CNR62ijQ.js} +4 -4
  71. package/dist/server/_coffre/assets/{users.index-BrzG1Ecq.js → users.index-CwDEKMnN.js} +3 -3
  72. package/dist/server/index.js +2 -2
  73. package/package.json +5 -4
  74. package/src/assets/apple-touch-icon.png +0 -0
  75. package/src/assets/favicon-32.png +0 -0
  76. package/src/components/icons.tsx +17 -11
  77. package/src/components/mark.ts +44 -0
  78. package/src/components/shell.tsx +1 -3
  79. package/src/routes/__root.tsx +10 -4
  80. package/src/styles/globals.css +0 -10
  81. package/dist/client/_coffre/assets/account-C3Zo1l5A.js +0 -1
  82. package/dist/client/_coffre/assets/audit-h7CmJBTo.js +0 -1
  83. package/dist/client/_coffre/assets/directory-C2Ou4SQv.js +0 -1
  84. package/dist/client/_coffre/assets/globals-Dgq4Jy0x.css +0 -1
  85. package/dist/client/_coffre/assets/index-C1l9I4jg.js +0 -12
  86. package/dist/client/_coffre/assets/login-CR9CBXlw.js +0 -2
  87. package/dist/client/_coffre/assets/principal-page-xnBZVURr.js +0 -1
  88. package/dist/client/_coffre/assets/projects._project._environment-CrWjQmIA.js +0 -2
  89. package/dist/client/_coffre/assets/projects._project.index-CCDEuE-z.js +0 -2
  90. package/dist/client/_coffre/assets/projects._project.index-DCJsmnD7.js +0 -1
  91. package/dist/client/_coffre/assets/settings-2BPsenNM.js +0 -2
  92. package/dist/client/_coffre/assets/tokens._token-B3-YwuKp.js +0 -2
  93. package/dist/client/_coffre/assets/tokens._token-D_hsbHx6.js +0 -1
  94. package/dist/client/_coffre/assets/tokens.index-BdKE2Jv8.js +0 -2
  95. package/dist/client/_coffre/assets/users._user-BFPXcJ4y.js +0 -2
  96. package/dist/client/_coffre/assets/users._user-DEtMeSoh.js +0 -1
  97. package/dist/client/_coffre/assets/users.index-D8hwzM6P.js +0 -2
  98. package/dist/server/_coffre/assets/globals-Dgq4Jy0x.css +0 -1
@@ -1,7 +1,7 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
2
- import { i as loadProject } from "./grants-BmhEY1vz.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
+ import { i as loadProject } from "./grants-ahmQsPAJ.js";
3
3
  //#region src/routes/projects.$project.index.tsx
4
- var $$splitComponentImporter = () => import("./projects._project.index-B1bjowP-.js");
4
+ var $$splitComponentImporter = () => import("./projects._project.index-CVXek833.js");
5
5
  var Route = createFileRoute("/projects/$project/")({
6
6
  validateSearch: (search) => ({ tab: search.tab === "users" || search.tab === "tokens" || search.tab === "settings" ? search.tab : void 0 }),
7
7
  loader: ({ context: { client }, params }) => loadProject(client, params.project),
@@ -1,9 +1,9 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
2
  import { o as uiResult } from "./coffre-1hxT2E_U.js";
3
3
  import { s as deriveUiCapabilities } from "./affordances-BNaXjMOb.js";
4
4
  import { n as isActiveAccessibleEnvironment } from "./project-environments-lEzFHUt4.js";
5
5
  //#region src/routes/projects.index.tsx
6
- var $$splitComponentImporter = () => import("./projects.index-B0DoHbCz.js");
6
+ var $$splitComponentImporter = () => import("./projects.index-JE5sEeRy.js");
7
7
  var Route = createFileRoute("/projects/")({
8
8
  loader: async ({ context: { client } }) => {
9
9
  const result = await uiResult(async () => {
@@ -1,11 +1,11 @@
1
1
  import { C as require_react, E as __toESM, o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { E as Link, a as ErrorLine, c as Spinner, i as EmptyState, o as Modal } from "./ui-BNzhIAQP.js";
3
- import { R as Plus, a as Tile, b as Hash, c as AlertTriangle, i as PageHeader, n as ClosedDoor, v as Folder, w as Layers } from "./page-BjXk0Ehu.js";
2
+ import { E as Link, a as ErrorLine, c as Spinner, i as EmptyState, o as Modal } from "./ui-LHVjaG5-.js";
3
+ import { L as Plus, a as Tile, b as Hash, c as AlertTriangle, i as PageHeader, n as ClosedDoor, v as Folder, w as Layers } from "./page-DiOsIrE3.js";
4
4
  import { s as useCoffre, t as Refusal } from "./coffre-1hxT2E_U.js";
5
5
  import { r as toast, t as useAction } from "./use-action-BkJXC5JM.js";
6
6
  import { n as ProjectEmptyStateCopy, r as RootAdminOnly } from "./affordances-BNaXjMOb.js";
7
7
  import { n as isActiveAccessibleEnvironment } from "./project-environments-lEzFHUt4.js";
8
- import { t as Route } from "./projects.index-kMDA6pMy.js";
8
+ import { t as Route } from "./projects.index-DRUvHYRZ.js";
9
9
  import { n as slugProblem } from "./validation-BQtqPe2V.js";
10
10
  //#region src/routes/projects.index.tsx?tsr-split=component
11
11
  var import_react = /* @__PURE__ */ __toESM(require_react());
@@ -1,24 +1,24 @@
1
1
  import { C as require_react, E as __toESM, f as deepEqual, i as useRouter, m as escapeHtml, o as require_jsx_runtime, t as useStore } from "./useStore-DWGPqzXR.js";
2
2
  import { o as redirect, r as useHydrated } from "./react-dom-qCTiwGGR.js";
3
3
  import { C as createNonReactiveReadonlyStore, S as createNonReactiveMutableStore, d as appendUniqueUserTags, h as getScriptPreloadAttrs, i as Outlet, m as getAssetCrossOrigin, o as ScriptOnce, t as getStartContext, v as resolveManifestCssLink, y as RouterCore } from "./async-local-storage-C0cwgkEr.js";
4
- import { C as lazyRouteComponent, D as useNavigate, E as Link, S as composeRefs, T as createRootRouteWithContext, _ as DialogContent, b as useId, f as TooltipProvider, g as Dialog, h as dropdown_menu_exports, m as dialog_exports, u as Tip, v as DialogOverlay, w as createFileRoute, x as Primitive, y as DialogPortal } from "./ui-BNzhIAQP.js";
5
- import { $ as Users, A as Menu, C as Key, G as SlashCircle, H as Settings, K as Sun, M as Moon, O as MARK_SVG, P as PanelLeft, Q as UserCog, R as Plus, T as Ledger, V as Search, W as SignOut, a as Tile, c as AlertTriangle, et as X$1, j as Monitor, k as Mark, n as ClosedDoor, p as ChevronsUpDown, rt as useStructuralSharing, u as Check, v as Folder, w as Layers, y as GitHub } from "./page-BjXk0Ehu.js";
4
+ import { C as lazyRouteComponent, D as useNavigate, E as Link, S as composeRefs, T as createRootRouteWithContext, _ as DialogContent, b as useId, f as TooltipProvider, g as Dialog, h as dropdown_menu_exports, m as dialog_exports, u as Tip, v as DialogOverlay, w as createFileRoute, x as Primitive, y as DialogPortal } from "./ui-LHVjaG5-.js";
5
+ import { $ as X$1, A as Monitor, B as Search, C as Key, G as Sun, L as Plus, N as PanelLeft, O as Mark, Q as Users, T as Ledger, U as SignOut, V as Settings, W as SlashCircle, Z as UserCog, a as Tile, c as AlertTriangle, et as markSvg, j as Moon, k as Menu, n as ClosedDoor, p as ChevronsUpDown, rt as useStructuralSharing, u as Check, v as Folder, w as Layers, y as GitHub } from "./page-DiOsIrE3.js";
6
6
  import { c as CoffreError, u as createClient } from "./coffre-1hxT2E_U.js";
7
7
  import { n as Toaster, r as toast } from "./use-action-BkJXC5JM.js";
8
8
  import { a as hasAdministrationItems, s as deriveUiCapabilities, t as AdministrationItems } from "./affordances-BNaXjMOb.js";
9
9
  import { n as isActiveAccessibleEnvironment } from "./project-environments-lEzFHUt4.js";
10
- import { a as setTheme, i as ThemeToggle, o as themeBootScript, r as ThemeMenuItems, t as Route$4 } from "./account-BoO6ZqMc.js";
11
- import { t as Route$5 } from "./audit-BsLd3asn.js";
12
- import { t as Route$6 } from "./login-Bvc4gp0X.js";
13
- import { t as Route$7 } from "./settings-CM9-h7in.js";
14
- import { t as Route$8 } from "./auth.device-CJwZYYtn.js";
15
- import { t as Route$9 } from "./projects.index-kMDA6pMy.js";
16
- import { t as Route$10 } from "./tokens.index-tDKq4AFh.js";
17
- import { t as Route$11 } from "./tokens._token-Di4OZdAA.js";
18
- import { t as Route$12 } from "./users.index-BrzG1Ecq.js";
19
- import { t as Route$13 } from "./users._user-Cp039Va-.js";
20
- import { t as Route$14 } from "./projects._project.index-DU8wtoHD.js";
21
- import { t as Route$15 } from "./projects._project._environment-ByEf6pmz.js";
10
+ import { a as setTheme, i as ThemeToggle, o as themeBootScript, r as ThemeMenuItems, t as Route$4 } from "./account-o6Aa9ewL.js";
11
+ import { t as Route$5 } from "./audit-LnICjwY-.js";
12
+ import { t as Route$6 } from "./login-SfzjEmZT.js";
13
+ import { t as Route$7 } from "./settings-RcERS7mp.js";
14
+ import { t as Route$8 } from "./auth.device-SSruoUMA.js";
15
+ import { t as Route$9 } from "./projects.index-DRUvHYRZ.js";
16
+ import { t as Route$10 } from "./tokens.index-BLOTM9hK.js";
17
+ import { t as Route$11 } from "./tokens._token-BuCKWsUv.js";
18
+ import { t as Route$12 } from "./users.index-CwDEKMnN.js";
19
+ import { t as Route$13 } from "./users._user-CC9cDYJq.js";
20
+ import { t as Route$14 } from "./projects._project.index-DolB6jZJ.js";
21
+ import { t as Route$15 } from "./projects._project._environment-DX0oRk5K.js";
22
22
  //#region ../../node_modules/.pnpm/@tanstack+react-router@1.170.18_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-router/dist/esm/routerStores.js
23
23
  var getStoreFactory = (opts) => {
24
24
  return {
@@ -382,7 +382,7 @@ var getGlobalStartContext = () => {
382
382
  };
383
383
  //#endregion
384
384
  //#region src/styles/globals.css?url
385
- var globals_default = "/_coffre/assets/globals-Dgq4Jy0x.css";
385
+ var globals_default = "/_coffre/assets/globals-BvlyrLi8.css";
386
386
  //#endregion
387
387
  //#region ../../node_modules/.pnpm/cmdk@1.1.1_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
388
388
  var U = 1;
@@ -1158,11 +1158,7 @@ function roleLabel(principal, instanceRole) {
1158
1158
  function Brand() {
1159
1159
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
1160
1160
  className: "brand",
1161
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1162
- className: "brand-mark",
1163
- "aria-hidden": true,
1164
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Mark, { size: 16 })
1165
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1161
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Mark, { size: 24 }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
1166
1162
  className: "brand-name",
1167
1163
  children: "coffre"
1168
1164
  })]
@@ -1671,6 +1667,12 @@ function Agentation() {
1671
1667
  }
1672
1668
  /** Reads the page's origin, so it renders only inside ClientOnly, never on the server. */
1673
1669
  //#endregion
1670
+ //#region src/assets/favicon-32.png?url
1671
+ var favicon_32_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACJUlEQVR42s1Xu4oqQRAtBMVHoKjRZqKBiX/iC8xu4AcoGvoBvuYLBP9D0cDA3FB8xL5TWVTYUfdcalBYd0anZ/Q690DB0NMz53RVdVU30S0+iEgiohERyUSEF5l8+ad04dDEHyL6fCHpPfu8cKnIv99AfrXvnyI+3rRyLU8o4ZAsIL8acyvJIfSB3+9HLpdDq9XCfD7H8XhUbLFYoN1uI5/PK3MMCGBu+tKb6HQ6US6XsdvtoAeeU61W4XK5RAQw9+NJoVAIw+EQRjEajRAOh0VEPCZfLpcwi/V6LSLivtvNrFzLEzrh0H7BMX8VKpWKMQGcySIJ9wiz2QzNZhPJZBIej8eYAN5qWphOp0ilUsoP2fiZxxiyLKPf76NUKiEWixnZiupB3uda5D6fTzWXxzKZDLxer9lipB7kIvMbvNpnqp7D4RAXwO78DZ043pjNZkM0GkU2m0Wj0cBgMMDhcPh3Aux2O9LpNOr1Onq9Hrbbrer70+n0XAg4m+8JSCQSurtitVo9l4STyUQz0XhsPB7rCuh0OuICuKtpgUXwarmyscXjcSFyRrFYfG8h+on9fo9gMGisFHNLfRUkSTLeC9jF3EieBYfN7Xaba8fcSrmlmsVms0EkEjF/HriKMOMJTk4BcggdyTgctVpNSSaRhOOY67j95kgmfCgNBAIoFArKnubCcj6fFePnbrerbLUH2X73UGr5sdzyi4nlV7P/4nJq2fX8L1/XRcNQT98wAAAAAElFTkSuQmCC";
1672
+ //#endregion
1673
+ //#region src/assets/apple-touch-icon.png?url
1674
+ var apple_touch_icon_default = "data:image/png;base64,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";
1675
+ //#endregion
1674
1676
  //#region src/routes/__root.tsx
1675
1677
  var Route$3 = createRootRouteWithContext()({
1676
1678
  head: () => ({
@@ -1686,14 +1688,27 @@ var Route$3 = createRootRouteWithContext()({
1686
1688
  content: "Secrets, with an audit log"
1687
1689
  }
1688
1690
  ],
1689
- links: [{
1690
- rel: "stylesheet",
1691
- href: globals_default
1692
- }, {
1693
- rel: "icon",
1694
- type: "image/svg+xml",
1695
- href: `data:image/svg+xml,${encodeURIComponent(MARK_SVG)}`
1696
- }]
1691
+ links: [
1692
+ {
1693
+ rel: "stylesheet",
1694
+ href: globals_default
1695
+ },
1696
+ {
1697
+ rel: "icon",
1698
+ type: "image/png",
1699
+ sizes: "32x32",
1700
+ href: favicon_32_default
1701
+ },
1702
+ {
1703
+ rel: "icon",
1704
+ type: "image/svg+xml",
1705
+ href: `data:image/svg+xml,${encodeURIComponent(markSvg(16, { adaptive: true }))}`
1706
+ },
1707
+ {
1708
+ rel: "apple-touch-icon",
1709
+ href: apple_touch_icon_default
1710
+ }
1711
+ ]
1697
1712
  }),
1698
1713
  loader: async ({ context: { client }, location }) => {
1699
1714
  const shell = await loadShell(client);
@@ -1824,7 +1839,7 @@ var Route$1 = createFileRoute("/access")({ beforeLoad: () => {
1824
1839
  } });
1825
1840
  //#endregion
1826
1841
  //#region src/routes/unregistered.tsx
1827
- var $$splitComponentImporter = () => import("./unregistered-BqaWYFJK.js");
1842
+ var $$splitComponentImporter = () => import("./unregistered-DRza-1nD.js");
1828
1843
  var Route = createFileRoute("/unregistered")({ component: lazyRouteComponent($$splitComponentImporter, "component") });
1829
1844
  /**
1830
1845
  * Cloudflare Access has authenticated this person, but Coffre has not
@@ -1,7 +1,7 @@
1
1
  import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { E as Link } from "./ui-BNzhIAQP.js";
3
- import { i as PageHeader, r as Fact, t as Card } from "./page-BjXk0Ehu.js";
4
- import { t as Route } from "./settings-CM9-h7in.js";
2
+ import { E as Link } from "./ui-LHVjaG5-.js";
3
+ import { i as PageHeader, r as Fact, t as Card } from "./page-DiOsIrE3.js";
4
+ import { t as Route } from "./settings-RcERS7mp.js";
5
5
  //#region src/routes/settings.tsx?tsr-split=component
6
6
  /** The workspace's settings. Your own are under Account, at the sidebar's foot. */
7
7
  var import_jsx_runtime = require_jsx_runtime();
@@ -1,7 +1,7 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
2
- import { o as loadDirectory } from "./directory-wm_JQUfk.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
+ import { o as loadDirectory } from "./directory-CRoVBkX-.js";
3
3
  //#region src/routes/settings.tsx
4
- var $$splitComponentImporter = () => import("./settings-Cg5qOGij.js");
4
+ var $$splitComponentImporter = () => import("./settings-BI5qwClp.js");
5
5
  /** The workspace's settings. Your own are under Account, at the sidebar's foot. */
6
6
  var Route = createFileRoute("/settings")({
7
7
  loader: async ({ context: { client }, parentMatchPromise }) => {
@@ -1,8 +1,8 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
2
  import { o as uiResult, r as memberRef } from "./coffre-1hxT2E_U.js";
3
- import { n as loadPrincipalPage } from "./principal-page-DkwNGzM2.js";
3
+ import { n as loadPrincipalPage } from "./principal-page-DtNYUrPB.js";
4
4
  //#region src/routes/tokens.$token.tsx
5
- var $$splitComponentImporter = () => import("./tokens._token-CCpaPMAk.js");
5
+ var $$splitComponentImporter = () => import("./tokens._token-DAWPmrdO.js");
6
6
  var Route = createFileRoute("/tokens/$token")({
7
7
  loader: async ({ context: { client }, params, parentMatchPromise }) => {
8
8
  const root = (await parentMatchPromise).loaderData;
@@ -1,10 +1,10 @@
1
1
  import { C as require_react, E as __toESM, o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { a as ErrorLine, c as Spinner, i as EmptyState, l as Timestamp, o as Modal, r as CopyButton, s as Notice, t as ConfirmButton } from "./ui-BNzhIAQP.js";
3
- import { C as Key, R as Plus, et as X, t as Card } from "./page-BjXk0Ehu.js";
2
+ import { a as ErrorLine, c as Spinner, i as EmptyState, l as Timestamp, o as Modal, r as CopyButton, s as Notice, t as ConfirmButton } from "./ui-LHVjaG5-.js";
3
+ import { $ as X, C as Key, L as Plus, t as Card } from "./page-DiOsIrE3.js";
4
4
  import { r as memberRef, s as useCoffre } from "./coffre-1hxT2E_U.js";
5
5
  import { r as toast, t as useAction } from "./use-action-BkJXC5JM.js";
6
- import { t as PrincipalPage } from "./principal-page-DkwNGzM2.js";
7
- import { t as Route } from "./tokens._token-Di4OZdAA.js";
6
+ import { t as PrincipalPage } from "./principal-page-DtNYUrPB.js";
7
+ import { t as Route } from "./tokens._token-BuCKWsUv.js";
8
8
  //#region src/components/service-tokens.tsx
9
9
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
10
10
  var import_jsx_runtime = require_jsx_runtime();
@@ -1,7 +1,7 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
2
- import { o as loadDirectory } from "./directory-wm_JQUfk.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
+ import { o as loadDirectory } from "./directory-CRoVBkX-.js";
3
3
  //#region src/routes/tokens.index.tsx
4
- var $$splitComponentImporter = () => import("./tokens.index-Do3OHR31.js");
4
+ var $$splitComponentImporter = () => import("./tokens.index-C31-24r3.js");
5
5
  var Route = createFileRoute("/tokens/")({
6
6
  loader: async ({ context: { client }, parentMatchPromise }) => loadDirectory(client, (await parentMatchPromise).loaderData?.capabilities.canManageGrants ?? false),
7
7
  component: lazyRouteComponent($$splitComponentImporter, "component")
@@ -1,8 +1,8 @@
1
1
  import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { C as Key, i as PageHeader, n as ClosedDoor } from "./page-BjXk0Ehu.js";
3
- import { n as DirectoryTable, t as AddPrincipal } from "./directory-wm_JQUfk.js";
4
- import { t as Route } from "./tokens.index-tDKq4AFh.js";
5
- import { n as RemovedList } from "./offboarding-CvSilnSm.js";
2
+ import { C as Key, i as PageHeader, n as ClosedDoor } from "./page-DiOsIrE3.js";
3
+ import { n as DirectoryTable, t as AddPrincipal } from "./directory-CRoVBkX-.js";
4
+ import { t as Route } from "./tokens.index-BLOTM9hK.js";
5
+ import { n as RemovedList } from "./offboarding-uVHZUfo4.js";
6
6
  //#region src/routes/tokens.index.tsx?tsr-split=component
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  function TokensPage() {
@@ -1,6 +1,6 @@
1
1
  import { C as require_react, E as __toESM, T as __exportAll, _ as isDangerousProtocol, f as deepEqual$1, g as hasKeys, h as functionalUpdate, i as useRouter, o as require_jsx_runtime, s as invariant, t as useStore, v as isModuleNotFoundError } from "./useStore-DWGPqzXR.js";
2
2
  import { D as useIntersectionObserver, E as useForwardedRef, T as reactUse, _ as trimPathRight, f as joinPaths, g as trimPathLeft, o as redirect, p as removeTrailingSlash, r as useHydrated, s as rootRouteId, t as require_react_dom, u as exactPathTest } from "./react-dom-qCTiwGGR.js";
3
- import { E as Loader, S as Info, c as AlertTriangle, et as X, h as Copy, nt as useMatch, s as AlertCircle, tt as useLoaderData, u as Check } from "./page-BjXk0Ehu.js";
3
+ import { $ as X, E as Loader, S as Info, c as AlertTriangle, h as Copy, nt as useMatch, s as AlertCircle, tt as useLoaderData, u as Check } from "./page-DiOsIrE3.js";
4
4
  //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/link.js
5
5
  var preloadWarning = "Error preloading route! ☝️";
6
6
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { Z as User, n as ClosedDoor, tt as useLoaderData } from "./page-BjXk0Ehu.js";
2
+ import { X as User, n as ClosedDoor, tt as useLoaderData } from "./page-DiOsIrE3.js";
3
3
  //#region src/routes/unregistered.tsx?tsr-split=component
4
4
  var import_jsx_runtime = require_jsx_runtime();
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
2
- import { n as loadPrincipalPage } from "./principal-page-DkwNGzM2.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
+ import { n as loadPrincipalPage } from "./principal-page-DtNYUrPB.js";
3
3
  //#region src/routes/users.$user.tsx
4
- var $$splitComponentImporter = () => import("./users._user-BenYva93.js");
4
+ var $$splitComponentImporter = () => import("./users._user-CTNj1X5H.js");
5
5
  var Route = createFileRoute("/users/$user")({
6
6
  loader: async ({ context: { client }, params, parentMatchPromise }) => loadPrincipalPage(client, "user", params.user, (await parentMatchPromise).loaderData),
7
7
  component: lazyRouteComponent($$splitComponentImporter, "component")
@@ -1,6 +1,6 @@
1
1
  import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { t as PrincipalPage } from "./principal-page-DkwNGzM2.js";
3
- import { t as Route } from "./users._user-Cp039Va-.js";
2
+ import { t as PrincipalPage } from "./principal-page-DtNYUrPB.js";
3
+ import { t as Route } from "./users._user-CC9cDYJq.js";
4
4
  //#region src/routes/users.$user.tsx?tsr-split=component
5
5
  var import_jsx_runtime = require_jsx_runtime();
6
6
  function UserPage() {
@@ -1,8 +1,8 @@
1
1
  import { o as require_jsx_runtime } from "./useStore-DWGPqzXR.js";
2
- import { $ as Users, i as PageHeader, n as ClosedDoor } from "./page-BjXk0Ehu.js";
3
- import { n as DirectoryTable, t as AddPrincipal } from "./directory-wm_JQUfk.js";
4
- import { n as RemovedList } from "./offboarding-CvSilnSm.js";
5
- import { t as Route } from "./users.index-BrzG1Ecq.js";
2
+ import { Q as Users, i as PageHeader, n as ClosedDoor } from "./page-DiOsIrE3.js";
3
+ import { n as DirectoryTable, t as AddPrincipal } from "./directory-CRoVBkX-.js";
4
+ import { n as RemovedList } from "./offboarding-uVHZUfo4.js";
5
+ import { t as Route } from "./users.index-CwDEKMnN.js";
6
6
  //#region src/routes/users.index.tsx?tsr-split=component
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
8
  function UsersPage() {
@@ -1,7 +1,7 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-BNzhIAQP.js";
2
- import { o as loadDirectory } from "./directory-wm_JQUfk.js";
1
+ import { C as lazyRouteComponent, w as createFileRoute } from "./ui-LHVjaG5-.js";
2
+ import { o as loadDirectory } from "./directory-CRoVBkX-.js";
3
3
  //#region src/routes/users.index.tsx
4
- var $$splitComponentImporter = () => import("./users.index-DQ_45DQl.js");
4
+ var $$splitComponentImporter = () => import("./users.index-CNR62ijQ.js");
5
5
  var Route = createFileRoute("/users/")({
6
6
  loader: async ({ context: { client }, parentMatchPromise }) => loadDirectory(client, (await parentMatchPromise).loaderData?.capabilities.canManageGrants ?? false),
7
7
  component: lazyRouteComponent($$splitComponentImporter, "component")
@@ -12380,7 +12380,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
12380
12380
  * the dev styles URL for route-scoped CSS collection.
12381
12381
  */
12382
12382
  async function getStartManifest(matchedRoutes) {
12383
- const { tsrStartManifest } = await import("./_coffre/assets/_tanstack-start-manifest_v-CQrSBuAx.js");
12383
+ const { tsrStartManifest } = await import("./_coffre/assets/_tanstack-start-manifest_v-DxrPXbxf.js");
12384
12384
  const startManifest = tsrStartManifest();
12385
12385
  let routes = startManifest.routes;
12386
12386
  routes[rootRouteId];
@@ -13507,7 +13507,7 @@ var getBaseManifest = getProdBaseManifest;
13507
13507
  var createEarlyHintsForRequest = createEarlyHintsCollector;
13508
13508
  async function loadEntries() {
13509
13509
  const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
13510
- import("./_coffre/assets/router-xk2rumMi.js"),
13510
+ import("./_coffre/assets/router-C8HpE1F2.js"),
13511
13511
  import("./_coffre/assets/start-DR3rN0St.js"),
13512
13512
  import("./_coffre/assets/empty-plugin-adapters-Cq4--YW-.js")
13513
13513
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffre/ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "coffre's pages: a prebuilt TanStack Start handler and its static files.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "dependencies": {
31
- "@coffre/client": "0.1.3"
31
+ "@coffre/client": "0.1.5"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@cloudflare/vite-plugin": "1.50.0",
@@ -51,11 +51,12 @@
51
51
  "typescript": "5.9.3",
52
52
  "vite": "8.1.5",
53
53
  "wrangler": "4.118.0",
54
- "@coffre/core": "0.1.3"
54
+ "@coffre/core": "0.1.5"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "vite build && rm dist/server/wrangler.json && tsdown && node ../../scripts/check-client-bundle.mjs",
58
58
  "typecheck": "tsc --noEmit",
59
- "test": "node --conditions=coffre:source --test"
59
+ "test": "node --conditions=coffre:source --test",
60
+ "icons": "node scripts/icons.ts"
60
61
  }
61
62
  }
Binary file
Binary file
@@ -51,6 +51,7 @@ import {
51
51
  Users as UsersGlyph,
52
52
  X as XGlyph,
53
53
  } from 'lucide-react';
54
+ import { markPath } from './mark';
54
55
 
55
56
  /**
56
57
  * One icon vocabulary for the whole app: Lucide, at one stroke weight.
@@ -58,7 +59,7 @@ import {
58
59
  * Mixing icon families is the fastest way to make a product UI feel assembled
59
60
  * rather than designed, so every glyph comes through here and call sites never
60
61
  * import Lucide themselves: changing one is a line in this file. The
61
- * exceptions are marks that are not ours to redraw: coffre's keyhole and the
62
+ * exceptions are marks that are not ours to redraw: coffre's mark and the
62
63
  * sign-in providers' logos.
63
64
  */
64
65
 
@@ -99,21 +100,26 @@ function Svg({
99
100
  }
100
101
 
101
102
  /**
102
- * The mark: a keyhole, drawn solid so it holds up white-on-ink inside the
103
- * brand tile at 16px. `MARK_SVG` below is the tile and keyhole together, for
104
- * the favicon.
103
+ * The mark, bare, in the text's colour, so it follows the theme. The tiled
104
+ * favicon and app icons are drawn from the same paths, in `./mark`.
105
105
  */
106
- export function Mark(props: IconProps) {
106
+ export function Mark({ size = 16, className, style, label }: IconProps) {
107
107
  return (
108
- <Svg {...props}>
109
- <circle cx="12" cy="9.5" r="3.4" fill="currentColor" stroke="none" />
110
- <path d="M10.35 11.2h3.3l1.15 7.3h-5.6Z" fill="currentColor" stroke="none" />
111
- </Svg>
108
+ <svg
109
+ width={size}
110
+ height={size}
111
+ viewBox="0 0 32 32"
112
+ className={className}
113
+ style={style}
114
+ aria-hidden={label === undefined}
115
+ aria-label={label}
116
+ role={label === undefined ? undefined : 'img'}
117
+ >
118
+ <path d={markPath(size)} fill="currentColor" />
119
+ </svg>
112
120
  );
113
121
  }
114
122
 
115
- export const MARK_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#171717"/><circle cx="16" cy="13" r="4.3" fill="#fafafa"/><path d="M13.9 15.2h4.2l1.45 9.2h-7.1Z" fill="#fafafa"/></svg>`;
116
-
117
123
  /**
118
124
  * Lucide draws on a 24-unit grid with a 2-unit stroke. At the 14-16px these
119
125
  * are shown, 1.75 sits closer to Inter's weight beside them.
@@ -0,0 +1,44 @@
1
+ /**
2
+ * coffre's mark: a keyhole cut from a disc, which leaves a lowercase c, its
3
+ * slot tilted up 14°. Drawn on a 32-unit grid, where 2 units are a pixel at
4
+ * 16px.
5
+ *
6
+ * Everything that draws it reads this file: `Mark` in the app, the favicon,
7
+ * and `scripts/icons.ts`, which renders the PNGs and the README's mark from
8
+ * it. The colours stand in until the brand has its own: change them here,
9
+ * then run `pnpm --filter @coffre/ui icons`.
10
+ */
11
+
12
+ /** 64px and up. */
13
+ export const MARK_PATH = 'M24.17 12.23A9 9 0 1 0 24.93 14.91L18.39 16.27A3.6 3.6 0 1 1 17.84 14.07Z';
14
+
15
+ /** 48px and below: a larger disc, the hole on the pixel grid, a thicker slot, so both stay open at 16px. */
16
+ export const MARK_PATH_SMALL = 'M25.77 10.94A11 11 0 1 0 26.95 14.9L17.92 16.81A4 4 0 1 1 17.08 13.45Z';
17
+
18
+ /** The tile behind the mark wherever it stands alone: the favicon, app icons, the README. */
19
+ export const TILE = '#000';
20
+
21
+ /** The mark on its tile. */
22
+ export const INK = '#fff';
23
+
24
+ /** The tile's corner radius, on the 32-unit grid. */
25
+ export const TILE_RADIUS = 7;
26
+
27
+ export function markPath(size: number): string {
28
+ return size <= 48 ? MARK_PATH_SMALL : MARK_PATH;
29
+ }
30
+
31
+ /**
32
+ * The mark on its tile, as an SVG document, drawn for `size` pixels.
33
+ * `square` leaves the corners for the platform to round (iOS, GitHub);
34
+ * `adaptive` swaps the colours in a dark browser, for the favicon.
35
+ */
36
+ export function markSvg(size: number, { square = false, adaptive = false } = {}): string {
37
+ const dark = adaptive ? `<style>@media (prefers-color-scheme:dark){rect{fill:${INK}}path{fill:${TILE}}}</style>` : '';
38
+ const radius = square ? '' : ` rx="${TILE_RADIUS}"`;
39
+ return (
40
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">${dark}` +
41
+ `<rect width="32" height="32"${radius} fill="${TILE}"/>` +
42
+ `<path d="${markPath(size)}" fill="${INK}"/></svg>`
43
+ );
44
+ }
@@ -104,9 +104,7 @@ function roleLabel(principal: Principal, instanceRole: InstanceRole): string {
104
104
  export function Brand() {
105
105
  return (
106
106
  <span className="brand">
107
- <span className="brand-mark" aria-hidden>
108
- <Mark size={16} />
109
- </span>
107
+ <Mark size={24} />
110
108
  <span className="brand-name">coffre</span>
111
109
  </span>
112
110
  );
@@ -18,7 +18,9 @@ import { Brand, Shell, sidebarBootScript } from '../components/shell';
18
18
  import { TooltipProvider } from '../components/ui';
19
19
  import { ThemeToggle, themeBootScript } from '../components/theme';
20
20
  import { Agentation } from '../components/agentation';
21
- import { MARK_SVG } from '../components/icons';
21
+ import { markSvg } from '../components/mark';
22
+ import faviconPng from '../assets/favicon-32.png?url';
23
+ import appleTouchIcon from '../assets/apple-touch-icon.png?url';
22
24
 
23
25
  export const Route = createRootRouteWithContext<RouterContext>()({
24
26
  head: () => ({
@@ -30,9 +32,13 @@ export const Route = createRootRouteWithContext<RouterContext>()({
30
32
  ],
31
33
  links: [
32
34
  { rel: 'stylesheet', href: globalsCss },
33
- // Inline, so the icon needs no route of its own: in Cloudflare mode
34
- // every path but the health checks is behind Access.
35
- { rel: 'icon', type: 'image/svg+xml', href: `data:image/svg+xml,${encodeURIComponent(MARK_SVG)}` },
35
+ // Inline, so the icons need no route of their own: in Cloudflare mode
36
+ // every path but the health checks is behind Access. Vite inlines the
37
+ // PNGs too, being small. The PNG is for browsers without SVG icons;
38
+ // sized, so the others still pick the SVG.
39
+ { rel: 'icon', type: 'image/png', sizes: '32x32', href: faviconPng },
40
+ { rel: 'icon', type: 'image/svg+xml', href: `data:image/svg+xml,${encodeURIComponent(markSvg(16, { adaptive: true }))}` },
41
+ { rel: 'apple-touch-icon', href: appleTouchIcon },
36
42
  ],
37
43
  }),
38
44
 
@@ -456,16 +456,6 @@ kbd {
456
456
  letter-spacing: -0.01em;
457
457
  }
458
458
 
459
- .brand-mark {
460
- display: grid;
461
- place-items: center;
462
- width: 1.75rem;
463
- height: 1.75rem;
464
- border-radius: 7px;
465
- background: var(--ink);
466
- color: var(--panel);
467
- }
468
-
469
459
  .main {
470
460
  min-width: 0;
471
461
  display: flex;
@@ -1 +0,0 @@
1
- import{W as e,Y as t,ct as n,et as r,i,j as a,r as o,t as s,tt as c,z as l}from"./page-BxW2MwaX.js";import{a as u,c as d,n as f,o as p,u as m}from"./preload-helper-BHuP8_FL.js";import{s as h}from"./coffre-C7qL3HGR.js";import{r as g,t as _}from"./use-action-DgAf-tiX.js";import{n as v,t as y}from"./account-C4bNbeO7.js";import{r as b}from"./directory-C2Ou4SQv.js";import{t as x}from"./signin-errors-CroZWZgm.js";var S=n();function C(){let{principal:e,instanceRole:t}=c({from:`__root__`}),n=y.useLoaderData();return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(i,{title:`Account`,actions:e!==null&&(0,S.jsx)(w,{})}),(0,S.jsx)(s,{labelledBy:`appearance`,title:`Appearance`,children:(0,S.jsx)(`div`,{className:`card-body`,children:(0,S.jsx)(v,{})})}),e!==null&&(0,S.jsx)(s,{labelledBy:`identity`,title:`Identity`,children:(0,S.jsxs)(`dl`,{className:`facts`,children:[(0,S.jsx)(o,{label:e.type===`user`?`Email`:`Name`,children:(0,S.jsx)(`span`,{className:`mono`,children:e.id})}),(0,S.jsx)(o,{label:`Kind`,children:e.type===`user`?`User`:`Token`}),e.type===`user`&&(0,S.jsx)(o,{label:`Instance role`,children:(0,S.jsx)(b,{principal:{principalType:`user`,principalId:e.id,instanceRole:t??`user`,isRootAdmin:t===`root-admin`}})})]})}),n.ok?n.signin&&e?.type===`user`&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(E,{email:e.id,...n}),(0,S.jsx)(D,{sessions:n.sessions,providers:n.providers})]}):(0,S.jsx)(p,{error:n.error})]})}function w(){return(0,S.jsx)(`form`,{method:`post`,action:`/auth/signout`,children:(0,S.jsxs)(`button`,{className:`btn`,type:`submit`,children:[(0,S.jsx)(e,{size:14}),`Sign out`]})})}function T(e,t){return e.find(e=>e.id===t)?.label??t??`unknown`}function E({email:e,providers:t,identities:n}){let{linked:i,error:a}=y.useSearch(),o=x(a),c=h(),{pending:v,error:b,run:C}=_();return(0,S.jsxs)(s,{labelledBy:`signin-accounts`,title:`Sign-in accounts`,description:`coffre recognises you by these accounts, never by an email address alone. A new account is linked here, while you are signed in.`,children:[(i!==void 0||o!==null||b!==null)&&(0,S.jsxs)(`div`,{className:`card-body`,children:[i!==void 0&&(0,S.jsxs)(d,{tone:`good`,children:[T(t,i),` account linked.`]}),(0,S.jsx)(p,{error:o??b})]}),n.length===0?(0,S.jsxs)(u,{title:`No account linked`,children:[`Your next sign-in with a verified `,(0,S.jsx)(`span`,{className:`mono`,children:e}),` links that account.`]}):(0,S.jsx)(`div`,{className:`dt-wrap`,children:(0,S.jsxs)(`table`,{className:`dt`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:`Account`}),(0,S.jsx)(`th`,{className:`col-shrink`,children:`Linked (UTC)`}),(0,S.jsx)(`th`,{className:`col-shrink`,children:`Last sign-in`}),(0,S.jsx)(`th`,{className:`col-actions`,children:(0,S.jsx)(`span`,{className:`visually-hidden`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:n.map(i=>{let a=T(t,i.provider);return(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{children:(0,S.jsxs)(`span`,{className:`cell-account`,children:[(0,S.jsx)(l,{brand:t.find(e=>e.id===i.provider)?.brand??`oidc`}),(0,S.jsxs)(`span`,{className:`cell-stack`,children:[(0,S.jsx)(`span`,{children:a}),i.email!==null&&(0,S.jsx)(`small`,{className:`mono`,children:i.email})]})]})}),(0,S.jsx)(`td`,{className:`nowrap`,children:(0,S.jsx)(m,{iso:i.createdAt})}),(0,S.jsx)(`td`,{className:`nowrap cell-muted`,children:i.lastSignInAt===null?`Never`:(0,S.jsx)(m,{iso:i.lastSignInAt,display:`relative`})}),(0,S.jsx)(`td`,{className:`col-actions`,children:(0,S.jsx)(f,{trigger:(0,S.jsxs)(`button`,{className:`act`,disabled:v,children:[(0,S.jsx)(r,{size:13}),`Unlink`]}),title:`Unlink this ${a} account?`,body:n.length===1?(0,S.jsxs)(S.Fragment,{children:[`It stops signing you in, and every session it opened ends now, this one included if you signed in with it. Your next sign-in with any account whose verified email is`,` `,(0,S.jsx)(`span`,{className:`mono`,children:e}),` links that account instead.`]}):(0,S.jsx)(S.Fragment,{children:`It stops signing you in, and every session it opened ends now, this one included if you signed in with it.`}),confirmLabel:`Unlink`,onConfirm:()=>C(()=>c.identities.unlink(i.id),()=>g.success(`${a} account unlinked`))})})]},i.id)})})]})}),t.length>0&&(0,S.jsxs)(`div`,{className:`card-foot`,children:[(0,S.jsx)(`span`,{className:`hint`,children:`Link another account`}),(0,S.jsx)(`div`,{className:`link-providers`,children:t.map(e=>(0,S.jsxs)(`a`,{className:`btn btn-sm`,href:`/auth/signin/${encodeURIComponent(e.id)}?link=1`,children:[(0,S.jsx)(l,{brand:e.brand,size:14}),e.label]},e.id))})]})]})}function D({sessions:n,providers:i}){let o=h(),{pending:c,error:l,run:d}=_();return(0,S.jsxs)(s,{labelledBy:`sessions`,title:`Sessions`,description:`Browsers and command lines signed in as you. Ending one signs it out at its next request.`,children:[l!==null&&(0,S.jsx)(`div`,{className:`card-body`,children:(0,S.jsx)(p,{error:l})}),n.length===0?(0,S.jsx)(u,{title:`No sessions`,children:`Nothing is signed in as you right now.`}):(0,S.jsx)(`div`,{className:`dt-wrap`,children:(0,S.jsxs)(`table`,{className:`dt`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:`Where`}),(0,S.jsx)(`th`,{className:`col-shrink`,children:`Last active`}),(0,S.jsx)(`th`,{className:`col-shrink`,children:`Expires`}),(0,S.jsx)(`th`,{className:`col-actions`,children:(0,S.jsx)(`span`,{className:`visually-hidden`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:n.map(n=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{children:(0,S.jsxs)(`span`,{className:`cell-account`,children:[n.kind===`cli`?(0,S.jsx)(t,{size:15}):(0,S.jsx)(a,{size:15}),(0,S.jsxs)(`span`,{className:`cell-stack`,children:[(0,S.jsxs)(`span`,{children:[n.label??(n.kind===`cli`?`Command line`:`Browser`),` `,n.current&&(0,S.jsx)(`span`,{className:`tag tag-blue`,children:`this browser`})]}),(0,S.jsxs)(`small`,{children:[n.kind===`cli`?`coffre login`:`via ${T(i,n.provider)}`,n.lastUsedIp!==null&&(0,S.jsxs)(S.Fragment,{children:[` · `,(0,S.jsx)(`span`,{className:`mono`,children:n.lastUsedIp})]})]})]})]})}),(0,S.jsx)(`td`,{className:`nowrap cell-muted`,children:(0,S.jsx)(m,{iso:n.lastUsedAt??n.createdAt,display:`relative`})}),(0,S.jsx)(`td`,{className:`nowrap cell-muted`,children:(0,S.jsx)(m,{iso:n.expiresAt,display:`relative`})}),(0,S.jsx)(`td`,{className:`col-actions`,children:n.current?(0,S.jsx)(`form`,{method:`post`,action:`/auth/signout`,children:(0,S.jsxs)(`button`,{className:`act`,type:`submit`,children:[(0,S.jsx)(e,{size:13}),`Sign out`]})}):(0,S.jsxs)(`button`,{className:`act`,disabled:c,onClick:()=>d(()=>o.sessions.revoke(n.id),()=>g.success(`Session ended`)),children:[(0,S.jsx)(r,{size:13}),`End`]})})]},n.id))})]})})]})}export{C as component};
@@ -1 +0,0 @@
1
- import{G as e,Ot as t,S as n,T as r,Tt as i,U as a,Z as o,c as s,ct as c,et as l,f as u,i as d,m as f,n as p,o as m}from"./page-BxW2MwaX.js";import{D as h,a as g,c as _,f as v,m as y,u as b}from"./preload-helper-BHuP8_FL.js";import{t as x}from"./audit-Dzj5DyKt.js";var S=t(i()),C=e=>typeof e==`string`&&e!==``?e:null,w=e=>typeof e==`number`?e:null;function T({project:e,environment:t,key:n}){let r=[e,t,n].filter(e=>e!==null);return r.length===0?[`coffre`]:[{place:r.join(`/`)}]}function E({project:e,environment:t}){return T({project:e,environment:t,key:null})}function D(e){if(e.subject!==null)return[{member:e.subject}];let t=C(e.metadata.principalId);return t===null?[`someone`]:[{member:`${e.metadata.principalType===`service`?`token`:`user`}:${t}`}]}function O(e,t,n=`${t}s`){return`${e} ${e===1?t:n}`}function k(e){return e.batch.length===1?T(e.entry):[...E(e.entry),e.refused?`, `:`: `,O(e.count,`secret`)]}function A(e){let t=C(e.metadata.destination);return t===null?``:` to ${t}`}function j(e){return C(e.metadata.destination)??`its destination`}var M={reveal:[`revealed`,`reveal`],run:[`ran`,`run`],compare:[`compared`,`compare`],sync:[`read`,`read`]};function N({entry:e}){return M[C(e.metadata.purpose)??`reveal`]??M.reveal}var P=e=>{let t=t=>[`${e} `,...e===`project`?T({...t.entry,environment:null,key:null}):E(t.entry)];return{[`${e}.create`]:{did:`created`,tried:`create`,what:t},[`${e}.update`]:{did:`changed`,tried:`change`,what:t},[`${e}.archive`]:{did:`archived`,tried:`archive`,what:t},[`${e}.restore`]:{did:`restored`,tried:`restore`,what:t}}},F={"secret.read":{did:e=>N(e)[0],tried:e=>N(e)[1],what:k},"secret.write":{did:({batch:e})=>{let t=e.filter(e=>e.version===1).length;return t===e.length?`added`:t===0?`changed`:`wrote`},tried:`change`,what:k,then:({entry:e,batch:t})=>t.length>1||e.version===null||e.version===1?[]:[`, now version ${e.version}`]},"secret.restore":{did:`restored`,tried:`restore`,what:({entry:e})=>[...T(e),...w(e.metadata.from)===null?[]:[` to version ${w(e.metadata.from)}`]],then:({entry:e})=>e.version===null?[]:[`, now ${e.version}`]},"secret.rename":{did:`renamed`,tried:`rename`,what:({entry:e})=>[...T(e),...C(e.metadata.nextKey)===null?[]:[` to ${C(e.metadata.nextKey)}`]]},"secret.archive":{did:`archived`,tried:`archive`,what:e=>T(e.entry)},"secret.unarchive":{did:`brought back`,tried:`bring back`,what:e=>T(e.entry)},...P(`project`),...P(`environment`),"access.grant":{did:`gave`,tried:`give`,what:({entry:e})=>[...D(e),` ${C(e.metadata.role)??`a role`} on `,...I(e)],then:({entry:e})=>[...C(e.metadata.previousRole)===null?[]:[`, was ${C(e.metadata.previousRole)}`],...C(e.metadata.expiresAt)===null?[]:[`, until ${C(e.metadata.expiresAt).slice(0,10)}`]]},"access.revoke":{did:`took`,tried:`take`,what:({entry:e})=>[...C(e.metadata.previousRole??e.metadata.role)===null?[`access to `]:[`${C(e.metadata.previousRole??e.metadata.role)} on `],...I(e),` from `,...D(e)]},"member.add":{did:`added`,tried:`add`,what:({entry:e})=>[...D(e),...e.metadata.rootAdmin===!0?[` as a root admin`]:e.metadata.owner===!0?[` as an owner`]:[]]},"member.remove":{did:`removed`,tried:`remove`,what:e=>D(e.entry),then:({entry:e})=>w(e.metadata.revoked)===null?[]:[`, who held ${O(w(e.metadata.revoked),`grant`)}`]},"member.restore":{did:`brought back`,tried:`bring back`,what:e=>D(e.entry)},"member.owner":{did:({entry:e})=>e.metadata.owner===!1?`took owner from`:`made`,tried:({entry:e})=>e.metadata.owner===!1?`take owner from`:`make`,what:({entry:e})=>[...D(e),...e.metadata.owner===!1?[]:[` an owner`]]},"sync.create":{did:`set up a sync of`,tried:`set up a sync of`,what:({entry:e})=>[...E(e),A(e)]},"sync.update":{did:({entry:e})=>e.metadata.paused===!0?`paused the sync of`:e.metadata.paused===!1?`resumed the sync of`:`changed the sync of`,tried:`change the sync of`,what:({entry:e})=>[...E(e),A(e)]},"sync.delete":{did:`removed the sync of`,tried:`remove the sync of`,what:({entry:e})=>[...E(e),A(e)]},"sync.push":{did:`pushed`,tried:`push`,what:e=>e.batch.length===1?[...T(e.entry),` to ${j(e.entry)}`]:[...E(e.entry),` to ${j(e.entry)}: ${O(e.count,`secret`)}`]},"sync.remove":{did:`removed`,tried:`remove`,what:e=>e.batch.length===1?[...T(e.entry),` from ${j(e.entry)}`]:[O(e.count,`secret`),` of `,...E(e.entry),` from ${j(e.entry)}`]},"vault.tampered":{did:`found`,tried:`check`,what:({entry:e})=>[...e.subject===null?[`an entry`]:[...D(e),`'s record`],` tampered with: ${R[e.reason??``]??`it fails its seal`}`]},"key.rotate":{did:`rotated its key`,tried:`rotate its key`,what:()=>[]},sign_in:{did:({entry:e})=>e.metadata.kind===`cli`?`signed in to the CLI`:`signed in`,tried:`sign in`,what:({entry:e})=>C(e.metadata.provider)===null?[]:[`with ${C(e.metadata.provider)}`]},sign_out:{did:`signed out`,tried:`sign out`,what:()=>[]},"token.create":{did:`issued a token to`,tried:`issue a token to`,what:e=>D(e.entry)},"token.revoke":{did:`revoked a token of`,tried:`revoke a token of`,what:e=>D(e.entry)},"device.approve":{did:`approved a CLI sign-in`,tried:`approve a CLI sign-in`,what:()=>[]},"device.deny":{did:`turned down a CLI sign-in`,tried:`turn down a CLI sign-in`,what:()=>[]},"account.link":{did:`linked`,tried:`link`,what:({entry:e})=>[`a ${C(e.metadata.provider)??`sign-in`} account`]},"account.unlink":{did:`unlinked`,tried:`unlink`,what:({entry:e})=>[`a ${C(e.metadata.provider)??`sign-in`} account`]},"key.wrap":{did:`sealed the key of`,tried:`seal the key of`,what:e=>L(e.entry)},"key.rewrap":{did:`resealed the key of`,tried:`reseal the key of`,what:e=>L(e.entry)},"key.intent":{did:`asked KMS about`,tried:`ask KMS about`,what:e=>k(e)},"key.check":{did:`recorded the check value of`,tried:`check`,what:({entry:e})=>[[`the`,C(e.metadata.kekProvider)===`local`?null:C(e.metadata.kekProvider),`vault key`,C(e.metadata.kekId)].filter(e=>e!==null).join(` `)]},"sync.run":{did:`ran the sync of`,tried:`run the sync of`,what:({entry:e})=>[...E(e),A(e)]},"audit.heartbeat":{did:`checked in`,tried:`check in`,what:()=>[]},"audit.checkpoint":{did:`signed the log`,tried:`sign the log`,what:({entry:e})=>w(e.metadata.seq)===null?[]:[`through entry ${w(e.metadata.seq)}`]},"secret.list":{did:`listed`,tried:`list`,what:({entry:e})=>E(e)},"secret.history":{did:`read the history of`,tried:`read the history of`,what:e=>T(e.entry)},"secret.update":{did:`changed`,tried:`change`,what:e=>T(e.entry)},"sync.list":{did:`listed the syncs of`,tried:`list the syncs of`,what:({entry:e})=>E(e)}};function I(e){return T({...e,key:null})}function L(e){return[...T(e),...e.version===null?[]:[`, version ${e.version}`]]}var R={mac:`it does not carry the vault's seal`,stale:`an older copy was put back`,forged_entry:`the vault did not write it`},z={no_grant:`no grant`,bulk_limit:`bulk limit`,expired:`grant expired`,removed:`removed from coffre`,not_a_member:`not a member`,not_registered:`not invited`,tampered:`their record was tampered with`,bad_claim:`the key did not match the secret`,not_allowed:`not allowed`,root_admin:`root admins are set by the deployment`,unknown_environment:`no such environment`,unknown_secret:`no such secret`,unknown_project:`no such project`,unusable_credential:`its token is not a secret they can read`,duplicate_destination:`already synced from elsewhere`,cannot_grant_sync:`cannot grant the sync its reads`,kms_unavailable:`KMS did not answer`,wrong_kek:`the vault's key is not the one that wrapped the data`},B={secret_read:`no grant to read it`,secret_write:`no grant to write`,secret_archive:`no grant to archive`,audit_read:`no grant to read the audit log`,environment_manage:`no grant to manage environments`,grant_manage:`no grant to manage access`,project_manage:`no grant to manage the project`};function V(e){return e===null?`refused`:e.startsWith(`missing_`)?B[e.slice(8)]??`no grant`:z[e]??e.replace(/_/g,` `)}var ee=[`sync.push`,`sync.remove`,`secret.write`,`secret.read`];function te(e){for(let t of ee){let n=e.find(e=>e.action===t);if(n!==void 0)return n}return e[0]}function H(e){let t=te(e),n=e.filter(e=>e.action===t.action),r=n.filter(e=>e.decision===`deny`),i=r.length===n.length,a={entry:t,batch:n,count:new Set(n.map(e=>`${e.project}/${e.environment}/${e.key}`)).size,refused:i},o=F[t.action];if(o===void 0)return{parts:[t.action,` `,...T(t)],refused:i};let s=e=>typeof e==`string`?e:e(a),c=o.what(a),l=c.length===0?[]:[` `];if(i){let e=V((r[0]??t).reason);return{parts:[`tried to `,s(o.tried),...l,...c,`: ${e}`],refused:i}}let u=r.length===0?[]:[`, ${r.length} refused: ${V(r[0].reason)}`];return{parts:[s(o.did),...l,...c,...o.then?.(a)??[],...u],refused:i}}function U(e){let t=e[0];if(t.actorType===`user`)return{member:`user:${t.actorId}`};if(t.actorType===`service`)return{member:`token:${t.actorId}`};if(t.actorId.startsWith(`sync:`)){let t=e.map(e=>C(e.metadata.provider)).find(e=>e!==null),n=t===void 0?void 0:W[t]??t;return n===void 0?`a sync`:`sync to ${n}`}return G[t.actorId]??t.actorId}var W={"github-actions":`GitHub`,vercel:`Vercel`,railway:`Railway`,"cloudflare-workers":`Cloudflare`},G={scheduler:`the scheduler`,cron:`the scheduler`,vault:`the vault`,app:`coffre`};function K(e){return[`vault`,`app`].filter(t=>e.some(e=>e.author===t)).join(`, `)}function q(e){let t=[],n=new Map;for(let r of e){let e=r.operationId===null?void 0:n.get(r.operationId);if(e!==void 0){e.push(r);continue}let i=[r];r.operationId!==null&&n.set(r.operationId,i),t.push(i)}return t}var J=[[`key.`,`key operation`,`key operations`],[`sign_in`,`sign-in`,`sign-ins`],[`sign_out`,`sign-out`,`sign-outs`],[`token.`,`token change`,`token changes`],[`device.`,`CLI sign-in approval`,`CLI sign-in approvals`],[`account.`,`account link`,`account links`],[`sync.run`,`sync run`,`sync runs`],[`audit.heartbeat`,`heartbeat`,`heartbeats`],[`audit.checkpoint`,`checkpoint`,`checkpoints`]];function Y(e){let t=new Map;for(let{action:n,count:r}of e){if(r===0)continue;let[,e,i]=J.find(([e])=>n.startsWith(e))??[n,n,n],a=t.get(e)??{one:e,many:i,count:0};a.count+=r,t.set(e,a)}let n=[...t.values()].map(({one:e,many:t,count:n})=>`${n} ${n===1?e:t}`);return n.length===0?null:n.length===1?n[0]:`${n.slice(0,-1).join(`, `)} and ${n.at(-1)}`}var X=c();function Z(){let{entries:t,chain:n}=x.useLoaderData(),i=x.useSearch(),{decision:s,actorId:c}=i,u=i.detail===`1`,v=s===`deny`;if(!t.ok)return(0,X.jsx)(p,{icon:(0,X.jsx)(r,{size:18}),label:`Audit`,title:`The audit log is closed to you`,children:t.error});let y=n.integrity===`broken`?n:null,b=y?.failedAtSeq??null,S=q(t.entries),C=u?null:Y(t.hidden??[]),w={decision:s,actorId:c};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(d,{title:`Audit`,actions:(0,X.jsx)(se,{chain:n})}),y!==null&&(0,X.jsx)(`div`,{style:{marginBottom:`1.25rem`},children:(0,X.jsxs)(_,{tone:`bad`,children:[(0,X.jsx)(`strong`,{children:`Treat this as an incident.`}),` `,y.failedAtSeq===null?`The log does not verify, found by the ${y.author}'s check: ${y.reason}.`:`The log breaks at entry ${y.failedAtSeq}, found by the ${y.author}'s check: ${y.reason}.`,` `,y.through!==null&&`Every entry through ${y.through} holds. `,`Something with direct access to the database has changed what it records`,y.failedAtSeq===null?``:`, and nothing from entry ${y.failedAtSeq} on can be relied on`,` until that is explained.`,b!==null&&!t.entries.some(e=>e.seq===b)&&(0,X.jsxs)(X.Fragment,{children:[` `,`Entry `,b,` is not among the entries below`,u?(0,X.jsxs)(X.Fragment,{children:[`; `,(0,X.jsx)(`code`,{children:`coffre audit`}),` lists them all.`]}):(0,X.jsxs)(X.Fragment,{children:[`: it may be detail,`,` `,(0,X.jsx)(h,{to:`/audit`,search:{...w,detail:`1`},children:`shown on request`}),`.`]})]})]})}),(0,X.jsx)(`p`,{className:`section-desc`,children:`Everything done in coffre, one line per action, refusals included, and who decided it: the app, or the vault, which holds the keys and the access.`}),(0,X.jsxs)(`div`,{className:`toolbar`,children:[(0,X.jsxs)(`nav`,{className:`segmented`,"aria-label":`Filter by decision`,children:[(0,X.jsx)(h,{to:`/audit`,search:{...w,decision:void 0,detail:i.detail},activeOptions:{exact:!0},children:`All events`}),(0,X.jsxs)(h,{to:`/audit`,search:{...w,decision:`deny`,detail:i.detail},activeOptions:{exact:!0},children:[(0,X.jsx)(e,{size:13}),`Denials only`]})]}),c!==void 0&&(0,X.jsxs)(h,{className:`filter-chip`,to:`/audit`,search:{...w,actorId:void 0,detail:i.detail},"aria-label":`Stop filtering by ${c}`,children:[`Actor `,(0,X.jsx)(`span`,{className:`mono`,children:c}),(0,X.jsx)(l,{size:13})]}),(0,X.jsxs)(h,{className:`detail-toggle`,to:`/audit`,search:{...w,detail:u?void 0:`1`},"aria-pressed":u,children:[(0,X.jsx)(`span`,{className:`switch`,"aria-hidden":`true`}),`Show detail`]})]}),(0,X.jsx)(`section`,{className:`card`,"aria-label":`Audit entries`,children:S.length===0?(0,X.jsx)(g,{title:v?`No denials recorded`:`Nothing recorded yet`,children:v?`Every decision reaches this log, refusals included. An empty page means nobody has been turned away.`:`The log fills as people read and write secrets and change who has access.`}):(0,X.jsx)(`div`,{className:`dt-wrap`,children:(0,X.jsxs)(`table`,{className:`dt audit events stacks`,children:[(0,X.jsx)(`thead`,{children:(0,X.jsxs)(`tr`,{children:[(0,X.jsx)(`th`,{className:`n`,title:`Sequence number in the log`,children:`#`}),(0,X.jsx)(`th`,{className:`col-shrink`,children:(0,X.jsxs)(`span`,{className:`th`,children:[(0,X.jsx)(f,{size:14}),`When (UTC)`]})}),(0,X.jsx)(`th`,{className:`col-shrink`,children:(0,X.jsxs)(`span`,{className:`th`,children:[(0,X.jsx)(o,{size:14}),`Who`]})}),(0,X.jsx)(`th`,{children:(0,X.jsxs)(`span`,{className:`th`,children:[(0,X.jsx)(m,{size:14}),`What they did`]})}),(0,X.jsx)(`th`,{className:`col-shrink`,children:(0,X.jsxs)(`span`,{className:`th`,children:[(0,X.jsx)(a,{size:14}),`Decided by`]})})]})}),(0,X.jsx)(`tbody`,{children:S.map(e=>(0,X.jsx)(ne,{batch:e,filters:w,detail:i.detail,breakAt:b},e[0].seq))})]})})}),C!==null&&(0,X.jsxs)(`p`,{className:`hint section-foot`,children:[`Hidden: `,C,`.`,` `,(0,X.jsx)(h,{to:`/audit`,search:{...w,detail:`1`},children:`Show detail`})]})]})}function ne({batch:e,filters:t,detail:n,breakAt:r}){let i=r!==null&&e.some(e=>e.seq===r),[a,o]=(0,S.useState)(i),s=e[0],c=H(e),l=e.map(e=>e.seq),d=e.length>1;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{entry:s,seq:d?`${Math.min(...l)}–${Math.max(...l)}`:String(s.seq),parts:c.parts,refused:c.refused,decided:K(e),filters:t,detail:n,breaks:i&&!d,marked:i,batch:e,toggle:d?(0,X.jsx)(`button`,{type:`button`,className:`batch-toggle`,"aria-expanded":a,"aria-label":a?`Hide each entry`:`Show each of ${e.length} entries`,onClick:()=>o(!a),children:(0,X.jsx)(u,{size:14})}):void 0}),d&&a&&e.map(e=>{let i=H([e]);return(0,X.jsx)(Q,{entry:e,seq:String(e.seq),parts:i.parts,refused:i.refused,decided:K([e]),filters:t,detail:n,breaks:e.seq===r,marked:!1,child:!0},e.seq)})]})}function Q({entry:t,seq:n,parts:r,refused:i,decided:a,filters:o,detail:c,breaks:l,marked:u,toggle:d,child:f=!1,batch:p}){let m=U(p??[t]),g=[i&&`is-denied`,(l||u)&&`is-break`,f&&`is-child`,t.detail&&`is-detail`,t.action===`vault.tampered`&&`is-tampered`].filter(Boolean);return(0,X.jsxs)(`tr`,{className:g.length===0?void 0:g.join(` `),children:[(0,X.jsx)(`td`,{className:`n`,"data-label":`Sequence`,children:n}),(0,X.jsx)(`td`,{className:`nowrap cell-mono`,"data-label":`When (UTC)`,children:(0,X.jsx)(b,{iso:t.occurredAt,precise:!0})}),(0,X.jsx)(`td`,{"data-label":`Who`,children:(0,X.jsx)(`span`,{className:`actor`,children:typeof m==`string`?(0,X.jsx)(h,{to:`/audit`,search:{...o,actorId:t.actorId,detail:c},children:m}):(0,X.jsx)(h,{to:`/audit`,search:{...o,actorId:t.actorId,detail:c},children:$(m.member)})})}),(0,X.jsx)(`td`,{className:`cell-sentence`,"data-label":`What they did`,children:(0,X.jsxs)(`span`,{className:`sentence`,children:[d,t.action===`vault.tampered`&&(0,X.jsx)(s,{size:13}),(0,X.jsx)(re,{parts:r}),l&&(0,X.jsx)(oe,{})]})}),(0,X.jsx)(`td`,{className:`nowrap`,"data-label":`Decided by`,children:(0,X.jsxs)(`span`,{className:i?`decided decided-refused`:`decided`,children:[i&&(0,X.jsx)(e,{size:13}),a,i&&`, refused`]})})]})}function re({parts:e}){return(0,X.jsx)(X.Fragment,{children:e.map((e,t)=>(0,X.jsx)(S.Fragment,{children:typeof e==`string`?e:`place`in e?(0,X.jsx)(ie,{path:e.place}):(0,X.jsx)(ae,{member:e.member})},t))})}function ie({path:e}){let[t,n]=e.split(`/`),r=(0,X.jsx)(`span`,{className:`mono`,children:y(e)});return n===void 0?(0,X.jsx)(h,{to:`/projects/$project`,params:{project:t},children:r}):(0,X.jsx)(h,{to:`/projects/$project/$environment`,params:{project:t,environment:n},children:r})}function ae({member:e}){return e.startsWith(`token:`)?(0,X.jsx)(h,{to:`/tokens/$token`,params:{token:e.slice(6)},children:e}):(0,X.jsx)(h,{to:`/users/$user`,params:{user:$(e)},children:$(e)})}function $(e){return e.startsWith(`user:`)?e.slice(5):e}function oe(){return(0,X.jsxs)(`span`,{className:`break-mark`,children:[(0,X.jsx)(s,{size:11}),`breaks here`]})}function se({chain:e}){return e.integrity===`owners-only`?(0,X.jsx)(v,{align:`end`,label:`Owners and root admins see whether the log is intact. Checking it means recomputing every entry, and you read only your projects' part of it.`,children:(0,X.jsxs)(`button`,{type:`button`,className:`chain-note`,children:[(0,X.jsx)(n,{size:14}),`Verified by owners`]})}):e.integrity===`unknown`?(0,X.jsx)(v,{align:`end`,label:`coffre could not check the log: ${e.problem}. The entries below loaded, but whether they are intact is unknown until it can. Reload to try again.`,children:(0,X.jsxs)(`button`,{type:`button`,className:`chain-flag chain-flag-warn`,children:[(0,X.jsx)(s,{size:14}),`Log not verified`]})}):e.integrity===`broken`?(0,X.jsxs)(`span`,{className:`chain-flag chain-flag-bad`,role:`status`,children:[(0,X.jsx)(s,{size:14}),e.failedAtSeq===null?`Log does not verify`:`Log broken at ${e.failedAtSeq}`]}):(0,X.jsxs)(`div`,{className:`chain`,children:[e.pending>0&&(0,X.jsx)(v,{align:`end`,label:`Keys released through KMS whose outcome the vault has not logged yet. Each settles within seconds, or is logged as failed.`,children:(0,X.jsxs)(`button`,{type:`button`,className:`chain-note`,role:`status`,children:[e.pending,` key operation`,e.pending===1?``:`s`,` in flight`]})}),(0,X.jsx)(v,{align:`end`,label:`Every entry through ${e.through??0} holds, under the app's key and the vault's.`+(e.checkpoint===null?` The vault has not signed the log yet.`:` The vault last signed it through entry ${e.checkpoint.seq}, at ${e.checkpoint.signedAt}.`),children:(0,X.jsxs)(`button`,{type:`button`,className:`chain-seal`,children:[(0,X.jsx)(a,{size:14}),e.through===null?`Verified`:`Verified through ${e.through}`]})})]})}export{Z as component};