@slidev/types 0.49.10 → 0.49.12

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
@@ -42,13 +42,14 @@ declare module '#slidev/custom-nav-controls' {
42
42
 
43
43
  declare module '#slidev/shiki' {
44
44
  import type { ShikiHighlighterCore } from 'shiki/core'
45
- import type { BundledLanguage, BundledTheme } from 'shiki'
45
+ import type { BundledLanguage, BundledTheme, CodeToHastOptions } from 'shiki'
46
46
 
47
47
  export { shikiToMonaco } from '@shikijs/monaco'
48
48
 
49
49
  export const langs: BundledLanguage[]
50
50
  export const themes: BundledTheme | Record<string, BundledTheme>
51
51
  export const shiki: Promise<ShikiHighlighterCore>
52
+ export function getHighlighter(): Promise<(code: string, lang: string, options?: Partial<CodeToHastOptions>) => Promise<string>>
52
53
  }
53
54
 
54
55
  declare module '#slidev/setups/monaco' {
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { RouteMeta, RouteComponent, Router, RouteRecordRaw } from 'vue-router';
2
2
  import YAML from 'yaml';
3
- import { TransitionGroupProps, Component, App, Ref, ComputedRef } from 'vue';
3
+ import { TransitionGroupProps, MaybeRefOrGetter, Component, App, Ref, ComputedRef } from 'vue';
4
4
  import { Arrayable, Awaitable, ArgumentsType } from '@antfu/utils';
5
5
  import * as monaco from 'monaco-editor';
6
6
  import mermaid from 'mermaid';
@@ -25,6 +25,7 @@ interface ExportArgs extends CommonArgs {
25
25
  'format'?: string;
26
26
  'timeout'?: number;
27
27
  'wait'?: number;
28
+ 'wait-until'?: string;
28
29
  'range'?: string;
29
30
  'dark'?: boolean;
30
31
  'with-clicks'?: boolean;
@@ -289,6 +290,10 @@ interface SlidevConfig {
289
290
  * @default true
290
291
  */
291
292
  contextMenu: boolean | 'dev' | 'build' | undefined;
293
+ /**
294
+ * Enable wake lock
295
+ */
296
+ wakeLock: boolean | 'dev' | 'build';
292
297
  }
293
298
  interface FontOptions {
294
299
  /**
@@ -553,7 +558,7 @@ interface CodeRunnerOutputText {
553
558
  }
554
559
  type CodeRunnerOutputTextArray = CodeRunnerOutputText[];
555
560
  type CodeRunnerOutput = CodeRunnerOutputHtml | CodeRunnerOutputError | CodeRunnerOutputText | CodeRunnerOutputTextArray | CodeRunnerOutputDom;
556
- type CodeRunnerOutputs = Arrayable<CodeRunnerOutput>;
561
+ type CodeRunnerOutputs = MaybeRefOrGetter<Arrayable<CodeRunnerOutput>>;
557
562
  type CodeRunner = (code: string, ctx: CodeRunnerContext) => Awaitable<CodeRunnerOutputs>;
558
563
  type CodeRunnerProviders = Record<string, CodeRunner>;
559
564
 
@@ -786,14 +791,16 @@ interface ClicksInfo {
786
791
  interface ClicksContext {
787
792
  current: number;
788
793
  readonly clicksStart: number;
789
- readonly relativeOffsets: Map<ClicksElement, number>;
794
+ readonly relativeSizeMap: Map<ClicksElement, number>;
790
795
  readonly maxMap: Map<ClicksElement, number>;
791
796
  calculateSince: (at: RawSingleAtValue, size?: number) => ClicksInfo | null;
792
797
  calculateRange: (at: RawRangeAtValue) => ClicksInfo | null;
793
798
  calculate: (at: RawAtValue) => ClicksInfo | null;
794
799
  register: (el: ClicksElement, info: Pick<ClicksInfo, 'delta' | 'max'> | null) => void;
795
800
  unregister: (el: ClicksElement) => void;
801
+ readonly isMounted: boolean;
796
802
  onMounted: () => void;
803
+ onUnmounted: () => void;
797
804
  readonly currentOffset: number;
798
805
  readonly total: number;
799
806
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/types",
3
- "version": "0.49.10",
3
+ "version": "0.49.12",
4
4
  "description": "Shared types declarations for Slidev",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -25,18 +25,18 @@
25
25
  "dependencies": {
26
26
  "@antfu/utils": "^0.7.8",
27
27
  "@vitejs/plugin-vue": "^5.0.5",
28
- "@vitejs/plugin-vue-jsx": "^3.1.0",
28
+ "@vitejs/plugin-vue-jsx": "^4.0.0",
29
29
  "katex": "^0.16.10",
30
30
  "mermaid": "^10.9.1",
31
- "monaco-editor": "^0.49.0",
32
- "shiki": "^1.6.1",
33
- "unocss": "^0.60.4",
31
+ "monaco-editor": "^0.50.0",
32
+ "shiki": "^1.9.1",
33
+ "unocss": "^0.61.0",
34
34
  "unplugin-icons": "^0.19.0",
35
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.27",
39
- "vue-router": "^4.3.2"
38
+ "vue": "^3.4.30",
39
+ "vue-router": "^4.4.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsup src/index.ts",