@slidev/cli 0.49.8 → 0.49.9

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-EUB2QNHL.mjs";
5
+ } from "./chunk-ZATTXN6U.mjs";
6
6
  import "./chunk-LOUKLO2C.mjs";
7
7
  import "./chunk-RG2EEPCO.mjs";
8
8
  import "./chunk-BXO7ZPPU.mjs";
@@ -63,7 +63,7 @@ async function build(options, viteConfig = {}, args) {
63
63
  await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
64
64
  `, "utf-8");
65
65
  if ([true, "true", "auto"].includes(options.data.config.download)) {
66
- const { exportSlides, getExportOptions } = await import("./export-Q4LURPEZ.mjs");
66
+ const { exportSlides, getExportOptions } = await import("./export-BSOHDR2A.mjs");
67
67
  const port = 12445;
68
68
  const app = connect();
69
69
  const server = http.createServer(app);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ViteSlidevPlugin,
3
3
  mergeViteConfigs
4
- } from "./chunk-EUB2QNHL.mjs";
4
+ } from "./chunk-ZATTXN6U.mjs";
5
5
 
6
6
  // node/commands/server.ts
7
7
  import { join } from "node:path";
@@ -7146,7 +7146,7 @@ var require_dist = __commonJS({
7146
7146
  });
7147
7147
 
7148
7148
  // package.json
7149
- var version = "0.49.8";
7149
+ var version = "0.49.9";
7150
7150
 
7151
7151
  // node/commands/shared.ts
7152
7152
  import { existsSync, promises as fs } from "node:fs";
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-SLLEPQD4.mjs";
3
+ } from "./chunk-DRWYFCYG.mjs";
4
4
  import {
5
5
  getThemeMeta,
6
6
  parser,
@@ -8,7 +8,7 @@ import {
8
8
  resolveOptions,
9
9
  resolveTheme,
10
10
  version
11
- } from "./chunk-EUB2QNHL.mjs";
11
+ } from "./chunk-ZATTXN6U.mjs";
12
12
  import {
13
13
  loadSetups
14
14
  } from "./chunk-LOUKLO2C.mjs";
@@ -328,7 +328,7 @@ cli.command(
328
328
  }).strict().help(),
329
329
  async (args) => {
330
330
  const { entry, theme, base, download, out, inspect } = args;
331
- const { build } = await import("./build-NM25LHOY.mjs");
331
+ const { build } = await import("./build-HVOMXVYS.mjs");
332
332
  for (const entryFile of entry) {
333
333
  const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
334
334
  if (download && !options.data.config.download)
@@ -408,7 +408,7 @@ cli.command(
408
408
  (args) => exportOptions(commonOptions(args)).strict().help(),
409
409
  async (args) => {
410
410
  const { entry, theme } = args;
411
- const { exportSlides, getExportOptions } = await import("./export-Q4LURPEZ.mjs");
411
+ const { exportSlides, getExportOptions } = await import("./export-BSOHDR2A.mjs");
412
412
  const port = await getPort(12445);
413
413
  for (const entryFile of entry) {
414
414
  const options = await resolveOptions({ entry: entryFile, theme }, "export");
@@ -457,7 +457,7 @@ cli.command(
457
457
  timeout,
458
458
  wait
459
459
  }) => {
460
- const { exportNotes } = await import("./export-Q4LURPEZ.mjs");
460
+ const { exportNotes } = await import("./export-BSOHDR2A.mjs");
461
461
  const port = await getPort(12445);
462
462
  for (const entryFile of entry) {
463
463
  const options = await resolveOptions({ entry: entryFile }, "export");
@@ -18,13 +18,14 @@ import { PDFDocument } from "pdf-lib";
18
18
  import { resolve } from "mlly";
19
19
  function addToTree(tree, info, slideIndexes, level = 1) {
20
20
  const titleLevel = info.level;
21
- if (titleLevel && titleLevel > level && tree.length > 0) {
21
+ if (titleLevel && titleLevel > level && tree.length > 0 && tree[tree.length - 1].titleLevel < titleLevel) {
22
22
  addToTree(tree[tree.length - 1].children, info, slideIndexes, level + 1);
23
23
  } else {
24
24
  tree.push({
25
25
  no: info.index,
26
26
  children: [],
27
27
  level,
28
+ titleLevel: titleLevel ?? level,
28
29
  path: String(slideIndexes[info.index + 1]),
29
30
  hideInToc: Boolean(info.frontmatter?.hideInToc),
30
31
  title: info.title
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-SLLEPQD4.mjs";
3
+ } from "./chunk-DRWYFCYG.mjs";
4
4
  import {
5
5
  ViteSlidevPlugin,
6
6
  createDataUtils,
7
7
  parser,
8
8
  resolveOptions
9
- } from "./chunk-EUB2QNHL.mjs";
9
+ } from "./chunk-ZATTXN6U.mjs";
10
10
  import "./chunk-LOUKLO2C.mjs";
11
11
  import "./chunk-RG2EEPCO.mjs";
12
12
  import "./chunk-BXO7ZPPU.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.49.8",
3
+ "version": "0.49.9",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -51,15 +51,15 @@
51
51
  "@shikijs/markdown-it": "^1.6.1",
52
52
  "@shikijs/twoslash": "^1.6.1",
53
53
  "@shikijs/vitepress-twoslash": "^1.6.1",
54
- "@unocss/extractor-mdc": "^0.60.3",
55
- "@unocss/reset": "^0.60.3",
56
- "@vitejs/plugin-vue": "^5.0.4",
54
+ "@unocss/extractor-mdc": "^0.60.4",
55
+ "@unocss/reset": "^0.60.4",
56
+ "@vitejs/plugin-vue": "^5.0.5",
57
57
  "@vitejs/plugin-vue-jsx": "^3.1.0",
58
58
  "chokidar": "^3.6.0",
59
59
  "cli-progress": "^3.12.0",
60
60
  "codemirror": "^5.65.16",
61
61
  "connect": "^3.7.0",
62
- "debug": "^4.3.4",
62
+ "debug": "^4.3.5",
63
63
  "fast-deep-equal": "^3.1.3",
64
64
  "fast-glob": "^3.3.2",
65
65
  "fs-extra": "^11.2.0",
@@ -76,7 +76,7 @@
76
76
  "magic-string-stack": "^0.1.1",
77
77
  "markdown-it": "^14.1.0",
78
78
  "markdown-it-footnote": "^4.0.0",
79
- "markdown-it-mdc": "^0.2.3",
79
+ "markdown-it-mdc": "^0.2.5",
80
80
  "micromatch": "^4.0.7",
81
81
  "mlly": "^1.7.0",
82
82
  "monaco-editor": "^0.49.0",
@@ -96,7 +96,7 @@
96
96
  "sirv": "^2.0.4",
97
97
  "source-map-js": "^1.2.0",
98
98
  "typescript": "^5.4.5",
99
- "unocss": "^0.60.3",
99
+ "unocss": "^0.60.4",
100
100
  "unplugin-icons": "^0.19.0",
101
101
  "unplugin-vue-components": "^0.27.0",
102
102
  "unplugin-vue-markdown": "^0.26.2",
@@ -110,9 +110,9 @@
110
110
  "vitefu": "^0.2.5",
111
111
  "vue": "^3.4.27",
112
112
  "yargs": "^17.7.2",
113
- "@slidev/client": "0.49.8",
114
- "@slidev/parser": "0.49.8",
115
- "@slidev/types": "0.49.8"
113
+ "@slidev/types": "0.49.9",
114
+ "@slidev/parser": "0.49.9",
115
+ "@slidev/client": "0.49.9"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@hedgedoc/markdown-it-plugins": "^2.1.4",