import { Chunk, ChunkOptions } from "../contracts/chunk-options.type.mjs"; //#region ../ai/src/rag/chunk/chunk.d.ts /** * Split `text` into citation-bearing {@link Chunk}s according to * {@link ChunkOptions}, dispatching on `options.type`: * * - `"recursive"` (default) — separator-aware greedy packing. * - `"markdown"` — heading/section-aware, then recursive within sections. * - `"sentence"` — packs whole sentences. * - `"fixed"` — back-to-back character windows. * * All strategies are character-based (tokenizer-free) and record the exact * `[start, end)` span of every chunk in the original text. Empty or * whitespace-only input yields `[]`. * * @example * const chunks = chunk(markdownDoc, { type: "markdown", size: 800, overlap: 120 }); * for (const c of chunks) console.log(c.index, c.span, c.text); */ declare function chunk(text: string, options?: ChunkOptions): Chunk[]; //#endregion export { chunk }; //# sourceMappingURL=chunk.d.mts.map