@slidev/types 0.49.0-beta.4 → 0.49.0-beta.5
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 +20 -12
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -479,8 +479,10 @@ type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?
|
|
|
479
479
|
type RenderContext = 'none' | 'slide' | 'overview' | 'presenter' | 'previewNext';
|
|
480
480
|
interface SlideRoute {
|
|
481
481
|
no: number;
|
|
482
|
-
meta: RouteMeta
|
|
483
|
-
component: () => Promise<
|
|
482
|
+
meta: RouteMeta & Required<Pick<RouteMeta, 'slide'>>;
|
|
483
|
+
component: () => Promise<{
|
|
484
|
+
default: RouteComponent;
|
|
485
|
+
}>;
|
|
484
486
|
}
|
|
485
487
|
type LoadedSnippets = Record<string, string>;
|
|
486
488
|
|
|
@@ -718,10 +720,12 @@ interface MarkdownTransformContext {
|
|
|
718
720
|
}
|
|
719
721
|
type MarkdownTransformer = (ctx: MarkdownTransformContext) => void;
|
|
720
722
|
|
|
721
|
-
type
|
|
722
|
-
type
|
|
723
|
-
type
|
|
724
|
-
type
|
|
723
|
+
type RawSingleAtValue = null | undefined | boolean | string | number;
|
|
724
|
+
type RawRangeAtValue = null | undefined | false | [string | number, string | number];
|
|
725
|
+
type RawAtValue = RawSingleAtValue | RawRangeAtValue;
|
|
726
|
+
type NormalizedSingleClickValue = number | string | null;
|
|
727
|
+
type NormalizedRangeClickValue = [number, number] | [number, string] | [string, number] | [string, string] | [string | number, string | number] | null;
|
|
728
|
+
type NormalizedAtValue = NormalizedSingleClickValue | NormalizedRangeClickValue;
|
|
725
729
|
type ClicksElement = Element | string;
|
|
726
730
|
interface ClicksInfo {
|
|
727
731
|
/**
|
|
@@ -741,7 +745,11 @@ interface ClicksInfo {
|
|
|
741
745
|
*/
|
|
742
746
|
delta: number;
|
|
743
747
|
/**
|
|
744
|
-
*
|
|
748
|
+
* currentClicks - start
|
|
749
|
+
*/
|
|
750
|
+
currentOffset: ComputedRef<number>;
|
|
751
|
+
/**
|
|
752
|
+
* currentOffset === 0
|
|
745
753
|
*/
|
|
746
754
|
isCurrent: ComputedRef<boolean>;
|
|
747
755
|
/**
|
|
@@ -754,14 +762,14 @@ interface ClicksContext {
|
|
|
754
762
|
readonly clicksStart: number;
|
|
755
763
|
readonly relativeOffsets: Map<ClicksElement, number>;
|
|
756
764
|
readonly maxMap: Map<ClicksElement, number>;
|
|
757
|
-
calculateSince: (at:
|
|
758
|
-
calculateRange: (at:
|
|
759
|
-
calculate: (at:
|
|
760
|
-
register: (el: ClicksElement, info: Pick<ClicksInfo, 'delta' | 'max'>) => void;
|
|
765
|
+
calculateSince: (at: RawSingleAtValue, size?: number) => ClicksInfo | null;
|
|
766
|
+
calculateRange: (at: RawRangeAtValue) => ClicksInfo | null;
|
|
767
|
+
calculate: (at: RawAtValue) => ClicksInfo | null;
|
|
768
|
+
register: (el: ClicksElement, info: Pick<ClicksInfo, 'delta' | 'max'> | null) => void;
|
|
761
769
|
unregister: (el: ClicksElement) => void;
|
|
762
770
|
onMounted: () => void;
|
|
763
771
|
readonly currentOffset: number;
|
|
764
772
|
readonly total: number;
|
|
765
773
|
}
|
|
766
774
|
|
|
767
|
-
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 MermaidOptions, type MermaidSetup, type MonacoSetup, type MonacoSetupReturn, type NavOperations, type NormalizedAtValue, type NormalizedRangeClickValue, type
|
|
775
|
+
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 MermaidOptions, 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 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.0-beta.
|
|
3
|
+
"version": "0.49.0-beta.5",
|
|
4
4
|
"description": "Shared types declarations for Slidev",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
29
29
|
"katex": "^0.16.10",
|
|
30
30
|
"mermaid": "^10.9.0",
|
|
31
|
-
"monaco-editor": "^0.
|
|
32
|
-
"shiki": "^1.
|
|
33
|
-
"unocss": "^0.59.
|
|
34
|
-
"unplugin-icons": "^0.
|
|
35
|
-
"unplugin-vue-markdown": "^0.26.
|
|
31
|
+
"monaco-editor": "^0.48.0",
|
|
32
|
+
"shiki": "^1.4.0",
|
|
33
|
+
"unocss": "^0.59.4",
|
|
34
|
+
"unplugin-icons": "^0.19.0",
|
|
35
|
+
"unplugin-vue-markdown": "^0.26.2",
|
|
36
36
|
"vite-plugin-remote-assets": "^0.4.1",
|
|
37
37
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
38
|
-
"vue": "^3.4.
|
|
39
|
-
"vue-router": "^4.3.
|
|
38
|
+
"vue": "^3.4.26",
|
|
39
|
+
"vue-router": "^4.3.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsup src/index.ts",
|