@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.
- package/dist/client/_coffre/assets/account-BJAdDvZf.js +2 -0
- package/dist/client/_coffre/assets/account-D0jLpk5c.js +1 -0
- package/dist/client/_coffre/assets/affordances-Bq2-oUB5.js +1 -0
- package/dist/client/_coffre/assets/audit-C-pcBgKe.js +2 -0
- package/dist/client/_coffre/assets/audit-CHGlDeBB.js +1 -0
- package/dist/client/_coffre/assets/{auth.device-BP5FY0K1.js → auth.device-BndOUjse.js} +1 -1
- package/dist/client/_coffre/assets/auth.device-CWHNQn9W.js +2 -0
- package/dist/client/_coffre/assets/directory-nDExpkAz.js +1 -0
- package/dist/client/_coffre/assets/dist-QVHMLatb.js +1 -0
- package/dist/client/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/client/_coffre/assets/grants-CjoOnxzz.js +1 -0
- package/dist/client/_coffre/assets/icons-BQ27Ds9u.js +1 -0
- package/dist/client/_coffre/assets/index-CUGytaO3.js +12 -0
- package/dist/client/_coffre/assets/link-DP8SVWon.js +1 -0
- package/dist/client/_coffre/assets/login-CeaxDMcr.js +2 -0
- package/dist/client/_coffre/assets/login-DrMgvqZn.js +1 -0
- package/dist/client/_coffre/assets/offboarding-CNr_1tnl.js +1 -0
- package/dist/client/_coffre/assets/page-CGmvjSy4.js +1 -0
- package/dist/client/_coffre/assets/preload-helper-ClBkJ19f.js +1 -0
- package/dist/client/_coffre/assets/principal-page-DNLb_q_e.js +1 -0
- package/dist/client/_coffre/assets/projects._project._environment-CHzbboGp.js +3 -0
- package/dist/client/_coffre/assets/projects._project._environment-DDxu_HHD.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-CIAsjvg6.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-DZ9l6d-1.js +1 -0
- package/dist/client/_coffre/assets/projects.index-4eUXreE_.js +1 -0
- package/dist/client/_coffre/assets/row-state-ByET1OKX.js +1 -0
- package/dist/client/_coffre/assets/settings-D2zp1Ssu.js +1 -0
- package/dist/client/_coffre/assets/suspense-C7KwSnTG.js +1 -0
- package/dist/client/_coffre/assets/tokens._token-DWmbqzNk.js +2 -0
- package/dist/client/_coffre/assets/tokens._token-Dui_4KfS.js +1 -0
- package/dist/client/_coffre/assets/tokens.index-CSi5Wxwf.js +1 -0
- package/dist/client/_coffre/assets/ui-BdipqGpP.js +46 -0
- package/dist/client/_coffre/assets/unregistered-CA7B4C1m.js +1 -0
- package/dist/client/_coffre/assets/use-action-DRm9yVhV.js +1 -0
- package/dist/client/_coffre/assets/use-change-BRRMJocl.js +1 -0
- package/dist/client/_coffre/assets/use-shell-BMGlJ25Q.js +1 -0
- package/dist/client/_coffre/assets/useQuery-D__2KBOs.js +1 -0
- package/dist/client/_coffre/assets/useSuspenseQuery-CSXyDALB.js +1 -0
- package/dist/client/_coffre/assets/users._user-BkNrX7Qf.js +1 -0
- package/dist/client/_coffre/assets/users._user-jbSvtdOg.js +2 -0
- package/dist/client/_coffre/assets/users.index-CKnQ1G76.js +1 -0
- package/dist/server/.vite/manifest.json +343 -246
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js +162 -0
- package/dist/server/_coffre/assets/{account-CUQYGCYh.js → account-BocTPU1J.js} +150 -117
- package/dist/server/_coffre/assets/{account-DMlUoBxQ.js → account-CL8hOGhO.js} +10 -24
- package/dist/server/_coffre/assets/{affordances-BNaXjMOb.js → affordances-CKANXDTG.js} +2 -22
- package/dist/server/_coffre/assets/{async-local-storage-C0cwgkEr.js → async-local-storage-C10uQtMM.js} +3 -2
- package/dist/server/_coffre/assets/{audit-CCdSLmvK.js → audit-Bcka4vA6.js} +46 -16
- package/dist/server/_coffre/assets/audit-CSRQYIhu.js +31 -0
- package/dist/server/_coffre/assets/{auth.device-C05u5ROO.js → auth.device-CMcUISZY.js} +7 -5
- package/dist/server/_coffre/assets/{auth.device-BoFM1jcf.js → auth.device-DqO0T-rU.js} +5 -5
- package/dist/server/_coffre/assets/{directory-GsnYkse0.js → directory-CyYx6Jx1.js} +87 -112
- package/dist/server/_coffre/assets/{use-action-DwEmf58L.js → dist-CnnV3t2g.js} +3 -48
- package/dist/server/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/server/_coffre/assets/grants-CRijabX0.js +158 -0
- package/dist/server/_coffre/assets/{page-BdnhpwvH.js → icons-Dy-5ccDF.js} +3 -196
- package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +480 -0
- package/dist/server/_coffre/assets/link-42ZWdjzZ.js +422 -0
- package/dist/server/_coffre/assets/{login-DUtCQju5.js → login-BI9tzJEy.js} +7 -5
- package/dist/server/_coffre/assets/{login-B2njIq_o.js → login-C-v88YwP.js} +2 -2
- package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +56 -0
- package/dist/server/_coffre/assets/{offboarding-8yMa7ViM.js → offboarding-1H0LavTd.js} +6 -4
- package/dist/server/_coffre/assets/page-D_mO0-sn.js +3592 -0
- package/dist/server/_coffre/assets/{principal-page-B8zPcS2b.js → principal-page-DQDoXute.js} +51 -42
- package/dist/server/_coffre/assets/{projects._project._environment-BZ5Z80V8.js → projects._project._environment-C-yVwC92.js} +168 -248
- package/dist/server/_coffre/assets/{projects._project._environment-DdIOc7wx.js → projects._project._environment-D_5R40of.js} +4 -11
- package/dist/server/_coffre/assets/{projects._project.index-CuEAUwGn.js → projects._project.index-A2BImFIT.js} +134 -96
- package/dist/server/_coffre/assets/{projects._project.index-DvbcU1kh.js → projects._project.index-BPPKxKrt.js} +5 -4
- package/dist/server/_coffre/assets/{projects.index-5HI0wOuG.js → projects.index-543IsPzY.js} +57 -55
- package/dist/server/_coffre/assets/{react-dom-qCTiwGGR.js → react-dom-bBoJXlK2.js} +417 -51
- package/dist/server/_coffre/assets/{router-CQDoql8s.js → router-CM3vK8QO.js} +376 -92
- package/dist/server/_coffre/assets/row-state-XBtDoIA4.js +117 -0
- package/dist/server/_coffre/assets/{settings-BVz78wjP.js → settings-BLVU74ym.js} +8 -6
- package/dist/server/_coffre/assets/suspense-CzYTwxOj.js +602 -0
- package/dist/server/_coffre/assets/tokens._token-B-hBgwBW.js +10 -0
- package/dist/server/_coffre/assets/{tokens._token-CWs3Mtki.js → tokens._token-aubAUonP.js} +97 -79
- package/dist/server/_coffre/assets/{tokens.index-Ck0LN7aC.js → tokens.index-4D3jwp5v.js} +9 -6
- package/dist/server/_coffre/assets/{ui-D_slKpSF.js → ui-BI3Bf72q.js} +7 -836
- package/dist/server/_coffre/assets/{unregistered-Z17da4Rc.js → unregistered-CagDxMyw.js} +5 -3
- package/dist/server/_coffre/assets/use-action-tzBZvjjQ.js +47 -0
- package/dist/server/_coffre/assets/use-change-Dggqxy5y.js +1212 -0
- package/dist/server/_coffre/assets/use-shell-CwStDfzX.js +462 -0
- package/dist/server/_coffre/assets/useQuery-C6_dBjem.js +8 -0
- package/dist/server/_coffre/assets/{useStore-DWGPqzXR.js → useRouter-CaUSUNsw.js} +1 -420
- package/dist/server/_coffre/assets/useSuspenseQuery-BuapQt_P.js +117 -0
- package/dist/server/_coffre/assets/{users._user-CMwj-VI9.js → users._user-137WNyxn.js} +4 -5
- package/dist/server/_coffre/assets/users._user-C252Iilj.js +10 -0
- package/dist/server/_coffre/assets/{users.index-fWHv6A30.js → users.index-DQHsfnal.js} +9 -6
- package/dist/server/index.js +6 -5
- package/package.json +5 -3
- package/src/components/directory.tsx +75 -104
- package/src/components/grants.tsx +60 -112
- package/src/components/principal-page.tsx +54 -67
- package/src/components/principal-picker.tsx +7 -16
- package/src/components/row-state.tsx +95 -0
- package/src/components/service-tokens.tsx +75 -64
- package/src/components/shell.tsx +1 -1
- package/src/components/syncs.tsx +42 -26
- package/src/lib/announce.ts +36 -0
- package/src/lib/changes.ts +498 -0
- package/src/lib/optimistic.ts +233 -0
- package/src/lib/queries.ts +393 -0
- package/src/lib/use-action.ts +20 -15
- package/src/lib/use-change.ts +42 -0
- package/src/lib/use-shell.ts +17 -0
- package/src/router.tsx +17 -9
- package/src/routes/__root.tsx +8 -38
- package/src/routes/account.tsx +163 -154
- package/src/routes/audit.tsx +51 -72
- package/src/routes/auth.device.tsx +4 -2
- package/src/routes/login.tsx +3 -2
- package/src/routes/projects.$project.$environment.tsx +226 -231
- package/src/routes/projects.$project.index.tsx +136 -118
- package/src/routes/projects.index.tsx +117 -145
- package/src/routes/settings.tsx +7 -7
- package/src/routes/tokens.$token.tsx +14 -17
- package/src/routes/tokens.index.tsx +8 -4
- package/src/routes/unregistered.tsx +3 -2
- package/src/routes/users.$user.tsx +4 -4
- package/src/routes/users.index.tsx +8 -4
- package/src/styles/globals.css +78 -1
- package/dist/client/_coffre/assets/account-B48wuSF8.js +0 -1
- package/dist/client/_coffre/assets/account-BkNyIDT7.js +0 -2
- package/dist/client/_coffre/assets/affordances-CmoY-8Xf.js +0 -1
- package/dist/client/_coffre/assets/audit-BvwKYb-5.js +0 -2
- package/dist/client/_coffre/assets/audit-D02H-zxS.js +0 -1
- package/dist/client/_coffre/assets/auth.device-DYOONgFF.js +0 -2
- package/dist/client/_coffre/assets/coffre-BBp7cKVa.js +0 -1
- package/dist/client/_coffre/assets/directory-Bu0EIxqI.js +0 -1
- package/dist/client/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/client/_coffre/assets/grants-DavcwofW.js +0 -1
- package/dist/client/_coffre/assets/index-CDPlq5rM.js +0 -12
- package/dist/client/_coffre/assets/login-C-wTm_t1.js +0 -2
- package/dist/client/_coffre/assets/login-CLLv1om9.js +0 -1
- package/dist/client/_coffre/assets/offboarding-DWsE2FSa.js +0 -1
- package/dist/client/_coffre/assets/page-DbSS7pYH.js +0 -1
- package/dist/client/_coffre/assets/preload-helper-DduCCcmc.js +0 -46
- package/dist/client/_coffre/assets/principal-page-Bp_iwuSd.js +0 -1
- package/dist/client/_coffre/assets/projects._project._environment-BMeX_B8l.js +0 -2
- package/dist/client/_coffre/assets/projects._project._environment-CT0A-hIU.js +0 -3
- package/dist/client/_coffre/assets/projects._project.index-C_xYOGLT.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-Chcf-cUd.js +0 -1
- package/dist/client/_coffre/assets/projects.index-CfOtb1X5.js +0 -2
- package/dist/client/_coffre/assets/projects.index-DSjOhLDh.js +0 -1
- package/dist/client/_coffre/assets/settings-BC9cUJNK.js +0 -1
- package/dist/client/_coffre/assets/settings-Bkj_E21y.js +0 -2
- package/dist/client/_coffre/assets/tokens._token-BA0KqvaW.js +0 -1
- package/dist/client/_coffre/assets/tokens._token-Dh9jLOkm.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-BgAMWkHT.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-CHueIAv1.js +0 -1
- package/dist/client/_coffre/assets/unregistered-D5go1AfR.js +0 -1
- package/dist/client/_coffre/assets/use-action-l__xZDYY.js +0 -1
- package/dist/client/_coffre/assets/users._user-Dwqa0gv5.js +0 -1
- package/dist/client/_coffre/assets/users._user-xJAb3T6Y.js +0 -2
- package/dist/client/_coffre/assets/users.index-BJoF-L37.js +0 -2
- package/dist/client/_coffre/assets/users.index-YUjtbTGy.js +0 -1
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-BKg2AlPu.js +0 -133
- package/dist/server/_coffre/assets/audit-CThXn2v7.js +0 -74
- package/dist/server/_coffre/assets/coffre-C2ANsTAz.js +0 -281
- package/dist/server/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/server/_coffre/assets/grants-B6k4Fu9z.js +0 -243
- package/dist/server/_coffre/assets/projects.index-uiomWX_l.js +0 -54
- package/dist/server/_coffre/assets/settings-4oRyDizv.js +0 -18
- package/dist/server/_coffre/assets/tokens._token-CF_deAwq.js +0 -18
- package/dist/server/_coffre/assets/tokens.index-DF_07KEe.js +0 -10
- package/dist/server/_coffre/assets/users._user-DUzwkSKT.js +0 -10
- package/dist/server/_coffre/assets/users.index-BbuweTwH.js +0 -10
|
@@ -1,839 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/link.js
|
|
5
|
-
var preloadWarning = "Error preloading route! ☝️";
|
|
6
|
-
//#endregion
|
|
7
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/route.js
|
|
8
|
-
var BaseRoute = class {
|
|
9
|
-
get to() {
|
|
10
|
-
return this._to;
|
|
11
|
-
}
|
|
12
|
-
get id() {
|
|
13
|
-
return this._id;
|
|
14
|
-
}
|
|
15
|
-
get path() {
|
|
16
|
-
return this._path;
|
|
17
|
-
}
|
|
18
|
-
get fullPath() {
|
|
19
|
-
return this._fullPath;
|
|
20
|
-
}
|
|
21
|
-
constructor(options) {
|
|
22
|
-
this.init = (opts) => {
|
|
23
|
-
this.originalIndex = opts.originalIndex;
|
|
24
|
-
const options = this.options;
|
|
25
|
-
const isRoot = !options?.path && !options?.id;
|
|
26
|
-
this.parentRoute = this.options.getParentRoute?.();
|
|
27
|
-
if (isRoot) this._path = rootRouteId;
|
|
28
|
-
else if (!this.parentRoute) invariant();
|
|
29
|
-
let path = isRoot ? rootRouteId : options?.path;
|
|
30
|
-
if (path && path !== "/") path = trimPathLeft(path);
|
|
31
|
-
const customId = options?.id || path;
|
|
32
|
-
let id = isRoot ? rootRouteId : joinPaths([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, customId]);
|
|
33
|
-
if (path === "__root__") path = "/";
|
|
34
|
-
if (id !== "__root__") id = joinPaths(["/", id]);
|
|
35
|
-
const fullPath = id === "__root__" ? "/" : joinPaths([this.parentRoute.fullPath, path]);
|
|
36
|
-
this._path = path;
|
|
37
|
-
this._id = id;
|
|
38
|
-
this._fullPath = fullPath;
|
|
39
|
-
this._to = trimPathRight(fullPath);
|
|
40
|
-
};
|
|
41
|
-
this.addChildren = (children) => {
|
|
42
|
-
return this._addFileChildren(children);
|
|
43
|
-
};
|
|
44
|
-
this._addFileChildren = (children) => {
|
|
45
|
-
if (Array.isArray(children)) this.children = children;
|
|
46
|
-
if (typeof children === "object" && children !== null) this.children = Object.values(children);
|
|
47
|
-
return this;
|
|
48
|
-
};
|
|
49
|
-
this._addFileTypes = () => {
|
|
50
|
-
return this;
|
|
51
|
-
};
|
|
52
|
-
this.updateLoader = (options) => {
|
|
53
|
-
Object.assign(this.options, options);
|
|
54
|
-
return this;
|
|
55
|
-
};
|
|
56
|
-
this.update = (options) => {
|
|
57
|
-
Object.assign(this.options, options);
|
|
58
|
-
return this;
|
|
59
|
-
};
|
|
60
|
-
this.lazy = (lazyFn) => {
|
|
61
|
-
this.lazyFn = lazyFn;
|
|
62
|
-
return this;
|
|
63
|
-
};
|
|
64
|
-
this.redirect = (opts) => redirect({
|
|
65
|
-
from: this.fullPath,
|
|
66
|
-
...opts
|
|
67
|
-
});
|
|
68
|
-
this.options = options || {};
|
|
69
|
-
this.isRoot = !options?.getParentRoute;
|
|
70
|
-
if (options?.id && options?.path) throw new Error(`Route cannot have both an 'id' and a 'path' option.`);
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var BaseRootRoute = class extends BaseRoute {
|
|
74
|
-
constructor(options) {
|
|
75
|
-
super(options);
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
//#endregion
|
|
79
|
-
//#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/useLoaderDeps.js
|
|
80
|
-
/**
|
|
81
|
-
* Read and select the current route's loader dependencies object.
|
|
82
|
-
*
|
|
83
|
-
* Options:
|
|
84
|
-
* - `from`: Choose which route's loader deps to read
|
|
85
|
-
* - `select`: Map the deps to a derived value
|
|
86
|
-
* - `structuralSharing`: Enable structural sharing for stable references
|
|
87
|
-
*
|
|
88
|
-
* @returns The loader deps (or selected value) for the matched route.
|
|
89
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDepsHook
|
|
90
|
-
*/
|
|
91
|
-
function useLoaderDeps(opts) {
|
|
92
|
-
const { select, ...rest } = opts;
|
|
93
|
-
return useMatch({
|
|
94
|
-
...rest,
|
|
95
|
-
select: (match) => {
|
|
96
|
-
return select ? select(match.loaderDeps) : match.loaderDeps;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
//#endregion
|
|
101
|
-
//#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/useParams.js
|
|
102
|
-
/**
|
|
103
|
-
* Access the current route's path parameters with type-safety.
|
|
104
|
-
*
|
|
105
|
-
* Options:
|
|
106
|
-
* - `from`/`strict`: Specify the matched route and whether to enforce strict typing
|
|
107
|
-
* - `select`: Project the params object to a derived value for memoized renders
|
|
108
|
-
* - `structuralSharing`: Enable structural sharing for stable references
|
|
109
|
-
* - `shouldThrow`: Throw if the route is not found in strict contexts
|
|
110
|
-
*
|
|
111
|
-
* @returns The params object (or selected value) for the matched route.
|
|
112
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useParamsHook
|
|
113
|
-
*/
|
|
114
|
-
function useParams(opts) {
|
|
115
|
-
return useMatch({
|
|
116
|
-
from: opts.from,
|
|
117
|
-
shouldThrow: opts.shouldThrow,
|
|
118
|
-
structuralSharing: opts.structuralSharing,
|
|
119
|
-
strict: opts.strict,
|
|
120
|
-
select: (match) => {
|
|
121
|
-
const params = opts.strict === false ? match.params : match._strictParams;
|
|
122
|
-
return opts.select ? opts.select(params) : params;
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
//#endregion
|
|
127
|
-
//#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/useSearch.js
|
|
128
|
-
/**
|
|
129
|
-
* Read and select the current route's search parameters with type-safety.
|
|
130
|
-
*
|
|
131
|
-
* Options:
|
|
132
|
-
* - `from`/`strict`: Control which route's search is read and how strictly it's typed
|
|
133
|
-
* - `select`: Map the search object to a derived value for render optimization
|
|
134
|
-
* - `structuralSharing`: Enable structural sharing for stable references
|
|
135
|
-
* - `shouldThrow`: Throw when the route is not found (strict contexts)
|
|
136
|
-
*
|
|
137
|
-
* @returns The search object (or selected value) for the matched route.
|
|
138
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook
|
|
139
|
-
*/
|
|
140
|
-
function useSearch(opts) {
|
|
141
|
-
return useMatch({
|
|
142
|
-
from: opts.from,
|
|
143
|
-
strict: opts.strict,
|
|
144
|
-
shouldThrow: opts.shouldThrow,
|
|
145
|
-
structuralSharing: opts.structuralSharing,
|
|
146
|
-
select: (match) => {
|
|
147
|
-
return opts.select ? opts.select(match.search) : match.search;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
152
|
-
//#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/useNavigate.js
|
|
153
|
-
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
154
|
-
/**
|
|
155
|
-
* Imperative navigation hook.
|
|
156
|
-
*
|
|
157
|
-
* Returns a stable `navigate(options)` function to change the current location
|
|
158
|
-
* programmatically. Prefer the `Link` component for user-initiated navigation,
|
|
159
|
-
* and use this hook from effects, callbacks, or handlers where imperative
|
|
160
|
-
* navigation is required.
|
|
161
|
-
*
|
|
162
|
-
* Options:
|
|
163
|
-
* - `from`: Optional route base used to resolve relative `to` paths.
|
|
164
|
-
*
|
|
165
|
-
* @returns A function that accepts `NavigateOptions`.
|
|
166
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useNavigateHook
|
|
167
|
-
*/
|
|
168
|
-
function useNavigate(_defaultOpts) {
|
|
169
|
-
const router = useRouter();
|
|
170
|
-
return import_react.useCallback((options) => {
|
|
171
|
-
return router.navigate({
|
|
172
|
-
...options,
|
|
173
|
-
from: options.from ?? _defaultOpts?.from
|
|
174
|
-
});
|
|
175
|
-
}, [_defaultOpts?.from, router]);
|
|
176
|
-
}
|
|
177
|
-
//#endregion
|
|
178
|
-
//#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/useRouteContext.js
|
|
179
|
-
function useRouteContext(opts) {
|
|
180
|
-
return useMatch({
|
|
181
|
-
...opts,
|
|
182
|
-
select: (match) => opts.select ? opts.select(match.context) : match.context
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
//#endregion
|
|
186
|
-
//#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
|
|
187
|
-
var import_jsx_runtime = require_jsx_runtime();
|
|
188
|
-
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
|
|
189
|
-
/**
|
|
190
|
-
* Build anchor-like props for declarative navigation and preloading.
|
|
191
|
-
*
|
|
192
|
-
* Returns stable `href`, event handlers and accessibility props derived from
|
|
193
|
-
* router options and active state. Used internally by `Link` and custom links.
|
|
194
|
-
*
|
|
195
|
-
* Options cover `to`, `params`, `search`, `hash`, `state`, `preload`,
|
|
196
|
-
* `activeProps`, `inactiveProps`, and more.
|
|
197
|
-
*
|
|
198
|
-
* @returns React anchor props suitable for `<a>` or custom components.
|
|
199
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLinkPropsHook
|
|
200
|
-
*/
|
|
201
|
-
function useLinkProps(options, forwardedRef) {
|
|
202
|
-
const router = useRouter();
|
|
203
|
-
const innerRef = useForwardedRef(forwardedRef);
|
|
204
|
-
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;
|
|
205
|
-
{
|
|
206
|
-
const safeInternal = isSafeInternal(to);
|
|
207
|
-
if (typeof to === "string" && !safeInternal && to.indexOf(":") > -1) try {
|
|
208
|
-
new URL(to);
|
|
209
|
-
if (isDangerousProtocol(to, router.protocolAllowlist)) return {
|
|
210
|
-
...propsSafeToSpread,
|
|
211
|
-
ref: innerRef,
|
|
212
|
-
href: void 0,
|
|
213
|
-
...children && { children },
|
|
214
|
-
...target && { target },
|
|
215
|
-
...disabled && { disabled },
|
|
216
|
-
...style && { style },
|
|
217
|
-
...className && { className }
|
|
218
|
-
};
|
|
219
|
-
return {
|
|
220
|
-
...propsSafeToSpread,
|
|
221
|
-
ref: innerRef,
|
|
222
|
-
href: to,
|
|
223
|
-
...children && { children },
|
|
224
|
-
...target && { target },
|
|
225
|
-
...disabled && { disabled },
|
|
226
|
-
...style && { style },
|
|
227
|
-
...className && { className }
|
|
228
|
-
};
|
|
229
|
-
} catch {}
|
|
230
|
-
const next = router.buildLocation({
|
|
231
|
-
...options,
|
|
232
|
-
from: options.from
|
|
233
|
-
});
|
|
234
|
-
const hrefOption = getHrefOption(next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref, next.maskedLocation ? next.maskedLocation.external : next.external, router.history, disabled);
|
|
235
|
-
const externalLink = (() => {
|
|
236
|
-
if (hrefOption?.external) {
|
|
237
|
-
if (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) return;
|
|
238
|
-
return hrefOption.href;
|
|
239
|
-
}
|
|
240
|
-
if (safeInternal) return void 0;
|
|
241
|
-
if (typeof to === "string" && to.indexOf(":") > -1) try {
|
|
242
|
-
new URL(to);
|
|
243
|
-
if (isDangerousProtocol(to, router.protocolAllowlist)) return;
|
|
244
|
-
return to;
|
|
245
|
-
} catch {}
|
|
246
|
-
})();
|
|
247
|
-
const isActive = (() => {
|
|
248
|
-
if (externalLink) return false;
|
|
249
|
-
const currentLocation = router.stores.location.get();
|
|
250
|
-
const exact = activeOptions?.exact ?? false;
|
|
251
|
-
if (exact) {
|
|
252
|
-
if (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;
|
|
253
|
-
} else {
|
|
254
|
-
const currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);
|
|
255
|
-
const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
|
|
256
|
-
if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
|
|
257
|
-
}
|
|
258
|
-
if (activeOptions?.includeSearch ?? true) {
|
|
259
|
-
if (currentLocation.search !== next.search) {
|
|
260
|
-
const currentSearchEmpty = !currentLocation.search || typeof currentLocation.search === "object" && !hasKeys(currentLocation.search);
|
|
261
|
-
const nextSearchEmpty = !next.search || typeof next.search === "object" && !hasKeys(next.search);
|
|
262
|
-
if (!(currentSearchEmpty && nextSearchEmpty)) {
|
|
263
|
-
if (!deepEqual$1(currentLocation.search, next.search, {
|
|
264
|
-
partial: !exact,
|
|
265
|
-
ignoreUndefined: !activeOptions?.explicitUndefined
|
|
266
|
-
})) return false;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
if (activeOptions?.includeHash) return false;
|
|
271
|
-
return true;
|
|
272
|
-
})();
|
|
273
|
-
if (externalLink) return {
|
|
274
|
-
...propsSafeToSpread,
|
|
275
|
-
ref: innerRef,
|
|
276
|
-
href: externalLink,
|
|
277
|
-
...children && { children },
|
|
278
|
-
...target && { target },
|
|
279
|
-
...disabled && { disabled },
|
|
280
|
-
...style && { style },
|
|
281
|
-
...className && { className }
|
|
282
|
-
};
|
|
283
|
-
const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
|
|
284
|
-
const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
|
|
285
|
-
const resolvedStyle = (() => {
|
|
286
|
-
const baseStyle = style;
|
|
287
|
-
const activeStyle = resolvedActiveProps.style;
|
|
288
|
-
const inactiveStyle = resolvedInactiveProps.style;
|
|
289
|
-
if (!baseStyle && !activeStyle && !inactiveStyle) return;
|
|
290
|
-
if (baseStyle && !activeStyle && !inactiveStyle) return baseStyle;
|
|
291
|
-
if (!baseStyle && activeStyle && !inactiveStyle) return activeStyle;
|
|
292
|
-
if (!baseStyle && !activeStyle && inactiveStyle) return inactiveStyle;
|
|
293
|
-
return {
|
|
294
|
-
...baseStyle,
|
|
295
|
-
...activeStyle,
|
|
296
|
-
...inactiveStyle
|
|
297
|
-
};
|
|
298
|
-
})();
|
|
299
|
-
const resolvedClassName = (() => {
|
|
300
|
-
const baseClassName = className;
|
|
301
|
-
const activeClassName = resolvedActiveProps.className;
|
|
302
|
-
const inactiveClassName = resolvedInactiveProps.className;
|
|
303
|
-
if (!baseClassName && !activeClassName && !inactiveClassName) return "";
|
|
304
|
-
let out = "";
|
|
305
|
-
if (baseClassName) out = baseClassName;
|
|
306
|
-
if (activeClassName) out = out ? `${out} ${activeClassName}` : activeClassName;
|
|
307
|
-
if (inactiveClassName) out = out ? `${out} ${inactiveClassName}` : inactiveClassName;
|
|
308
|
-
return out;
|
|
309
|
-
})();
|
|
310
|
-
return {
|
|
311
|
-
...propsSafeToSpread,
|
|
312
|
-
...resolvedActiveProps,
|
|
313
|
-
...resolvedInactiveProps,
|
|
314
|
-
href: hrefOption?.href,
|
|
315
|
-
ref: innerRef,
|
|
316
|
-
disabled: !!disabled,
|
|
317
|
-
target,
|
|
318
|
-
...resolvedStyle && { style: resolvedStyle },
|
|
319
|
-
...resolvedClassName && { className: resolvedClassName },
|
|
320
|
-
...disabled && STATIC_DISABLED_PROPS,
|
|
321
|
-
...isActive && STATIC_ACTIVE_PROPS
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
const isHydrated = useHydrated();
|
|
325
|
-
const _options = import_react.useMemo(() => options, [
|
|
326
|
-
router,
|
|
327
|
-
options.from,
|
|
328
|
-
options._fromLocation,
|
|
329
|
-
options.hash,
|
|
330
|
-
options.to,
|
|
331
|
-
options.search,
|
|
332
|
-
options.params,
|
|
333
|
-
options.state,
|
|
334
|
-
options.mask,
|
|
335
|
-
options.unsafeRelative
|
|
336
|
-
]);
|
|
337
|
-
const currentLocation = useStore(router.stores.location, (l) => l, (prev, next) => prev.href === next.href);
|
|
338
|
-
const next = import_react.useMemo(() => {
|
|
339
|
-
const opts = {
|
|
340
|
-
_fromLocation: currentLocation,
|
|
341
|
-
..._options
|
|
342
|
-
};
|
|
343
|
-
return router.buildLocation(opts);
|
|
344
|
-
}, [
|
|
345
|
-
router,
|
|
346
|
-
currentLocation,
|
|
347
|
-
_options
|
|
348
|
-
]);
|
|
349
|
-
const hrefOptionPublicHref = next.maskedLocation ? next.maskedLocation.publicHref : next.publicHref;
|
|
350
|
-
const hrefOptionExternal = next.maskedLocation ? next.maskedLocation.external : next.external;
|
|
351
|
-
const hrefOption = import_react.useMemo(() => getHrefOption(hrefOptionPublicHref, hrefOptionExternal, router.history, disabled), [
|
|
352
|
-
disabled,
|
|
353
|
-
hrefOptionExternal,
|
|
354
|
-
hrefOptionPublicHref,
|
|
355
|
-
router.history
|
|
356
|
-
]);
|
|
357
|
-
const externalLink = import_react.useMemo(() => {
|
|
358
|
-
if (hrefOption?.external) {
|
|
359
|
-
if (isDangerousProtocol(hrefOption.href, router.protocolAllowlist)) return;
|
|
360
|
-
return hrefOption.href;
|
|
361
|
-
}
|
|
362
|
-
if (isSafeInternal(to)) return void 0;
|
|
363
|
-
if (typeof to !== "string" || to.indexOf(":") === -1) return void 0;
|
|
364
|
-
try {
|
|
365
|
-
new URL(to);
|
|
366
|
-
if (isDangerousProtocol(to, router.protocolAllowlist)) return;
|
|
367
|
-
return to;
|
|
368
|
-
} catch {}
|
|
369
|
-
}, [
|
|
370
|
-
to,
|
|
371
|
-
hrefOption,
|
|
372
|
-
router.protocolAllowlist
|
|
373
|
-
]);
|
|
374
|
-
const isActive = import_react.useMemo(() => {
|
|
375
|
-
if (externalLink) return false;
|
|
376
|
-
if (activeOptions?.exact) {
|
|
377
|
-
if (!exactPathTest(currentLocation.pathname, next.pathname, router.basepath)) return false;
|
|
378
|
-
} else {
|
|
379
|
-
const currentPathSplit = removeTrailingSlash(currentLocation.pathname, router.basepath);
|
|
380
|
-
const nextPathSplit = removeTrailingSlash(next.pathname, router.basepath);
|
|
381
|
-
if (!(currentPathSplit.startsWith(nextPathSplit) && (currentPathSplit.length === nextPathSplit.length || currentPathSplit[nextPathSplit.length] === "/"))) return false;
|
|
382
|
-
}
|
|
383
|
-
if (activeOptions?.includeSearch ?? true) {
|
|
384
|
-
if (!deepEqual$1(currentLocation.search, next.search, {
|
|
385
|
-
partial: !activeOptions?.exact,
|
|
386
|
-
ignoreUndefined: !activeOptions?.explicitUndefined
|
|
387
|
-
})) return false;
|
|
388
|
-
}
|
|
389
|
-
if (activeOptions?.includeHash) return isHydrated && currentLocation.hash === next.hash;
|
|
390
|
-
return true;
|
|
391
|
-
}, [
|
|
392
|
-
activeOptions?.exact,
|
|
393
|
-
activeOptions?.explicitUndefined,
|
|
394
|
-
activeOptions?.includeHash,
|
|
395
|
-
activeOptions?.includeSearch,
|
|
396
|
-
currentLocation,
|
|
397
|
-
externalLink,
|
|
398
|
-
isHydrated,
|
|
399
|
-
next.hash,
|
|
400
|
-
next.pathname,
|
|
401
|
-
next.search,
|
|
402
|
-
router.basepath
|
|
403
|
-
]);
|
|
404
|
-
const resolvedActiveProps = isActive ? functionalUpdate(activeProps, {}) ?? STATIC_ACTIVE_OBJECT : STATIC_EMPTY_OBJECT;
|
|
405
|
-
const resolvedInactiveProps = isActive ? STATIC_EMPTY_OBJECT : functionalUpdate(inactiveProps, {}) ?? STATIC_EMPTY_OBJECT;
|
|
406
|
-
const resolvedClassName = [
|
|
407
|
-
className,
|
|
408
|
-
resolvedActiveProps.className,
|
|
409
|
-
resolvedInactiveProps.className
|
|
410
|
-
].filter(Boolean).join(" ");
|
|
411
|
-
const resolvedStyle = (style || resolvedActiveProps.style || resolvedInactiveProps.style) && {
|
|
412
|
-
...style,
|
|
413
|
-
...resolvedActiveProps.style,
|
|
414
|
-
...resolvedInactiveProps.style
|
|
415
|
-
};
|
|
416
|
-
const [isTransitioning, setIsTransitioning] = import_react.useState(false);
|
|
417
|
-
const hasRenderFetched = import_react.useRef(false);
|
|
418
|
-
const preload = options.reloadDocument || externalLink ? false : userPreload ?? router.options.defaultPreload;
|
|
419
|
-
const preloadDelay = userPreloadDelay ?? router.options.defaultPreloadDelay ?? 0;
|
|
420
|
-
const doPreload = import_react.useCallback(() => {
|
|
421
|
-
router.preloadRoute({
|
|
422
|
-
..._options,
|
|
423
|
-
_builtLocation: next
|
|
424
|
-
}).catch((err) => {
|
|
425
|
-
console.warn(err);
|
|
426
|
-
console.warn(preloadWarning);
|
|
427
|
-
});
|
|
428
|
-
}, [
|
|
429
|
-
router,
|
|
430
|
-
_options,
|
|
431
|
-
next
|
|
432
|
-
]);
|
|
433
|
-
useIntersectionObserver(innerRef, import_react.useCallback((entry) => {
|
|
434
|
-
if (entry?.isIntersecting) doPreload();
|
|
435
|
-
}, [doPreload]), intersectionObserverOptions, { disabled: !!disabled || !(preload === "viewport") });
|
|
436
|
-
import_react.useEffect(() => {
|
|
437
|
-
if (hasRenderFetched.current) return;
|
|
438
|
-
if (!disabled && preload === "render") {
|
|
439
|
-
doPreload();
|
|
440
|
-
hasRenderFetched.current = true;
|
|
441
|
-
}
|
|
442
|
-
}, [
|
|
443
|
-
disabled,
|
|
444
|
-
doPreload,
|
|
445
|
-
preload
|
|
446
|
-
]);
|
|
447
|
-
const handleClick = (e) => {
|
|
448
|
-
const elementTarget = e.currentTarget.getAttribute("target");
|
|
449
|
-
const effectiveTarget = target !== void 0 ? target : elementTarget;
|
|
450
|
-
if (!disabled && !isCtrlEvent(e) && !e.defaultPrevented && (!effectiveTarget || effectiveTarget === "_self") && e.button === 0) {
|
|
451
|
-
e.preventDefault();
|
|
452
|
-
(0, import_react_dom.flushSync)(() => {
|
|
453
|
-
setIsTransitioning(true);
|
|
454
|
-
});
|
|
455
|
-
const unsub = router.subscribe("onResolved", () => {
|
|
456
|
-
unsub();
|
|
457
|
-
setIsTransitioning(false);
|
|
458
|
-
});
|
|
459
|
-
router.navigate({
|
|
460
|
-
..._options,
|
|
461
|
-
replace,
|
|
462
|
-
resetScroll,
|
|
463
|
-
hashScrollIntoView,
|
|
464
|
-
startTransition,
|
|
465
|
-
viewTransition,
|
|
466
|
-
ignoreBlocker
|
|
467
|
-
});
|
|
468
|
-
}
|
|
469
|
-
};
|
|
470
|
-
if (externalLink) return {
|
|
471
|
-
...propsSafeToSpread,
|
|
472
|
-
ref: innerRef,
|
|
473
|
-
href: externalLink,
|
|
474
|
-
...children && { children },
|
|
475
|
-
...target && { target },
|
|
476
|
-
...disabled && { disabled },
|
|
477
|
-
...style && { style },
|
|
478
|
-
...className && { className },
|
|
479
|
-
...onClick && { onClick },
|
|
480
|
-
...onBlur && { onBlur },
|
|
481
|
-
...onFocus && { onFocus },
|
|
482
|
-
...onMouseEnter && { onMouseEnter },
|
|
483
|
-
...onMouseLeave && { onMouseLeave },
|
|
484
|
-
...onTouchStart && { onTouchStart }
|
|
485
|
-
};
|
|
486
|
-
const enqueueIntentPreload = (e) => {
|
|
487
|
-
if (disabled || preload !== "intent") return;
|
|
488
|
-
if (!preloadDelay) {
|
|
489
|
-
doPreload();
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
const eventTarget = e.currentTarget;
|
|
493
|
-
if (timeoutMap.has(eventTarget)) return;
|
|
494
|
-
const id = setTimeout(() => {
|
|
495
|
-
timeoutMap.delete(eventTarget);
|
|
496
|
-
doPreload();
|
|
497
|
-
}, preloadDelay);
|
|
498
|
-
timeoutMap.set(eventTarget, id);
|
|
499
|
-
};
|
|
500
|
-
const handleTouchStart = (_) => {
|
|
501
|
-
if (disabled || preload !== "intent") return;
|
|
502
|
-
doPreload();
|
|
503
|
-
};
|
|
504
|
-
const handleLeave = (e) => {
|
|
505
|
-
if (disabled || !preload || !preloadDelay) return;
|
|
506
|
-
const eventTarget = e.currentTarget;
|
|
507
|
-
const id = timeoutMap.get(eventTarget);
|
|
508
|
-
if (id) {
|
|
509
|
-
clearTimeout(id);
|
|
510
|
-
timeoutMap.delete(eventTarget);
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
return {
|
|
514
|
-
...propsSafeToSpread,
|
|
515
|
-
...resolvedActiveProps,
|
|
516
|
-
...resolvedInactiveProps,
|
|
517
|
-
href: hrefOption?.href,
|
|
518
|
-
ref: innerRef,
|
|
519
|
-
onClick: composeHandlers([onClick, handleClick]),
|
|
520
|
-
onBlur: composeHandlers([onBlur, handleLeave]),
|
|
521
|
-
onFocus: composeHandlers([onFocus, enqueueIntentPreload]),
|
|
522
|
-
onMouseEnter: composeHandlers([onMouseEnter, enqueueIntentPreload]),
|
|
523
|
-
onMouseLeave: composeHandlers([onMouseLeave, handleLeave]),
|
|
524
|
-
onTouchStart: composeHandlers([onTouchStart, handleTouchStart]),
|
|
525
|
-
disabled: !!disabled,
|
|
526
|
-
target,
|
|
527
|
-
...resolvedStyle && { style: resolvedStyle },
|
|
528
|
-
...resolvedClassName && { className: resolvedClassName },
|
|
529
|
-
...disabled && STATIC_DISABLED_PROPS,
|
|
530
|
-
...isActive && STATIC_ACTIVE_PROPS,
|
|
531
|
-
...isHydrated && isTransitioning && STATIC_TRANSITIONING_PROPS
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
var STATIC_EMPTY_OBJECT = {};
|
|
535
|
-
var STATIC_ACTIVE_OBJECT = { className: "active" };
|
|
536
|
-
var STATIC_DISABLED_PROPS = {
|
|
537
|
-
role: "link",
|
|
538
|
-
"aria-disabled": true
|
|
539
|
-
};
|
|
540
|
-
var STATIC_ACTIVE_PROPS = {
|
|
541
|
-
"data-status": "active",
|
|
542
|
-
"aria-current": "page"
|
|
543
|
-
};
|
|
544
|
-
var STATIC_TRANSITIONING_PROPS = { "data-transitioning": "transitioning" };
|
|
545
|
-
var timeoutMap = /* @__PURE__ */ new WeakMap();
|
|
546
|
-
var intersectionObserverOptions = { rootMargin: "100px" };
|
|
547
|
-
var composeHandlers = (handlers) => (e) => {
|
|
548
|
-
for (const handler of handlers) {
|
|
549
|
-
if (!handler) continue;
|
|
550
|
-
if (e.defaultPrevented) return;
|
|
551
|
-
handler(e);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
function getHrefOption(publicHref, external, history, disabled) {
|
|
555
|
-
if (disabled) return void 0;
|
|
556
|
-
if (external) return {
|
|
557
|
-
href: publicHref,
|
|
558
|
-
external: true
|
|
559
|
-
};
|
|
560
|
-
return {
|
|
561
|
-
href: history.createHref(publicHref) || "/",
|
|
562
|
-
external: false
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
function isSafeInternal(to) {
|
|
566
|
-
if (typeof to !== "string") return false;
|
|
567
|
-
const zero = to.charCodeAt(0);
|
|
568
|
-
if (zero === 47) return to.charCodeAt(1) !== 47;
|
|
569
|
-
return zero === 46;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* A strongly-typed anchor component for declarative navigation.
|
|
573
|
-
* Handles path, search, hash and state updates with optional route preloading
|
|
574
|
-
* and active-state styling.
|
|
575
|
-
*
|
|
576
|
-
* Props:
|
|
577
|
-
* - `preload`: Controls route preloading (eg. 'intent', 'render', 'viewport', true/false)
|
|
578
|
-
* - `preloadDelay`: Delay in ms before preloading on hover
|
|
579
|
-
* - `activeProps`/`inactiveProps`: Additional props merged when link is active/inactive
|
|
580
|
-
* - `resetScroll`/`hashScrollIntoView`: Control scroll behavior on navigation
|
|
581
|
-
* - `viewTransition`/`startTransition`: Use View Transitions/React transitions for navigation
|
|
582
|
-
* - `ignoreBlocker`: Bypass registered blockers
|
|
583
|
-
*
|
|
584
|
-
* @returns An anchor-like element that navigates without full page reloads.
|
|
585
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/linkComponent
|
|
586
|
-
*/
|
|
587
|
-
var Link$2 = import_react.forwardRef((props, ref) => {
|
|
588
|
-
const { _asChild, ...rest } = props;
|
|
589
|
-
const { type: _type, ...linkProps } = useLinkProps(rest, ref);
|
|
590
|
-
const children = typeof rest.children === "function" ? rest.children({ isActive: linkProps["data-status"] === "active" }) : rest.children;
|
|
591
|
-
if (!_asChild) {
|
|
592
|
-
const { disabled: _, ...rest } = linkProps;
|
|
593
|
-
return import_react.createElement("a", rest, children);
|
|
594
|
-
}
|
|
595
|
-
return import_react.createElement(_asChild, linkProps, children);
|
|
596
|
-
});
|
|
597
|
-
function isCtrlEvent(e) {
|
|
598
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
599
|
-
}
|
|
600
|
-
//#endregion
|
|
601
|
-
//#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/route.js
|
|
602
|
-
var Route = class extends BaseRoute {
|
|
603
|
-
/**
|
|
604
|
-
* @deprecated Use the `createRoute` function instead.
|
|
605
|
-
*/
|
|
606
|
-
constructor(options) {
|
|
607
|
-
super(options);
|
|
608
|
-
this.useMatch = (opts) => {
|
|
609
|
-
return useMatch({
|
|
610
|
-
select: opts?.select,
|
|
611
|
-
from: this.id,
|
|
612
|
-
structuralSharing: opts?.structuralSharing
|
|
613
|
-
});
|
|
614
|
-
};
|
|
615
|
-
this.useRouteContext = (opts) => {
|
|
616
|
-
return useRouteContext({
|
|
617
|
-
...opts,
|
|
618
|
-
from: this.id
|
|
619
|
-
});
|
|
620
|
-
};
|
|
621
|
-
this.useSearch = (opts) => {
|
|
622
|
-
return useSearch({
|
|
623
|
-
select: opts?.select,
|
|
624
|
-
structuralSharing: opts?.structuralSharing,
|
|
625
|
-
from: this.id
|
|
626
|
-
});
|
|
627
|
-
};
|
|
628
|
-
this.useParams = (opts) => {
|
|
629
|
-
return useParams({
|
|
630
|
-
select: opts?.select,
|
|
631
|
-
structuralSharing: opts?.structuralSharing,
|
|
632
|
-
from: this.id
|
|
633
|
-
});
|
|
634
|
-
};
|
|
635
|
-
this.useLoaderDeps = (opts) => {
|
|
636
|
-
return useLoaderDeps({
|
|
637
|
-
...opts,
|
|
638
|
-
from: this.id
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
this.useLoaderData = (opts) => {
|
|
642
|
-
return useLoaderData({
|
|
643
|
-
...opts,
|
|
644
|
-
from: this.id
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
this.useNavigate = () => {
|
|
648
|
-
return useNavigate({ from: this.fullPath });
|
|
649
|
-
};
|
|
650
|
-
this.Link = import_react.forwardRef((props, ref) => {
|
|
651
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link$2, {
|
|
652
|
-
ref,
|
|
653
|
-
from: this.fullPath,
|
|
654
|
-
...props
|
|
655
|
-
});
|
|
656
|
-
});
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
|
-
/**
|
|
660
|
-
* Creates a non-root Route instance for code-based routing.
|
|
661
|
-
*
|
|
662
|
-
* Use this to define a route that will be composed into a route tree
|
|
663
|
-
* (typically via a parent route's `addChildren`). If you're using file-based
|
|
664
|
-
* routing, prefer `createFileRoute`.
|
|
665
|
-
*
|
|
666
|
-
* @param options Route options (path, component, loader, context, etc.).
|
|
667
|
-
* @returns A Route instance to be attached to the route tree.
|
|
668
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRouteFunction
|
|
669
|
-
*/
|
|
670
|
-
function createRoute(options) {
|
|
671
|
-
return new Route(options);
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Creates a root route factory that requires a router context type.
|
|
675
|
-
*
|
|
676
|
-
* Use when your root route expects `context` to be provided to `createRouter`.
|
|
677
|
-
* The returned function behaves like `createRootRoute` but enforces a context type.
|
|
678
|
-
*
|
|
679
|
-
* @returns A factory function to configure and return a root route.
|
|
680
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteWithContextFunction
|
|
681
|
-
*/
|
|
682
|
-
function createRootRouteWithContext() {
|
|
683
|
-
return (options) => {
|
|
684
|
-
return createRootRoute(options);
|
|
685
|
-
};
|
|
686
|
-
}
|
|
687
|
-
var RootRoute = class extends BaseRootRoute {
|
|
688
|
-
/**
|
|
689
|
-
* @deprecated `RootRoute` is now an internal implementation detail. Use `createRootRoute()` instead.
|
|
690
|
-
*/
|
|
691
|
-
constructor(options) {
|
|
692
|
-
super(options);
|
|
693
|
-
this.useMatch = (opts) => {
|
|
694
|
-
return useMatch({
|
|
695
|
-
select: opts?.select,
|
|
696
|
-
from: this.id,
|
|
697
|
-
structuralSharing: opts?.structuralSharing
|
|
698
|
-
});
|
|
699
|
-
};
|
|
700
|
-
this.useRouteContext = (opts) => {
|
|
701
|
-
return useRouteContext({
|
|
702
|
-
...opts,
|
|
703
|
-
from: this.id
|
|
704
|
-
});
|
|
705
|
-
};
|
|
706
|
-
this.useSearch = (opts) => {
|
|
707
|
-
return useSearch({
|
|
708
|
-
select: opts?.select,
|
|
709
|
-
structuralSharing: opts?.structuralSharing,
|
|
710
|
-
from: this.id
|
|
711
|
-
});
|
|
712
|
-
};
|
|
713
|
-
this.useParams = (opts) => {
|
|
714
|
-
return useParams({
|
|
715
|
-
select: opts?.select,
|
|
716
|
-
structuralSharing: opts?.structuralSharing,
|
|
717
|
-
from: this.id
|
|
718
|
-
});
|
|
719
|
-
};
|
|
720
|
-
this.useLoaderDeps = (opts) => {
|
|
721
|
-
return useLoaderDeps({
|
|
722
|
-
...opts,
|
|
723
|
-
from: this.id
|
|
724
|
-
});
|
|
725
|
-
};
|
|
726
|
-
this.useLoaderData = (opts) => {
|
|
727
|
-
return useLoaderData({
|
|
728
|
-
...opts,
|
|
729
|
-
from: this.id
|
|
730
|
-
});
|
|
731
|
-
};
|
|
732
|
-
this.useNavigate = () => {
|
|
733
|
-
return useNavigate({ from: this.fullPath });
|
|
734
|
-
};
|
|
735
|
-
this.Link = import_react.forwardRef((props, ref) => {
|
|
736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Link$2, {
|
|
737
|
-
ref,
|
|
738
|
-
from: this.fullPath,
|
|
739
|
-
...props
|
|
740
|
-
});
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
};
|
|
744
|
-
/**
|
|
745
|
-
* Creates a root Route instance used to build your route tree.
|
|
746
|
-
*
|
|
747
|
-
* Typically paired with `createRouter({ routeTree })`. If you need to require
|
|
748
|
-
* a typed router context, use `createRootRouteWithContext` instead.
|
|
749
|
-
*
|
|
750
|
-
* @param options Root route options (component, error, pending, etc.).
|
|
751
|
-
* @returns A root route instance.
|
|
752
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createRootRouteFunction
|
|
753
|
-
*/
|
|
754
|
-
function createRootRoute(options) {
|
|
755
|
-
return new RootRoute(options);
|
|
756
|
-
}
|
|
757
|
-
//#endregion
|
|
758
|
-
//#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/fileRoute.js
|
|
759
|
-
/**
|
|
760
|
-
* Creates a file-based Route factory for a given path.
|
|
761
|
-
*
|
|
762
|
-
* Used by TanStack Router's file-based routing to associate a file with a
|
|
763
|
-
* route. The returned function accepts standard route options. In normal usage
|
|
764
|
-
* the `path` string is inserted and maintained by the `tsr` generator.
|
|
765
|
-
*
|
|
766
|
-
* @param path File path literal for the route (usually auto-generated).
|
|
767
|
-
* @returns A function that accepts Route options and returns a Route instance.
|
|
768
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/createFileRouteFunction
|
|
769
|
-
*/
|
|
770
|
-
function createFileRoute(path) {
|
|
771
|
-
return new FileRoute(path, { silent: true }).createRoute;
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
@deprecated It's no longer recommended to use the `FileRoute` class directly.
|
|
775
|
-
Instead, use `createFileRoute('/path/to/file')(options)` to create a file route.
|
|
776
|
-
*/
|
|
777
|
-
var FileRoute = class {
|
|
778
|
-
constructor(path, _opts) {
|
|
779
|
-
this.path = path;
|
|
780
|
-
this.createRoute = (options) => {
|
|
781
|
-
const route = createRoute(options);
|
|
782
|
-
route.isRoot = false;
|
|
783
|
-
return route;
|
|
784
|
-
};
|
|
785
|
-
this.silent = _opts?.silent;
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
//#endregion
|
|
789
|
-
//#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/lazyRouteComponent.js
|
|
790
|
-
/**
|
|
791
|
-
* Wrap a dynamic import to create a route component that supports
|
|
792
|
-
* `.preload()` and friendly reload-on-module-missing behavior.
|
|
793
|
-
*
|
|
794
|
-
* @param importer Function returning a module promise
|
|
795
|
-
* @param exportName Named export to use (default: `default`)
|
|
796
|
-
* @returns A lazy route component compatible with TanStack Router
|
|
797
|
-
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/lazyRouteComponentFunction
|
|
798
|
-
*/
|
|
799
|
-
function lazyRouteComponent(importer, exportName) {
|
|
800
|
-
let loadPromise;
|
|
801
|
-
let comp;
|
|
802
|
-
let error;
|
|
803
|
-
let reload;
|
|
804
|
-
const load = () => {
|
|
805
|
-
if (!loadPromise) loadPromise = importer().then((res) => {
|
|
806
|
-
loadPromise = void 0;
|
|
807
|
-
comp = res[exportName ?? "default"];
|
|
808
|
-
}).catch((err) => {
|
|
809
|
-
error = err;
|
|
810
|
-
if (isModuleNotFoundError(error)) {
|
|
811
|
-
if (error instanceof Error && typeof window !== "undefined" && typeof sessionStorage !== "undefined") {
|
|
812
|
-
const storageKey = `tanstack_router_reload:${error.message}`;
|
|
813
|
-
if (!sessionStorage.getItem(storageKey)) {
|
|
814
|
-
sessionStorage.setItem(storageKey, "1");
|
|
815
|
-
reload = true;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
});
|
|
820
|
-
return loadPromise;
|
|
821
|
-
};
|
|
822
|
-
const lazyComp = function Lazy(props) {
|
|
823
|
-
if (reload) {
|
|
824
|
-
window.location.reload();
|
|
825
|
-
throw new Promise(() => {});
|
|
826
|
-
}
|
|
827
|
-
if (error) throw error;
|
|
828
|
-
if (!comp) if (reactUse) reactUse(load());
|
|
829
|
-
else throw load();
|
|
830
|
-
return import_react.createElement(comp, props);
|
|
831
|
-
};
|
|
832
|
-
lazyComp.preload = load;
|
|
833
|
-
return lazyComp;
|
|
834
|
-
}
|
|
835
|
-
//#endregion
|
|
1
|
+
import { i as require_react, o as __exportAll, r as require_jsx_runtime, s as __toESM } from "./useRouter-CaUSUNsw.js";
|
|
2
|
+
import { t as require_react_dom } from "./react-dom-bBoJXlK2.js";
|
|
3
|
+
import { J as X, _ as Info, a as Check, n as AlertCircle, r as AlertTriangle, u as Copy, x as Loader } from "./icons-Dy-5ccDF.js";
|
|
836
4
|
//#region ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.3_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
5
|
+
var import_react_dom = /* @__PURE__ */ __toESM(require_react_dom(), 1);
|
|
6
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
837
7
|
function setRef$1(ref, value) {
|
|
838
8
|
if (typeof ref === "function") return ref(value);
|
|
839
9
|
else if (ref !== null && ref !== void 0) ref.current = value;
|
|
@@ -969,6 +139,7 @@ var createSlottableError = (ownerName) => {
|
|
|
969
139
|
var use = import_react[" use ".trim().toString()];
|
|
970
140
|
//#endregion
|
|
971
141
|
//#region ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.7_@types+react@19.2.17_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
142
|
+
var import_jsx_runtime = require_jsx_runtime();
|
|
972
143
|
var Primitive = [
|
|
973
144
|
"a",
|
|
974
145
|
"button",
|
|
@@ -15707,4 +14878,4 @@ function Timestamp({ iso, precise = false, display = "absolute" }) {
|
|
|
15707
14878
|
});
|
|
15708
14879
|
}
|
|
15709
14880
|
//#endregion
|
|
15710
|
-
export {
|
|
14881
|
+
export { composeRefs as S, DialogContent as _, ErrorLine as a, useId as b, Spinner as c, Toggletip as d, TooltipProvider as f, Dialog as g, dropdown_menu_exports as h, EmptyState as i, Timestamp as l, dialog_exports as m, ConfirmDialog as n, Modal as o, breakAfterUnderscores as p, CopyButton as r, Notice as s, ConfirmButton as t, Tip as u, DialogOverlay as v, Primitive as x, DialogPortal as y };
|