@slidev/cli 0.48.2 → 0.48.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.
@@ -2,7 +2,7 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-644IOZGH.mjs";
5
+ } from "./chunk-M3AHQMLP.mjs";
6
6
  import "./chunk-LOUKLO2C.mjs";
7
7
  import "./chunk-AQQIBD5X.mjs";
8
8
 
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-644IOZGH.mjs";
4
+ } from "./chunk-M3AHQMLP.mjs";
5
5
  import {
6
6
  createResolver,
7
7
  getRoots,
@@ -48,7 +48,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
48
48
  import * as parser from "@slidev/parser/fs";
49
49
 
50
50
  // package.json
51
- var version = "0.48.2";
51
+ var version = "0.48.3";
52
52
 
53
53
  // node/integrations/themes.ts
54
54
  import { join as join2 } from "node:path";
@@ -86,10 +86,10 @@ async function resolveAddons(addonsInConfig) {
86
86
  if (!pkgRoot)
87
87
  return;
88
88
  resolved.push(pkgRoot);
89
- const { slidev, engines } = await fs2.readJSON(resolve(pkgRoot, "package.json"));
89
+ const { slidev = {}, engines = {} } = await fs2.readJSON(resolve(pkgRoot, "package.json"));
90
90
  if (engines.slidev && !satisfies2(version, engines.slidev, { includePrerelease: true }))
91
91
  throw new Error(`[slidev] addon "${name}" requires Slidev version range "${engines.slidev}" but found "${version}"`);
92
- if (Array.isArray(slidev?.addons))
92
+ if (Array.isArray(slidev.addons))
93
93
  await Promise.all(slidev.addons.map((addon) => resolveAddon(addon, pkgRoot)));
94
94
  }
95
95
  if (Array.isArray(addonsInConfig))
@@ -146,7 +146,7 @@ var dependencies = {
146
146
  "@slidev/rough-notation": "^0.1.0",
147
147
  "@slidev/types": "workspace:*",
148
148
  "@typescript/ata": "^0.9.4",
149
- "@unhead/vue": "^1.8.11",
149
+ "@unhead/vue": "^1.8.18",
150
150
  "@unocss/reset": "^0.58.5",
151
151
  "@vueuse/core": "^10.9.0",
152
152
  "@vueuse/math": "^10.9.0",
@@ -160,7 +160,7 @@ var dependencies = {
160
160
  katex: "^0.16.9",
161
161
  "lz-string": "^1.5.0",
162
162
  mermaid: "^10.9.0",
163
- "monaco-editor": "^0.46.0",
163
+ "monaco-editor": "^0.47.0",
164
164
  prettier: "^3.2.5",
165
165
  recordrtc: "^5.6.2",
166
166
  shiki: "^1.1.7",
@@ -1243,7 +1243,7 @@ ${code}`;
1243
1243
 
1244
1244
  // node/vite/markdown.ts
1245
1245
  import Markdown2 from "unplugin-vue-markdown/vite";
1246
- import { slash } from "@antfu/utils";
1246
+ import { isTruthy as isTruthy3, slash } from "@antfu/utils";
1247
1247
 
1248
1248
  // ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=tuyuxytl56b2vxulpkzt2wf4o4_markdown-it@14.0.0/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
1249
1249
  var SpecialCharacters;
@@ -1893,9 +1893,10 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
1893
1893
  langs: options2.langs ?? Object.keys(bundledLanguages),
1894
1894
  themes: "themes" in options2 ? Object.values(options2.themes) : [options2.theme]
1895
1895
  });
1896
+ const twoslashEnabled = config.twoslash === true || config.twoslash === mode;
1896
1897
  const transformers = [
1897
1898
  ...options2.transformers || [],
1898
- transformerTwoslash({
1899
+ twoslashEnabled && transformerTwoslash({
1899
1900
  explicitTrigger: true,
1900
1901
  twoslashOptions: {
1901
1902
  handbookOptions: {
@@ -1912,7 +1913,7 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
1912
1913
  return escapeVueInCode(code);
1913
1914
  }
1914
1915
  }
1915
- ];
1916
+ ].filter(isTruthy3);
1916
1917
  const plugin = markdownItShiki(shiki, {
1917
1918
  ...options2,
1918
1919
  transformers
package/dist/cli.mjs CHANGED
@@ -6,8 +6,8 @@ import {
6
6
  resolveOptions,
7
7
  resolveTheme,
8
8
  version
9
- } from "./chunk-WEMFFV42.mjs";
10
- import "./chunk-644IOZGH.mjs";
9
+ } from "./chunk-KD3VKTSM.mjs";
10
+ import "./chunk-M3AHQMLP.mjs";
11
11
  import {
12
12
  loadSetups
13
13
  } from "./chunk-LOUKLO2C.mjs";
@@ -325,19 +325,23 @@ cli.command(
325
325
  }).strict().help(),
326
326
  async (args) => {
327
327
  const { entry, theme, watch, base, download, out, inspect } = args;
328
- const { build } = await import("./build-CZRPUF5Y.mjs");
328
+ const { build } = await import("./build-E4S2VL7J.mjs");
329
329
  for (const entryFile of entry) {
330
330
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
331
331
  if (download && !options.data.config.download)
332
332
  options.data.config.download = download;
333
333
  printInfo(options);
334
- await build(options, {
335
- base,
336
- build: {
337
- watch: watch ? {} : void 0,
338
- outDir: entry.length === 1 ? out : path.join(out, path.basename(entryFile, ".md"))
339
- }
340
- }, { ...args, entry: entryFile });
334
+ await build(
335
+ options,
336
+ {
337
+ base,
338
+ build: {
339
+ watch: watch ? {} : void 0,
340
+ outDir: entry.length === 1 ? out : path.join(out, path.basename(entryFile, ".md"))
341
+ }
342
+ },
343
+ { ...args, entry: entryFile }
344
+ );
341
345
  }
342
346
  }
343
347
  );
package/dist/index.mjs CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  createServer,
3
3
  parser,
4
4
  resolveOptions
5
- } from "./chunk-WEMFFV42.mjs";
5
+ } from "./chunk-KD3VKTSM.mjs";
6
6
  import {
7
7
  ViteSlidevPlugin
8
- } from "./chunk-644IOZGH.mjs";
8
+ } from "./chunk-M3AHQMLP.mjs";
9
9
  import "./chunk-LOUKLO2C.mjs";
10
10
  import "./chunk-AQQIBD5X.mjs";
11
11
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.48.2",
3
+ "version": "0.48.3",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -77,8 +77,8 @@
77
77
  "markdown-it-link-attributes": "^4.0.1",
78
78
  "markdown-it-mdc": "^0.2.3",
79
79
  "mlly": "^1.6.1",
80
- "monaco-editor": "^0.46.0",
81
- "open": "^10.0.4",
80
+ "monaco-editor": "^0.47.0",
81
+ "open": "^10.1.0",
82
82
  "pdf-lib": "^1.17.1",
83
83
  "plantuml-encoder": "^1.4.0",
84
84
  "postcss-nested": "^6.0.1",
@@ -98,7 +98,7 @@
98
98
  "unplugin-vue-markdown": "^0.26.0",
99
99
  "untun": "^0.1.3",
100
100
  "uqr": "^0.1.2",
101
- "vite": "^5.1.5",
101
+ "vite": "^5.1.6",
102
102
  "vite-plugin-inspect": "^0.8.3",
103
103
  "vite-plugin-remote-assets": "^0.4.1",
104
104
  "vite-plugin-static-copy": "^1.0.1",
@@ -106,9 +106,9 @@
106
106
  "vitefu": "^0.2.5",
107
107
  "vue": "^3.4.21",
108
108
  "yargs": "^17.7.2",
109
- "@slidev/types": "0.48.2",
110
- "@slidev/parser": "0.48.2",
111
- "@slidev/client": "0.48.2"
109
+ "@slidev/client": "0.48.3",
110
+ "@slidev/parser": "0.48.3",
111
+ "@slidev/types": "0.48.3"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@hedgedoc/markdown-it-plugins": "^2.1.4",