UNPKG

@analogjs/content

Version:

Content Rendering for Analog

1 lines 1.35 kB
{"version":3,"file":"analogjs-content-shiki-highlighter.mjs","sources":["../../../../packages/content/shiki-highlighter/src/index.ts","../../../../packages/content/shiki-highlighter/src/analogjs-content-shiki-highlighter.ts"],"sourcesContent":["import { ContentRenderer, NoopContentRenderer } from '@analogjs/content';\nimport { Provider } from '@angular/core';\nimport type {\n BundledLanguage,\n BundledTheme,\n CodeOptionsMeta,\n CodeOptionsMultipleThemes,\n CodeOptionsSingleTheme,\n CodeToHastOptionsCommon,\n} from 'shiki';\n\nexport type ShikiHighlightOptions = Partial<\n Omit<CodeToHastOptionsCommon<BundledLanguage>, 'lang'>\n> &\n CodeOptionsMeta &\n Partial<CodeOptionsSingleTheme<BundledTheme>> &\n Partial<CodeOptionsMultipleThemes<BundledTheme>>;\n\nexport type WithShikiHighlighterOptions = ShikiHighlightOptions & {\n container?: string;\n};\n\nexport function withShikiHighlighter(\n _opts: WithShikiHighlighterOptions = {},\n): Provider[] {\n return [\n {\n provide: ContentRenderer,\n useClass: NoopContentRenderer,\n },\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAsBgB,SAAA,oBAAoB,CAClC,KAAA,GAAqC,EAAE,EAAA;IAEvC,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,QAAQ,EAAE,mBAAmB;AAC9B,SAAA;KACF;AACH;;AC/BA;;AAEG;;;;"}