@slidev/types 0.49.5 → 0.49.7

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/client.d.ts CHANGED
@@ -8,18 +8,14 @@ declare module '#slidev/configs' {
8
8
  export default configs
9
9
  }
10
10
 
11
- declare module '#slidev/global-components/top' {
11
+ declare module '#slidev/global-layers' {
12
12
  import type { ComponentOptions } from 'vue'
13
13
 
14
- const component: ComponentOptions
15
- export default component
16
- }
14
+ export const GlobalTop: ComponentOptions
15
+ export const GlobalBottom: ComponentOptions
17
16
 
18
- declare module '#slidev/global-components/bottom' {
19
- import type { ComponentOptions } from 'vue'
20
-
21
- const component: ComponentOptions
22
- export default component
17
+ export const SlideTop: ComponentOptions
18
+ export const SlideBottom: ComponentOptions
23
19
  }
24
20
 
25
21
  declare module '#slidev/slides' {
package/dist/index.d.mts CHANGED
@@ -482,11 +482,11 @@ interface SlidevData {
482
482
  watchFiles: string[];
483
483
  }
484
484
  interface SlidevPreparserExtension {
485
- name: string;
485
+ name?: string;
486
486
  transformRawLines?: (lines: string[]) => Promise<void> | void;
487
487
  transformSlide?: (content: string, frontmatter: any) => Promise<string | undefined>;
488
488
  }
489
- type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string, mode?: string) => Promise<SlidevPreparserExtension[]>;
489
+ type PreparserExtensionLoader = (headmatter: Record<string, unknown>, filepath: string, mode?: string) => Promise<SlidevPreparserExtension[]>;
490
490
  type RenderContext = 'none' | 'slide' | 'overview' | 'presenter' | 'previewNext';
491
491
  interface SlideRoute {
492
492
  no: number;
@@ -608,7 +608,11 @@ type ShikiSetupReturn = Partial<Omit<CodeToHastOptionsCommon<BuiltinLanguage>, '
608
608
  type ShikiSetup = (shiki: ShikiContext) => Awaitable<ShikiSetupReturn | void>;
609
609
  type KatexSetup = () => Awaitable<Partial<KatexOptions> | void>;
610
610
  type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | void>;
611
- type PreparserSetup = (filepath: string) => SlidevPreparserExtension;
611
+ type PreparserSetup = (context: {
612
+ filepath: string;
613
+ headmatter: Record<string, unknown>;
614
+ mode?: string;
615
+ }) => SlidevPreparserExtension[];
612
616
  type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn | void>;
613
617
  type AppSetup = (context: AppContext) => Awaitable<void>;
614
618
  type RootSetup = () => Awaitable<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "0.49.5",
3
+ "version": "0.49.7",
4
4
  "description": "Shared types declarations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",