export declare type SupportedMode = 'ts' | 'js' | 'tsx' | 'jsx' | 'javascript' | 'typescript' | 'html' | 'css'; export declare type HTMLContent = { type: 'html'; pageSubDirName: string; html: string; }; export declare type CodeContent = { type: 'code'; pageSubDirName: string; html: string; collapsed: boolean; }; export declare type AppContent = { type: 'app'; pageSubDirName: string; index: number; htmlFileName: string; sources: { mode: SupportedMode; code: string; }[]; sourceUrl?: string; height?: string; width?: string; }; export declare type StoryContent = { type: 'story'; pageSubDirName: string; index: number; htmlFileName: string; code: string; /** Each demo call has its code collected here */ demoCodes: string[]; /** * Helps us reload the demoCodes for a story in live reload scenario */ entryPointPath: string; }; export declare type ContentItem = /** e.g. markdown */ HTMLContent /** app */ | AppContent /** story */ | StoryContent /** special code content */ | CodeContent; export declare type TableOfContentPageRoot = { type: 'pageRoot'; heading: string; pageSubDirName: string; }; export declare type TableOfContentPageSub = { type: 'pageSub'; pageSubDirName: string; text: string; id: string; level: 1 | 2 | 3 | 4 | 5 | 6; /** If the heading is in an iframe */ iframeId: string; }; export declare type TableOfContentEntry = TableOfContentPageRoot | TableOfContentPageSub; export interface Data { /** The data used to render the table on contents */ tableOfContents: TableOfContentEntry[]; /** The data used to render the stories */ contents: ContentItem[]; } export declare type Heading = { level: 1 | 2 | 3 | 4 | 5 | 6; text: string; id: string; }; export declare const iframeIdBeginsWith = "iframe"; export declare function makeIframeId(index: number): string; /** * Iframe messages * http://stackoverflow.com/a/19503982/390330 */ /** Parent to child messages */ export declare type IframeP2CGetScrollMore = { type: 'IframeP2CGetScrollMore'; id: string; }; export declare type IframeP2CMessage = IframeP2CGetScrollMore; /** Child to parent messages */ export declare type IframeC2PScrollMore = { type: 'IframeC2PScrollMore'; more: number; }; export declare type IframeC2PSetHash = { type: 'IframeC2PSetHash'; hash: string; }; export declare type IframeC2PResize = { type: 'IframeC2PResize'; iframeId: string; height: number; }; export declare type IframeC2PMessage = IframeC2PScrollMore | IframeC2PSetHash | IframeC2PResize; /** * Watch mode configuration */ export declare type Watch = { watch?: () => void; }; /** * Config for render */ export declare type RenderConfig = { /** Relative or absolute path to the folder where the documentation will be generated */ outputDir: string; /** Page title */ title?: string; repoUrl?: string; }; /** * Config for page */ export declare type PageConfig = { /** Used in TOC */ heading: string; /** Just the name of a sub folder e.g. 'foo' */ subDirName: string; }; /** * Page talking to Collector */ export declare type PageTalkingToCollector = {};