Birk Skyum
e313a1c5a7
feat(router-devtools-core): consolidate devtools logic in core and distributed with framework-specific bindings ( #3636 )
...
The original `@tanstack/router-devtools` package still work - it's not
touch by this PR in any way, apart from a migration note saying:
>[@tanstack/router-devtools] Warning: This package has moved to
@tanstack/react-router-devtools. Please switch to the new package, as
this package will be dropped soon.
This introduce three new packages
- @tanstack/router-devtools-core : This is a SolidJS port of the UI
And two adapters on top, that mount this solid app and forward
router/routerState into it.
- @tanstack/solid-router-devtools
- @tanstack/router-router-devtools
For use of devtools in production, a `TanStackRouterDevtoolsInProd` can
be imported instead of the standard `TanStackRouterDevtools` that'll be
tree shaken away in prod.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2025-03-08 13:20:26 +01:00
Birk Skyum
c288bfd5bf
refactor(router-devtools): Revert #3631 to ensure backwards compat with react 18 ( #3637 )
...
Reverts #3631 - it's relying on peer Deps of react v18 or v19, so it
might be a problem if we use v19-only features.
There is work underway that'll uncouple this - but it's not in yet
2025-03-02 17:11:07 +01:00
Birk Skyum
c32436f57f
refactor(router-devtools): Adopt recommendations for React 19 ( #3631 )
...
_Agnostic devtools step 1.5 of plan_
This is a follow up to below, so it'll be easier to review this diff
after that is merged / rebased
- #3629
This pr was entirely made by eslint --fix, with exception of manually
adding a return type
[here](https://github.com/TanStack/router/pull/3631/files#diff-c546297e16a8306a05e3da924970bcdb458d59da2794af391f6757680a1c38a1R66-R70 )
since the build would otherwise fail.
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-02 15:45:38 +01:00
Birk Skyum
743bfbc52d
refactor(router-devtools): have components in separate files like query-devtools ( #3629 )
...
_Agnostic devtools step 1 of plan_
This merely move some components into own files, as internal change in
router-devtools, so it's easier to keep an overview of imports.
This is a more similar structure to the query-devtools
-
https://github.com/TanStack/query/tree/main/packages/query-devtools/src
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-02 15:20:50 +01:00
Tanner Linsley
4d5d25bc08
Chained Server Fn Syntax, ServerFn Middleware ( #2513 )
...
* init
* Refactor createServerFn, add createServerMiddleware
* checkpoint
* checkpoint
* checkpoint
* update docs and examples to use new server function syntax
* fix: compilers, and update examples
* refactor: added merging of context and some type tests
* feat: createServerMiddleware context and input validation types
* checkpoint
* Server function middleware
* checkpoint
* checkpoint
* fix: return types from handlers, merging inputs etc
* checkpoint
* checkpoint
* checkpoint
* checkpoint
* feat: add types for client context and server context
* fix: merge server context
* checkpoint
* docs
* fix: better compilation of server functions
* fix: deferred example
* Html, Head, Body... be GONE!
* fix: API Routes
* checkpoint
* fix: support optional input types
* checkpoint
* fix lossy merge
* ci: fix build
* ci: fix start examples
* checkpoint
* feat: add client after context types
* test: add type tests
* checkpoint
* checkpoint
* Remove now-unnecessary data type headers
* checkpoint
* fix e2e test
* fix up merge conflicts
* ci: apply automated fixes
* fix: a few tests and a runtime bug
* chore: pnpm dedupe
except the search-validator-adapters example, everything else builds fine
* fix merge conflict
---------
Co-authored-by: chorobin <chrishorobin@hotmail.com>
Co-authored-by: Manuel Schiller <manuel.schiller@caligano.de>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-11-14 09:43:20 -07:00
Manuel Schiller
8d3d1091c3
chore: add eslint rule for unused imports ( #2523 )
2024-10-12 22:06:33 +02:00
Tanner Linsley
b3b57203cf
fix: better non-start ssr handlers ( #2093 )
...
* fix: better non-Start SSR handlers
* update lockfile
* ci: apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-07 11:14:20 -06:00
Leonardo Montini
00fb02c8a1
fix(router-devtools): align right masked path ( #2080 )
2024-08-04 02:13:45 +02:00
renovate[bot]
a1438ee99c
chore(deps): update all non-major dependencies ( #2051 )
...
* chore(deps): update all non-major dependencies
* Fix typescript-eslint rules
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com>
2024-07-29 19:30:05 +10:00
Tanner Linsley
3003d986c6
fix(router): fixed a lot of context related issues ( #1907 )
2024-07-16 19:34:14 +02:00
Lachlan Collins
431031182b
chore: Migrate to ESLint flat config ( #1846 )
...
* chore: Migrate to ESLint flat config
* Add knip.json
2024-06-28 11:59:39 +10:00
reihwald
a1fb6417b8
feat(router-devtools): add shadowDOMTarget option to TanStackRouterDevtools and TanStackRouterDevtoolsPanel ( #1709 ) ( #1720 )
...
* feat: add shadowDOMTarget option to TanStackRouterDevtools and TanStackRouterDevtoolsPanel (#1709 )
* feat: add documentation for shadowDOMTarget (#1709 )
---------
Co-authored-by: Liam Reihwald <liam.reihwald@worldline.com>
2024-06-11 17:52:08 +12:00
Tanner Linsley
6d29cd7f64
fix(start): add experimental support for route manifest and ssr route manifest usage
2024-05-23 11:59:40 -06:00
Gianmarco Rengucci
2eff62003f
fix(router-devtools): correctly compose button toggle styles ( #1613 )
2024-05-17 22:17:49 +02:00
Tanner Linsley
7987a892cb
fix: devtools
2024-04-26 14:47:05 -06:00
Tanner Linsley
6486b8e92c
fix: properly handle redirects across server, pending, and transitioning navigations
...
Fixes #1523
2024-04-26 14:45:43 -06:00
Manuel Schiller
c13eeaf63e
fix: type error in devtools
2024-04-25 22:22:42 +02:00
Sean Cassiere
7de90af88e
refactor: explicit re-exports for the packages ( #1374 )
...
* refactor(react-router): tanstack history
* refactor(react-router): not-found
* refactor(react-router): utils
* refactor(react-router): useRouterState
* refactor(react-router): useRouter
* refactor(react-router): useRouteContext
* refactor(react-router): routerContext
* refactor(react-router): useSearch
* refactor(react-router): useParams
* refactor(react-router): useNavigate
* refactor(react-router): useBlocker
* refactor(react-router): searchParams
* refactor(react-router): scroll-restoration
* refactor(react-router): RouterProvider
* refactor(react-router): router
* refactor(react-router): routeInfo
* refactor(react-router): route
* refactor(react-router): redirects
* refactor(react-router): qss
* refactor(react-router): path
* refactor(react-router): Mathes
* refactor(react-router): location
* refactor(react-router): link
* refactor(react-router): lazyRouteComponent
* refactor(react-router): fileRoute
* fix(react-router): all other functions from `utils` and the `getRenderedMatches` function from `Matches`
* refactor(react-router): CatchBoundary
* refactor(react-router): defer
* refactor(react-router): awaited
* refactor(react-router-server): Asset
* revert(react-router-server): Asset
* refactor(react-router-server): Asset
* refactor(react-router-server): createServerFn
* refactor(react-router-server): DehydrateRouter
* refactor(react-router-server): getManifestAssets
* refactor(react-router-server): json
* refactor(react-router-server): Meta
* refactor(react-router-server): RouterManagedTag
* refactor(Scripts):
* refactor(react-router-server): StartClient
* refactor(react-router-server): Scripts
* refactor(react-router-server): transformStreamWithRouter
* refactor(router-devtools): devtools
* refactor(react-router): HistoryState
* fix(react-router): missing ToPathOption type
* fix: missing type exports from `route`
* fix(react-router): missing types for `router`
2024-03-28 16:10:15 +13:00
Dominik Dorfmeister
4972e945c5
ci: execute type checks against multiple TS versions ( #1367 )
...
* fix: peerDependencies
* docs: requirements
* ci: run type tests against multiple TS versions
* chore: newline
* chore: fix prettier
* fix: wrappers must return a JSX Element
* fix: have Explorer return JSX.Element
* fix: another one
2024-03-26 10:12:00 +01:00
Dominik Dorfmeister
41391cdd4a
refactor: eslint ( #1365 )
...
* feat: eslint
bring over the configs from the query repo
* refactor: auto fix history package
* refactor: manually fix history package
* refactor(react-cross-context): eslint
* refactor(react-router-server): eslint auto fix
* refactor(react-router-server): eslint manual fixes
* refactor(react-cli): auto fix eslint
* refactor(react-cli): manual fix eslint
* refactor(router-devtools): auto fix eslint
* refactor(router-devtools): manual fix eslint
* chore: prettier --write
* refactor(router-generator): auto fix eslint
* refactor(router-generator): manual fix eslint
* refactor(router-vite-plugin): auto fix eslint
* refactor(react-router): auto fix eslint
* refactor(react-router): manual fix eslint
* fix: revert some destructive changes
* refactor: fix remaining errors
* some more disables
* fix: eslint
2024-03-26 09:08:49 +01:00
Sean Cassiere
b8c6fd0236
fix(router-devtools): non-nested usage of TanStackRouterDevtools and missing context with the usage of TanStackRouterDevtoolsPanel ( #1336 )
...
* fix: `<TanStackRouterDevtools>` not working when not nested in `<RouterProvider>`
the `<TanStackRouterDevtools` component threw errors when it wasn't rendered inside the `<RouterProvider>` due to some of its calls that relied on this nesting.
* fix: `<TanStackRouterDevtoolsPanel>` not working because of the reliance on `DevtoolsOnCloseContext`
the `<TanStackRouterDevtoolsPanel>` component threw errors on render due to its reliance on the `DevtoolsOnCloseContext` which it wasn't wrapped with
2024-03-19 09:20:44 +01:00
Tanner Linsley
3b559fc931
fix: ssr improvements ( #1248 )
...
* fix: ssr improvements
* fix: remove log
* fix: remove log
* fix: remove comments
* docs: root abstraction
* fix: remove commented code
* fix: remove old TLoaderData fix attempt
* fix: remove commented code
* fix: imports
* docs: format
* fix: deprecate and handle not found "global" option
2024-03-04 11:23:41 -07:00
Nikola Hristov
0fab06123b
fix: replace JSX.Element with React.ReactNode for children-like props ( #1221 )
2024-02-25 21:52:00 +01:00
Tanner Linsley
c1b2b673ab
fix: devtools for SSR
2024-02-24 23:48:20 -07:00
Aryan Deora
4875992599
feat(router-devtools): New UI Horizontal Upgrade ( #1222 )
...
* devtools init
* Add routes layout
* Transition to goober part 1
* Remove styled components
* Completed devtools
* Reset kitchen sink example
2024-02-24 20:58:16 -07:00
Nikola Hristov
13a2bbe703
fix: Declare handleDragStart as optional param ( #1190 )
2024-02-15 23:15:16 +01:00
Tanner Linsley
68ceeeaa34
fix: devtools router prop
...
Fixes #1065
2024-01-26 00:00:27 -07:00
Ahmed Nawaf
3468fd2dce
fix: Ensure consistent panel direction in RTL projects ( #1041 )
2024-01-20 15:32:41 +01:00
Rui Saraiva
04bb62efea
chore(examples): upgrade examples dependencies ( #947 )
2024-01-09 00:55:48 +01:00
Manuel Schiller
136cdeaf10
fix(devtools): try catch around JSON.stringify ( #916 )
...
fixes #909
2024-01-03 14:54:43 -07:00
Tanner Linsley
912fae7e67
examples: some styles
2023-12-23 15:33:16 -07:00
Tanner Linsley
3206f0481b
fix: swr + remove shouldReload, activeOptions?.exact for search params
2023-12-18 17:28:12 -07:00
Tanner Linsley
0ff2f500f5
fix: fine-grained useNavigate
2023-12-08 00:27:28 -07:00
Tanner Linsley
2cd2eb2080
fix: fine-grained subscriptions
2023-12-06 16:07:59 -07:00
Tanner Linsley
8fab8b4175
feat: loader + ephemeral loaderData
...
Breaking Changes:
- `load` has been renamed back (I know...) to `loader`. Don't kill me. This again stays true to the nature of its functionality.
- `loader` can once again return data, but it is stored ephemerally on the route match and re-loaded on every navigation.
- If you choose to store data in `loaderData` from the `loader` function, you'll likely want to employ some level of caching to ensure you're only fetching data when necessary and resolving as early as possible if you have any meaningful cached data to display to the user. TanStack Query is a great tool to do this.
2023-11-29 01:16:52 -07:00
Tanner Linsley
908603b1c6
fix: load skips, outdated search params
...
- Matches run for every url change, including beforeLoad and load
- Search params in matches and hooks are now always up to date with the latest known URL in matches
2023-11-06 13:42:29 -07:00
Tanner Linsley
4a792144eb
feat: Big refactor to React only
...
There are many breaking changes in this release:
- The Router class no longer has many of the methods it had.
- Most of these methods have been moved to the new routerContext, which is served via the useRouter() hook
- React state is being used for all state management, which should set the stage for better transition/suspense support
- Router Context and route context has been renamed to Router Meta and Route Meta
- Loaders are gone. You can still force a route to wait for an async function via `beforeLoad`, which is serial or `load` which is parallel.
- There's a lot of other changes, but I'm too tired to think straight.
2023-11-05 01:38:08 -06:00
Tanner Linsley
ae621c93ea
feat: route masking
2023-09-11 10:07:10 -06:00
Tanner Linsley
2f92981970
fix: preloading bug
2023-09-01 14:25:09 -06:00
Tanner Linsley
06601f87b7
fix: refetchOnWindowFocus
2023-09-01 13:07:57 -06:00
Tanner Linsley
9995e8975e
fix: expose onEnter, onTransition, onLeave route options.
2023-09-01 12:13:23 -06:00
Tanner Linsley
4767648c15
fix: framework agnostic packages
2023-08-08 18:34:31 -06:00
Tanner Linsley
2605d24c3e
fix: devtools - show preload matches pane again
2023-08-07 16:28:01 -06:00
Tanner Linsley
79eb2ff027
feat: bring back route loaders, caching, etc
2023-08-07 15:22:49 -06:00
Tanner Linsley
5955cbf4e1
fix: code-split patterns + example, suspense fixes
2023-08-04 11:01:48 -06:00
Tanner Linsley
9bfd4f8ca1
fix: big refactor
2023-07-27 20:44:08 -06:00
Tanner Linsley
a4cf186880
fix: better route matching
...
Fixes #633
2023-07-22 23:28:28 -06:00
Tanner Linsley
b27f6498cd
fix: changes for SSR
2023-07-13 12:31:00 -06:00
Tanner Linsley
b2e3d4c7ca
fix: devtools active match
2023-07-10 00:50:02 -06:00
Tanner Linsley
284c91edde
fix: devtools fixes
2023-07-10 00:07:17 -06:00