@slidev/types 0.22.5 → 0.23.1
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 +116 -88
- package/package.json +28 -28
package/dist/index.d.ts
CHANGED
|
@@ -8,93 +8,6 @@ import mermaid from 'mermaid';
|
|
|
8
8
|
import { KatexOptions } from 'katex';
|
|
9
9
|
import { WindiCssOptions } from 'vite-plugin-windicss';
|
|
10
10
|
|
|
11
|
-
interface SlideInfoBase {
|
|
12
|
-
raw: string;
|
|
13
|
-
content: string;
|
|
14
|
-
note?: string;
|
|
15
|
-
frontmatter: Record<string, any>;
|
|
16
|
-
title?: string;
|
|
17
|
-
}
|
|
18
|
-
interface SlideInfo extends SlideInfoBase {
|
|
19
|
-
index: number;
|
|
20
|
-
start: number;
|
|
21
|
-
end: number;
|
|
22
|
-
inline?: SlideInfoBase;
|
|
23
|
-
source?: SlideInfoWithPath;
|
|
24
|
-
}
|
|
25
|
-
interface SlideInfoWithPath extends SlideInfoBase {
|
|
26
|
-
filepath: string;
|
|
27
|
-
}
|
|
28
|
-
interface SlideInfoExtended extends SlideInfo {
|
|
29
|
-
notesHTML: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Metadata for "slidev" field in themes' package.json
|
|
33
|
-
*/
|
|
34
|
-
interface SlidevThemeMeta {
|
|
35
|
-
defaults?: Partial<SlidevConfig>;
|
|
36
|
-
colorSchema?: 'dark' | 'light' | 'both';
|
|
37
|
-
highlighter?: 'prism' | 'shiki' | 'both';
|
|
38
|
-
}
|
|
39
|
-
declare type SlidevThemeConfig = Record<string, string | number>;
|
|
40
|
-
declare type FontOptions = {
|
|
41
|
-
/**
|
|
42
|
-
* Sans serif fonts (default fonts for most text)
|
|
43
|
-
*/
|
|
44
|
-
sans?: string | string[];
|
|
45
|
-
/**
|
|
46
|
-
* Serif fonts
|
|
47
|
-
*/
|
|
48
|
-
serif?: string | string[];
|
|
49
|
-
/**
|
|
50
|
-
* Monospace fonts, for code blocks and etc.
|
|
51
|
-
*/
|
|
52
|
-
mono?: string | string[];
|
|
53
|
-
/**
|
|
54
|
-
* Load webfonts for custom CSS (does not apply anywhere by default)
|
|
55
|
-
*/
|
|
56
|
-
custom?: string | string[];
|
|
57
|
-
/**
|
|
58
|
-
* Weights for fonts
|
|
59
|
-
*
|
|
60
|
-
* @default [200, 400, 600]
|
|
61
|
-
*/
|
|
62
|
-
weights?: string | (string | number)[];
|
|
63
|
-
/**
|
|
64
|
-
* Import italic fonts
|
|
65
|
-
*
|
|
66
|
-
* @default false
|
|
67
|
-
*/
|
|
68
|
-
italic?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* @default 'google'
|
|
71
|
-
*/
|
|
72
|
-
provider?: 'none' | 'google';
|
|
73
|
-
/**
|
|
74
|
-
* Specify web fonts names, will detect from `sans`, `mono`, `serif` if not provided
|
|
75
|
-
*/
|
|
76
|
-
webfonts?: string[];
|
|
77
|
-
/**
|
|
78
|
-
* Specify local fonts names, be excluded from webfonts
|
|
79
|
-
*/
|
|
80
|
-
local?: string[];
|
|
81
|
-
/**
|
|
82
|
-
* Use fonts fallback
|
|
83
|
-
*
|
|
84
|
-
* @default true
|
|
85
|
-
*/
|
|
86
|
-
fallbacks?: boolean;
|
|
87
|
-
};
|
|
88
|
-
declare type ResolvedFontOptions = {
|
|
89
|
-
sans: string[];
|
|
90
|
-
mono: string[];
|
|
91
|
-
serif: string[];
|
|
92
|
-
weights: string[];
|
|
93
|
-
italic: boolean;
|
|
94
|
-
provider: 'none' | 'google';
|
|
95
|
-
webfonts: string[];
|
|
96
|
-
local: string[];
|
|
97
|
-
};
|
|
98
11
|
interface SlidevConfig {
|
|
99
12
|
title: string;
|
|
100
13
|
/**
|
|
@@ -141,6 +54,12 @@ interface SlidevConfig {
|
|
|
141
54
|
* @default prism
|
|
142
55
|
*/
|
|
143
56
|
highlighter: 'prism' | 'shiki';
|
|
57
|
+
/**
|
|
58
|
+
* Show line numbers in code blocks
|
|
59
|
+
*
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
lineNumbers: boolean;
|
|
144
63
|
/**
|
|
145
64
|
* Force slides color schema
|
|
146
65
|
*
|
|
@@ -189,7 +108,116 @@ interface SlidevConfig {
|
|
|
189
108
|
* @default {}
|
|
190
109
|
*/
|
|
191
110
|
fonts: ResolvedFontOptions;
|
|
111
|
+
/**
|
|
112
|
+
* Options for drawings
|
|
113
|
+
*/
|
|
114
|
+
drawings: ResolvedDrawingsOptions;
|
|
115
|
+
}
|
|
116
|
+
interface FontOptions {
|
|
117
|
+
/**
|
|
118
|
+
* Sans serif fonts (default fonts for most text)
|
|
119
|
+
*/
|
|
120
|
+
sans?: string | string[];
|
|
121
|
+
/**
|
|
122
|
+
* Serif fonts
|
|
123
|
+
*/
|
|
124
|
+
serif?: string | string[];
|
|
125
|
+
/**
|
|
126
|
+
* Monospace fonts, for code blocks and etc.
|
|
127
|
+
*/
|
|
128
|
+
mono?: string | string[];
|
|
129
|
+
/**
|
|
130
|
+
* Load webfonts for custom CSS (does not apply anywhere by default)
|
|
131
|
+
*/
|
|
132
|
+
custom?: string | string[];
|
|
133
|
+
/**
|
|
134
|
+
* Weights for fonts
|
|
135
|
+
*
|
|
136
|
+
* @default [200, 400, 600]
|
|
137
|
+
*/
|
|
138
|
+
weights?: string | (string | number)[];
|
|
139
|
+
/**
|
|
140
|
+
* Import italic fonts
|
|
141
|
+
*
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
italic?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* @default 'google'
|
|
147
|
+
*/
|
|
148
|
+
provider?: 'none' | 'google';
|
|
149
|
+
/**
|
|
150
|
+
* Specify web fonts names, will detect from `sans`, `mono`, `serif` if not provided
|
|
151
|
+
*/
|
|
152
|
+
webfonts?: string[];
|
|
153
|
+
/**
|
|
154
|
+
* Specify local fonts names, be excluded from webfonts
|
|
155
|
+
*/
|
|
156
|
+
local?: string[];
|
|
157
|
+
/**
|
|
158
|
+
* Use fonts fallback
|
|
159
|
+
*
|
|
160
|
+
* @default true
|
|
161
|
+
*/
|
|
162
|
+
fallbacks?: boolean;
|
|
163
|
+
}
|
|
164
|
+
interface DrawingsOptions {
|
|
165
|
+
/**
|
|
166
|
+
* Persist the drawings to disk
|
|
167
|
+
* Passing string to specify the directory (default to `.slidev/drawings`)
|
|
168
|
+
*
|
|
169
|
+
* @default false
|
|
170
|
+
*/
|
|
171
|
+
persist?: boolean | string;
|
|
172
|
+
/**
|
|
173
|
+
* @defult true
|
|
174
|
+
*/
|
|
175
|
+
enabled?: boolean | 'dev' | 'build';
|
|
176
|
+
}
|
|
177
|
+
interface ResolvedFontOptions {
|
|
178
|
+
sans: string[];
|
|
179
|
+
mono: string[];
|
|
180
|
+
serif: string[];
|
|
181
|
+
weights: string[];
|
|
182
|
+
italic: boolean;
|
|
183
|
+
provider: 'none' | 'google';
|
|
184
|
+
webfonts: string[];
|
|
185
|
+
local: string[];
|
|
186
|
+
}
|
|
187
|
+
interface ResolvedDrawingsOptions {
|
|
188
|
+
persist: string | false;
|
|
189
|
+
enabled: boolean | 'dev' | 'build';
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
interface SlideInfoBase {
|
|
193
|
+
raw: string;
|
|
194
|
+
content: string;
|
|
195
|
+
note?: string;
|
|
196
|
+
frontmatter: Record<string, any>;
|
|
197
|
+
title?: string;
|
|
198
|
+
}
|
|
199
|
+
interface SlideInfo extends SlideInfoBase {
|
|
200
|
+
index: number;
|
|
201
|
+
start: number;
|
|
202
|
+
end: number;
|
|
203
|
+
inline?: SlideInfoBase;
|
|
204
|
+
source?: SlideInfoWithPath;
|
|
205
|
+
}
|
|
206
|
+
interface SlideInfoWithPath extends SlideInfoBase {
|
|
207
|
+
filepath: string;
|
|
192
208
|
}
|
|
209
|
+
interface SlideInfoExtended extends SlideInfo {
|
|
210
|
+
notesHTML: string;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Metadata for "slidev" field in themes' package.json
|
|
214
|
+
*/
|
|
215
|
+
interface SlidevThemeMeta {
|
|
216
|
+
defaults?: Partial<SlidevConfig>;
|
|
217
|
+
colorSchema?: 'dark' | 'light' | 'both';
|
|
218
|
+
highlighter?: 'prism' | 'shiki' | 'both';
|
|
219
|
+
}
|
|
220
|
+
declare type SlidevThemeConfig = Record<string, string | number>;
|
|
193
221
|
interface SlidevFeatureFlags {
|
|
194
222
|
katex: boolean;
|
|
195
223
|
monaco: boolean;
|
|
@@ -258,4 +286,4 @@ declare function defineMermaidSetup(fn: MermaidSetup): MermaidSetup;
|
|
|
258
286
|
declare function defineKatexSetup(fn: KatexSetup): KatexSetup;
|
|
259
287
|
declare function defineShortcutsSetup(fn: ShortcutsSetup): ShortcutsSetup;
|
|
260
288
|
|
|
261
|
-
export { AppContext, AppSetup, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevThemeConfig, SlidevThemeMeta, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, defineShikiSetup, defineShortcutsSetup, defineWindiSetup };
|
|
289
|
+
export { AppContext, AppSetup, DrawingsOptions, FontOptions, KatexSetup, MermaidOptions, MermaidSetup, MonacoSetup, MonacoSetupReturn, NavOperations, ResolvedDrawingsOptions, ResolvedFontOptions, ShikiDarkModeThemes, ShikiOptions, ShikiSetup, ShortcutOptions, ShortcutsSetup, SlideInfo, SlideInfoBase, SlideInfoExtended, SlideInfoWithPath, SlidevConfig, SlidevFeatureFlags, SlidevMarkdown, SlidevThemeConfig, SlidevThemeMeta, WindiSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, defineShikiSetup, defineShortcutsSetup, defineWindiSetup };
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
2
|
+
"name": "@slidev/types",
|
|
3
|
+
"version": "0.23.1",
|
|
4
|
+
"description": "Shared types declerations for Slidev",
|
|
5
|
+
"homepage": "https://sli.dev",
|
|
6
|
+
"bugs": "https://github.com/slidevjs/slidev/issues",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/slidevjs/slidev"
|
|
11
|
+
},
|
|
12
|
+
"funding": "https://github.com/sponsors/antfu",
|
|
13
|
+
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"client.d.ts",
|
|
17
|
+
"index.d.ts"
|
|
18
|
+
],
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"module": "dist/index.mjs",
|
|
21
|
+
"types": "index.d.ts",
|
|
22
|
+
"engines": {
|
|
23
|
+
"node": ">=14.0.0"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "pnpx tsup src/index.ts --format cjs,esm --dts",
|
|
27
|
+
"dev": "nr build --watch"
|
|
28
|
+
}
|
|
29
|
+
}
|