@slidev/cli 0.43.7 → 0.43.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.
@@ -2,7 +2,7 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-PNMZABHE.mjs";
5
+ } from "./chunk-6A4F74ZN.mjs";
6
6
  import "./chunk-43ON36K4.mjs";
7
7
  import "./chunk-CPYGYVJ2.mjs";
8
8
  import "./chunk-QHOBBTS4.mjs";
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkGD5JWUM3js = require('./chunk-GD5JWUM3.js');
5
+ var _chunk6CPLPGEJjs = require('./chunk-6CPLPGEJ.js');
6
6
  require('./chunk-UWTQKD35.js');
7
7
  require('./chunk-CGJOXW6I.js');
8
8
  require('./chunk-YUG22S6W.js');
@@ -651,16 +651,16 @@ async function build(options, viteConfig = {}, args) {
651
651
  let originalIndexHTML;
652
652
  if (_fsextra2.default.existsSync(indexPath))
653
653
  originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
654
- await _fsextra2.default.writeFile(indexPath, await _chunkGD5JWUM3js.getIndexHtml.call(void 0, options), "utf-8");
654
+ await _fsextra2.default.writeFile(indexPath, await _chunk6CPLPGEJjs.getIndexHtml.call(void 0, options), "utf-8");
655
655
  let config = void 0;
656
656
  try {
657
- const inlineConfig = await _chunkGD5JWUM3js.mergeViteConfigs.call(void 0,
657
+ const inlineConfig = await _chunk6CPLPGEJjs.mergeViteConfigs.call(void 0,
658
658
  options,
659
659
  viteConfig,
660
660
  {
661
661
  root: options.userRoot,
662
662
  plugins: [
663
- await _chunkGD5JWUM3js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
663
+ await _chunk6CPLPGEJjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
664
664
  {
665
665
  name: "resolve-config",
666
666
  configResolved(_config) {
@@ -681,7 +681,7 @@ async function build(options, viteConfig = {}, args) {
681
681
  } else {
682
682
  console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
683
683
  await _vite.build.call(void 0,
684
- await _chunkGD5JWUM3js.mergeViteConfigs.call(void 0,
684
+ await _chunk6CPLPGEJjs.mergeViteConfigs.call(void 0,
685
685
  options,
686
686
  inlineConfig,
687
687
  {
@@ -722,7 +722,7 @@ async function build(options, viteConfig = {}, args) {
722
722
  await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
723
723
  `, "utf-8");
724
724
  if ([true, "true", "auto"].includes(options.data.config.download)) {
725
- const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-EYYLD3O6.js"));
725
+ const { exportSlides, getExportOptions } = await Promise.resolve().then(() => _interopRequireWildcard(require("./export-EYYLD3O6.js")));
726
726
  const port = 12445;
727
727
  const app = _connect2.default.call(void 0, );
728
728
  const server = _http2.default.createServer(app);
@@ -186,28 +186,28 @@ var dependencies = {
186
186
  "@antfu/utils": "^0.7.6",
187
187
  "@slidev/parser": "workspace:*",
188
188
  "@slidev/types": "workspace:*",
189
- "@unocss/reset": "^0.56.5",
189
+ "@unocss/reset": "^0.57.1",
190
190
  "@vueuse/core": "^10.5.0",
191
191
  "@vueuse/head": "^2.0.0",
192
192
  "@vueuse/math": "^10.5.0",
193
193
  "@vueuse/motion": "^2.0.0",
194
194
  codemirror: "^5.65.5",
195
- defu: "^6.1.2",
195
+ defu: "^6.1.3",
196
196
  drauu: "^0.3.7",
197
197
  "file-saver": "^2.0.5",
198
- "fuse.js": "^6.6.2",
198
+ "fuse.js": "^7.0.0",
199
199
  "js-base64": "^3.7.5",
200
200
  "js-yaml": "^4.1.0",
201
201
  katex: "^0.16.9",
202
- mermaid: "^10.5.0",
202
+ mermaid: "^10.6.0",
203
203
  "monaco-editor": "^0.37.1",
204
- nanoid: "^5.0.1",
204
+ nanoid: "^5.0.2",
205
205
  prettier: "^3.0.3",
206
206
  recordrtc: "^5.6.2",
207
- resolve: "^1.22.6",
208
- unocss: "^0.56.5",
207
+ resolve: "^1.22.8",
208
+ unocss: "^0.57.1",
209
209
  "vite-plugin-windicss": "^1.9.1",
210
- vue: "^3.3.4",
210
+ vue: "^3.3.7",
211
211
  "vue-router": "^4.2.5",
212
212
  "vue-starport": "^0.4.0",
213
213
  windicss: "^3.5.6"
@@ -937,18 +937,20 @@ export default {
937
937
  }
938
938
 
939
939
  // node/plugins/monacoTransform.ts
940
- import { join as join6 } from "node:path";
940
+ import { dirname as dirname4, join as join6 } from "node:path";
941
+ import fs5 from "node:fs/promises";
941
942
  import process2 from "node:process";
942
943
  import { slash as slash2 } from "@antfu/utils";
944
+ import { findDepPkgJsonPath } from "vitefu";
943
945
  async function getPackageData(pkg) {
944
- const { resolvePackageData } = await eval('import("vite")');
945
- const info = resolvePackageData(pkg, process2.cwd());
946
- if (!info)
946
+ const pkgJsonPath = await findDepPkgJsonPath(pkg, process2.cwd());
947
+ if (!pkgJsonPath)
947
948
  return;
948
- const typePath = info.data.types || info.data.typings;
949
+ const pkgJson = JSON.parse(await fs5.readFile(pkgJsonPath, "utf-8"));
950
+ const typePath = pkgJson.types || pkgJson.typings;
949
951
  if (!typePath)
950
952
  return;
951
- return [info, typePath];
953
+ return [dirname4(pkgJsonPath), pkgJson, typePath];
952
954
  }
953
955
  function createMonacoTypesLoader() {
954
956
  return {
@@ -961,16 +963,16 @@ function createMonacoTypesLoader() {
961
963
  async load(id) {
962
964
  const match = id.match(/^\/\@slidev-monaco-types\/(.*)$/);
963
965
  if (match) {
964
- const pkg2 = match[1];
965
- const packageData = await getPackageData(pkg2) || await getPackageData(`@types/${pkg2}`);
966
+ const pkg = match[1];
967
+ const packageData = await getPackageData(pkg) || await getPackageData(`@types/${pkg}`);
966
968
  if (!packageData)
967
969
  return;
968
- const [info2, typePath2] = packageData;
970
+ const [pkgDir, pkgJson, typePath] = packageData;
969
971
  return [
970
972
  "import * as monaco from 'monaco-editor'",
971
- `import Type from "${slash2(join6(info2.dir, typePath2))}?raw"`,
972
- ...Object.keys(info2.data.dependencies || {}).map((i) => `import "/@slidev-monaco-types/${i}"`),
973
- `monaco.languages.typescript.typescriptDefaults.addExtraLib(\`declare module "${pkg2}" { \${Type} }\`)`
973
+ `import Type from "${slash2(join6(pkgDir, typePath))}?raw"`,
974
+ ...Object.keys(pkgJson.dependencies || {}).map((i) => `import "/@slidev-monaco-types/${i}"`),
975
+ `monaco.languages.typescript.typescriptDefaults.addExtraLib(\`declare module "${pkg}" { \${Type} }\`)`
974
976
  ].join("\n");
975
977
  }
976
978
  }
@@ -186,28 +186,28 @@ var dependencies = {
186
186
  "@antfu/utils": "^0.7.6",
187
187
  "@slidev/parser": "workspace:*",
188
188
  "@slidev/types": "workspace:*",
189
- "@unocss/reset": "^0.56.5",
189
+ "@unocss/reset": "^0.57.1",
190
190
  "@vueuse/core": "^10.5.0",
191
191
  "@vueuse/head": "^2.0.0",
192
192
  "@vueuse/math": "^10.5.0",
193
193
  "@vueuse/motion": "^2.0.0",
194
194
  codemirror: "^5.65.5",
195
- defu: "^6.1.2",
195
+ defu: "^6.1.3",
196
196
  drauu: "^0.3.7",
197
197
  "file-saver": "^2.0.5",
198
- "fuse.js": "^6.6.2",
198
+ "fuse.js": "^7.0.0",
199
199
  "js-base64": "^3.7.5",
200
200
  "js-yaml": "^4.1.0",
201
201
  katex: "^0.16.9",
202
- mermaid: "^10.5.0",
202
+ mermaid: "^10.6.0",
203
203
  "monaco-editor": "^0.37.1",
204
- nanoid: "^5.0.1",
204
+ nanoid: "^5.0.2",
205
205
  prettier: "^3.0.3",
206
206
  recordrtc: "^5.6.2",
207
- resolve: "^1.22.6",
208
- unocss: "^0.56.5",
207
+ resolve: "^1.22.8",
208
+ unocss: "^0.57.1",
209
209
  "vite-plugin-windicss": "^1.9.1",
210
- vue: "^3.3.4",
210
+ vue: "^3.3.7",
211
211
  "vue-router": "^4.2.5",
212
212
  "vue-starport": "^0.4.0",
213
213
  windicss: "^3.5.6"
@@ -311,7 +311,7 @@ function createConfigPlugin(options) {
311
311
  css: options.data.config.css === "unocss" ? {
312
312
  postcss: {
313
313
  plugins: [
314
- await Promise.resolve().then(() => require("postcss-nested")).then((r) => (r.default || r)())
314
+ await Promise.resolve().then(() => _interopRequireWildcard(require("postcss-nested"))).then((r) => (r.default || r)())
315
315
  ]
316
316
  }
317
317
  } : {},
@@ -938,17 +938,19 @@ export default {
938
938
 
939
939
  // node/plugins/monacoTransform.ts
940
940
 
941
+ var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
941
942
 
942
943
 
944
+ var _vitefu = require('vitefu');
943
945
  async function getPackageData(pkg) {
944
- const { resolvePackageData } = await eval('import("vite")');
945
- const info = resolvePackageData(pkg, _process2.default.cwd());
946
- if (!info)
946
+ const pkgJsonPath = await _vitefu.findDepPkgJsonPath.call(void 0, pkg, _process2.default.cwd());
947
+ if (!pkgJsonPath)
947
948
  return;
948
- const typePath = info.data.types || info.data.typings;
949
+ const pkgJson = JSON.parse(await _promises2.default.readFile(pkgJsonPath, "utf-8"));
950
+ const typePath = pkgJson.types || pkgJson.typings;
949
951
  if (!typePath)
950
952
  return;
951
- return [info, typePath];
953
+ return [_path.dirname.call(void 0, pkgJsonPath), pkgJson, typePath];
952
954
  }
953
955
  function createMonacoTypesLoader() {
954
956
  return {
@@ -961,16 +963,16 @@ function createMonacoTypesLoader() {
961
963
  async load(id) {
962
964
  const match = id.match(/^\/\@slidev-monaco-types\/(.*)$/);
963
965
  if (match) {
964
- const pkg2 = match[1];
965
- const packageData = await getPackageData(pkg2) || await getPackageData(`@types/${pkg2}`);
966
+ const pkg = match[1];
967
+ const packageData = await getPackageData(pkg) || await getPackageData(`@types/${pkg}`);
966
968
  if (!packageData)
967
969
  return;
968
- const [info2, typePath2] = packageData;
970
+ const [pkgDir, pkgJson, typePath] = packageData;
969
971
  return [
970
972
  "import * as monaco from 'monaco-editor'",
971
- `import Type from "${_utils.slash.call(void 0, _path.join.call(void 0, info2.dir, typePath2))}?raw"`,
972
- ...Object.keys(info2.data.dependencies || {}).map((i) => `import "/@slidev-monaco-types/${i}"`),
973
- `monaco.languages.typescript.typescriptDefaults.addExtraLib(\`declare module "${pkg2}" { \${Type} }\`)`
973
+ `import Type from "${_utils.slash.call(void 0, _path.join.call(void 0, pkgDir, typePath))}?raw"`,
974
+ ...Object.keys(pkgJson.dependencies || {}).map((i) => `import "/@slidev-monaco-types/${i}"`),
975
+ `monaco.languages.typescript.typescriptDefaults.addExtraLib(\`declare module "${pkg}" { \${Type} }\`)`
974
976
  ].join("\n");
975
977
  }
976
978
  }
@@ -1353,7 +1355,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
1353
1355
  const setups = [];
1354
1356
  const entryPath = _utils.slash.call(void 0, entry);
1355
1357
  if (config.highlighter === "shiki") {
1356
- const Shiki = await Promise.resolve().then(() => require("shiki"));
1358
+ const Shiki = await Promise.resolve().then(() => _interopRequireWildcard(require("shiki")));
1357
1359
  const shikiOptions = await _chunkUWTQKD35js.loadSetups.call(void 0, roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
1358
1360
  const { langs, themes } = resolveShikiOptions(shikiOptions);
1359
1361
  shikiOptions.highlighter = await Shiki.getHighlighter({ themes, langs });
@@ -1644,7 +1646,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1644
1646
  autoInstall: true,
1645
1647
  ...iconsOptions
1646
1648
  }),
1647
- config.remoteAssets === true || config.remoteAssets === mode ? Promise.resolve().then(() => require("vite-plugin-remote-assets")).then((r) => r.default({
1649
+ config.remoteAssets === true || config.remoteAssets === mode ? Promise.resolve().then(() => _interopRequireWildcard(require("vite-plugin-remote-assets"))).then((r) => r.default({
1648
1650
  rules: [
1649
1651
  ...r.DefaultRules,
1650
1652
  {
@@ -1679,18 +1681,18 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1679
1681
  createClientSetupPlugin(options),
1680
1682
  createMonacoTypesLoader(),
1681
1683
  createFixPlugins(options),
1682
- publicRoots.length ? Promise.resolve().then(() => require("vite-plugin-static-copy")).then((r) => r.viteStaticCopy({
1684
+ publicRoots.length ? Promise.resolve().then(() => _interopRequireWildcard(require("vite-plugin-static-copy"))).then((r) => r.viteStaticCopy({
1683
1685
  silent: true,
1684
1686
  targets: publicRoots.map((r2) => ({
1685
1687
  src: `${r2}/*`,
1686
1688
  dest: "theme"
1687
1689
  }))
1688
1690
  })) : null,
1689
- options.inspect ? Promise.resolve().then(() => require("vite-plugin-inspect")).then((r) => (r.default || r)({
1691
+ options.inspect ? Promise.resolve().then(() => _interopRequireWildcard(require("vite-plugin-inspect"))).then((r) => (r.default || r)({
1690
1692
  dev: true,
1691
1693
  build: true
1692
1694
  })) : null,
1693
- config.css === "none" ? null : config.css === "windicss" ? Promise.resolve().then(() => require("./windicss-G7ISUN5H.js")).then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : Promise.resolve().then(() => require("./unocss-E5M4APXD.js")).then((r) => r.createUnocssPlugin(options, pluginOptions))
1695
+ config.css === "none" ? null : config.css === "windicss" ? Promise.resolve().then(() => _interopRequireWildcard(require("./windicss-G7ISUN5H.js"))).then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : Promise.resolve().then(() => _interopRequireWildcard(require("./unocss-E5M4APXD.js"))).then((r) => r.createUnocssPlugin(options, pluginOptions))
1694
1696
  ];
1695
1697
  return (await Promise.all(plugins)).flat().filter(_utils.notNullish);
1696
1698
  }
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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
  var _chunkUWTQKD35js = require('./chunk-UWTQKD35.js');
4
4
 
@@ -11,8 +11,8 @@ var _fs = require('fs');
11
11
  var _utils = require('@antfu/utils');
12
12
  var _jiti = require('jiti'); var _jiti2 = _interopRequireDefault(_jiti);
13
13
  async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
14
- const { default: WindiCSS } = await Promise.resolve().then(() => require("vite-plugin-windicss"));
15
- const { defaultConfigureFiles } = await Promise.resolve().then(() => require("@windicss/config"));
14
+ const { default: WindiCSS } = await Promise.resolve().then(() => _interopRequireWildcard(require("vite-plugin-windicss")));
15
+ const { defaultConfigureFiles } = await Promise.resolve().then(() => _interopRequireWildcard(require("@windicss/config")));
16
16
  const configFiles = _utils.uniq.call(void 0, [
17
17
  ...defaultConfigureFiles.map((i) => _path.resolve.call(void 0, userRoot, i)),
18
18
  ...themeRoots.map((i) => `${i}/windi.config.ts`),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-PNMZABHE.mjs";
4
+ } from "./chunk-6A4F74ZN.mjs";
5
5
  import {
6
6
  packageExists,
7
7
  resolveImportPath
@@ -2519,7 +2519,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2519
2519
  import * as parser from "@slidev/parser/fs";
2520
2520
 
2521
2521
  // package.json
2522
- var version = "0.43.7";
2522
+ var version = "0.43.8";
2523
2523
 
2524
2524
  // node/themes.ts
2525
2525
  import prompts2 from "prompts";
@@ -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(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkGD5JWUM3js = require('./chunk-GD5JWUM3.js');
4
+ var _chunk6CPLPGEJjs = require('./chunk-6CPLPGEJ.js');
5
5
 
6
6
 
7
7
 
@@ -2496,7 +2496,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2496
2496
  const pluginOptions = rawConfig.slidev || {};
2497
2497
  _process2.default.env.EDITOR = _process2.default.env.EDITOR || "code";
2498
2498
  const server = await _vite.createServer.call(void 0,
2499
- await _chunkGD5JWUM3js.mergeViteConfigs.call(void 0,
2499
+ await _chunk6CPLPGEJjs.mergeViteConfigs.call(void 0,
2500
2500
  options,
2501
2501
  viteConfig,
2502
2502
  {
@@ -2506,7 +2506,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2506
2506
  ]
2507
2507
  },
2508
2508
  plugins: [
2509
- await _chunkGD5JWUM3js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2509
+ await _chunk6CPLPGEJjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2510
2510
  ]
2511
2511
  },
2512
2512
  "serve"
@@ -2519,7 +2519,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2519
2519
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2520
2520
 
2521
2521
  // package.json
2522
- var version = "0.43.7";
2522
+ var version = "0.43.8";
2523
2523
 
2524
2524
  // node/themes.ts
2525
2525
  var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
package/dist/cli.js CHANGED
@@ -9,10 +9,10 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkIJ6NBA73js = require('./chunk-IJ6NBA73.js');
12
+ var _chunkOW5PGXQSjs = require('./chunk-OW5PGXQS.js');
13
13
 
14
14
 
15
- var _chunkGD5JWUM3js = require('./chunk-GD5JWUM3.js');
15
+ var _chunk6CPLPGEJjs = require('./chunk-6CPLPGEJ.js');
16
16
 
17
17
 
18
18
  var _chunkUWTQKD35js = require('./chunk-UWTQKD35.js');
@@ -22,7 +22,7 @@ require('./chunk-CGJOXW6I.js');
22
22
  var _chunkYUG22S6Wjs = require('./chunk-YUG22S6W.js');
23
23
 
24
24
  // node/cli.ts
25
- var import_fast_deep_equal = _chunkYUG22S6Wjs.__toESM.call(void 0, _chunkGD5JWUM3js.require_fast_deep_equal.call(void 0, ));
25
+ var import_fast_deep_equal = _chunkYUG22S6Wjs.__toESM.call(void 0, _chunk6CPLPGEJjs.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');
@@ -51,15 +51,15 @@ _fs.injectPreparserExtensionLoader.call(void 0, async (headmatter, filepath) =>
51
51
  const roots = (
52
52
  /* uniq */
53
53
  [
54
- _chunkIJ6NBA73js.getUserRoot.call(void 0, {}).userRoot,
55
- ..._chunkIJ6NBA73js.getAddonRoots.call(void 0, addons, ""),
56
- _chunkIJ6NBA73js.getClientRoot.call(void 0, )
54
+ _chunkOW5PGXQSjs.getUserRoot.call(void 0, {}).userRoot,
55
+ ..._chunkOW5PGXQSjs.getAddonRoots.call(void 0, addons, ""),
56
+ _chunkOW5PGXQSjs.getClientRoot.call(void 0, )
57
57
  ]
58
58
  );
59
59
  const mergeArrays = (a, b) => a.concat(b);
60
60
  return await _chunkUWTQKD35js.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], mergeArrays);
61
61
  });
62
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkIJ6NBA73js.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
62
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkOW5PGXQSjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
63
63
  cli.command(
64
64
  "* [entry]",
65
65
  "Start a local server for Slidev",
@@ -115,9 +115,9 @@ cli.command(
115
115
  async function initServer() {
116
116
  if (server)
117
117
  await server.close();
118
- const options = await _chunkIJ6NBA73js.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
118
+ const options = await _chunkOW5PGXQSjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
119
119
  port = userPort || await findFreePort(3030);
120
- server = await _chunkIJ6NBA73js.createServer.call(void 0,
120
+ server = await _chunkOW5PGXQSjs.createServer.call(void 0,
121
121
  options,
122
122
  {
123
123
  server: {
@@ -131,7 +131,7 @@ cli.command(
131
131
  },
132
132
  {
133
133
  onDataReload(newData, data) {
134
- if (!theme && _chunkIJ6NBA73js.resolveThemeName.call(void 0, newData.config.theme) !== _chunkIJ6NBA73js.resolveThemeName.call(void 0, data.config.theme)) {
134
+ if (!theme && _chunkOW5PGXQSjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkOW5PGXQSjs.resolveThemeName.call(void 0, data.config.theme)) {
135
135
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
136
136
  initServer();
137
137
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -152,7 +152,7 @@ cli.command(
152
152
  lastRemoteUrl = printInfo(options, port, remote, tunnelUrl);
153
153
  }
154
154
  async function openTunnel(port2) {
155
- const localtunnel = await Promise.resolve().then(() => require("localtunnel")).then((r) => r.default || r);
155
+ const localtunnel = await Promise.resolve().then(() => _interopRequireWildcard(require("localtunnel"))).then((r) => r.default || r);
156
156
  const tunnel2 = await localtunnel({
157
157
  port: port2,
158
158
  local_host: "0.0.0.0"
@@ -198,7 +198,7 @@ cli.command(
198
198
  async action() {
199
199
  if (!lastRemoteUrl)
200
200
  return;
201
- await Promise.resolve().then(() => require("uqr")).then((r) => {
201
+ await Promise.resolve().then(() => _interopRequireWildcard(require("uqr"))).then((r) => {
202
202
  const code = r.renderUnicodeCompact(lastRemoteUrl);
203
203
  console.log(`
204
204
  ${_kolorist.dim.call(void 0, " QR Code for remote control: ")}
@@ -260,9 +260,9 @@ cli.command(
260
260
  }).strict().help(),
261
261
  async (args) => {
262
262
  const { entry, theme, watch, base, download, out, inspect } = args;
263
- const { build } = await Promise.resolve().then(() => require("./build-BMXGJSEG.js"));
263
+ const { build } = await Promise.resolve().then(() => _interopRequireWildcard(require("./build-QIDEWCUY.js")));
264
264
  for (const entryFile of entry) {
265
- const options = await _chunkIJ6NBA73js.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
265
+ const options = await _chunkOW5PGXQSjs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
266
266
  if (download && !options.data.config.download)
267
267
  options.data.config.download = download;
268
268
  printInfo(options);
@@ -282,9 +282,9 @@ cli.command(
282
282
  (args) => commonOptions(args).strict().help(),
283
283
  async ({ entry }) => {
284
284
  for (const entryFile of entry) {
285
- const data = await _chunkIJ6NBA73js.parser.load(entryFile);
286
- _chunkIJ6NBA73js.parser.prettify(data);
287
- await _chunkIJ6NBA73js.parser.save(data);
285
+ const data = await _chunkOW5PGXQSjs.parser.load(entryFile);
286
+ _chunkOW5PGXQSjs.parser.prettify(data);
287
+ await _chunkOW5PGXQSjs.parser.save(data);
288
288
  }
289
289
  }
290
290
  );
@@ -300,17 +300,17 @@ cli.command(
300
300
  default: "theme"
301
301
  }),
302
302
  async ({ entry, dir, theme: themeInput }) => {
303
- const data = await _chunkIJ6NBA73js.parser.load(entry);
304
- const theme = _chunkIJ6NBA73js.resolveThemeName.call(void 0, themeInput || data.config.theme);
303
+ const data = await _chunkOW5PGXQSjs.parser.load(entry);
304
+ const theme = _chunkOW5PGXQSjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
305
305
  if (theme === "none") {
306
306
  console.error('Cannot eject theme "none"');
307
307
  _process2.default.exit(1);
308
308
  }
309
- if (_chunkIJ6NBA73js.isPath.call(void 0, theme)) {
309
+ if (_chunkOW5PGXQSjs.isPath.call(void 0, theme)) {
310
310
  console.error("Theme is already ejected");
311
311
  _process2.default.exit(1);
312
312
  }
313
- const roots = _chunkIJ6NBA73js.getThemeRoots.call(void 0, theme, entry);
313
+ const roots = _chunkOW5PGXQSjs.getThemeRoots.call(void 0, theme, entry);
314
314
  if (!roots.length) {
315
315
  console.error(`Could not find theme "${theme}"`);
316
316
  _process2.default.exit(1);
@@ -322,7 +322,7 @@ cli.command(
322
322
  const dirPath = `./${dir}`;
323
323
  data.slides[0].frontmatter.theme = dirPath;
324
324
  data.slides[0].raw = null;
325
- await _chunkIJ6NBA73js.parser.save(data);
325
+ await _chunkOW5PGXQSjs.parser.save(data);
326
326
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
327
327
  }
328
328
  );
@@ -339,11 +339,11 @@ cli.command(
339
339
  async (args) => {
340
340
  const { entry, theme } = args;
341
341
  _process2.default.env.NODE_ENV = "production";
342
- const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-EYYLD3O6.js"));
342
+ const { exportSlides, getExportOptions } = await Promise.resolve().then(() => _interopRequireWildcard(require("./export-EYYLD3O6.js")));
343
343
  const port = await findFreePort(12445);
344
344
  for (const entryFile of entry) {
345
- const options = await _chunkIJ6NBA73js.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
346
- const server = await _chunkIJ6NBA73js.createServer.call(void 0,
345
+ const options = await _chunkOW5PGXQSjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
346
+ const server = await _chunkOW5PGXQSjs.createServer.call(void 0,
347
347
  options,
348
348
  {
349
349
  server: { port },
@@ -352,7 +352,7 @@ cli.command(
352
352
  );
353
353
  await server.listen(port);
354
354
  printInfo(options);
355
- _chunkIJ6NBA73js.parser.filterDisabled(options.data);
355
+ _chunkOW5PGXQSjs.parser.filterDisabled(options.data);
356
356
  const result = await exportSlides({
357
357
  port,
358
358
  ...getExportOptions({ ...args, entry: entryFile }, options)
@@ -385,11 +385,11 @@ cli.command(
385
385
  timeout
386
386
  }) => {
387
387
  _process2.default.env.NODE_ENV = "production";
388
- const { exportNotes } = await Promise.resolve().then(() => require("./export-EYYLD3O6.js"));
388
+ const { exportNotes } = await Promise.resolve().then(() => _interopRequireWildcard(require("./export-EYYLD3O6.js")));
389
389
  const port = await findFreePort(12445);
390
390
  for (const entryFile of entry) {
391
- const options = await _chunkIJ6NBA73js.resolveOptions.call(void 0, { entry: entryFile }, "export");
392
- const server = await _chunkIJ6NBA73js.createServer.call(void 0,
391
+ const options = await _chunkOW5PGXQSjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
392
+ const server = await _chunkOW5PGXQSjs.createServer.call(void 0,
393
393
  options,
394
394
  {
395
395
  server: { port },
@@ -398,7 +398,7 @@ cli.command(
398
398
  );
399
399
  await server.listen(port);
400
400
  printInfo(options);
401
- _chunkIJ6NBA73js.parser.filterDisabled(options.data);
401
+ _chunkOW5PGXQSjs.parser.filterDisabled(options.data);
402
402
  const result = await exportNotes({
403
403
  port,
404
404
  output: output || (options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entryFile, ".md")}-export-notes`),
@@ -459,7 +459,7 @@ function printInfo(options, port, remote, tunnelUrl) {
459
459
  console.log();
460
460
  console.log();
461
461
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
462
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkIJ6NBA73js.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
462
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkOW5PGXQSjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
463
463
  console.log();
464
464
  _parser.verifyConfig.call(void 0, options.data.config, options.data.themeMeta, (v) => console.warn(_kolorist.yellow.call(void 0, ` ! ${v}`)));
465
465
  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,10 +9,10 @@ import {
9
9
  resolveOptions,
10
10
  resolveThemeName,
11
11
  version
12
- } from "./chunk-7MRMXJYO.mjs";
12
+ } from "./chunk-CUDG3G2A.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
- } from "./chunk-PNMZABHE.mjs";
15
+ } from "./chunk-6A4F74ZN.mjs";
16
16
  import {
17
17
  loadSetups
18
18
  } from "./chunk-43ON36K4.mjs";
@@ -260,7 +260,7 @@ cli.command(
260
260
  }).strict().help(),
261
261
  async (args) => {
262
262
  const { entry, theme, watch, base, download, out, inspect } = args;
263
- const { build } = await import("./build-E7VPPALW.mjs");
263
+ const { build } = await import("./build-MWRJFN43.mjs");
264
264
  for (const entryFile of entry) {
265
265
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
266
266
  if (download && !options.data.config.download)
@@ -76,7 +76,7 @@ async function exportNotes({
76
76
  }) {
77
77
  if (!_chunkCGJOXW6Ijs.packageExists.call(void 0, "playwright-chromium"))
78
78
  throw new Error("The exporting for Slidev is powered by Playwright, please install it via `npm i -D playwright-chromium`");
79
- const { chromium } = await Promise.resolve().then(() => require("playwright-chromium"));
79
+ const { chromium } = await Promise.resolve().then(() => _interopRequireWildcard(require("playwright-chromium")));
80
80
  const browser = await chromium.launch();
81
81
  const context = await browser.newContext();
82
82
  const page = await context.newPage();
@@ -123,7 +123,7 @@ async function exportSlides({
123
123
  if (!_chunkCGJOXW6Ijs.packageExists.call(void 0, "playwright-chromium"))
124
124
  throw new Error("The exporting for Slidev is powered by Playwright, please install it via `npm i -D playwright-chromium`");
125
125
  const pages = _core.parseRangeString.call(void 0, total, range);
126
- const { chromium } = await Promise.resolve().then(() => require("playwright-chromium"));
126
+ const { chromium } = await Promise.resolve().then(() => _interopRequireWildcard(require("playwright-chromium")));
127
127
  const browser = await chromium.launch({
128
128
  executablePath
129
129
  });
package/dist/index.js CHANGED
@@ -9,13 +9,13 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkIJ6NBA73js = require('./chunk-IJ6NBA73.js');
12
+ var _chunkOW5PGXQSjs = require('./chunk-OW5PGXQS.js');
13
13
 
14
14
 
15
15
  var _chunkCPRFICJ7js = require('./chunk-CPRFICJ7.js');
16
16
 
17
17
 
18
- var _chunkGD5JWUM3js = require('./chunk-GD5JWUM3.js');
18
+ var _chunk6CPLPGEJjs = require('./chunk-6CPLPGEJ.js');
19
19
  require('./chunk-UWTQKD35.js');
20
20
  require('./chunk-CGJOXW6I.js');
21
21
  require('./chunk-YUG22S6W.js');
@@ -32,4 +32,4 @@ require('./chunk-YUG22S6W.js');
32
32
 
33
33
 
34
34
 
35
- exports.ViteSlidevPlugin = _chunkGD5JWUM3js.ViteSlidevPlugin; exports.createServer = _chunkIJ6NBA73js.createServer; exports.createWindiCSSPlugin = _chunkCPRFICJ7js.createWindiCSSPlugin; exports.getAddonRoots = _chunkIJ6NBA73js.getAddonRoots; exports.getCLIRoot = _chunkIJ6NBA73js.getCLIRoot; exports.getClientRoot = _chunkIJ6NBA73js.getClientRoot; exports.getRoot = _chunkIJ6NBA73js.getRoot; exports.getThemeRoots = _chunkIJ6NBA73js.getThemeRoots; exports.getUserRoot = _chunkIJ6NBA73js.getUserRoot; exports.isPath = _chunkIJ6NBA73js.isPath; exports.parser = _chunkIJ6NBA73js.parser; exports.resolveOptions = _chunkIJ6NBA73js.resolveOptions;
35
+ exports.ViteSlidevPlugin = _chunk6CPLPGEJjs.ViteSlidevPlugin; exports.createServer = _chunkOW5PGXQSjs.createServer; exports.createWindiCSSPlugin = _chunkCPRFICJ7js.createWindiCSSPlugin; exports.getAddonRoots = _chunkOW5PGXQSjs.getAddonRoots; exports.getCLIRoot = _chunkOW5PGXQSjs.getCLIRoot; exports.getClientRoot = _chunkOW5PGXQSjs.getClientRoot; exports.getRoot = _chunkOW5PGXQSjs.getRoot; exports.getThemeRoots = _chunkOW5PGXQSjs.getThemeRoots; exports.getUserRoot = _chunkOW5PGXQSjs.getUserRoot; exports.isPath = _chunkOW5PGXQSjs.isPath; exports.parser = _chunkOW5PGXQSjs.parser; exports.resolveOptions = _chunkOW5PGXQSjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,13 +9,13 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-7MRMXJYO.mjs";
12
+ } from "./chunk-CUDG3G2A.mjs";
13
13
  import {
14
14
  createWindiCSSPlugin
15
15
  } from "./chunk-PZQGSMNY.mjs";
16
16
  import {
17
17
  ViteSlidevPlugin
18
- } from "./chunk-PNMZABHE.mjs";
18
+ } from "./chunk-6A4F74ZN.mjs";
19
19
  import "./chunk-43ON36K4.mjs";
20
20
  import "./chunk-CPYGYVJ2.mjs";
21
21
  import "./chunk-QHOBBTS4.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.43.7",
3
+ "version": "0.43.8",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -48,8 +48,8 @@
48
48
  "@iconify-json/ph": "^1.1.6",
49
49
  "@lillallol/outline-pdf": "^4.0.0",
50
50
  "@mrdrogdrog/optional": "^1.2.1",
51
- "@unocss/extractor-mdc": "^0.56.5",
52
- "@unocss/reset": "^0.56.5",
51
+ "@unocss/extractor-mdc": "^0.57.1",
52
+ "@unocss/reset": "^0.57.1",
53
53
  "@vitejs/plugin-vue": "^4.4.0",
54
54
  "@vitejs/plugin-vue-jsx": "^3.0.2",
55
55
  "@windicss/config": "^1.9.1",
@@ -74,37 +74,38 @@
74
74
  "markdown-it-link-attributes": "^4.0.1",
75
75
  "markdown-it-mdc": "^0.1.4",
76
76
  "monaco-editor": "^0.37.1",
77
- "nanoid": "^5.0.1",
77
+ "nanoid": "^5.0.2",
78
78
  "open": "^8.4.1",
79
79
  "pdf-lib": "^1.17.1",
80
80
  "plantuml-encoder": "^1.4.0",
81
81
  "postcss-nested": "^6.0.1",
82
82
  "prismjs": "^1.29.0",
83
83
  "prompts": "^2.4.2",
84
- "resolve": "^1.22.6",
84
+ "resolve": "^1.22.8",
85
85
  "resolve-from": "^5.0.0",
86
86
  "resolve-global": "^1.0.0",
87
- "shiki": "npm:shikiji-compat@^0.6.9",
88
- "unocss": "^0.56.5",
89
- "unplugin-icons": "^0.17.0",
87
+ "shiki": "npm:shikiji-compat@^0.6.10",
88
+ "unocss": "^0.57.1",
89
+ "unplugin-icons": "^0.17.1",
90
90
  "unplugin-vue-components": "^0.25.2",
91
91
  "unplugin-vue-markdown": "^0.24.3",
92
92
  "uqr": "^0.1.2",
93
- "vite": "^4.4.11",
93
+ "vite": "^4.5.0",
94
94
  "vite-plugin-inspect": "^0.7.40",
95
95
  "vite-plugin-remote-assets": "^0.3.2",
96
96
  "vite-plugin-static-copy": "^0.17.0",
97
97
  "vite-plugin-vue-server-ref": "^0.3.4",
98
98
  "vite-plugin-windicss": "^1.9.1",
99
- "vue": "^3.3.4",
99
+ "vitefu": "^0.2.5",
100
+ "vue": "^3.3.7",
100
101
  "windicss": "^3.5.6",
101
102
  "yargs": "^17.7.2",
102
- "@slidev/client": "0.43.7",
103
- "@slidev/parser": "0.43.7",
104
- "@slidev/types": "0.43.7"
103
+ "@slidev/parser": "0.43.8",
104
+ "@slidev/client": "0.43.8",
105
+ "@slidev/types": "0.43.8"
105
106
  },
106
107
  "devDependencies": {
107
- "@types/plantuml-encoder": "^1.4.0",
108
+ "@types/plantuml-encoder": "^1.4.1",
108
109
  "fast-deep-equal": "^3.1.3",
109
110
  "local-pkg": "^0.5.0",
110
111
  "semver": "^7.5.4",