@slidev/types 0.48.8 → 0.49.0-beta.1

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.
Files changed (2) hide show
  1. package/dist/index.d.mts +15 -2
  2. package/package.json +3 -3
package/dist/index.d.mts CHANGED
@@ -13,6 +13,7 @@ import Components from 'unplugin-vue-components/vite';
13
13
  import Markdown from 'unplugin-vue-markdown/vite';
14
14
  import RemoteAssets from 'vite-plugin-remote-assets';
15
15
  import ServerRef from 'vite-plugin-vue-server-ref';
16
+ import MagicString from 'magic-string';
16
17
 
17
18
  interface CommonArgs {
18
19
  entry: string;
@@ -405,7 +406,9 @@ interface SlideInfo extends SlideInfoBase {
405
406
  /**
406
407
  * Editable fields for a slide
407
408
  */
408
- type SlidePatch = Partial<Pick<SlideInfoBase, 'content' | 'note'>>;
409
+ type SlidePatch = Partial<Pick<SlideInfoBase, 'content' | 'note' | 'frontmatter'>> & {
410
+ skipHmr?: boolean;
411
+ };
409
412
  /**
410
413
  * Metadata for "slidev" field in themes' package.json
411
414
  */
@@ -520,6 +523,10 @@ interface CodeRunnerContext {
520
523
  * Highlight code with shiki.
521
524
  */
522
525
  highlight: (code: string, lang: string, options?: Partial<CodeToHastOptions>) => Promise<string>;
526
+ /**
527
+ * Resolve the import path of a module.
528
+ */
529
+ resolveId: (specifer: string) => Promise<string | null>;
523
530
  /**
524
531
  * Use (other) code runner to run code.
525
532
  */
@@ -719,4 +726,10 @@ declare module 'vite' {
719
726
  }
720
727
  }
721
728
 
722
- export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type ClicksMap, type ClicksRelativeEls, 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 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 ResolvedSlidevOptions, type RootSetup, type RootsInfo, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlideRoute, type SlidevConfig, type SlidevData, type SlidevEntryOptions, type SlidevFeatureFlags, type SlidevMarkdown, type SlidevPluginOptions, type SlidevPreparserExtension, type SlidevServerOptions, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type UnoSetup, defineAppSetup, defineCodeRunnersSetup, defineKatexSetup, defineMermaidSetup, defineMonacoSetup, definePreparserSetup, defineShikiSetup, defineShortcutsSetup, defineUnoSetup };
729
+ interface MarkdownTransformContext {
730
+ s: MagicString;
731
+ ignores: [number, number][];
732
+ isIgnored: (index: number) => boolean;
733
+ }
734
+
735
+ export { type AppContext, type AppSetup, type BuildArgs, type BuiltinSlideTransition, type ClicksContext, type ClicksElement, type ClicksInfo, type ClicksMap, type ClicksRelativeEls, 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 DrawingsOptions, type ExportArgs, type FontOptions, type FrontmatterStyle, type KatexSetup, type LoadedSnippets, type MarkdownTransformContext, 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 ResolvedSlidevOptions, type RootSetup, type RootsInfo, type ShikiContext, type ShikiSetup, type ShikiSetupReturn, type ShortcutOptions, type ShortcutsSetup, type SlideInfo, type SlideInfoBase, type SlidePatch, type SlideRoute, type SlidevConfig, type SlidevData, type SlidevEntryOptions, type SlidevFeatureFlags, type SlidevMarkdown, type SlidevPluginOptions, type SlidevPreparserExtension, type SlidevServerOptions, type SlidevThemeConfig, type SlidevThemeMeta, type SourceSlideInfo, type TocItem, type UnoSetup, defineAppSetup, defineCodeRunnersSetup, 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.8",
3
+ "version": "0.49.0-beta.1",
4
4
  "description": "Shared types declarations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -29,8 +29,8 @@
29
29
  "katex": "^0.16.10",
30
30
  "mermaid": "^10.9.0",
31
31
  "monaco-editor": "^0.47.0",
32
- "shiki": "^1.2.1",
33
- "unocss": "^0.58.8",
32
+ "shiki": "^1.3.0",
33
+ "unocss": "^0.59.0",
34
34
  "unplugin-icons": "^0.18.5",
35
35
  "unplugin-vue-markdown": "^0.26.0",
36
36
  "vite-plugin-remote-assets": "^0.4.1",