@slidev/types 0.47.1 → 0.47.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -343,6 +343,7 @@ interface SlideInfoBase {
|
|
|
343
343
|
content: string;
|
|
344
344
|
note?: string;
|
|
345
345
|
frontmatter: Record<string, any>;
|
|
346
|
+
frontmatterRaw?: string;
|
|
346
347
|
frontmatterStyle?: FrontmatterStyle;
|
|
347
348
|
title?: string;
|
|
348
349
|
level?: number;
|
|
@@ -388,8 +389,8 @@ interface SlidevMarkdown {
|
|
|
388
389
|
}
|
|
389
390
|
interface SlidevPreparserExtension {
|
|
390
391
|
name: string;
|
|
391
|
-
transformRawLines
|
|
392
|
-
transformSlide
|
|
392
|
+
transformRawLines?: (lines: string[]) => Promise<void> | void;
|
|
393
|
+
transformSlide?: (content: string, frontmatter: any) => Promise<string | undefined>;
|
|
393
394
|
}
|
|
394
395
|
type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
395
396
|
type PreparserExtensionFromHeadmatter = (headmatter: any, exts: SlidevPreparserExtension[], filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
@@ -434,10 +435,10 @@ interface ShikiContext {
|
|
|
434
435
|
* @deprecated Pass directly the theme name it's supported by Shiki.
|
|
435
436
|
* For custom themes, load it manually via `JSON.parse(fs.readFileSync(path, 'utf-8'))` and pass the raw JSON object instead.
|
|
436
437
|
*/
|
|
437
|
-
loadTheme(path: string)
|
|
438
|
+
loadTheme: (path: string) => Promise<any>;
|
|
438
439
|
}
|
|
439
440
|
type ShikiSetupReturn = Partial<CodeToHastOptions> & {
|
|
440
|
-
setup
|
|
441
|
+
setup?: (highlighter: Highlighter) => Awaitable<void>;
|
|
441
442
|
};
|
|
442
443
|
type ShikiSetup = (shiki: ShikiContext) => Awaitable<ShikiSetupReturn | void>;
|
|
443
444
|
type KatexSetup = () => Awaitable<Partial<KatexOptions> | void>;
|