Skip to content

@xtandard/links/next

Next.js adapter (web-standard, no next import): linksRouteHandlers() serves the panel from an app-router catch-all route, and linksMiddleware() (alias linksRedirect()) answers short links from middleware.ts, resolving undefined to continue.

import { … } from "@xtandard/links/next";
Name Summary
linksMiddleware Create the redirect middleware.
linksPanel Create the panel (createFetchHandler); same as the other adapters’ linksPanel.
linksRouteHandlers App-router route handlers serving the panel from a catch-all route.
Name Summary
LinksRouteHandlers Route handlers for every method, plus the panel’s core and openapi.
NextFetchEventLike The event Next passes to middleware (structural; only waitUntil is used).
Name Summary
NextLinksMiddleware Middleware: a Response for short links, undefined to continue.
NextRouteHandler An app-router route handler.
Name Summary
linksRedirect Alias of linksMiddleware, matching the other adapters’ naming.
Name Documented on
LinksPanelOptions @xtandard/links
LinksRedirectInput @xtandard/links/elysia