@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";Functions
Section titled “Functions”| 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. |
Interfaces
Section titled “Interfaces”| 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). |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
NextLinksMiddleware |
Middleware: a Response for short links, undefined to continue. |
NextRouteHandler |
An app-router route handler. |
Variables
Section titled “Variables”| Name | Summary |
|---|---|
linksRedirect |
Alias of linksMiddleware, matching the other adapters’ naming. |
Re-exports
Section titled “Re-exports”| Name | Documented on |
|---|---|
LinksPanelOptions |
@xtandard/links |
LinksRedirectInput |
@xtandard/links/elysia |