camox 0.33.1 → 0.34.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.
Files changed (94) hide show
  1. package/dist/core/createBlock.js +19 -19
  2. package/dist/core/defineDocument.d.ts +7 -0
  3. package/dist/core/defineDocument.js +7 -0
  4. package/dist/features/agent-chat/components/AgentChatSidebar.js +3 -3
  5. package/dist/features/agent-chat/components/AgentChatThread.js +5 -5
  6. package/dist/features/navigation/navigation.d.ts +39 -0
  7. package/dist/features/navigation/navigation.js +231 -0
  8. package/dist/features/preview/CamoxPreview.d.ts +3 -0
  9. package/dist/features/preview/CamoxPreview.js +12 -12
  10. package/dist/features/preview/components/AddBlockSidebar.js +4 -4
  11. package/dist/features/preview/components/CreatePageModal.js +3 -3
  12. package/dist/features/preview/components/FieldToolbar.js +1 -1
  13. package/dist/features/preview/components/PageInfoSidebar.js +23 -23
  14. package/dist/features/preview/components/PageNavigatorSidebar.js +6 -6
  15. package/dist/features/preview/components/PagePicker.js +1 -1
  16. package/dist/features/preview/components/useUpdateBlockPosition.js +3 -3
  17. package/dist/features/provider/CamoxProvider.js +10 -8
  18. package/dist/features/routes/pageRuntime.js +6 -0
  19. package/dist/features/runtime/pageApp.js +75 -0
  20. package/dist/features/runtime/pageClient.d.ts +7 -0
  21. package/dist/features/runtime/pageClient.js +37 -0
  22. package/dist/features/runtime/pageNavigation.js +170 -0
  23. package/dist/features/runtime/pageServer.d.ts +9 -0
  24. package/dist/features/runtime/pageServer.js +18 -0
  25. package/dist/features/runtime/runtime.d.ts +24 -0
  26. package/dist/features/runtime/runtime.js +44 -0
  27. package/dist/features/runtime/studioApp.d.ts +15 -0
  28. package/dist/features/runtime/studioApp.js +117 -0
  29. package/dist/features/runtime/studioNavigation.js +115 -0
  30. package/dist/features/runtime/studioServer.d.ts +9 -0
  31. package/dist/features/runtime/studioServer.js +18 -0
  32. package/dist/features/studio/CamoxStudio.js +3 -3
  33. package/dist/features/studio/components/Navbar.js +7 -7
  34. package/dist/features/studio/components/ProjectMenu.js +9 -9
  35. package/dist/features/studio/components/UserButton.js +3 -3
  36. package/dist/features/vite/appGeneration.js +16 -5
  37. package/dist/features/vite/blockBoilerplate.js +1 -1
  38. package/dist/features/vite/definitionsSync.js +4 -4
  39. package/dist/features/vite/routeGeneration.js +9 -156
  40. package/dist/features/vite/runtimeDev.js +270 -0
  41. package/dist/features/vite/utils.js +3 -1
  42. package/dist/features/vite/vite.d.ts +22 -3
  43. package/dist/features/vite/vite.js +36 -19
  44. package/dist/lib/auth.js +42 -68
  45. package/dist/lib/telemetry.js +1 -24
  46. package/dist/lib/utils.js +1 -1
  47. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +114 -0
  48. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +25 -0
  49. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +1 -0
  50. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +1 -0
  51. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +20 -0
  52. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +8 -0
  53. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +1 -0
  54. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +18 -0
  55. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +161 -0
  56. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +6 -0
  57. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +54 -0
  58. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +8 -0
  59. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +32 -0
  60. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.d.ts +115 -0
  61. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +1 -0
  62. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +49 -0
  63. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +1 -0
  64. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +6 -0
  65. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +343 -0
  66. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +48 -0
  67. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +695 -0
  68. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +1 -0
  69. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +1 -0
  70. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +5 -0
  71. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/RawStream.d.ts +38 -0
  72. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/seroval-plugins.d.ts +1 -0
  73. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/transformer.d.ts +65 -0
  74. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +69 -0
  75. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +1 -0
  76. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +1 -0
  77. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +1 -0
  78. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +1 -0
  79. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +10 -0
  80. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +1 -0
  81. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +1 -0
  82. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +1 -0
  83. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +28 -0
  84. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +49 -0
  85. package/package.json +34 -12
  86. package/skills/camox-block/SKILL.md +4 -4
  87. package/skills/camox-cli/SKILL.md +3 -3
  88. package/skills/camox-layout/SKILL.md +2 -2
  89. package/dist/features/routes/ogRoute.d.ts +0 -12
  90. package/dist/features/routes/ogRoute.js +0 -20
  91. package/dist/features/routes/pageRoute.d.ts +0 -48
  92. package/dist/features/routes/pageRoute.js +0 -254
  93. package/dist/lib/api-client.d.ts +0 -7
  94. package/dist/lib/queries.d.ts +0 -12
package/dist/lib/auth.js CHANGED
@@ -18,16 +18,6 @@ function writeServerAuthCookie(cookie) {
18
18
  }
19
19
  document.cookie = `${SERVER_AUTH_COOKIE_NAME}=${encodeURIComponent(cookie)}; Path=/; SameSite=Lax; Max-Age=2592000${secure}`;
20
20
  }
21
- function getServerAuthCookieHeader(headers) {
22
- const authCookie = (headers.get("Cookie") ?? headers.get("cookie") ?? "").split(";").map((part) => part.trim()).find((part) => part.startsWith(`${SERVER_AUTH_COOKIE_NAME}=`));
23
- if (!authCookie) return "";
24
- const value = authCookie.slice(18);
25
- try {
26
- return decodeURIComponent(value);
27
- } catch {
28
- return "";
29
- }
30
- }
31
21
  function parseSetCookieHeader(header) {
32
22
  const cookieMap = /* @__PURE__ */ new Map();
33
23
  header.split(", ").forEach((cookie) => {
@@ -160,7 +150,7 @@ function crossDomainClient(opts = {}) {
160
150
  options.credentials = getAuthRequestCredentials(cookie);
161
151
  options.headers = {
162
152
  ...options.headers,
163
- ...cookie ? { "Better-Auth-Cookie": cookie } : {}
153
+ "Better-Auth-Cookie": cookie
164
154
  };
165
155
  if (url.includes("/sign-out")) {
166
156
  await storage.setItem(cookieName, "{}");
@@ -197,55 +187,39 @@ function createCamoxAuthClient(apiUrl) {
197
187
  * Returns `true` once processing is complete (or if there was no OTT).
198
188
  */
199
189
  function useProcessOtt(authClient) {
200
- const $ = c(5);
201
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
202
- for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
203
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
204
- }
205
- const [ready, setReady] = React.useState(_temp);
206
- let t0;
207
- let t1;
208
- if ($[1] !== authClient || $[2] !== ready) {
209
- t0 = () => {
210
- if (ready) return;
211
- const url = new URL(window.location.href);
212
- const ott = url.searchParams.get("ott");
213
- if (!ott) {
214
- setReady(true);
190
+ const [ready, setReady] = React.useState(() => {
191
+ if (typeof window === "undefined") return true;
192
+ return !new URL(window.location.href).searchParams.has("ott");
193
+ });
194
+ React.useEffect(() => {
195
+ if (ready) return;
196
+ const url = new URL(window.location.href);
197
+ const ott = url.searchParams.get("ott");
198
+ if (!ott) {
199
+ setReady(true);
200
+ return;
201
+ }
202
+ url.searchParams.delete("ott");
203
+ window.history.replaceState({}, "", url);
204
+ (async () => {
205
+ try {
206
+ const verification = await authClient.oneTimeToken.verify({ token: ott });
207
+ if (verification.error) throw verification.error;
208
+ if (!verification.data) throw new Error("OTT verification returned no session");
209
+ window.location.reload();
215
210
  return;
216
- }
217
- url.searchParams.delete("ott");
218
- window.history.replaceState({}, "", url);
219
- (async () => {
220
- try {
221
- await authClient.oneTimeToken.verify({ token: ott });
222
- await authClient.updateSession();
223
- } catch {}
224
- setReady(true);
225
- })();
226
- };
227
- t1 = [authClient, ready];
228
- $[1] = authClient;
229
- $[2] = ready;
230
- $[3] = t0;
231
- $[4] = t1;
232
- } else {
233
- t0 = $[3];
234
- t1 = $[4];
235
- }
236
- React.useEffect(t0, t1);
211
+ } catch {}
212
+ setReady(true);
213
+ })();
214
+ }, [authClient, ready]);
237
215
  return ready;
238
216
  }
239
- function _temp() {
240
- if (typeof window === "undefined") return true;
241
- return !new URL(window.location.href).searchParams.has("ott");
242
- }
243
217
  const AuthContext = React.createContext(null);
244
218
  function useAuthContext() {
245
219
  const $ = c(1);
246
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
220
+ if ($[0] !== "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93") {
247
221
  for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
248
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
222
+ $[0] = "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93";
249
223
  }
250
224
  const ctx = React.useContext(AuthContext);
251
225
  if (!ctx) throw new Error("Missing CamoxProvider");
@@ -253,9 +227,9 @@ function useAuthContext() {
253
227
  }
254
228
  function useProjectSlug() {
255
229
  const $ = c(1);
256
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
230
+ if ($[0] !== "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93") {
257
231
  for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
258
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
232
+ $[0] = "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93";
259
233
  }
260
234
  return useAuthContext().projectSlug;
261
235
  }
@@ -269,18 +243,18 @@ function useAuthState() {
269
243
  }
270
244
  function useIsAuthenticated() {
271
245
  const $ = c(1);
272
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
246
+ if ($[0] !== "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93") {
273
247
  for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
274
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
248
+ $[0] = "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93";
275
249
  }
276
250
  const { isAuthenticated } = useAuthState();
277
251
  return isAuthenticated;
278
252
  }
279
253
  function useSignInRedirect(callbackHref) {
280
254
  const $ = c(4);
281
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
255
+ if ($[0] !== "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93") {
282
256
  for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
283
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
257
+ $[0] = "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93";
284
258
  }
285
259
  const { authenticationUrl } = useAuthContext();
286
260
  let t0;
@@ -302,9 +276,9 @@ function useSignInRedirect(callbackHref) {
302
276
  */
303
277
  function useAuthActions() {
304
278
  const $ = c(5);
305
- if ($[0] !== "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a") {
279
+ if ($[0] !== "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93") {
306
280
  for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
307
- $[0] = "de1e25b4541f6fe08a345d66b09411c24ed6cbe00d71d076f92227895feaae4a";
281
+ $[0] = "96393d5626632a69960ca7e18d98e06ae87b8528faab082732a3cc7b48adfd93";
308
282
  }
309
283
  const { authClient, authenticationUrl } = useAuthContext();
310
284
  let t0;
@@ -322,7 +296,7 @@ function useAuthActions() {
322
296
  "User settings"
323
297
  ],
324
298
  groupLabel: "Studio",
325
- checkIfAvailable: _temp2,
299
+ checkIfAvailable: _temp,
326
300
  execute: () => {
327
301
  window.open(`${authenticationUrl}/profile`, "_blank");
328
302
  }
@@ -331,11 +305,11 @@ function useAuthActions() {
331
305
  label: "Log out",
332
306
  aliases: ["Sign out", "Logout"],
333
307
  groupLabel: "Studio",
334
- checkIfAvailable: _temp3,
308
+ checkIfAvailable: _temp2,
335
309
  execute: () => authClient.signOut()
336
310
  }]
337
311
  });
338
- return _temp4;
312
+ return _temp3;
339
313
  };
340
314
  t1 = [authClient, authenticationUrl];
341
315
  $[1] = authClient;
@@ -348,18 +322,18 @@ function useAuthActions() {
348
322
  }
349
323
  React.useEffect(t0, t1);
350
324
  }
351
- function _temp4() {
325
+ function _temp3() {
352
326
  actionsStore.send({
353
327
  type: "unregisterManyActions",
354
328
  ids: ["manage-account", "log-out"]
355
329
  });
356
330
  }
357
- function _temp3() {
331
+ function _temp2() {
358
332
  return true;
359
333
  }
360
- function _temp2() {
334
+ function _temp() {
361
335
  return true;
362
336
  }
363
337
 
364
338
  //#endregion
365
- export { AuthContext, buildClearServerAuthCookieHeader, createCamoxAuthClient, getAuthCookieHeader, getAuthRequestCredentials, getServerAuthCookieHeader, useAuthActions, useAuthContext, useAuthState, useIsAuthenticated, useProcessOtt, useProjectSlug, useSignInRedirect };
339
+ export { AuthContext, createCamoxAuthClient, getAuthCookieHeader, getAuthRequestCredentials, useAuthActions, useAuthContext, useAuthState, useIsAuthenticated, useProcessOtt, useProjectSlug, useSignInRedirect };
@@ -1,26 +1,3 @@
1
1
  import { POSTHOG_PUBLIC_KEY } from "@camox/api-contract";
2
2
 
3
- //#region src/lib/telemetry.ts
4
- let client = null;
5
- async function getClient() {
6
- if (__CAMOX_TELEMETRY_DISABLED__) return null;
7
- if (!client) {
8
- const { PostHog } = await import("posthog-node");
9
- client = new PostHog(POSTHOG_PUBLIC_KEY, { host: "https://us.i.posthog.com" });
10
- }
11
- return client;
12
- }
13
- /** Server-side tracking for page views (used in pageRoute.tsx) */
14
- async function trackEvent(event, properties) {
15
- const posthog = await getClient();
16
- if (!posthog) return;
17
- const distinctId = properties.projectId ?? "unknown";
18
- posthog.capture({
19
- distinctId,
20
- event,
21
- properties
22
- });
23
- }
24
-
25
- //#endregion
26
- export { trackEvent };
3
+ export { };
package/dist/lib/utils.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Kbd } from "@camox/ui/kbd";
2
1
  import { jsxs } from "react/jsx-runtime";
2
+ import { Kbd } from "@camox/ui/kbd";
3
3
  import { INPUT_BASE_STYLES, INPUT_FOCUS_STYLES, cn } from "@camox/ui/utils";
4
4
 
5
5
  //#region src/lib/utils.tsx
@@ -0,0 +1,114 @@
1
+ import { ControlledPromise } from "./utils.js";
2
+ import { ParseRoute } from "./routeInfo.js";
3
+ import { AnyRoute, StaticDataRouteOption } from "./route.js";
4
+ import { AnyRouter, RegisteredRouter, SSROption } from "./router.js";
5
+
6
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts
7
+ interface DefaultRouteMatchExtensions {
8
+ scripts?: unknown;
9
+ links?: unknown;
10
+ headScripts?: unknown;
11
+ meta?: unknown;
12
+ styles?: unknown;
13
+ }
14
+ interface RouteMatchExtensions extends DefaultRouteMatchExtensions {}
15
+ interface RouteMatch<out TRouteId, out TFullPath, out TAllParams, out TFullSearchSchema, out TLoaderData, out TAllContext, out TLoaderDeps> extends RouteMatchExtensions {
16
+ id: string;
17
+ routeId: TRouteId;
18
+ fullPath: TFullPath;
19
+ index: number;
20
+ pathname: string;
21
+ params: TAllParams;
22
+ _strictParams: TAllParams;
23
+ status: 'pending' | 'success' | 'error' | 'redirected' | 'notFound';
24
+ isFetching: false | 'beforeLoad' | 'loader';
25
+ error: unknown;
26
+ paramsError: unknown;
27
+ searchError: unknown;
28
+ updatedAt: number;
29
+ _nonReactive: {
30
+ loadPromise?: ControlledPromise<void>;
31
+ displayPendingPromise?: Promise<void>;
32
+ minPendingPromise?: ControlledPromise<void>;
33
+ dehydrated?: boolean;
34
+ };
35
+ loaderData?: TLoaderData;
36
+ context: TAllContext;
37
+ search: TFullSearchSchema;
38
+ _strictSearch: TFullSearchSchema;
39
+ fetchCount: number;
40
+ abortController: AbortController;
41
+ cause: 'preload' | 'enter' | 'stay';
42
+ loaderDeps: TLoaderDeps;
43
+ preload: boolean;
44
+ invalid: boolean;
45
+ headers?: Record<string, string>;
46
+ globalNotFound?: boolean;
47
+ staticData: StaticDataRouteOption;
48
+ /** This attribute is not reactive */
49
+ ssr?: SSROption;
50
+ _forcePending?: boolean;
51
+ _displayPending?: boolean;
52
+ }
53
+ interface PreValidationErrorHandlingRouteMatch<TRouteId, TFullPath, TAllParams, TFullSearchSchema> {
54
+ id: string;
55
+ routeId: TRouteId;
56
+ fullPath: TFullPath;
57
+ index: number;
58
+ pathname: string;
59
+ search: {
60
+ status: 'success';
61
+ value: TFullSearchSchema;
62
+ } | {
63
+ status: 'error';
64
+ error: unknown;
65
+ };
66
+ params: {
67
+ status: 'success';
68
+ value: TAllParams;
69
+ } | {
70
+ status: 'error';
71
+ error: unknown;
72
+ };
73
+ staticData: StaticDataRouteOption;
74
+ ssr?: boolean | 'data-only';
75
+ }
76
+ type MakePreValidationErrorHandlingRouteMatchUnion<TRouter extends AnyRouter = RegisteredRouter, TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>> = TRoute extends any ? PreValidationErrorHandlingRouteMatch<TRoute['id'], TRoute['fullPath'], TRoute['types']['allParams'], TRoute['types']['fullSearchSchema']> : never;
77
+ type MakeRouteMatchFromRoute<TRoute extends AnyRoute> = RouteMatch<TRoute['types']['id'], TRoute['types']['fullPath'], TRoute['types']['allParams'], TRoute['types']['fullSearchSchema'], TRoute['types']['loaderData'], TRoute['types']['allContext'], TRoute['types']['loaderDeps']>;
78
+ type AnyRouteMatch = RouteMatch<any, any, any, any, any, any, any>;
79
+ type MakeRouteMatchUnion<TRouter extends AnyRouter = RegisteredRouter, TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>> = TRoute extends any ? RouteMatch<TRoute['id'], TRoute['fullPath'], TRoute['types']['allParams'], TRoute['types']['fullSearchSchema'], TRoute['types']['loaderData'], TRoute['types']['allContext'], TRoute['types']['loaderDeps']> : never;
80
+ /**
81
+ * The `MatchRouteOptions` type is used to describe the options that can be used when matching a route.
82
+ *
83
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#matchrouteoptions-type)
84
+ */
85
+ interface MatchRouteOptions {
86
+ /**
87
+ * If `true`, will match against pending location instead of the current location.
88
+ *
89
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#pending-property)
90
+ */
91
+ pending?: boolean;
92
+ /**
93
+ * If `true`, will match against the current location with case sensitivity.
94
+ *
95
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#casesensitive-property)
96
+ *
97
+ * @deprecated Declare case sensitivity in the route definition instead, or globally for all routes using the `caseSensitive` option on the router.
98
+ */
99
+ caseSensitive?: boolean;
100
+ /**
101
+ * If `true`, will match against the current location's search params using a deep inclusive check. e.g. `{ a: 1 }` will match for a current location of `{ a: 1, b: 2 }`.
102
+ *
103
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#includesearch-property)
104
+ */
105
+ includeSearch?: boolean;
106
+ /**
107
+ * If `true`, will match against the current location using a fuzzy match. e.g. `/posts` will match for a current location of `/posts/123`.
108
+ *
109
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/MatchRouteOptionsType#fuzzy-property)
110
+ */
111
+ fuzzy?: boolean;
112
+ }
113
+ //#endregion
114
+ export { AnyRouteMatch, MakePreValidationErrorHandlingRouteMatchUnion, MakeRouteMatchFromRoute, MakeRouteMatchUnion, MatchRouteOptions, RouteMatch, RouteMatchExtensions };
@@ -0,0 +1,25 @@
1
+ import { NavigateOptions, ToOptions } from "./link.js";
2
+ import { RoutePaths } from "./routeInfo.js";
3
+ import { ParsedLocation } from "./location.js";
4
+ import { RegisteredRouter, ViewTransitionOptions } from "./router.js";
5
+
6
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts
7
+ interface CommitLocationOptions {
8
+ replace?: boolean;
9
+ resetScroll?: boolean;
10
+ hashScrollIntoView?: boolean | ScrollIntoViewOptions;
11
+ viewTransition?: boolean | ViewTransitionOptions;
12
+ /**
13
+ * @deprecated All navigations use transitions under the hood now
14
+ **/
15
+ startTransition?: boolean;
16
+ ignoreBlocker?: boolean;
17
+ }
18
+ type NavigateFn = <TRouter extends RegisteredRouter, TTo extends string | undefined, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom, TMaskTo extends string = ''>(opts: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>) => Promise<void>;
19
+ type BuildLocationFn = <TRouter extends RegisteredRouter, TTo extends string | undefined, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TMaskFrom extends RoutePaths<TRouter['routeTree']> | string = TFrom, TMaskTo extends string = ''>(opts: ToOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & {
20
+ leaveParams?: boolean;
21
+ _includeValidateSearch?: boolean;
22
+ _isNavigate?: boolean;
23
+ }) => ParsedLocation;
24
+ //#endregion
25
+ export { BuildLocationFn, CommitLocationOptions, NavigateFn };
@@ -0,0 +1,20 @@
1
+ import { AnyContext, AnyPathParams, AnyRoute, UpdatableRouteOptions } from "./route.js";
2
+ import { AnyValidator } from "./validators.js";
3
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts
4
+ interface FileRouteTypes {
5
+ fileRoutesByFullPath: any;
6
+ fullPaths: any;
7
+ to: any;
8
+ fileRoutesByTo: any;
9
+ id: any;
10
+ fileRoutesById: any;
11
+ }
12
+ type InferFileRouteTypes<TRouteTree extends AnyRoute> = unknown extends TRouteTree['types']['fileRouteTypes'] ? never : TRouteTree['types']['fileRouteTypes'] extends FileRouteTypes ? TRouteTree['types']['fileRouteTypes'] : never;
13
+ type LazyRouteOptions = Pick<UpdatableRouteOptions<AnyRoute, string, string, AnyPathParams, AnyValidator, {}, AnyContext, AnyContext, AnyContext, AnyContext>, 'component' | 'errorComponent' | 'pendingComponent' | 'notFoundComponent'>;
14
+ interface LazyRoute<in out TRoute extends AnyRoute> {
15
+ options: {
16
+ id: string;
17
+ } & LazyRouteOptions;
18
+ }
19
+ //#endregion
20
+ export { FileRouteTypes, InferFileRouteTypes, LazyRoute, LazyRouteOptions };
@@ -0,0 +1,8 @@
1
+ import { AnyRouter } from "./router.js";
2
+
3
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts
4
+ declare global {
5
+ interface Window {
6
+ __TSR_ROUTER__?: AnyRouter;
7
+ }
8
+ }
@@ -0,0 +1,18 @@
1
+ import { FileRouteTypes, InferFileRouteTypes, LazyRoute, LazyRouteOptions } from "./fileRoute.js";
2
+ import { Assign, Awaitable, Constrain, ConstrainLiteral, ControlledPromise, Expand, ExtractObjects, ExtractPrimitives, IntersectAssign, IsNonEmptyObject, LooseAsyncReturnType, LooseReturnType, MakeDifferenceOptional, MergeAllPrimitive, NoInfer, NonNullableUpdater, PartialMergeAll, PartialMergeAllObject, PickAsRequired, Updater } from "./utils.js";
3
+ import { AbsoluteToPath, AddLeadingSlash, AddTrailingSlash, FindDescendantToPaths, FromPathOption, InferDescendantToPaths, IsRequiredParams, MakeOptionalPathParams, MakeOptionalSearchParams, MaskOptions, NavigateOptions, PathParamOptions, RelativeToCurrentPath, RelativeToParentPath, RelativeToPath, RelativeToPathAutoComplete, RemoveLeadingSlashes, RemoveTrailingSlashes, RequiredToOptions, ResolveCurrentPath, ResolveParentPath, ResolveRelativePath, ResolveRoute, SearchParamOptions, ToMaskOptions, ToOptions, ToPathOption, ToSubOptions, ToSubOptionsProps } from "./link.js";
4
+ import { AllParams, CodeRouteToPath, FullSearchSchema, FullSearchSchemaInput, ParseRoute, RouteById, RouteByPath, RoutePaths, RouteToPath, RoutesById, RoutesByPath, TrailingSlashOptionByRouter } from "./routeInfo.js";
5
+ import { AnyRedirect, Redirect, RedirectFnRoute, RedirectOptions, RedirectOptionsRoute } from "./redirect.js";
6
+ import { AnyRouteMatch, MakeRouteMatchFromRoute, MakeRouteMatchUnion, MatchRouteOptions, RouteMatch, RouteMatchExtensions } from "./Matches.js";
7
+ import { RootRouteId, rootRouteId } from "./root.js";
8
+ import { BuildLocationFn, CommitLocationOptions, NavigateFn } from "./RouterProvider.js";
9
+ import { RawStream, RawStreamHint, RawStreamOptions } from "./ssr/serializer/RawStream.js";
10
+ import { AnySerializationAdapter, DefaultSerializable, RegisteredSerializableInput, Serializable, SerializableExtensions, SerializationAdapter, SerializationError, SerializerExtensions, TSR_SERIALIZABLE, TsrSerializable, ValidateSerializable, ValidateSerializableInput } from "./ssr/serializer/transformer.js";
11
+ import { AnyContext, AnyPathParams, AnyRoute, BaseRouteOptions, BeforeLoadContextOptions, BeforeLoadContextParameter, ContextAsyncReturnType, ContextOptions, ContextReturnType, FileBaseRouteOptions, FilebaseRouteOptionsInterface, FullSearchSchemaOption, InferAllContext, InferAllParams, InferFullSearchSchema, InferFullSearchSchemaInput, LoaderFnContext, LoaderStaleReloadMode, MakeRemountDepsOptionsUnion, ParamsOptions, ParseParamsFn, RemountDepsOptions, ResolveAllContext, ResolveAllParamsFromParent, ResolveFullSearchSchema, ResolveFullSearchSchemaInput, ResolveLoaderData, ResolveOptionalParams, ResolveParams, ResolveRequiredParams, ResolveRouteContext, Route, RouteAddChildrenFn, RouteAddFileChildrenFn, RouteAddFileTypesFn, RouteContextOptions, RouteContextParameter, RouteExtensions, RouteLazyFn, RouteLoaderFn, RouteMask, RouteOptions, RoutePathOptions, RouteTypes, SearchFilter, SearchMiddleware, SearchMiddlewareContext, SearchSchemaInput, StaticDataRouteOption, StringifyParamsFn, TrimPathRight, UpdatableRouteOptions, UpdatableRouteOptionsExtensions, UpdatableStaticRouteOption } from "./route.js";
12
+ import { AnySchema, AnyStandardSchemaValidate, AnyStandardSchemaValidateFailure, AnyStandardSchemaValidateIssue, AnyStandardSchemaValidateSuccess, AnyStandardSchemaValidator, AnyValidator, AnyValidatorAdapter, AnyValidatorObj, DefaultValidator, ResolveSearchValidatorInput, ResolveSearchValidatorInputFn, ResolveValidatorOutput, ResolveValidatorOutputFn, StandardSchemaValidator, StandardSchemaValidatorProps, StandardSchemaValidatorTypes, Validator, ValidatorAdapter, ValidatorFn, ValidatorObj } from "./validators.js";
13
+ import { ParsedLocation } from "./location.js";
14
+ import { SearchParser, SearchSerializer } from "./searchParams.js";
15
+ import { AssetCrossOrigin, Manifest, ManifestAssetLink, RouterManagedTag } from "./manifest.js";
16
+ import { GetStoreConfig, RouterBatchFn, RouterReadableStore, RouterStores, RouterWritableStore } from "./stores.js";
17
+ import { AnyRouter, BuildNextOptions, ClearCacheFn, CommitLocationFn, DefaultRemountDepsFn, EmitFn, GetMatchFn, GetMatchRoutesFn, InvalidateFn, ListenerFn, LoadFn, LocationRewrite, LocationRewriteFunction, MatchRouteFn, MatchRoutesFn, MatchRoutesOpts, ParseLocationFn, PreloadRouteFn, Register, RegisteredRouter, RouterConstructorOptions, RouterContextOptions, RouterCore, RouterEvent, RouterEvents, RouterListener, RouterOptions, RouterOptionsExtensions, RouterState, SSROption, StartTransitionFn, SubscribeFn, TrailingSlashOption, UpdateFn, UpdateMatchFn, ViewTransitionOptions, trailingSlashOptions } from "./router.js";
18
+ import { UseNavigateResult } from "./useNavigate.js";
@@ -0,0 +1,161 @@
1
+ import { ConstrainLiteral, Expand, MakeDifferenceOptional, NoInfer, NonNullableUpdater, Updater } from "./utils.js";
2
+ import { AllParams, CatchAllPaths, CurrentPath, FullSearchSchema, FullSearchSchemaInput, ParentPath, RouteByPath, RouteByToPath, RoutePaths, RouteToPath, ToPath } from "./routeInfo.js";
3
+ import { ParsedLocation } from "./location.js";
4
+ import { AnyRouter, RegisteredRouter, ViewTransitionOptions } from "./router.js";
5
+ import { HistoryState, ParsedHistoryState } from "@tanstack/history";
6
+
7
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts
8
+ type IsRequiredParams<TParams> = Record<never, never> extends TParams ? never : true;
9
+ interface ParsePathParamsResult<in out TRequired, in out TOptional, in out TRest> {
10
+ required: TRequired;
11
+ optional: TOptional;
12
+ rest: TRest;
13
+ }
14
+ type ParsePathParamsBoundaryStart<T extends string> = T extends `${infer TLeft}{-${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['required'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : T extends `${infer TLeft}{${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
15
+ type ParsePathParamsSymbol<T extends string> = T extends `${string}$${infer TRight}` ? TRight extends `${string}/${string}` ? TRight extends `${infer TParam}/${infer TRest}` ? TParam extends '' ? ParsePathParamsResult<ParsePathParams<TRest>['required'], '_splat' | ParsePathParams<TRest>['optional'], ParsePathParams<TRest>['rest']> : ParsePathParamsResult<TParam | ParsePathParams<TRest>['required'], ParsePathParams<TRest>['optional'], ParsePathParams<TRest>['rest']> : never : TRight extends '' ? ParsePathParamsResult<never, '_splat', never> : ParsePathParamsResult<TRight, never, never> : never;
16
+ type ParsePathParamsBoundaryEnd<T extends string> = T extends `${infer TLeft}}${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
17
+ type ParsePathParamsEscapeStart<T extends string> = T extends `${infer TLeft}[${infer TRight}` ? ParsePathParamsResult<ParsePathParams<TLeft>['required'] | ParsePathParams<TRight>['required'], ParsePathParams<TLeft>['optional'] | ParsePathParams<TRight>['optional'], ParsePathParams<TRight>['rest']> : never;
18
+ type ParsePathParamsEscapeEnd<T extends string> = T extends `${string}]${infer TRight}` ? ParsePathParams<TRight> : never;
19
+ type ParsePathParams<T extends string> = T extends `${string}[${string}` ? ParsePathParamsEscapeStart<T> : T extends `${string}]${string}` ? ParsePathParamsEscapeEnd<T> : T extends `${string}}${string}` ? ParsePathParamsBoundaryEnd<T> : T extends `${string}{${string}` ? ParsePathParamsBoundaryStart<T> : T extends `${string}$${string}` ? ParsePathParamsSymbol<T> : never;
20
+ type AddTrailingSlash<T> = T extends `${string}/` ? T : `${T & string}/`;
21
+ type RemoveTrailingSlashes<T> = T & `${string}/` extends never ? T : T extends `${infer R}/` ? R : T;
22
+ type AddLeadingSlash<T> = T & `/${string}` extends never ? `/${T & string}` : T;
23
+ type RemoveLeadingSlashes<T> = T & `/${string}` extends never ? T : T extends `/${infer R}` ? R : T;
24
+ type JoinPath<TLeft extends string, TRight extends string> = TRight extends '' ? TLeft : TLeft extends '' ? TRight : `${RemoveTrailingSlashes<TLeft>}/${RemoveLeadingSlashes<TRight>}`;
25
+ type RemoveLastSegment<T extends string, TAcc extends string = ''> = T extends `${infer TSegment}/${infer TRest}` ? TRest & `${string}/${string}` extends never ? TRest extends '' ? TAcc : `${TAcc}${TSegment}` : RemoveLastSegment<TRest, `${TAcc}${TSegment}/`> : TAcc;
26
+ type ResolveCurrentPath<TFrom extends string, TTo extends string> = TTo extends '.' ? TFrom : TTo extends './' ? AddTrailingSlash<TFrom> : TTo & `./${string}` extends never ? never : TTo extends `./${infer TRest}` ? AddLeadingSlash<JoinPath<TFrom, TRest>> : never;
27
+ type ResolveParentPath<TFrom extends string, TTo extends string> = TTo extends '../' | '..' ? TFrom extends '' | '/' ? never : AddLeadingSlash<RemoveLastSegment<TFrom>> : TTo & `../${string}` extends never ? AddLeadingSlash<JoinPath<TFrom, TTo>> : TFrom extends '' | '/' ? never : TTo extends `../${infer ToRest}` ? ResolveParentPath<RemoveLastSegment<TFrom>, ToRest> : AddLeadingSlash<JoinPath<TFrom, TTo>>;
28
+ type ResolveRelativePath<TFrom, TTo = '.'> = string extends TFrom ? TTo : string extends TTo ? TFrom : undefined extends TTo ? TFrom : TTo extends string ? TFrom extends string ? TTo extends `/${string}` ? TTo : TTo extends `..${string}` ? ResolveParentPath<TFrom, TTo> : TTo extends `.${string}` ? ResolveCurrentPath<TFrom, TTo> : AddLeadingSlash<JoinPath<TFrom, TTo>> : never : never;
29
+ type FindDescendantToPaths<TRouter extends AnyRouter, TPrefix extends string> = `${TPrefix}/${string}` & RouteToPath<TRouter>;
30
+ type InferDescendantToPaths<TRouter extends AnyRouter, TPrefix extends string, TPaths = FindDescendantToPaths<TRouter, TPrefix>> = TPaths extends `${TPrefix}/` ? never : TPaths extends `${TPrefix}/${infer TRest}` ? TRest : never;
31
+ type RelativeToPath<TRouter extends AnyRouter, TTo extends string, TResolvedPath extends string> = (TResolvedPath & RouteToPath<TRouter> extends never ? never : ToPath<TRouter, TTo>) | `${RemoveTrailingSlashes<TTo>}/${InferDescendantToPaths<TRouter, RemoveTrailingSlashes<TResolvedPath>>}`;
32
+ type RelativeToParentPath<TRouter extends AnyRouter, TFrom extends string, TTo extends string, TResolvedPath extends string = ResolveRelativePath<TFrom, TTo>> = RelativeToPath<TRouter, TTo, TResolvedPath> | (TTo extends `${string}..` | `${string}../` ? TResolvedPath extends '/' | '' ? never : FindDescendantToPaths<TRouter, RemoveTrailingSlashes<TResolvedPath>> extends never ? never : `${RemoveTrailingSlashes<TTo>}/${ParentPath<TRouter>}` : never);
33
+ type RelativeToCurrentPath<TRouter extends AnyRouter, TFrom extends string, TTo extends string, TResolvedPath extends string = ResolveRelativePath<TFrom, TTo>> = RelativeToPath<TRouter, TTo, TResolvedPath> | CurrentPath<TRouter>;
34
+ type AbsoluteToPath<TRouter extends AnyRouter, TFrom extends string> = (string extends TFrom ? CurrentPath<TRouter> : TFrom extends `/` ? never : CurrentPath<TRouter>) | (string extends TFrom ? ParentPath<TRouter> : TFrom extends `/` ? never : ParentPath<TRouter>) | RouteToPath<TRouter> | (TFrom extends '/' ? never : string extends TFrom ? never : InferDescendantToPaths<TRouter, RemoveTrailingSlashes<TFrom>>);
35
+ type RelativeToPathAutoComplete<TRouter extends AnyRouter, TFrom extends string, TTo extends string> = string extends TTo ? string : string extends TFrom ? AbsoluteToPath<TRouter, TFrom> : TTo & `..${string}` extends never ? TTo & `.${string}` extends never ? AbsoluteToPath<TRouter, TFrom> : RelativeToCurrentPath<TRouter, TFrom, TTo> : RelativeToParentPath<TRouter, TFrom, TTo>;
36
+ type NavigateOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = ToOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo> & NavigateOptionProps;
37
+ /**
38
+ * The NavigateOptions type is used to describe the options that can be used when describing a navigation action in TanStack Router.
39
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType)
40
+ */
41
+ interface NavigateOptionProps {
42
+ /**
43
+ * If set to `true`, the router will scroll the element with an id matching the hash into view with default `ScrollIntoViewOptions`.
44
+ * If set to `false`, the router will not scroll the element with an id matching the hash into view.
45
+ * If set to `ScrollIntoViewOptions`, the router will scroll the element with an id matching the hash into view with the provided options.
46
+ * @default true
47
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#hashscrollintoview)
48
+ * @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)
49
+ */
50
+ hashScrollIntoView?: boolean | ScrollIntoViewOptions;
51
+ /**
52
+ * `replace` is a boolean that determines whether the navigation should replace the current history entry or push a new one.
53
+ * @default false
54
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#replace)
55
+ */
56
+ replace?: boolean;
57
+ /**
58
+ * Defaults to `true` so that the scroll position will be reset to 0,0 after the location is committed to the browser history.
59
+ * If `false`, the scroll position will not be reset to 0,0 after the location is committed to history.
60
+ * @default true
61
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#resetscroll)
62
+ */
63
+ resetScroll?: boolean;
64
+ /** @deprecated All navigations now use startTransition under the hood */
65
+ startTransition?: boolean;
66
+ /**
67
+ * If set to `true`, the router will wrap the resulting navigation in a `document.startViewTransition()` call.
68
+ * If `ViewTransitionOptions`, route navigations will be called using `document.startViewTransition({update, types})`
69
+ * where `types` will be the strings array passed with `ViewTransitionOptions["types"]`.
70
+ * If the browser does not support viewTransition types, the navigation will fall back to normal `document.startTransition()`, same as if `true` was passed.
71
+ *
72
+ * If the browser does not support this api, this option will be ignored.
73
+ * @default false
74
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#viewtransition)
75
+ * @see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition)
76
+ * @see [Google](https://developer.chrome.com/docs/web-platform/view-transitions/same-document#view-transition-types)
77
+ */
78
+ viewTransition?: boolean | ViewTransitionOptions;
79
+ /**
80
+ * If `true`, navigation will ignore any blockers that might prevent it.
81
+ * @default false
82
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#ignoreblocker)
83
+ */
84
+ ignoreBlocker?: boolean;
85
+ /**
86
+ * If `true`, navigation to a route inside of router will trigger a full page load instead of the traditional SPA navigation.
87
+ * @default false
88
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#reloaddocument)
89
+ */
90
+ reloadDocument?: boolean;
91
+ /**
92
+ * This can be used instead of `to` to navigate to a fully built href, e.g. pointing to an external target.
93
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
94
+ */
95
+ href?: string;
96
+ }
97
+ type ToOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.', TMaskFrom extends string = TFrom, TMaskTo extends string = '.'> = ToSubOptions<TRouter, TFrom, TTo> & MaskOptions<TRouter, TMaskFrom, TMaskTo>;
98
+ interface MaskOptions<in out TRouter extends AnyRouter, in out TMaskFrom extends string, in out TMaskTo extends string> {
99
+ _fromLocation?: ParsedLocation;
100
+ mask?: ToMaskOptions<TRouter, TMaskFrom, TMaskTo>;
101
+ }
102
+ type ToMaskOptions<TRouter extends AnyRouter = RegisteredRouter, TMaskFrom extends string = string, TMaskTo extends string = '.'> = ToSubOptions<TRouter, TMaskFrom, TMaskTo> & {
103
+ unmaskOnReload?: boolean;
104
+ };
105
+ type ToSubOptions<TRouter extends AnyRouter = RegisteredRouter, TFrom extends string = string, TTo extends string | undefined = '.'> = ToSubOptionsProps<TRouter, TFrom, TTo> & SearchParamOptions<TRouter, TFrom, TTo> & PathParamOptions<TRouter, TFrom, TTo>;
106
+ interface RequiredToOptions<in out TRouter extends AnyRouter, in out TFrom extends string, in out TTo extends string | undefined> {
107
+ /**
108
+ * The internal route path to navigate to. This should be a relative or absolute path within your application.
109
+ * For external URLs, use the `href` property instead.
110
+ * @example "/dashboard" or "../profile"
111
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
112
+ */
113
+ to: ToPathOption<TRouter, TFrom, TTo> & {};
114
+ }
115
+ interface OptionalToOptions<in out TRouter extends AnyRouter, in out TFrom extends string, in out TTo extends string | undefined> {
116
+ /**
117
+ * The internal route path to navigate to. This should be a relative or absolute path within your application.
118
+ * For external URLs, use the `href` property instead.
119
+ * @example "/dashboard" or "../profile"
120
+ * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/NavigateOptionsType#href)
121
+ */
122
+ to?: ToPathOption<TRouter, TFrom, TTo> & {};
123
+ }
124
+ type MakeToRequired<TRouter extends AnyRouter, TFrom extends string, TTo extends string | undefined> = string extends TFrom ? string extends TTo ? OptionalToOptions<TRouter, TFrom, TTo> : TTo & CatchAllPaths<TRouter> extends never ? RequiredToOptions<TRouter, TFrom, TTo> : OptionalToOptions<TRouter, TFrom, TTo> : OptionalToOptions<TRouter, TFrom, TTo>;
125
+ type ToSubOptionsProps<TRouter extends AnyRouter = RegisteredRouter, TFrom extends RoutePaths<TRouter['routeTree']> | string = string, TTo extends string | undefined = '.'> = MakeToRequired<TRouter, TFrom, TTo> & {
126
+ hash?: true | Updater<string>;
127
+ state?: true | NonNullableUpdater<ParsedHistoryState, HistoryState>;
128
+ from?: FromPathOption<TRouter, TFrom> & {};
129
+ unsafeRelative?: 'path';
130
+ };
131
+ type ParamsReducerFn<in out TRouter extends AnyRouter, in out TParamVariant extends ParamVariant, in out TFrom, in out TTo> = (current: Expand<ResolveFromParams<TRouter, TParamVariant, TFrom>>) => Expand<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>>;
132
+ type ParamsReducer<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = Expand<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>> | (ParamsReducerFn<TRouter, TParamVariant, TFrom, TTo> & {});
133
+ type ParamVariant = 'PATH' | 'SEARCH';
134
+ type ResolveRoute<TRouter extends AnyRouter, TFrom, TTo, TPath = ResolveRelativePath<TFrom, TTo>> = TPath extends string ? TFrom extends TPath ? RouteByPath<TRouter['routeTree'], TPath> : RouteByToPath<TRouter, TPath> : never;
135
+ type ResolveFromParamType<TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? 'allParams' : 'fullSearchSchema';
136
+ type ResolveFromAllParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? AllParams<TRouter['routeTree']> : FullSearchSchema<TRouter['routeTree']>;
137
+ type ResolveFromParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom> = string extends TFrom ? ResolveFromAllParams<TRouter, TParamVariant> : RouteByPath<TRouter['routeTree'], TFrom>['types'][ResolveFromParamType<TParamVariant>];
138
+ type ResolveToParamType<TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? 'allParams' : 'fullSearchSchemaInput';
139
+ type ResolveAllToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant> = TParamVariant extends 'PATH' ? AllParams<TRouter['routeTree']> : FullSearchSchemaInput<TRouter['routeTree']>;
140
+ type ResolveToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = ResolveRelativePath<TFrom, TTo> extends infer TPath ? undefined extends TPath ? never : string extends TPath ? ResolveAllToParams<TRouter, TParamVariant> : TPath extends CatchAllPaths<TRouter> ? ResolveAllToParams<TRouter, TParamVariant> : ResolveRoute<TRouter, TFrom, TTo>['types'][ResolveToParamType<TParamVariant>] : never;
141
+ type ResolveRelativeToParams<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo, TToParams = ResolveToParams<TRouter, TParamVariant, TFrom, TTo>> = TParamVariant extends 'SEARCH' ? TToParams : string extends TFrom ? TToParams : MakeDifferenceOptional<ResolveFromParams<TRouter, TParamVariant, TFrom>, TToParams>;
142
+ interface MakeOptionalSearchParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
143
+ search?: true | (ParamsReducer<TRouter, 'SEARCH', TFrom, TTo> & {});
144
+ }
145
+ interface MakeOptionalPathParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
146
+ params?: true | (ParamsReducer<TRouter, 'PATH', TFrom, TTo> & {});
147
+ }
148
+ type MakeRequiredParamsReducer<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = (string extends TFrom ? never : ResolveFromParams<TRouter, TParamVariant, TFrom> extends ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo> ? true : never) | (ParamsReducer<TRouter, TParamVariant, TFrom, TTo> & {});
149
+ interface MakeRequiredPathParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
150
+ params: MakeRequiredParamsReducer<TRouter, 'PATH', TFrom, TTo> & {};
151
+ }
152
+ interface MakeRequiredSearchParams<in out TRouter extends AnyRouter, in out TFrom, in out TTo> {
153
+ search: MakeRequiredParamsReducer<TRouter, 'SEARCH', TFrom, TTo> & {};
154
+ }
155
+ type IsRequired<TRouter extends AnyRouter, TParamVariant extends ParamVariant, TFrom, TTo> = ResolveRelativePath<TFrom, TTo> extends infer TPath ? undefined extends TPath ? never : TPath extends CatchAllPaths<TRouter> ? never : IsRequiredParams<ResolveRelativeToParams<TRouter, TParamVariant, TFrom, TTo>> : never;
156
+ type SearchParamOptions<TRouter extends AnyRouter, TFrom, TTo> = IsRequired<TRouter, 'SEARCH', TFrom, TTo> extends never ? MakeOptionalSearchParams<TRouter, TFrom, TTo> : MakeRequiredSearchParams<TRouter, TFrom, TTo>;
157
+ type PathParamOptions<TRouter extends AnyRouter, TFrom, TTo> = IsRequired<TRouter, 'PATH', TFrom, TTo> extends never ? MakeOptionalPathParams<TRouter, TFrom, TTo> : MakeRequiredPathParams<TRouter, TFrom, TTo>;
158
+ type ToPathOption<TRouter extends AnyRouter = AnyRouter, TFrom extends string = string, TTo extends string | undefined = string> = ConstrainLiteral<TTo, RelativeToPathAutoComplete<TRouter, NoInfer<TFrom> extends string ? NoInfer<TFrom> : '', NoInfer<TTo> & string>>;
159
+ type FromPathOption<TRouter extends AnyRouter, TFrom> = ConstrainLiteral<TFrom, RoutePaths<TRouter['routeTree']>>;
160
+ //#endregion
161
+ export { AbsoluteToPath, AddLeadingSlash, AddTrailingSlash, FindDescendantToPaths, FromPathOption, InferDescendantToPaths, IsRequiredParams, MakeOptionalPathParams, MakeOptionalSearchParams, MaskOptions, NavigateOptions, ParsePathParams, PathParamOptions, RelativeToCurrentPath, RelativeToParentPath, RelativeToPath, RelativeToPathAutoComplete, RemoveLeadingSlashes, RemoveTrailingSlashes, RequiredToOptions, ResolveCurrentPath, ResolveParentPath, ResolveRelativePath, ResolveRoute, SearchParamOptions, ToMaskOptions, ToOptions, ToPathOption, ToSubOptions, ToSubOptionsProps };
@@ -0,0 +1,6 @@
1
+ import { AnyRoute } from "./route.js";
2
+ //#region ../../node_modules/.pnpm/@tanstack+router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts
3
+ type RouteComponentType = 'component' | 'errorComponent' | 'pendingComponent' | 'notFoundComponent';
4
+ declare function loadRouteChunk(route: AnyRoute, componentTypesToLoad?: Array<RouteComponentType>): Promise<void> | undefined;
5
+ //#endregion
6
+ export { loadRouteChunk };