mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: sidebar behaviour when switching package/version
This commit is contained in:
@@ -22,7 +22,6 @@ export default {
|
||||
experimental: {
|
||||
ppr: true,
|
||||
reactCompiler: true,
|
||||
useCache: true,
|
||||
dynamicOnHover: true,
|
||||
},
|
||||
eslint: {
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
"dependencies": {
|
||||
"@radix-ui/react-collapsible": "^1.1.3",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@tanstack/react-query": "^5.76.1",
|
||||
"@vercel/analytics": "^1.5.0",
|
||||
"@vercel/edge-config": "^1.4.0",
|
||||
"@vercel/postgres": "^0.10.0",
|
||||
@@ -61,7 +62,7 @@
|
||||
"lucide-react": "^0.503.0",
|
||||
"meilisearch": "^0.49.0",
|
||||
"motion": "^12.9.2",
|
||||
"next": "15.4.0-canary.31",
|
||||
"next": "15.4.0-canary.35",
|
||||
"next-mdx-remote-client": "^2.1.1",
|
||||
"next-themes": "^0.4.6",
|
||||
"nuqs": "^2.4.3",
|
||||
|
||||
16
apps/website/src/app/api/docs/entrypoints/route.ts
Normal file
16
apps/website/src/app/api/docs/entrypoints/route.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NextResponse, type NextRequest } from 'next/server';
|
||||
import { fetchEntryPoints } from '@/util/fetchEntryPoints';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = request.nextUrl;
|
||||
const packageName = searchParams.get('packageName');
|
||||
const version = searchParams.get('version');
|
||||
|
||||
if (!packageName || !version) {
|
||||
return NextResponse.json({ error: 'Missing required parameters' }, { status: 400 });
|
||||
}
|
||||
|
||||
const response = await fetchEntryPoints(packageName, version);
|
||||
|
||||
return NextResponse.json(response);
|
||||
}
|
||||
21
apps/website/src/app/api/docs/sitemap/route.ts
Normal file
21
apps/website/src/app/api/docs/sitemap/route.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { NextResponse, type NextRequest } from 'next/server';
|
||||
import { fetchSitemap } from '@/util/fetchSitemap';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = request.nextUrl;
|
||||
const packageName = searchParams.get('packageName');
|
||||
const version = searchParams.get('version');
|
||||
const entryPoint = searchParams.get('entryPoint');
|
||||
|
||||
if (!packageName || !version) {
|
||||
return NextResponse.json({ error: 'Missing required parameters' }, { status: 400 });
|
||||
}
|
||||
|
||||
const response = await fetchSitemap({
|
||||
entryPoint,
|
||||
packageName,
|
||||
version,
|
||||
});
|
||||
|
||||
return NextResponse.json(response);
|
||||
}
|
||||
15
apps/website/src/app/api/docs/versions/route.ts
Normal file
15
apps/website/src/app/api/docs/versions/route.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { NextResponse, type NextRequest } from 'next/server';
|
||||
import { fetchVersions } from '@/util/fetchVersions';
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const { searchParams } = request.nextUrl;
|
||||
const packageName = searchParams.get('packageName');
|
||||
|
||||
if (!packageName) {
|
||||
return NextResponse.json({ error: 'Missing required parameters' }, { status: 400 });
|
||||
}
|
||||
|
||||
const response = await fetchVersions(packageName);
|
||||
|
||||
return NextResponse.json(response);
|
||||
}
|
||||
@@ -1,24 +1,5 @@
|
||||
'use cache';
|
||||
|
||||
import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted';
|
||||
import type { Metadata } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { Suspense, type PropsWithChildren } from 'react';
|
||||
import { EntryPointSelect } from '@/components/EntrypointSelect';
|
||||
import { Footer } from '@/components/Footer';
|
||||
import { Navigation } from '@/components/Navigation';
|
||||
import { Scrollbars } from '@/components/OverlayScrollbars';
|
||||
import { PackageSelect } from '@/components/PackageSelect';
|
||||
import { SearchButton } from '@/components/SearchButton';
|
||||
import { ThemeSwitchNoSRR } from '@/components/ThemeSwitch';
|
||||
import { VersionSelect } from '@/components/VersionSelect';
|
||||
import { Sidebar, SidebarContent, SidebarHeader, SidebarInset, SidebarTrigger } from '@/components/ui/Sidebar';
|
||||
import { buttonStyles } from '@/styles/ui/button';
|
||||
import { PACKAGES_WITH_ENTRY_POINTS } from '@/util/constants';
|
||||
import { ENV } from '@/util/env';
|
||||
import { fetchEntryPoints } from '@/util/fetchEntryPoints';
|
||||
import { fetchVersions } from '@/util/fetchVersions';
|
||||
import { parseDocsPathParams } from '@/util/parseDocsPathParams';
|
||||
import { CmdK } from './CmdK';
|
||||
|
||||
export async function generateMetadata({
|
||||
@@ -44,82 +25,11 @@ export default async function Layout({
|
||||
params,
|
||||
children,
|
||||
}: PropsWithChildren<{
|
||||
readonly params: Promise<{
|
||||
readonly item?: string[] | undefined;
|
||||
readonly packageName: string;
|
||||
readonly version: string;
|
||||
}>;
|
||||
readonly params: Promise<{ readonly packageName: string; readonly version: string }>;
|
||||
}>) {
|
||||
const { packageName, version, item } = await params;
|
||||
|
||||
const versions = fetchVersions(packageName);
|
||||
|
||||
const hasEntryPoints = PACKAGES_WITH_ENTRY_POINTS.includes(packageName);
|
||||
|
||||
const entryPoints = hasEntryPoints ? fetchEntryPoints(packageName, version) : Promise.resolve([]);
|
||||
const { entryPoints: parsedEntrypoints } = parseDocsPathParams(item);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Sidebar closeButton={false} intent="inset">
|
||||
<SidebarHeader className="bg-[#f3f3f4] p-4 dark:bg-[#121214]">
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex place-content-between place-items-center p-1">
|
||||
<Link className="text-xl font-bold" href={`/docs/packages/${packageName}/${version}`}>
|
||||
{packageName}
|
||||
</Link>
|
||||
<div className="flex place-items-center gap-2">
|
||||
<Link
|
||||
aria-label="GitHub"
|
||||
className={buttonStyles({ variant: 'filled', size: 'icon-sm' })}
|
||||
href="https://github.com/discordjs/discord.js"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<VscGithubInverted aria-hidden data-slot="icon" size={18} />
|
||||
</Link>
|
||||
<ThemeSwitchNoSRR />
|
||||
</div>
|
||||
</div>
|
||||
<PackageSelect />
|
||||
{/* <h3 className="p-1 text-lg font-semibold">{version}</h3> */}
|
||||
<VersionSelect versionsPromise={versions} />
|
||||
{hasEntryPoints ? <EntryPointSelect entryPointsPromise={entryPoints} /> : null}
|
||||
<SearchButton />
|
||||
</div>
|
||||
</SidebarHeader>
|
||||
<SidebarContent className="bg-[#f3f3f4] p-0 py-4 pl-4 dark:bg-[#121214]">
|
||||
<Scrollbars>
|
||||
<Navigation entryPoint={parsedEntrypoints.join('.')} packageName={packageName} version={version} />
|
||||
</Scrollbars>
|
||||
</SidebarContent>
|
||||
</Sidebar>
|
||||
<SidebarInset>
|
||||
{ENV.IS_LOCAL_DEV ? (
|
||||
<div className="sticky top-0 z-10 flex place-content-center place-items-center border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
|
||||
Local test environment
|
||||
</div>
|
||||
) : null}
|
||||
{ENV.IS_PREVIEW ? (
|
||||
<div className="sticky top-0 z-10 flex place-content-center place-items-center border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
|
||||
Preview environment
|
||||
</div>
|
||||
) : null}
|
||||
<div className="bg-[#fbfbfb] pb-12 dark:bg-[#1a1a1e]">
|
||||
<div className="relative px-6 pt-6 md:hidden">
|
||||
<div className="fixed top-5 left-6 z-20 md:hidden">
|
||||
<SidebarTrigger aria-label="Navigation" size="icon" variant="filled" />
|
||||
</div>
|
||||
<div className="flex place-content-end">
|
||||
<Link className="text-xl font-bold" href={`/docs/packages/${packageName}/${version}`}>
|
||||
{packageName}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
{children}
|
||||
<Footer />
|
||||
</div>
|
||||
</SidebarInset>
|
||||
{children}
|
||||
<Suspense>
|
||||
<CmdK params={params} />
|
||||
</Suspense>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use cache';
|
||||
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { join } from 'node:path';
|
||||
import rehypeShikiFromHighlighter from '@shikijs/rehype/core';
|
||||
|
||||
49
apps/website/src/app/docs/packages/layout.tsx
Normal file
49
apps/website/src/app/docs/packages/layout.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
// import Link from 'next/link';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { Footer } from '@/components/Footer';
|
||||
import { Navigation } from '@/components/Navigation';
|
||||
import { Scrollbars } from '@/components/OverlayScrollbars';
|
||||
import { SidebarHeader } from '@/components/Sidebar';
|
||||
import { Sidebar, SidebarContent, SidebarInset, SidebarTrigger } from '@/components/ui/Sidebar';
|
||||
import { ENV } from '@/util/env';
|
||||
|
||||
export default async function Layout({ children }: PropsWithChildren) {
|
||||
return (
|
||||
<>
|
||||
<Sidebar closeButton={false} intent="inset">
|
||||
<SidebarHeader />
|
||||
<SidebarContent className="bg-[#f3f3f4] p-0 py-4 pl-4 dark:bg-[#121214]">
|
||||
<Scrollbars>
|
||||
<Navigation />
|
||||
</Scrollbars>
|
||||
</SidebarContent>
|
||||
</Sidebar>
|
||||
<SidebarInset>
|
||||
{ENV.IS_LOCAL_DEV ? (
|
||||
<div className="sticky top-0 z-10 flex place-content-center place-items-center border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
|
||||
Local test environment
|
||||
</div>
|
||||
) : null}
|
||||
{ENV.IS_PREVIEW ? (
|
||||
<div className="sticky top-0 z-10 flex place-content-center place-items-center border border-red-400/35 bg-red-500/65 p-2 px-4 text-center text-base text-white shadow-md backdrop-blur">
|
||||
Preview environment
|
||||
</div>
|
||||
) : null}
|
||||
<div className="bg-[#fbfbfb] pb-12 dark:bg-[#1a1a1e]">
|
||||
<div className="relative px-6 pt-6 md:hidden">
|
||||
<div className="fixed top-5 left-6 z-20 md:hidden">
|
||||
<SidebarTrigger aria-label="Navigation" size="icon" variant="filled" />
|
||||
</div>
|
||||
{/* <div className="flex place-content-end">
|
||||
<Link className="text-xl font-bold" href={`/docs/packages/${packageName}/${version}`}>
|
||||
{packageName}
|
||||
</Link>
|
||||
</div> */}
|
||||
</div>
|
||||
{children}
|
||||
<Footer />
|
||||
</div>
|
||||
</SidebarInset>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { isServer, QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { Provider as JotaiProvider } from 'jotai';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { ThemeProvider } from 'next-themes';
|
||||
@@ -10,7 +11,30 @@ import { SidebarProvider } from '@/components/ui/Sidebar';
|
||||
import { useSystemThemeFallback } from '@/hooks/useSystemThemeFallback';
|
||||
import { useUnregisterServiceWorker } from '@/hooks/useUnregisterServiceWorker';
|
||||
|
||||
function makeQueryClient() {
|
||||
return new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 60 * 1_000,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
let browserQueryClient: QueryClient | undefined;
|
||||
|
||||
function getQueryClient() {
|
||||
if (isServer) {
|
||||
// Server: always make a new query client
|
||||
return makeQueryClient();
|
||||
} else {
|
||||
browserQueryClient ??= makeQueryClient();
|
||||
return browserQueryClient;
|
||||
}
|
||||
}
|
||||
|
||||
export function Providers({ children }: PropsWithChildren) {
|
||||
const queryClient = getQueryClient();
|
||||
const router = useRouter();
|
||||
useUnregisterServiceWorker();
|
||||
useSystemThemeFallback();
|
||||
@@ -20,7 +44,9 @@ export function Providers({ children }: PropsWithChildren) {
|
||||
<ThemeProvider attribute="class">
|
||||
<RouterProvider navigate={router.push}>
|
||||
<JotaiProvider>
|
||||
<SidebarProvider defaultOpen>{children}</SidebarProvider>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<SidebarProvider defaultOpen>{children}</SidebarProvider>
|
||||
</QueryClientProvider>
|
||||
</JotaiProvider>
|
||||
</RouterProvider>
|
||||
</ThemeProvider>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use cache';
|
||||
|
||||
import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParameter';
|
||||
import { ConstructorNode } from './ConstructorNode';
|
||||
import { DeprecatedNode } from './DeprecatedNode';
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import { use } from 'react';
|
||||
import { parseDocsPathParams } from '@/util/parseDocsPathParams';
|
||||
import { Select, SelectList, SelectOption, SelectTrigger } from './ui/Select';
|
||||
|
||||
export function EntryPointSelect({
|
||||
entryPointsPromise,
|
||||
}: {
|
||||
readonly entryPointsPromise: Promise<{ readonly entryPoint: string }[]>;
|
||||
}) {
|
||||
export function EntryPointSelect({ entryPoints }: { readonly entryPoints: { readonly entryPoint: string }[] }) {
|
||||
const router = useRouter();
|
||||
const params = useParams();
|
||||
const entryPoints = use(entryPointsPromise);
|
||||
const params = useParams<{
|
||||
item?: string[] | undefined;
|
||||
packageName: string;
|
||||
version: string;
|
||||
}>();
|
||||
|
||||
const { entryPoints: parsedEntrypoints } = parseDocsPathParams(params.item as string[] | undefined);
|
||||
const { entryPoints: parsedEntrypoints } = parseDocsPathParams(params.item);
|
||||
|
||||
return (
|
||||
<Select aria-label="Select an entrypoint" defaultSelectedKey={parsedEntrypoints.join('/')}>
|
||||
<Select
|
||||
aria-label="Select an entrypoint"
|
||||
defaultSelectedKey={parsedEntrypoints.join('/')}
|
||||
key={parsedEntrypoints.join('/')}
|
||||
>
|
||||
<SelectTrigger className="bg-[#f3f3f4] dark:bg-[#121214]" />
|
||||
<SelectList classNames={{ popover: 'bg-[#f3f3f4] dark:bg-[#28282d]' }} items={entryPoints}>
|
||||
{(item) => (
|
||||
|
||||
@@ -1,26 +1,38 @@
|
||||
'use client';
|
||||
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { ChevronDown, ChevronUp } from 'lucide-react';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { fetchSitemap } from '@/util/fetchSitemap';
|
||||
import { notFound, useParams } from 'next/navigation';
|
||||
import { parseDocsPathParams } from '@/util/parseDocsPathParams';
|
||||
import { resolveNodeKind } from './DocKind';
|
||||
import { NavigationItem } from './NavigationItem';
|
||||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/Collapsible';
|
||||
|
||||
export async function Navigation({
|
||||
entryPoint,
|
||||
packageName,
|
||||
version,
|
||||
}: {
|
||||
readonly entryPoint?: string | undefined;
|
||||
readonly packageName: string;
|
||||
readonly version: string;
|
||||
}) {
|
||||
const node = await fetchSitemap({ entryPoint, packageName, version });
|
||||
export function Navigation() {
|
||||
const params = useParams<{
|
||||
item?: string[] | undefined;
|
||||
packageName: string;
|
||||
version: string;
|
||||
}>();
|
||||
|
||||
if (!node) {
|
||||
const { entryPoints: parsedEntrypoints } = parseDocsPathParams(params.item);
|
||||
|
||||
const { data: node, status } = useQuery({
|
||||
queryKey: ['sitemap', params.packageName, params.version, parsedEntrypoints.join('.')],
|
||||
queryFn: async () => {
|
||||
const response = await fetch(
|
||||
`/api/docs/sitemap?packageName=${params.packageName}&version=${params.version}&entryPoint=${parsedEntrypoints.join('.')}`,
|
||||
);
|
||||
|
||||
return response.json();
|
||||
},
|
||||
});
|
||||
|
||||
if ((status === 'success' && !node) || status === 'error') {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const groupedNodes = node.reduce((acc: any, node: any) => {
|
||||
const groupedNodes = node?.reduce((acc: any, node: any) => {
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
(acc[node.kind.toLowerCase()] ||= []).push(node);
|
||||
return acc;
|
||||
@@ -28,7 +40,7 @@ export async function Navigation({
|
||||
|
||||
return (
|
||||
<nav className="flex flex-col gap-2 pr-3">
|
||||
{groupedNodes.class?.length ? (
|
||||
{groupedNodes?.class?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Classes</h4>
|
||||
@@ -40,7 +52,12 @@ export async function Navigation({
|
||||
{groupedNodes.class.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
@@ -53,7 +70,7 @@ export async function Navigation({
|
||||
</Collapsible>
|
||||
) : null}
|
||||
|
||||
{groupedNodes.function?.length ? (
|
||||
{groupedNodes?.function?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Functions</h4>
|
||||
@@ -65,7 +82,12 @@ export async function Navigation({
|
||||
{groupedNodes.function.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
@@ -78,7 +100,7 @@ export async function Navigation({
|
||||
</Collapsible>
|
||||
) : null}
|
||||
|
||||
{groupedNodes.enum?.length ? (
|
||||
{groupedNodes?.enum?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Enums</h4>
|
||||
@@ -90,7 +112,12 @@ export async function Navigation({
|
||||
{groupedNodes.enum.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
@@ -103,7 +130,7 @@ export async function Navigation({
|
||||
</Collapsible>
|
||||
) : null}
|
||||
|
||||
{groupedNodes.interface?.length ? (
|
||||
{groupedNodes?.interface?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Interfaces</h4>
|
||||
@@ -115,7 +142,12 @@ export async function Navigation({
|
||||
{groupedNodes.interface.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
@@ -128,7 +160,7 @@ export async function Navigation({
|
||||
</Collapsible>
|
||||
) : null}
|
||||
|
||||
{groupedNodes.typealias?.length ? (
|
||||
{groupedNodes?.typealias?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Types</h4>
|
||||
@@ -140,7 +172,12 @@ export async function Navigation({
|
||||
{groupedNodes.typealias.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
@@ -153,7 +190,7 @@ export async function Navigation({
|
||||
</Collapsible>
|
||||
) : null}
|
||||
|
||||
{groupedNodes.variable?.length ? (
|
||||
{groupedNodes?.variable?.length ? (
|
||||
<Collapsible className="flex flex-col gap-2" defaultOpen>
|
||||
<CollapsibleTrigger className="group flex place-content-between place-items-center rounded-md p-2 hover:bg-[#e7e7e9] dark:hover:bg-[#242428]">
|
||||
<h4 className="font-semibold">Variables</h4>
|
||||
@@ -165,7 +202,12 @@ export async function Navigation({
|
||||
{groupedNodes.variable.map((node: any, idx: number) => {
|
||||
const kind = resolveNodeKind(node.kind);
|
||||
return (
|
||||
<NavigationItem key={`${node.name}-${idx}`} node={node} packageName={packageName} version={version}>
|
||||
<NavigationItem
|
||||
key={`${node.name}-${idx}`}
|
||||
node={node}
|
||||
packageName={params.packageName}
|
||||
version={params.version}
|
||||
>
|
||||
<div className={`inline-block h-6 w-6 rounded-full text-center ${kind.background} ${kind.text}`}>
|
||||
{node.kind[0]}
|
||||
</div>{' '}
|
||||
|
||||
@@ -6,10 +6,12 @@ import { PACKAGES } from '@/util/constants';
|
||||
|
||||
export function PackageSelect() {
|
||||
const router = useRouter();
|
||||
const params = useParams();
|
||||
const params = useParams<{
|
||||
packageName: string;
|
||||
}>();
|
||||
|
||||
return (
|
||||
<Select aria-label="Select a package" defaultSelectedKey={params.packageName as string}>
|
||||
<Select aria-label="Select a package" defaultSelectedKey={params.packageName} key={params.packageName}>
|
||||
<SelectTrigger className="bg-[#f3f3f4] dark:bg-[#121214]" />
|
||||
<SelectList classNames={{ popover: 'bg-[#f3f3f4] dark:bg-[#28282d]' }} items={PACKAGES}>
|
||||
{(item) => (
|
||||
|
||||
70
apps/website/src/components/Sidebar.tsx
Normal file
70
apps/website/src/components/Sidebar.tsx
Normal file
@@ -0,0 +1,70 @@
|
||||
'use client';
|
||||
|
||||
import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import Link from 'next/link';
|
||||
import { useParams } from 'next/navigation';
|
||||
import { EntryPointSelect } from '@/components/EntrypointSelect';
|
||||
import { PackageSelect } from '@/components/PackageSelect';
|
||||
import { SearchButton } from '@/components/SearchButton';
|
||||
import { ThemeSwitchNoSRR } from '@/components/ThemeSwitch';
|
||||
import { VersionSelect } from '@/components/VersionSelect';
|
||||
import { SidebarHeader as BasSidebarHeader } from '@/components/ui/Sidebar';
|
||||
import { buttonStyles } from '@/styles/ui/button';
|
||||
import { PACKAGES_WITH_ENTRY_POINTS } from '@/util/constants';
|
||||
|
||||
export function SidebarHeader() {
|
||||
const params = useParams<{
|
||||
packageName: string;
|
||||
version: string;
|
||||
}>();
|
||||
|
||||
const hasEntryPoints = PACKAGES_WITH_ENTRY_POINTS.includes(params.packageName);
|
||||
|
||||
const { data: entryPoints } = useQuery({
|
||||
queryKey: ['entryPoints', params.packageName, params.version],
|
||||
queryFn: async () => {
|
||||
const response = await fetch(`/api/docs/entrypoints?packageName=${params.packageName}&version=${params.version}`);
|
||||
|
||||
return response.json();
|
||||
},
|
||||
});
|
||||
|
||||
const { data: versions } = useQuery({
|
||||
queryKey: ['versions', params.packageName],
|
||||
queryFn: async () => {
|
||||
const response = await fetch(`/api/docs/versions?packageName=${params.packageName}`);
|
||||
|
||||
return response.json();
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<BasSidebarHeader className="bg-[#f3f3f4] p-4 dark:bg-[#121214]">
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex place-content-between place-items-center p-1">
|
||||
<Link className="text-xl font-bold" href={`/docs/packages/${params.packageName}/${params.version}`}>
|
||||
{params.packageName}
|
||||
</Link>
|
||||
<div className="flex place-items-center gap-2">
|
||||
<Link
|
||||
aria-label="GitHub"
|
||||
className={buttonStyles({ variant: 'filled', size: 'icon-sm' })}
|
||||
href="https://github.com/discordjs/discord.js"
|
||||
rel="external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<VscGithubInverted aria-hidden data-slot="icon" size={18} />
|
||||
</Link>
|
||||
<ThemeSwitchNoSRR />
|
||||
</div>
|
||||
</div>
|
||||
<PackageSelect />
|
||||
{/* <h3 className="p-1 text-lg font-semibold">{version}</h3> */}
|
||||
<VersionSelect versions={versions ?? []} />
|
||||
{hasEntryPoints ? <EntryPointSelect entryPoints={entryPoints ?? []} /> : null}
|
||||
<SearchButton />
|
||||
</div>
|
||||
</BasSidebarHeader>
|
||||
);
|
||||
}
|
||||
@@ -1,26 +1,27 @@
|
||||
'use client';
|
||||
|
||||
import { useParams, useRouter } from 'next/navigation';
|
||||
import { use } from 'react';
|
||||
import { Select, SelectList, SelectOption, SelectTrigger } from './ui/Select';
|
||||
import { Select, SelectList, SelectOption, SelectTrigger } from '@/components/ui/Select';
|
||||
import { DEFAULT_ENTRY_POINT, PACKAGES_WITH_ENTRY_POINTS } from '@/util/constants';
|
||||
|
||||
export function VersionSelect({
|
||||
versionsPromise,
|
||||
}: {
|
||||
readonly versionsPromise: Promise<{ readonly version: string }[]>;
|
||||
}) {
|
||||
export function VersionSelect({ versions }: { readonly versions: { readonly version: string }[] }) {
|
||||
const router = useRouter();
|
||||
const params = useParams();
|
||||
const versions = use(versionsPromise);
|
||||
const params = useParams<{ packageName: string; version: string }>();
|
||||
|
||||
const hasEntryPoints = PACKAGES_WITH_ENTRY_POINTS.includes(params.packageName);
|
||||
|
||||
return (
|
||||
<Select aria-label="Select a version" defaultSelectedKey={params.version as string}>
|
||||
<Select
|
||||
aria-label="Select a version"
|
||||
defaultSelectedKey={params.version}
|
||||
key={`${params.packageName}-${params.version}`}
|
||||
>
|
||||
<SelectTrigger className="bg-[#f3f3f4] dark:bg-[#121214]" />
|
||||
<SelectList classNames={{ popover: 'bg-[#f3f3f4] dark:bg-[#28282d]' }} items={versions}>
|
||||
{(item) => (
|
||||
<SelectOption
|
||||
className="dark:pressed:bg-[#313135] bg-[#f3f3f4] dark:bg-[#28282d] dark:hover:bg-[#313135]"
|
||||
href={`/docs/packages/${params.packageName}/${item.version}`}
|
||||
href={`/docs/packages/${params.packageName}/${item.version}${hasEntryPoints ? ['', ...DEFAULT_ENTRY_POINT].join('/') : ''}`}
|
||||
id={item.version}
|
||||
key={item.version}
|
||||
onHoverStart={() => router.prefetch(`/docs/packages/${params.packageName}/${item.version}`)}
|
||||
|
||||
@@ -9,6 +9,7 @@ const client = new Cloudflare({
|
||||
|
||||
async function fetchLatestVersion(packageName: string): Promise<string> {
|
||||
const hasEntryPoints = PACKAGES_WITH_ENTRY_POINTS.includes(packageName);
|
||||
|
||||
if (ENV.IS_LOCAL_DEV) {
|
||||
if (hasEntryPoints) {
|
||||
return ['main', ...DEFAULT_ENTRY_POINT].join('/');
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function fetchSitemap({
|
||||
packageName,
|
||||
version,
|
||||
}: {
|
||||
readonly entryPoint?: string | undefined;
|
||||
readonly entryPoint?: string | null | undefined;
|
||||
readonly packageName: string;
|
||||
readonly version: string;
|
||||
}) {
|
||||
|
||||
136
pnpm-lock.yaml
generated
136
pnpm-lock.yaml
generated
@@ -45,7 +45,7 @@ importers:
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)
|
||||
eslint-import-resolver-typescript:
|
||||
specifier: ^4.3.4
|
||||
version: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))
|
||||
version: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-plugin-react-compiler:
|
||||
specifier: 19.1.0-rc.1
|
||||
version: 19.1.0-rc.1(eslint@9.25.1(jiti@2.4.2))
|
||||
@@ -266,9 +266,12 @@ importers:
|
||||
'@react-icons/all-files':
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0(react@19.1.0)
|
||||
'@tanstack/react-query':
|
||||
specifier: ^5.76.1
|
||||
version: 5.76.1(react@19.1.0)
|
||||
'@vercel/analytics':
|
||||
specifier: ^1.5.0
|
||||
version: 1.5.0(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
|
||||
version: 1.5.0(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
|
||||
'@vercel/edge-config':
|
||||
specifier: ^1.4.0
|
||||
version: 1.4.0
|
||||
@@ -286,7 +289,7 @@ importers:
|
||||
version: 1.0.0-beta.3(typescript@5.8.3)
|
||||
geist:
|
||||
specifier: ^1.3.1
|
||||
version: 1.3.1(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
||||
version: 1.3.1(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
||||
immer:
|
||||
specifier: ^10.1.1
|
||||
version: 10.1.1
|
||||
@@ -306,8 +309,8 @@ importers:
|
||||
specifier: ^12.9.2
|
||||
version: 12.9.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
next:
|
||||
specifier: 15.4.0-canary.31
|
||||
version: 15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
specifier: 15.4.0-canary.35
|
||||
version: 15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
next-mdx-remote-client:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1(@types/react@19.1.2)(acorn@8.14.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
@@ -316,7 +319,7 @@ importers:
|
||||
version: 0.4.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
nuqs:
|
||||
specifier: ^2.4.3
|
||||
version: 2.4.3(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
|
||||
version: 2.4.3(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
|
||||
overlayscrollbars:
|
||||
specifier: ^2.11.1
|
||||
version: 2.11.1
|
||||
@@ -571,7 +574,7 @@ importers:
|
||||
version: 9.25.1(jiti@2.4.2)
|
||||
eslint-config-neon:
|
||||
specifier: ^0.2.7
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
eslint-formatter-compact:
|
||||
specifier: ^8.40.0
|
||||
version: 8.40.0
|
||||
@@ -1457,7 +1460,7 @@ importers:
|
||||
version: 9.25.1(jiti@2.4.2)
|
||||
eslint-config-neon:
|
||||
specifier: ^0.2.7
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
eslint-formatter-compact:
|
||||
specifier: ^8.40.0
|
||||
version: 8.40.0
|
||||
@@ -1760,7 +1763,7 @@ importers:
|
||||
version: 9.25.1(jiti@2.4.2)
|
||||
eslint-config-neon:
|
||||
specifier: ^0.2.7
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
version: 0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
eslint-formatter-compact:
|
||||
specifier: ^8.40.0
|
||||
version: 8.40.0
|
||||
@@ -3543,8 +3546,8 @@ packages:
|
||||
'@next/env@15.4.0-canary.11':
|
||||
resolution: {integrity: sha512-UoGIxI4VR0QxCCkVLKw4USofRR72BdwwqbJZKKA9W812mWoO7gMDAkSQ2pARul+0/LPmzzWQGzV4MNJykPw7sg==}
|
||||
|
||||
'@next/env@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-v9qjCjWhJOcBKVLzsx00JlraSFJPd4XwY5qaIaIfslpWS7qtWrwU01IOSLGBkM+JwAa/VWoVeT5p/dqqbuJgKw==}
|
||||
'@next/env@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-F8+p2C+kPBw57Z39Odm4fNdXUCFE5AiC8NSu/nqX/P8+wTt389gehTWuLW4pHvDQPXbVrimnFcEst6S4R8wvuQ==}
|
||||
|
||||
'@next/eslint-plugin-next@15.2.4':
|
||||
resolution: {integrity: sha512-O8ScvKtnxkp8kL9TpJTTKnMqlkZnS+QxwoQnJwPGBxjBbzd6OVVPEJ5/pMNrktSyXQD/chEfzfFzYLM6JANOOQ==}
|
||||
@@ -3555,8 +3558,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@next/swc-darwin-arm64@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-zBo+HeZm3IVlwHGPQpTBfdlYQrcQ4PHkuhL4/s/drVaYrFccL5bf5px2xNL3s6gje+RQm7AnJeJdWK7dXcF1LQ==}
|
||||
'@next/swc-darwin-arm64@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-HHJly3Vqy1OhU7wT3Esq6QNUg/zYrmtYCd8oDIY0qD8XwG7Rv1n7WhszKcVCZ9DpaVAQi2/qS+4nPssoTb75CQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
@@ -3567,8 +3570,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@next/swc-darwin-x64@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-GxZK9xddHRJB4oXmxd0gY+EKpmeW2ioA8b0fmsVrFgaLD+BlKol4z+6UgjtlaVkxXGX8gqd4kvoZ6jNKkGKfNw==}
|
||||
'@next/swc-darwin-x64@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-X40pYFnBRW+YS4Z8sGb61tlzALhEA/drrQzYslGGyNM4OUAl4RsZCQwOm9p7MyTu9+2N7My5JYmQ5SxzjAtacA==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
@@ -3579,8 +3582,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-8ZJUYhpc3uOXCm8c38qRCW5OdRgLczMxhyMITUpbQrYZ+csncvaTkeAjUEZ0OyZqrq+5LqSs3qbaZZrd8wQMYw==}
|
||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-f4l4KUPS3LCX+07kp719FPSBlH5V2hD94/9fUdLs7ZMTpNHwyALu8iJF2841hpeM+hT9Fo1rSOgOASqU/FGzNQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
@@ -3591,8 +3594,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@next/swc-linux-arm64-musl@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-vylmxjjBjA+uwH4ZO1Mkv7OKH3cXAWgZp1sBRMTClBbKyMcU/WgV3DPhjP3t+gsYYqaFpTJg87JVPbha0uzlqQ==}
|
||||
'@next/swc-linux-arm64-musl@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-ytpHRkGDJmj4jvVl0rnuOTGNKA7mkoqH5b+UwlEWKGhThMN1pC3y47L5ikj/s75jm0UVysRoF2N4O/CvjkoD8w==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
@@ -3603,8 +3606,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@next/swc-linux-x64-gnu@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-Yakxjs+uzfwTy5HbSa8NPKNbw8pad+p7T86p52/+7eFZab0QoPAI1v1dkscvz2D5+luQLHRZPS9Dgxljv/cgvA==}
|
||||
'@next/swc-linux-x64-gnu@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-eWA8by7RzP+DPTrXluCGszBAAXdMdznliBezOZ3Z+Qv9Qdk7mMctdIANMSQIw3PyjhGGYyGCh3snD3ugExlbjw==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
@@ -3615,8 +3618,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@next/swc-linux-x64-musl@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-spC49gdMMtMeAb9dd8sec14cqckiOWFgyi5uv5UvyvK8EQhTX0oDpPBmzODlesasIbx0rQRYYMs8KP9msFmTPA==}
|
||||
'@next/swc-linux-x64-musl@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-P9T/6hO9XhwP+usJrhU/Eh4Yw9ILht9cuMkw778TrgC7IVg4Nfy2SwtGEO1epfoAsuQ74SYg4s0kTVRzdjIYew==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
@@ -3627,8 +3630,8 @@ packages:
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-Np5g/RJDHHxn15mg7mkAqhwaPG/H3uYbaO6RGxLjoKy2NJzivZ+a53r6BhhgvYywTgU18syUqgmLxxmz+hjysw==}
|
||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-Nqn8yaEkZy2j0ZhhTpDHIkTVNkuS5aYFLuN4yzJNMJfS1nIrooDrTiA+j8Y7Mxl+SQfWPqGqMA47OPZOh7ipFQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
@@ -3639,8 +3642,8 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@next/swc-win32-x64-msvc@15.4.0-canary.31':
|
||||
resolution: {integrity: sha512-0/4BgXFG9N/YT+pHN1XvPB5JJTyJKrTUNvZPdCN7knnonXwuhoOwqmK/xI3rGLbHHTe0UFGcsXzh1NeRjRyjUw==}
|
||||
'@next/swc-win32-x64-msvc@15.4.0-canary.35':
|
||||
resolution: {integrity: sha512-M8Y86fRA2hlET/3HKYi/uuLpldi168HiONkameGHoMrF2yHttlicOL7i8LVs7ulZaJps7wmodUis7TaYMahxUQ==}
|
||||
engines: {node: '>= 10'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
@@ -6100,6 +6103,14 @@ packages:
|
||||
peerDependencies:
|
||||
vite: ^5.2.0 || ^6
|
||||
|
||||
'@tanstack/query-core@5.76.0':
|
||||
resolution: {integrity: sha512-FN375hb8ctzfNAlex5gHI6+WDXTNpe0nbxp/d2YJtnP+IBM6OUm7zcaoCW6T63BawGOYZBbKC0iPvr41TteNVg==}
|
||||
|
||||
'@tanstack/react-query@5.76.1':
|
||||
resolution: {integrity: sha512-YxdLZVGN4QkT5YT1HKZQWiIlcgauIXEIsMOTSjvyD5wLYK8YVvKZUPAysMqossFJJfDpJW3pFn7WNZuPOqq+fw==}
|
||||
peerDependencies:
|
||||
react: ^18 || ^19
|
||||
|
||||
'@testing-library/dom@10.4.0':
|
||||
resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -11234,8 +11245,8 @@ packages:
|
||||
sass:
|
||||
optional: true
|
||||
|
||||
next@15.4.0-canary.31:
|
||||
resolution: {integrity: sha512-w3PUyFAfICyamYgvS2ZZqK8rSSyI97FFoVH5S9E/QABs4LLF50JyhsJwVZD7cADpMsBqBKaVes6OYltBxP8eIw==}
|
||||
next@15.4.0-canary.35:
|
||||
resolution: {integrity: sha512-2UFgPdiUEDCKMs4oSAzpwsKPFNdhC+N5Co0YaCsDJZXShPRcw4CVV1/d1W1gbAqf+tkzRWPTEfxs6HhYnovbyQ==}
|
||||
engines: {node: ^18.18.0 || ^19.8.0 || >= 20.0.0}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
@@ -16204,7 +16215,7 @@ snapshots:
|
||||
|
||||
'@next/env@15.4.0-canary.11': {}
|
||||
|
||||
'@next/env@15.4.0-canary.31': {}
|
||||
'@next/env@15.4.0-canary.35': {}
|
||||
|
||||
'@next/eslint-plugin-next@15.2.4':
|
||||
dependencies:
|
||||
@@ -16213,49 +16224,49 @@ snapshots:
|
||||
'@next/swc-darwin-arm64@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-darwin-arm64@15.4.0-canary.31':
|
||||
'@next/swc-darwin-arm64@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-darwin-x64@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-darwin-x64@15.4.0-canary.31':
|
||||
'@next/swc-darwin-x64@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.31':
|
||||
'@next/swc-linux-arm64-gnu@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-arm64-musl@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-arm64-musl@15.4.0-canary.31':
|
||||
'@next/swc-linux-arm64-musl@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-x64-gnu@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-x64-gnu@15.4.0-canary.31':
|
||||
'@next/swc-linux-x64-gnu@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-x64-musl@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-linux-x64-musl@15.4.0-canary.31':
|
||||
'@next/swc-linux-x64-musl@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.31':
|
||||
'@next/swc-win32-arm64-msvc@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@next/swc-win32-x64-msvc@15.4.0-canary.11':
|
||||
optional: true
|
||||
|
||||
'@next/swc-win32-x64-msvc@15.4.0-canary.31':
|
||||
'@next/swc-win32-x64-msvc@15.4.0-canary.35':
|
||||
optional: true
|
||||
|
||||
'@noble/ciphers@1.2.1': {}
|
||||
@@ -19505,6 +19516,13 @@ snapshots:
|
||||
tailwindcss: 4.1.4
|
||||
vite: 6.2.5(@types/node@22.15.2)(jiti@2.4.2)(lightningcss@1.29.2)(terser@5.39.0)(tsx@4.19.2)(yaml@2.7.1)
|
||||
|
||||
'@tanstack/query-core@5.76.0': {}
|
||||
|
||||
'@tanstack/react-query@5.76.1(react@19.1.0)':
|
||||
dependencies:
|
||||
'@tanstack/query-core': 5.76.0
|
||||
react: 19.1.0
|
||||
|
||||
'@testing-library/dom@10.4.0':
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.26.2
|
||||
@@ -20657,9 +20675,9 @@ snapshots:
|
||||
next: 15.4.0-canary.11(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
react: 19.1.0
|
||||
|
||||
'@vercel/analytics@1.5.0(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)':
|
||||
'@vercel/analytics@1.5.0(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)':
|
||||
optionalDependencies:
|
||||
next: 15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
next: 15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
react: 19.1.0
|
||||
|
||||
'@vercel/blob@0.27.3':
|
||||
@@ -22931,7 +22949,7 @@ snapshots:
|
||||
eslint: 9.25.1(jiti@2.4.2)
|
||||
semver: 7.6.3
|
||||
|
||||
eslint-config-neon@0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4):
|
||||
eslint-config-neon@0.2.7(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4):
|
||||
dependencies:
|
||||
'@angular-eslint/eslint-plugin': 19.3.0(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
'@angular-eslint/eslint-plugin-template': 19.3.0(@typescript-eslint/types@8.31.0)(@typescript-eslint/utils@8.31.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4))(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
@@ -22946,7 +22964,7 @@ snapshots:
|
||||
'@typescript-eslint/parser': 8.29.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.5.4)
|
||||
astro-eslint-parser: 1.2.2
|
||||
eslint-config-prettier: 10.1.1(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-mdx: 3.3.2(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-plugin-astro: 1.3.1(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-plugin-cypress: 4.2.0(eslint@9.25.1(jiti@2.4.2))
|
||||
@@ -22997,7 +23015,7 @@ snapshots:
|
||||
'@typescript-eslint/parser': 8.29.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)
|
||||
astro-eslint-parser: 1.2.2
|
||||
eslint-config-prettier: 10.1.1(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-mdx: 3.3.2(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-plugin-astro: 1.3.1(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-plugin-cypress: 4.2.0(eslint@9.25.1(jiti@2.4.2))
|
||||
@@ -23100,7 +23118,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)):
|
||||
eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)):
|
||||
dependencies:
|
||||
debug: 4.4.0
|
||||
eslint: 9.25.1(jiti@2.4.2)
|
||||
@@ -23143,7 +23161,7 @@ snapshots:
|
||||
'@typescript-eslint/parser': 8.29.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3)
|
||||
eslint: 9.25.1(jiti@2.4.2)
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0(eslint-import-resolver-typescript@4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2)))(eslint@9.25.1(jiti@2.4.2))
|
||||
eslint-import-resolver-typescript: 4.3.4(eslint-plugin-import-x@4.10.0(eslint@9.25.1(jiti@2.4.2))(typescript@5.8.3))(eslint-plugin-import@2.31.0)(eslint@9.25.1(jiti@2.4.2))
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@@ -24059,9 +24077,9 @@ snapshots:
|
||||
dependencies:
|
||||
next: 15.4.0-canary.11(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
|
||||
geist@1.3.1(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)):
|
||||
geist@1.3.1(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)):
|
||||
dependencies:
|
||||
next: 15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
next: 15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
|
||||
generic-pool@3.4.2: {}
|
||||
|
||||
@@ -26444,9 +26462,9 @@ snapshots:
|
||||
- '@babel/core'
|
||||
- babel-plugin-macros
|
||||
|
||||
next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
dependencies:
|
||||
'@next/env': 15.4.0-canary.31
|
||||
'@next/env': 15.4.0-canary.35
|
||||
'@swc/helpers': 0.5.15
|
||||
caniuse-lite: 1.0.30001711
|
||||
postcss: 8.4.31
|
||||
@@ -26454,14 +26472,14 @@ snapshots:
|
||||
react-dom: 19.1.0(react@19.1.0)
|
||||
styled-jsx: 5.1.6(react@19.1.0)
|
||||
optionalDependencies:
|
||||
'@next/swc-darwin-arm64': 15.4.0-canary.31
|
||||
'@next/swc-darwin-x64': 15.4.0-canary.31
|
||||
'@next/swc-linux-arm64-gnu': 15.4.0-canary.31
|
||||
'@next/swc-linux-arm64-musl': 15.4.0-canary.31
|
||||
'@next/swc-linux-x64-gnu': 15.4.0-canary.31
|
||||
'@next/swc-linux-x64-musl': 15.4.0-canary.31
|
||||
'@next/swc-win32-arm64-msvc': 15.4.0-canary.31
|
||||
'@next/swc-win32-x64-msvc': 15.4.0-canary.31
|
||||
'@next/swc-darwin-arm64': 15.4.0-canary.35
|
||||
'@next/swc-darwin-x64': 15.4.0-canary.35
|
||||
'@next/swc-linux-arm64-gnu': 15.4.0-canary.35
|
||||
'@next/swc-linux-arm64-musl': 15.4.0-canary.35
|
||||
'@next/swc-linux-x64-gnu': 15.4.0-canary.35
|
||||
'@next/swc-linux-x64-musl': 15.4.0-canary.35
|
||||
'@next/swc-win32-arm64-msvc': 15.4.0-canary.35
|
||||
'@next/swc-win32-x64-msvc': 15.4.0-canary.35
|
||||
babel-plugin-react-compiler: 19.1.0-rc.1
|
||||
sharp: 0.34.1
|
||||
transitivePeerDependencies:
|
||||
@@ -26640,12 +26658,12 @@ snapshots:
|
||||
optionalDependencies:
|
||||
next: 15.4.0-canary.11(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
|
||||
nuqs@2.4.3(next@15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0):
|
||||
nuqs@2.4.3(next@15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0):
|
||||
dependencies:
|
||||
mitt: 3.0.1
|
||||
react: 19.1.0
|
||||
optionalDependencies:
|
||||
next: 15.4.0-canary.31(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
next: 15.4.0-canary.35(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
|
||||
oauth-sign@0.9.0: {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user