import { HistoryOptions, LimitUrlUpdates, Nullable, Options, Parser, ParserBuilder, ParserMap, ParserWithOptionalDefault, SearchParams, UrlKeys, createParser, inferParserType, parseAsArrayOf, parseAsBoolean, parseAsFloat, parseAsHex, parseAsIndex, parseAsInteger, parseAsIsoDate, parseAsIsoDateTime, parseAsJson, parseAsNumberLiteral, parseAsString, parseAsStringEnum, parseAsStringLiteral, parseAsTimestamp } from "./parsers-gDSkX8OH.js"; import { StandardSchemaV1 } from "@standard-schema/spec"; //#region src/loader.d.ts type LoaderInput = URL | Request | URLSearchParams | Record | string; /** * @deprecated Use `CreateLoaderOptions` instead. */ type LoaderOptions = { urlKeys?: UrlKeys; }; type CreateLoaderOptions

= LoaderOptions

; type LoaderFunctionOptions = { /** * Whether to use strict parsing. If true, the loader will throw an error if * any of the parsers fail to parse their respective values. If false, the * loader will return null or their default value for any failed parsers. */ strict?: boolean; }; type LoaderFunction = { /** * Load & parse search params from (almost) any input. * * While loaders are typically used in the context of a React Router / Remix * loader function, it can also be used in Next.js API routes or * getServerSideProps functions, or even with the app router `searchParams` * page prop (sync or async), if you don't need the cache behaviours. */ (input: LoaderInput, options?: LoaderFunctionOptions): inferParserType; /** * Load & parse search params from (almost) any input. * * While loaders are typically used in the context of a React Router / Remix * loader function, it can also be used in Next.js API routes or * getServerSideProps functions, or even with the app router `searchParams` * page prop (sync or async), if you don't need the cache behaviours. * * Note: this async overload makes it easier to use against the `searchParams` * page prop in Next.js 15 app router: * * ```tsx * export default async function Page({ searchParams }) { * const parsedSearchParamsPromise = loadSearchParams(searchParams) * return ( * // Pre-render & stream the shell immediately * * * // Stream the Promise down * * * * ) * } * ``` */ (input: Promise, options?: LoaderFunctionOptions): Promise>; }; declare function createLoader(parsers: Parsers, { urlKeys }?: CreateLoaderOptions): LoaderFunction; //#endregion //#region src/cache.d.ts type CacheInterface = { parse: { /** * Parse the incoming `searchParams` page prop using the parsers provided, * and make it available to the RSC tree. * * @argument searchParams - The `searchParams` prop from the page component. * @argument loaderOptions.strict - When `true`, the loader will throw an error * if a search params value is invalid for the given parser, rather than falling * back to the parser's default value (or `null` if no default is set). * * @returns The parsed search params for direct use in the page component. * * Note: Next.js 15 introduced a breaking change in making their * `searchParam` prop a Promise. You will need to await this function * to use the Promise version in Next.js 15. */ (searchParams: SearchParams, loaderOptions?: LoaderFunctionOptions): inferParserType; /** * Parse the incoming `searchParams` page prop using the parsers provided, * and make it available to the RSC tree. * * @argument searchParams - The `searchParams` prop from the page component (Promise). * @argument loaderOptions.strict - When `true`, the Promise returned from the loader * will reject if a search params value is invalid for the given parser, * rather than falling back to the parser's default value (or `null` if no default is set). * * @returns The parsed search params for direct use in the page component. * * Note: this async version requires Next.js 15 or later. */ (searchParams: Promise, loaderOptions?: LoaderFunctionOptions): Promise>; }; all: () => inferParserType; get: (key: Key) => inferParserType; }; declare function createSearchParamsCache(parsers: Parsers, { urlKeys }?: { urlKeys?: UrlKeys; }): CacheInterface; //#endregion //#region src/lib/queues/rate-limiting.d.ts declare function throttle(timeMs: number): LimitUrlUpdates; declare function debounce(timeMs: number): LimitUrlUpdates; declare const defaultRateLimit: LimitUrlUpdates; //#endregion //#region src/serializer.d.ts type Base = string | URLSearchParams | URL; type CreateSerializerOptions = Pick & { urlKeys?: UrlKeys; }; type SerializeFunction = { /** * Generate a query string for the given values. */ (values: Partial>>): Return; /** * Append/amend the query string of the given base with the given values. * * Existing search param values will kept, unless: * - the value is null, in which case the search param will be deleted * - another value is given for an existing key, in which case the * search param will be updated */ (base: BaseType, values: Partial>> | null): Return; }; declare function createSerializer(parsers: Parsers, { clearOnDefault, urlKeys }?: CreateSerializerOptions): SerializeFunction; //#endregion //#region src/standard-schema.d.ts type CreateStandardSchemaV1Options = CreateLoaderOptions & { /** * Marks the output type as Partial, and removes any keys * from the output that are not present in the input. * * This is useful for TanStack Router, to avoid reflecting default values * (or null) in the URL, and to make search params optional in Links, * as default values are handled by nuqs. * * @default false */ partialOutput?: PartialOutput; }; type MaybePartial = Condition extends true ? Partial : Type; declare function createStandardSchemaV1(parsers: Parsers, { urlKeys, partialOutput }?: CreateStandardSchemaV1Options): StandardSchemaV1>>; //#endregion export { type CreateSerializerOptions, type HistoryOptions, type LoaderFunction, type LoaderInput, type LoaderOptions, type Nullable, type Options, Parser, ParserBuilder, ParserMap, ParserWithOptionalDefault, type SearchParams, type UrlKeys, createLoader, createParser, createSearchParamsCache, createSerializer, createStandardSchemaV1, debounce, defaultRateLimit, inferParserType, parseAsArrayOf, parseAsBoolean, parseAsFloat, parseAsHex, parseAsIndex, parseAsInteger, parseAsIsoDate, parseAsIsoDateTime, parseAsJson, parseAsNumberLiteral, parseAsString, parseAsStringEnum, parseAsStringLiteral, parseAsTimestamp, throttle }; //# sourceMappingURL=server.d.ts.map