Skip to content
Merged
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 app/libraries/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const configProject: Library = {
export const configProject = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

satisfies is generally nicer but I'm aware that it's slower then doing the explicit typing. willing to revert.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait, this is application code not a library. I think it's fine then.

id: 'config',
name: 'TanStack Config',
cardStyles: `shadow-xl shadow-slate-700/20 dark:shadow-lg dark:shadow-slate-500/30 text-slate-500 border-2 border-transparent hover:border-current`,
Expand All @@ -19,4 +19,4 @@ export const configProject: Library = {
colorTo: 'to-gray-700',
textColor: 'text-gray-700',
frameworks: [],
}
} satisfies Library
4 changes: 2 additions & 2 deletions app/libraries/form.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const formProject: Library = {
export const formProject = {
id: 'form',
name: 'TanStack Form',
cardStyles: `shadow-xl shadow-yellow-700/20 dark:shadow-lg dark:shadow-yellow-500/30 text-yellow-500 border-2 border-transparent hover:border-current`,
Expand All @@ -20,4 +20,4 @@ export const formProject: Library = {
textColor: 'text-yellow-600',
frameworks: ['react', 'vue', 'angular', 'solid', 'lit'],
scarfId: '72ec4452-5d77-427c-b44a-57515d2d83aa',
}
} satisfies Library
4 changes: 2 additions & 2 deletions app/libraries/query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { handleRedirects } from '~/utils/handleRedirects.server'
import { Library } from '.'

export const queryProject: Library = {
export const queryProject = {
id: 'query',
name: 'TanStack Query',
cardStyles: `shadow-xl shadow-red-700/20 dark:shadow-lg dark:shadow-red-500/30 text-red-500 border-2 border-transparent hover:border-current`,
Expand Down Expand Up @@ -39,7 +39,7 @@ export const queryProject: Library = {
'from=reactQueryV3'
)
},
}
} satisfies Library

// Redirect old query v3 docs
// prettier-ignore
Expand Down
5 changes: 2 additions & 3 deletions app/libraries/ranger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const rangerProject: Library = {
export const rangerProject = {
id: 'ranger',
name: 'TanStack Ranger',
cardStyles: `shadow-xl shadow-pink-700/20 dark:shadow-lg dark:shadow-pink-500/30 text-pink-500 border-2 border-transparent hover:border-current`,
Expand All @@ -19,6 +19,5 @@ export const rangerProject: Library = {
colorTo: 'to-pink-500',
textColor: 'text-pink-500',
frameworks: ['react'],
defaultDocs: 'framework/react/overview',
scarfId: 'dd278e06-bb3f-420c-85c6-6e42d14d8f61',
}
} satisfies Library
4 changes: 2 additions & 2 deletions app/libraries/router.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const routerProject: Library = {
export const routerProject = {
id: 'router',
name: 'TanStack Router',
cardStyles: `shadow-xl shadow-emerald-700/20 dark:shadow-lg dark:shadow-emerald-500/30 text-emerald-500 dark:text-emerald-400 border-2 border-transparent hover:border-current`,
Expand All @@ -23,4 +23,4 @@ export const routerProject: Library = {
defaultDocs: 'framework/react/overview',
hideCodesandboxUrl: true,
showVercelUrl: true,
}
} satisfies Library
4 changes: 2 additions & 2 deletions app/libraries/start.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const startProject: Library = {
export const startProject = {
id: 'start',
name: 'TanStack Start',
cardStyles: `shadow-xl shadow-cyan-500/20 dark:shadow-lg dark:shadow-cyan-500/30 text-cyan-500 dark:text-white-400 border-2 border-transparent hover:border-current`,
Expand All @@ -19,4 +19,4 @@ export const startProject: Library = {
textColor: 'text-cyan-600',
frameworks: ['react'],
scarfId: 'b6e2134f-e805-401d-95c3-2a7765d49a3d',
}
} satisfies Library
4 changes: 2 additions & 2 deletions app/libraries/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const storeProject: Library = {
export const storeProject = {
id: 'store',
name: 'TanStack Store',
cardStyles: `shadow-xl shadow-stone-700/20 dark:shadow-lg dark:shadow-stone-500/20 text-stone-500 dark:text-stone-400 border-2 border-transparent hover:border-current`,
Expand All @@ -21,4 +21,4 @@ export const storeProject: Library = {
frameworks: ['react', 'solid', 'svelte', 'vue', 'angular'],
scarfId: '302d0fef-cb3f-43c6-b45c-f055b9745edb',
defaultDocs: 'overview',
}
} satisfies Library
6 changes: 3 additions & 3 deletions app/libraries/table.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { handleRedirects } from '~/utils/handleRedirects.server'
import { Library } from '.'

export const tableProject: Library = {
export const tableProject = {
id: 'table',
name: 'TanStack Table',
cardStyles: `shadow-xl shadow-blue-700/20 dark:shadow-lg dark:shadow-blue-500/30 text-blue-500 border-2 border-transparent hover:border-current`,
Expand Down Expand Up @@ -29,7 +29,7 @@ export const tableProject: Library = {
'vanilla',
],
scarfId: 'dc8b39e1-3fe9-4f3a-8e56-d4e2cf420a9e',
defaultDocs: 'framework/react/overview',
defaultDocs: 'introduction',
handleRedirects: (href) => {
handleRedirects(
reactTableV7List,
Expand All @@ -39,7 +39,7 @@ export const tableProject: Library = {
'from=reactTableV7'
)
},
}
} satisfies Library

// prettier-ignore
export const reactTableV7List = [
Expand Down
6 changes: 3 additions & 3 deletions app/libraries/virtual.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Library } from '.'

export const virtualProject: Library = {
export const virtualProject = {
id: 'virtual',
name: 'TanStack Virtual',
cardStyles: `shadow-xl shadow-purple-700/20 dark:shadow-lg dark:shadow-purple-500/30 text-purple-500 border-2 border-transparent hover:border-current`,
Expand All @@ -18,6 +18,6 @@ export const virtualProject: Library = {
colorTo: 'to-violet-600',
textColor: 'text-purple-600',
frameworks: ['react', 'solid', 'vue', 'svelte', 'lit', 'angular'],
defaultDocs: 'framework/react/overview',
defaultDocs: 'introduction',
scarfId: '32372eb1-91e0-48e7-8df1-4808a7be6b94',
}
} satisfies Library
2 changes: 1 addition & 1 deletion app/routes/$libraryId.$version.docs.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const Route = createFileRoute('/$libraryId/$version/docs/')({
params: {
libraryId,
version: ctx.params.version,
_splat: library.defaultDocs || 'overview',
_splat: 'defaultDocs' in library ? library.defaultDocs : 'overview',
},
})
},
Expand Down
Loading