import{type ShikiHighlighter}from'./shiki-types.js';export{SHIKI_DARK_THEME,SHIKI_LIGHT_THEME,SHIKI_THEMES,normalizeShikiLanguage,type ShikiHighlighter,type ShikiHighlighterCore,type ShikiLanguageInput,}from'./shiki-types.js';export{loadShikiHighlighterCore}from'./shiki-types.js'; /** * Lazily loads the optional peer dependency `shiki` once per page and builds * (and caches) a single `Highlighter` instance seeded with `SHIKI_THEMES` and * *zero* language grammars. Creating the highlighter — compiling its regex * engine, parsing the seed themes — is the expensive part, not the dynamic * `import()` itself, so the created instance is what's cached here rather * than just the resolved module (one level deeper than `map-loader.ts`'s * single-dependency cached-promise shape, which this otherwise mirrors). * Resolves to `null` with a one-time development diagnostic if shiki isn't * installed — `` falls back to plain unhighlighted text in * that case, which is a fully supported default, not a degraded mode. No * language grammar is loaded up front; `loadShikiLanguage()` below loads each * one incrementally the first time a `language` value actually requests it. */ export declare function loadShikiHighlighter():Promise; /** * Safely reports whether `lang` is already loaded into `hl`, tolerating a highlighter whose * `getLoadedLanguages()` itself throws -- treated the same as "not loaded", which routes the * caller into the existing unhighlighted-fallback path instead of throwing out of it. * `loadShikiHighlighter()`/`loadShikiHighlighterCore()` already validate a highlighter's * capability *shape* at load time, so `hl` here is never missing the method outright; this * additionally tolerates a shape-valid peer whose method throws only when actually called (a * load-time shape check alone cannot catch that). Shared by `loadShikiLanguage()` below and * ``'s own synchronous per-render check in `syncHighlight()`. */ export declare function shikiHasLoadedLanguage(hl:ShikiHighlighter,lang:string):boolean; /** * Ensures `lang` is loaded into `hl`, loading it on demand the first time * it's requested rather than bundling every possible grammar up front — * shiki supports this incrementally via `Highlighter.loadLanguage()`, which * is what keeps this lazy instead of defeating the point of lazy-loading the * peer at all. Resolves `false` (and remembers not to retry) when `lang` * isn't a shiki-recognized grammar id or alias at all, so a caller can fall * back to plain-text rendering instead of retrying an id that can never * succeed on every future render. */ export declare function loadShikiLanguage(hl:ShikiHighlighter,lang:string):Promise;