@slidev/types 0.38.4 → 0.38.6

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 +66 -2
  2. 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
  *
@@ -178,6 +206,26 @@ interface SlidevConfig {
178
206
  * @default true
179
207
  */
180
208
  presenter: boolean | 'dev' | 'build';
209
+ /**
210
+ * Attributes to apply to the HTML element
211
+ *
212
+ * @default {}
213
+ */
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
+ };
181
229
  }
182
230
  interface FontOptions {
183
231
  /**
@@ -268,6 +316,11 @@ interface ResolvedDrawingsOptions {
268
316
  presenterOnly: boolean;
269
317
  syncAll: boolean;
270
318
  }
319
+ interface ResolvedExportOptions extends Omit<ExportArgs, 'entry' | 'theme'> {
320
+ withClicks?: boolean;
321
+ executablePath?: string;
322
+ withToc?: boolean;
323
+ }
271
324
 
272
325
  interface SlideInfoBase {
273
326
  raw: string;
@@ -384,4 +437,15 @@ declare function defineKatexSetup(fn: KatexSetup): KatexSetup;
384
437
  declare function defineShortcutsSetup(fn: ShortcutsSetup): ShortcutsSetup;
385
438
  declare function definePreparserSetup(fn: PreparserSetup): PreparserSetup;
386
439
 
387
- 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, UnoSetup, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup, defineWindiSetup };
440
+ interface TocItem {
441
+ active?: boolean;
442
+ activeParent?: boolean;
443
+ children: TocItem[];
444
+ hasActiveParent?: boolean;
445
+ level: number;
446
+ path: string;
447
+ hideInToc?: boolean;
448
+ title?: string;
449
+ }
450
+
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "0.38.4",
3
+ "version": "0.38.6",
4
4
  "description": "Shared types declerations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",