@slidev/cli 0.49.28 → 0.50.0-beta.1

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.
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-ISUC27RM.js";
3
+ } from "./chunk-6GC5ATZB.js";
4
4
  import {
5
5
  getThemeMeta,
6
6
  loadSetups,
@@ -9,28 +9,27 @@ import {
9
9
  resolveOptions,
10
10
  resolveTheme,
11
11
  version
12
- } from "./chunk-AQBXAU6S.js";
12
+ } from "./chunk-6O4GDZ4B.js";
13
13
  import "./chunk-6DS3IPOB.js";
14
14
  import {
15
15
  getRoots,
16
16
  isInstalledGlobally,
17
17
  resolveEntry
18
- } from "./chunk-HOVIRHCR.js";
19
- import "./chunk-JSBRDJBE.js";
18
+ } from "./chunk-UNQ5DBLZ.js";
20
19
 
21
20
  // node/cli.ts
22
- import path from "node:path";
23
- import os from "node:os";
24
21
  import { exec } from "node:child_process";
25
- import * as readline from "node:readline";
22
+ import os from "node:os";
23
+ import path from "node:path";
26
24
  import process from "node:process";
25
+ import * as readline from "node:readline";
26
+ import { verifyConfig } from "@slidev/parser";
27
+ import equal from "fast-deep-equal";
27
28
  import fs from "fs-extra";
29
+ import { getPort } from "get-port-please";
30
+ import { blue, bold, cyan, dim, gray, green, underline, yellow } from "kolorist";
28
31
  import openBrowser from "open";
29
32
  import yargs from "yargs";
30
- import { blue, bold, cyan, dim, gray, green, underline, yellow } from "kolorist";
31
- import equal from "fast-deep-equal";
32
- import { verifyConfig } from "@slidev/parser";
33
- import { getPort } from "get-port-please";
34
33
 
35
34
  // node/setups/preparser.ts
36
35
  import { uniq } from "@antfu/utils";
@@ -61,7 +60,7 @@ var CONFIG_RESTART_FIELDS = [
61
60
  "editor",
62
61
  "theme"
63
62
  ];
64
- var FILES_CREATE_RESTART_GLOBS = [
63
+ var FILES_CREATE_RESTART = [
65
64
  "global-bottom.vue",
66
65
  "global-top.vue",
67
66
  "uno.config.js",
@@ -69,7 +68,7 @@ var FILES_CREATE_RESTART_GLOBS = [
69
68
  "unocss.config.js",
70
69
  "unocss.config.ts"
71
70
  ];
72
- var FILES_CHANGE_RESTART_GLOBS = [
71
+ var FILES_CHANGE_RESTART = [
73
72
  "setup/shiki.ts",
74
73
  "setup/katex.ts",
75
74
  "setup/preparser.ts"
@@ -285,8 +284,8 @@ ${dim(" Public IP: ")} ${blue(publicIp)}
285
284
  bindShortcut();
286
285
  const { watch } = await import("chokidar");
287
286
  const watcher = watch([
288
- ...FILES_CREATE_RESTART_GLOBS,
289
- ...FILES_CHANGE_RESTART_GLOBS
287
+ ...FILES_CREATE_RESTART,
288
+ ...FILES_CHANGE_RESTART
290
289
  ], {
291
290
  ignored: ["node_modules", ".git"],
292
291
  ignoreInitial: true
@@ -304,7 +303,7 @@ ${dim(" Public IP: ")} ${blue(publicIp)}
304
303
  restartServer();
305
304
  });
306
305
  watcher.on("change", (file) => {
307
- if (FILES_CREATE_RESTART_GLOBS.includes(file))
306
+ if (FILES_CREATE_RESTART.includes(file))
308
307
  return;
309
308
  console.log(yellow(`
310
309
  file ${file} changed, restarting...
@@ -335,7 +334,7 @@ cli.command(
335
334
  }).strict().help(),
336
335
  async (args) => {
337
336
  const { entry, theme, base, download, out, inspect } = args;
338
- const { build } = await import("./build-DOIJJUU3.js");
337
+ const { build } = await import("./build-FMVKC2PV.js");
339
338
  for (const entryFile of entry) {
340
339
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
341
340
  if (download && !options.data.config.download)
@@ -415,7 +414,7 @@ cli.command(
415
414
  (args) => exportOptions(commonOptions(args)).strict().help(),
416
415
  async (args) => {
417
416
  const { entry, theme } = args;
418
- const { exportSlides, getExportOptions } = await import("./export-MUFMK7ZR.js");
417
+ const { exportSlides, getExportOptions } = await import("./export-WMRLKOJP.js");
419
418
  const port = await getPort(12445);
420
419
  for (const entryFile of entry) {
421
420
  const options = await resolveOptions({ entry: entryFile, theme }, "export");
@@ -464,7 +463,7 @@ cli.command(
464
463
  timeout,
465
464
  wait
466
465
  }) => {
467
- const { exportNotes } = await import("./export-MUFMK7ZR.js");
466
+ const { exportNotes } = await import("./export-WMRLKOJP.js");
468
467
  const port = await getPort(12445);
469
468
  for (const entryFile of entry) {
470
469
  const options = await resolveOptions({ entry: entryFile }, "export");
@@ -1,21 +1,20 @@
1
1
  import {
2
2
  getRoots
3
- } from "./chunk-HOVIRHCR.js";
4
- import "./chunk-JSBRDJBE.js";
3
+ } from "./chunk-UNQ5DBLZ.js";
5
4
 
6
5
  // node/commands/export.ts
7
- import path from "node:path";
8
6
  import { Buffer } from "node:buffer";
7
+ import path from "node:path";
9
8
  import process from "node:process";
10
- import fs from "fs-extra";
11
- import { blue, cyan, dim, green, yellow } from "kolorist";
12
- import { Presets, SingleBar } from "cli-progress";
13
9
  import { clearUndefined, slash } from "@antfu/utils";
14
- import { parseRangeString } from "@slidev/parser/core";
15
10
  import { outlinePdfFactory } from "@lillallol/outline-pdf";
11
+ import { parseRangeString } from "@slidev/parser/core";
12
+ import { Presets, SingleBar } from "cli-progress";
13
+ import fs from "fs-extra";
14
+ import { blue, cyan, dim, green, yellow } from "kolorist";
15
+ import { resolve } from "mlly";
16
16
  import * as pdfLib from "pdf-lib";
17
17
  import { PDFDocument } from "pdf-lib";
18
- import { resolve } from "mlly";
19
18
  function addToTree(tree, info, slideIndexes, level = 1) {
20
19
  const titleLevel = info.level;
21
20
  if (titleLevel && titleLevel > level && tree.length > 0 && tree[tree.length - 1].titleLevel < titleLevel) {
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { ResolvedSlidevOptions, SlidevPluginOptions, SlidevServerOptions, SlidevEntryOptions, ResolvedSlidevUtils } from '@slidev/types';
2
1
  import * as vite from 'vite';
3
- import { PluginOption, InlineConfig } from 'vite';
2
+ import { InlineConfig, PluginOption } from 'vite';
3
+ import { ResolvedSlidevOptions, SlidevServerOptions, SlidevEntryOptions, ResolvedSlidevUtils, SlidevPluginOptions } from '@slidev/types';
4
4
  import * as fs from '@slidev/parser/fs';
5
5
  export { fs as parser };
6
6
 
7
- declare function ViteSlidevPlugin(options: ResolvedSlidevOptions, pluginOptions?: SlidevPluginOptions, serverOptions?: SlidevServerOptions): Promise<PluginOption[]>;
8
-
9
7
  declare function createServer(options: ResolvedSlidevOptions, viteConfig?: InlineConfig, serverOptions?: SlidevServerOptions): Promise<vite.ViteDevServer>;
10
8
 
11
9
  declare function resolveOptions(entryOptions: SlidevEntryOptions, mode: ResolvedSlidevOptions['mode']): Promise<ResolvedSlidevOptions>;
12
10
  declare function createDataUtils(resolved: Omit<ResolvedSlidevOptions, 'utils'>): Promise<ResolvedSlidevUtils>;
13
11
 
12
+ declare function ViteSlidevPlugin(options: ResolvedSlidevOptions, pluginOptions?: SlidevPluginOptions, serverOptions?: SlidevServerOptions): Promise<PluginOption[]>;
13
+
14
14
  export { ViteSlidevPlugin, createDataUtils, createServer, resolveOptions };
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-ISUC27RM.js";
3
+ } from "./chunk-6GC5ATZB.js";
4
4
  import {
5
5
  ViteSlidevPlugin,
6
6
  createDataUtils,
7
7
  parser,
8
8
  resolveOptions
9
- } from "./chunk-AQBXAU6S.js";
9
+ } from "./chunk-6O4GDZ4B.js";
10
10
  import "./chunk-6DS3IPOB.js";
11
- import "./chunk-HOVIRHCR.js";
12
- import "./chunk-JSBRDJBE.js";
11
+ import "./chunk-UNQ5DBLZ.js";
13
12
  export {
14
13
  ViteSlidevPlugin,
15
14
  createDataUtils,
@@ -1,13 +1,12 @@
1
1
  import {
2
2
  escapeVueInCode
3
3
  } from "./chunk-6DS3IPOB.js";
4
- import "./chunk-JSBRDJBE.js";
5
4
 
6
5
  // node/syntax/markdown-it/markdown-it-prism.ts
7
6
  import { createRequire } from "node:module";
7
+ import * as htmlparser2 from "htmlparser2";
8
8
  import Prism from "prismjs";
9
9
  import loadLanguages from "prismjs/components/index.js";
10
- import * as htmlparser2 from "htmlparser2";
11
10
  var require2 = createRequire(import.meta.url);
12
11
  var Tag = class {
13
12
  tagname;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
3
  "type": "module",
4
- "version": "0.49.28",
4
+ "version": "0.50.0-beta.1",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "antfu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -42,23 +42,23 @@
42
42
  }
43
43
  },
44
44
  "dependencies": {
45
- "@antfu/ni": "^0.22.4",
45
+ "@antfu/ni": "^0.23.0",
46
46
  "@antfu/utils": "^0.7.10",
47
- "@iconify-json/carbon": "^1.1.37",
48
- "@iconify-json/ph": "^1.1.14",
49
- "@iconify-json/svg-spinners": "^1.1.3",
47
+ "@iconify-json/carbon": "^1.2.1",
48
+ "@iconify-json/ph": "^1.2.0",
49
+ "@iconify-json/svg-spinners": "^1.2.0",
50
50
  "@lillallol/outline-pdf": "^4.0.0",
51
- "@shikijs/markdown-it": "^1.13.0",
52
- "@shikijs/twoslash": "^1.13.0",
53
- "@shikijs/vitepress-twoslash": "^1.13.0",
54
- "@unocss/extractor-mdc": "^0.62.2",
55
- "@unocss/reset": "^0.62.2",
56
- "@vitejs/plugin-vue": "^5.1.2",
51
+ "@shikijs/markdown-it": "^1.20.0",
52
+ "@shikijs/twoslash": "^1.20.0",
53
+ "@shikijs/vitepress-twoslash": "^1.20.0",
54
+ "@unocss/extractor-mdc": "^0.62.4",
55
+ "@unocss/reset": "^0.62.4",
56
+ "@vitejs/plugin-vue": "^5.1.4",
57
57
  "@vitejs/plugin-vue-jsx": "^4.0.1",
58
- "chokidar": "^3.6.0",
58
+ "chokidar": "^4.0.1",
59
59
  "cli-progress": "^3.12.0",
60
60
  "connect": "^3.7.0",
61
- "debug": "^4.3.6",
61
+ "debug": "^4.3.7",
62
62
  "fast-deep-equal": "^3.1.3",
63
63
  "fast-glob": "^3.3.2",
64
64
  "fs-extra": "^11.2.0",
@@ -66,7 +66,7 @@
66
66
  "global-directory": "^4.0.1",
67
67
  "htmlparser2": "^9.1.0",
68
68
  "is-installed-globally": "^1.0.0",
69
- "jiti": "^1.21.6",
69
+ "jiti": "^2.0.0",
70
70
  "katex": "^0.16.11",
71
71
  "kolorist": "^1.8.0",
72
72
  "local-pkg": "^0.5.0",
@@ -76,9 +76,9 @@
76
76
  "markdown-it": "^14.1.0",
77
77
  "markdown-it-footnote": "^4.0.0",
78
78
  "markdown-it-mdc": "^0.2.5",
79
- "micromatch": "^4.0.7",
79
+ "micromatch": "^4.0.8",
80
80
  "mlly": "^1.7.1",
81
- "monaco-editor": "^0.50.0",
81
+ "monaco-editor": "^0.52.0",
82
82
  "open": "^10.1.0",
83
83
  "pdf-lib": "^1.17.1",
84
84
  "plantuml-encoder": "^1.4.0",
@@ -90,28 +90,29 @@
90
90
  "resolve-from": "^5.0.0",
91
91
  "resolve-global": "^2.0.0",
92
92
  "semver": "^7.6.3",
93
- "shiki": "^1.13.0",
94
- "shiki-magic-move": "^0.4.3",
93
+ "shiki": "^1.20.0",
94
+ "shiki-magic-move": "^0.4.4",
95
95
  "sirv": "^2.0.4",
96
- "source-map-js": "^1.2.0",
97
- "typescript": "^5.5.4",
98
- "unocss": "^0.62.2",
99
- "unplugin-icons": "^0.19.2",
96
+ "source-map-js": "^1.2.1",
97
+ "typescript": "^5.6.2",
98
+ "unocss": "^0.62.4",
99
+ "unplugin-icons": "^0.19.3",
100
100
  "unplugin-vue-components": "^0.27.4",
101
101
  "unplugin-vue-markdown": "^0.26.2",
102
102
  "untun": "^0.1.3",
103
103
  "uqr": "^0.1.2",
104
- "vite": "^5.4.1",
105
- "vite-plugin-inspect": "^0.8.5",
104
+ "vite": "^5.4.8",
105
+ "vite-plugin-inspect": "^0.8.7",
106
106
  "vite-plugin-remote-assets": "^0.5.0",
107
107
  "vite-plugin-static-copy": "^1.0.6",
108
108
  "vite-plugin-vue-server-ref": "^0.4.2",
109
- "vitefu": "^0.2.5",
110
- "vue": "^3.4.38",
109
+ "vitefu": "^1.0.2",
110
+ "vue": "^3.5.9",
111
+ "yaml": "^2.5.1",
111
112
  "yargs": "^17.7.2",
112
- "@slidev/client": "0.49.28",
113
- "@slidev/types": "0.49.28",
114
- "@slidev/parser": "0.49.28"
113
+ "@slidev/client": "0.50.0-beta.1",
114
+ "@slidev/parser": "0.50.0-beta.1",
115
+ "@slidev/types": "0.50.0-beta.1"
115
116
  },
116
117
  "devDependencies": {
117
118
  "@hedgedoc/markdown-it-plugins": "^2.1.4",