0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
Commit graph

601 commits

Author SHA1 Message Date
Manuel Schiller
56ce17786f docs: Link to property 2024-09-12 17:42:12 +02:00
Manuel Schiller
d328172d10 chore: no braces for strings in JSX 2024-09-12 17:42:12 +02:00
Christopher Horobin
0890710329
chore: support TS 5.6 and drop support for 5.0 (#2299) 2024-09-10 02:29:52 +02:00
Manuel Schiller
ca9b4beb29
feat(create-router): added project generator to scaffold router projects (#2300) 2024-09-10 00:41:44 +02:00
ridwansameer
89f920941b
chore(start): add Start example with supabase for auth (#2277)
* Example: Add Supabase Auth example

* Docs: Add Supabase auth to docs config

* Fix: Remove extra files and rename supabase

* Fix: remove comment

* ci: apply automated fixes

* Refactor: Rename supabase client to not violate react hook rules

---------

Co-authored-by: Ridwan Sameer <ridsameer2000@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-09-07 15:13:00 +12:00
Manuel Schiller
f64587fe83
feat(router-generator): allow virtual subtree in file based routing (#2271) 2024-09-05 23:22:06 +02:00
SeanCassiere
5f791faae8
docs: linking to the virtual files routes page 2024-09-05 10:03:07 +12:00
Manuel Schiller
a941696174
feat(router-generator): custom route tree configuration based on virtual file routes (#2265) 2024-09-04 23:37:02 +02:00
Luca Lee
82404056ac
docs(react): add missing .md extension to link paths in route-trees.md (#2252) 2024-09-03 04:30:53 +02:00
Luca Lee
ae8c33af5f
docs(react): remove reference to deleted examples in route-trees.md (#2250)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-09-03 11:23:39 +12:00
Luca Lee
12fd81129d
docs(router): fix broken links in route-trees.md and routing-concepts.md (#2249) 2024-09-03 11:20:07 +12:00
NekoChan
f32b01daab
docs(start): fix tsconfig (#2246) 2024-09-03 11:18:28 +12:00
Manuel Schiller
6dbe4b0eed
feat(router-generator): allow to customize index and route token (#2203)
* feat(router-generator): allow to customize `index` and `route` token

* semantically validate generator config in a single place

* ci: apply automated fixes

* remove usage of CHECK_USER_FLAGS_TO_BE_CHANGED

* check indexToken / routeToken before determining isLayout status

* use tokens with leading and trailing slashes

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-31 22:36:58 +02:00
Brian
0d77cbf2e3
docs(react): remove duplicated line in overview.md (#2236) 2024-08-31 19:42:51 +02:00
Tanner Linsley
a8703f017d docs: update api-routes and server-function to use vinxi 2024-08-30 10:20:40 -06:00
Tanner Linsley
bf092b6956 docs: fix route trees 2024-08-29 14:01:01 -06:00
Tanner Linsley
20266513a6 docs: route tree fixes 2024-08-28 22:52:28 -06:00
Sean Cassiere
03f9fc74d0
docs(start): partner logos to be visible in dark-mode (#2212)
* docs(start): databases

* docs(start): hosting

* docs(start): observability

* docs(start): fix the link

* docs(start): authentication

* docs(start): use the tracking link

* docs(start): use the tracking link

* docs(start): more tracking link stuff

* docs(start): overview
2024-08-29 15:21:43 +12:00
Sean Cassiere
d10ac646cf
docs(start): link to the file-based routing guide from the api routes guide (#2211) 2024-08-29 14:35:17 +12:00
Timotei Albu
c881b2cc55
docs(router): spelling and other minor markdown for to the updated guides (#2210)
* Update routing-concepts.md

* spelling.
2024-08-29 12:28:36 +12:00
Tom Redman
5349357863
docs(start): dark mode for the Convex logo on the "databases" guide (#2209)
* Added dark mode Convex logo

Added a dark mode Convex logo while retaining the light version, depending on the user's theme.

* update to use `raw.githubusercontent.com`

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-29 12:27:59 +12:00
Tanner Linsley
fa66b7671d docs: Reorg and simplify some of the main routing docs 2024-08-28 11:47:27 -06:00
Sean Cassiere
dbb2b886cc
docs(start): API routes (#2202)
Docs for the API Routes in #2185.
2024-08-28 12:20:16 +12:00
Tanner Linsley
610fd101c7 docs: fix server function context example 2024-08-27 14:27:42 -06:00
Tanner Linsley
21bf687b26
feat(start): add api routes (#2185)
* feat: partial work on file based api routes

* feat(router-generator,start): tsr config to support `apiBase`

* feat(router-generator): adding the route template

* feat(router-generator): smoke test to make sure no conflicting configurations are found

* chore(start-basic): cleanup to a workable state

* feat(router-generator): generate the manifest for api-routes

* feat(start): make sure requests are getting through

* fix(react-router,start): get the exports sorted

* refactor(router-generator): to use the same output as normal route files

* feat(start): piping the manifest to the api-handler

* chore(start): remove unused config option since the apiBase is being taken from tsr-generator

* fix(start): only add the api router to vinxi if its handler exists

* style(start): eslint

* test(router-generator): checking that the custom base is respected by the generator

* chore(start): add a dot notated api route and `console.debug` instead

* refactor(router-generator,start): normalize the capitalization of "API" across the generator and start

* fix(start): `createAPIHandler` to `createApiHandler`

* feat(router-generator,start): correctly output the api build chunks

* feat(start): 🎉 API-routes are working
now it just needs Tanner's multi-sort logic stuff added-in

* fix(start,router-generator): split the API stuff from the "server" export to its own "api"export

* feat(router-generator): handle updating the path `escapedPath` on API-Routes like we do for regular file-routes

* refactor(router-generator,start): rename functions

* feat(start): add logic for route matching with TSR routes

* feat(react-router,router-generator,start): remove the stuff to do with generating the "api-manifest". only the existing "route-manifest" remains. the additional tests have also been removed

* fix(start): filter out potential api-route mismatches before trying to begin the actually "find" process

* test: start-basic example with api routes

* chore: add a DEPLOY_URL field to better show that the user needs to supply this SSR

* test: start-basic-react-query example with api routes

* chore: rename "post" to "user"

* feat(start): allow the HTTP "HEAD" method

* feat(start): solution for code-based api-routes

* revert(start): undo the code-based approach since the production builds didn't work

* feat(start): add back the code-based approach

* chore(start): rename type "APIFileRouteReturnType" to "APIRouteReturnType"

* fix(start): path logic to make sure url segments cannot be less than route segments

* refactor(start): code-based approach to accept a an object of routes keyed under "routes"

* chore(start): add comments since

* refactor(router-generator,start): less exports and reuse make the fs-router extensible

* refactor(start): a more generic name

* refactor(start): generic naming again

* refactor(start): strongly type the api handlers

* docs(router): update the file-based routing to callout that `/api` routes will be ignored by router

* docs(router): callout how the `api_base can be changed`

---------

Co-authored-by: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-27 19:46:20 +12:00
NekoChan
edd963eff5
docs(start): incorrect import path for TanStack Query (#2187)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-26 22:47:32 +12:00
Tanner Linsley
8f5c76897b docs: init ssr docs 2024-08-25 21:59:09 -06:00
Tanner Linsley
17836f2e54 docs: add static prerendering 2024-08-25 21:46:21 -06:00
Tanner Linsley
c2d4a9e422 docs: update server functions 2024-08-25 13:53:28 -06:00
Tanner Linsley
77f32a7e6f docs: init server function docs 2024-08-25 13:38:59 -06:00
Sean Cassiere
cabd42686e
docs(start): markdown to follow the website flow (#2173)
* docs(start): markdown to follow the website flow

* docs(start): fixup the content hierarchy for the getting started guide
2024-08-23 19:31:49 +12:00
Gerard Ketuma
b8c0420a75
docs(router): fix grammatical errors in the "Code-splitting" guide (#2171) 2024-08-23 16:55:49 +12:00
Sina Niyavarzi
8e0dd0d315
docs(start): fixed some grammatical errors in the Start "Overview" (#2170) 2024-08-23 11:22:10 +12:00
Tanner Linsley
bba02627c3 docs: partner images 2024-08-22 12:36:27 -06:00
Tanner Linsley
c068515595 docs: start typo 2024-08-22 12:31:28 -06:00
Tanner Linsley
4ce6c16050 docs: startners 2024-08-22 12:30:53 -06:00
Tanner Linsley
dd134b55e4 docs: add placeholders for pillar features and partners 2024-08-22 12:00:50 -06:00
Tanner Linsley
52155a28aa docs: init start docs 2024-08-22 11:15:20 -06:00
Sean Cassiere
8cf525d99c
refactor(router-generator,router-plugin,start): mark experimental.enableCodeSplitting functionality as stable with the name autoCodeSplitting (#2163)
* feat(router-generator): add the `autoCodeSplitting` option to the expected config

* refactor(router-plugin): accept the new `autoCodeSplitting` flag + throw an error if the older `experimental.enableCodeSplitting` flag is still being used

* refactor(start): update the vinxi configuration to use the new `autoCodeSplitting` flag instead of the `experimental.enableCodeSplitting` flag

* docs: update the "file-based-routing" guide with the correct flag

* docs: update the content in the "code-splitting" guide for better readability and communicate the necessary steps needed for using the feature

* docs: update the title on the "file-based-routing" guide

* examples: remove the older `experimental.enableCodeSplitting` flags from the trpc examples
2024-08-22 08:50:48 +12:00
Pankaj chauhan
22f0985080
doc: update the accumulated router context guide to for checking breadcrumbs (#2160)
* doc(accumulated-route-context): useRouterState to listen reactive state change

* Apply suggestions from code review

Don't use `routeContext`, use `context` instead.

* ci: apply automated fixes

* docs: cleanup the breadcrumbs filer

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-08-21 13:05:31 +12:00
Christopher Horobin
42f703d05b
feat(react-router): add context option to route (#2104)
* feat(react-router): add types for routeContext

* perf(react-router): optimise new types for `routeContext`

* chore(react-router): add type tests for routeContext and beforeLoad

* checkpoint

* ci: apply automated fixes

* updates docs

* fix: tests

* fix: context

* chore: fix the lockfile

* ci: apply automated fixes

* style(react-router): fixup the eslint errors

* fix: hydration mismatch during SSR, refactor matchRoutes to take location

* fix: serialize beforeLoadContext during SSR

* examples: add start-basic-auth

* fix: history export parseHref

* feat: routeOptions.preload to allow disabling route-level preloading

* fix: full support for href redirects

* feat: useServerFn hook to allow handling server side effects like redirects outside of router lifecycles

* fix: server redirect and notFound now default to 200 status code for runtime to handle

* fix: update pnpm

* ci: apply automated fixes

* examples: fix start-basic-auth

* tests: fix playwright

* tests: fix playwright

* tests: fix playwright

* sean's changes to the route context branch (#2141)

* chore: type the objects used for `routeContext` and `beforeLoad`

* refactor: move the defaultTransformer from start to react-router

* test: add tests to the defaultTransformer

* test(react-router): add runtime unit tests for the `context` function

* examples: init start-clerk-basic

* fix: lockfile

* ci: apply automated fixes

* test: remove failing test for WIP clerk example

* tests: fix more clerk wip tests

* fix: lockfile

* tests: more clerk fixes

* tests: skip WIP clerk example

---------

Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
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-08-20 13:39:17 -06:00
The Blue Dragon
e5fd079b3a
docs: Removed the redundant "default" (#2146) 2024-08-18 18:44:07 +02:00
jun won
1f5168dc3f
docs: fix a typo in useBlocker example code block (#2136) 2024-08-15 14:43:35 +12:00
Sean Cassiere
e1d51f8b98
docs: hide the start-basic-rsc and show the start-basic-react-query example on the website (#2135)
* docs: hide the `start-basic-rsc` example from the website

* docs: show the `start-basic-react-query` example on the website
2024-08-15 13:08:53 +12:00
Sean Cassiere
75bae7ab8c
docs: correct the documentation on the expected behaviour of Router.onError (#2134) 2024-08-15 12:52:33 +12:00
Sean Cassiere
c66e1b55eb
fix(react-router): explicitly set the default notFoundMode and update the RouterOptions JSDoc comments (#2133)
* fix(react-router): set the default `notFoundMode` during instantiation

* docs: update `RouterOptions` with `notFoundMode` and `defaultViewTransition`
2024-08-15 12:30:06 +12:00
Christopher Horobin
3a8dcf7c46
feat(react-router): support input types for search validation schemas (#2000)
* feat: add support for search schema adapters
2024-08-14 21:20:23 +02:00
Sean Cassiere
16761e250b
examples: fix up the "with-trpc-react-query" example (#2105)
* rename folder

* fixup the with-trpc-react-query example

* cleanups in the "with-trpc" example

* sync with "with-trpc"

* upgrade the "with-trpc" example, trpc package

* sync the spinner

* chore: display the examples on the website
2024-08-08 15:49:30 +12:00
Honza Hrubý
d5d151c847
feat(router-generate): add option to skip generating route manifest (#2100)
* feat(router-generate): add option to skip generating route manifest

* rename option

* document

* refactor: one last rename

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
2024-08-08 11:58:29 +12:00
autofix-ci[bot]
a330681a20
ci: apply automated fixes 2024-08-07 17:04:40 +00:00