@slidev/types 0.49.17 → 0.49.18
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.mts +165 -139
- package/dist/index.mjs +2 -0
- package/package.json +6 -3
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,9 @@ import { KatexOptions } from 'katex';
|
|
|
7
7
|
import { CodeToHastOptions, CodeToHastOptionsCommon, BuiltinLanguage, CodeOptionsThemes, BuiltinTheme, CodeOptionsMeta, Highlighter, LanguageInput } from 'shiki';
|
|
8
8
|
import { VitePluginConfig } from 'unocss/vite';
|
|
9
9
|
import { MermaidConfig } from 'mermaid';
|
|
10
|
+
import MagicString from 'magic-string-stack';
|
|
11
|
+
import { MarkdownItShikiOptions } from '@shikijs/markdown-it/index.mjs';
|
|
12
|
+
import { HighlighterGeneric } from 'shiki/types.mjs';
|
|
10
13
|
import Vue from '@vitejs/plugin-vue';
|
|
11
14
|
import VueJsx from '@vitejs/plugin-vue-jsx';
|
|
12
15
|
import Icons from 'unplugin-icons/vite';
|
|
@@ -14,7 +17,8 @@ import Components from 'unplugin-vue-components/vite';
|
|
|
14
17
|
import Markdown from 'unplugin-vue-markdown/vite';
|
|
15
18
|
import RemoteAssets from 'vite-plugin-remote-assets';
|
|
16
19
|
import ServerRef from 'vite-plugin-vue-server-ref';
|
|
17
|
-
import
|
|
20
|
+
import { ViteStaticCopyOptions } from 'vite-plugin-static-copy';
|
|
21
|
+
import { Options } from 'vite-plugin-inspect';
|
|
18
22
|
|
|
19
23
|
interface CommonArgs {
|
|
20
24
|
entry: string;
|
|
@@ -41,152 +45,108 @@ interface BuildArgs extends ExportArgs {
|
|
|
41
45
|
inspect: boolean;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
interface
|
|
45
|
-
|
|
48
|
+
interface Headmatter {
|
|
49
|
+
/**
|
|
50
|
+
* Title of the slides
|
|
51
|
+
*/
|
|
52
|
+
title?: string;
|
|
46
53
|
/**
|
|
47
54
|
* String template to compose title
|
|
48
55
|
*
|
|
49
56
|
* @example "%s - Slidev" - to suffix " - Slidev" to all pages
|
|
50
57
|
* @default '%s - Slidev'
|
|
51
58
|
*/
|
|
52
|
-
titleTemplate
|
|
59
|
+
titleTemplate?: string;
|
|
53
60
|
/**
|
|
54
61
|
* Theme to use for the slides
|
|
55
62
|
*
|
|
56
63
|
* @see https://sli.dev/themes/use.html
|
|
57
64
|
* @default 'default'
|
|
58
65
|
*/
|
|
59
|
-
theme
|
|
66
|
+
theme?: string;
|
|
60
67
|
/**
|
|
61
68
|
* List of Slidev addons
|
|
62
69
|
*
|
|
63
70
|
* @default []
|
|
64
71
|
*/
|
|
65
|
-
addons
|
|
72
|
+
addons?: string[];
|
|
66
73
|
/**
|
|
67
74
|
* Download remote assets in local using vite-plugin-remote-assets
|
|
68
75
|
*
|
|
69
76
|
* @default false
|
|
70
77
|
*/
|
|
71
|
-
remoteAssets
|
|
72
|
-
/**
|
|
73
|
-
* Enable Monaco
|
|
74
|
-
*
|
|
75
|
-
* @see https://sli.dev/custom/config-monaco.html
|
|
76
|
-
* @default true
|
|
77
|
-
*/
|
|
78
|
-
monaco: boolean | 'dev' | 'build';
|
|
79
|
-
/**
|
|
80
|
-
* Where to load monaco types from
|
|
81
|
-
*
|
|
82
|
-
* - `cdn` - load from CDN with `@typescript/ata`
|
|
83
|
-
* - `local` - load from local node_modules
|
|
84
|
-
*
|
|
85
|
-
* @default 'local'
|
|
86
|
-
*/
|
|
87
|
-
monacoTypesSource: 'cdn' | 'local' | 'none';
|
|
88
|
-
/**
|
|
89
|
-
* Additional node packages to load as monaco types
|
|
90
|
-
*
|
|
91
|
-
* @default []
|
|
92
|
-
*/
|
|
93
|
-
monacoTypesAdditionalPackages: string[];
|
|
94
|
-
/**
|
|
95
|
-
* Packages to ignore when loading monaco types
|
|
96
|
-
*
|
|
97
|
-
* @default []
|
|
98
|
-
*/
|
|
99
|
-
monacoTypesIgnorePackages: string[];
|
|
100
|
-
/**
|
|
101
|
-
* Additional local modules to load as dependencies of monaco runnable
|
|
102
|
-
*
|
|
103
|
-
* @default []
|
|
104
|
-
*/
|
|
105
|
-
monacoRunAdditionalDeps: string[];
|
|
78
|
+
remoteAssets?: boolean | 'dev' | 'build';
|
|
106
79
|
/**
|
|
107
80
|
* Show a download button in the SPA build,
|
|
108
81
|
* could also be a link to custom pdf
|
|
109
82
|
*
|
|
110
83
|
* @default false
|
|
111
84
|
*/
|
|
112
|
-
download
|
|
113
|
-
/**
|
|
114
|
-
* Options for export
|
|
115
|
-
*
|
|
116
|
-
* @default {}
|
|
117
|
-
*/
|
|
118
|
-
export: ResolvedExportOptions;
|
|
85
|
+
download?: boolean | string;
|
|
119
86
|
/**
|
|
120
87
|
* Show a copy button in code blocks
|
|
121
88
|
*
|
|
122
89
|
* @default true
|
|
123
90
|
*/
|
|
124
|
-
codeCopy
|
|
91
|
+
codeCopy?: boolean;
|
|
125
92
|
/**
|
|
126
93
|
* Information shows on the built SPA
|
|
127
94
|
* Can be a markdown string
|
|
128
95
|
*
|
|
129
96
|
* @default false
|
|
130
97
|
*/
|
|
131
|
-
info
|
|
98
|
+
info?: string | boolean;
|
|
132
99
|
/**
|
|
133
100
|
* Prefer highlighter
|
|
134
101
|
*
|
|
135
102
|
* @see https://sli.dev/custom/config-highlighter.html
|
|
136
103
|
* @default shiki
|
|
137
104
|
*/
|
|
138
|
-
highlighter
|
|
105
|
+
highlighter?: 'shiki' | 'prism';
|
|
139
106
|
/**
|
|
140
107
|
* Enable Twoslash
|
|
141
108
|
*
|
|
142
109
|
* @default true
|
|
143
110
|
*/
|
|
144
|
-
twoslash
|
|
111
|
+
twoslash?: boolean | 'dev' | 'build';
|
|
145
112
|
/**
|
|
146
113
|
* Show line numbers in code blocks
|
|
147
114
|
*
|
|
148
115
|
* @default false
|
|
149
116
|
*/
|
|
150
|
-
lineNumbers
|
|
117
|
+
lineNumbers?: boolean;
|
|
151
118
|
/**
|
|
152
119
|
* Force slides color schema
|
|
153
120
|
*
|
|
154
121
|
* @default 'auto'
|
|
155
122
|
*/
|
|
156
|
-
colorSchema
|
|
123
|
+
colorSchema?: 'dark' | 'light' | 'all' | 'auto';
|
|
157
124
|
/**
|
|
158
125
|
* Router mode for vue-router
|
|
159
126
|
*
|
|
160
127
|
* @default 'history'
|
|
161
128
|
*/
|
|
162
|
-
routerMode
|
|
129
|
+
routerMode?: 'hash' | 'history';
|
|
163
130
|
/**
|
|
164
131
|
* Aspect ratio for slides
|
|
165
132
|
* should be like `16/9` or `1:1`
|
|
166
133
|
*
|
|
167
134
|
* @default '16/9'
|
|
168
135
|
*/
|
|
169
|
-
aspectRatio
|
|
136
|
+
aspectRatio?: number;
|
|
170
137
|
/**
|
|
171
138
|
* The actual width for slides canvas.
|
|
172
139
|
* unit in px.
|
|
173
140
|
*
|
|
174
141
|
* @default '980'
|
|
175
142
|
*/
|
|
176
|
-
canvasWidth
|
|
177
|
-
/**
|
|
178
|
-
* Force the filename used when exporting the presentation.
|
|
179
|
-
* The extension, e.g. .pdf, gets automatically added.
|
|
180
|
-
*
|
|
181
|
-
* @default ''
|
|
182
|
-
*/
|
|
183
|
-
exportFilename: string | null;
|
|
143
|
+
canvasWidth?: number;
|
|
184
144
|
/**
|
|
185
145
|
* Controls whether texts in slides are selectable
|
|
186
146
|
*
|
|
187
147
|
* @default true
|
|
188
148
|
*/
|
|
189
|
-
selectable
|
|
149
|
+
selectable?: boolean;
|
|
190
150
|
/**
|
|
191
151
|
* Configure for themes, will inject intro root styles as
|
|
192
152
|
* `--slidev-theme-x` for attribute `x`
|
|
@@ -196,37 +156,37 @@ interface SlidevConfig {
|
|
|
196
156
|
*
|
|
197
157
|
* @default {}
|
|
198
158
|
*/
|
|
199
|
-
themeConfig
|
|
159
|
+
themeConfig?: SlidevThemeConfig;
|
|
200
160
|
/**
|
|
201
161
|
* Configure fonts for the slides and app
|
|
202
162
|
*
|
|
203
163
|
* @default {}
|
|
204
164
|
*/
|
|
205
|
-
fonts
|
|
165
|
+
fonts?: ResolvedFontOptions;
|
|
206
166
|
/**
|
|
207
167
|
* Configure the icon for app
|
|
208
168
|
*
|
|
209
169
|
* @default 'https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png'
|
|
210
170
|
*/
|
|
211
|
-
favicon
|
|
171
|
+
favicon?: string;
|
|
212
172
|
/**
|
|
213
173
|
* Options for drawings
|
|
214
174
|
*
|
|
215
175
|
* @default {}
|
|
216
176
|
*/
|
|
217
|
-
drawings
|
|
177
|
+
drawings?: ResolvedDrawingsOptions;
|
|
218
178
|
/**
|
|
219
179
|
* URL of PlantUML server used to render diagrams
|
|
220
180
|
*
|
|
221
181
|
* @default https://www.plantuml.com/plantuml
|
|
222
182
|
*/
|
|
223
|
-
plantUmlServer
|
|
183
|
+
plantUmlServer?: string;
|
|
224
184
|
/**
|
|
225
185
|
* Enable slides recording
|
|
226
186
|
*
|
|
227
187
|
* @default 'dev'
|
|
228
188
|
*/
|
|
229
|
-
record
|
|
189
|
+
record?: boolean | 'dev' | 'build';
|
|
230
190
|
/**
|
|
231
191
|
* Expose the server to inbound requests (listen to `0.0.0.0`)
|
|
232
192
|
*
|
|
@@ -242,19 +202,19 @@ interface SlidevConfig {
|
|
|
242
202
|
* @deprecated
|
|
243
203
|
* @default 'unocss'
|
|
244
204
|
*/
|
|
245
|
-
css
|
|
205
|
+
css?: 'unocss';
|
|
246
206
|
/**
|
|
247
207
|
* Enable presenter mode
|
|
248
208
|
*
|
|
249
209
|
* @default true
|
|
250
210
|
*/
|
|
251
|
-
presenter
|
|
211
|
+
presenter?: boolean | 'dev' | 'build';
|
|
252
212
|
/**
|
|
253
213
|
* Attributes to apply to the HTML element
|
|
254
214
|
*
|
|
255
215
|
* @default {}
|
|
256
216
|
*/
|
|
257
|
-
htmlAttrs
|
|
217
|
+
htmlAttrs?: Record<string, string>;
|
|
258
218
|
/**
|
|
259
219
|
* Page transition, powered by Vue's <TransitionGroup/>
|
|
260
220
|
*
|
|
@@ -269,7 +229,7 @@ interface SlidevConfig {
|
|
|
269
229
|
* @see https://sli.dev/guide/animations.html#pages-transitions
|
|
270
230
|
* @see https://vuejs.org/guide/built-ins/transition.html
|
|
271
231
|
*/
|
|
272
|
-
transition?: BuiltinSlideTransition | string | TransitionGroupProps;
|
|
232
|
+
transition?: BuiltinSlideTransition | string | TransitionGroupProps | null;
|
|
273
233
|
/**
|
|
274
234
|
* Suppport MDC syntax
|
|
275
235
|
*
|
|
@@ -284,17 +244,66 @@ interface SlidevConfig {
|
|
|
284
244
|
*
|
|
285
245
|
* @default true
|
|
286
246
|
*/
|
|
287
|
-
editor
|
|
247
|
+
editor?: boolean;
|
|
288
248
|
/**
|
|
289
249
|
* Enable context menu
|
|
290
250
|
*
|
|
291
251
|
* @default true
|
|
292
252
|
*/
|
|
293
|
-
contextMenu
|
|
253
|
+
contextMenu?: boolean | 'dev' | 'build' | null;
|
|
294
254
|
/**
|
|
295
255
|
* Enable wake lock
|
|
296
256
|
*/
|
|
297
|
-
wakeLock
|
|
257
|
+
wakeLock?: boolean | 'dev' | 'build';
|
|
258
|
+
/**
|
|
259
|
+
* Options for export
|
|
260
|
+
*
|
|
261
|
+
* @default {}
|
|
262
|
+
*/
|
|
263
|
+
export?: ResolvedExportOptions;
|
|
264
|
+
/**
|
|
265
|
+
* Force the filename used when exporting the presentation.
|
|
266
|
+
* The extension, e.g. .pdf, gets automatically added.
|
|
267
|
+
*
|
|
268
|
+
* @default ''
|
|
269
|
+
*/
|
|
270
|
+
exportFilename?: string | null;
|
|
271
|
+
/**
|
|
272
|
+
* Enable Monaco
|
|
273
|
+
*
|
|
274
|
+
* @see https://sli.dev/custom/config-monaco.html
|
|
275
|
+
* @default true
|
|
276
|
+
*/
|
|
277
|
+
monaco?: boolean | 'dev' | 'build';
|
|
278
|
+
/**
|
|
279
|
+
* Where to load monaco types from
|
|
280
|
+
*
|
|
281
|
+
* - `cdn` - load from CDN with `@typescript/ata`
|
|
282
|
+
* - `local` - load from local node_modules
|
|
283
|
+
*
|
|
284
|
+
* @default 'local'
|
|
285
|
+
*/
|
|
286
|
+
monacoTypesSource?: 'cdn' | 'local' | 'none';
|
|
287
|
+
/**
|
|
288
|
+
* Additional node packages to load as monaco types
|
|
289
|
+
*
|
|
290
|
+
* @default []
|
|
291
|
+
*/
|
|
292
|
+
monacoTypesAdditionalPackages?: string[];
|
|
293
|
+
/**
|
|
294
|
+
* Packages to ignore when loading monaco types
|
|
295
|
+
*
|
|
296
|
+
* @default []
|
|
297
|
+
*/
|
|
298
|
+
monacoTypesIgnorePackages?: string[];
|
|
299
|
+
/**
|
|
300
|
+
* Additional local modules to load as dependencies of monaco runnable
|
|
301
|
+
*
|
|
302
|
+
* @default []
|
|
303
|
+
*/
|
|
304
|
+
monacoRunAdditionalDeps?: string[];
|
|
305
|
+
}
|
|
306
|
+
interface SlidevConfig extends Required<Headmatter> {
|
|
298
307
|
}
|
|
299
308
|
interface FontOptions {
|
|
300
309
|
/**
|
|
@@ -588,6 +597,72 @@ type ContextMenuOption = {
|
|
|
588
597
|
});
|
|
589
598
|
type ContextMenuItem = ContextMenuOption | 'separator';
|
|
590
599
|
|
|
600
|
+
interface RootsInfo {
|
|
601
|
+
cliRoot: string;
|
|
602
|
+
clientRoot: string;
|
|
603
|
+
userRoot: string;
|
|
604
|
+
userPkgJson: Record<string, any>;
|
|
605
|
+
userWorkspaceRoot: string;
|
|
606
|
+
}
|
|
607
|
+
interface SlidevEntryOptions {
|
|
608
|
+
/**
|
|
609
|
+
* Markdown entry
|
|
610
|
+
*/
|
|
611
|
+
entry: string;
|
|
612
|
+
/**
|
|
613
|
+
* Theme id
|
|
614
|
+
*/
|
|
615
|
+
theme?: string;
|
|
616
|
+
/**
|
|
617
|
+
* Remote password
|
|
618
|
+
*/
|
|
619
|
+
remote?: string;
|
|
620
|
+
/**
|
|
621
|
+
* Enable inspect plugin
|
|
622
|
+
*/
|
|
623
|
+
inspect?: boolean;
|
|
624
|
+
}
|
|
625
|
+
interface ResolvedSlidevOptions extends RootsInfo, SlidevEntryOptions {
|
|
626
|
+
data: SlidevData;
|
|
627
|
+
themeRaw: string;
|
|
628
|
+
themeRoots: string[];
|
|
629
|
+
addonRoots: string[];
|
|
630
|
+
/**
|
|
631
|
+
* =`[...themeRoots, ...addonRoots, userRoot]` (`clientRoot` excluded)
|
|
632
|
+
*/
|
|
633
|
+
roots: string[];
|
|
634
|
+
mode: 'dev' | 'build' | 'export';
|
|
635
|
+
utils: ResolvedSlidevUtils;
|
|
636
|
+
}
|
|
637
|
+
interface ResolvedSlidevUtils {
|
|
638
|
+
shiki: HighlighterGeneric<any, any>;
|
|
639
|
+
shikiOptions: MarkdownItShikiOptions;
|
|
640
|
+
isMonacoTypesIgnored: (pkg: string) => boolean;
|
|
641
|
+
getLayouts: () => Record<string, string>;
|
|
642
|
+
}
|
|
643
|
+
interface SlidevServerOptions {
|
|
644
|
+
/**
|
|
645
|
+
* @returns `false` if server should be restarted
|
|
646
|
+
*/
|
|
647
|
+
loadData?: () => Promise<SlidevData | false>;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
interface MarkdownTransformContext {
|
|
651
|
+
/**
|
|
652
|
+
* The magic string instance for the current markdown content
|
|
653
|
+
*/
|
|
654
|
+
s: MagicString;
|
|
655
|
+
/**
|
|
656
|
+
* The slide info of the current slide
|
|
657
|
+
*/
|
|
658
|
+
slide: SlideInfo;
|
|
659
|
+
/**
|
|
660
|
+
* Resolved Slidev options
|
|
661
|
+
*/
|
|
662
|
+
options: ResolvedSlidevOptions;
|
|
663
|
+
}
|
|
664
|
+
type MarkdownTransformer = (ctx: MarkdownTransformContext) => void;
|
|
665
|
+
|
|
591
666
|
interface AppContext {
|
|
592
667
|
app: App;
|
|
593
668
|
router: Router;
|
|
@@ -627,14 +702,21 @@ type ShikiSetupReturn = Partial<Omit<CodeToHastOptionsCommon<BuiltinLanguage>, '
|
|
|
627
702
|
setup: (highlighter: Highlighter) => Awaitable<void>;
|
|
628
703
|
langs: (LanguageInput | BuiltinLanguage)[];
|
|
629
704
|
}>;
|
|
705
|
+
interface TransformersSetupReturn {
|
|
706
|
+
pre: (MarkdownTransformer | false)[];
|
|
707
|
+
preCodeblock: (MarkdownTransformer | false)[];
|
|
708
|
+
postCodeblock: (MarkdownTransformer | false)[];
|
|
709
|
+
post: (MarkdownTransformer | false)[];
|
|
710
|
+
}
|
|
630
711
|
type ShikiSetup = (shiki: ShikiContext) => Awaitable<ShikiSetupReturn | void>;
|
|
631
712
|
type KatexSetup = () => Awaitable<Partial<KatexOptions> | void>;
|
|
632
713
|
type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | void>;
|
|
714
|
+
type TransformersSetup = () => Awaitable<Partial<TransformersSetupReturn>>;
|
|
633
715
|
type PreparserSetup = (context: {
|
|
634
716
|
filepath: string;
|
|
635
717
|
headmatter: Record<string, unknown>;
|
|
636
718
|
mode?: string;
|
|
637
|
-
}) => SlidevPreparserExtension[]
|
|
719
|
+
}) => Awaitable<SlidevPreparserExtension[]>;
|
|
638
720
|
type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn | void>;
|
|
639
721
|
type AppSetup = (context: AppContext) => Awaitable<void>;
|
|
640
722
|
type RootSetup = () => Awaitable<void>;
|
|
@@ -652,6 +734,7 @@ declare const defineRoutesSetup: (fn: RoutesSetup) => RoutesSetup;
|
|
|
652
734
|
declare const defineMermaidSetup: (fn: MermaidSetup) => MermaidSetup;
|
|
653
735
|
declare const defineKatexSetup: (fn: KatexSetup) => KatexSetup;
|
|
654
736
|
declare const defineShortcutsSetup: (fn: ShortcutsSetup) => ShortcutsSetup;
|
|
737
|
+
declare const defineTransformersSetup: (fn: TransformersSetup) => TransformersSetup;
|
|
655
738
|
declare const definePreparserSetup: (fn: PreparserSetup) => PreparserSetup;
|
|
656
739
|
declare const defineCodeRunnersSetup: (fn: CodeRunnersSetup) => CodeRunnersSetup;
|
|
657
740
|
declare const defineContextMenuSetup: (fn: ContextMenuSetup) => ContextMenuSetup;
|
|
@@ -683,58 +766,6 @@ declare module 'vite' {
|
|
|
683
766
|
}
|
|
684
767
|
}
|
|
685
768
|
|
|
686
|
-
interface RootsInfo {
|
|
687
|
-
cliRoot: string;
|
|
688
|
-
clientRoot: string;
|
|
689
|
-
userRoot: string;
|
|
690
|
-
userPkgJson: Record<string, any>;
|
|
691
|
-
userWorkspaceRoot: string;
|
|
692
|
-
}
|
|
693
|
-
interface SlidevEntryOptions {
|
|
694
|
-
/**
|
|
695
|
-
* Markdown entry
|
|
696
|
-
*/
|
|
697
|
-
entry: string;
|
|
698
|
-
/**
|
|
699
|
-
* Theme id
|
|
700
|
-
*/
|
|
701
|
-
theme?: string;
|
|
702
|
-
/**
|
|
703
|
-
* Remote password
|
|
704
|
-
*/
|
|
705
|
-
remote?: string;
|
|
706
|
-
/**
|
|
707
|
-
* Enable inspect plugin
|
|
708
|
-
*/
|
|
709
|
-
inspect?: boolean;
|
|
710
|
-
}
|
|
711
|
-
interface ResolvedSlidevOptions extends RootsInfo {
|
|
712
|
-
data: SlidevData;
|
|
713
|
-
entry: string;
|
|
714
|
-
themeRaw: string;
|
|
715
|
-
theme: string;
|
|
716
|
-
themeRoots: string[];
|
|
717
|
-
addonRoots: string[];
|
|
718
|
-
/**
|
|
719
|
-
* =`[...themeRoots, ...addonRoots, userRoot]` (`clientRoot` excluded)
|
|
720
|
-
*/
|
|
721
|
-
roots: string[];
|
|
722
|
-
mode: 'dev' | 'build' | 'export';
|
|
723
|
-
remote?: string;
|
|
724
|
-
inspect?: boolean;
|
|
725
|
-
utils: ResolvedSlidevUtils;
|
|
726
|
-
}
|
|
727
|
-
interface ResolvedSlidevUtils {
|
|
728
|
-
isMonacoTypesIgnored: (pkg: string) => boolean;
|
|
729
|
-
getLayouts: () => Promise<Record<string, string>>;
|
|
730
|
-
}
|
|
731
|
-
interface SlidevServerOptions {
|
|
732
|
-
/**
|
|
733
|
-
* @returns `false` if server should be restarted
|
|
734
|
-
*/
|
|
735
|
-
loadData?: () => Promise<SlidevData | false>;
|
|
736
|
-
}
|
|
737
|
-
|
|
738
769
|
interface SlidevPluginOptions {
|
|
739
770
|
vue?: ArgumentsType<typeof Vue>[0];
|
|
740
771
|
vuejsx?: ArgumentsType<typeof VueJsx>[0];
|
|
@@ -744,6 +775,8 @@ interface SlidevPluginOptions {
|
|
|
744
775
|
remoteAssets?: ArgumentsType<typeof RemoteAssets>[0];
|
|
745
776
|
serverRef?: ArgumentsType<typeof ServerRef>[0];
|
|
746
777
|
unocss?: VitePluginConfig;
|
|
778
|
+
staticCopy?: ViteStaticCopyOptions;
|
|
779
|
+
inspect?: Options;
|
|
747
780
|
}
|
|
748
781
|
declare module 'vite' {
|
|
749
782
|
interface UserConfig {
|
|
@@ -756,13 +789,6 @@ declare module 'vite' {
|
|
|
756
789
|
}
|
|
757
790
|
}
|
|
758
791
|
|
|
759
|
-
interface MarkdownTransformContext {
|
|
760
|
-
s: MagicString;
|
|
761
|
-
id: string;
|
|
762
|
-
options: ResolvedSlidevOptions;
|
|
763
|
-
}
|
|
764
|
-
type MarkdownTransformer = (ctx: MarkdownTransformContext) => void;
|
|
765
|
-
|
|
766
792
|
type RawSingleAtValue = null | undefined | boolean | string | number;
|
|
767
793
|
type RawRangeAtValue = null | undefined | false | [string | number, string | number];
|
|
768
794
|
type RawAtValue = RawSingleAtValue | RawRangeAtValue;
|
|
@@ -816,4 +842,4 @@ interface ClicksContext {
|
|
|
816
842
|
readonly total: number;
|
|
817
843
|
}
|
|
818
844
|
|
|
819
|
-
export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type CodeRunner, type CodeRunnerContext, type CodeRunnerOutput, type CodeRunnerOutputDom, type CodeRunnerOutputError, type CodeRunnerOutputHtml, type CodeRunnerOutputText, type CodeRunnerOutputTextArray, type CodeRunnerOutputs, type CodeRunnerProviders, type CodeRunnersSetup, type CommonArgs, type ContextMenuItem, type ContextMenuSetup, type DrawingsOptions, type ExportArgs, type FontOptions, type FrontmatterStyle, type KatexSetup, type LoadedSnippets, type MarkdownTransformContext, type MarkdownTransformer, type MermaidSetup, type MonacoSetup, type MonacoSetupReturn, type NavOperations, type NormalizedAtValue, type NormalizedRangeClickValue, type NormalizedSingleClickValue, type PreparserExtensionLoader, type PreparserSetup, type RawAtValue, type RawRangeAtValue, type RawSingleAtValue, type RenderContext, type ResolvedDrawingsOptions, type ResolvedExportOptions, type ResolvedFontOptions, type ResolvedSlidevOptions, type ResolvedSlidevUtils, type RootSetup, type RootsInfo, type RoutesSetup, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlideRoute, type SlidevConfig, type SlidevData, type SlidevDetectedFeatures, type SlidevEntryOptions, type SlidevMarkdown, type SlidevPluginOptions, type SlidevPreparserExtension, type SlidevServerOptions, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type UnoSetup, defineAppSetup, defineCodeRunnersSetup, defineContextMenuSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineRootSetup, defineRoutesSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup };
|
|
845
|
+
export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type CodeRunner, type CodeRunnerContext, type CodeRunnerOutput, type CodeRunnerOutputDom, type CodeRunnerOutputError, type CodeRunnerOutputHtml, type CodeRunnerOutputText, type CodeRunnerOutputTextArray, type CodeRunnerOutputs, type CodeRunnerProviders, type CodeRunnersSetup, type CommonArgs, type ContextMenuItem, type ContextMenuSetup, type DrawingsOptions, type ExportArgs, type FontOptions, type FrontmatterStyle, type Headmatter, type KatexSetup, type LoadedSnippets, type MarkdownTransformContext, type MarkdownTransformer, type MermaidSetup, type MonacoSetup, type MonacoSetupReturn, type NavOperations, type NormalizedAtValue, type NormalizedRangeClickValue, type NormalizedSingleClickValue, type PreparserExtensionLoader, type PreparserSetup, type RawAtValue, type RawRangeAtValue, type RawSingleAtValue, type RenderContext, type ResolvedDrawingsOptions, type ResolvedExportOptions, type ResolvedFontOptions, type ResolvedSlidevOptions, type ResolvedSlidevUtils, type RootSetup, type RootsInfo, type RoutesSetup, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlideRoute, type SlidevConfig, type SlidevData, type SlidevDetectedFeatures, type SlidevEntryOptions, type SlidevMarkdown, type SlidevPluginOptions, type SlidevPreparserExtension, type SlidevServerOptions, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type TransformersSetup, type TransformersSetupReturn, type UnoSetup, defineAppSetup, defineCodeRunnersSetup, defineContextMenuSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineRootSetup, defineRoutesSetup, defineShikiSetup, defineShortcutsSetup, defineTransformersSetup, defineUnoSetup };
|
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ var defineRoutesSetup = defineSetup;
|
|
|
11
11
|
var defineMermaidSetup = defineSetup;
|
|
12
12
|
var defineKatexSetup = defineSetup;
|
|
13
13
|
var defineShortcutsSetup = defineSetup;
|
|
14
|
+
var defineTransformersSetup = defineSetup;
|
|
14
15
|
var definePreparserSetup = defineSetup;
|
|
15
16
|
var defineCodeRunnersSetup = defineSetup;
|
|
16
17
|
var defineContextMenuSetup = defineSetup;
|
|
@@ -26,5 +27,6 @@ export {
|
|
|
26
27
|
defineRoutesSetup,
|
|
27
28
|
defineShikiSetup,
|
|
28
29
|
defineShortcutsSetup,
|
|
30
|
+
defineTransformersSetup,
|
|
29
31
|
defineUnoSetup
|
|
30
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/types",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.18",
|
|
4
4
|
"description": "Shared types declarations for Slidev",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,18 +24,21 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@antfu/utils": "^0.7.10",
|
|
27
|
+
"@shikijs/markdown-it": "^1.10.3",
|
|
27
28
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
28
29
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
29
30
|
"katex": "^0.16.11",
|
|
30
31
|
"mermaid": "^10.9.1",
|
|
31
32
|
"monaco-editor": "^0.50.0",
|
|
32
33
|
"shiki": "^1.10.3",
|
|
33
|
-
"unocss": "^0.61.
|
|
34
|
+
"unocss": "^0.61.5",
|
|
34
35
|
"unplugin-icons": "^0.19.0",
|
|
35
36
|
"unplugin-vue-markdown": "^0.26.2",
|
|
37
|
+
"vite-plugin-inspect": "^0.8.5",
|
|
36
38
|
"vite-plugin-remote-assets": "^0.5.0",
|
|
39
|
+
"vite-plugin-static-copy": "^1.0.6",
|
|
37
40
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
38
|
-
"vue": "^3.4.
|
|
41
|
+
"vue": "^3.4.33",
|
|
39
42
|
"vue-router": "^4.4.0"
|
|
40
43
|
},
|
|
41
44
|
"scripts": {
|