@slidev/cli 0.28.5 → 0.28.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.
@@ -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 }; }
2
2
 
3
3
 
4
- var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
4
+ var _chunkADOJPBM5js = require('./chunk-ADOJPBM5.js');
5
5
 
6
6
 
7
7
 
@@ -655,12 +655,12 @@ async function build(options, viteConfig = {}) {
655
655
  let originalIndexHTML;
656
656
  if (_fsextra2.default.existsSync(indexPath))
657
657
  originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
658
- await _fsextra2.default.writeFile(indexPath, await _chunkMFCJMLB5js.getIndexHtml.call(void 0, options), "utf-8");
658
+ await _fsextra2.default.writeFile(indexPath, await _chunkADOJPBM5js.getIndexHtml.call(void 0, options), "utf-8");
659
659
  let config = void 0;
660
660
  try {
661
661
  const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
662
662
  plugins: [
663
- await _chunkMFCJMLB5js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
663
+ await _chunkADOJPBM5js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
664
664
  {
665
665
  name: "resolve-config",
666
666
  configResolved(_config) {
@@ -710,7 +710,7 @@ async function build(options, viteConfig = {}) {
710
710
  await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
711
711
  `, "utf-8");
712
712
  if ([true, "true", "auto"].includes(options.data.config.download)) {
713
- const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-XYTYZSD3.js")));
713
+ const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-75HYECKB.js")));
714
714
  const port = 12445;
715
715
  const app = _connect2.default.call(void 0, );
716
716
  const server = _http2.default.createServer(app);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml
4
- } from "./chunk-GWFBEY26.mjs";
4
+ } from "./chunk-UM6ZQCRB.mjs";
5
5
  import {
6
6
  __require,
7
7
  __spreadValues,
@@ -710,7 +710,7 @@ async function build(options, viteConfig = {}) {
710
710
  await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
711
711
  `, "utf-8");
712
712
  if ([true, "true", "auto"].includes(options.data.config.download)) {
713
- const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-2WDF6LJW.mjs")));
713
+ const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-QCGE4YB6.mjs")));
714
714
  const port = 12445;
715
715
  const app = connect();
716
716
  const server = http.createServer(app);
@@ -242,25 +242,25 @@ var dependencies = {
242
242
  "@antfu/utils": "^0.5.0",
243
243
  "@slidev/parser": "workspace:*",
244
244
  "@slidev/types": "workspace:*",
245
- "@vueuse/core": "^7.6.0",
245
+ "@vueuse/core": "^7.6.2",
246
246
  "@vueuse/head": "^0.7.5",
247
247
  "@vueuse/motion": "^2.0.0-beta.9",
248
- codemirror: "^5.65.1",
248
+ codemirror: "^5.65.2",
249
249
  drauu: "^0.2.1",
250
250
  "file-saver": "^2.0.5",
251
251
  "js-base64": "^3.7.2",
252
252
  "js-yaml": "^4.1.0",
253
253
  katex: "^0.15.2",
254
- mermaid: "8.13.0",
254
+ mermaid: "^8.14.0",
255
255
  "monaco-editor": "^0.32.1",
256
- nanoid: "^3.2.0",
256
+ nanoid: "^3.3.1",
257
257
  prettier: "^2.5.1",
258
258
  recordrtc: "^5.6.2",
259
259
  resolve: "^1.22.0",
260
- "vite-plugin-windicss": "^1.7.0",
261
- vue: "^3.2.30",
260
+ "vite-plugin-windicss": "^1.7.1",
261
+ vue: "^3.2.31",
262
262
  "vue-router": "^4.0.12",
263
- windicss: "^3.4.3"
263
+ windicss: "^3.4.4"
264
264
  };
265
265
 
266
266
  // node/vite/searchRoot.ts
@@ -559,10 +559,17 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
559
559
  if (match) {
560
560
  const [, no, type] = match;
561
561
  const pageNo = parseInt(no) - 1;
562
- if (type === "md")
563
- return (_a = data.slides[pageNo]) == null ? void 0 : _a.content;
562
+ if (type === "md") {
563
+ return {
564
+ code: (_a = data.slides[pageNo]) == null ? void 0 : _a.content,
565
+ map: {}
566
+ };
567
+ }
564
568
  }
565
- return "";
569
+ return {
570
+ code: "",
571
+ map: {}
572
+ };
566
573
  }
567
574
  }
568
575
  },
@@ -1303,22 +1310,31 @@ function createFixPlugins(options) {
1303
1310
  var customElements = /* @__PURE__ */ new Set([
1304
1311
  "annotation",
1305
1312
  "math",
1306
- "mrow",
1307
- "mcol",
1313
+ "menclose",
1308
1314
  "mfrac",
1315
+ "mglyph",
1309
1316
  "mi",
1317
+ "mlabeledtr",
1310
1318
  "mn",
1311
1319
  "mo",
1312
1320
  "mover",
1321
+ "mpadded",
1322
+ "mphantom",
1323
+ "mroot",
1324
+ "mrow",
1313
1325
  "mspace",
1326
+ "msqrt",
1327
+ "mstyle",
1328
+ "msub",
1329
+ "msubsup",
1330
+ "msup",
1314
1331
  "mtable",
1315
1332
  "mtd",
1316
- "msup",
1317
- "msqrt",
1333
+ "mtext",
1318
1334
  "mtr",
1319
- "semantics",
1320
- "mstyle",
1321
- "mtext"
1335
+ "munder",
1336
+ "munderover",
1337
+ "semantics"
1322
1338
  ]);
1323
1339
  async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1324
1340
  const {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ViteSlidevPlugin
3
- } from "./chunk-GWFBEY26.mjs";
3
+ } from "./chunk-UM6ZQCRB.mjs";
4
4
  import {
5
5
  init_esm_shims
6
6
  } from "./chunk-4OPORETI.mjs";
@@ -5372,21 +5372,22 @@ async function saveExternalSlide(slide) {
5372
5372
  init_esm_shims();
5373
5373
 
5374
5374
  // package.json
5375
- var version = "0.28.5";
5375
+ var version = "0.28.8";
5376
5376
 
5377
5377
  // node/themes.ts
5378
5378
  init_esm_shims();
5379
5379
  import prompts from "prompts";
5380
5380
 
5381
- // ../../node_modules/.pnpm/@antfu+ni@0.12.0/node_modules/@antfu/ni/dist/index.mjs
5381
+ // ../../node_modules/.pnpm/@antfu+ni@0.13.2/node_modules/@antfu/ni/dist/index.mjs
5382
5382
  init_esm_shims();
5383
5383
 
5384
- // ../../node_modules/.pnpm/@antfu+ni@0.12.0/node_modules/@antfu/ni/dist/chunk-7FS5ZXAO.mjs
5384
+ // ../../node_modules/.pnpm/@antfu+ni@0.13.2/node_modules/@antfu/ni/dist/chunk-VUUH4WJE.mjs
5385
5385
  init_esm_shims();
5386
5386
  import os from "os";
5387
5387
  import { execSync } from "child_process";
5388
5388
  import fs2 from "fs";
5389
5389
  import path from "path";
5390
+ import fs22 from "fs";
5390
5391
  import path2 from "path";
5391
5392
  import { resolve as resolve2 } from "path";
5392
5393
  var __create = Object.create;
@@ -5448,7 +5449,7 @@ var require_windows = __commonJS2({
5448
5449
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
5449
5450
  module.exports = isexe;
5450
5451
  isexe.sync = sync;
5451
- var fs22 = __require2("fs");
5452
+ var fs32 = __require2("fs");
5452
5453
  function checkPathExt(path3, options) {
5453
5454
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
5454
5455
  if (!pathext) {
@@ -5473,12 +5474,12 @@ var require_windows = __commonJS2({
5473
5474
  return checkPathExt(path3, options);
5474
5475
  }
5475
5476
  function isexe(path3, options, cb) {
5476
- fs22.stat(path3, function(er, stat) {
5477
+ fs32.stat(path3, function(er, stat) {
5477
5478
  cb(er, er ? false : checkStat(stat, path3, options));
5478
5479
  });
5479
5480
  }
5480
5481
  function sync(path3, options) {
5481
- return checkStat(fs22.statSync(path3), path3, options);
5482
+ return checkStat(fs32.statSync(path3), path3, options);
5482
5483
  }
5483
5484
  }
5484
5485
  });
@@ -5486,14 +5487,14 @@ var require_mode = __commonJS2({
5486
5487
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
5487
5488
  module.exports = isexe;
5488
5489
  isexe.sync = sync;
5489
- var fs22 = __require2("fs");
5490
+ var fs32 = __require2("fs");
5490
5491
  function isexe(path3, options, cb) {
5491
- fs22.stat(path3, function(er, stat) {
5492
+ fs32.stat(path3, function(er, stat) {
5492
5493
  cb(er, er ? false : checkStat(stat, options));
5493
5494
  });
5494
5495
  }
5495
5496
  function sync(path3, options) {
5496
- return checkStat(fs22.statSync(path3), options);
5497
+ return checkStat(fs32.statSync(path3), options);
5497
5498
  }
5498
5499
  function checkStat(stat, options) {
5499
5500
  return stat.isFile() && checkMode(stat, options);
@@ -5515,7 +5516,7 @@ var require_mode = __commonJS2({
5515
5516
  });
5516
5517
  var require_isexe = __commonJS2({
5517
5518
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
5518
- var fs22 = __require2("fs");
5519
+ var fs32 = __require2("fs");
5519
5520
  var core2;
5520
5521
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
5521
5522
  core2 = require_windows();
@@ -10855,11 +10856,11 @@ var require_locate_path = __commonJS2({
10855
10856
  "node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports, module) {
10856
10857
  "use strict";
10857
10858
  var path3 = __require2("path");
10858
- var fs22 = __require2("fs");
10859
+ var fs32 = __require2("fs");
10859
10860
  var { promisify } = __require2("util");
10860
10861
  var pLocate = require_p_locate();
10861
- var fsStat = promisify(fs22.stat);
10862
- var fsLStat = promisify(fs22.lstat);
10862
+ var fsStat = promisify(fs32.stat);
10863
+ var fsLStat = promisify(fs32.lstat);
10863
10864
  var typeMappings = {
10864
10865
  directory: "isDirectory",
10865
10866
  file: "isFile"
@@ -10895,7 +10896,7 @@ var require_locate_path = __commonJS2({
10895
10896
  type: "file"
10896
10897
  }, options);
10897
10898
  checkType(options);
10898
- const statFn = options.allowSymlinks ? fs22.statSync : fs22.lstatSync;
10899
+ const statFn = options.allowSymlinks ? fs32.statSync : fs32.lstatSync;
10899
10900
  for (const path_ of paths) {
10900
10901
  try {
10901
10902
  const stat = statFn(path3.resolve(options.cwd, path_));
@@ -10911,9 +10912,9 @@ var require_locate_path = __commonJS2({
10911
10912
  var require_path_exists = __commonJS2({
10912
10913
  "node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports, module) {
10913
10914
  "use strict";
10914
- var fs22 = __require2("fs");
10915
+ var fs32 = __require2("fs");
10915
10916
  var { promisify } = __require2("util");
10916
- var pAccess = promisify(fs22.access);
10917
+ var pAccess = promisify(fs32.access);
10917
10918
  module.exports = async (path3) => {
10918
10919
  try {
10919
10920
  await pAccess(path3);
@@ -10924,7 +10925,7 @@ var require_path_exists = __commonJS2({
10924
10925
  };
10925
10926
  module.exports.sync = (path3) => {
10926
10927
  try {
10927
- fs22.accessSync(path3);
10928
+ fs32.accessSync(path3);
10928
10929
  return true;
10929
10930
  } catch (_) {
10930
10931
  return false;
@@ -11105,16 +11106,16 @@ var require_shebang_command = __commonJS2({
11105
11106
  var require_readShebang = __commonJS2({
11106
11107
  "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
11107
11108
  "use strict";
11108
- var fs22 = __require2("fs");
11109
+ var fs32 = __require2("fs");
11109
11110
  var shebangCommand = require_shebang_command();
11110
11111
  function readShebang(command) {
11111
11112
  const size = 150;
11112
11113
  const buffer = Buffer.alloc(size);
11113
11114
  let fd;
11114
11115
  try {
11115
- fd = fs22.openSync(command, "r");
11116
- fs22.readSync(fd, buffer, 0, size, 0);
11117
- fs22.closeSync(fd);
11116
+ fd = fs32.openSync(command, "r");
11117
+ fs32.readSync(fd, buffer, 0, size, 0);
11118
+ fs32.closeSync(fd);
11118
11119
  } catch (e) {
11119
11120
  }
11120
11121
  return shebangCommand(buffer.toString());
@@ -12819,7 +12820,7 @@ function getVoltaPrefix() {
12819
12820
  const hasVoltaCommand = import_which.default.sync("volta", { nothrow: true }) !== null;
12820
12821
  return hasVoltaCommand ? VOLTA_PREFIX : "";
12821
12822
  }
12822
- var version2 = "0.12.0";
12823
+ var version2 = "0.13.2";
12823
12824
  var npmRun = (agent) => (args) => {
12824
12825
  if (args.length > 1)
12825
12826
  return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
@@ -12827,7 +12828,7 @@ var npmRun = (agent) => (args) => {
12827
12828
  return `${agent} run ${args[0]}`;
12828
12829
  };
12829
12830
  var AGENTS = {
12830
- npm: {
12831
+ "npm": {
12831
12832
  "run": npmRun("npm"),
12832
12833
  "install": "npm i",
12833
12834
  "frozen": "npm ci",
@@ -12839,7 +12840,7 @@ var AGENTS = {
12839
12840
  "uninstall": "npm uninstall {0}",
12840
12841
  "global_uninstall": "npm uninstall -g {0}"
12841
12842
  },
12842
- yarn: {
12843
+ "yarn": {
12843
12844
  "run": "yarn run {0}",
12844
12845
  "install": "yarn install",
12845
12846
  "frozen": "yarn install --frozen-lockfile",
@@ -12851,7 +12852,19 @@ var AGENTS = {
12851
12852
  "uninstall": "yarn remove {0}",
12852
12853
  "global_uninstall": "yarn global remove {0}"
12853
12854
  },
12854
- pnpm: {
12855
+ "yarn@berry": {
12856
+ "run": "yarn run {0}",
12857
+ "install": "yarn install",
12858
+ "frozen": "yarn install --immutable",
12859
+ "global": "npm i -g {0}",
12860
+ "add": "yarn add {0}",
12861
+ "upgrade": "yarn up {0}",
12862
+ "upgrade-interactive": "yarn up -i {0}",
12863
+ "execute": "yarn dlx {0}",
12864
+ "uninstall": "yarn remove {0}",
12865
+ "global_uninstall": "npm uninstall -g {0}"
12866
+ },
12867
+ "pnpm": {
12855
12868
  "run": npmRun("pnpm"),
12856
12869
  "install": "pnpm i",
12857
12870
  "frozen": "pnpm i --frozen-lockfile",
@@ -12871,9 +12884,10 @@ var LOCKS = {
12871
12884
  "package-lock.json": "npm"
12872
12885
  };
12873
12886
  var INSTALL_PAGE = {
12874
- pnpm: "https://pnpm.js.org/en/installation",
12875
- yarn: "https://yarnpkg.com/getting-started/install",
12876
- npm: "https://www.npmjs.com/get-npm"
12887
+ "pnpm": "https://pnpm.js.org/en/installation",
12888
+ "yarn": "https://classic.yarnpkg.com/en/docs/install",
12889
+ "yarn@berry": "https://yarnpkg.com/getting-started/install",
12890
+ "npm": "https://www.npmjs.com/get-npm"
12877
12891
  };
12878
12892
  function getCommand(agent, command, args = []) {
12879
12893
  if (!(agent in AGENTS))
@@ -12922,9 +12936,9 @@ async function getConfig() {
12922
12936
  let packageManager = "";
12923
12937
  if (result)
12924
12938
  packageManager = (_a = JSON.parse(fs2.readFileSync(result, "utf8")).packageManager) != null ? _a : "";
12925
- const [, agent] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join("|")})@.*?$`)) || [];
12939
+ const [, agent, version22] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join("|")})@(d).*?$`)) || [];
12926
12940
  if (agent)
12927
- config = Object.assign({}, defaultConfig, { defaultAgent: agent });
12941
+ config = Object.assign({}, defaultConfig, { defaultAgent: agent === "yarn" && parseInt(version22) > 1 ? "yarn@berry" : agent });
12928
12942
  else if (!fs2.existsSync(rcPath))
12929
12943
  config = defaultConfig;
12930
12944
  else
@@ -13074,11 +13088,33 @@ terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, __spr
13074
13088
  terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
13075
13089
  var import_prompts = __toModule2(require_prompts3());
13076
13090
  async function detect({ autoInstall, cwd }) {
13077
- const result = await (0, import_find_up2.default)(Object.keys(LOCKS), { cwd });
13078
- const agent = result ? LOCKS[path2.basename(result)] : null;
13079
- if (agent && !cmdExists(agent)) {
13091
+ let agent = null;
13092
+ const lockPath = await (0, import_find_up2.default)(Object.keys(LOCKS), { cwd });
13093
+ let packageJsonPath;
13094
+ if (lockPath)
13095
+ packageJsonPath = path2.resolve(lockPath, "../package.json");
13096
+ else
13097
+ packageJsonPath = await (0, import_find_up2.default)("package.json", { cwd });
13098
+ if (packageJsonPath && fs22.existsSync(packageJsonPath)) {
13099
+ try {
13100
+ const pkg = JSON.parse(fs22.readFileSync(packageJsonPath, "utf8"));
13101
+ if (typeof pkg.packageManager === "string") {
13102
+ const [name, version22] = pkg.packageManager.split("@");
13103
+ if (name === "yarn" && parseInt(version22) > 1)
13104
+ agent = "yarn@berry";
13105
+ else if (name in AGENTS)
13106
+ agent = name;
13107
+ else
13108
+ console.warn("[ni] Unknown packageManager:", pkg.packageManager);
13109
+ }
13110
+ } catch {
13111
+ }
13112
+ }
13113
+ if (!agent && lockPath)
13114
+ agent = LOCKS[path2.basename(lockPath)];
13115
+ if (agent && !cmdExists(agent.split("@")[0])) {
13080
13116
  if (!autoInstall) {
13081
- console.warn(`Detected ${agent} but it doesn't seem to be installed.
13117
+ console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
13082
13118
  `);
13083
13119
  if (process.env.CI)
13084
13120
  process.exit(1);
@@ -13118,7 +13154,7 @@ async function run(fn, args, options = {}) {
13118
13154
  name: "agent",
13119
13155
  type: "select",
13120
13156
  message: "Choose the agent",
13121
- choices: agents.map((value) => ({ title: value, value }))
13157
+ choices: agents.filter((i) => !i.includes("@")).map((value) => ({ title: value, value }))
13122
13158
  })).agent;
13123
13159
  if (!agent)
13124
13160
  return;
@@ -243,25 +243,25 @@ var dependencies = {
243
243
  "@antfu/utils": "^0.5.0",
244
244
  "@slidev/parser": "workspace:*",
245
245
  "@slidev/types": "workspace:*",
246
- "@vueuse/core": "^7.6.0",
246
+ "@vueuse/core": "^7.6.2",
247
247
  "@vueuse/head": "^0.7.5",
248
248
  "@vueuse/motion": "^2.0.0-beta.9",
249
- codemirror: "^5.65.1",
249
+ codemirror: "^5.65.2",
250
250
  drauu: "^0.2.1",
251
251
  "file-saver": "^2.0.5",
252
252
  "js-base64": "^3.7.2",
253
253
  "js-yaml": "^4.1.0",
254
254
  katex: "^0.15.2",
255
- mermaid: "8.13.0",
255
+ mermaid: "^8.14.0",
256
256
  "monaco-editor": "^0.32.1",
257
- nanoid: "^3.2.0",
257
+ nanoid: "^3.3.1",
258
258
  prettier: "^2.5.1",
259
259
  recordrtc: "^5.6.2",
260
260
  resolve: "^1.22.0",
261
- "vite-plugin-windicss": "^1.7.0",
262
- vue: "^3.2.30",
261
+ "vite-plugin-windicss": "^1.7.1",
262
+ vue: "^3.2.31",
263
263
  "vue-router": "^4.0.12",
264
- windicss: "^3.4.3"
264
+ windicss: "^3.4.4"
265
265
  };
266
266
 
267
267
  // node/vite/searchRoot.ts
@@ -560,10 +560,17 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
560
560
  if (match) {
561
561
  const [, no, type] = match;
562
562
  const pageNo = parseInt(no) - 1;
563
- if (type === "md")
564
- return (_a = data.slides[pageNo]) == null ? void 0 : _a.content;
563
+ if (type === "md") {
564
+ return {
565
+ code: (_a = data.slides[pageNo]) == null ? void 0 : _a.content,
566
+ map: {}
567
+ };
568
+ }
565
569
  }
566
- return "";
570
+ return {
571
+ code: "",
572
+ map: {}
573
+ };
567
574
  }
568
575
  }
569
576
  },
@@ -1304,22 +1311,31 @@ function createFixPlugins(options) {
1304
1311
  var customElements = /* @__PURE__ */ new Set([
1305
1312
  "annotation",
1306
1313
  "math",
1307
- "mrow",
1308
- "mcol",
1314
+ "menclose",
1309
1315
  "mfrac",
1316
+ "mglyph",
1310
1317
  "mi",
1318
+ "mlabeledtr",
1311
1319
  "mn",
1312
1320
  "mo",
1313
1321
  "mover",
1322
+ "mpadded",
1323
+ "mphantom",
1324
+ "mroot",
1325
+ "mrow",
1314
1326
  "mspace",
1327
+ "msqrt",
1328
+ "mstyle",
1329
+ "msub",
1330
+ "msubsup",
1331
+ "msup",
1315
1332
  "mtable",
1316
1333
  "mtd",
1317
- "msup",
1318
- "msqrt",
1334
+ "mtext",
1319
1335
  "mtr",
1320
- "semantics",
1321
- "mstyle",
1322
- "mtext"
1336
+ "munder",
1337
+ "munderover",
1338
+ "semantics"
1323
1339
  ]);
1324
1340
  async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1325
1341
  const {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
3
+ var _chunkADOJPBM5js = require('./chunk-ADOJPBM5.js');
4
4
 
5
5
 
6
6
  var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
@@ -20,7 +20,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
20
20
  ]
21
21
  },
22
22
  plugins: [
23
- await _chunkMFCJMLB5js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
23
+ await _chunkADOJPBM5js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
24
24
  ]
25
25
  }));
26
26
  return server;
@@ -5371,16 +5371,16 @@ async function saveExternalSlide(slide) {
5371
5371
  _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
5372
5372
 
5373
5373
  // package.json
5374
- var version = "0.28.5";
5374
+ var version = "0.28.8";
5375
5375
 
5376
5376
  // node/themes.ts
5377
5377
  _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
5378
5378
  var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
5379
5379
 
5380
- // ../../node_modules/.pnpm/@antfu+ni@0.12.0/node_modules/@antfu/ni/dist/index.mjs
5380
+ // ../../node_modules/.pnpm/@antfu+ni@0.13.2/node_modules/@antfu/ni/dist/index.mjs
5381
5381
  _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
5382
5382
 
5383
- // ../../node_modules/.pnpm/@antfu+ni@0.12.0/node_modules/@antfu/ni/dist/chunk-7FS5ZXAO.mjs
5383
+ // ../../node_modules/.pnpm/@antfu+ni@0.13.2/node_modules/@antfu/ni/dist/chunk-VUUH4WJE.mjs
5384
5384
  _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
5385
5385
  var _os2 = require('os'); var _os3 = _interopRequireDefault(_os2);
5386
5386
  var _child_process = require('child_process');
@@ -5388,6 +5388,7 @@ var _child_process = require('child_process');
5388
5388
 
5389
5389
 
5390
5390
 
5391
+
5391
5392
  var __create = Object.create;
5392
5393
  var __defProp = Object.defineProperty;
5393
5394
  var __defProps = Object.defineProperties;
@@ -5447,7 +5448,7 @@ var require_windows = __commonJS2({
5447
5448
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
5448
5449
  module.exports = isexe;
5449
5450
  isexe.sync = sync;
5450
- var fs22 = __require2("fs");
5451
+ var fs32 = __require2("fs");
5451
5452
  function checkPathExt(path3, options) {
5452
5453
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
5453
5454
  if (!pathext) {
@@ -5472,12 +5473,12 @@ var require_windows = __commonJS2({
5472
5473
  return checkPathExt(path3, options);
5473
5474
  }
5474
5475
  function isexe(path3, options, cb) {
5475
- fs22.stat(path3, function(er, stat) {
5476
+ fs32.stat(path3, function(er, stat) {
5476
5477
  cb(er, er ? false : checkStat(stat, path3, options));
5477
5478
  });
5478
5479
  }
5479
5480
  function sync(path3, options) {
5480
- return checkStat(fs22.statSync(path3), path3, options);
5481
+ return checkStat(fs32.statSync(path3), path3, options);
5481
5482
  }
5482
5483
  }
5483
5484
  });
@@ -5485,14 +5486,14 @@ var require_mode = __commonJS2({
5485
5486
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
5486
5487
  module.exports = isexe;
5487
5488
  isexe.sync = sync;
5488
- var fs22 = __require2("fs");
5489
+ var fs32 = __require2("fs");
5489
5490
  function isexe(path3, options, cb) {
5490
- fs22.stat(path3, function(er, stat) {
5491
+ fs32.stat(path3, function(er, stat) {
5491
5492
  cb(er, er ? false : checkStat(stat, options));
5492
5493
  });
5493
5494
  }
5494
5495
  function sync(path3, options) {
5495
- return checkStat(fs22.statSync(path3), options);
5496
+ return checkStat(fs32.statSync(path3), options);
5496
5497
  }
5497
5498
  function checkStat(stat, options) {
5498
5499
  return stat.isFile() && checkMode(stat, options);
@@ -5514,7 +5515,7 @@ var require_mode = __commonJS2({
5514
5515
  });
5515
5516
  var require_isexe = __commonJS2({
5516
5517
  "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
5517
- var fs22 = __require2("fs");
5518
+ var fs32 = __require2("fs");
5518
5519
  var core2;
5519
5520
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
5520
5521
  core2 = require_windows();
@@ -10854,11 +10855,11 @@ var require_locate_path = __commonJS2({
10854
10855
  "node_modules/.pnpm/locate-path@6.0.0/node_modules/locate-path/index.js"(exports, module) {
10855
10856
  "use strict";
10856
10857
  var path3 = __require2("path");
10857
- var fs22 = __require2("fs");
10858
+ var fs32 = __require2("fs");
10858
10859
  var { promisify } = __require2("util");
10859
10860
  var pLocate = require_p_locate();
10860
- var fsStat = promisify(fs22.stat);
10861
- var fsLStat = promisify(fs22.lstat);
10861
+ var fsStat = promisify(fs32.stat);
10862
+ var fsLStat = promisify(fs32.lstat);
10862
10863
  var typeMappings = {
10863
10864
  directory: "isDirectory",
10864
10865
  file: "isFile"
@@ -10894,7 +10895,7 @@ var require_locate_path = __commonJS2({
10894
10895
  type: "file"
10895
10896
  }, options);
10896
10897
  checkType(options);
10897
- const statFn = options.allowSymlinks ? fs22.statSync : fs22.lstatSync;
10898
+ const statFn = options.allowSymlinks ? fs32.statSync : fs32.lstatSync;
10898
10899
  for (const path_ of paths) {
10899
10900
  try {
10900
10901
  const stat = statFn(path3.resolve(options.cwd, path_));
@@ -10910,9 +10911,9 @@ var require_locate_path = __commonJS2({
10910
10911
  var require_path_exists = __commonJS2({
10911
10912
  "node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js"(exports, module) {
10912
10913
  "use strict";
10913
- var fs22 = __require2("fs");
10914
+ var fs32 = __require2("fs");
10914
10915
  var { promisify } = __require2("util");
10915
- var pAccess = promisify(fs22.access);
10916
+ var pAccess = promisify(fs32.access);
10916
10917
  module.exports = async (path3) => {
10917
10918
  try {
10918
10919
  await pAccess(path3);
@@ -10923,7 +10924,7 @@ var require_path_exists = __commonJS2({
10923
10924
  };
10924
10925
  module.exports.sync = (path3) => {
10925
10926
  try {
10926
- fs22.accessSync(path3);
10927
+ fs32.accessSync(path3);
10927
10928
  return true;
10928
10929
  } catch (_) {
10929
10930
  return false;
@@ -11104,16 +11105,16 @@ var require_shebang_command = __commonJS2({
11104
11105
  var require_readShebang = __commonJS2({
11105
11106
  "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
11106
11107
  "use strict";
11107
- var fs22 = __require2("fs");
11108
+ var fs32 = __require2("fs");
11108
11109
  var shebangCommand = require_shebang_command();
11109
11110
  function readShebang(command) {
11110
11111
  const size = 150;
11111
11112
  const buffer = Buffer.alloc(size);
11112
11113
  let fd;
11113
11114
  try {
11114
- fd = fs22.openSync(command, "r");
11115
- fs22.readSync(fd, buffer, 0, size, 0);
11116
- fs22.closeSync(fd);
11115
+ fd = fs32.openSync(command, "r");
11116
+ fs32.readSync(fd, buffer, 0, size, 0);
11117
+ fs32.closeSync(fd);
11117
11118
  } catch (e) {
11118
11119
  }
11119
11120
  return shebangCommand(buffer.toString());
@@ -12818,7 +12819,7 @@ function getVoltaPrefix() {
12818
12819
  const hasVoltaCommand = import_which.default.sync("volta", { nothrow: true }) !== null;
12819
12820
  return hasVoltaCommand ? VOLTA_PREFIX : "";
12820
12821
  }
12821
- var version2 = "0.12.0";
12822
+ var version2 = "0.13.2";
12822
12823
  var npmRun = (agent) => (args) => {
12823
12824
  if (args.length > 1)
12824
12825
  return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
@@ -12826,7 +12827,7 @@ var npmRun = (agent) => (args) => {
12826
12827
  return `${agent} run ${args[0]}`;
12827
12828
  };
12828
12829
  var AGENTS = {
12829
- npm: {
12830
+ "npm": {
12830
12831
  "run": npmRun("npm"),
12831
12832
  "install": "npm i",
12832
12833
  "frozen": "npm ci",
@@ -12838,7 +12839,7 @@ var AGENTS = {
12838
12839
  "uninstall": "npm uninstall {0}",
12839
12840
  "global_uninstall": "npm uninstall -g {0}"
12840
12841
  },
12841
- yarn: {
12842
+ "yarn": {
12842
12843
  "run": "yarn run {0}",
12843
12844
  "install": "yarn install",
12844
12845
  "frozen": "yarn install --frozen-lockfile",
@@ -12850,7 +12851,19 @@ var AGENTS = {
12850
12851
  "uninstall": "yarn remove {0}",
12851
12852
  "global_uninstall": "yarn global remove {0}"
12852
12853
  },
12853
- pnpm: {
12854
+ "yarn@berry": {
12855
+ "run": "yarn run {0}",
12856
+ "install": "yarn install",
12857
+ "frozen": "yarn install --immutable",
12858
+ "global": "npm i -g {0}",
12859
+ "add": "yarn add {0}",
12860
+ "upgrade": "yarn up {0}",
12861
+ "upgrade-interactive": "yarn up -i {0}",
12862
+ "execute": "yarn dlx {0}",
12863
+ "uninstall": "yarn remove {0}",
12864
+ "global_uninstall": "npm uninstall -g {0}"
12865
+ },
12866
+ "pnpm": {
12854
12867
  "run": npmRun("pnpm"),
12855
12868
  "install": "pnpm i",
12856
12869
  "frozen": "pnpm i --frozen-lockfile",
@@ -12870,9 +12883,10 @@ var LOCKS = {
12870
12883
  "package-lock.json": "npm"
12871
12884
  };
12872
12885
  var INSTALL_PAGE = {
12873
- pnpm: "https://pnpm.js.org/en/installation",
12874
- yarn: "https://yarnpkg.com/getting-started/install",
12875
- npm: "https://www.npmjs.com/get-npm"
12886
+ "pnpm": "https://pnpm.js.org/en/installation",
12887
+ "yarn": "https://classic.yarnpkg.com/en/docs/install",
12888
+ "yarn@berry": "https://yarnpkg.com/getting-started/install",
12889
+ "npm": "https://www.npmjs.com/get-npm"
12876
12890
  };
12877
12891
  function getCommand(agent, command, args = []) {
12878
12892
  if (!(agent in AGENTS))
@@ -12921,9 +12935,9 @@ async function getConfig() {
12921
12935
  let packageManager = "";
12922
12936
  if (result)
12923
12937
  packageManager = (_a = JSON.parse(_fs2.default.readFileSync(result, "utf8")).packageManager) != null ? _a : "";
12924
- const [, agent] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join("|")})@.*?$`)) || [];
12938
+ const [, agent, version22] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join("|")})@(d).*?$`)) || [];
12925
12939
  if (agent)
12926
- config = Object.assign({}, defaultConfig, { defaultAgent: agent });
12940
+ config = Object.assign({}, defaultConfig, { defaultAgent: agent === "yarn" && parseInt(version22) > 1 ? "yarn@berry" : agent });
12927
12941
  else if (!_fs2.default.existsSync(rcPath))
12928
12942
  config = defaultConfig;
12929
12943
  else
@@ -13073,11 +13087,33 @@ terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, __spr
13073
13087
  terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
13074
13088
  var import_prompts = __toModule2(require_prompts3());
13075
13089
  async function detect({ autoInstall, cwd }) {
13076
- const result = await (0, import_find_up2.default)(Object.keys(LOCKS), { cwd });
13077
- const agent = result ? LOCKS[_path2.default.basename(result)] : null;
13078
- if (agent && !cmdExists(agent)) {
13090
+ let agent = null;
13091
+ const lockPath = await (0, import_find_up2.default)(Object.keys(LOCKS), { cwd });
13092
+ let packageJsonPath;
13093
+ if (lockPath)
13094
+ packageJsonPath = _path2.default.resolve(lockPath, "../package.json");
13095
+ else
13096
+ packageJsonPath = await (0, import_find_up2.default)("package.json", { cwd });
13097
+ if (packageJsonPath && _fs2.default.existsSync(packageJsonPath)) {
13098
+ try {
13099
+ const pkg = JSON.parse(_fs2.default.readFileSync(packageJsonPath, "utf8"));
13100
+ if (typeof pkg.packageManager === "string") {
13101
+ const [name, version22] = pkg.packageManager.split("@");
13102
+ if (name === "yarn" && parseInt(version22) > 1)
13103
+ agent = "yarn@berry";
13104
+ else if (name in AGENTS)
13105
+ agent = name;
13106
+ else
13107
+ console.warn("[ni] Unknown packageManager:", pkg.packageManager);
13108
+ }
13109
+ } catch (e6) {
13110
+ }
13111
+ }
13112
+ if (!agent && lockPath)
13113
+ agent = LOCKS[_path2.default.basename(lockPath)];
13114
+ if (agent && !cmdExists(agent.split("@")[0])) {
13079
13115
  if (!autoInstall) {
13080
- console.warn(`Detected ${agent} but it doesn't seem to be installed.
13116
+ console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
13081
13117
  `);
13082
13118
  if (process.env.CI)
13083
13119
  process.exit(1);
@@ -13117,7 +13153,7 @@ async function run(fn, args, options = {}) {
13117
13153
  name: "agent",
13118
13154
  type: "select",
13119
13155
  message: "Choose the agent",
13120
- choices: agents.map((value) => ({ title: value, value }))
13156
+ choices: agents.filter((i) => !i.includes("@")).map((value) => ({ title: value, value }))
13121
13157
  })).agent;
13122
13158
  if (!agent)
13123
13159
  return;
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict"; 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 }; }
2
2
 
3
- var _chunkHF2PX43Ijs = require('./chunk-HF2PX43I.js');
3
+ var _chunkYBR5SIF5js = require('./chunk-YBR5SIF5.js');
4
4
 
5
5
 
6
6
 
@@ -8,10 +8,10 @@ var _chunkHF2PX43Ijs = require('./chunk-HF2PX43I.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkQRDUZGYDjs = require('./chunk-QRDUZGYD.js');
11
+ var _chunkZUBAOX5Tjs = require('./chunk-ZUBAOX5T.js');
12
12
 
13
13
 
14
- var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
14
+ var _chunkADOJPBM5js = require('./chunk-ADOJPBM5.js');
15
15
 
16
16
 
17
17
 
@@ -20,7 +20,7 @@ var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
20
20
 
21
21
  // node/cli.ts
22
22
  _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
23
- var import_fast_deep_equal = _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkMFCJMLB5js.require_fast_deep_equal.call(void 0, ));
23
+ var import_fast_deep_equal = _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkADOJPBM5js.require_fast_deep_equal.call(void 0, ));
24
24
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
25
25
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
26
26
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
@@ -38,7 +38,7 @@ var CONFIG_RESTART_FIELDS = [
38
38
  "routerMode",
39
39
  "fonts"
40
40
  ];
41
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkQRDUZGYDjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
41
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkZUBAOX5Tjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
42
42
  cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
43
43
  alias: "p",
44
44
  type: "number",
@@ -82,9 +82,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
82
82
  async function initServer() {
83
83
  if (server)
84
84
  await server.close();
85
- const options = await _chunkQRDUZGYDjs.resolveOptions.call(void 0, { entry, theme }, "dev");
85
+ const options = await _chunkZUBAOX5Tjs.resolveOptions.call(void 0, { entry, theme }, "dev");
86
86
  port = userPort || await findFreePort(3030);
87
- server = await _chunkHF2PX43Ijs.createServer.call(void 0, options, {
87
+ server = await _chunkYBR5SIF5js.createServer.call(void 0, options, {
88
88
  server: {
89
89
  port,
90
90
  strictPort: true,
@@ -95,7 +95,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
95
95
  logLevel: log
96
96
  }, {
97
97
  onDataReload(newData, data) {
98
- if (!theme && _chunkQRDUZGYDjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkQRDUZGYDjs.resolveThemeName.call(void 0, data.config.theme)) {
98
+ if (!theme && _chunkZUBAOX5Tjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkZUBAOX5Tjs.resolveThemeName.call(void 0, data.config.theme)) {
99
99
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
100
100
  initServer();
101
101
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -171,8 +171,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
171
171
  type: "boolean",
172
172
  describe: "allow download as PDF"
173
173
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
174
- const { build } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./build-PQKCZ65G.js")));
175
- const options = await _chunkQRDUZGYDjs.resolveOptions.call(void 0, { entry, theme }, "build");
174
+ const { build } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./build-E6BBKMUU.js")));
175
+ const options = await _chunkZUBAOX5Tjs.resolveOptions.call(void 0, { entry, theme }, "build");
176
176
  if (download && !options.data.config.download)
177
177
  options.data.config.download = download;
178
178
  printInfo(options);
@@ -185,26 +185,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
185
185
  });
186
186
  });
187
187
  cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
188
- const data = await _chunkQRDUZGYDjs.fs_exports.load(entry);
189
- _chunkQRDUZGYDjs.fs_exports.prettify(data);
190
- await _chunkQRDUZGYDjs.fs_exports.save(data);
188
+ const data = await _chunkZUBAOX5Tjs.fs_exports.load(entry);
189
+ _chunkZUBAOX5Tjs.fs_exports.prettify(data);
190
+ await _chunkZUBAOX5Tjs.fs_exports.save(data);
191
191
  });
192
192
  cli.command("theme [subcommand]", "Theme related operations", (command) => {
193
193
  return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
194
194
  type: "string",
195
195
  default: "theme"
196
196
  }), async ({ entry, dir, theme: themeInput }) => {
197
- const data = await _chunkQRDUZGYDjs.fs_exports.load(entry);
198
- const theme = _chunkQRDUZGYDjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
197
+ const data = await _chunkZUBAOX5Tjs.fs_exports.load(entry);
198
+ const theme = _chunkZUBAOX5Tjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
199
199
  if (theme === "none") {
200
200
  console.error('Can not eject theme "none"');
201
201
  process.exit(1);
202
202
  }
203
- if (_chunkQRDUZGYDjs.isPath.call(void 0, theme)) {
203
+ if (_chunkZUBAOX5Tjs.isPath.call(void 0, theme)) {
204
204
  console.error("Theme is already ejected");
205
205
  process.exit(1);
206
206
  }
207
- const roots = _chunkQRDUZGYDjs.getThemeRoots.call(void 0, theme, entry);
207
+ const roots = _chunkZUBAOX5Tjs.getThemeRoots.call(void 0, theme, entry);
208
208
  if (!roots.length) {
209
209
  console.error(`Does not found theme "${theme}"`);
210
210
  process.exit(1);
@@ -216,7 +216,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
216
216
  const dirPath = `./${dir}`;
217
217
  data.slides[0].frontmatter.theme = dirPath;
218
218
  data.slides[0].raw = null;
219
- await _chunkQRDUZGYDjs.fs_exports.save(data);
219
+ await _chunkZUBAOX5Tjs.fs_exports.save(data);
220
220
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
221
221
  });
222
222
  }, () => {
@@ -259,16 +259,16 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
259
259
  }) => {
260
260
  output = output || `${_path2.default.basename(entry, ".md")}-export`;
261
261
  process.env.NODE_ENV = "production";
262
- const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-XYTYZSD3.js")));
262
+ const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-75HYECKB.js")));
263
263
  const port = await findFreePort(12445);
264
- const options = await _chunkQRDUZGYDjs.resolveOptions.call(void 0, { entry, theme }, "build");
265
- const server = await _chunkHF2PX43Ijs.createServer.call(void 0, options, {
264
+ const options = await _chunkZUBAOX5Tjs.resolveOptions.call(void 0, { entry, theme }, "build");
265
+ const server = await _chunkYBR5SIF5js.createServer.call(void 0, options, {
266
266
  server: { port },
267
267
  clearScreen: false
268
268
  });
269
269
  await server.listen(port);
270
270
  printInfo(options);
271
- _chunkQRDUZGYDjs.fs_exports.filterDisabled(options.data);
271
+ _chunkZUBAOX5Tjs.fs_exports.filterDisabled(options.data);
272
272
  const width = 1920;
273
273
  const height = Math.round(width / options.data.config.aspectRatio);
274
274
  output = await exportSlides({
@@ -305,7 +305,7 @@ function printInfo(options, port, remote) {
305
305
  console.log();
306
306
  console.log();
307
307
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
308
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkQRDUZGYDjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
308
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkZUBAOX5Tjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
309
309
  console.log();
310
310
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
311
311
  console.log(_kolorist.dim.call(void 0, " entry ") + _kolorist.dim.call(void 0, _path2.default.dirname(options.entry) + _path2.default.sep) + _path2.default.basename(options.entry));
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-MSSOXTVZ.mjs";
3
+ } from "./chunk-CU4J7EH2.mjs";
4
4
  import {
5
5
  fs_exports,
6
6
  getThemeRoots,
@@ -8,10 +8,10 @@ import {
8
8
  resolveOptions,
9
9
  resolveThemeName,
10
10
  version
11
- } from "./chunk-7KBWHTX5.mjs";
11
+ } from "./chunk-Q4KPSLXX.mjs";
12
12
  import {
13
13
  require_fast_deep_equal
14
- } from "./chunk-GWFBEY26.mjs";
14
+ } from "./chunk-UM6ZQCRB.mjs";
15
15
  import {
16
16
  __dirname,
17
17
  __require,
@@ -172,7 +172,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
172
172
  type: "boolean",
173
173
  describe: "allow download as PDF"
174
174
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
175
- const { build } = await Promise.resolve().then(() => __toModule(__require("./build-5HTITVE5.mjs")));
175
+ const { build } = await Promise.resolve().then(() => __toModule(__require("./build-QV3SLG6A.mjs")));
176
176
  const options = await resolveOptions({ entry, theme }, "build");
177
177
  if (download && !options.data.config.download)
178
178
  options.data.config.download = download;
@@ -260,7 +260,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
260
260
  }) => {
261
261
  output = output || `${path.basename(entry, ".md")}-export`;
262
262
  process.env.NODE_ENV = "production";
263
- const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-2WDF6LJW.mjs")));
263
+ const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-QCGE4YB6.mjs")));
264
264
  const port = await findFreePort(12445);
265
265
  const options = await resolveOptions({ entry, theme }, "build");
266
266
  const server = await createServer(options, {
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkQRDUZGYDjs = require('./chunk-QRDUZGYD.js');
3
+ var _chunkZUBAOX5Tjs = require('./chunk-ZUBAOX5T.js');
4
4
 
5
5
 
6
6
 
@@ -62,8 +62,8 @@ async function exportSlides({
62
62
  height = 1080,
63
63
  withClicks = false
64
64
  }) {
65
- if (!_chunkQRDUZGYDjs.packageExists.call(void 0, "playwright-chromium"))
66
- throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i playwright-chromium`");
65
+ if (!_chunkZUBAOX5Tjs.packageExists.call(void 0, "playwright-chromium"))
66
+ throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i -D playwright-chromium`");
67
67
  const { chromium } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "playwright-chromium")));
68
68
  const browser = await chromium.launch();
69
69
  const context = await browser.newContext({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  packageExists
3
- } from "./chunk-7KBWHTX5.mjs";
3
+ } from "./chunk-Q4KPSLXX.mjs";
4
4
  import {
5
5
  __require,
6
6
  __toModule,
@@ -63,7 +63,7 @@ async function exportSlides({
63
63
  withClicks = false
64
64
  }) {
65
65
  if (!packageExists("playwright-chromium"))
66
- throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i playwright-chromium`");
66
+ throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i -D playwright-chromium`");
67
67
  const { chromium } = await Promise.resolve().then(() => __toModule(__require("playwright-chromium")));
68
68
  const browser = await chromium.launch();
69
69
  const context = await browser.newContext({
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkHF2PX43Ijs = require('./chunk-HF2PX43I.js');
3
+ var _chunkYBR5SIF5js = require('./chunk-YBR5SIF5.js');
4
4
 
5
5
 
6
6
 
@@ -9,11 +9,11 @@ var _chunkHF2PX43Ijs = require('./chunk-HF2PX43I.js');
9
9
 
10
10
 
11
11
 
12
- var _chunkQRDUZGYDjs = require('./chunk-QRDUZGYD.js');
12
+ var _chunkZUBAOX5Tjs = require('./chunk-ZUBAOX5T.js');
13
13
 
14
14
 
15
15
 
16
- var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
16
+ var _chunkADOJPBM5js = require('./chunk-ADOJPBM5.js');
17
17
 
18
18
 
19
19
  var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
@@ -34,4 +34,4 @@ _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
34
34
 
35
35
 
36
36
 
37
- exports.ViteSlidevPlugin = _chunkMFCJMLB5js.ViteSlidevPlugin; exports.createServer = _chunkHF2PX43Ijs.createServer; exports.createWindiCSSPlugin = _chunkMFCJMLB5js.createWindiCSSPlugin; exports.getCLIRoot = _chunkQRDUZGYDjs.getCLIRoot; exports.getClientRoot = _chunkQRDUZGYDjs.getClientRoot; exports.getThemeRoots = _chunkQRDUZGYDjs.getThemeRoots; exports.getUserRoot = _chunkQRDUZGYDjs.getUserRoot; exports.isPath = _chunkQRDUZGYDjs.isPath; exports.parser = _chunkQRDUZGYDjs.fs_exports; exports.resolveOptions = _chunkQRDUZGYDjs.resolveOptions;
37
+ exports.ViteSlidevPlugin = _chunkADOJPBM5js.ViteSlidevPlugin; exports.createServer = _chunkYBR5SIF5js.createServer; exports.createWindiCSSPlugin = _chunkADOJPBM5js.createWindiCSSPlugin; exports.getCLIRoot = _chunkZUBAOX5Tjs.getCLIRoot; exports.getClientRoot = _chunkZUBAOX5Tjs.getClientRoot; exports.getThemeRoots = _chunkZUBAOX5Tjs.getThemeRoots; exports.getUserRoot = _chunkZUBAOX5Tjs.getUserRoot; exports.isPath = _chunkZUBAOX5Tjs.isPath; exports.parser = _chunkZUBAOX5Tjs.fs_exports; exports.resolveOptions = _chunkZUBAOX5Tjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-MSSOXTVZ.mjs";
3
+ } from "./chunk-CU4J7EH2.mjs";
4
4
  import {
5
5
  fs_exports,
6
6
  getCLIRoot,
@@ -9,11 +9,11 @@ import {
9
9
  getUserRoot,
10
10
  isPath,
11
11
  resolveOptions
12
- } from "./chunk-7KBWHTX5.mjs";
12
+ } from "./chunk-Q4KPSLXX.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
16
- } from "./chunk-GWFBEY26.mjs";
16
+ } from "./chunk-UM6ZQCRB.mjs";
17
17
  import {
18
18
  init_esm_shims
19
19
  } from "./chunk-4OPORETI.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.28.5",
3
+ "version": "0.28.8",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -40,23 +40,23 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@antfu/utils": "^0.5.0",
43
- "@iconify-json/carbon": "^1.0.14",
44
- "@iconify-json/ph": "^1.0.4",
45
- "@slidev/client": "0.28.5",
46
- "@slidev/parser": "0.28.5",
47
- "@slidev/types": "0.28.5",
48
- "@vitejs/plugin-vue": "^2.1.0",
49
- "@vue/compiler-sfc": "^3.2.30",
43
+ "@iconify-json/carbon": "^1.1.1",
44
+ "@iconify-json/ph": "^1.1.0",
45
+ "@slidev/client": "0.28.8",
46
+ "@slidev/parser": "0.28.8",
47
+ "@slidev/types": "0.28.8",
48
+ "@vitejs/plugin-vue": "^2.2.2",
49
+ "@vue/compiler-sfc": "^3.2.31",
50
50
  "cli-progress": "^3.10.0",
51
- "codemirror": "^5.65.1",
51
+ "codemirror": "^5.65.2",
52
52
  "connect": "^3.7.0",
53
53
  "debug": "^4.3.3",
54
54
  "fast-glob": "^3.2.11",
55
- "fs-extra": "^10.0.0",
55
+ "fs-extra": "^10.0.1",
56
56
  "global-dirs": "^3.0.0",
57
57
  "import-from": "^4.0.0",
58
58
  "is-installed-globally": "^0.4.0",
59
- "jiti": "^1.12.15",
59
+ "jiti": "^1.13.0",
60
60
  "js-base64": "^3.7.2",
61
61
  "katex": "^0.15.2",
62
62
  "kolorist": "^1.5.1",
@@ -64,25 +64,25 @@
64
64
  "markdown-it-footnote": "^3.0.3",
65
65
  "markdown-it-link-attributes": "^4.0.0",
66
66
  "monaco-editor": "^0.32.1",
67
- "nanoid": "^3.2.0",
67
+ "nanoid": "^3.3.1",
68
68
  "open": "^8.4.0",
69
69
  "pdf-lib": "^1.17.1",
70
70
  "plantuml-encoder": "^1.4.0",
71
- "prismjs": "^1.26.0",
71
+ "prismjs": "^1.27.0",
72
72
  "prompts": "^2.4.2",
73
73
  "resolve": "^1.22.0",
74
74
  "resolve-from": "^5.0.0",
75
75
  "resolve-global": "^1.0.0",
76
- "shiki": "^0.10.0",
77
- "unplugin-icons": "^0.13.1",
78
- "unplugin-vue-components": "^0.17.18",
79
- "vite": "^2.7.13",
80
- "vite-plugin-md": "^0.11.7",
76
+ "shiki": "^0.10.1",
77
+ "unplugin-icons": "^0.13.2",
78
+ "unplugin-vue-components": "^0.17.21",
79
+ "vite": "^2.8.4",
80
+ "vite-plugin-md": "^0.11.8",
81
81
  "vite-plugin-remote-assets": "^0.2.2",
82
82
  "vite-plugin-vue-server-ref": "^0.2.4",
83
- "vite-plugin-windicss": "^1.7.0",
84
- "vue": "^3.2.30",
85
- "windicss": "^3.4.3",
83
+ "vite-plugin-windicss": "^1.7.1",
84
+ "vue": "^3.2.31",
85
+ "windicss": "^3.4.4",
86
86
  "yargs": "^17.3.1"
87
87
  },
88
88
  "devDependencies": {