@slidev/types 0.37.1 → 0.38.1
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.ts +14 -14
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -292,7 +292,7 @@ interface SlidevThemeMeta {
|
|
|
292
292
|
colorSchema?: 'dark' | 'light' | 'both';
|
|
293
293
|
highlighter?: 'prism' | 'shiki' | 'both';
|
|
294
294
|
}
|
|
295
|
-
|
|
295
|
+
type SlidevThemeConfig = Record<string, string | number>;
|
|
296
296
|
interface SlidevFeatureFlags {
|
|
297
297
|
katex: boolean;
|
|
298
298
|
monaco: boolean;
|
|
@@ -314,9 +314,9 @@ interface SlidevPreparserExtension {
|
|
|
314
314
|
transformRawLines?(lines: string[]): Promise<void>;
|
|
315
315
|
transformSlide?(content: string, frontmatter: any): Promise<string | undefined>;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
318
|
+
type PreparserExtensionFromHeadmatter = (headmatter: any, exts: SlidevPreparserExtension[], filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
319
|
+
type RenderContext = 'slide' | 'overview' | 'presenter' | 'previewNext';
|
|
320
320
|
|
|
321
321
|
interface AppContext {
|
|
322
322
|
app: App;
|
|
@@ -337,7 +337,7 @@ interface MonacoSetupReturn {
|
|
|
337
337
|
dark?: string;
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
type MermaidOptions = (typeof mermaid.initialize) extends (a: infer A) => any ? A : never;
|
|
341
341
|
interface NavOperations {
|
|
342
342
|
next: () => void;
|
|
343
343
|
prev: () => Promise<void>;
|
|
@@ -359,15 +359,15 @@ interface ShortcutOptions {
|
|
|
359
359
|
autoRepeat?: boolean;
|
|
360
360
|
name?: string;
|
|
361
361
|
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
362
|
+
type ShikiSetup = (shiki: typeof Shiki) => Awaitable<ShikiOptions | undefined>;
|
|
363
|
+
type KatexSetup = () => Awaitable<Partial<KatexOptions> | undefined>;
|
|
364
|
+
type WindiSetup = () => Awaitable<Partial<WindiCssOptions> | undefined>;
|
|
365
|
+
type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | undefined>;
|
|
366
|
+
type PreparserSetup = (filepath: string) => SlidevPreparserExtension;
|
|
367
|
+
type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn>;
|
|
368
|
+
type AppSetup = (context: AppContext) => Awaitable<void>;
|
|
369
|
+
type MermaidSetup = () => Partial<MermaidOptions> | undefined;
|
|
370
|
+
type ShortcutsSetup = (nav: NavOperations, defaultShortcuts: ShortcutOptions[]) => Array<ShortcutOptions>;
|
|
371
371
|
declare function defineShikiSetup(fn: ShikiSetup): ShikiSetup;
|
|
372
372
|
declare function defineWindiSetup(fn: WindiSetup): WindiSetup;
|
|
373
373
|
declare function defineUnoSetup(fn: UnoSetup): UnoSetup;
|