@slidev/types 0.33.1 → 0.34.2
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 +19 -2
- package/dist/index.js +5 -1
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ 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
|
+
import { VitePluginConfig } from 'unocss/vite';
|
|
10
11
|
|
|
11
12
|
interface SlidevConfig {
|
|
12
13
|
title: string;
|
|
@@ -33,7 +34,7 @@ interface SlidevConfig {
|
|
|
33
34
|
/**
|
|
34
35
|
* Download remote assets in local using vite-plugin-remote-assets
|
|
35
36
|
*
|
|
36
|
-
* @default
|
|
37
|
+
* @default false
|
|
37
38
|
*/
|
|
38
39
|
remoteAssets: boolean | 'dev' | 'build';
|
|
39
40
|
/**
|
|
@@ -50,6 +51,12 @@ interface SlidevConfig {
|
|
|
50
51
|
* @default false
|
|
51
52
|
*/
|
|
52
53
|
download: boolean | string;
|
|
54
|
+
/**
|
|
55
|
+
* Show a copy button in code blocks
|
|
56
|
+
*
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
codeCopy: boolean;
|
|
53
60
|
/**
|
|
54
61
|
* Information shows on the built SPA
|
|
55
62
|
* Can be a markdown string
|
|
@@ -157,6 +164,14 @@ interface SlidevConfig {
|
|
|
157
164
|
* @default false
|
|
158
165
|
*/
|
|
159
166
|
remote?: string | boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Engine for atomic CSS
|
|
169
|
+
*
|
|
170
|
+
* UnoCSS support is currently experimental.
|
|
171
|
+
*
|
|
172
|
+
* @default 'windicss'
|
|
173
|
+
*/
|
|
174
|
+
css: 'windicss' | 'unocss';
|
|
160
175
|
}
|
|
161
176
|
interface FontOptions {
|
|
162
177
|
/**
|
|
@@ -337,16 +352,18 @@ interface ShortcutOptions {
|
|
|
337
352
|
declare type ShikiSetup = (shiki: typeof Shiki) => Awaitable<ShikiOptions | undefined>;
|
|
338
353
|
declare type KatexSetup = () => Awaitable<Partial<KatexOptions> | undefined>;
|
|
339
354
|
declare type WindiSetup = () => Awaitable<Partial<WindiCssOptions> | undefined>;
|
|
355
|
+
declare type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | undefined>;
|
|
340
356
|
declare type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn>;
|
|
341
357
|
declare type AppSetup = (context: AppContext) => Awaitable<void>;
|
|
342
358
|
declare type MermaidSetup = () => Partial<MermaidOptions> | undefined;
|
|
343
359
|
declare type ShortcutsSetup = (nav: NavOperations) => Array<ShortcutOptions>;
|
|
344
360
|
declare function defineShikiSetup(fn: ShikiSetup): ShikiSetup;
|
|
345
361
|
declare function defineWindiSetup(fn: WindiSetup): WindiSetup;
|
|
362
|
+
declare function defineUnoSetup(fn: UnoSetup): UnoSetup;
|
|
346
363
|
declare function defineMonacoSetup(fn: MonacoSetup): MonacoSetup;
|
|
347
364
|
declare function defineAppSetup(fn: AppSetup): AppSetup;
|
|
348
365
|
declare function defineMermaidSetup(fn: MermaidSetup): MermaidSetup;
|
|
349
366
|
declare function defineKatexSetup(fn: KatexSetup): KatexSetup;
|
|
350
367
|
declare function defineShortcutsSetup(fn: ShortcutsSetup): ShortcutsSetup;
|
|
351
368
|
|
|
352
|
-
export { AppContext, AppSetup, DrawingsOptions, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, RenderContext, ResolvedDrawingsOptions, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevThemeConfig, SlidevThemeMeta, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, defineShikiSetup, defineShortcutsSetup, defineWindiSetup };
|
|
369
|
+
export { AppContext, AppSetup, DrawingsOptions, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, RenderContext, ResolvedDrawingsOptions, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevThemeConfig, SlidevThemeMeta, UnoSetup, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup, defineWindiSetup };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@ function defineShikiSetup(fn) {
|
|
|
5
5
|
function defineWindiSetup(fn) {
|
|
6
6
|
return fn;
|
|
7
7
|
}
|
|
8
|
+
function defineUnoSetup(fn) {
|
|
9
|
+
return fn;
|
|
10
|
+
}
|
|
8
11
|
function defineMonacoSetup(fn) {
|
|
9
12
|
return fn;
|
|
10
13
|
}
|
|
@@ -28,4 +31,5 @@ function defineShortcutsSetup(fn) {
|
|
|
28
31
|
|
|
29
32
|
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
|
|
35
|
+
exports.defineAppSetup = defineAppSetup; exports.defineKatexSetup = defineKatexSetup; exports.defineMermaidSetup = defineMermaidSetup; exports.defineMonacoSetup = defineMonacoSetup; exports.defineShikiSetup = defineShikiSetup; exports.defineShortcutsSetup = defineShortcutsSetup; exports.defineUnoSetup = defineUnoSetup; exports.defineWindiSetup = defineWindiSetup;
|
package/dist/index.mjs
CHANGED
|
@@ -5,6 +5,9 @@ function defineShikiSetup(fn) {
|
|
|
5
5
|
function defineWindiSetup(fn) {
|
|
6
6
|
return fn;
|
|
7
7
|
}
|
|
8
|
+
function defineUnoSetup(fn) {
|
|
9
|
+
return fn;
|
|
10
|
+
}
|
|
8
11
|
function defineMonacoSetup(fn) {
|
|
9
12
|
return fn;
|
|
10
13
|
}
|
|
@@ -27,5 +30,6 @@ export {
|
|
|
27
30
|
defineMonacoSetup,
|
|
28
31
|
defineShikiSetup,
|
|
29
32
|
defineShortcutsSetup,
|
|
33
|
+
defineUnoSetup,
|
|
30
34
|
defineWindiSetup
|
|
31
35
|
};
|