Something went wrong. Try again.
Local-first knowledge base made for Typst and the Atmosphere. typbase.at
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930import type { NotebookCell } from "@typbase/codemirror";import type { FileId, FlattenedBlock, HeadingSpan, LinkSpan, SectionSpan, TypstState,} from "@typbase/engine";
export function cellsOf(state: TypstState, fileId: FileId, text: string): NotebookCell[] { return state.extractCells(fileId, text) as NotebookCell[];}
export function headingsOf(state: TypstState, fileId: FileId, text: string): HeadingSpan[] { return state.extractHeadings(fileId, text);}
export function sectionsOf(state: TypstState, text: string): SectionSpan[] { return state.extractSections(undefined, text);}
export function blocksOf(state: TypstState, text: string): FlattenedBlock[] { return state.flattenDocument(undefined, text);}
export function linksOf(state: TypstState, text: string): LinkSpan[] { return state.extractLinks(undefined, text);}