@slidev/types 0.38.5 → 0.38.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/dist/index.d.ts +50 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
|
+
import { TransitionProps, App, Ref } from 'vue';
|
|
1
2
|
import { Awaitable } from '@antfu/utils';
|
|
2
3
|
import * as Shiki from 'shiki';
|
|
3
4
|
import { IThemeRegistration, ILanguageRegistration, Highlighter } from 'shiki';
|
|
4
5
|
import * as monaco from 'monaco-editor';
|
|
5
|
-
import { App, Ref } from 'vue';
|
|
6
6
|
import { Router } from 'vue-router';
|
|
7
7
|
import mermaid from 'mermaid';
|
|
8
8
|
import { KatexOptions } from 'katex';
|
|
9
9
|
import { WindiCssOptions } from 'vite-plugin-windicss';
|
|
10
10
|
import { VitePluginConfig } from 'unocss/vite';
|
|
11
11
|
|
|
12
|
+
interface CommonArgs {
|
|
13
|
+
entry: string;
|
|
14
|
+
theme?: string;
|
|
15
|
+
}
|
|
16
|
+
interface ExportArgs extends CommonArgs {
|
|
17
|
+
output?: string;
|
|
18
|
+
format?: string;
|
|
19
|
+
timeout?: number;
|
|
20
|
+
range?: string;
|
|
21
|
+
dark?: boolean;
|
|
22
|
+
'with-clicks'?: boolean;
|
|
23
|
+
'executable-path'?: string;
|
|
24
|
+
'with-toc'?: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface BuildArgs extends ExportArgs {
|
|
27
|
+
watch: boolean;
|
|
28
|
+
out: string;
|
|
29
|
+
base?: string;
|
|
30
|
+
download?: boolean;
|
|
31
|
+
inspect: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
12
34
|
interface SlidevConfig {
|
|
13
35
|
title: string;
|
|
14
36
|
/**
|
|
@@ -51,6 +73,12 @@ interface SlidevConfig {
|
|
|
51
73
|
* @default false
|
|
52
74
|
*/
|
|
53
75
|
download: boolean | string;
|
|
76
|
+
/**
|
|
77
|
+
* Options for export
|
|
78
|
+
*
|
|
79
|
+
* @default {}
|
|
80
|
+
*/
|
|
81
|
+
export: ResolvedExportOptions;
|
|
54
82
|
/**
|
|
55
83
|
* Show a copy button in code blocks
|
|
56
84
|
*
|
|
@@ -184,6 +212,20 @@ interface SlidevConfig {
|
|
|
184
212
|
* @default {}
|
|
185
213
|
*/
|
|
186
214
|
htmlAttrs: Record<string, string>;
|
|
215
|
+
/**
|
|
216
|
+
* Page transition, powered by Vue Transition
|
|
217
|
+
*
|
|
218
|
+
* @see https://vuejs.org/guide/built-ins/transition.html
|
|
219
|
+
* @experimental
|
|
220
|
+
*/
|
|
221
|
+
pageTransition: TransitionProps & {
|
|
222
|
+
/**
|
|
223
|
+
* Use crossfade transition
|
|
224
|
+
*
|
|
225
|
+
* @default true
|
|
226
|
+
*/
|
|
227
|
+
crossfade?: boolean;
|
|
228
|
+
};
|
|
187
229
|
}
|
|
188
230
|
interface FontOptions {
|
|
189
231
|
/**
|
|
@@ -274,6 +316,11 @@ interface ResolvedDrawingsOptions {
|
|
|
274
316
|
presenterOnly: boolean;
|
|
275
317
|
syncAll: boolean;
|
|
276
318
|
}
|
|
319
|
+
interface ResolvedExportOptions extends Omit<ExportArgs, 'entry' | 'theme'> {
|
|
320
|
+
withClicks?: boolean;
|
|
321
|
+
executablePath?: string;
|
|
322
|
+
withToc?: boolean;
|
|
323
|
+
}
|
|
277
324
|
|
|
278
325
|
interface SlideInfoBase {
|
|
279
326
|
raw: string;
|
|
@@ -323,7 +370,7 @@ interface SlidevMarkdown {
|
|
|
323
370
|
}
|
|
324
371
|
interface SlidevPreparserExtension {
|
|
325
372
|
name: string;
|
|
326
|
-
transformRawLines?(lines: string[]): Promise<void
|
|
373
|
+
transformRawLines?(lines: string[]): Promise<void> | void;
|
|
327
374
|
transformSlide?(content: string, frontmatter: any): Promise<string | undefined>;
|
|
328
375
|
}
|
|
329
376
|
type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
@@ -401,4 +448,4 @@ interface TocItem {
|
|
|
401
448
|
title?: string;
|
|
402
449
|
}
|
|
403
450
|
|
|
404
|
-
export { AppContext, AppSetup, DrawingsOptions, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, PreparserExtensionFromHeadmatter, PreparserExtensionLoader, PreparserSetup, RenderContext, ResolvedDrawingsOptions, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevPreparserExtension, SlidevThemeConfig, SlidevThemeMeta, TocItem, UnoSetup, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup, defineWindiSetup };
|
|
451
|
+
export { AppContext, AppSetup, BuildArgs, CommonArgs, DrawingsOptions, ExportArgs, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, PreparserExtensionFromHeadmatter, PreparserExtensionLoader, PreparserSetup, RenderContext, ResolvedDrawingsOptions, ResolvedExportOptions, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevPreparserExtension, SlidevThemeConfig, SlidevThemeMeta, TocItem, UnoSetup, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup, defineWindiSetup };
|