UNPKG

@podlite/schema

Version:

AST tools for Podlite markup language

38 lines (37 loc) 1.7 kB
import { AstTree, BlockCaption, BlockItem, Location, PodNode, RootBlock, Toc, TocItem, TocList, Node, Image, FormattingCodeL, FormattingCodeF, BlockFormula } from './types'; export declare const mkNode: <P extends Record<string, any>>(attr: P) => P; export declare const filterNulls: (content: any) => any[]; export declare const mkBlock: (attrs: any, content: any) => any; export declare const mkBlankline: () => { type: string; }; export declare const mkFomattingCode: (attrs: any, content: any) => any; export declare const mkFomattingCodeL: (attrs: any, content: any) => FormattingCodeL; export declare const mkFomattingCodeDelete: (content: any) => { type: string; name: string; content: any[]; }; export declare const mkMarkupCodeF: (formula: string) => FormattingCodeF; export declare const mkVerbatim: (text: any) => { type: string; value: any; }; export declare const mkToc: (content: TocList, title?: string, location?: Location) => Toc; export declare const mkTocList: (content: Array<TocItem | TocList>, level: number) => TocList; export declare const mkTocItem: (content: PodNode) => TocItem; export declare const mkCaption: (content: Array<Node>) => BlockCaption; export declare const mkImage: (src: string, alt?: string) => Image; export declare const mkRootBlock: ({ margin }: { margin?: string; }, content: any) => RootBlock; export interface mkBlockItemParams { level: number; location: Location; margin: string; } export declare const mkItemBlock: ({ level, location, margin }: mkBlockItemParams, content: AstTree) => BlockItem; export declare const mkFormulaBlock: ({ value, location }: { value: any; location: any; }) => BlockFormula;