@slidev/cli 0.42.6 → 0.42.8

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.
@@ -7,12 +7,12 @@ import {
7
7
  resolveImportPath,
8
8
  stringifyMarkdownTokens,
9
9
  toAtFS
10
- } from "./chunk-CIUEQ4TI.mjs";
10
+ } from "./chunk-MZBIET7Y.mjs";
11
11
  import {
12
12
  __commonJS,
13
13
  __require,
14
14
  __toESM
15
- } from "./chunk-L5QH2WZE.mjs";
15
+ } from "./chunk-KB3DQ2OE.mjs";
16
16
 
17
17
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
18
18
  var require_fast_deep_equal = __commonJS({
@@ -184,12 +184,12 @@ import { uniq as uniq2 } from "@antfu/utils";
184
184
 
185
185
  // ../client/package.json
186
186
  var dependencies = {
187
- "@antfu/utils": "^0.7.5",
187
+ "@antfu/utils": "^0.7.6",
188
188
  "@slidev/parser": "workspace:*",
189
189
  "@slidev/types": "workspace:*",
190
- "@unocss/reset": "^0.54.1",
190
+ "@unocss/reset": "^0.55.0",
191
191
  "@vueuse/core": "^10.3.0",
192
- "@vueuse/head": "^1.1.26",
192
+ "@vueuse/head": "^1.3.1",
193
193
  "@vueuse/math": "^10.3.0",
194
194
  "@vueuse/motion": "^2.0.0",
195
195
  codemirror: "^5.65.5",
@@ -200,14 +200,14 @@ var dependencies = {
200
200
  "js-base64": "^3.7.5",
201
201
  "js-yaml": "^4.1.0",
202
202
  katex: "^0.16.8",
203
- mermaid: "^10.3.0",
203
+ mermaid: "^10.3.1",
204
204
  "monaco-editor": "^0.37.1",
205
205
  nanoid: "^4.0.2",
206
- prettier: "^3.0.0",
206
+ prettier: "^3.0.2",
207
207
  recordrtc: "^5.6.2",
208
- resolve: "^1.22.2",
209
- unocss: "^0.54.1",
210
- "vite-plugin-windicss": "^1.9.0",
208
+ resolve: "^1.22.4",
209
+ unocss: "^0.55.0",
210
+ "vite-plugin-windicss": "^1.9.1",
211
211
  vue: "^3.3.4",
212
212
  "vue-router": "^4.2.4",
213
213
  "vue-starport": "^0.3.0",
@@ -994,7 +994,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
994
994
  }
995
995
 
996
996
  // node/plugins/markdown.ts
997
- import Markdown2 from "vite-plugin-vue-markdown";
997
+ import Markdown2 from "unplugin-vue-markdown/vite";
998
998
  import * as base64 from "js-base64";
999
999
  import { slash as slash4 } from "@antfu/utils";
1000
1000
  import mila2 from "markdown-it-link-attributes";
@@ -1636,7 +1636,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1636
1636
  dev: true,
1637
1637
  build: true
1638
1638
  })) : null,
1639
- config.css === "none" ? null : config.css === "windicss" ? import("./windicss-OSTDR2Z6.mjs").then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : import("./unocss-ZLGTDCD7.mjs").then((r) => r.createUnocssPlugin(options, pluginOptions))
1639
+ config.css === "none" ? null : config.css === "windicss" ? import("./windicss-TWSVDM4O.mjs").then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : import("./unocss-ALFHEPHE.mjs").then((r) => r.createUnocssPlugin(options, pluginOptions))
1640
1640
  ];
1641
1641
  return (await Promise.all(plugins)).flat().filter(notNullish2);
1642
1642
  }
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined")
11
11
  return require.apply(this, arguments);
12
- throw new Error('Dynamic require of "' + x + '" is not supported');
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
13
  });
14
14
  var __commonJS = (cb, mod) => function __require2() {
15
15
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __require
3
- } from "./chunk-L5QH2WZE.mjs";
3
+ } from "./chunk-KB3DQ2OE.mjs";
4
4
 
5
5
  // node/utils.ts
6
6
  import { join } from "path";
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
9
9
  }) : x)(function(x) {
10
10
  if (typeof require !== "undefined")
11
11
  return require.apply(this, arguments);
12
- throw new Error('Dynamic require of "' + x + '" is not supported');
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
13
  });
14
14
  var __commonJS = (cb, mod) => function __require2() {
15
15
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-FP2Y7WJ3.mjs";
4
+ } from "./chunk-GZGDDQJD.mjs";
5
5
  import {
6
6
  packageExists,
7
7
  resolveImportPath
8
- } from "./chunk-CIUEQ4TI.mjs";
8
+ } from "./chunk-MZBIET7Y.mjs";
9
9
  import {
10
10
  __commonJS,
11
11
  __privateAdd,
@@ -13,7 +13,7 @@ import {
13
13
  __privateSet,
14
14
  __privateWrapper,
15
15
  __toESM
16
- } from "./chunk-L5QH2WZE.mjs";
16
+ } from "./chunk-KB3DQ2OE.mjs";
17
17
 
18
18
  // ../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/internal/constants.js
19
19
  var require_constants = __commonJS({
@@ -190,10 +190,10 @@ var require_semver = __commonJS({
190
190
  var { safeRe: re, t } = require_re();
191
191
  var parseOptions = require_parse_options();
192
192
  var { compareIdentifiers } = require_identifiers();
193
- var SemVer = class {
193
+ var SemVer = class _SemVer {
194
194
  constructor(version3, options) {
195
195
  options = parseOptions(options);
196
- if (version3 instanceof SemVer) {
196
+ if (version3 instanceof _SemVer) {
197
197
  if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) {
198
198
  return version3;
199
199
  } else {
@@ -256,11 +256,11 @@ var require_semver = __commonJS({
256
256
  }
257
257
  compare(other) {
258
258
  debug2("SemVer.compare", this.version, this.options, other);
259
- if (!(other instanceof SemVer)) {
259
+ if (!(other instanceof _SemVer)) {
260
260
  if (typeof other === "string" && other === this.version) {
261
261
  return 0;
262
262
  }
263
- other = new SemVer(other, this.options);
263
+ other = new _SemVer(other, this.options);
264
264
  }
265
265
  if (other.version === this.version) {
266
266
  return 0;
@@ -268,14 +268,14 @@ var require_semver = __commonJS({
268
268
  return this.compareMain(other) || this.comparePre(other);
269
269
  }
270
270
  compareMain(other) {
271
- if (!(other instanceof SemVer)) {
272
- other = new SemVer(other, this.options);
271
+ if (!(other instanceof _SemVer)) {
272
+ other = new _SemVer(other, this.options);
273
273
  }
274
274
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
275
275
  }
276
276
  comparePre(other) {
277
- if (!(other instanceof SemVer)) {
278
- other = new SemVer(other, this.options);
277
+ if (!(other instanceof _SemVer)) {
278
+ other = new _SemVer(other, this.options);
279
279
  }
280
280
  if (this.prerelease.length && !other.prerelease.length) {
281
281
  return -1;
@@ -303,8 +303,8 @@ var require_semver = __commonJS({
303
303
  } while (++i);
304
304
  }
305
305
  compareBuild(other) {
306
- if (!(other instanceof SemVer)) {
307
- other = new SemVer(other, this.options);
306
+ if (!(other instanceof _SemVer)) {
307
+ other = new _SemVer(other, this.options);
308
308
  }
309
309
  let i = 0;
310
310
  do {
@@ -1455,14 +1455,14 @@ var require_lru_cache = __commonJS({
1455
1455
  var require_range = __commonJS({
1456
1456
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/range.js"(exports, module) {
1457
1457
  "use strict";
1458
- var Range = class {
1458
+ var Range = class _Range {
1459
1459
  constructor(range, options) {
1460
1460
  options = parseOptions(options);
1461
- if (range instanceof Range) {
1461
+ if (range instanceof _Range) {
1462
1462
  if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
1463
1463
  return range;
1464
1464
  } else {
1465
- return new Range(range.raw, options);
1465
+ return new _Range(range.raw, options);
1466
1466
  }
1467
1467
  }
1468
1468
  if (range instanceof Comparator) {
@@ -1543,7 +1543,7 @@ var require_range = __commonJS({
1543
1543
  return result;
1544
1544
  }
1545
1545
  intersects(range, options) {
1546
- if (!(range instanceof Range)) {
1546
+ if (!(range instanceof _Range)) {
1547
1547
  throw new TypeError("a Range is required");
1548
1548
  }
1549
1549
  return this.set.some((thisComparators) => {
@@ -1814,13 +1814,13 @@ var require_comparator = __commonJS({
1814
1814
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/classes/comparator.js"(exports, module) {
1815
1815
  "use strict";
1816
1816
  var ANY = Symbol("SemVer ANY");
1817
- var Comparator = class {
1817
+ var Comparator = class _Comparator {
1818
1818
  static get ANY() {
1819
1819
  return ANY;
1820
1820
  }
1821
1821
  constructor(comp, options) {
1822
1822
  options = parseOptions(options);
1823
- if (comp instanceof Comparator) {
1823
+ if (comp instanceof _Comparator) {
1824
1824
  if (comp.loose === !!options.loose) {
1825
1825
  return comp;
1826
1826
  } else {
@@ -1873,7 +1873,7 @@ var require_comparator = __commonJS({
1873
1873
  return cmp(version3, this.operator, this.semver, this.options);
1874
1874
  }
1875
1875
  intersects(comp, options) {
1876
- if (!(comp instanceof Comparator)) {
1876
+ if (!(comp instanceof _Comparator)) {
1877
1877
  throw new TypeError("a Comparator is required");
1878
1878
  }
1879
1879
  if (this.operator === "") {
@@ -2523,7 +2523,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2523
2523
  import * as parser from "@slidev/parser/fs";
2524
2524
 
2525
2525
  // package.json
2526
- var version = "0.42.6";
2526
+ var version = "0.42.8";
2527
2527
 
2528
2528
  // node/themes.ts
2529
2529
  import prompts2 from "prompts";
@@ -3,7 +3,7 @@
3
3
  var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
4
4
 
5
5
 
6
- var _chunk6ZL4B4HQjs = require('./chunk-6ZL4B4HQ.js');
6
+ var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
7
7
 
8
8
  // node/plugins/windicss.ts
9
9
  var _path = require('path');
@@ -51,9 +51,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
51
51
  config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
52
52
  });
53
53
  config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
54
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk6ZL4B4HQjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
55
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk6ZL4B4HQjs.resolveImportPath.call(void 0, "katex/package.json", true)));
56
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk6ZL4B4HQjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
54
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
55
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "katex/package.json", true)));
56
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
57
57
  },
58
58
  ...windiOptions
59
59
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-6XVZLT3I.mjs";
4
4
  import {
5
5
  resolveImportPath
6
- } from "./chunk-CIUEQ4TI.mjs";
6
+ } from "./chunk-MZBIET7Y.mjs";
7
7
 
8
8
  // node/plugins/windicss.ts
9
9
  import { dirname, resolve } from "path";
package/dist/cli.js CHANGED
@@ -9,20 +9,20 @@
9
9
 
10
10
 
11
11
 
12
- var _chunk42FDW3LKjs = require('./chunk-42FDW3LK.js');
12
+ var _chunk3YS3H6FWjs = require('./chunk-3YS3H6FW.js');
13
13
 
14
14
 
15
- var _chunkOFNPVCQ3js = require('./chunk-OFNPVCQ3.js');
15
+ var _chunk3UUV7IFAjs = require('./chunk-3UUV7IFA.js');
16
16
 
17
17
 
18
18
  var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
19
- require('./chunk-6ZL4B4HQ.js');
19
+ require('./chunk-34SGGZ4P.js');
20
20
 
21
21
 
22
- var _chunkMJQETB73js = require('./chunk-MJQETB73.js');
22
+ var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
23
23
 
24
24
  // node/cli.ts
25
- var import_fast_deep_equal = _chunkMJQETB73js.__toESM.call(void 0, _chunkOFNPVCQ3js.require_fast_deep_equal.call(void 0, ));
25
+ var import_fast_deep_equal = _chunkQDKRARRUjs.__toESM.call(void 0, _chunk3UUV7IFAjs.require_fast_deep_equal.call(void 0, ));
26
26
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
27
27
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
28
28
  var _child_process = require('child_process');
@@ -49,15 +49,15 @@ _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) =>
49
49
  const roots = (
50
50
  /* uniq */
51
51
  [
52
- _chunk42FDW3LKjs.getUserRoot.call(void 0, {}).userRoot,
53
- ..._chunk42FDW3LKjs.getAddonRoots.call(void 0, addons, ""),
54
- _chunk42FDW3LKjs.getClientRoot.call(void 0, )
52
+ _chunk3YS3H6FWjs.getUserRoot.call(void 0, {}).userRoot,
53
+ ..._chunk3YS3H6FWjs.getAddonRoots.call(void 0, addons, ""),
54
+ _chunk3YS3H6FWjs.getClientRoot.call(void 0, )
55
55
  ]
56
56
  );
57
57
  const mergeArrays = (a, b) => a.concat(b);
58
58
  return await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], false, mergeArrays);
59
59
  });
60
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk42FDW3LKjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
60
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk3YS3H6FWjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
61
61
  cli.command(
62
62
  "* [entry]",
63
63
  "Start a local server for Slidev",
@@ -113,9 +113,9 @@ cli.command(
113
113
  async function initServer() {
114
114
  if (server)
115
115
  await server.close();
116
- const options = await _chunk42FDW3LKjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
116
+ const options = await _chunk3YS3H6FWjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
117
117
  port = userPort || await findFreePort(3030);
118
- server = await _chunk42FDW3LKjs.createServer.call(void 0,
118
+ server = await _chunk3YS3H6FWjs.createServer.call(void 0,
119
119
  options,
120
120
  {
121
121
  server: {
@@ -129,7 +129,7 @@ cli.command(
129
129
  },
130
130
  {
131
131
  onDataReload(newData, data) {
132
- if (!theme && _chunk42FDW3LKjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunk42FDW3LKjs.resolveThemeName.call(void 0, data.config.theme)) {
132
+ if (!theme && _chunk3YS3H6FWjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunk3YS3H6FWjs.resolveThemeName.call(void 0, data.config.theme)) {
133
133
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
134
134
  initServer();
135
135
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -196,13 +196,13 @@ cli.command(
196
196
  async action() {
197
197
  if (!lastRemoteUrl)
198
198
  return;
199
- const qrcode = await Promise.resolve().then(() => require("qrcode-terminal")).then((r) => r.default || r);
200
- qrcode.generate(lastRemoteUrl, { small: true }, (v) => {
199
+ await Promise.resolve().then(() => require("uqr")).then((r) => {
200
+ const code = r.renderUnicodeCompact(lastRemoteUrl);
201
201
  console.log(`
202
202
  ${_kolorist.dim.call(void 0, " QR Code for remote control: ")}
203
203
  ${_kolorist.blue.call(void 0, lastRemoteUrl)}
204
204
  `);
205
- console.log(v.split("\n").map((i) => ` ${i}`).join("\n"));
205
+ console.log(code.split("\n").map((i) => ` ${i}`).join("\n"));
206
206
  });
207
207
  }
208
208
  }
@@ -258,9 +258,9 @@ cli.command(
258
258
  }).strict().help(),
259
259
  async (args) => {
260
260
  const { entry, theme, watch, base, download, out, inspect } = args;
261
- const { build } = await Promise.resolve().then(() => require("./build-V5TH5VWM.js"));
261
+ const { build } = await Promise.resolve().then(() => require("./build-5C3436OE.js"));
262
262
  for (const entryFile of entry) {
263
- const options = await _chunk42FDW3LKjs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
263
+ const options = await _chunk3YS3H6FWjs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
264
264
  if (download && !options.data.config.download)
265
265
  options.data.config.download = download;
266
266
  printInfo(options);
@@ -280,9 +280,9 @@ cli.command(
280
280
  (args) => commonOptions(args).strict().help(),
281
281
  async ({ entry }) => {
282
282
  for (const entryFile of entry) {
283
- const data = await _chunk42FDW3LKjs.parser.load(entryFile);
284
- _chunk42FDW3LKjs.parser.prettify(data);
285
- await _chunk42FDW3LKjs.parser.save(data);
283
+ const data = await _chunk3YS3H6FWjs.parser.load(entryFile);
284
+ _chunk3YS3H6FWjs.parser.prettify(data);
285
+ await _chunk3YS3H6FWjs.parser.save(data);
286
286
  }
287
287
  }
288
288
  );
@@ -298,17 +298,17 @@ cli.command(
298
298
  default: "theme"
299
299
  }),
300
300
  async ({ entry, dir, theme: themeInput }) => {
301
- const data = await _chunk42FDW3LKjs.parser.load(entry);
302
- const theme = _chunk42FDW3LKjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
301
+ const data = await _chunk3YS3H6FWjs.parser.load(entry);
302
+ const theme = _chunk3YS3H6FWjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
303
303
  if (theme === "none") {
304
304
  console.error('Cannot eject theme "none"');
305
305
  _process2.default.exit(1);
306
306
  }
307
- if (_chunk42FDW3LKjs.isPath.call(void 0, theme)) {
307
+ if (_chunk3YS3H6FWjs.isPath.call(void 0, theme)) {
308
308
  console.error("Theme is already ejected");
309
309
  _process2.default.exit(1);
310
310
  }
311
- const roots = _chunk42FDW3LKjs.getThemeRoots.call(void 0, theme, entry);
311
+ const roots = _chunk3YS3H6FWjs.getThemeRoots.call(void 0, theme, entry);
312
312
  if (!roots.length) {
313
313
  console.error(`Could not find theme "${theme}"`);
314
314
  _process2.default.exit(1);
@@ -320,7 +320,7 @@ cli.command(
320
320
  const dirPath = `./${dir}`;
321
321
  data.slides[0].frontmatter.theme = dirPath;
322
322
  data.slides[0].raw = null;
323
- await _chunk42FDW3LKjs.parser.save(data);
323
+ await _chunk3YS3H6FWjs.parser.save(data);
324
324
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
325
325
  }
326
326
  );
@@ -337,11 +337,11 @@ cli.command(
337
337
  async (args) => {
338
338
  const { entry, theme } = args;
339
339
  _process2.default.env.NODE_ENV = "production";
340
- const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-PN4EOI4Z.js"));
340
+ const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-BGMCS4F2.js"));
341
341
  const port = await findFreePort(12445);
342
342
  for (const entryFile of entry) {
343
- const options = await _chunk42FDW3LKjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
344
- const server = await _chunk42FDW3LKjs.createServer.call(void 0,
343
+ const options = await _chunk3YS3H6FWjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
344
+ const server = await _chunk3YS3H6FWjs.createServer.call(void 0,
345
345
  options,
346
346
  {
347
347
  server: { port },
@@ -350,7 +350,7 @@ cli.command(
350
350
  );
351
351
  await server.listen(port);
352
352
  printInfo(options);
353
- _chunk42FDW3LKjs.parser.filterDisabled(options.data);
353
+ _chunk3YS3H6FWjs.parser.filterDisabled(options.data);
354
354
  const result = await exportSlides({
355
355
  port,
356
356
  ...getExportOptions({ ...args, entry: entryFile }, options)
@@ -383,11 +383,11 @@ cli.command(
383
383
  timeout
384
384
  }) => {
385
385
  _process2.default.env.NODE_ENV = "production";
386
- const { exportNotes } = await Promise.resolve().then(() => require("./export-PN4EOI4Z.js"));
386
+ const { exportNotes } = await Promise.resolve().then(() => require("./export-BGMCS4F2.js"));
387
387
  const port = await findFreePort(12445);
388
388
  for (const entryFile of entry) {
389
- const options = await _chunk42FDW3LKjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
390
- const server = await _chunk42FDW3LKjs.createServer.call(void 0,
389
+ const options = await _chunk3YS3H6FWjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
390
+ const server = await _chunk3YS3H6FWjs.createServer.call(void 0,
391
391
  options,
392
392
  {
393
393
  server: { port },
@@ -396,7 +396,7 @@ cli.command(
396
396
  );
397
397
  await server.listen(port);
398
398
  printInfo(options);
399
- _chunk42FDW3LKjs.parser.filterDisabled(options.data);
399
+ _chunk3YS3H6FWjs.parser.filterDisabled(options.data);
400
400
  const result = await exportNotes({
401
401
  port,
402
402
  output: output || (options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entryFile, ".md")}-export-notes`),
@@ -457,7 +457,7 @@ function printInfo(options, port, remote, tunnelUrl) {
457
457
  console.log();
458
458
  console.log();
459
459
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
460
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk42FDW3LKjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
460
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk3YS3H6FWjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
461
461
  console.log();
462
462
  _parser.verifyConfig.call(void 0, options.data.config, options.data.themeMeta, (v) => console.warn(_kolorist.yellow.call(void 0, ` ! ${v}`)));
463
463
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
package/dist/cli.mjs CHANGED
@@ -9,17 +9,17 @@ import {
9
9
  resolveOptions,
10
10
  resolveThemeName,
11
11
  version
12
- } from "./chunk-T4MW747S.mjs";
12
+ } from "./chunk-REQPWSOF.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
- } from "./chunk-FP2Y7WJ3.mjs";
15
+ } from "./chunk-GZGDDQJD.mjs";
16
16
  import {
17
17
  loadSetups
18
18
  } from "./chunk-6XVZLT3I.mjs";
19
- import "./chunk-CIUEQ4TI.mjs";
19
+ import "./chunk-MZBIET7Y.mjs";
20
20
  import {
21
21
  __toESM
22
- } from "./chunk-L5QH2WZE.mjs";
22
+ } from "./chunk-KB3DQ2OE.mjs";
23
23
 
24
24
  // node/cli.ts
25
25
  var import_fast_deep_equal = __toESM(require_fast_deep_equal());
@@ -196,13 +196,13 @@ cli.command(
196
196
  async action() {
197
197
  if (!lastRemoteUrl)
198
198
  return;
199
- const qrcode = await import("qrcode-terminal").then((r) => r.default || r);
200
- qrcode.generate(lastRemoteUrl, { small: true }, (v) => {
199
+ await import("uqr").then((r) => {
200
+ const code = r.renderUnicodeCompact(lastRemoteUrl);
201
201
  console.log(`
202
202
  ${dim(" QR Code for remote control: ")}
203
203
  ${blue(lastRemoteUrl)}
204
204
  `);
205
- console.log(v.split("\n").map((i) => ` ${i}`).join("\n"));
205
+ console.log(code.split("\n").map((i) => ` ${i}`).join("\n"));
206
206
  });
207
207
  }
208
208
  }
@@ -258,7 +258,7 @@ cli.command(
258
258
  }).strict().help(),
259
259
  async (args) => {
260
260
  const { entry, theme, watch, base, download, out, inspect } = args;
261
- const { build } = await import("./build-4X66UIV5.mjs");
261
+ const { build } = await import("./build-6GVZNR3H.mjs");
262
262
  for (const entryFile of entry) {
263
263
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
264
264
  if (download && !options.data.config.download)
@@ -337,7 +337,7 @@ cli.command(
337
337
  async (args) => {
338
338
  const { entry, theme } = args;
339
339
  process.env.NODE_ENV = "production";
340
- const { exportSlides, getExportOptions } = await import("./export-KRS4L4HC.mjs");
340
+ const { exportSlides, getExportOptions } = await import("./export-6G7WYT32.mjs");
341
341
  const port = await findFreePort(12445);
342
342
  for (const entryFile of entry) {
343
343
  const options = await resolveOptions({ entry: entryFile, theme }, "export");
@@ -383,7 +383,7 @@ cli.command(
383
383
  timeout
384
384
  }) => {
385
385
  process.env.NODE_ENV = "production";
386
- const { exportNotes } = await import("./export-KRS4L4HC.mjs");
386
+ const { exportNotes } = await import("./export-6G7WYT32.mjs");
387
387
  const port = await findFreePort(12445);
388
388
  for (const entryFile of entry) {
389
389
  const options = await resolveOptions({ entry: entryFile }, "export");
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  packageExists
3
- } from "./chunk-CIUEQ4TI.mjs";
4
- import "./chunk-L5QH2WZE.mjs";
3
+ } from "./chunk-MZBIET7Y.mjs";
4
+ import "./chunk-KB3DQ2OE.mjs";
5
5
 
6
6
  // node/export.ts
7
7
  import path from "path";
@@ -225,7 +225,7 @@ async function exportSlides({
225
225
  await fs.writeFile(output, buffer);
226
226
  }
227
227
  async function genPagePdfOnePiece() {
228
- var _a;
228
+ var _a, _b, _c, _d, _e, _f;
229
229
  await go("print");
230
230
  const slideIndexes = await getSlidesIndex();
231
231
  await page.pdf({
@@ -248,6 +248,14 @@ async function exportSlides({
248
248
  pdf.setTitle(titleSlide.title);
249
249
  if ((_a = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _a.info)
250
250
  pdf.setSubject(titleSlide.frontmatter.info);
251
+ if ((_b = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _b.author)
252
+ pdf.setAuthor(titleSlide.frontmatter.author);
253
+ if ((_c = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _c.keywords) {
254
+ if (Array.isArray((_d = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _d.keywords))
255
+ pdf.setKeywords((_e = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _e.keywords);
256
+ else
257
+ pdf.setKeywords((_f = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _f.keywords.split(","));
258
+ }
251
259
  if (withToc) {
252
260
  const outlinePdf = outlinePdfFactory(pdfLib);
253
261
  const tocTree = slides.filter((slide) => slide.title).reduce((acc, slide) => {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk6ZL4B4HQjs = require('./chunk-6ZL4B4HQ.js');
4
- require('./chunk-MJQETB73.js');
3
+ var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
4
+ require('./chunk-QDKRARRU.js');
5
5
 
6
6
  // node/export.ts
7
7
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
@@ -77,7 +77,7 @@ async function exportNotes({
77
77
  output = "notes",
78
78
  timeout = 3e4
79
79
  }) {
80
- if (!_chunk6ZL4B4HQjs.packageExists.call(void 0, "playwright-chromium"))
80
+ if (!_chunk34SGGZ4Pjs.packageExists.call(void 0, "playwright-chromium"))
81
81
  throw new Error("The exporting for Slidev is powered by Playwright, please install it via `npm i -D playwright-chromium`");
82
82
  const { chromium } = await Promise.resolve().then(() => require("playwright-chromium"));
83
83
  const browser = await chromium.launch();
@@ -123,7 +123,7 @@ async function exportSlides({
123
123
  withToc = false,
124
124
  perSlide = false
125
125
  }) {
126
- if (!_chunk6ZL4B4HQjs.packageExists.call(void 0, "playwright-chromium"))
126
+ if (!_chunk34SGGZ4Pjs.packageExists.call(void 0, "playwright-chromium"))
127
127
  throw new Error("The exporting for Slidev is powered by Playwright, please install it via `npm i -D playwright-chromium`");
128
128
  const pages = _core.parseRangeString.call(void 0, total, range);
129
129
  const { chromium } = await Promise.resolve().then(() => require("playwright-chromium"));
@@ -225,7 +225,7 @@ async function exportSlides({
225
225
  await _fsextra2.default.writeFile(output, buffer);
226
226
  }
227
227
  async function genPagePdfOnePiece() {
228
- var _a;
228
+ var _a, _b, _c, _d, _e, _f;
229
229
  await go("print");
230
230
  const slideIndexes = await getSlidesIndex();
231
231
  await page.pdf({
@@ -248,6 +248,14 @@ async function exportSlides({
248
248
  pdf.setTitle(titleSlide.title);
249
249
  if ((_a = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _a.info)
250
250
  pdf.setSubject(titleSlide.frontmatter.info);
251
+ if ((_b = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _b.author)
252
+ pdf.setAuthor(titleSlide.frontmatter.author);
253
+ if ((_c = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _c.keywords) {
254
+ if (Array.isArray((_d = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _d.keywords))
255
+ pdf.setKeywords((_e = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _e.keywords);
256
+ else
257
+ pdf.setKeywords((_f = titleSlide == null ? void 0 : titleSlide.frontmatter) == null ? void 0 : _f.keywords.split(","));
258
+ }
251
259
  if (withToc) {
252
260
  const outlinePdf = _outlinepdf.outlinePdfFactory.call(void 0, pdfLib);
253
261
  const tocTree = slides.filter((slide) => slide.title).reduce((acc, slide) => {
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@ import Vue from '@vitejs/plugin-vue';
2
2
  import VueJsx from '@vitejs/plugin-vue-jsx';
3
3
  import Icons from 'unplugin-icons/vite';
4
4
  import Components from 'unplugin-vue-components/vite';
5
- import Markdown from 'vite-plugin-vue-markdown';
5
+ import Markdown from 'unplugin-vue-markdown/vite';
6
6
  import WindiCSS from 'vite-plugin-windicss';
7
7
  import { VitePluginConfig } from 'unocss/vite';
8
8
  import RemoteAssets from 'vite-plugin-remote-assets';
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import Vue from '@vitejs/plugin-vue';
2
2
  import VueJsx from '@vitejs/plugin-vue-jsx';
3
3
  import Icons from 'unplugin-icons/vite';
4
4
  import Components from 'unplugin-vue-components/vite';
5
- import Markdown from 'vite-plugin-vue-markdown';
5
+ import Markdown from 'unplugin-vue-markdown/vite';
6
6
  import WindiCSS from 'vite-plugin-windicss';
7
7
  import { VitePluginConfig } from 'unocss/vite';
8
8
  import RemoteAssets from 'vite-plugin-remote-assets';