@slidev/types 0.47.2 → 0.47.4
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
|
@@ -21,6 +21,7 @@ interface ExportArgs extends CommonArgs {
|
|
|
21
21
|
'executable-path'?: string;
|
|
22
22
|
'with-toc'?: boolean;
|
|
23
23
|
'per-slide'?: boolean;
|
|
24
|
+
scale?: number;
|
|
24
25
|
}
|
|
25
26
|
interface BuildArgs extends ExportArgs {
|
|
26
27
|
watch: boolean;
|
|
@@ -389,8 +390,8 @@ interface SlidevMarkdown {
|
|
|
389
390
|
}
|
|
390
391
|
interface SlidevPreparserExtension {
|
|
391
392
|
name: string;
|
|
392
|
-
transformRawLines
|
|
393
|
-
transformSlide
|
|
393
|
+
transformRawLines?: (lines: string[]) => Promise<void> | void;
|
|
394
|
+
transformSlide?: (content: string, frontmatter: any) => Promise<string | undefined>;
|
|
394
395
|
}
|
|
395
396
|
type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
396
397
|
type PreparserExtensionFromHeadmatter = (headmatter: any, exts: SlidevPreparserExtension[], filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
@@ -435,10 +436,10 @@ interface ShikiContext {
|
|
|
435
436
|
* @deprecated Pass directly the theme name it's supported by Shiki.
|
|
436
437
|
* For custom themes, load it manually via `JSON.parse(fs.readFileSync(path, 'utf-8'))` and pass the raw JSON object instead.
|
|
437
438
|
*/
|
|
438
|
-
loadTheme(path: string)
|
|
439
|
+
loadTheme: (path: string) => Promise<any>;
|
|
439
440
|
}
|
|
440
441
|
type ShikiSetupReturn = Partial<CodeToHastOptions> & {
|
|
441
|
-
setup
|
|
442
|
+
setup?: (highlighter: Highlighter) => Awaitable<void>;
|
|
442
443
|
};
|
|
443
444
|
type ShikiSetup = (shiki: ShikiContext) => Awaitable<ShikiSetupReturn | void>;
|
|
444
445
|
type KatexSetup = () => Awaitable<Partial<KatexOptions> | void>;
|