Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/tanstack-start/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ node_modules
.env
.vercel
.output
.vinxi
.nitro

/build/
/api/
/server/build
/public/build
.vinxi
.tanstack
# Sentry Config File
.env.sentry-build-plugin
/test-results/
Expand Down
22 changes: 0 additions & 22 deletions examples/tanstack-start/app.config.ts

This file was deleted.

42 changes: 21 additions & 21 deletions examples/tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
"sideEffects": false,
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"dev": "vite dev",
"build": "vite build",
"lingui:extract": "lingui extract --clean",
"start": "vinxi start"
"start": "vite start"
},
"dependencies": {
"@lingui/core": "^5.3.0",
"@lingui/react": "^5.3.0",
"@tanstack/react-router": "^1.114.27",
"@tanstack/react-router-devtools": "^1.114.27",
"@tanstack/react-start": "^1.114.28",
"@lingui/core": "^5.5.1",
"@lingui/react": "^5.5.1",
"@tanstack/react-router": "^1.133.32",
"@tanstack/react-router-devtools": "^1.133.34",
"@tanstack/react-start": "^1.133.34",
"cookie-es": "^2.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"redaxios": "^0.5.1",
"tailwind-merge": "^2.6.0",
"vinxi": "0.5.3"
"tailwind-merge": "^3.3.1"
},
"devDependencies": {
"@lingui/babel-plugin-lingui-macro": "^5.3.0",
"@lingui/cli": "^5.3.0",
"@lingui/vite-plugin": "^5.3.0",
"@lingui/babel-plugin-lingui-macro": "^5.5.1",
"@lingui/cli": "^5.5.1",
"@lingui/vite-plugin": "^5.5.1",
"@tailwindcss/vite": "^4.1.10",
"@types/node": "^22.5.4",
"@types/react": "^19.0.8",
"@types/react-dom": "^19.0.3",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"typescript": "^5.7.2",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "^5.1.0",
"tailwindcss": "^4.1.10",
"typescript": "^5.9.3",
"vite": "^7.1.12",
"vite-tsconfig-paths": "^5.1.4"
}
}
6 changes: 0 additions & 6 deletions examples/tanstack-start/postcss.config.mjs

This file was deleted.

19 changes: 0 additions & 19 deletions examples/tanstack-start/src/api.ts

This file was deleted.

14 changes: 0 additions & 14 deletions examples/tanstack-start/src/client.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions examples/tanstack-start/src/functions/deferred.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { createServerFn } from "@tanstack/react-start"

export const personServerFn = createServerFn({ method: "GET" })
.validator((d: string) => d)
.inputValidator((d: string) => d)
.handler(({ data: name }) => {
return { name, randomNumber: Math.floor(Math.random() * 100) }
})

export const slowServerFn = createServerFn({ method: "GET" })
.validator((d: string) => d)
.inputValidator((d: string) => d)
.handler(async ({ data: name }) => {
await new Promise((r) => setTimeout(r, 1000))
return { name, randomNumber: Math.floor(Math.random() * 100) }
Expand Down
10 changes: 10 additions & 0 deletions examples/tanstack-start/src/functions/headers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createIsomorphicFn } from "@tanstack/react-start"
import { getRequestHeaders } from "@tanstack/react-start/server"

export const getIsomorphicHeaders = createIsomorphicFn()
.server(async () => {
return getRequestHeaders()
})
.client(() => {
return {}
})
15 changes: 15 additions & 0 deletions examples/tanstack-start/src/functions/locale.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { createServerFn } from "@tanstack/react-start"
import { setResponseHeader } from "@tanstack/react-start/server"
import { serialize } from "cookie-es"

export const updateLocale = createServerFn({ method: "POST" })
.inputValidator((locale: string) => locale)
.handler(async ({ data }) => {
setResponseHeader(
"Set-Cookie",
serialize("locale", data, {
maxAge: 30 * 24 * 60 * 60,
path: "/",
})
)
})
11 changes: 11 additions & 0 deletions examples/tanstack-start/src/functions/origin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createIsomorphicFn } from "@tanstack/react-start";
import { getRequest } from "@tanstack/react-start/server";

export const getOrigin = createIsomorphicFn()
.server(() => {
const request = getRequest();
const url = new URL(request.url);

return url.origin;
})
.client(() => "");
6 changes: 0 additions & 6 deletions examples/tanstack-start/src/global-middleware.ts

This file was deleted.

82 changes: 54 additions & 28 deletions examples/tanstack-start/src/locales/en/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,52 @@ msgstr ""
"Language-Team: \n"
"Plural-Forms: \n"

#. js-lingui-explicit-id
#: src/routes/users.$userId.tsx:18
msgid "Failed to fetch user"
msgstr "Failed to fetch user"

#. js-lingui-explicit-id
#: src/routes/users.route.tsx:18
msgid "Failed to fetch users"
msgstr "Failed to fetch users"

#. js-lingui-explicit-id
#: src/routes/api/users.$id.ts:22
msgid "User not found"
msgstr "User not found"

#: src/routes/posts_.$postId.deep.tsx:24
msgid "← All Posts"
msgstr "← All Posts"

#: src/routes/deferred.tsx:70
#: src/routes/$lang/content-bis.tsx:13
msgid "Another translated content from the URL."
msgstr "Another translated content from the URL."

#: src/routes/$lang/route.tsx:26
msgid "Check out other contents:"
msgstr "Check out other contents:"

#: src/routes/$lang/content.tsx:15
#: src/routes/$lang/content-bis.tsx:16
msgid "Check this content in other languages:"
msgstr "Check this content in other languages:"

#: src/routes/__root.tsx:144
#: src/routes/$lang/route.tsx:31
msgid "Content"
msgstr "Content"

#: src/routes/$lang/route.tsx:38
msgid "Content Bis"
msgstr "Content Bis"

#: src/routes/deferred.tsx:58
msgid "Count: {count}"
msgstr "Count: {count}"

#: src/routes/posts.$postId.tsx:35
msgid "Deep View"
msgstr "Deep View"

#: src/routes/__root.tsx:138
#: src/routes/__root.tsx:135
msgid "Deferred"
msgstr "Deferred"

#: src/routes/users.$userId.tsx:20
msgid "Failed to fetch user"
msgstr "Failed to fetch user"

#: src/routes/users.route.tsx:19
msgid "Failed to fetch users"
msgstr "Failed to fetch users"

#: src/components/NotFound.tsx:19
msgid "Go back"
msgstr "Go back"
Expand All @@ -60,7 +75,12 @@ msgstr "Go to route A"
msgid "Go to route B"
msgstr "Go to route B"

#: src/routes/__root.tsx:106
#: src/routes/deferred.tsx:11
msgid "Hello deferred!"
msgstr "Hello deferred!"

#: src/routes/users.index.tsx:10
#: src/routes/__root.tsx:103
#: src/components/DefaultCatchBoundary.tsx:37
msgid "Home"
msgstr "Home"
Expand All @@ -81,43 +101,44 @@ msgstr "I'm A!"
msgid "I'm B!"
msgstr "I'm B!"

#: src/routes/deferred.tsx:74
#: src/routes/deferred.tsx:62
msgid "Increment"
msgstr "Increment"

#: src/routes/deferred.tsx:44
#: src/routes/deferred.tsx:32
msgid "Loading person..."
msgstr "Loading person..."

#: src/routes/deferred.tsx:60
#: src/routes/deferred.tsx:48
msgid "Loading stuff..."
msgstr "Loading stuff..."

#: src/routes/posts.route.tsx:17
msgid "Non-existent Post"
msgstr "Non-existent Post"

#: src/routes/users.route.tsx:33
#: src/routes/users.route.tsx:34
msgid "Non-existent User"
msgstr "Non-existent User"

#: src/routes/__root.tsx:130
#: src/routes/__root.tsx:127
msgid "Pathless Layout"
msgstr "Pathless Layout"

#: src/routes/posts.$postId.tsx:14
msgid "Post not found"
msgstr "Post not found"

#: src/routes/__root.tsx:114
#: src/routes/users.index.tsx:11
#: src/routes/__root.tsx:111
msgid "Posts"
msgstr "Posts"

#: src/routes/posts.index.tsx:11
msgid "Select a post."
msgstr "Select a post."

#: src/routes/users.index.tsx:11
#: src/routes/users.index.tsx:22
msgid "Select a user."
msgstr "Select a user."

Expand All @@ -129,19 +150,24 @@ msgstr "Start Over"
msgid "The page you are looking for does not exist."
msgstr "The page you are looking for does not exist."

#: src/routes/__root.tsx:147
#: src/routes/__root.tsx:153
msgid "This Route Does Not Exist"
msgstr "This Route Does Not Exist"

#: src/routes/$lang/content.tsx:12
msgid "Translated content from the URL."
msgstr "Translated content from the URL."

#: src/components/DefaultCatchBoundary.tsx:30
msgid "Try Again"
msgstr "Try Again"

#: src/routes/users.$userId.tsx:26
#: src/routes/users.$userId.tsx:28
#: src/routes/api/users.$id.ts:28
msgid "User not found"
msgstr "User not found"

#: src/routes/__root.tsx:122
#: src/routes/__root.tsx:119
msgid "Users"
msgstr "Users"

Expand Down
Loading