export { ArrayParserOptions, Parser, asArrayOf, asBoolean, asFloat, asInteger, asIsoDate, asIsoDateTime, asJson, asString, createParser, inferParserType } from './parsers.js'; export { R as RouteParamsInput, l as loadRouteParams, p as parseRouteParams } from '../params-BALtrRim.js'; import { ReactNode, ComponentType } from 'react'; /** * Farm.js Query State Types */ /** * Props for Farm.js page components with search params */ /** * Props for Farm.js layout components */ interface LayoutPropsSafe { children: ReactNode; params: Record; } interface PagePropsSafe { params: Record; searchParams: Promise>; } /** * Query state configuration for Farm.js */ interface QueryStateConfig { /** * Default history method for URL updates * @default 'push' */ defaultHistoryMethod?: "push" | "replace"; /** * Default shallow routing behavior * @default true */ shallow?: boolean; /** * Default scroll behavior * @default true */ scroll?: boolean; /** * Custom serialization options */ serialization?: { /** * Custom URL key mappings */ urlKeys?: Record; /** * Custom base URL for serialization */ baseUrl?: string; }; } /** * Farm.js specific query state context */ interface FarmQueryStateContext { /** * Current search parameters */ searchParams: URLSearchParams; /** * Current pathname */ pathname: string; /** * Update URL with new search parameters */ updateUrl: (params: Record, options?: { method?: "push" | "replace"; shallow?: boolean; scroll?: boolean; }) => void; /** * Clear all search parameters */ clearParams: () => void; } /** * Higher-order component for providing query state context */ type QueryStateProvider = ComponentType<{ children: ReactNode; searchParams?: URLSearchParams; pathname?: string; }>; export type { FarmQueryStateContext, LayoutPropsSafe, PagePropsSafe, QueryStateConfig, QueryStateProvider };