import { M as DocsCollection, j as DocCollection } from "../core-t4FMmF2c.js"; import { i as InternalTypeConfig } from "../types-DvmltNFH.js"; import { t as CompiledMDXProperties } from "../build-mdx-CLPZjBjW.js"; import { FC, ReactNode } from "react"; import { StandardSchemaV1 } from "@standard-schema/spec"; //#region src/runtime/browser.d.ts type CompiledMDXFile = CompiledMDXProperties & TC['DocData'][Name] & Record; interface ClientLoaderOptions { /** * Loader ID (usually your collection name) * * The code splitting strategy of frameworks like Tanstack Start may duplicate `createClientLoader()` into different chunks. * * We use loader ID to share cache between multiple instances of client loader. * * @defaultValue '' */ id?: string; component: (loaded: Doc, props: Props) => ReactNode; } interface ClientLoader { preload: (path: string) => Promise; /** * Get a component that renders content with `use()`. */ getComponent: (path: string) => FC; /** * Get react nodes that renders content. */ useContent: undefined extends Props ? (path: string, props?: Props) => ReactNode : (path: string, props: Props) => ReactNode; } type BrowserCreate = ReturnType>; interface DocCollectionEntry { raw: Record Promise>>; createClientLoader: (options: ClientLoaderOptions, Props>) => ClientLoader, Props>; } declare function browser(): { doc(_name: Name, glob: Record Promise>): Config[Name] extends DocCollection | DocsCollection ? DocCollectionEntry, TC> : never; }; declare function createClientLoader(globEntries: Record Promise>, options: ClientLoaderOptions): ClientLoader; //#endregion export { BrowserCreate, ClientLoader, ClientLoaderOptions, DocCollectionEntry, browser, createClientLoader };