@slidev/types 0.48.0-beta.15 → 0.48.0-beta.16
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/client.d.ts +11 -0
- package/dist/index.d.mts +16 -5
- package/package.json +1 -1
package/client.d.ts
CHANGED
|
@@ -44,6 +44,17 @@ declare module '#slidev/custom-nav-controls' {
|
|
|
44
44
|
export default component
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
declare module '#slidev/shiki' {
|
|
48
|
+
import type { ShikiHighlighterCore } from 'shiki/core'
|
|
49
|
+
import type { BundledLanguage, BundledTheme } from 'shiki'
|
|
50
|
+
|
|
51
|
+
export { shikiToMonaco } from '@shikijs/monaco'
|
|
52
|
+
|
|
53
|
+
export const langs: BundledLanguage[]
|
|
54
|
+
export const themes: BundledTheme | Record<string, BundledTheme>
|
|
55
|
+
export const shiki: Promise<ShikiHighlighterCore>
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
declare module '#slidev/styles' {
|
|
48
59
|
// side-effects only
|
|
49
60
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -67,6 +67,21 @@ interface SlidevConfig {
|
|
|
67
67
|
* @default 'dev'
|
|
68
68
|
*/
|
|
69
69
|
monaco: boolean | 'dev' | 'build';
|
|
70
|
+
/**
|
|
71
|
+
* Where to load monaco types from
|
|
72
|
+
*
|
|
73
|
+
* - `cdn` - load from CDN with `@typescript/ata`
|
|
74
|
+
* - `local` - load from local node_modules
|
|
75
|
+
*
|
|
76
|
+
* @default 'local'
|
|
77
|
+
*/
|
|
78
|
+
monacoTypesSource: 'cdn' | 'local' | 'none';
|
|
79
|
+
/**
|
|
80
|
+
* Additional node packages to load as monaco types
|
|
81
|
+
*
|
|
82
|
+
* @default []
|
|
83
|
+
*/
|
|
84
|
+
monacoTypesAdditionalPackages: string[];
|
|
70
85
|
/**
|
|
71
86
|
* Show a download button in the SPA build,
|
|
72
87
|
* could also be a link to custom pdf
|
|
@@ -482,10 +497,6 @@ interface AppContext {
|
|
|
482
497
|
router: Router;
|
|
483
498
|
}
|
|
484
499
|
interface MonacoSetupReturn {
|
|
485
|
-
theme?: {
|
|
486
|
-
light?: string;
|
|
487
|
-
dark?: string;
|
|
488
|
-
};
|
|
489
500
|
editorOptions?: monaco.editor.IEditorOptions;
|
|
490
501
|
}
|
|
491
502
|
type MermaidOptions = (typeof mermaid.initialize) extends (a: infer A) => any ? A : never;
|
|
@@ -524,7 +535,7 @@ type ShikiSetup = (shiki: ShikiContext) => Awaitable<ShikiSetupReturn | void>;
|
|
|
524
535
|
type KatexSetup = () => Awaitable<Partial<KatexOptions> | void>;
|
|
525
536
|
type UnoSetup = () => Awaitable<Partial<VitePluginConfig> | void>;
|
|
526
537
|
type PreparserSetup = (filepath: string) => SlidevPreparserExtension;
|
|
527
|
-
type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn>;
|
|
538
|
+
type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn | void>;
|
|
528
539
|
type AppSetup = (context: AppContext) => Awaitable<void>;
|
|
529
540
|
type MermaidSetup = () => Partial<MermaidOptions> | void;
|
|
530
541
|
type ShortcutsSetup = (nav: NavOperations, defaultShortcuts: ShortcutOptions[]) => Array<ShortcutOptions>;
|