UNPKG

@ng-doc/app

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

64 lines (54 loc) 2.58 kB
import { InjectionToken, Provider } from '@angular/core'; import { NgDocContext, NgDocPageProcessor, NgDocPageSkeleton, NgDocTheme, NgDocTypeControl } from '@ng-doc/app/interfaces'; import { Mermaid } from 'mermaid'; declare const NG_DOC_CONTEXT: InjectionToken<NgDocContext>; declare const NG_DOC_MERMAID: InjectionToken<Mermaid>; declare const NG_DOC_PAGE_PROCESSOR: InjectionToken<NgDocPageProcessor<unknown>>; declare const NG_DOC_PAGE_CUSTOM_PROCESSOR: InjectionToken<NgDocPageProcessor<unknown>>; /** * Provide a main processor to replace html nodes with an Angular component. * Main processors are run before custom processors. * @param processors - The processor to provide. */ declare function provideMainPageProcessor(processors: NgDocPageProcessor<unknown> | Array<NgDocPageProcessor<unknown>>): Provider[]; /** * Provide a processor to replace html nodes with an Angular component. * @param processors - The processor to provide. */ declare function providePageProcessor<T>(processors: NgDocPageProcessor<T> | Array<NgDocPageProcessor<T>>): Provider[]; declare const NG_DOC_PAGE_SKELETON: InjectionToken<NgDocPageSkeleton>; declare const NG_DOC_ROUTE_PREFIX: InjectionToken<string>; interface NgDocShikiTheme { light: string; dark: string; } declare const NG_DOC_SHIKI_THEME: InjectionToken<NgDocShikiTheme>; /** * Token that can be used to provide custom theme. * You must compile your theme to CSS and add it to `assets` so that NgDoc can load it dynamically. * * You always should provide custom themes in root of your application with `multi: true` parameter. * * For example * ```typescript * @NgModule({ * declarations: [AppComponent], * imports: [], * providers: [ * {provide: NG_DOC_THEME, useValue: {id: 'CustomTheme', path: '/assets/themes/custom.css'}, multi: true} * ], * bootstrap: [AppComponent], * }) * export class AppModule {} * ``` */ declare const NG_DOC_THEME: InjectionToken<NgDocTheme>; /** * Default theme for application if user didn't change it manually. * * You can provide this token in the root of you application, to set theme by default. */ declare const NG_DOC_DEFAULT_THEME_ID: InjectionToken<string>; declare const NG_DOC_TYPE_CONTROL: InjectionToken<NgDocTypeControl>; export { NG_DOC_CONTEXT, NG_DOC_DEFAULT_THEME_ID, NG_DOC_MERMAID, NG_DOC_PAGE_CUSTOM_PROCESSOR, NG_DOC_PAGE_PROCESSOR, NG_DOC_PAGE_SKELETON, NG_DOC_ROUTE_PREFIX, NG_DOC_SHIKI_THEME, NG_DOC_THEME, NG_DOC_TYPE_CONTROL, provideMainPageProcessor, providePageProcessor }; export type { NgDocShikiTheme };