@slidev/cli 0.43.0-beta.4 → 0.43.0-beta.6

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
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-4VXY5G3T.mjs";
4
+ } from "./chunk-3TJE2CDX.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.0-beta.4";
2522
+ var version = "0.43.0-beta.6";
2523
2523
 
2524
2524
  // node/themes.ts
2525
2525
  import prompts2 from "prompts";
package/dist/cli.js CHANGED
@@ -9,10 +9,10 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkWVI7OC5Ajs = require('./chunk-WVI7OC5A.js');
12
+ var _chunk3SSSSIJPjs = require('./chunk-3SSSSIJP.js');
13
13
 
14
14
 
15
- var _chunk4D4M2E5Mjs = require('./chunk-4D4M2E5M.js');
15
+ var _chunkB2S4FMPEjs = require('./chunk-B2S4FMPE.js');
16
16
 
17
17
 
18
18
  var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
@@ -22,7 +22,7 @@ require('./chunk-JQHGZJGJ.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, _chunk4D4M2E5Mjs.require_fast_deep_equal.call(void 0, ));
25
+ var import_fast_deep_equal = _chunkYUG22S6Wjs.__toESM.call(void 0, _chunkB2S4FMPEjs.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
- _chunkWVI7OC5Ajs.getUserRoot.call(void 0, {}).userRoot,
55
- ..._chunkWVI7OC5Ajs.getAddonRoots.call(void 0, addons, ""),
56
- _chunkWVI7OC5Ajs.getClientRoot.call(void 0, )
54
+ _chunk3SSSSIJPjs.getUserRoot.call(void 0, {}).userRoot,
55
+ ..._chunk3SSSSIJPjs.getAddonRoots.call(void 0, addons, ""),
56
+ _chunk3SSSSIJPjs.getClientRoot.call(void 0, )
57
57
  ]
58
58
  );
59
59
  const mergeArrays = (a, b) => a.concat(b);
60
60
  return await _chunkKKGXM3XLjs.loadSetups.call(void 0, roots, "preparser.ts", { filepath, headmatter }, [], false, mergeArrays);
61
61
  });
62
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkWVI7OC5Ajs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
62
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk3SSSSIJPjs.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 _chunkWVI7OC5Ajs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
118
+ const options = await _chunk3SSSSIJPjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
119
119
  port = userPort || await findFreePort(3030);
120
- server = await _chunkWVI7OC5Ajs.createServer.call(void 0,
120
+ server = await _chunk3SSSSIJPjs.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 && _chunkWVI7OC5Ajs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkWVI7OC5Ajs.resolveThemeName.call(void 0, data.config.theme)) {
134
+ if (!theme && _chunk3SSSSIJPjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunk3SSSSIJPjs.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]))) {
@@ -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-C6YSRCET.js"));
263
+ const { build } = await Promise.resolve().then(() => require("./build-IN5YJEKU.js"));
264
264
  for (const entryFile of entry) {
265
- const options = await _chunkWVI7OC5Ajs.resolveOptions.call(void 0, { entry: entryFile, theme, inspect }, "build");
265
+ const options = await _chunk3SSSSIJPjs.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 _chunkWVI7OC5Ajs.parser.load(entryFile);
286
- _chunkWVI7OC5Ajs.parser.prettify(data);
287
- await _chunkWVI7OC5Ajs.parser.save(data);
285
+ const data = await _chunk3SSSSIJPjs.parser.load(entryFile);
286
+ _chunk3SSSSIJPjs.parser.prettify(data);
287
+ await _chunk3SSSSIJPjs.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 _chunkWVI7OC5Ajs.parser.load(entry);
304
- const theme = _chunkWVI7OC5Ajs.resolveThemeName.call(void 0, themeInput || data.config.theme);
303
+ const data = await _chunk3SSSSIJPjs.parser.load(entry);
304
+ const theme = _chunk3SSSSIJPjs.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 (_chunkWVI7OC5Ajs.isPath.call(void 0, theme)) {
309
+ if (_chunk3SSSSIJPjs.isPath.call(void 0, theme)) {
310
310
  console.error("Theme is already ejected");
311
311
  _process2.default.exit(1);
312
312
  }
313
- const roots = _chunkWVI7OC5Ajs.getThemeRoots.call(void 0, theme, entry);
313
+ const roots = _chunk3SSSSIJPjs.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 _chunkWVI7OC5Ajs.parser.save(data);
325
+ await _chunk3SSSSIJPjs.parser.save(data);
326
326
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
327
327
  }
328
328
  );
@@ -342,8 +342,8 @@ cli.command(
342
342
  const { exportSlides, getExportOptions } = await Promise.resolve().then(() => require("./export-MCALG7XD.js"));
343
343
  const port = await findFreePort(12445);
344
344
  for (const entryFile of entry) {
345
- const options = await _chunkWVI7OC5Ajs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
346
- const server = await _chunkWVI7OC5Ajs.createServer.call(void 0,
345
+ const options = await _chunk3SSSSIJPjs.resolveOptions.call(void 0, { entry: entryFile, theme }, "export");
346
+ const server = await _chunk3SSSSIJPjs.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
- _chunkWVI7OC5Ajs.parser.filterDisabled(options.data);
355
+ _chunk3SSSSIJPjs.parser.filterDisabled(options.data);
356
356
  const result = await exportSlides({
357
357
  port,
358
358
  ...getExportOptions({ ...args, entry: entryFile }, options)
@@ -388,8 +388,8 @@ cli.command(
388
388
  const { exportNotes } = await Promise.resolve().then(() => require("./export-MCALG7XD.js"));
389
389
  const port = await findFreePort(12445);
390
390
  for (const entryFile of entry) {
391
- const options = await _chunkWVI7OC5Ajs.resolveOptions.call(void 0, { entry: entryFile }, "export");
392
- const server = await _chunkWVI7OC5Ajs.createServer.call(void 0,
391
+ const options = await _chunk3SSSSIJPjs.resolveOptions.call(void 0, { entry: entryFile }, "export");
392
+ const server = await _chunk3SSSSIJPjs.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
- _chunkWVI7OC5Ajs.parser.filterDisabled(options.data);
401
+ _chunk3SSSSIJPjs.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${_chunkWVI7OC5Ajs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
462
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk3SSSSIJPjs.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-B2WFHX3U.mjs";
12
+ } from "./chunk-XH4NQ4ZL.mjs";
13
13
  import {
14
14
  require_fast_deep_equal
15
- } from "./chunk-4VXY5G3T.mjs";
15
+ } from "./chunk-3TJE2CDX.mjs";
16
16
  import {
17
17
  loadSetups
18
18
  } from "./chunk-JDHANZ37.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-ZIF7XMD2.mjs");
263
+ const { build } = await import("./build-BUNPGN2Z.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)
package/dist/index.js CHANGED
@@ -9,13 +9,13 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkWVI7OC5Ajs = require('./chunk-WVI7OC5A.js');
12
+ var _chunk3SSSSIJPjs = require('./chunk-3SSSSIJP.js');
13
13
 
14
14
 
15
15
  var _chunkJ7PXWEZ7js = require('./chunk-J7PXWEZ7.js');
16
16
 
17
17
 
18
- var _chunk4D4M2E5Mjs = require('./chunk-4D4M2E5M.js');
18
+ var _chunkB2S4FMPEjs = require('./chunk-B2S4FMPE.js');
19
19
  require('./chunk-KKGXM3XL.js');
20
20
  require('./chunk-JQHGZJGJ.js');
21
21
  require('./chunk-YUG22S6W.js');
@@ -32,4 +32,4 @@ require('./chunk-YUG22S6W.js');
32
32
 
33
33
 
34
34
 
35
- exports.ViteSlidevPlugin = _chunk4D4M2E5Mjs.ViteSlidevPlugin; exports.createServer = _chunkWVI7OC5Ajs.createServer; exports.createWindiCSSPlugin = _chunkJ7PXWEZ7js.createWindiCSSPlugin; exports.getAddonRoots = _chunkWVI7OC5Ajs.getAddonRoots; exports.getCLIRoot = _chunkWVI7OC5Ajs.getCLIRoot; exports.getClientRoot = _chunkWVI7OC5Ajs.getClientRoot; exports.getRoot = _chunkWVI7OC5Ajs.getRoot; exports.getThemeRoots = _chunkWVI7OC5Ajs.getThemeRoots; exports.getUserRoot = _chunkWVI7OC5Ajs.getUserRoot; exports.isPath = _chunkWVI7OC5Ajs.isPath; exports.parser = _chunkWVI7OC5Ajs.parser; exports.resolveOptions = _chunkWVI7OC5Ajs.resolveOptions;
35
+ exports.ViteSlidevPlugin = _chunkB2S4FMPEjs.ViteSlidevPlugin; exports.createServer = _chunk3SSSSIJPjs.createServer; exports.createWindiCSSPlugin = _chunkJ7PXWEZ7js.createWindiCSSPlugin; exports.getAddonRoots = _chunk3SSSSIJPjs.getAddonRoots; exports.getCLIRoot = _chunk3SSSSIJPjs.getCLIRoot; exports.getClientRoot = _chunk3SSSSIJPjs.getClientRoot; exports.getRoot = _chunk3SSSSIJPjs.getRoot; exports.getThemeRoots = _chunk3SSSSIJPjs.getThemeRoots; exports.getUserRoot = _chunk3SSSSIJPjs.getUserRoot; exports.isPath = _chunk3SSSSIJPjs.isPath; exports.parser = _chunk3SSSSIJPjs.parser; exports.resolveOptions = _chunk3SSSSIJPjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,13 +9,13 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-B2WFHX3U.mjs";
12
+ } from "./chunk-XH4NQ4ZL.mjs";
13
13
  import {
14
14
  createWindiCSSPlugin
15
15
  } from "./chunk-HO75FTDI.mjs";
16
16
  import {
17
17
  ViteSlidevPlugin
18
- } from "./chunk-4VXY5G3T.mjs";
18
+ } from "./chunk-3TJE2CDX.mjs";
19
19
  import "./chunk-JDHANZ37.mjs";
20
20
  import "./chunk-ZEKM4EGL.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.0-beta.4",
3
+ "version": "0.43.0-beta.6",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
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.55.5",
51
+ "@unocss/extractor-mdc": "^0.55.6",
52
52
  "@vitejs/plugin-vue": "^4.3.4",
53
53
  "@vitejs/plugin-vue-jsx": "^3.0.2",
54
54
  "@windicss/config": "^1.9.1",
@@ -71,6 +71,7 @@
71
71
  "markdown-it": "^13.0.1",
72
72
  "markdown-it-footnote": "^3.0.3",
73
73
  "markdown-it-link-attributes": "^4.0.1",
74
+ "markdown-it-mdc": "^0.1.3",
74
75
  "monaco-editor": "^0.37.1",
75
76
  "nanoid": "^4.0.2",
76
77
  "open": "^8.4.1",
@@ -83,8 +84,8 @@
83
84
  "resolve-from": "^5.0.0",
84
85
  "resolve-global": "^1.0.0",
85
86
  "shiki": "npm:shikiji-compat@^0.6.6",
86
- "unocss": "^0.55.5",
87
- "unplugin-icons": "^0.16.6",
87
+ "unocss": "^0.55.6",
88
+ "unplugin-icons": "^0.17.0",
88
89
  "unplugin-vue-components": "^0.25.2",
89
90
  "unplugin-vue-markdown": "^0.24.3",
90
91
  "uqr": "^0.1.2",
@@ -97,15 +98,14 @@
97
98
  "vue": "^3.3.4",
98
99
  "windicss": "^3.5.6",
99
100
  "yargs": "^17.7.2",
100
- "@slidev/client": "0.43.0-beta.4",
101
- "@slidev/parser": "0.43.0-beta.4",
102
- "@slidev/types": "0.43.0-beta.4"
101
+ "@slidev/client": "0.43.0-beta.6",
102
+ "@slidev/parser": "0.43.0-beta.6",
103
+ "@slidev/types": "0.43.0-beta.6"
103
104
  },
104
105
  "devDependencies": {
105
106
  "@types/plantuml-encoder": "^1.4.0",
106
107
  "fast-deep-equal": "^3.1.3",
107
108
  "local-pkg": "^0.4.3",
108
- "markdown-it-mdc": "^0.1.0",
109
109
  "semver": "^7.5.4",
110
110
  "sirv": "^2.0.3"
111
111
  },