@coffre/ui 0.1.10 → 0.1.11

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 (167) hide show
  1. package/dist/client/_coffre/assets/account-BJAdDvZf.js +2 -0
  2. package/dist/client/_coffre/assets/account-D0jLpk5c.js +1 -0
  3. package/dist/client/_coffre/assets/affordances-Bq2-oUB5.js +1 -0
  4. package/dist/client/_coffre/assets/audit-C-pcBgKe.js +2 -0
  5. package/dist/client/_coffre/assets/audit-CHGlDeBB.js +1 -0
  6. package/dist/client/_coffre/assets/{auth.device-BP5FY0K1.js → auth.device-BndOUjse.js} +1 -1
  7. package/dist/client/_coffre/assets/auth.device-CWHNQn9W.js +2 -0
  8. package/dist/client/_coffre/assets/directory-nDExpkAz.js +1 -0
  9. package/dist/client/_coffre/assets/dist-QVHMLatb.js +1 -0
  10. package/dist/client/_coffre/assets/globals-CKBoTlyH.css +1 -0
  11. package/dist/client/_coffre/assets/grants-CjoOnxzz.js +1 -0
  12. package/dist/client/_coffre/assets/icons-BQ27Ds9u.js +1 -0
  13. package/dist/client/_coffre/assets/index-CUGytaO3.js +12 -0
  14. package/dist/client/_coffre/assets/link-DP8SVWon.js +1 -0
  15. package/dist/client/_coffre/assets/login-CeaxDMcr.js +2 -0
  16. package/dist/client/_coffre/assets/login-DrMgvqZn.js +1 -0
  17. package/dist/client/_coffre/assets/offboarding-CNr_1tnl.js +1 -0
  18. package/dist/client/_coffre/assets/page-CGmvjSy4.js +1 -0
  19. package/dist/client/_coffre/assets/preload-helper-ClBkJ19f.js +1 -0
  20. package/dist/client/_coffre/assets/principal-page-DNLb_q_e.js +1 -0
  21. package/dist/client/_coffre/assets/projects._project._environment-CHzbboGp.js +3 -0
  22. package/dist/client/_coffre/assets/projects._project._environment-DDxu_HHD.js +2 -0
  23. package/dist/client/_coffre/assets/projects._project.index-CIAsjvg6.js +2 -0
  24. package/dist/client/_coffre/assets/projects._project.index-DZ9l6d-1.js +1 -0
  25. package/dist/client/_coffre/assets/projects.index-4eUXreE_.js +1 -0
  26. package/dist/client/_coffre/assets/row-state-ByET1OKX.js +1 -0
  27. package/dist/client/_coffre/assets/settings-D2zp1Ssu.js +1 -0
  28. package/dist/client/_coffre/assets/suspense-C7KwSnTG.js +1 -0
  29. package/dist/client/_coffre/assets/tokens._token-DWmbqzNk.js +2 -0
  30. package/dist/client/_coffre/assets/tokens._token-Dui_4KfS.js +1 -0
  31. package/dist/client/_coffre/assets/tokens.index-CSi5Wxwf.js +1 -0
  32. package/dist/client/_coffre/assets/ui-BdipqGpP.js +46 -0
  33. package/dist/client/_coffre/assets/unregistered-CA7B4C1m.js +1 -0
  34. package/dist/client/_coffre/assets/use-action-DRm9yVhV.js +1 -0
  35. package/dist/client/_coffre/assets/use-change-BRRMJocl.js +1 -0
  36. package/dist/client/_coffre/assets/use-shell-BMGlJ25Q.js +1 -0
  37. package/dist/client/_coffre/assets/useQuery-D__2KBOs.js +1 -0
  38. package/dist/client/_coffre/assets/useSuspenseQuery-CSXyDALB.js +1 -0
  39. package/dist/client/_coffre/assets/users._user-BkNrX7Qf.js +1 -0
  40. package/dist/client/_coffre/assets/users._user-jbSvtdOg.js +2 -0
  41. package/dist/client/_coffre/assets/users.index-CKnQ1G76.js +1 -0
  42. package/dist/server/.vite/manifest.json +343 -246
  43. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js +162 -0
  44. package/dist/server/_coffre/assets/{account-CUQYGCYh.js → account-BocTPU1J.js} +150 -117
  45. package/dist/server/_coffre/assets/{account-DMlUoBxQ.js → account-CL8hOGhO.js} +10 -24
  46. package/dist/server/_coffre/assets/{affordances-BNaXjMOb.js → affordances-CKANXDTG.js} +2 -22
  47. package/dist/server/_coffre/assets/{async-local-storage-C0cwgkEr.js → async-local-storage-C10uQtMM.js} +3 -2
  48. package/dist/server/_coffre/assets/{audit-CCdSLmvK.js → audit-Bcka4vA6.js} +46 -16
  49. package/dist/server/_coffre/assets/audit-CSRQYIhu.js +31 -0
  50. package/dist/server/_coffre/assets/{auth.device-C05u5ROO.js → auth.device-CMcUISZY.js} +7 -5
  51. package/dist/server/_coffre/assets/{auth.device-BoFM1jcf.js → auth.device-DqO0T-rU.js} +5 -5
  52. package/dist/server/_coffre/assets/{directory-GsnYkse0.js → directory-CyYx6Jx1.js} +87 -112
  53. package/dist/server/_coffre/assets/{use-action-DwEmf58L.js → dist-CnnV3t2g.js} +3 -48
  54. package/dist/server/_coffre/assets/globals-CKBoTlyH.css +1 -0
  55. package/dist/server/_coffre/assets/grants-CRijabX0.js +158 -0
  56. package/dist/server/_coffre/assets/{page-BdnhpwvH.js → icons-Dy-5ccDF.js} +3 -196
  57. package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +480 -0
  58. package/dist/server/_coffre/assets/link-42ZWdjzZ.js +422 -0
  59. package/dist/server/_coffre/assets/{login-DUtCQju5.js → login-BI9tzJEy.js} +7 -5
  60. package/dist/server/_coffre/assets/{login-B2njIq_o.js → login-C-v88YwP.js} +2 -2
  61. package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +56 -0
  62. package/dist/server/_coffre/assets/{offboarding-8yMa7ViM.js → offboarding-1H0LavTd.js} +6 -4
  63. package/dist/server/_coffre/assets/page-D_mO0-sn.js +3592 -0
  64. package/dist/server/_coffre/assets/{principal-page-B8zPcS2b.js → principal-page-DQDoXute.js} +51 -42
  65. package/dist/server/_coffre/assets/{projects._project._environment-BZ5Z80V8.js → projects._project._environment-C-yVwC92.js} +168 -248
  66. package/dist/server/_coffre/assets/{projects._project._environment-DdIOc7wx.js → projects._project._environment-D_5R40of.js} +4 -11
  67. package/dist/server/_coffre/assets/{projects._project.index-CuEAUwGn.js → projects._project.index-A2BImFIT.js} +134 -96
  68. package/dist/server/_coffre/assets/{projects._project.index-DvbcU1kh.js → projects._project.index-BPPKxKrt.js} +5 -4
  69. package/dist/server/_coffre/assets/{projects.index-5HI0wOuG.js → projects.index-543IsPzY.js} +57 -55
  70. package/dist/server/_coffre/assets/{react-dom-qCTiwGGR.js → react-dom-bBoJXlK2.js} +417 -51
  71. package/dist/server/_coffre/assets/{router-CQDoql8s.js → router-CM3vK8QO.js} +376 -92
  72. package/dist/server/_coffre/assets/row-state-XBtDoIA4.js +117 -0
  73. package/dist/server/_coffre/assets/{settings-BVz78wjP.js → settings-BLVU74ym.js} +8 -6
  74. package/dist/server/_coffre/assets/suspense-CzYTwxOj.js +602 -0
  75. package/dist/server/_coffre/assets/tokens._token-B-hBgwBW.js +10 -0
  76. package/dist/server/_coffre/assets/{tokens._token-CWs3Mtki.js → tokens._token-aubAUonP.js} +97 -79
  77. package/dist/server/_coffre/assets/{tokens.index-Ck0LN7aC.js → tokens.index-4D3jwp5v.js} +9 -6
  78. package/dist/server/_coffre/assets/{ui-D_slKpSF.js → ui-BI3Bf72q.js} +7 -836
  79. package/dist/server/_coffre/assets/{unregistered-Z17da4Rc.js → unregistered-CagDxMyw.js} +5 -3
  80. package/dist/server/_coffre/assets/use-action-tzBZvjjQ.js +47 -0
  81. package/dist/server/_coffre/assets/use-change-Dggqxy5y.js +1212 -0
  82. package/dist/server/_coffre/assets/use-shell-CwStDfzX.js +462 -0
  83. package/dist/server/_coffre/assets/useQuery-C6_dBjem.js +8 -0
  84. package/dist/server/_coffre/assets/{useStore-DWGPqzXR.js → useRouter-CaUSUNsw.js} +1 -420
  85. package/dist/server/_coffre/assets/useSuspenseQuery-BuapQt_P.js +117 -0
  86. package/dist/server/_coffre/assets/{users._user-CMwj-VI9.js → users._user-137WNyxn.js} +4 -5
  87. package/dist/server/_coffre/assets/users._user-C252Iilj.js +10 -0
  88. package/dist/server/_coffre/assets/{users.index-fWHv6A30.js → users.index-DQHsfnal.js} +9 -6
  89. package/dist/server/index.js +6 -5
  90. package/package.json +5 -3
  91. package/src/components/directory.tsx +75 -104
  92. package/src/components/grants.tsx +60 -112
  93. package/src/components/principal-page.tsx +54 -67
  94. package/src/components/principal-picker.tsx +7 -16
  95. package/src/components/row-state.tsx +95 -0
  96. package/src/components/service-tokens.tsx +75 -64
  97. package/src/components/shell.tsx +1 -1
  98. package/src/components/syncs.tsx +42 -26
  99. package/src/lib/announce.ts +36 -0
  100. package/src/lib/changes.ts +498 -0
  101. package/src/lib/optimistic.ts +233 -0
  102. package/src/lib/queries.ts +393 -0
  103. package/src/lib/use-action.ts +20 -15
  104. package/src/lib/use-change.ts +42 -0
  105. package/src/lib/use-shell.ts +17 -0
  106. package/src/router.tsx +17 -9
  107. package/src/routes/__root.tsx +8 -38
  108. package/src/routes/account.tsx +163 -154
  109. package/src/routes/audit.tsx +51 -72
  110. package/src/routes/auth.device.tsx +4 -2
  111. package/src/routes/login.tsx +3 -2
  112. package/src/routes/projects.$project.$environment.tsx +226 -231
  113. package/src/routes/projects.$project.index.tsx +136 -118
  114. package/src/routes/projects.index.tsx +117 -145
  115. package/src/routes/settings.tsx +7 -7
  116. package/src/routes/tokens.$token.tsx +14 -17
  117. package/src/routes/tokens.index.tsx +8 -4
  118. package/src/routes/unregistered.tsx +3 -2
  119. package/src/routes/users.$user.tsx +4 -4
  120. package/src/routes/users.index.tsx +8 -4
  121. package/src/styles/globals.css +78 -1
  122. package/dist/client/_coffre/assets/account-B48wuSF8.js +0 -1
  123. package/dist/client/_coffre/assets/account-BkNyIDT7.js +0 -2
  124. package/dist/client/_coffre/assets/affordances-CmoY-8Xf.js +0 -1
  125. package/dist/client/_coffre/assets/audit-BvwKYb-5.js +0 -2
  126. package/dist/client/_coffre/assets/audit-D02H-zxS.js +0 -1
  127. package/dist/client/_coffre/assets/auth.device-DYOONgFF.js +0 -2
  128. package/dist/client/_coffre/assets/coffre-BBp7cKVa.js +0 -1
  129. package/dist/client/_coffre/assets/directory-Bu0EIxqI.js +0 -1
  130. package/dist/client/_coffre/assets/globals-Bh2x1gBM.css +0 -1
  131. package/dist/client/_coffre/assets/grants-DavcwofW.js +0 -1
  132. package/dist/client/_coffre/assets/index-CDPlq5rM.js +0 -12
  133. package/dist/client/_coffre/assets/login-C-wTm_t1.js +0 -2
  134. package/dist/client/_coffre/assets/login-CLLv1om9.js +0 -1
  135. package/dist/client/_coffre/assets/offboarding-DWsE2FSa.js +0 -1
  136. package/dist/client/_coffre/assets/page-DbSS7pYH.js +0 -1
  137. package/dist/client/_coffre/assets/preload-helper-DduCCcmc.js +0 -46
  138. package/dist/client/_coffre/assets/principal-page-Bp_iwuSd.js +0 -1
  139. package/dist/client/_coffre/assets/projects._project._environment-BMeX_B8l.js +0 -2
  140. package/dist/client/_coffre/assets/projects._project._environment-CT0A-hIU.js +0 -3
  141. package/dist/client/_coffre/assets/projects._project.index-C_xYOGLT.js +0 -2
  142. package/dist/client/_coffre/assets/projects._project.index-Chcf-cUd.js +0 -1
  143. package/dist/client/_coffre/assets/projects.index-CfOtb1X5.js +0 -2
  144. package/dist/client/_coffre/assets/projects.index-DSjOhLDh.js +0 -1
  145. package/dist/client/_coffre/assets/settings-BC9cUJNK.js +0 -1
  146. package/dist/client/_coffre/assets/settings-Bkj_E21y.js +0 -2
  147. package/dist/client/_coffre/assets/tokens._token-BA0KqvaW.js +0 -1
  148. package/dist/client/_coffre/assets/tokens._token-Dh9jLOkm.js +0 -2
  149. package/dist/client/_coffre/assets/tokens.index-BgAMWkHT.js +0 -2
  150. package/dist/client/_coffre/assets/tokens.index-CHueIAv1.js +0 -1
  151. package/dist/client/_coffre/assets/unregistered-D5go1AfR.js +0 -1
  152. package/dist/client/_coffre/assets/use-action-l__xZDYY.js +0 -1
  153. package/dist/client/_coffre/assets/users._user-Dwqa0gv5.js +0 -1
  154. package/dist/client/_coffre/assets/users._user-xJAb3T6Y.js +0 -2
  155. package/dist/client/_coffre/assets/users.index-BJoF-L37.js +0 -2
  156. package/dist/client/_coffre/assets/users.index-YUjtbTGy.js +0 -1
  157. package/dist/server/_coffre/assets/_tanstack-start-manifest_v-BKg2AlPu.js +0 -133
  158. package/dist/server/_coffre/assets/audit-CThXn2v7.js +0 -74
  159. package/dist/server/_coffre/assets/coffre-C2ANsTAz.js +0 -281
  160. package/dist/server/_coffre/assets/globals-Bh2x1gBM.css +0 -1
  161. package/dist/server/_coffre/assets/grants-B6k4Fu9z.js +0 -243
  162. package/dist/server/_coffre/assets/projects.index-uiomWX_l.js +0 -54
  163. package/dist/server/_coffre/assets/settings-4oRyDizv.js +0 -18
  164. package/dist/server/_coffre/assets/tokens._token-CF_deAwq.js +0 -18
  165. package/dist/server/_coffre/assets/tokens.index-DF_07KEe.js +0 -10
  166. package/dist/server/_coffre/assets/users._user-DUzwkSKT.js +0 -10
  167. package/dist/server/_coffre/assets/users.index-BbuweTwH.js +0 -10
@@ -0,0 +1,422 @@
1
+ import { i as require_react, r as require_jsx_runtime, s as __toESM, t as useRouter } from "./useRouter-CaUSUNsw.js";
2
+ import { A as functionalUpdate, B as useIntersectionObserver, D as deepEqual, M as isDangerousProtocol, i as useHydrated, j as hasKeys, n as useStore, s as exactPathTest, t as require_react_dom, u as removeTrailingSlash, z as useForwardedRef } from "./react-dom-bBoJXlK2.js";
3
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/link.js
4
+ var preloadWarning = "Error preloading route! ☝️";
5
+ //#endregion
6
+ //#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/link.js
7
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
8
+ require_jsx_runtime();
9
+ var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
10
+ /**
11
+ * Build anchor-like props for declarative navigation and preloading.
12
+ *
13
+ * Returns stable `href`, event handlers and accessibility props derived from
14
+ * router options and active state. Used internally by `Link` and custom links.
15
+ *
16
+ * Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,
17
+ * `activeProps`, `inactiveProps`, and more.
18
+ *
19
+ * @returns React anchor props suitable for `<a>` or custom components.
20
+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook
21
+ */
22
+ function useLinkProps(options, forwardedRef) {
23
+ const router = useRouter();
24
+ const innerRef = useForwardedRef(forwardedRef);
25
+ const { activeProps, inactiveProps, activeOptions, to, preload: userPreload, preloadDelay: userPreloadDelay, preloadIntentProximity: _preloadIntentProximity, hashScrollIntoView, replace, startTransition, resetScroll, viewTransition, children, target, disabled, style, className, onClick, onBlur, onFocus, onMouseEnter, onMouseLeave, onTouchStart, ignoreBlocker, params: _params, search: _search, hash: _hash, state: _state, mask: _mask, reloadDocument: _reloadDocument, unsafeRelative: _unsafeRelative, from: _from, _fromLocation, ...propsSafeToSpread } = options;
26
+ {
27
+ const safeInternal = isSafeInternal(to);
28
+ if (typeof to === "string" && !safeInternal && to.indexOf(":") > -1) try {
29
+ new URL(to);
30
+ if (isDangerousProtocol(to, router.protocolAllowlist)) return {
31
+ ...propsSafeToSpread,
32
+ ref: innerRef,
33
+ href: void 0,
34
+ ...children && { children },
35
+ ...target && { target },
36
+ ...disabled && { disabled },
37
+ ...style && { style },
38
+ ...className && { className }
39
+ };
40
+ return {
41
+ ...propsSafeToSpread,
42
+ ref: innerRef,
43
+ href: to,
44
+ ...children && { children },
45
+ ...target && { target },
46
+ ...disabled && { disabled },
47
+ ...style && { style },
48
+ ...className && { className }
49
+ };
50
+ } catch {}
51
+ const next = router.buildLocation({
52
+ ...options,
53
+ from: options.from
54
+ });
55
+ const hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);
56
+ const externalLink = (() => {
57
+ if (hrefOption?.external) {
58
+ if (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) return;
59
+ return hrefOption.href;
60
+ }
61
+ if (safeInternal) return void 0;
62
+ if (typeof to === "string" && to.indexOf(":") > -1) try {
63
+ new URL(to);
64
+ if (isDangerousProtocol(to, router.protocolAllowlist)) return;
65
+ return to;
66
+ } catch {}
67
+ })();
68
+ const isActive = (() => {
69
+ if (externalLink) return false;
70
+ const currentLocation = router.stores.location.get();
71
+ const exact = activeOptions?.exact ?? false;
72
+ if (exact) {
73
+ if (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;
74
+ } else {
75
+ const currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);
76
+ const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
77
+ if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
78
+ }
79
+ if (activeOptions?.includeSearch ?? true) {
80
+ if (currentLocation.search !== next.search) {
81
+ const currentSearchEmpty = !currentLocation.search || typeof currentLocation.search === "object" && !hasKeys(currentLocation.search);
82
+ const nextSearchEmpty = !next.search || typeof next.search === "object" && !hasKeys(next.search);
83
+ if (!(currentSearchEmpty && nextSearchEmpty)) {
84
+ if (!deepEqual(currentLocation.search, next.search, {
85
+ partial: !exact,
86
+ ignoreUndefined: !activeOptions?.explicitUndefined
87
+ })) return false;
88
+ }
89
+ }
90
+ }
91
+ if (activeOptions?.includeHash) return false;
92
+ return true;
93
+ })();
94
+ if (externalLink) return {
95
+ ...propsSafeToSpread,
96
+ ref: innerRef,
97
+ href: externalLink,
98
+ ...children && { children },
99
+ ...target && { target },
100
+ ...disabled && { disabled },
101
+ ...style && { style },
102
+ ...className && { className }
103
+ };
104
+ const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
105
+ const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
106
+ const resolvedStyle = (() => {
107
+ const baseStyle = style;
108
+ const activeStyle = resolvedActiveProps.style;
109
+ const inactiveStyle = resolvedInactiveProps.style;
110
+ if (!baseStyle && !activeStyle && !inactiveStyle) return;
111
+ if (baseStyle && !activeStyle && !inactiveStyle) return baseStyle;
112
+ if (!baseStyle && activeStyle && !inactiveStyle) return activeStyle;
113
+ if (!baseStyle && !activeStyle && inactiveStyle) return inactiveStyle;
114
+ return {
115
+ ...baseStyle,
116
+ ...activeStyle,
117
+ ...inactiveStyle
118
+ };
119
+ })();
120
+ const resolvedClassName = (() => {
121
+ const baseClassName = className;
122
+ const activeClassName = resolvedActiveProps.className;
123
+ const inactiveClassName = resolvedInactiveProps.className;
124
+ if (!baseClassName && !activeClassName && !inactiveClassName) return "";
125
+ let out = "";
126
+ if (baseClassName) out = baseClassName;
127
+ if (activeClassName) out = out ? `${out} ${activeClassName}` : activeClassName;
128
+ if (inactiveClassName) out = out ? `${out} ${inactiveClassName}` : inactiveClassName;
129
+ return out;
130
+ })();
131
+ return {
132
+ ...propsSafeToSpread,
133
+ ...resolvedActiveProps,
134
+ ...resolvedInactiveProps,
135
+ href: hrefOption?.href,
136
+ ref: innerRef,
137
+ disabled: !!disabled,
138
+ target,
139
+ ...resolvedStyle && { style: resolvedStyle },
140
+ ...resolvedClassName && { className: resolvedClassName },
141
+ ...disabled && STATIC_DISABLED_PROPS,
142
+ ...isActive && STATIC_ACTIVE_PROPS
143
+ };
144
+ }
145
+ const isHydrated = useHydrated();
146
+ const _options = import_react.useMemo(() => options, [
147
+ router,
148
+ options.from,
149
+ options._fromLocation,
150
+ options.hash,
151
+ options.to,
152
+ options.search,
153
+ options.params,
154
+ options.state,
155
+ options.mask,
156
+ options.unsafeRelative
157
+ ]);
158
+ const currentLocation = useStore(router.stores.location, (l) => l, (prev, next) => prev.href === next.href);
159
+ const next = import_react.useMemo(() => {
160
+ const opts = {
161
+ _fromLocation: currentLocation,
162
+ ..._options
163
+ };
164
+ return router.buildLocation(opts);
165
+ }, [
166
+ router,
167
+ currentLocation,
168
+ _options
169
+ ]);
170
+ const hrefOptionPublicHref = next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref;
171
+ const hrefOptionExternal = next.maskedLocation ? next.maskedLocation.external : next.external;
172
+ const hrefOption = import_react.useMemo(() => getHrefOption(hrefOptionPublicHref, hrefOptionExternal, router.history, disabled), [
173
+ disabled,
174
+ hrefOptionExternal,
175
+ hrefOptionPublicHref,
176
+ router.history
177
+ ]);
178
+ const externalLink = import_react.useMemo(() => {
179
+ if (hrefOption?.external) {
180
+ if (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) return;
181
+ return hrefOption.href;
182
+ }
183
+ if (isSafeInternal(to)) return void 0;
184
+ if (typeof to !== "string" || to.indexOf(":") === -1) return void 0;
185
+ try {
186
+ new URL(to);
187
+ if (isDangerousProtocol(to, router.protocolAllowlist)) return;
188
+ return to;
189
+ } catch {}
190
+ }, [
191
+ to,
192
+ hrefOption,
193
+ router.protocolAllowlist
194
+ ]);
195
+ const isActive = import_react.useMemo(() => {
196
+ if (externalLink) return false;
197
+ if (activeOptions?.exact) {
198
+ if (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;
199
+ } else {
200
+ const currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);
201
+ const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
202
+ if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
203
+ }
204
+ if (activeOptions?.includeSearch ?? true) {
205
+ if (!deepEqual(currentLocation.search, next.search, {
206
+ partial: !activeOptions?.exact,
207
+ ignoreUndefined: !activeOptions?.explicitUndefined
208
+ })) return false;
209
+ }
210
+ if (activeOptions?.includeHash) return isHydrated && currentLocation.hash === next.hash;
211
+ return true;
212
+ }, [
213
+ activeOptions?.exact,
214
+ activeOptions?.explicitUndefined,
215
+ activeOptions?.includeHash,
216
+ activeOptions?.includeSearch,
217
+ currentLocation,
218
+ externalLink,
219
+ isHydrated,
220
+ next.hash,
221
+ next.pathname,
222
+ next.search,
223
+ router.basepath
224
+ ]);
225
+ const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
226
+ const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
227
+ const resolvedClassName = [
228
+ className,
229
+ resolvedActiveProps.className,
230
+ resolvedInactiveProps.className
231
+ ].filter(Boolean).join(" ");
232
+ const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
233
+ ...style,
234
+ ...resolvedActiveProps.style,
235
+ ...resolvedInactiveProps.style
236
+ };
237
+ const [isTransitioning, setIsTransitioning] = import_react.useState(false);
238
+ const hasRenderFetched = import_react.useRef(false);
239
+ const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
240
+ const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
241
+ const doPreload = import_react.useCallback(() => {
242
+ router.preloadRoute({
243
+ ..._options,
244
+ _builtLocation: next
245
+ }).catch((err) => {
246
+ console.warn(err);
247
+ console.warn(preloadWarning);
248
+ });
249
+ }, [
250
+ router,
251
+ _options,
252
+ next
253
+ ]);
254
+ useIntersectionObserver(innerRef, import_react.useCallback((entry) => {
255
+ if (entry?.isIntersecting) doPreload();
256
+ }, [doPreload]), intersectionObserverOptions, { disabled: !!disabled || !(preload === "viewport") });
257
+ import_react.useEffect(() => {
258
+ if (hasRenderFetched.current) return;
259
+ if (!disabled && preload === "render") {
260
+ doPreload();
261
+ hasRenderFetched.current = true;
262
+ }
263
+ }, [
264
+ disabled,
265
+ doPreload,
266
+ preload
267
+ ]);
268
+ const handleClick = (e) => {
269
+ const elementTarget = e.currentTarget.getAttribute("target");
270
+ const effectiveTarget = target !== void 0 ? target : elementTarget;
271
+ if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
272
+ e.preventDefault();
273
+ (0, import_react_dom.flushSync)(() => {
274
+ setIsTransitioning(true);
275
+ });
276
+ const unsub = router.subscribe("onResolved", () => {
277
+ unsub();
278
+ setIsTransitioning(false);
279
+ });
280
+ router.navigate({
281
+ ..._options,
282
+ replace,
283
+ resetScroll,
284
+ hashScrollIntoView,
285
+ startTransition,
286
+ viewTransition,
287
+ ignoreBlocker
288
+ });
289
+ }
290
+ };
291
+ if (externalLink) return {
292
+ ...propsSafeToSpread,
293
+ ref: innerRef,
294
+ href: externalLink,
295
+ ...children && { children },
296
+ ...target && { target },
297
+ ...disabled && { disabled },
298
+ ...style && { style },
299
+ ...className && { className },
300
+ ...onClick && { onClick },
301
+ ...onBlur && { onBlur },
302
+ ...onFocus && { onFocus },
303
+ ...onMouseEnter && { onMouseEnter },
304
+ ...onMouseLeave && { onMouseLeave },
305
+ ...onTouchStart && { onTouchStart }
306
+ };
307
+ const enqueueIntentPreload = (e) => {
308
+ if (disabled || preload !== "intent") return;
309
+ if (!preloadDelay) {
310
+ doPreload();
311
+ return;
312
+ }
313
+ const eventTarget = e.currentTarget;
314
+ if (timeoutMap.has(eventTarget)) return;
315
+ const id = setTimeout(() => {
316
+ timeoutMap.delete(eventTarget);
317
+ doPreload();
318
+ }, preloadDelay);
319
+ timeoutMap.set(eventTarget, id);
320
+ };
321
+ const handleTouchStart = (_) => {
322
+ if (disabled || preload !== "intent") return;
323
+ doPreload();
324
+ };
325
+ const handleLeave = (e) => {
326
+ if (disabled || !preload || !preloadDelay) return;
327
+ const eventTarget = e.currentTarget;
328
+ const id = timeoutMap.get(eventTarget);
329
+ if (id) {
330
+ clearTimeout(id);
331
+ timeoutMap.delete(eventTarget);
332
+ }
333
+ };
334
+ return {
335
+ ...propsSafeToSpread,
336
+ ...resolvedActiveProps,
337
+ ...resolvedInactiveProps,
338
+ href: hrefOption?.href,
339
+ ref: innerRef,
340
+ onClick: composeHandlers([onClick, handleClick]),
341
+ onBlur: composeHandlers([onBlur, handleLeave]),
342
+ onFocus: composeHandlers([onFocus, enqueueIntentPreload]),
343
+ onMouseEnter: composeHandlers([onMouseEnter, enqueueIntentPreload]),
344
+ onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
345
+ onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
346
+ disabled: !!disabled,
347
+ target,
348
+ ...resolvedStyle && { style: resolvedStyle },
349
+ ...resolvedClassName && { className: resolvedClassName },
350
+ ...disabled && STATIC_DISABLED_PROPS,
351
+ ...isActive && STATIC_ACTIVE_PROPS,
352
+ ...isHydrated && isTransitioning && STATIC_TRANSITIONING_PROPS
353
+ };
354
+ }
355
+ var STATIC_EMPTY_OBJECT = {};
356
+ var STATIC_ACTIVE_OBJECT = { className: "active" };
357
+ var STATIC_DISABLED_PROPS = {
358
+ role: "link",
359
+ "aria-disabled": true
360
+ };
361
+ var STATIC_ACTIVE_PROPS = {
362
+ "data-status": "active",
363
+ "aria-current": "page"
364
+ };
365
+ var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
366
+ var timeoutMap = /* @__PURE__ */ new WeakMap();
367
+ var intersectionObserverOptions = { rootMargin: "100px" };
368
+ var composeHandlers = (handlers) => (e) => {
369
+ for (const handler of handlers) {
370
+ if (!handler) continue;
371
+ if (e.defaultPrevented) return;
372
+ handler(e);
373
+ }
374
+ };
375
+ function getHrefOption(publicHref, external, history, disabled) {
376
+ if (disabled) return void 0;
377
+ if (external) return {
378
+ href: publicHref,
379
+ external: true
380
+ };
381
+ return {
382
+ href: history.createHref(publicHref) || "/",
383
+ external: false
384
+ };
385
+ }
386
+ function isSafeInternal(to) {
387
+ if (typeof to !== "string") return false;
388
+ const zero = to.charCodeAt(0);
389
+ if (zero === 47) return to.charCodeAt(1) !== 47;
390
+ return zero === 46;
391
+ }
392
+ /**
393
+ * A strongly-typed anchor component for declarative navigation.
394
+ * Handles path, search, hash and state updates with optional route preloading
395
+ * and active-state styling.
396
+ *
397
+ * Props:
398
+ * - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)
399
+ * - `preloadDelay`: Delay in ms before preloading on hover
400
+ * - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive
401
+ * - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation
402
+ * - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation
403
+ * - `ignoreBlocker`: Bypass registered blockers
404
+ *
405
+ * @returns An anchor-like element that navigates without full page reloads.
406
+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent
407
+ */
408
+ var Link = import_react.forwardRef((props, ref) => {
409
+ const { _asChild, ...rest } = props;
410
+ const { type: _type, ...linkProps } = useLinkProps(rest, ref);
411
+ const children = typeof rest.children === "function" ? rest.children({ isActive: linkProps["data-status"] === "active" }) : rest.children;
412
+ if (!_asChild) {
413
+ const { disabled: _, ...rest } = linkProps;
414
+ return import_react.createElement("a", rest, children);
415
+ }
416
+ return import_react.createElement(_asChild, linkProps, children);
417
+ });
418
+ function isCtrlEvent(e) {
419
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
420
+ }
421
+ //#endregion
422
+ export { Link as t };
@@ -1,7 +1,9 @@
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 } from "./ui-D_slKpSF.js";
3
- import { D as Lock, H as ShieldCheck, R as ProviderMark, n as ClosedDoor, tt as useLoaderData } from "./page-BdnhpwvH.js";
4
- import { t as Route } from "./login-B2njIq_o.js";
1
+ import { i as require_react, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
+ import { n as ClosedDoor } from "./page-D_mO0-sn.js";
3
+ import { t as useShell } from "./use-shell-CwStDfzX.js";
4
+ import { a as ErrorLine, c as Spinner } from "./ui-BI3Bf72q.js";
5
+ import { L as ShieldCheck, N as ProviderMark, S as Lock } from "./icons-Dy-5ccDF.js";
6
+ import { t as Route } from "./login-C-v88YwP.js";
5
7
  import { t as signinErrorMessage } from "./signin-errors-BEFlVDbQ.js";
6
8
  //#region src/routes/login.tsx?tsr-split=component
7
9
  var import_react = /* @__PURE__ */ __toESM(require_react());
@@ -14,7 +16,7 @@ var import_jsx_runtime = require_jsx_runtime();
14
16
  * page only explains why it is showing at all.
15
17
  */
16
18
  function LoginPage() {
17
- const { signin, access } = useLoaderData({ from: "__root__" }).auth;
19
+ const { signin, access } = useShell().auth;
18
20
  if (signin !== null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderLoginPage, { ...signin });
19
21
  return access?.assertion ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloudflareAuthenticationFailed, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloudflareAccessRequired, {});
20
22
  }
@@ -1,6 +1,6 @@
1
- import { C as lazyRouteComponent, w as createFileRoute } from "./ui-D_slKpSF.js";
1
+ import { n as createFileRoute, t as lazyRouteComponent } from "./lazyRouteComponent-CqBNCGuZ.js";
2
2
  //#region src/routes/login.tsx
3
- var $$splitComponentImporter = () => import("./login-DUtCQju5.js");
3
+ var $$splitComponentImporter = () => import("./login-BI9tzJEy.js");
4
4
  var Route = createFileRoute("/login")({
5
5
  validateSearch: (search) => {
6
6
  const out = {};
@@ -0,0 +1,56 @@
1
+ import { i as require_react, s as __toESM } from "./useRouter-CaUSUNsw.js";
2
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/root.js
3
+ /** Stable identifier used for the root route in a route tree. */
4
+ var rootRouteId = "__root__";
5
+ //#endregion
6
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/redirect.js
7
+ /**
8
+ * Create a redirect Response understood by TanStack Router.
9
+ *
10
+ * Use from route `loader`/`beforeLoad` or server functions to trigger a
11
+ * navigation. If `throw: true` is set, the redirect is thrown instead of
12
+ * returned. When an absolute `href` is supplied and `reloadDocument` is not
13
+ * set, a full-document navigation is inferred.
14
+ *
15
+ * @param opts Options for the redirect. Common fields:
16
+ * - `href`: absolute URL for external redirects; infers `reloadDocument`.
17
+ * - `statusCode`: HTTP status code to use (defaults to 307).
18
+ * - `headers`: additional headers to include on the Response.
19
+ * - Standard navigation options like `to`, `params`, `search`, `replace`,
20
+ * and `reloadDocument` for internal redirects.
21
+ * @returns A Response augmented with router navigation options.
22
+ * @link https://tanstack.com/router/latest/docs/framework/react/api/router/redirectFunction
23
+ */
24
+ function redirect(opts) {
25
+ opts.statusCode = opts.statusCode || opts.code || 307;
26
+ if (!opts._builtLocation && !opts.reloadDocument && typeof opts.href === "string") try {
27
+ new URL(opts.href);
28
+ opts.reloadDocument = true;
29
+ } catch {}
30
+ const headers = new Headers(opts.headers);
31
+ if (opts.href && headers.get("Location") === null) headers.set("Location", opts.href);
32
+ const response = new Response(null, {
33
+ status: opts.statusCode,
34
+ headers
35
+ });
36
+ response.options = opts;
37
+ if (opts.throw) throw response;
38
+ return response;
39
+ }
40
+ /** Check whether a value is a TanStack Router redirect Response. */
41
+ /** Check whether a value is a TanStack Router redirect Response. */
42
+ function isRedirect(obj) {
43
+ return obj instanceof Response && !!obj.options;
44
+ }
45
+ /** True if value is a redirect with a resolved `href` location. */
46
+ /** True if value is a redirect with a resolved `href` location. */
47
+ function isResolvedRedirect(obj) {
48
+ return isRedirect(obj) && !!obj.options.href;
49
+ }
50
+ //#endregion
51
+ //#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/matchContext.js
52
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
53
+ var matchContext = import_react.createContext(void 0);
54
+ var dummyMatchContext = import_react.createContext(void 0);
55
+ //#endregion
56
+ export { redirect as a, isResolvedRedirect as i, matchContext as n, rootRouteId as o, isRedirect as r, dummyMatchContext as t };
@@ -1,7 +1,9 @@
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-D_slKpSF.js";
3
- import { C as Key, X as User, f as ChevronRight, q as SyncMark, t as Card } from "./page-BdnhpwvH.js";
4
- import { c as PrincipalLink } from "./directory-GsnYkse0.js";
1
+ import { r as require_jsx_runtime } from "./useRouter-CaUSUNsw.js";
2
+ import { t as Link } from "./link-42ZWdjzZ.js";
3
+ import { t as Card } from "./page-D_mO0-sn.js";
4
+ import { i as EmptyState, l as Timestamp, s as Notice } from "./ui-BI3Bf72q.js";
5
+ import { G as User, H as SyncMark, s as ChevronRight, v as Key } from "./icons-Dy-5ccDF.js";
6
+ import { s as PrincipalLink } from "./directory-CyYx6Jx1.js";
5
7
  //#region src/components/offboarding.tsx
6
8
  var import_jsx_runtime = require_jsx_runtime();
7
9
  /**