@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.
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkOFNPVCQ3js = require('./chunk-OFNPVCQ3.js');
5
+ var _chunk3UUV7IFAjs = require('./chunk-3UUV7IFA.js');
6
6
  require('./chunk-KKGXM3XL.js');
7
- require('./chunk-6ZL4B4HQ.js');
8
- require('./chunk-MJQETB73.js');
7
+ require('./chunk-34SGGZ4P.js');
8
+ require('./chunk-QDKRARRU.js');
9
9
 
10
10
  // node/build.ts
11
11
  var _path = require('path');
@@ -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 _chunkOFNPVCQ3js.getIndexHtml.call(void 0, options), "utf-8");
654
+ await _fsextra2.default.writeFile(indexPath, await _chunk3UUV7IFAjs.getIndexHtml.call(void 0, options), "utf-8");
655
655
  let config = void 0;
656
656
  try {
657
- const inlineConfig = await _chunkOFNPVCQ3js.mergeViteConfigs.call(void 0,
657
+ const inlineConfig = await _chunk3UUV7IFAjs.mergeViteConfigs.call(void 0,
658
658
  options,
659
659
  viteConfig,
660
660
  {
661
661
  root: options.userRoot,
662
662
  plugins: [
663
- await _chunkOFNPVCQ3js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
663
+ await _chunk3UUV7IFAjs.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 _chunkOFNPVCQ3js.mergeViteConfigs.call(void 0,
684
+ await _chunk3UUV7IFAjs.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-PN4EOI4Z.js"));
725
+ const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-BGMCS4F2.js"));
726
726
  const port = 12445;
727
727
  const app = _connect2.default.call(void 0, );
728
728
  const server = _http2.default.createServer(app);
@@ -2,10 +2,10 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-FP2Y7WJ3.mjs";
5
+ } from "./chunk-GZGDDQJD.mjs";
6
6
  import "./chunk-6XVZLT3I.mjs";
7
- import "./chunk-CIUEQ4TI.mjs";
8
- import "./chunk-L5QH2WZE.mjs";
7
+ import "./chunk-MZBIET7Y.mjs";
8
+ import "./chunk-KB3DQ2OE.mjs";
9
9
 
10
10
  // node/build.ts
11
11
  import { join as join3, resolve as resolve3 } from "path";
@@ -722,7 +722,7 @@ async function build(options, viteConfig = {}, args) {
722
722
  await fs2.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 import("./export-KRS4L4HC.mjs");
725
+ const { exportSlides, getExportOptions } = await import("./export-6G7WYT32.mjs");
726
726
  const port = 12445;
727
727
  const app = connect();
728
728
  const server = http.createServer(app);
@@ -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 _chunkMJQETB73js = require('./chunk-MJQETB73.js');
3
+ var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
4
4
 
5
5
  // node/utils.ts
6
6
  var _path = require('path');
@@ -20,11 +20,11 @@ function resolveImportPath(importName, ensure = false) {
20
20
  }
21
21
  if (_isinstalledglobally2.default) {
22
22
  try {
23
- return _chunkMJQETB73js.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
23
+ return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
24
24
  } catch (e2) {
25
25
  }
26
26
  try {
27
- return _chunkMJQETB73js.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
27
+ return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
28
28
  } catch (e3) {
29
29
  }
30
30
  }
@@ -38,11 +38,11 @@ function resolveGlobalImportPath(importName) {
38
38
  } catch (e4) {
39
39
  }
40
40
  try {
41
- return _chunkMJQETB73js.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
41
+ return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
42
42
  } catch (e5) {
43
43
  }
44
44
  try {
45
- return _chunkMJQETB73js.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
45
+ return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
46
46
  } catch (e6) {
47
47
  }
48
48
  throw new Error(`Failed to resolve global package "${importName}"`);
@@ -7,15 +7,15 @@ var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
7
7
 
8
8
 
9
9
 
10
- var _chunk6ZL4B4HQjs = require('./chunk-6ZL4B4HQ.js');
10
+ var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
11
11
 
12
12
 
13
13
 
14
14
 
15
- var _chunkMJQETB73js = require('./chunk-MJQETB73.js');
15
+ var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
16
16
 
17
17
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
18
- var require_fast_deep_equal = _chunkMJQETB73js.__commonJS.call(void 0, {
18
+ var require_fast_deep_equal = _chunkQDKRARRUjs.__commonJS.call(void 0, {
19
19
  "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
20
20
  "use strict";
21
21
  module.exports = function equal2(a, b) {
@@ -89,8 +89,8 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
89
89
  body += '\n<script async src="https://platform.twitter.com/widgets.js"></script>';
90
90
  if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
91
91
  head += `
92
- <link rel="stylesheet" href="${_chunk6ZL4B4HQjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
93
- main = main.replace("__ENTRY__", _chunk6ZL4B4HQjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
92
+ <link rel="stylesheet" href="${_chunk34SGGZ4Pjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
93
+ main = main.replace("__ENTRY__", _chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
94
94
  return main;
95
95
  }
96
96
  async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config, command) {
@@ -184,12 +184,12 @@ var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglo
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",
@@ -287,7 +287,7 @@ function createConfigPlugin(options) {
287
287
  define: getDefine(options),
288
288
  resolve: {
289
289
  alias: {
290
- "@slidev/client/": `${_chunk6ZL4B4HQjs.toAtFS.call(void 0, options.clientRoot)}/`
290
+ "@slidev/client/": `${_chunk34SGGZ4Pjs.toAtFS.call(void 0, options.clientRoot)}/`
291
291
  },
292
292
  dedupe: ["vue"]
293
293
  },
@@ -322,7 +322,7 @@ function createConfigPlugin(options) {
322
322
  allow: _utils.uniq.call(void 0, [
323
323
  searchForWorkspaceRoot(options.userRoot),
324
324
  searchForWorkspaceRoot(options.cliRoot),
325
- ..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunk6ZL4B4HQjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunk6ZL4B4HQjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
325
+ ..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
326
326
  ])
327
327
  }
328
328
  },
@@ -331,7 +331,7 @@ function createConfigPlugin(options) {
331
331
  if (_isinstalledglobally2.default) {
332
332
  injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
333
333
  injection.root = options.cliRoot;
334
- injection.resolve.alias.vue = `${_chunk6ZL4B4HQjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
334
+ injection.resolve.alias.vue = `${_chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
335
335
  }
336
336
  return _vite.mergeConfig.call(void 0, injection, config);
337
337
  },
@@ -353,7 +353,7 @@ function createConfigPlugin(options) {
353
353
  function getDefine(options) {
354
354
  return {
355
355
  __DEV__: options.mode === "dev" ? "true" : "false",
356
- __SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunk6ZL4B4HQjs.toAtFS.call(void 0, options.clientRoot)),
356
+ __SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunk34SGGZ4Pjs.toAtFS.call(void 0, options.clientRoot)),
357
357
  __SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
358
358
  __SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
359
359
  __SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
@@ -364,7 +364,7 @@ function getDefine(options) {
364
364
  }
365
365
 
366
366
  // node/plugins/loaders.ts
367
- var import_fast_deep_equal = _chunkMJQETB73js.__toESM.call(void 0, require_fast_deep_equal());
367
+ var import_fast_deep_equal = _chunkQDKRARRUjs.__toESM.call(void 0, require_fast_deep_equal());
368
368
 
369
369
 
370
370
 
@@ -634,7 +634,7 @@ ${title}
634
634
  delete frontmatter.title;
635
635
  const imports = [
636
636
  'import { inject as vueInject } from "vue"',
637
- `import InjectedLayout from "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, layouts[layoutName])}"`,
637
+ `import InjectedLayout from "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, layouts[layoutName])}"`,
638
638
  'import { injectionSlidevContext } from "@slidev/client/constants.ts"',
639
639
  `const frontmatter = ${JSON.stringify(frontmatter)}`,
640
640
  "const $slidev = vueInject(injectionSlidevContext)"
@@ -739,10 +739,10 @@ defineProps<{ no: number | string }>()`);
739
739
  }
740
740
  async function generateUserStyles() {
741
741
  const imports = [
742
- `import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
743
- `import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
744
- `import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`,
745
- `import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/transitions.css"))}"`
742
+ `import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
743
+ `import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
744
+ `import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`,
745
+ `import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/transitions.css"))}"`
746
746
  ];
747
747
  const roots2 = _utils.uniq.call(void 0, [
748
748
  ...themeRoots,
@@ -759,13 +759,13 @@ defineProps<{ no: number | string }>()`);
759
759
  ];
760
760
  for (const style of styles) {
761
761
  if (_fsextra.existsSync.call(void 0, style)) {
762
- imports.push(`import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, style)}"`);
762
+ imports.push(`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, style)}"`);
763
763
  continue;
764
764
  }
765
765
  }
766
766
  }
767
767
  if (data.features.katex)
768
- imports.push(`import "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, _chunk6ZL4B4HQjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
768
+ imports.push(`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
769
769
  if (data.config.css === "unocss") {
770
770
  imports.unshift(
771
771
  'import "@unocss/reset/tailwind.css"',
@@ -793,7 +793,7 @@ defineProps<{ no: number | string }>()`);
793
793
  const layouts = _utils.objectMap.call(void 0,
794
794
  await getLayouts(),
795
795
  (k, v) => {
796
- imports.push(`import __layout_${k} from "${_chunk6ZL4B4HQjs.toAtFS.call(void 0, v)}"`);
796
+ imports.push(`import __layout_${k} from "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, v)}"`);
797
797
  return [k, `__layout_${k}`];
798
798
  }
799
799
  );
@@ -842,7 +842,7 @@ ${redirects.join(",\n")}
842
842
  const config = { ...data.config, remote };
843
843
  if (_utils.isString.call(void 0, config.title)) {
844
844
  const tokens = md.parseInline(config.title, {});
845
- config.title = _chunk6ZL4B4HQjs.stringifyMarkdownTokens.call(void 0, tokens);
845
+ config.title = _chunk34SGGZ4Pjs.stringifyMarkdownTokens.call(void 0, tokens);
846
846
  }
847
847
  if (_utils.isString.call(void 0, config.info))
848
848
  config.info = md.render(config.info);
@@ -863,7 +863,7 @@ ${redirects.join(",\n")}
863
863
  ];
864
864
  }
865
865
  }).filter((i) => _fsextra2.default.existsSync(i));
866
- const imports = components.map((i, idx) => `import __n${idx} from '${_chunk6ZL4B4HQjs.toAtFS.call(void 0, i)}'`).join("\n");
866
+ const imports = components.map((i, idx) => `import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, i)}'`).join("\n");
867
867
  const render = components.map((i, idx) => `h(__n${idx})`).join(",");
868
868
  return `
869
869
  ${imports}
@@ -882,7 +882,7 @@ export default {
882
882
  _path.join.call(void 0, root, "CustomNavControls.vue")
883
883
  ];
884
884
  }).filter((i) => _fsextra2.default.existsSync(i));
885
- const imports = components.map((i, idx) => `import __n${idx} from '${_chunk6ZL4B4HQjs.toAtFS.call(void 0, i)}'`).join("\n");
885
+ const imports = components.map((i, idx) => `import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, i)}'`).join("\n");
886
886
  const render = components.map((i, idx) => `h(__n${idx})`).join(",");
887
887
  return `
888
888
  ${imports}
@@ -963,7 +963,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
963
963
  setups.forEach((path, idx) => {
964
964
  if (!_fs.existsSync.call(void 0, path))
965
965
  return;
966
- imports.push(`import __n${idx} from '${_chunk6ZL4B4HQjs.toAtFS.call(void 0, path)}'`);
966
+ imports.push(`import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, path)}'`);
967
967
  let fn = `:AWAIT:__n${idx}`;
968
968
  if (/\binjection_return\b/g.test(code))
969
969
  fn = `injection_return = ${fn}`;
@@ -994,7 +994,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
994
994
  }
995
995
 
996
996
  // node/plugins/markdown.ts
997
- var _vitepluginvuemarkdown = require('vite-plugin-vue-markdown'); var _vitepluginvuemarkdown2 = _interopRequireDefault(_vitepluginvuemarkdown);
997
+ var _vite7 = require('unplugin-vue-markdown/vite'); var _vite8 = _interopRequireDefault(_vite7);
998
998
  var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
999
999
 
1000
1000
 
@@ -1186,7 +1186,7 @@ function loadPrismLang(lang) {
1186
1186
  }
1187
1187
  function loadPrismPlugin(name) {
1188
1188
  try {
1189
- _chunkMJQETB73js.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
1189
+ _chunkQDKRARRUjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
1190
1190
  } catch (e) {
1191
1191
  throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
1192
1192
  }
@@ -1322,7 +1322,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
1322
1322
  setups.push((md2) => md2.use(markdownItPrism));
1323
1323
  }
1324
1324
  const KatexOptions = await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "katex.ts", {}, { strict: false }, false);
1325
- return _vitepluginvuemarkdown2.default.call(void 0, {
1325
+ return _vite8.default.call(void 0, {
1326
1326
  wrapperClasses: "",
1327
1327
  headEnabled: false,
1328
1328
  frontmatter: false,
@@ -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" ? Promise.resolve().then(() => require("./windicss-YNIIPANV.js")).then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : Promise.resolve().then(() => require("./unocss-2CJUFE63.js")).then((r) => r.createUnocssPlugin(options, pluginOptions))
1639
+ config.css === "none" ? null : config.css === "windicss" ? Promise.resolve().then(() => require("./windicss-3HGYWXUJ.js")).then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : Promise.resolve().then(() => require("./unocss-2T2KTWQ5.js")).then((r) => r.createUnocssPlugin(options, pluginOptions))
1640
1640
  ];
1641
1641
  return (await Promise.all(plugins)).flat().filter(_utils.notNullish);
1642
1642
  }