@slidev/types 0.49.16 → 0.49.17
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 +15 -9
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { RouteMeta, RouteComponent, Router, RouteRecordRaw } from 'vue-router';
|
|
2
2
|
import YAML from 'yaml';
|
|
3
|
-
import { TransitionGroupProps,
|
|
3
|
+
import { TransitionGroupProps, Component, MaybeRefOrGetter, App, Ref, ComputedRef } from 'vue';
|
|
4
4
|
import { Arrayable, Awaitable, ArgumentsType } from '@antfu/utils';
|
|
5
5
|
import * as monaco from 'monaco-editor';
|
|
6
|
-
import mermaid from 'mermaid';
|
|
7
6
|
import { KatexOptions } from 'katex';
|
|
8
7
|
import { CodeToHastOptions, CodeToHastOptionsCommon, BuiltinLanguage, CodeOptionsThemes, BuiltinTheme, CodeOptionsMeta, Highlighter, LanguageInput } from 'shiki';
|
|
9
8
|
import { VitePluginConfig } from 'unocss/vite';
|
|
9
|
+
import { MermaidConfig } from 'mermaid';
|
|
10
10
|
import Vue from '@vitejs/plugin-vue';
|
|
11
11
|
import VueJsx from '@vitejs/plugin-vue-jsx';
|
|
12
12
|
import Icons from 'unplugin-icons/vite';
|
|
@@ -132,7 +132,7 @@ interface SlidevConfig {
|
|
|
132
132
|
/**
|
|
133
133
|
* Prefer highlighter
|
|
134
134
|
*
|
|
135
|
-
* @see https://sli.dev/custom/
|
|
135
|
+
* @see https://sli.dev/custom/config-highlighter.html
|
|
136
136
|
* @default shiki
|
|
137
137
|
*/
|
|
138
138
|
highlighter: 'shiki' | 'prism';
|
|
@@ -507,9 +507,16 @@ type RenderContext = 'none' | 'slide' | 'overview' | 'presenter' | 'previewNext'
|
|
|
507
507
|
interface SlideRoute {
|
|
508
508
|
no: number;
|
|
509
509
|
meta: RouteMeta & Required<Pick<RouteMeta, 'slide'>>;
|
|
510
|
-
|
|
510
|
+
/**
|
|
511
|
+
* load the slide component itself
|
|
512
|
+
*/
|
|
513
|
+
load: () => Promise<{
|
|
511
514
|
default: RouteComponent;
|
|
512
515
|
}>;
|
|
516
|
+
/**
|
|
517
|
+
* Wrapped async component
|
|
518
|
+
*/
|
|
519
|
+
component: Component;
|
|
513
520
|
}
|
|
514
521
|
type LoadedSnippets = Record<string, string>;
|
|
515
522
|
|
|
@@ -588,7 +595,6 @@ interface AppContext {
|
|
|
588
595
|
interface MonacoSetupReturn {
|
|
589
596
|
editorOptions?: monaco.editor.IEditorOptions;
|
|
590
597
|
}
|
|
591
|
-
type MermaidOptions = (typeof mermaid.initialize) extends (a: infer A) => any ? A : never;
|
|
592
598
|
interface NavOperations {
|
|
593
599
|
next: () => void;
|
|
594
600
|
prev: () => Promise<void>;
|
|
@@ -633,7 +639,7 @@ type MonacoSetup = (m: typeof monaco) => Awaitable<MonacoSetupReturn | void>;
|
|
|
633
639
|
type AppSetup = (context: AppContext) => Awaitable<void>;
|
|
634
640
|
type RootSetup = () => Awaitable<void>;
|
|
635
641
|
type RoutesSetup = (routes: RouteRecordRaw[]) => RouteRecordRaw[];
|
|
636
|
-
type MermaidSetup = () => Partial<
|
|
642
|
+
type MermaidSetup = () => Awaitable<Partial<MermaidConfig> | void>;
|
|
637
643
|
type ShortcutsSetup = (nav: NavOperations, defaultShortcuts: ShortcutOptions[]) => Array<ShortcutOptions>;
|
|
638
644
|
type CodeRunnersSetup = (runners: CodeRunnerProviders) => Awaitable<CodeRunnerProviders | void>;
|
|
639
645
|
type ContextMenuSetup = (items: ComputedRef<ContextMenuItem[]>) => ComputedRef<ContextMenuItem[]>;
|
|
@@ -720,6 +726,7 @@ interface ResolvedSlidevOptions extends RootsInfo {
|
|
|
720
726
|
}
|
|
721
727
|
interface ResolvedSlidevUtils {
|
|
722
728
|
isMonacoTypesIgnored: (pkg: string) => boolean;
|
|
729
|
+
getLayouts: () => Promise<Record<string, string>>;
|
|
723
730
|
}
|
|
724
731
|
interface SlidevServerOptions {
|
|
725
732
|
/**
|
|
@@ -804,10 +811,9 @@ interface ClicksContext {
|
|
|
804
811
|
register: (el: ClicksElement, info: Pick<ClicksInfo, 'delta' | 'max'> | null) => void;
|
|
805
812
|
unregister: (el: ClicksElement) => void;
|
|
806
813
|
readonly isMounted: boolean;
|
|
807
|
-
|
|
808
|
-
onUnmounted: () => void;
|
|
814
|
+
setup: () => void;
|
|
809
815
|
readonly currentOffset: number;
|
|
810
816
|
readonly total: number;
|
|
811
817
|
}
|
|
812
818
|
|
|
813
|
-
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
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/types",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.17",
|
|
4
4
|
"description": "Shared types declarations for Slidev",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"@antfu/utils": "^0.7.10",
|
|
27
27
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
28
28
|
"@vitejs/plugin-vue-jsx": "^4.0.0",
|
|
29
|
-
"katex": "^0.16.
|
|
29
|
+
"katex": "^0.16.11",
|
|
30
30
|
"mermaid": "^10.9.1",
|
|
31
31
|
"monaco-editor": "^0.50.0",
|
|
32
|
-
"shiki": "^1.10.
|
|
33
|
-
"unocss": "^0.61.
|
|
32
|
+
"shiki": "^1.10.3",
|
|
33
|
+
"unocss": "^0.61.3",
|
|
34
34
|
"unplugin-icons": "^0.19.0",
|
|
35
35
|
"unplugin-vue-markdown": "^0.26.2",
|
|
36
|
-
"vite-plugin-remote-assets": "^0.
|
|
36
|
+
"vite-plugin-remote-assets": "^0.5.0",
|
|
37
37
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
38
|
-
"vue": "^3.4.
|
|
38
|
+
"vue": "^3.4.32",
|
|
39
39
|
"vue-router": "^4.4.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|