@slidev/types 0.48.0-beta.20 → 0.48.0-beta.22

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 CHANGED
@@ -22,15 +22,15 @@ declare module '#slidev/global-components/bottom' {
22
22
  export default component
23
23
  }
24
24
 
25
- declare module '#slidev/routes' {
26
- import type { RouteRecordRaw } from 'vue-router'
25
+ declare module '#slidev/slides' {
26
+ import type { ShallowRef } from 'vue'
27
+ import type { SlideRoute } from '@slidev/types'
27
28
 
28
- const rawRoutes: RouteRecordRaw[]
29
- const redirects: RouteRecordRaw[]
30
- export { rawRoutes, redirects }
29
+ const slides: ShallowRef<SlideRoute[]>
30
+ export { slides }
31
31
  }
32
32
 
33
- declare module '@slidev/titles.md' {
33
+ declare module '#slidev/titles.md' {
34
34
  import type { ComponentOptions } from 'vue'
35
35
 
36
36
  const component: ComponentOptions
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ComputedRef } from '@vue/reactivity';
2
+ import { RouteMeta, RouteComponent, Router } from 'vue-router';
2
3
  import { TransitionGroupProps, App, Ref } from 'vue';
3
4
  import { Awaitable } from '@antfu/utils';
4
5
  import * as monaco from 'monaco-editor';
5
- import { Router } from 'vue-router';
6
6
  import mermaid from 'mermaid';
7
7
  import { KatexOptions } from 'katex';
8
8
  import { CodeToHastOptions, Highlighter } from 'shiki';
@@ -13,16 +13,16 @@ interface CommonArgs {
13
13
  theme?: string;
14
14
  }
15
15
  interface ExportArgs extends CommonArgs {
16
- output?: string;
17
- format?: string;
18
- timeout?: number;
19
- range?: string;
20
- dark?: boolean;
16
+ 'output'?: string;
17
+ 'format'?: string;
18
+ 'timeout'?: number;
19
+ 'range'?: string;
20
+ 'dark'?: boolean;
21
21
  'with-clicks'?: boolean;
22
22
  'executable-path'?: string;
23
23
  'with-toc'?: boolean;
24
24
  'per-slide'?: boolean;
25
- scale?: number;
25
+ 'scale'?: number;
26
26
  }
27
27
  interface BuildArgs extends ExportArgs {
28
28
  watch: boolean;
@@ -436,6 +436,11 @@ interface SlidevPreparserExtension {
436
436
  }
437
437
  type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string, mode?: string) => Promise<SlidevPreparserExtension[]>;
438
438
  type RenderContext = 'none' | 'slide' | 'overview' | 'presenter' | 'previewNext';
439
+ interface SlideRoute {
440
+ no: number;
441
+ meta: RouteMeta;
442
+ component: () => Promise<RouteComponent>;
443
+ }
439
444
  type LoadedSnippets = Record<string, string>;
440
445
  type ClicksElement = Element | string;
441
446
  type ClicksRelativeEls = Map<ClicksElement, number>;
@@ -549,6 +554,7 @@ declare function defineShortcutsSetup(fn: ShortcutsSetup): ShortcutsSetup;
549
554
  declare function definePreparserSetup(fn: PreparserSetup): PreparserSetup;
550
555
 
551
556
  interface TocItem {
557
+ no: number;
552
558
  active?: boolean;
553
559
  activeParent?: boolean;
554
560
  children: TocItem[];
@@ -559,4 +565,18 @@ interface TocItem {
559
565
  title?: string;
560
566
  }
561
567
 
562
- export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type ClicksMap, type ClicksRelativeEls, type CommonArgs, type DrawingsOptions, type ExportArgs, type FontOptions, type FrontmatterStyle, type KatexSetup, type LoadedSnippets, type MermaidOptions, type MermaidSetup, type MonacoSetup, type MonacoSetupReturn, type NavOperations, type PreparserExtensionLoader, type PreparserSetup, type RenderContext, type ResolvedClicksInfo, type ResolvedDrawingsOptions, type ResolvedExportOptions, type ResolvedFontOptions, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlidevConfig, type SlidevData, type SlidevFeatureFlags, type SlidevMarkdown, type SlidevPreparserExtension, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type UnoSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup };
568
+ declare module 'vite' {
569
+ interface CustomEventMap {
570
+ 'slidev:update-slide': {
571
+ id: number;
572
+ data: SlideInfo;
573
+ };
574
+ 'slidev:update-note': {
575
+ id: number;
576
+ note: string;
577
+ noteHTML: string;
578
+ };
579
+ }
580
+ }
581
+
582
+ export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type ClicksMap, type ClicksRelativeEls, type CommonArgs, type DrawingsOptions, type ExportArgs, type FontOptions, type FrontmatterStyle, type KatexSetup, type LoadedSnippets, type MermaidOptions, type MermaidSetup, type MonacoSetup, type MonacoSetupReturn, type NavOperations, type PreparserExtensionLoader, type PreparserSetup, type RenderContext, type ResolvedClicksInfo, type ResolvedDrawingsOptions, type ResolvedExportOptions, type ResolvedFontOptions, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlideRoute, type SlidevConfig, type SlidevData, type SlidevFeatureFlags, type SlidevMarkdown, type SlidevPreparserExtension, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type UnoSetup, defineAppSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "0.48.0-beta.20",
3
+ "version": "0.48.0-beta.22",
4
4
  "description": "Shared types declarations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",