@slidev/types 52.20.1 → 53.1.0
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 +1 -28
- package/dist/index.mjs +2 -4
- package/package.json +12 -12
package/dist/index.d.mts
CHANGED
|
@@ -20,7 +20,6 @@ import { ViteInspectOptions } from "vite-plugin-inspect";
|
|
|
20
20
|
import RemoteAssets from "vite-plugin-remote-assets";
|
|
21
21
|
import { ViteStaticCopyOptions } from "vite-plugin-static-copy";
|
|
22
22
|
import ServerRef from "vite-plugin-vue-server-ref";
|
|
23
|
-
//#region src/cli.d.ts
|
|
24
23
|
export interface CommonArgs {
|
|
25
24
|
entry: string;
|
|
26
25
|
theme?: string;
|
|
@@ -47,8 +46,6 @@ export interface BuildArgs extends ExportArgs {
|
|
|
47
46
|
'inspect': boolean;
|
|
48
47
|
'without-notes'?: boolean;
|
|
49
48
|
}
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/clicks.d.ts
|
|
52
49
|
export type RawSingleAtValue = null | undefined | boolean | string | number;
|
|
53
50
|
export type RawRangeAtValue = null | undefined | false | [string | number, string | number];
|
|
54
51
|
export type RawAtValue = RawSingleAtValue | RawRangeAtValue;
|
|
@@ -101,8 +98,6 @@ export interface ClicksContext {
|
|
|
101
98
|
readonly currentOffset: number;
|
|
102
99
|
readonly total: number;
|
|
103
100
|
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region src/code-runner.d.ts
|
|
106
101
|
export interface CodeRunnerContext {
|
|
107
102
|
/**
|
|
108
103
|
* Options passed to runner via the `runnerOptions` prop.
|
|
@@ -156,11 +151,7 @@ export type CodeRunnerOutput = CodeRunnerOutputHtml | CodeRunnerOutputError | Co
|
|
|
156
151
|
export type CodeRunnerOutputs = MaybeRefOrGetter<Arrayable<CodeRunnerOutput>>;
|
|
157
152
|
export type CodeRunner = (code: string, ctx: CodeRunnerContext) => Awaitable<CodeRunnerOutputs>;
|
|
158
153
|
export type CodeRunnerProviders = Record<string, CodeRunner>;
|
|
159
|
-
//#endregion
|
|
160
|
-
//#region src/builtin-layouts.d.ts
|
|
161
154
|
type BuiltinLayouts = '404' | 'center' | 'cover' | 'default' | 'end' | 'error' | 'fact' | 'full' | 'iframe-left' | 'iframe-right' | 'iframe' | 'image-left' | 'image-right' | 'image' | 'intro' | 'none' | 'quote' | 'section' | 'statement' | 'two-cols-header' | 'two-cols';
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/types.d.ts
|
|
164
155
|
export type FrontmatterStyle = 'frontmatter' | 'yaml';
|
|
165
156
|
export interface SlideInfoBase {
|
|
166
157
|
revision: string;
|
|
@@ -301,8 +292,6 @@ export interface SlideRoute {
|
|
|
301
292
|
*/
|
|
302
293
|
component: Component;
|
|
303
294
|
}
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region src/frontmatter.d.ts
|
|
306
295
|
export interface Headmatter extends HeadmatterConfig, Omit<Frontmatter, 'title' | 'transition'> {
|
|
307
296
|
/**
|
|
308
297
|
* Default frontmatter options applied to all slides
|
|
@@ -934,8 +923,6 @@ export interface SeoMeta {
|
|
|
934
923
|
twitterImage?: string;
|
|
935
924
|
twitterUrl?: string;
|
|
936
925
|
}
|
|
937
|
-
//#endregion
|
|
938
|
-
//#region src/config.d.ts
|
|
939
926
|
export interface ResolvedSlidevConfigSub {
|
|
940
927
|
export: ResolvedExportOptions;
|
|
941
928
|
drawings: ResolvedDrawingsOptions;
|
|
@@ -964,8 +951,6 @@ export interface ResolvedExportOptions extends Omit<ExportArgs, 'entry' | 'theme
|
|
|
964
951
|
executablePath?: string;
|
|
965
952
|
withToc?: boolean;
|
|
966
953
|
}
|
|
967
|
-
//#endregion
|
|
968
|
-
//#region src/context-menu.d.ts
|
|
969
954
|
type ContextMenuOption = {
|
|
970
955
|
action: () => void;
|
|
971
956
|
disabled?: boolean;
|
|
@@ -980,8 +965,6 @@ type ContextMenuOption = {
|
|
|
980
965
|
label: string;
|
|
981
966
|
});
|
|
982
967
|
export type ContextMenuItem = ContextMenuOption | 'separator';
|
|
983
|
-
//#endregion
|
|
984
|
-
//#region src/hmr.d.ts
|
|
985
968
|
declare module 'vite' {
|
|
986
969
|
interface CustomEventMap {
|
|
987
970
|
'slidev:update-slide': {
|
|
@@ -995,8 +978,6 @@ declare module 'vite' {
|
|
|
995
978
|
};
|
|
996
979
|
}
|
|
997
980
|
}
|
|
998
|
-
//#endregion
|
|
999
|
-
//#region src/options.d.ts
|
|
1000
981
|
export interface RootsInfo {
|
|
1001
982
|
cliRoot: string;
|
|
1002
983
|
clientRoot: string;
|
|
@@ -1066,8 +1047,6 @@ export interface SlidevServerOptions {
|
|
|
1066
1047
|
*/
|
|
1067
1048
|
loadData?: (loadedSource: Record<string, string>) => Promise<SlidevData | false>;
|
|
1068
1049
|
}
|
|
1069
|
-
//#endregion
|
|
1070
|
-
//#region src/transform.d.ts
|
|
1071
1050
|
export interface MarkdownTransformContext {
|
|
1072
1051
|
/**
|
|
1073
1052
|
* The magic string instance for the current markdown content
|
|
@@ -1115,8 +1094,6 @@ export interface CodeblockTransformContext {
|
|
|
1115
1094
|
export type CodeblockTransformer = (ctx: CodeblockTransformContext) => Awaitable<string | undefined | null>;
|
|
1116
1095
|
export declare const defineMarkdownTransformer: (fn: MarkdownTransformer) => MarkdownTransformer;
|
|
1117
1096
|
export declare const defineCodeblockTransformer: (fn: CodeblockTransformer) => CodeblockTransformer;
|
|
1118
|
-
//#endregion
|
|
1119
|
-
//#region src/setups.d.ts
|
|
1120
1097
|
export interface AppContext {
|
|
1121
1098
|
app: App;
|
|
1122
1099
|
router: Router;
|
|
@@ -1206,8 +1183,6 @@ export declare const definePreparserSetup: (fn: PreparserSetup) => PreparserSetu
|
|
|
1206
1183
|
export declare const defineVitePluginsSetup: (fn: VitePluginsSetup) => VitePluginsSetup;
|
|
1207
1184
|
export declare const defineCodeRunnersSetup: (fn: CodeRunnersSetup) => CodeRunnersSetup;
|
|
1208
1185
|
export declare const defineContextMenuSetup: (fn: ContextMenuSetup) => ContextMenuSetup;
|
|
1209
|
-
//#endregion
|
|
1210
|
-
//#region src/toc.d.ts
|
|
1211
1186
|
export interface TocItem {
|
|
1212
1187
|
no: number;
|
|
1213
1188
|
active?: boolean;
|
|
@@ -1220,8 +1195,6 @@ export interface TocItem {
|
|
|
1220
1195
|
hideInToc?: boolean;
|
|
1221
1196
|
title?: string;
|
|
1222
1197
|
}
|
|
1223
|
-
//#endregion
|
|
1224
|
-
//#region src/vite.d.ts
|
|
1225
1198
|
export interface SlidevPluginOptions {
|
|
1226
1199
|
vue?: ArgumentsType<typeof Vue>[0];
|
|
1227
1200
|
vuejsx?: ArgumentsType<typeof VueJsx>[0];
|
|
@@ -1244,4 +1217,4 @@ declare module 'vite' {
|
|
|
1244
1217
|
slidev?: SlidevPluginOptions;
|
|
1245
1218
|
}
|
|
1246
1219
|
}
|
|
1247
|
-
|
|
1220
|
+
export {};
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/setups.ts
|
|
2
2
|
function defineSetup$1(fn) {
|
|
3
3
|
return fn;
|
|
4
4
|
}
|
|
@@ -17,12 +17,10 @@ const definePreparserSetup = defineSetup$1;
|
|
|
17
17
|
const defineVitePluginsSetup = defineSetup$1;
|
|
18
18
|
const defineCodeRunnersSetup = defineSetup$1;
|
|
19
19
|
const defineContextMenuSetup = defineSetup$1;
|
|
20
|
-
|
|
21
|
-
//#region src/transform.ts
|
|
20
|
+
// src/transform.ts
|
|
22
21
|
function defineSetup(fn) {
|
|
23
22
|
return fn;
|
|
24
23
|
}
|
|
25
24
|
const defineMarkdownTransformer = defineSetup;
|
|
26
25
|
const defineCodeblockTransformer = defineSetup;
|
|
27
|
-
//#endregion
|
|
28
26
|
export { defineAppSetup, defineCodeRunnersSetup, defineCodeblockTransformer, defineContextMenuSetup, defineKatexSetup, defineMarkdownTransformer, defineMermaidRendererSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineRootSetup, defineRoutesSetup, defineShikiSetup, defineShortcutsSetup, defineTransformersSetup, defineUnoSetup, defineVitePluginsSetup };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/types",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "53.1.0",
|
|
4
4
|
"description": "Shared types declarations for Slidev",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,26 +20,26 @@
|
|
|
20
20
|
"index.d.ts"
|
|
21
21
|
],
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">=22.12.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@antfu/utils": "^9.3.0",
|
|
27
|
-
"@shikijs/markdown-it": "^4.
|
|
28
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
27
|
+
"@shikijs/markdown-it": "^4.6.0",
|
|
28
|
+
"@vitejs/plugin-vue": "^6.0.10",
|
|
29
29
|
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
|
30
|
-
"katex": "^0.
|
|
31
|
-
"mermaid": "^
|
|
32
|
-
"monaco-editor": "^0.
|
|
33
|
-
"shiki": "^4.
|
|
34
|
-
"unocss": "^66.
|
|
30
|
+
"katex": "^0.19.1",
|
|
31
|
+
"mermaid": "^12.3.0",
|
|
32
|
+
"monaco-editor": "^0.57.0",
|
|
33
|
+
"shiki": "^4.6.0",
|
|
34
|
+
"unocss": "^66.12.0",
|
|
35
35
|
"unplugin-icons": "^24.0.0",
|
|
36
36
|
"unplugin-vue-markdown": "^32.1.1",
|
|
37
|
-
"vite-plugin-inspect": "^12.0
|
|
37
|
+
"vite-plugin-inspect": "^12.1.0",
|
|
38
38
|
"vite-plugin-remote-assets": "^2.1.0",
|
|
39
39
|
"vite-plugin-static-copy": "^4.1.1",
|
|
40
40
|
"vite-plugin-vue-server-ref": "^1.0.0",
|
|
41
|
-
"vue": "^3.5.
|
|
42
|
-
"vue-router": "^5.
|
|
41
|
+
"vue": "^3.5.44",
|
|
42
|
+
"vue-router": "^5.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"tsdown-stale-guard": "^0.1.3"
|