@coffre/ui 0.1.17 → 0.2.0
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.
- package/README.md +23 -3
- package/dist/{server/_coffre/assets/affordances-CKANXDTG.js → chunks/affordances-DAvsVz7u.js} +12 -7
- package/dist/chunks/affordances-DAvsVz7u.js.map +1 -0
- package/dist/chunks/directory-CSjWWUQ1.js +370 -0
- package/dist/chunks/directory-CSjWWUQ1.js.map +1 -0
- package/dist/{server/_coffre/assets/grants-DdKT11Ny.js → chunks/grants-saMQagmG.js} +41 -39
- package/dist/chunks/grants-saMQagmG.js.map +1 -0
- package/dist/chunks/icons-D-PfAfnH.js +203 -0
- package/dist/chunks/icons-D-PfAfnH.js.map +1 -0
- package/dist/chunks/mounted-jJmqqV_n.js +17 -0
- package/dist/chunks/mounted-jJmqqV_n.js.map +1 -0
- package/dist/{server/_coffre/assets/offboarding-CRz-K82H.js → chunks/offboarding-C6l30DZR.js} +70 -69
- package/dist/chunks/offboarding-C6l30DZR.js.map +1 -0
- package/dist/chunks/page-C5HcNqf2.js +190 -0
- package/dist/chunks/page-C5HcNqf2.js.map +1 -0
- package/dist/chunks/page-route-Drfw7lmn.js +20 -0
- package/dist/chunks/page-route-Drfw7lmn.js.map +1 -0
- package/dist/{server/_coffre/assets/principal-page-C-EFwJQw.js → chunks/principal-page-D_91OA0l.js} +105 -103
- package/dist/chunks/principal-page-D_91OA0l.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/project-environments-lEzFHUt4.js +2 -0
- package/dist/chunks/project-environments-lEzFHUt4.js.map +1 -0
- package/dist/chunks/queries-CQ81o4so.js +376 -0
- package/dist/chunks/queries-CQ81o4so.js.map +1 -0
- package/dist/{server/_coffre/assets/row-state-C2P57xT1.js → chunks/row-state-0PsrEzOL.js} +22 -21
- package/dist/chunks/row-state-0PsrEzOL.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/signin-errors-BEFlVDbQ.js +2 -0
- package/dist/chunks/signin-errors-BEFlVDbQ.js.map +1 -0
- package/dist/chunks/theme-B2vQolVR.js +86 -0
- package/dist/chunks/theme-B2vQolVR.js.map +1 -0
- package/dist/chunks/ui-DixXLQvQ.js +405 -0
- package/dist/chunks/ui-DixXLQvQ.js.map +1 -0
- package/dist/{server/_coffre/assets/use-action-B-xpvVRO.js → chunks/use-action-CWsg_YWU.js} +8 -6
- package/dist/chunks/use-action-CWsg_YWU.js.map +1 -0
- package/dist/{server/_coffre/assets/use-change-C8BCf3oU.js → chunks/use-change-c6CeLRin.js} +10 -474
- package/dist/chunks/use-change-c6CeLRin.js.map +1 -0
- package/dist/chunks/use-shell-jxd7Tzd-.js +26 -0
- package/dist/chunks/use-shell-jxd7Tzd-.js.map +1 -0
- package/dist/{server/_coffre/assets → chunks}/validation-BQtqPe2V.js +2 -0
- package/dist/chunks/validation-BQtqPe2V.js.map +1 -0
- package/dist/index.d.ts +386 -18
- package/dist/index.js +1147 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/account.d.ts +9 -0
- package/dist/pages/account.js +334 -0
- package/dist/pages/account.js.map +1 -0
- package/dist/pages/audit.d.ts +3 -0
- package/dist/{server/_coffre/assets/audit-qB9G2AQJ.js → pages/audit.js} +102 -100
- package/dist/pages/audit.js.map +1 -0
- package/dist/pages/device-login.d.ts +9 -0
- package/dist/pages/device-login.js +211 -0
- package/dist/pages/device-login.js.map +1 -0
- package/dist/pages/environment.d.ts +3 -0
- package/dist/{server/_coffre/assets/projects._project._environment-C6uybzeU.js → pages/environment.js} +323 -469
- package/dist/pages/environment.js.map +1 -0
- package/dist/pages/login.d.ts +10 -0
- package/dist/pages/login.js +104 -0
- package/dist/pages/login.js.map +1 -0
- package/dist/pages/project.d.ts +2 -0
- package/dist/{server/_coffre/assets/projects._project.index-3CXwkyTh.js → pages/project.js} +223 -225
- package/dist/pages/project.js.map +1 -0
- package/dist/pages/projects.d.ts +3 -0
- package/dist/{server/_coffre/assets/projects.index-iSoBpRFz.js → pages/projects.js} +83 -81
- package/dist/pages/projects.js.map +1 -0
- package/dist/pages/settings.d.ts +3 -0
- package/dist/{server/_coffre/assets/settings-BDQTF5XW.js → pages/settings.js} +20 -18
- package/dist/pages/settings.js.map +1 -0
- package/dist/pages/token.d.ts +3 -0
- package/dist/{server/_coffre/assets/tokens._token-CrBMpcbN.js → pages/token.js} +195 -265
- package/dist/pages/token.js.map +1 -0
- package/dist/pages/tokens.d.ts +3 -0
- package/dist/pages/tokens.js +39 -0
- package/dist/pages/tokens.js.map +1 -0
- package/dist/pages/unregistered.d.ts +8 -0
- package/dist/pages/unregistered.js +54 -0
- package/dist/pages/unregistered.js.map +1 -0
- package/dist/pages/user.d.ts +3 -0
- package/dist/pages/user.js +16 -0
- package/dist/pages/user.js.map +1 -0
- package/dist/pages/users.d.ts +3 -0
- package/dist/pages/users.js +39 -0
- package/dist/pages/users.js.map +1 -0
- package/dist/project-BqIy8gYR.d.ts +5 -0
- package/dist/vite.d.ts +16 -0
- package/dist/vite.js +52 -0
- package/package.json +36 -21
- package/src/assets/icon.svg +1 -0
- package/src/components/affordances.ts +10 -4
- package/src/components/command-palette.tsx +229 -203
- package/src/components/directory.tsx +34 -38
- package/src/components/principal.tsx +7 -3
- package/src/components/shell.tsx +89 -127
- package/src/components/theme.tsx +14 -81
- package/src/components/ui.tsx +97 -68
- package/src/index.ts +29 -0
- package/src/layout.tsx +113 -0
- package/src/lib/coffre.ts +8 -4
- package/src/lib/mounted.ts +13 -0
- package/src/lib/page-context.ts +31 -0
- package/src/lib/page-route.ts +22 -0
- package/src/lib/preferences.tsx +46 -0
- package/src/options.ts +240 -0
- package/src/{routes → pages}/account.tsx +7 -24
- package/src/{routes → pages}/audit.tsx +5 -16
- package/src/{routes/auth.device.tsx → pages/device-login.tsx} +8 -21
- package/src/{routes/projects.$project.$environment.tsx → pages/environment.tsx} +43 -52
- package/src/{routes → pages}/login.tsx +5 -16
- package/src/{routes/projects.$project.index.tsx → pages/project.tsx} +38 -50
- package/src/{routes/projects.index.tsx → pages/projects.tsx} +2 -7
- package/src/{routes → pages}/settings.tsx +3 -10
- package/src/{routes/tokens.$token.tsx → pages/token.tsx} +6 -7
- package/src/{routes/tokens.index.tsx → pages/tokens.tsx} +3 -8
- package/src/{routes → pages}/unregistered.tsx +1 -6
- package/src/pages/user.tsx +10 -0
- package/src/{routes/users.index.tsx → pages/users.tsx} +3 -8
- package/src/register.ts +55 -0
- package/src/router.tsx +31 -62
- package/src/styles/globals.css +104 -46
- package/src/vite.ts +78 -0
- package/dist/client/.assetsignore +0 -2
- package/dist/client/_coffre/assets/account-BoLGAxbD.js +0 -2
- package/dist/client/_coffre/assets/account-CnnuRTDB.js +0 -1
- package/dist/client/_coffre/assets/affordances-CEafRJcN.js +0 -1
- package/dist/client/_coffre/assets/audit-CHSvKLWX.js +0 -1
- package/dist/client/_coffre/assets/audit-Cn4hmS4u.js +0 -2
- package/dist/client/_coffre/assets/auth.device-Co5vrpaA.js +0 -2
- package/dist/client/_coffre/assets/auth.device-DAlqWacc.js +0 -1
- package/dist/client/_coffre/assets/directory-H8Eh3MnS.js +0 -1
- package/dist/client/_coffre/assets/dist-Braunv_x.js +0 -1
- package/dist/client/_coffre/assets/globals-CpMrgkV6.css +0 -1
- package/dist/client/_coffre/assets/grants-DPDxJXU1.js +0 -1
- package/dist/client/_coffre/assets/icons-Dc_-t0lp.js +0 -1
- package/dist/client/_coffre/assets/index-sUCIXRgJ.js +0 -12
- package/dist/client/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/client/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/client/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/client/_coffre/assets/link-DBINMwm6.js +0 -1
- package/dist/client/_coffre/assets/login-BZFYfL1Y.js +0 -1
- package/dist/client/_coffre/assets/login-CYCKWTOD.js +0 -2
- package/dist/client/_coffre/assets/offboarding-Bwpftp3g.js +0 -1
- package/dist/client/_coffre/assets/page-C_hnzdaR.js +0 -1
- package/dist/client/_coffre/assets/preload-helper-CLkO85Nq.js +0 -1
- package/dist/client/_coffre/assets/principal-page-DLho8TSJ.js +0 -1
- package/dist/client/_coffre/assets/project-environments-CfIH5kFM.js +0 -1
- package/dist/client/_coffre/assets/projects._project._environment-DHRRvQw0.js +0 -3
- package/dist/client/_coffre/assets/projects._project._environment-TLI-RjBZ.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-BO-8FZIY.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-DGl921dP.js +0 -1
- package/dist/client/_coffre/assets/projects.index-BDn7Bhoo.js +0 -1
- package/dist/client/_coffre/assets/row-state-DJ-KLamZ.js +0 -1
- package/dist/client/_coffre/assets/settings-q9G1QvR_.js +0 -1
- package/dist/client/_coffre/assets/signin-errors-CroZWZgm.js +0 -1
- package/dist/client/_coffre/assets/suspense-O8sP0mEC.js +0 -1
- package/dist/client/_coffre/assets/tokens._token-B_qczpT9.js +0 -2
- package/dist/client/_coffre/assets/tokens._token-T-sqwMbz.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-CcXSZnAG.js +0 -1
- package/dist/client/_coffre/assets/ui-BXP2IqrW.js +0 -46
- package/dist/client/_coffre/assets/unregistered-D2JXJ90x.js +0 -1
- package/dist/client/_coffre/assets/use-action-BpzKWhgg.js +0 -1
- package/dist/client/_coffre/assets/use-change-CKj3Inq9.js +0 -1
- package/dist/client/_coffre/assets/use-shell-W0SusPkz.js +0 -1
- package/dist/client/_coffre/assets/useQuery-B-lxFSES.js +0 -1
- package/dist/client/_coffre/assets/useSuspenseQuery-BZ-nzHST.js +0 -1
- package/dist/client/_coffre/assets/users._user-Bb3BGYHl.js +0 -1
- package/dist/client/_coffre/assets/users._user-DXmvKrzE.js +0 -2
- package/dist/client/_coffre/assets/users.index-BvzP3qwW.js +0 -1
- package/dist/client/_coffre/assets/validation-9Cl_XS-l.js +0 -1
- package/dist/server/.vite/manifest.json +0 -668
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-GsKnGGRy.js +0 -162
- package/dist/server/_coffre/assets/account-CV-a2IU2.js +0 -329
- package/dist/server/_coffre/assets/account-hk6wcIXU.js +0 -162
- package/dist/server/_coffre/assets/async-local-storage-C10uQtMM.js +0 -3108
- package/dist/server/_coffre/assets/audit-C1_Ej6YB.js +0 -31
- package/dist/server/_coffre/assets/auth.device-6JRrWbSV.js +0 -210
- package/dist/server/_coffre/assets/auth.device-CLoAxC2T.js +0 -29
- package/dist/server/_coffre/assets/directory-B-_rqsPx.js +0 -371
- package/dist/server/_coffre/assets/dist-CnnV3t2g.js +0 -908
- package/dist/server/_coffre/assets/empty-plugin-adapters-Cq4--YW-.js +0 -5
- package/dist/server/_coffre/assets/globals-CpMrgkV6.css +0 -1
- package/dist/server/_coffre/assets/icons-DOFT-eWB.js +0 -1704
- package/dist/server/_coffre/assets/inter-cyrillic-ext-opsz-normal-CfYZpDVp.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-cyrillic-opsz-normal-BFQXbQ-f.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-greek-ext-opsz-normal-BmPQvyvo.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-greek-opsz-normal-BM0NlUE_.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-latin-ext-opsz-normal-DpK-iCPk.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-latin-opsz-normal-BwkfbSeq.woff2 +0 -0
- package/dist/server/_coffre/assets/inter-vietnamese-opsz-normal-Ci9T9ieq.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/dist/server/_coffre/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
- package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +0 -480
- package/dist/server/_coffre/assets/link-42ZWdjzZ.js +0 -422
- package/dist/server/_coffre/assets/login-DRKUKkaW.js +0 -22
- package/dist/server/_coffre/assets/login-DnwxVl4Y.js +0 -102
- package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +0 -56
- package/dist/server/_coffre/assets/page-D6n45dcK.js +0 -3561
- package/dist/server/_coffre/assets/projects._project._environment-CS8DdSMY.js +0 -48
- package/dist/server/_coffre/assets/projects._project.index-BGfcNpj0.js +0 -23
- package/dist/server/_coffre/assets/react-dom-bBoJXlK2.js +0 -1718
- package/dist/server/_coffre/assets/router-9BTgJhWG.js +0 -2322
- package/dist/server/_coffre/assets/start-DR3rN0St.js +0 -4
- package/dist/server/_coffre/assets/suspense-C-2QfDd2.js +0 -602
- package/dist/server/_coffre/assets/tokens._token-rY86Cjgp.js +0 -10
- package/dist/server/_coffre/assets/tokens.index-Bq5qDW9q.js +0 -37
- package/dist/server/_coffre/assets/ui-Cc0CGMtr.js +0 -14881
- package/dist/server/_coffre/assets/unregistered-D9ZKLOPJ.js +0 -53
- package/dist/server/_coffre/assets/use-shell-DwOzEi87.js +0 -462
- package/dist/server/_coffre/assets/useQuery-CTe86qFq.js +0 -8
- package/dist/server/_coffre/assets/useRouter-CaUSUNsw.js +0 -473
- package/dist/server/_coffre/assets/useSuspenseQuery-CSoHzrMb.js +0 -117
- package/dist/server/_coffre/assets/users._user-BmLKYeo_.js +0 -10
- package/dist/server/_coffre/assets/users._user-BmiHwQx3.js +0 -14
- package/dist/server/_coffre/assets/users.index-BiEax90r.js +0 -37
- package/dist/server/index.js +0 -13911
- package/src/assets/favicon-32.png +0 -0
- package/src/components/agentation.tsx +0 -34
- package/src/entry.ts +0 -19
- package/src/routeTree.gen.ts +0 -367
- package/src/routes/__root.tsx +0 -169
- package/src/routes/access.tsx +0 -11
- package/src/routes/index.tsx +0 -15
- package/src/routes/users.$user.tsx +0 -13
- package/src/types.ts +0 -21
|
@@ -1,422 +0,0 @@
|
|
|
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,22 +0,0 @@
|
|
|
1
|
-
import { n as createFileRoute, t as lazyRouteComponent } from "./lazyRouteComponent-CqBNCGuZ.js";
|
|
2
|
-
//#region src/routes/login.tsx
|
|
3
|
-
var $$splitComponentImporter = () => import("./login-DnwxVl4Y.js");
|
|
4
|
-
var Route = createFileRoute("/login")({
|
|
5
|
-
validateSearch: (search) => {
|
|
6
|
-
const out = {};
|
|
7
|
-
const { next, error } = search;
|
|
8
|
-
if (typeof next === "string" && next.startsWith("/") && !next.startsWith("//")) out.next = next;
|
|
9
|
-
if (typeof error === "string" && /^[a-z_]{1,40}$/.test(error)) out.error = error;
|
|
10
|
-
return out;
|
|
11
|
-
},
|
|
12
|
-
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
13
|
-
});
|
|
14
|
-
/**
|
|
15
|
-
* The front door, as `GET /api/auth` describes it.
|
|
16
|
-
*
|
|
17
|
-
* With coffre's own sign-in, one button per provider. Behind Cloudflare
|
|
18
|
-
* Access, Access authenticates people before any request arrives, so this
|
|
19
|
-
* page only explains why it is showing at all.
|
|
20
|
-
*/
|
|
21
|
-
//#endregion
|
|
22
|
-
export { Route as t };
|
|
@@ -1,102 +0,0 @@
|
|
|
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-D6n45dcK.js";
|
|
3
|
-
import { t as useShell } from "./use-shell-DwOzEi87.js";
|
|
4
|
-
import { a as ErrorLine, c as Spinner } from "./ui-Cc0CGMtr.js";
|
|
5
|
-
import { C as Lock, I as ShieldCheck, M as ProviderMark } from "./icons-DOFT-eWB.js";
|
|
6
|
-
import { t as Route } from "./login-DRKUKkaW.js";
|
|
7
|
-
import { t as signinErrorMessage } from "./signin-errors-BEFlVDbQ.js";
|
|
8
|
-
//#region src/routes/login.tsx?tsr-split=component
|
|
9
|
-
var import_react = /* @__PURE__ */ __toESM(require_react());
|
|
10
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
11
|
-
/**
|
|
12
|
-
* The front door, as `GET /api/auth` describes it.
|
|
13
|
-
*
|
|
14
|
-
* With coffre's own sign-in, one button per provider. Behind Cloudflare
|
|
15
|
-
* Access, Access authenticates people before any request arrives, so this
|
|
16
|
-
* page only explains why it is showing at all.
|
|
17
|
-
*/
|
|
18
|
-
function LoginPage() {
|
|
19
|
-
const { signin, access } = useShell().auth;
|
|
20
|
-
if (signin !== null) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderLoginPage, { ...signin });
|
|
21
|
-
return access?.assertion ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloudflareAuthenticationFailed, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloudflareAccessRequired, {});
|
|
22
|
-
}
|
|
23
|
-
function CloudflareAccessRequired() {
|
|
24
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ClosedDoor, {
|
|
25
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Lock, { size: 18 }),
|
|
26
|
-
label: "Cloudflare Access",
|
|
27
|
-
title: "Open coffre through Access",
|
|
28
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "This instance has no sign-in of its own. Cloudflare Access authenticates you before a request ever reaches coffre, and this request arrived without an Access assertion." }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Use the Access-protected hostname. A request straight to the origin is refused by design." })]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function CloudflareAuthenticationFailed() {
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ClosedDoor, {
|
|
33
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShieldCheck, { size: 18 }),
|
|
34
|
-
label: "Cloudflare Access",
|
|
35
|
-
title: "Your identity could not be confirmed",
|
|
36
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Cloudflare Access forwarded an identity assertion, but coffre could not verify it. The Access session may have expired, or the identity verifier may be unavailable." }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "Reopen coffre through its Access-protected hostname. If this keeps happening, tell whoever operates coffre." })]
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function ProviderLoginPage({ title, note, providers }) {
|
|
40
|
-
const { next, error } = Route.useSearch();
|
|
41
|
-
const message = signinErrorMessage(error);
|
|
42
|
-
const [leaving, setLeaving] = (0, import_react.useState)(null);
|
|
43
|
-
const query = next === void 0 ? "" : `?next=${encodeURIComponent(next)}`;
|
|
44
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", {
|
|
45
|
-
className: "card signin",
|
|
46
|
-
"aria-labelledby": "signin-title",
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
49
|
-
className: "signin-head",
|
|
50
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
|
51
|
-
className: "signin-title",
|
|
52
|
-
id: "signin-title",
|
|
53
|
-
children: title
|
|
54
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
55
|
-
className: "signin-lede",
|
|
56
|
-
children: note ?? "Sign in with your organization’s account. Only people an owner has invited can get in."
|
|
57
|
-
})]
|
|
58
|
-
}),
|
|
59
|
-
message !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
60
|
-
className: "signin-error",
|
|
61
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorLine, { error: message })
|
|
62
|
-
}),
|
|
63
|
-
providers.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
|
64
|
-
className: "signin-empty",
|
|
65
|
-
children: [
|
|
66
|
-
"No sign-in provider is configured. Whoever runs coffre lists them in",
|
|
67
|
-
" ",
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
69
|
-
className: "mono",
|
|
70
|
-
children: [
|
|
71
|
-
"signin(",
|
|
72
|
-
"{",
|
|
73
|
-
" providers ",
|
|
74
|
-
"}",
|
|
75
|
-
")"
|
|
76
|
-
]
|
|
77
|
-
}),
|
|
78
|
-
"."
|
|
79
|
-
]
|
|
80
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", {
|
|
81
|
-
className: "providers",
|
|
82
|
-
children: providers.map((provider) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", {
|
|
83
|
-
className: "btn provider",
|
|
84
|
-
href: `/auth/signin/${encodeURIComponent(provider.id)}${query}`,
|
|
85
|
-
"aria-busy": leaving === provider.id,
|
|
86
|
-
onClick: () => setLeaving(provider.id),
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
89
|
-
className: "provider-mark",
|
|
90
|
-
"aria-hidden": true,
|
|
91
|
-
children: leaving === provider.id ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spinner, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProviderMark, { brand: provider.brand })
|
|
92
|
-
}),
|
|
93
|
-
"Continue with ",
|
|
94
|
-
provider.label
|
|
95
|
-
]
|
|
96
|
-
}) }, provider.id))
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
//#endregion
|
|
102
|
-
export { LoginPage as component };
|
|
@@ -1,56 +0,0 @@
|
|
|
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 };
|