@slidev/types 0.48.0-beta.2 → 0.48.0-beta.3
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 +39 -20
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -341,28 +341,38 @@ type BuiltinSlideTransition = 'slide-up' | 'slide-down' | 'slide-left' | 'slide-
|
|
|
341
341
|
|
|
342
342
|
type FrontmatterStyle = 'frontmatter' | 'yaml';
|
|
343
343
|
interface SlideInfoBase {
|
|
344
|
-
|
|
344
|
+
frontmatter: Record<string, any>;
|
|
345
345
|
content: string;
|
|
346
346
|
note?: string;
|
|
347
|
-
frontmatter: Record<string, any>;
|
|
348
|
-
frontmatterRaw?: string;
|
|
349
|
-
frontmatterStyle?: FrontmatterStyle;
|
|
350
347
|
title?: string;
|
|
351
348
|
level?: number;
|
|
352
349
|
}
|
|
353
|
-
interface
|
|
350
|
+
interface SourceSlideInfo extends SlideInfoBase {
|
|
351
|
+
/**
|
|
352
|
+
* The filepath of the markdown file
|
|
353
|
+
*/
|
|
354
|
+
filepath: string;
|
|
355
|
+
/**
|
|
356
|
+
* The index of the slide in the markdown file
|
|
357
|
+
*/
|
|
354
358
|
index: number;
|
|
359
|
+
/**
|
|
360
|
+
* The range of the slide in the markdown file
|
|
361
|
+
*/
|
|
355
362
|
start: number;
|
|
356
363
|
end: number;
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
interface SlideInfoWithPath extends SlideInfo {
|
|
362
|
-
filepath: string;
|
|
364
|
+
raw: string;
|
|
365
|
+
frontmatterRaw?: string;
|
|
366
|
+
frontmatterStyle?: FrontmatterStyle;
|
|
363
367
|
}
|
|
364
|
-
interface
|
|
365
|
-
|
|
368
|
+
interface SlideInfo extends SlideInfoBase {
|
|
369
|
+
/**
|
|
370
|
+
* The index of the slide in the presentation
|
|
371
|
+
*/
|
|
372
|
+
index: number;
|
|
373
|
+
source: SourceSlideInfo;
|
|
374
|
+
snippetsUsed?: LoadedSnippets;
|
|
375
|
+
noteHTML?: string;
|
|
366
376
|
}
|
|
367
377
|
/**
|
|
368
378
|
* Metadata for "slidev" field in themes' package.json
|
|
@@ -380,15 +390,25 @@ interface SlidevFeatureFlags {
|
|
|
380
390
|
mermaid: boolean;
|
|
381
391
|
}
|
|
382
392
|
interface SlidevMarkdown {
|
|
383
|
-
|
|
393
|
+
filepath: string;
|
|
384
394
|
raw: string;
|
|
395
|
+
/**
|
|
396
|
+
* All slides in this markdown file
|
|
397
|
+
*/
|
|
398
|
+
slides: SourceSlideInfo[];
|
|
399
|
+
}
|
|
400
|
+
interface SlidevData {
|
|
401
|
+
/**
|
|
402
|
+
* Slides that should be rendered (disabled slides excluded)
|
|
403
|
+
*/
|
|
404
|
+
slides: SlideInfo[];
|
|
405
|
+
entry: SlidevMarkdown;
|
|
385
406
|
config: SlidevConfig;
|
|
386
|
-
features: SlidevFeatureFlags;
|
|
387
407
|
headmatter: Record<string, unknown>;
|
|
388
|
-
|
|
389
|
-
entries?: string[];
|
|
408
|
+
features: SlidevFeatureFlags;
|
|
390
409
|
themeMeta?: SlidevThemeMeta;
|
|
391
|
-
|
|
410
|
+
markdownFiles: Record<string, SlidevMarkdown>;
|
|
411
|
+
watchFiles: string[];
|
|
392
412
|
}
|
|
393
413
|
interface SlidevPreparserExtension {
|
|
394
414
|
name: string;
|
|
@@ -396,7 +416,6 @@ interface SlidevPreparserExtension {
|
|
|
396
416
|
transformSlide?: (content: string, frontmatter: any) => Promise<string | undefined>;
|
|
397
417
|
}
|
|
398
418
|
type PreparserExtensionLoader = (headmatter?: Record<string, unknown>, filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
399
|
-
type PreparserExtensionFromHeadmatter = (headmatter: any, exts: SlidevPreparserExtension[], filepath?: string) => Promise<SlidevPreparserExtension[]>;
|
|
400
419
|
type RenderContext = 'slide' | 'overview' | 'presenter' | 'previewNext';
|
|
401
420
|
type LoadedSnippets = Record<string, string>;
|
|
402
421
|
type ClicksElement = Element | string;
|
|
@@ -525,4 +544,4 @@ interface TocItem {
|
|
|
525
544
|
title?: string;
|
|
526
545
|
}
|
|
527
546
|
|
|
528
|
-
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
|
|
547
|
+
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 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 };
|