mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 18:05:11 +03:00
* infinite list * infinite list block * registration * add missing supportedFrameworks * Add tables to the supabase project. Generate the types for it. * Refactor the infinite list query to be just a hook. * Clean up the block. Add comments. * Regenerate the registry. * Fix the docs, the block is not framework-dependent. * Set the package versions to * to be defined by other packages. * Minor fixes to the block. * Fix the examples. * Fix the docs for the new hook. * Fix the demo. * Add more migrations to the db. * Fix various issues with the query. Rewrote it to useSyncExternalStore. * Fix the SSR for the hook. * More fixes. * Try initializing the store in a useEffect. * Fix the pnpm-lock file. * Minor fixes in the docs. * Put the infinite list under a reusable components section. * Update apps/ui-library/registry/default/blocks/infinite-query-hook/hooks/use-infinite-query.ts * Change the example DB to use todos. * Update the docs to be about Todos quickstart. * List edits * Fix link * Regenerate the registry. * Add query hook to the landing page. --------- Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com> Co-authored-by: Terry Sutton <saltcod@gmail.com>
133 lines
3.4 KiB
TypeScript
133 lines
3.4 KiB
TypeScript
import { SidebarNavGroup } from 'types/nav'
|
|
|
|
export const gettingStarted: SidebarNavGroup = {
|
|
title: 'Getting Started',
|
|
items: [
|
|
{
|
|
title: 'Introduction',
|
|
href: '/docs/getting-started/introduction',
|
|
items: [],
|
|
commandItemLabel: 'Introduction',
|
|
},
|
|
{
|
|
title: 'Quick Start',
|
|
href: '/docs/getting-started/quickstart',
|
|
items: [],
|
|
commandItemLabel: 'Quick Start',
|
|
},
|
|
{
|
|
title: 'FAQ',
|
|
href: '/docs/getting-started/faq',
|
|
items: [],
|
|
commandItemLabel: 'FAQ',
|
|
},
|
|
],
|
|
}
|
|
|
|
export const aiEditorsRules: SidebarNavGroup = {
|
|
title: 'AI Editors Rules',
|
|
items: [
|
|
{
|
|
title: 'Prompts',
|
|
href: '/docs/ai-editors-rules/prompts',
|
|
items: [],
|
|
commandItemLabel: 'AI Editors Rules',
|
|
},
|
|
],
|
|
}
|
|
|
|
// Component definitions with supported frameworks
|
|
export const componentPages: SidebarNavGroup = {
|
|
title: 'Components',
|
|
items: [
|
|
{
|
|
title: 'Client',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/client',
|
|
items: [],
|
|
commandItemLabel: 'Supabase Client',
|
|
},
|
|
{
|
|
title: 'Password-Based Auth',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/password-based-auth',
|
|
items: [],
|
|
commandItemLabel: 'Password-Based Auth',
|
|
},
|
|
{
|
|
title: 'Social Auth',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/social-auth',
|
|
items: [],
|
|
new: true,
|
|
commandItemLabel: 'Social Auth',
|
|
},
|
|
{
|
|
title: 'Dropzone',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/dropzone',
|
|
items: [],
|
|
commandItemLabel: 'Dropzone (File Upload)',
|
|
},
|
|
{
|
|
title: 'Realtime Cursor',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/realtime-cursor',
|
|
items: [],
|
|
commandItemLabel: 'Realtime Cursor',
|
|
},
|
|
{
|
|
title: 'Current User Avatar',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/current-user-avatar',
|
|
items: [],
|
|
commandItemLabel: 'Current User Avatar',
|
|
},
|
|
{
|
|
title: 'Realtime Avatar Stack',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/realtime-avatar-stack',
|
|
items: [],
|
|
commandItemLabel: 'Realtime Avatar Stack',
|
|
},
|
|
{
|
|
title: 'Realtime Chat',
|
|
supportedFrameworks: ['nextjs', 'react-router', 'tanstack', 'react'],
|
|
href: '/docs/nextjs/realtime-chat',
|
|
items: [],
|
|
commandItemLabel: 'Realtime Chat',
|
|
},
|
|
{
|
|
title: 'Infinite Query Hook',
|
|
supportedFrameworks: [],
|
|
href: '/docs/infinite-query-hook',
|
|
new: true,
|
|
items: [],
|
|
commandItemLabel: 'Infinite Query Hook',
|
|
},
|
|
],
|
|
}
|
|
|
|
export const COMMAND_ITEMS = [
|
|
...gettingStarted.items.map((item) => ({
|
|
label: item.commandItemLabel,
|
|
href: item.href,
|
|
})),
|
|
...aiEditorsRules.items.map((item) => ({
|
|
label: item.commandItemLabel,
|
|
href: item.href,
|
|
})),
|
|
...componentPages.items.map((item) => ({
|
|
label: item.commandItemLabel,
|
|
href: item.href,
|
|
})),
|
|
]
|
|
|
|
// Framework titles for display
|
|
export const frameworkTitles: Record<string, string> = {
|
|
nextjs: 'Next.js',
|
|
'react-router': 'React Router',
|
|
tanstack: 'TanStack Start',
|
|
react: 'React SPA',
|
|
}
|