@slidev/types 0.37.1 → 0.38.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +14 -14
  2. 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
- declare type SlidevThemeConfig = Record<string, string | number>;
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
- declare type PreparserExtensionLoader = (addons: string[], filepath?: string) => Promise<SlidevPreparserExtension[]>;
318
- declare type PreparserExtensionFromHeadmatter = (headmatter: any, exts: SlidevPreparserExtension[], filepath: string | undefined) => Promise<SlidevPreparserExtension[]>;
319
- declare type RenderContext = 'slide' | 'overview' | 'presenter' | 'previewNext';
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
- declare type MermaidOptions = (typeof mermaid.initialize) extends (a: infer A) => any ? A : never;
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
- declare type ShikiSetup = (shiki: typeof Shiki) => Awaitable<ShikiOptions | undefined>;
363
- declare type KatexSetup = () => Awaitable<Partial<KatexOptions> | undefined>;
364
- declare type WindiSetup = () => Awaitable<Partial<WindiCssOptions> | undefined>;
365
- declare type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | undefined>;
366
- declare type PreparserSetup = (filepath: string) => SlidevPreparserExtension;
367
- declare type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn>;
368
- declare type AppSetup = (context: AppContext) => Awaitable<void>;
369
- declare type MermaidSetup = () => Partial<MermaidOptions> | undefined;
370
- declare type ShortcutsSetup = (nav: NavOperations, defaultShortcuts: ShortcutOptions[]) => Array<ShortcutOptions>;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "0.37.1",
3
+ "version": "0.38.0",
4
4
  "description": "Shared types declerations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",