@slidev/client 52.6.0 → 52.7.0

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/constants.ts CHANGED
@@ -66,6 +66,7 @@ export const HEADMATTER_FIELDS = [
66
66
  'monacoTypesSource',
67
67
  'monacoTypesAdditionalPackages',
68
68
  'monacoRunAdditionalDeps',
69
+ 'monacoRunUseStrict',
69
70
  'remoteAssets',
70
71
  'selectable',
71
72
  'record',
package/index.ts CHANGED
@@ -23,6 +23,7 @@ export type { DrawingsState } from './state/drawings'
23
23
  export { drawingState, onDrawingUpdate } from './state/drawings'
24
24
  export type { SharedState } from './state/shared'
25
25
  export { onSharedUpdate, sharedState } from './state/shared'
26
+ export { lockShortcuts } from './state/storage'
26
27
 
27
28
  export {
28
29
  addSyncMethod,
@@ -61,6 +61,7 @@ const builtinIcons: Record<string, string> = {
61
61
  '.yml': 'i-vscode-icons:file-type-light-yaml',
62
62
  '.yaml': 'i-vscode-icons:file-type-light-yaml',
63
63
  '.php': 'i-vscode-icons:file-type-php',
64
+ '.svg': 'i-vscode-icons:file-type-svg',
64
65
  }
65
66
 
66
67
  function matchIcon(title: string) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/client",
3
3
  "type": "module",
4
- "version": "52.6.0",
4
+ "version": "52.7.0",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -32,9 +32,9 @@
32
32
  "@iconify-json/carbon": "^1.2.14",
33
33
  "@iconify-json/ph": "^1.2.2",
34
34
  "@iconify-json/svg-spinners": "^1.2.4",
35
- "@shikijs/engine-javascript": "^3.13.0",
36
- "@shikijs/monaco": "^3.13.0",
37
- "@shikijs/vitepress-twoslash": "^3.13.0",
35
+ "@shikijs/engine-javascript": "^3.15.0",
36
+ "@shikijs/monaco": "^3.15.0",
37
+ "@shikijs/vitepress-twoslash": "^3.15.0",
38
38
  "@slidev/rough-notation": "^0.1.0",
39
39
  "@typescript/ata": "^0.9.8",
40
40
  "@unhead/vue": "^2.0.19",
@@ -48,23 +48,23 @@
48
48
  "fuse.js": "^7.1.0",
49
49
  "katex": "^0.16.25",
50
50
  "lz-string": "^1.5.0",
51
- "mermaid": "^11.12.0",
52
- "monaco-editor": "^0.53.0",
51
+ "mermaid": "^11.12.1",
52
+ "monaco-editor": "^0.54.0",
53
53
  "nanotar": "^0.2.0",
54
54
  "pptxgenjs": "^4.0.1",
55
55
  "prettier": "^3.6.2",
56
56
  "recordrtc": "^5.6.2",
57
- "shiki": "^3.13.0",
58
- "shiki-magic-move": "^1.2.0",
57
+ "shiki": "^3.15.0",
58
+ "shiki-magic-move": "^1.2.1",
59
59
  "typescript": "^5.9.3",
60
60
  "unocss": "^66.5.4",
61
- "vue": "^3.5.22",
61
+ "vue": "^3.5.23",
62
62
  "vue-router": "^4.6.3",
63
63
  "yaml": "^2.8.1",
64
- "@slidev/parser": "52.6.0",
65
- "@slidev/types": "52.6.0"
64
+ "@slidev/parser": "52.7.0",
65
+ "@slidev/types": "52.7.0"
66
66
  },
67
67
  "devDependencies": {
68
- "vite": "^7.1.12"
68
+ "vite": "^7.2.2"
69
69
  }
70
70
  }
@@ -5,6 +5,7 @@ import deps from '#slidev/monaco-run-deps'
5
5
  import setups from '#slidev/setups/code-runners'
6
6
  import { createSingletonPromise } from '@antfu/utils'
7
7
  import { ref } from 'vue'
8
+ import { configs } from '../env'
8
9
 
9
10
  export default createSingletonPromise(async () => {
10
11
  const runners: Record<string, CodeRunner> = {
@@ -63,6 +64,7 @@ function runJavaScript(code: string): CodeRunnerOutputs {
63
64
  vmConsole.clear = () => result.value.length = 0
64
65
  try {
65
66
  const safeJS = `return async (console, __slidev_import, __slidev_on_error) => {
67
+ ${configs.monacoRunUseStrict ? `"use strict";` : ''}
66
68
  try {
67
69
  ${sanitizeJS(code)}
68
70
  } catch (e) {
package/state/storage.ts CHANGED
@@ -17,11 +17,6 @@ export const disableTransition = ref(false)
17
17
 
18
18
  export const shortcutsEnabled = ref(true)
19
19
 
20
- /**
21
- * Whether the keyboard shortcuts are enabled. Readonly,
22
- * use `lockShortcuts` and `releaseShortcuts` to modify.
23
- */
24
-
25
20
  // Use a locking mechanism to support multiple simultaneous locks
26
21
  // and avoid race conditions. Race conditions may occur, for example,
27
22
  // when locking shortcuts on editor focus and moving from one editor