@slidev/cli 52.13.0 → 52.14.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.
@@ -1,5 +1,5 @@
1
1
  import "./resolver-B4CxEjJF.mjs";
2
- import { t as resolveViteConfigs } from "./shared-CPfgmHz0.mjs";
2
+ import { t as resolveViteConfigs } from "./shared-CjLi-sXO.mjs";
3
3
  import { join, resolve } from "node:path";
4
4
  import { build as build$1 } from "vite";
5
5
  import { existsSync } from "node:fs";
package/dist/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as resolveEntry, n as getRoots, r as isInstalledGlobally } from "./resolver-B4CxEjJF.mjs";
2
- import { a as parser, c as resolveAddons, d as updateFrontmatterPatch, i as resolveOptions, l as version, o as getThemeMeta, s as resolveTheme, u as loadSetups } from "./shared-CPfgmHz0.mjs";
3
- import { t as createServer } from "./serve-BhkY5tXJ.mjs";
2
+ import { a as parser, c as resolveAddons, d as updateFrontmatterPatch, i as resolveOptions, l as version, o as getThemeMeta, s as resolveTheme, u as loadSetups } from "./shared-CjLi-sXO.mjs";
3
+ import { t as createServer } from "./serve-BFKmdoYb.mjs";
4
4
  import path from "node:path";
5
5
  import process from "node:process";
6
6
  import fs from "node:fs/promises";
@@ -288,7 +288,7 @@ cli.command("build [entry..]", "Build hostable SPA", (args) => exportOptions(com
288
288
  describe: "enable the inspect plugin for debugging"
289
289
  }).strict().help(), async (args) => {
290
290
  const { entry, theme, base, download, out, inspect, "without-notes": withoutNotes } = args;
291
- const { build } = await import("./build-ul0zdJ3D.mjs");
291
+ const { build } = await import("./build-XXSytKPK.mjs");
292
292
  for (const entryFile of entry) {
293
293
  const options = await resolveOptions({
294
294
  entry: entryFile,
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./resolver-B4CxEjJF.mjs";
2
- import { a as parser, i as resolveOptions, n as ViteSlidevPlugin, r as createDataUtils } from "./shared-CPfgmHz0.mjs";
3
- import { t as createServer } from "./serve-BhkY5tXJ.mjs";
2
+ import { a as parser, i as resolveOptions, n as ViteSlidevPlugin, r as createDataUtils } from "./shared-CjLi-sXO.mjs";
3
+ import { t as createServer } from "./serve-BFKmdoYb.mjs";
4
4
 
5
5
  export { ViteSlidevPlugin, createDataUtils, createServer, parser, resolveOptions };
@@ -1,4 +1,4 @@
1
- import { t as resolveViteConfigs } from "./shared-CPfgmHz0.mjs";
1
+ import { t as resolveViteConfigs } from "./shared-CjLi-sXO.mjs";
2
2
  import { join } from "node:path";
3
3
  import process from "node:process";
4
4
  import { createServer } from "vite";
@@ -22,14 +22,14 @@ import { createDebug } from "obug";
22
22
  import pm from "picomatch";
23
23
  import { satisfies } from "semver";
24
24
  import { createHead, extractUnheadInputFromHtml, transformHtmlTemplate } from "unhead/server";
25
- import { createSingletonShorthands, createdBundledHighlighter } from "shiki/core";
25
+ import { createBundledHighlighter, createSingletonShorthands } from "shiki/core";
26
26
  import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
27
27
  import { bundledLanguages, bundledThemes } from "shiki";
28
28
  import katex from "katex";
29
29
  import MagicString from "magic-string-stack";
30
30
  import Markdown from "unplugin-vue-markdown/vite";
31
+ import MarkdownItComark from "@comark/markdown-it";
31
32
  import MarkdownItFootnote from "markdown-it-footnote";
32
- import MarkdownItMdc from "markdown-it-mdc";
33
33
  import { fromAsyncCodeToHtml } from "@shikijs/markdown-it/async";
34
34
  import { SourceMapConsumer } from "source-map-js";
35
35
  import lz from "lz-string";
@@ -503,7 +503,7 @@ function createLayoutWrapperPlugin({ data, utils }) {
503
503
 
504
504
  //#endregion
505
505
  //#region package.json
506
- var version = "52.13.0";
506
+ var version = "52.14.1";
507
507
 
508
508
  //#endregion
509
509
  //#region node/integrations/addons.ts
@@ -785,7 +785,7 @@ async function setupShiki(roots) {
785
785
  console.warn("[slidev] `loadTheme` in `setup/shiki.ts` is deprecated. Pass directly the theme name it's supported by Shiki. For custom themes, load it manually via `JSON.parse(fs.readFileSync(path, 'utf-8'))` and pass the raw JSON object instead.");
786
786
  return JSON.parse(await fs$1.readFile(path$1, "utf-8"));
787
787
  } }]));
788
- const createHighlighter = createdBundledHighlighter({
788
+ const createHighlighter = createBundledHighlighter({
789
789
  engine: createJavaScriptRegexEngine,
790
790
  langs: languageInput,
791
791
  themes: themeInput
@@ -1186,7 +1186,11 @@ const templateMonacoRunDeps = {
1186
1186
  id: "/@slidev/monaco-run-deps",
1187
1187
  async getContent({ userRoot, data }) {
1188
1188
  if (!data.features.monaco) return "";
1189
- const deps = uniq(data.features.monaco.deps.concat(data.config.monacoTypesAdditionalPackages));
1189
+ const deps = uniq([
1190
+ ...data.features.monaco.deps,
1191
+ ...data.config.monacoTypesAdditionalPackages || [],
1192
+ ...data.config.monacoRunAdditionalDeps || []
1193
+ ]);
1190
1194
  const importerPath = resolve(userRoot, "./snippets/__importer__.ts");
1191
1195
  let result = "";
1192
1196
  for (let i = 0; i < deps.length; i++) {
@@ -1272,6 +1276,7 @@ const setupModules = [
1272
1276
  "code-runners",
1273
1277
  "monaco",
1274
1278
  "mermaid",
1279
+ "mermaid-renderer",
1275
1280
  "main",
1276
1281
  "root",
1277
1282
  "routes",
@@ -1642,7 +1647,7 @@ function createSlidesLoader(options, serverOptions) {
1642
1647
  }
1643
1648
 
1644
1649
  //#endregion
1645
- //#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_d6f3113a192503d8f8553bee4b7feffb/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
1650
+ //#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_0dce998d26f79c06311f476731d22630/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
1646
1651
  var SpecialCharacters;
1647
1652
  (function(SpecialCharacters$1) {
1648
1653
  SpecialCharacters$1[SpecialCharacters$1["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
@@ -1659,7 +1664,7 @@ var SpecialCharacters;
1659
1664
  })(SpecialCharacters || (SpecialCharacters = {}));
1660
1665
 
1661
1666
  //#endregion
1662
- //#region ../../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs
1667
+ //#region ../../node_modules/.pnpm/markdown-it@14.1.1/node_modules/markdown-it/lib/token.mjs
1663
1668
  /**
1664
1669
  * class Token
1665
1670
  **/
@@ -1815,7 +1820,7 @@ Token.prototype.attrJoin = function attrJoin(name, value) {
1815
1820
  var token_default = Token;
1816
1821
 
1817
1822
  //#endregion
1818
- //#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_d6f3113a192503d8f8553bee4b7feffb/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/task-lists/index.js
1823
+ //#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_0dce998d26f79c06311f476731d22630/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/task-lists/index.js
1819
1824
  const checkboxRegex = /^ *\[([\sx])] /i;
1820
1825
  function taskLists(md, options = {
1821
1826
  enabled: false,
@@ -2023,7 +2028,7 @@ async function useMarkdownItPlugins(md, options, markdownTransformMap) {
2023
2028
  });
2024
2029
  if (features.katex) md.use(MarkdownItKatex, katexOptions);
2025
2030
  md.use(MarkdownItVDrag, markdownTransformMap);
2026
- if (config.mdc) md.use(MarkdownItMdc);
2031
+ if (config.comark || config.mdc) md.use(MarkdownItComark);
2027
2032
  }
2028
2033
 
2029
2034
  //#endregion
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
3
  "type": "module",
4
- "version": "52.13.0",
4
+ "version": "52.14.1",
5
5
  "description": "Presentation slides for developers",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -45,17 +45,18 @@
45
45
  "dependencies": {
46
46
  "@antfu/ni": "^28.2.0",
47
47
  "@antfu/utils": "^9.3.0",
48
- "@iconify-json/carbon": "^1.2.18",
48
+ "@comark/markdown-it": "^0.3.0",
49
+ "@iconify-json/carbon": "^1.2.19",
49
50
  "@iconify-json/ph": "^1.2.2",
50
51
  "@iconify-json/svg-spinners": "^1.2.4",
51
52
  "@lillallol/outline-pdf": "^4.0.0",
52
- "@shikijs/markdown-it": "^3.21.0",
53
- "@shikijs/twoslash": "^3.21.0",
54
- "@shikijs/vitepress-twoslash": "^3.21.0",
55
- "@unocss/extractor-mdc": "^66.6.0",
56
- "@unocss/reset": "^66.6.0",
57
- "@vitejs/plugin-vue": "^6.0.3",
58
- "@vitejs/plugin-vue-jsx": "^5.1.3",
53
+ "@shikijs/markdown-it": "^4.0.1",
54
+ "@shikijs/twoslash": "^4.0.1",
55
+ "@shikijs/vitepress-twoslash": "^4.0.1",
56
+ "@unocss/extractor-mdc": "^66.6.3",
57
+ "@unocss/reset": "^66.6.3",
58
+ "@vitejs/plugin-vue": "^6.0.4",
59
+ "@vitejs/plugin-vue-jsx": "^5.1.4",
59
60
  "ansis": "^4.2.0",
60
61
  "chokidar": "^5.0.0",
61
62
  "cli-progress": "^3.12.0",
@@ -63,18 +64,17 @@
63
64
  "fast-deep-equal": "^3.1.3",
64
65
  "fast-glob": "^3.3.3",
65
66
  "get-port-please": "^3.2.0",
66
- "global-directory": "^4.0.1",
67
+ "global-directory": "^5.0.0",
67
68
  "htmlparser2": "^10.1.0",
68
69
  "is-installed-globally": "^1.0.0",
69
70
  "jiti": "^2.6.1",
70
- "katex": "^0.16.28",
71
+ "katex": "^0.16.33",
71
72
  "local-pkg": "^1.1.2",
72
73
  "lz-string": "^1.5.0",
73
74
  "magic-string": "^0.30.21",
74
75
  "magic-string-stack": "^1.1.0",
75
76
  "markdown-exit": "^1.0.0-beta.8",
76
77
  "markdown-it-footnote": "^4.0.0",
77
- "markdown-it-mdc": "^0.2.8",
78
78
  "mlly": "^1.8.0",
79
79
  "monaco-editor": "^0.55.1",
80
80
  "obug": "^2.1.1",
@@ -88,14 +88,14 @@
88
88
  "public-ip": "^8.0.0",
89
89
  "resolve-from": "^5.0.0",
90
90
  "resolve-global": "^2.0.0",
91
- "semver": "^7.7.3",
92
- "shiki": "^3.21.0",
91
+ "semver": "^7.7.4",
92
+ "shiki": "^4.0.1",
93
93
  "shiki-magic-move": "^1.2.1",
94
94
  "sirv": "^3.0.2",
95
95
  "source-map-js": "^1.2.1",
96
96
  "typescript": "^5.9.3",
97
- "unhead": "^2.1.2",
98
- "unocss": "^66.6.0",
97
+ "unhead": "^2.1.10",
98
+ "unocss": "^66.6.2",
99
99
  "unplugin-icons": "^23.0.1",
100
100
  "unplugin-vue-components": "^31.0.0",
101
101
  "unplugin-vue-markdown": "^30.0.0",
@@ -106,13 +106,13 @@
106
106
  "vite-plugin-remote-assets": "^2.1.0",
107
107
  "vite-plugin-static-copy": "^3.2.0",
108
108
  "vite-plugin-vue-server-ref": "^1.0.0",
109
- "vitefu": "^1.1.1",
110
- "vue": "^3.5.27",
109
+ "vitefu": "^1.1.2",
110
+ "vue": "^3.5.29",
111
111
  "yaml": "^2.8.2",
112
112
  "yargs": "^18.0.0",
113
- "@slidev/client": "52.13.0",
114
- "@slidev/types": "52.13.0",
115
- "@slidev/parser": "52.13.0"
113
+ "@slidev/parser": "52.14.1",
114
+ "@slidev/types": "52.14.1",
115
+ "@slidev/client": "52.14.1"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@hedgedoc/markdown-it-plugins": "^2.1.4",
@@ -76,7 +76,7 @@ Presenter notes go here
76
76
  | Click-based highlighting | `` ```ts {1\|2-3\|all} `` | [code-line-highlighting](references/code-line-highlighting.md) |
77
77
  | Line numbers | `lineNumbers: true` or `{lines:true}` | [code-line-numbers](references/code-line-numbers.md) |
78
78
  | Scrollable code | `{maxHeight:'100px'}` | [code-max-height](references/code-max-height.md) |
79
- | Code tabs | `::code-group` (requires `mdc: true`) | [code-groups](references/code-groups.md) |
79
+ | Code tabs | `::code-group` (requires `comark: true`) | [code-groups](references/code-groups.md) |
80
80
  | Monaco editor | `` ```ts {monaco} `` | [editor-monaco](references/editor-monaco.md) |
81
81
  | Run code | `` ```ts {monaco-run} `` | [editor-monaco-run](references/editor-monaco-run.md) |
82
82
  | Edit files | `<<< ./file.ts {monaco-write}` | [editor-monaco-write](references/editor-monaco-write.md) |
@@ -119,7 +119,7 @@ Presenter notes go here
119
119
 
120
120
  | Feature | Usage | Reference |
121
121
  |---------|-------|-----------|
122
- | MDC syntax | `mdc: true` + `{style="color:red"}` | [syntax-mdc](references/syntax-mdc.md) |
122
+ | Comark syntax | `comark: true` + `{style="color:red"}` | [syntax-comark](references/syntax-comark.md) |
123
123
  | Block frontmatter | `` ```yaml `` instead of `---` | [syntax-block-frontmatter](references/syntax-block-frontmatter.md) |
124
124
  | Import slides | `src: ./other.md` | [syntax-importing-slides](references/syntax-importing-slides.md) |
125
125
  | Merge frontmatter | Main entry wins | [syntax-frontmatter-merging](references/syntax-frontmatter-merging.md) |
@@ -9,11 +9,11 @@ Group multiple code blocks with tabs and automatic icons.
9
9
 
10
10
  ## Requirements
11
11
 
12
- Enable MDC syntax in headmatter:
12
+ Enable Comark syntax in headmatter:
13
13
 
14
14
  ```md
15
15
  ---
16
- mdc: true
16
+ comark: true
17
17
  ---
18
18
  ```
19
19
 
@@ -117,9 +117,9 @@ Alice -> Bob : Hello
117
117
  ```
118
118
  ````
119
119
 
120
- ## MDC Syntax
120
+ ## Comark Syntax
121
121
 
122
- Enable with `mdc: true`:
122
+ Enable with `comark: true`:
123
123
 
124
124
  ```md
125
125
  [styled text]{style="color:red"}
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: mdc
3
- description: MDC (Markdown Components) syntax support
2
+ name: comark
3
+ description: Comark Syntax support
4
4
  ---
5
5
 
6
- # MDC Syntax
6
+ # Comark Syntax
7
7
 
8
8
  Enhanced Markdown with component and style syntax.
9
9
 
@@ -11,7 +11,7 @@ Enhanced Markdown with component and style syntax.
11
11
 
12
12
  ```md
13
13
  ---
14
- mdc: true
14
+ comark: true
15
15
  ---
16
16
  ```
17
17
 
@@ -48,4 +48,4 @@ The **default** slot content
48
48
  - Add attributes to images
49
49
  - Create complex component layouts
50
50
 
51
- Based on Nuxt's MDC (Markdown Components) syntax.
51
+ Based on Comark Syntax.
package/template.md CHANGED
@@ -14,7 +14,7 @@ info: |
14
14
  Learn more at [Sli.dev](https://sli.dev)
15
15
  transition: slide-left
16
16
  title: Welcome to Slidev
17
- mdc: true
17
+ comark: true
18
18
  ---
19
19
 
20
20
  # Welcome to Slidev