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>

1 lines 5.31 kB
{"version":3,"file":"ng-doc-app-tokens.mjs","sources":["../../../../libs/app/tokens/context.ts","../../../../libs/app/tokens/mermaid.ts","../../../../libs/app/tokens/page-processor.ts","../../../../libs/app/tokens/page-skeleton.ts","../../../../libs/app/tokens/route-prefix.ts","../../../../libs/app/tokens/shiki-theme.ts","../../../../libs/app/tokens/theme.ts","../../../../libs/app/tokens/type-control.ts","../../../../libs/app/tokens/ng-doc-app-tokens.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { NgDocContext } from '@ng-doc/app/interfaces';\n\nexport const NG_DOC_CONTEXT: InjectionToken<NgDocContext> = new InjectionToken<NgDocContext>(\n\t'NG_DOC_CONTEXT',\n);\n","import { InjectionToken } from '@angular/core';\nimport type { Mermaid } from 'mermaid';\n\nexport const NG_DOC_MERMAID = new InjectionToken<Mermaid>('NG_DOC_MERMAID');\n","import { InjectionToken, Provider } from '@angular/core';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\n\nexport const NG_DOC_PAGE_PROCESSOR: InjectionToken<NgDocPageProcessor<unknown>> =\n new InjectionToken<NgDocPageProcessor<unknown>>('NG_DOC_PAGE_PROCESSOR');\nexport const NG_DOC_PAGE_CUSTOM_PROCESSOR: InjectionToken<NgDocPageProcessor<unknown>> =\n new InjectionToken<NgDocPageProcessor<unknown>>('NG_DOC_PAGE_CUSTOM_PROCESSOR');\n\n/**\n * Provide a main processor to replace html nodes with an Angular component.\n * Main processors are run before custom processors.\n * @param processors - The processor to provide.\n */\nexport function provideMainPageProcessor(\n processors: NgDocPageProcessor<unknown> | Array<NgDocPageProcessor<unknown>>,\n): Provider[] {\n return asArray(processors).map((processor) => ({\n provide: NG_DOC_PAGE_PROCESSOR,\n useValue: processor,\n multi: true,\n }));\n}\n\n/**\n * Provide a processor to replace html nodes with an Angular component.\n * @param processors - The processor to provide.\n */\nexport function providePageProcessor<T>(\n processors: NgDocPageProcessor<T> | Array<NgDocPageProcessor<T>>,\n): Provider[] {\n return asArray(processors).map((processor) => ({\n provide: NG_DOC_PAGE_CUSTOM_PROCESSOR,\n useValue: processor,\n multi: true,\n }));\n}\n","import { InjectionToken } from '@angular/core';\nimport { NgDocPageSkeleton } from '@ng-doc/app/interfaces';\n\nexport const NG_DOC_PAGE_SKELETON: InjectionToken<NgDocPageSkeleton> =\n\tnew InjectionToken<NgDocPageSkeleton>('NG_DOC_PAGE_SKELETON');\n","import { InjectionToken } from '@angular/core';\n\nexport const NG_DOC_ROUTE_PREFIX = new InjectionToken<string>('NG_DOC_ROUTE_PREFIX');\n","import { InjectionToken } from '@angular/core';\n\nexport interface NgDocShikiTheme {\n light: string;\n dark: string;\n}\n\nexport const NG_DOC_SHIKI_THEME = new InjectionToken<NgDocShikiTheme>('NG_DOC_SHIKI_THEME');\n","import { InjectionToken } from '@angular/core';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\n\n/**\n * Token that can be used to provide custom theme.\n * You must compile your theme to CSS and add it to `assets` so that NgDoc can load it dynamically.\n *\n * You always should provide custom themes in root of your application with `multi: true` parameter.\n *\n * For example\n * ```typescript\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [],\n * providers: [\n * {provide: NG_DOC_THEME, useValue: {id: 'CustomTheme', path: '/assets/themes/custom.css'}, multi: true}\n * ],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n */\nexport const NG_DOC_THEME: InjectionToken<NgDocTheme> = new InjectionToken<NgDocTheme>(\n\t`NG_DOC_THEME`,\n);\n\n/**\n * Default theme for application if user didn't change it manually.\n *\n * You can provide this token in the root of you application, to set theme by default.\n */\nexport const NG_DOC_DEFAULT_THEME_ID: InjectionToken<string> = new InjectionToken<string>(\n\t`NG_DOC_DEFAULT_THEME`,\n);\n","import { InjectionToken } from '@angular/core';\nimport { NgDocTypeControl } from '@ng-doc/app/interfaces';\n\nexport const NG_DOC_TYPE_CONTROL: InjectionToken<NgDocTypeControl> =\n\tnew InjectionToken<NgDocTypeControl>('NG_DOC_TYPE_CONTROL');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,cAAc,GAAiC,IAAI,cAAc,CAC7E,gBAAgB;;MCDJ,cAAc,GAAG,IAAI,cAAc,CAAU,gBAAgB;;MCC7D,qBAAqB,GAChC,IAAI,cAAc,CAA8B,uBAAuB;MAC5D,4BAA4B,GACvC,IAAI,cAAc,CAA8B,8BAA8B;AAEhF;;;;AAIG;AACG,SAAU,wBAAwB,CACtC,UAA4E,EAAA;AAE5E,IAAA,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,MAAM;AAC7C,QAAA,OAAO,EAAE,qBAAqB;AAC9B,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA,CAAC,CAAC;AACL;AAEA;;;AAGG;AACG,SAAU,oBAAoB,CAClC,UAAgE,EAAA;AAEhE,IAAA,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,MAAM;AAC7C,QAAA,OAAO,EAAE,4BAA4B;AACrC,QAAA,QAAQ,EAAE,SAAS;AACnB,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA,CAAC,CAAC;AACL;;MCjCa,oBAAoB,GAChC,IAAI,cAAc,CAAoB,sBAAsB;;MCFhD,mBAAmB,GAAG,IAAI,cAAc,CAAS,qBAAqB;;MCKtE,kBAAkB,GAAG,IAAI,cAAc,CAAkB,oBAAoB;;ACJ1F;;;;;;;;;;;;;;;;;;AAkBG;MACU,YAAY,GAA+B,IAAI,cAAc,CACzE,CAAc,YAAA,CAAA;AAGf;;;;AAIG;MACU,uBAAuB,GAA2B,IAAI,cAAc,CAChF,CAAsB,oBAAA,CAAA;;MC7BV,mBAAmB,GAC/B,IAAI,cAAc,CAAmB,qBAAqB;;ACJ3D;;AAEG;;;;"}