@slidev/cli 0.35.4 → 0.35.5

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 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk2SBR5VZFjs = require('./chunk-2SBR5VZF.js');
5
+ var _chunkZJSOFQBRjs = require('./chunk-ZJSOFQBR.js');
6
6
 
7
7
 
8
8
 
@@ -655,13 +655,13 @@ 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 _chunk2SBR5VZFjs.getIndexHtml.call(void 0, options), "utf-8");
658
+ await _fsextra2.default.writeFile(indexPath, await _chunkZJSOFQBRjs.getIndexHtml.call(void 0, options), "utf-8");
659
659
  let config = void 0;
660
660
  try {
661
- const inlineConfig = await _chunk2SBR5VZFjs.mergeViteConfigs.call(void 0, options, viteConfig, {
661
+ const inlineConfig = await _chunkZJSOFQBRjs.mergeViteConfigs.call(void 0, options, viteConfig, {
662
662
  root: options.userRoot,
663
663
  plugins: [
664
- await _chunk2SBR5VZFjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
664
+ await _chunkZJSOFQBRjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
665
665
  {
666
666
  name: "resolve-config",
667
667
  configResolved(_config) {
@@ -679,7 +679,7 @@ async function build(options, viteConfig = {}) {
679
679
  console.log(_kolorist.yellow.call(void 0, " Monaco is disabled in the build, to enabled it, set `monaco: true` in the frontmatter"));
680
680
  } else {
681
681
  console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
682
- await _vite.build.call(void 0, await _chunk2SBR5VZFjs.mergeViteConfigs.call(void 0, options, inlineConfig, {
682
+ await _vite.build.call(void 0, await _chunkZJSOFQBRjs.mergeViteConfigs.call(void 0, options, inlineConfig, {
683
683
  root: _path.join.call(void 0, options.clientRoot, "iframes/monaco"),
684
684
  base: `${config.base}iframes/monaco/`,
685
685
  build: {
@@ -713,7 +713,7 @@ async function build(options, viteConfig = {}) {
713
713
  await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
714
714
  `, "utf-8");
715
715
  if ([true, "true", "auto"].includes(options.data.config.download)) {
716
- const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-TH7MNEXN.js")));
716
+ const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-JXFGVO7B.js")));
717
717
  const port = 12445;
718
718
  const app = _connect2.default.call(void 0, );
719
719
  const server = _http2.default.createServer(app);
@@ -2,7 +2,7 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-54NZDFOD.mjs";
5
+ } from "./chunk-QPGEWKWZ.mjs";
6
6
  import {
7
7
  __require,
8
8
  __toESM,
@@ -713,7 +713,7 @@ async function build(options, viteConfig = {}) {
713
713
  await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
714
714
  `, "utf-8");
715
715
  if ([true, "true", "auto"].includes(options.data.config.download)) {
716
- const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-5OVMZQWE.mjs")));
716
+ const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-U7F6XGP6.mjs")));
717
717
  const port = 12445;
718
718
  const app = connect();
719
719
  const server = http.createServer(app);
@@ -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 _chunk2SBR5VZFjs = require('./chunk-2SBR5VZF.js');
4
+ var _chunkZJSOFQBRjs = require('./chunk-ZJSOFQBR.js');
5
5
 
6
6
 
7
7
 
@@ -2380,14 +2380,14 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2380
2380
  const rawConfig = await _vite.resolveConfig.call(void 0, {}, "serve");
2381
2381
  const pluginOptions = rawConfig.slidev || {};
2382
2382
  process.env.EDITOR = process.env.EDITOR || "code";
2383
- const server = await _vite.createServer.call(void 0, await _chunk2SBR5VZFjs.mergeViteConfigs.call(void 0, options, viteConfig, {
2383
+ const server = await _vite.createServer.call(void 0, await _chunkZJSOFQBRjs.mergeViteConfigs.call(void 0, options, viteConfig, {
2384
2384
  optimizeDeps: {
2385
2385
  entries: [
2386
2386
  _path.join.call(void 0, options.clientRoot, "main.ts")
2387
2387
  ]
2388
2388
  },
2389
2389
  plugins: [
2390
- await _chunk2SBR5VZFjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2390
+ await _chunkZJSOFQBRjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2391
2391
  ]
2392
2392
  }, "serve"));
2393
2393
  return server;
@@ -2398,7 +2398,7 @@ _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
2398
2398
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2399
2399
 
2400
2400
  // package.json
2401
- var version = "0.35.4";
2401
+ var version = "0.35.5";
2402
2402
 
2403
2403
  // node/themes.ts
2404
2404
  _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
@@ -269,10 +269,10 @@ var dependencies = {
269
269
  "@antfu/utils": "^0.5.2",
270
270
  "@slidev/parser": "workspace:*",
271
271
  "@slidev/types": "workspace:*",
272
- "@unocss/reset": "^0.45.1",
273
- "@vueuse/core": "^9.0.1",
274
- "@vueuse/head": "^0.7.8",
275
- "@vueuse/math": "^9.0.1",
272
+ "@unocss/reset": "^0.45.6",
273
+ "@vueuse/core": "^9.1.0",
274
+ "@vueuse/head": "^0.7.9",
275
+ "@vueuse/math": "^9.1.0",
276
276
  "@vueuse/motion": "^2.0.0-beta.18",
277
277
  codemirror: "^5.65.5",
278
278
  defu: "^6.0.0",
@@ -281,13 +281,13 @@ var dependencies = {
281
281
  "js-base64": "^3.7.2",
282
282
  "js-yaml": "^4.1.0",
283
283
  katex: "^0.16.0",
284
- mermaid: "^9.1.3",
285
- "monaco-editor": "^0.33.0",
284
+ mermaid: "^9.1.5",
285
+ "monaco-editor": "^0.34.0",
286
286
  nanoid: "^4.0.0",
287
287
  prettier: "^2.7.1",
288
288
  recordrtc: "^5.6.2",
289
289
  resolve: "^1.22.1",
290
- unocss: "^0.45.1",
290
+ unocss: "^0.45.6",
291
291
  "vite-plugin-windicss": "^1.8.7",
292
292
  vue: "^3.2.37",
293
293
  "vue-router": "^4.1.3",
@@ -342,6 +342,9 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
342
342
  var EXCLUDE = [
343
343
  "@slidev/shared",
344
344
  "@slidev/types",
345
+ "@slidev/client",
346
+ "@slidev/client/constants",
347
+ "@slidev/client/logic/dark",
345
348
  "@vueuse/core",
346
349
  "@vueuse/shared",
347
350
  "@unocss/reset",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-54NZDFOD.mjs";
4
+ } from "./chunk-QPGEWKWZ.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __dirname,
@@ -2399,7 +2399,7 @@ init_esm_shims();
2399
2399
  import * as parser from "@slidev/parser/fs";
2400
2400
 
2401
2401
  // package.json
2402
- var version = "0.35.4";
2402
+ var version = "0.35.5";
2403
2403
 
2404
2404
  // node/themes.ts
2405
2405
  init_esm_shims();
@@ -268,10 +268,10 @@ var dependencies = {
268
268
  "@antfu/utils": "^0.5.2",
269
269
  "@slidev/parser": "workspace:*",
270
270
  "@slidev/types": "workspace:*",
271
- "@unocss/reset": "^0.45.1",
272
- "@vueuse/core": "^9.0.1",
273
- "@vueuse/head": "^0.7.8",
274
- "@vueuse/math": "^9.0.1",
271
+ "@unocss/reset": "^0.45.6",
272
+ "@vueuse/core": "^9.1.0",
273
+ "@vueuse/head": "^0.7.9",
274
+ "@vueuse/math": "^9.1.0",
275
275
  "@vueuse/motion": "^2.0.0-beta.18",
276
276
  codemirror: "^5.65.5",
277
277
  defu: "^6.0.0",
@@ -280,13 +280,13 @@ var dependencies = {
280
280
  "js-base64": "^3.7.2",
281
281
  "js-yaml": "^4.1.0",
282
282
  katex: "^0.16.0",
283
- mermaid: "^9.1.3",
284
- "monaco-editor": "^0.33.0",
283
+ mermaid: "^9.1.5",
284
+ "monaco-editor": "^0.34.0",
285
285
  nanoid: "^4.0.0",
286
286
  prettier: "^2.7.1",
287
287
  recordrtc: "^5.6.2",
288
288
  resolve: "^1.22.1",
289
- unocss: "^0.45.1",
289
+ unocss: "^0.45.6",
290
290
  "vite-plugin-windicss": "^1.8.7",
291
291
  vue: "^3.2.37",
292
292
  "vue-router": "^4.1.3",
@@ -341,6 +341,9 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
341
341
  var EXCLUDE = [
342
342
  "@slidev/shared",
343
343
  "@slidev/types",
344
+ "@slidev/client",
345
+ "@slidev/client/constants",
346
+ "@slidev/client/logic/dark",
344
347
  "@vueuse/core",
345
348
  "@vueuse/shared",
346
349
  "@unocss/reset",
package/dist/cli.js CHANGED
@@ -6,10 +6,10 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkRWZBP7KJjs = require('./chunk-RWZBP7KJ.js');
9
+ var _chunkAHXRM5NGjs = require('./chunk-AHXRM5NG.js');
10
10
 
11
11
 
12
- var _chunk2SBR5VZFjs = require('./chunk-2SBR5VZF.js');
12
+ var _chunkZJSOFQBRjs = require('./chunk-ZJSOFQBR.js');
13
13
 
14
14
 
15
15
 
@@ -18,7 +18,7 @@ var _chunkSQLX75IOjs = require('./chunk-SQLX75IO.js');
18
18
 
19
19
  // node/cli.ts
20
20
  _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
21
- var import_fast_deep_equal = _chunkSQLX75IOjs.__toESM.call(void 0, _chunk2SBR5VZFjs.require_fast_deep_equal.call(void 0, ));
21
+ var import_fast_deep_equal = _chunkSQLX75IOjs.__toESM.call(void 0, _chunkZJSOFQBRjs.require_fast_deep_equal.call(void 0, ));
22
22
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
23
23
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
24
24
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
@@ -38,7 +38,7 @@ var CONFIG_RESTART_FIELDS = [
38
38
  "fonts",
39
39
  "css"
40
40
  ];
41
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkRWZBP7KJjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
41
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkAHXRM5NGjs.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",
@@ -81,9 +81,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
81
81
  async function initServer() {
82
82
  if (server)
83
83
  await server.close();
84
- const options = await _chunkRWZBP7KJjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
84
+ const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
85
85
  port = userPort || await findFreePort(3030);
86
- server = await _chunkRWZBP7KJjs.createServer.call(void 0, options, {
86
+ server = await _chunkAHXRM5NGjs.createServer.call(void 0, options, {
87
87
  server: {
88
88
  port,
89
89
  strictPort: true,
@@ -94,7 +94,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
94
94
  logLevel: log
95
95
  }, {
96
96
  onDataReload(newData, data) {
97
- if (!theme && _chunkRWZBP7KJjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkRWZBP7KJjs.resolveThemeName.call(void 0, data.config.theme)) {
97
+ if (!theme && _chunkAHXRM5NGjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkAHXRM5NGjs.resolveThemeName.call(void 0, data.config.theme)) {
98
98
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
99
99
  initServer();
100
100
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -170,8 +170,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
170
170
  type: "boolean",
171
171
  describe: "allow download as PDF"
172
172
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
173
- const { build } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./build-YURLBXT3.js")));
174
- const options = await _chunkRWZBP7KJjs.resolveOptions.call(void 0, { entry, theme }, "build");
173
+ const { build } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./build-PO2PXBSF.js")));
174
+ const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, theme }, "build");
175
175
  if (download && !options.data.config.download)
176
176
  options.data.config.download = download;
177
177
  printInfo(options);
@@ -184,26 +184,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
184
184
  });
185
185
  });
186
186
  cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
187
- const data = await _chunkRWZBP7KJjs.parser.load(entry);
188
- _chunkRWZBP7KJjs.parser.prettify(data);
189
- await _chunkRWZBP7KJjs.parser.save(data);
187
+ const data = await _chunkAHXRM5NGjs.parser.load(entry);
188
+ _chunkAHXRM5NGjs.parser.prettify(data);
189
+ await _chunkAHXRM5NGjs.parser.save(data);
190
190
  });
191
191
  cli.command("theme [subcommand]", "Theme related operations", (command) => {
192
192
  return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
193
193
  type: "string",
194
194
  default: "theme"
195
195
  }), async ({ entry, dir, theme: themeInput }) => {
196
- const data = await _chunkRWZBP7KJjs.parser.load(entry);
197
- const theme = _chunkRWZBP7KJjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
196
+ const data = await _chunkAHXRM5NGjs.parser.load(entry);
197
+ const theme = _chunkAHXRM5NGjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
198
198
  if (theme === "none") {
199
199
  console.error('Can not eject theme "none"');
200
200
  process.exit(1);
201
201
  }
202
- if (_chunkRWZBP7KJjs.isPath.call(void 0, theme)) {
202
+ if (_chunkAHXRM5NGjs.isPath.call(void 0, theme)) {
203
203
  console.error("Theme is already ejected");
204
204
  process.exit(1);
205
205
  }
206
- const roots = _chunkRWZBP7KJjs.getThemeRoots.call(void 0, theme, entry);
206
+ const roots = _chunkAHXRM5NGjs.getThemeRoots.call(void 0, theme, entry);
207
207
  if (!roots.length) {
208
208
  console.error(`Does not found theme "${theme}"`);
209
209
  process.exit(1);
@@ -215,7 +215,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
215
215
  const dirPath = `./${dir}`;
216
216
  data.slides[0].frontmatter.theme = dirPath;
217
217
  data.slides[0].raw = null;
218
- await _chunkRWZBP7KJjs.parser.save(data);
218
+ await _chunkAHXRM5NGjs.parser.save(data);
219
219
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
220
220
  });
221
221
  }, () => {
@@ -246,6 +246,9 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
246
246
  default: false,
247
247
  type: "boolean",
248
248
  describe: "export pages for every clicks"
249
+ }).option("executable-path", {
250
+ type: "string",
251
+ describe: "executable to override playwright bundled browser"
249
252
  }).strict().help(), async ({
250
253
  entry,
251
254
  theme,
@@ -254,20 +257,21 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
254
257
  timeout,
255
258
  range,
256
259
  dark,
257
- "with-clicks": withClicks
260
+ "with-clicks": withClicks,
261
+ "executable-path": executablePath
258
262
  }) => {
259
263
  process.env.NODE_ENV = "production";
260
- const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-TH7MNEXN.js")));
264
+ const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-JXFGVO7B.js")));
261
265
  const port = await findFreePort(12445);
262
- const options = await _chunkRWZBP7KJjs.resolveOptions.call(void 0, { entry, theme }, "build");
266
+ const options = await _chunkAHXRM5NGjs.resolveOptions.call(void 0, { entry, theme }, "build");
263
267
  output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
264
- const server = await _chunkRWZBP7KJjs.createServer.call(void 0, options, {
268
+ const server = await _chunkAHXRM5NGjs.createServer.call(void 0, options, {
265
269
  server: { port },
266
270
  clearScreen: false
267
271
  });
268
272
  await server.listen(port);
269
273
  printInfo(options);
270
- _chunkRWZBP7KJjs.parser.filterDisabled(options.data);
274
+ _chunkAHXRM5NGjs.parser.filterDisabled(options.data);
271
275
  const width = options.data.config.canvasWidth;
272
276
  const height = Math.round(width / options.data.config.aspectRatio);
273
277
  output = await exportSlides({
@@ -282,7 +286,8 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
282
286
  routerMode: options.data.config.routerMode,
283
287
  width,
284
288
  height,
285
- withClicks
289
+ withClicks,
290
+ executablePath
286
291
  });
287
292
  console.log(`${_kolorist.green.call(void 0, " \u2713 ")}${_kolorist.dim.call(void 0, "exported to ")}./${output}
288
293
  `);
@@ -305,7 +310,7 @@ function printInfo(options, port, remote) {
305
310
  console.log();
306
311
  console.log();
307
312
  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${_chunkRWZBP7KJjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
313
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkAHXRM5NGjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
309
314
  console.log();
310
315
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
311
316
  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
@@ -6,10 +6,10 @@ import {
6
6
  resolveOptions,
7
7
  resolveThemeName,
8
8
  version
9
- } from "./chunk-CG7FMSNH.mjs";
9
+ } from "./chunk-SWNG6UPD.mjs";
10
10
  import {
11
11
  require_fast_deep_equal
12
- } from "./chunk-54NZDFOD.mjs";
12
+ } from "./chunk-QPGEWKWZ.mjs";
13
13
  import {
14
14
  __dirname,
15
15
  __require,
@@ -171,7 +171,7 @@ 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(() => __toESM(__require("./build-IINHUSXF.mjs")));
174
+ const { build } = await Promise.resolve().then(() => __toESM(__require("./build-RBCFVFDG.mjs")));
175
175
  const options = await resolveOptions({ entry, theme }, "build");
176
176
  if (download && !options.data.config.download)
177
177
  options.data.config.download = download;
@@ -247,6 +247,9 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
247
247
  default: false,
248
248
  type: "boolean",
249
249
  describe: "export pages for every clicks"
250
+ }).option("executable-path", {
251
+ type: "string",
252
+ describe: "executable to override playwright bundled browser"
250
253
  }).strict().help(), async ({
251
254
  entry,
252
255
  theme,
@@ -255,10 +258,11 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
255
258
  timeout,
256
259
  range,
257
260
  dark,
258
- "with-clicks": withClicks
261
+ "with-clicks": withClicks,
262
+ "executable-path": executablePath
259
263
  }) => {
260
264
  process.env.NODE_ENV = "production";
261
- const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-5OVMZQWE.mjs")));
265
+ const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-U7F6XGP6.mjs")));
262
266
  const port = await findFreePort(12445);
263
267
  const options = await resolveOptions({ entry, theme }, "build");
264
268
  output = output || options.data.config.exportFilename || `${path.basename(entry, ".md")}-export`;
@@ -283,7 +287,8 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
283
287
  routerMode: options.data.config.routerMode,
284
288
  width,
285
289
  height,
286
- withClicks
290
+ withClicks,
291
+ executablePath
287
292
  });
288
293
  console.log(`${green(" \u2713 ")}${dim("exported to ")}./${output}
289
294
  `);
@@ -58,13 +58,16 @@ async function exportSlides({
58
58
  routerMode = "history",
59
59
  width = 1920,
60
60
  height = 1080,
61
- withClicks = false
61
+ withClicks = false,
62
+ executablePath = void 0
62
63
  }) {
63
64
  if (!_chunkSQLX75IOjs.packageExists.call(void 0, "playwright-chromium"))
64
65
  throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i -D playwright-chromium`");
65
66
  const pages = _core.parseRangeString.call(void 0, total, range);
66
67
  const { chromium } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "playwright-chromium")));
67
- const browser = await chromium.launch();
68
+ const browser = await chromium.launch({
69
+ executablePath
70
+ });
68
71
  const context = await browser.newContext({
69
72
  viewport: {
70
73
  width,
@@ -58,13 +58,16 @@ async function exportSlides({
58
58
  routerMode = "history",
59
59
  width = 1920,
60
60
  height = 1080,
61
- withClicks = false
61
+ withClicks = false,
62
+ executablePath = void 0
62
63
  }) {
63
64
  if (!packageExists("playwright-chromium"))
64
65
  throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i -D playwright-chromium`");
65
66
  const pages = parseRangeString(total, range);
66
67
  const { chromium } = await Promise.resolve().then(() => __toESM(__require("playwright-chromium")));
67
- const browser = await chromium.launch();
68
+ const browser = await chromium.launch({
69
+ executablePath
70
+ });
68
71
  const context = await browser.newContext({
69
72
  viewport: {
70
73
  width,
package/dist/index.js CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkRWZBP7KJjs = require('./chunk-RWZBP7KJ.js');
12
+ var _chunkAHXRM5NGjs = require('./chunk-AHXRM5NG.js');
13
13
 
14
14
 
15
15
 
16
- var _chunk2SBR5VZFjs = require('./chunk-2SBR5VZF.js');
16
+ var _chunkZJSOFQBRjs = require('./chunk-ZJSOFQBR.js');
17
17
 
18
18
 
19
19
  var _chunkSQLX75IOjs = require('./chunk-SQLX75IO.js');
@@ -36,4 +36,4 @@ _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
36
36
 
37
37
 
38
38
 
39
- exports.ViteSlidevPlugin = _chunk2SBR5VZFjs.ViteSlidevPlugin; exports.createServer = _chunkRWZBP7KJjs.createServer; exports.createWindiCSSPlugin = _chunk2SBR5VZFjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkRWZBP7KJjs.getAddonRoots; exports.getCLIRoot = _chunkRWZBP7KJjs.getCLIRoot; exports.getClientRoot = _chunkRWZBP7KJjs.getClientRoot; exports.getRoot = _chunkRWZBP7KJjs.getRoot; exports.getThemeRoots = _chunkRWZBP7KJjs.getThemeRoots; exports.getUserRoot = _chunkRWZBP7KJjs.getUserRoot; exports.isPath = _chunkRWZBP7KJjs.isPath; exports.parser = _chunkRWZBP7KJjs.parser; exports.resolveOptions = _chunkRWZBP7KJjs.resolveOptions;
39
+ exports.ViteSlidevPlugin = _chunkZJSOFQBRjs.ViteSlidevPlugin; exports.createServer = _chunkAHXRM5NGjs.createServer; exports.createWindiCSSPlugin = _chunkZJSOFQBRjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkAHXRM5NGjs.getAddonRoots; exports.getCLIRoot = _chunkAHXRM5NGjs.getCLIRoot; exports.getClientRoot = _chunkAHXRM5NGjs.getClientRoot; exports.getRoot = _chunkAHXRM5NGjs.getRoot; exports.getThemeRoots = _chunkAHXRM5NGjs.getThemeRoots; exports.getUserRoot = _chunkAHXRM5NGjs.getUserRoot; exports.isPath = _chunkAHXRM5NGjs.isPath; exports.parser = _chunkAHXRM5NGjs.parser; exports.resolveOptions = _chunkAHXRM5NGjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,11 +9,11 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-CG7FMSNH.mjs";
12
+ } from "./chunk-SWNG6UPD.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
16
- } from "./chunk-54NZDFOD.mjs";
16
+ } from "./chunk-QPGEWKWZ.mjs";
17
17
  import {
18
18
  init_esm_shims
19
19
  } from "./chunk-GVA336JI.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.35.4",
3
+ "version": "0.35.5",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -46,10 +46,10 @@
46
46
  "@hedgedoc/markdown-it-task-lists": "^1.0.5",
47
47
  "@iconify-json/carbon": "^1.1.7",
48
48
  "@iconify-json/ph": "^1.1.2",
49
- "@slidev/client": "0.35.4",
50
- "@slidev/parser": "0.35.4",
51
- "@slidev/types": "0.35.4",
52
- "@vitejs/plugin-vue": "^3.0.1",
49
+ "@slidev/client": "0.35.5",
50
+ "@slidev/parser": "0.35.5",
51
+ "@slidev/types": "0.35.5",
52
+ "@vitejs/plugin-vue": "^3.0.3",
53
53
  "@vue/compiler-sfc": "^3.2.37",
54
54
  "cli-progress": "^3.11.2",
55
55
  "codemirror": "^5.65.5",
@@ -66,8 +66,8 @@
66
66
  "kolorist": "^1.5.1",
67
67
  "markdown-it": "^13.0.1",
68
68
  "markdown-it-footnote": "^3.0.3",
69
- "markdown-it-link-attributes": "^4.0.0",
70
- "monaco-editor": "^0.33.0",
69
+ "markdown-it-link-attributes": "^4.0.1",
70
+ "monaco-editor": "^0.34.0",
71
71
  "nanoid": "^4.0.0",
72
72
  "open": "^8.4.0",
73
73
  "plantuml-encoder": "^1.4.0",
@@ -77,13 +77,13 @@
77
77
  "resolve": "^1.22.1",
78
78
  "resolve-from": "^5.0.0",
79
79
  "resolve-global": "^1.0.0",
80
- "shiki": "^0.10.1",
81
- "unocss": "^0.45.1",
80
+ "shiki": "^0.11.1",
81
+ "unocss": "^0.45.6",
82
82
  "unplugin-icons": "^0.14.8",
83
- "unplugin-vue-components": "^0.21.2",
84
- "vite": "^3.0.4",
83
+ "unplugin-vue-components": "^0.22.4",
84
+ "vite": "^3.0.7",
85
85
  "vite-plugin-remote-assets": "^0.3.0",
86
- "vite-plugin-vue-markdown": "^0.20.1",
86
+ "vite-plugin-vue-markdown": "~0.20.1",
87
87
  "vite-plugin-vue-server-ref": "^0.3.0",
88
88
  "vite-plugin-windicss": "^1.8.7",
89
89
  "vue": "^3.2.37",