@slidev/cli 0.28.7 → 0.28.10

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.
@@ -10,13 +10,13 @@
10
10
 
11
11
 
12
12
 
13
- var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
13
+ var _chunk7QXPSYEZjs = require('./chunk-7QXPSYEZ.js');
14
14
 
15
15
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
16
- var require_fast_deep_equal = _chunkQT3EQ43Ajs.__commonJS.call(void 0, {
16
+ var require_fast_deep_equal = _chunk7QXPSYEZjs.__commonJS.call(void 0, {
17
17
  "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
18
18
  "use strict";
19
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
19
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
20
20
  module.exports = function equal2(a, b) {
21
21
  if (a === b)
22
22
  return true;
@@ -59,7 +59,7 @@ var require_fast_deep_equal = _chunkQT3EQ43Ajs.__commonJS.call(void 0, {
59
59
  });
60
60
 
61
61
  // node/common.ts
62
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
62
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
63
63
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
64
64
  var _path = require('path');
65
65
  var _utils = require('@antfu/utils');
@@ -87,13 +87,13 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
87
87
  body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
88
88
  if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
89
89
  head += `
90
- <link rel="stylesheet" href="${_chunkQT3EQ43Ajs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
91
- main = main.replace("__ENTRY__", _chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
90
+ <link rel="stylesheet" href="${_chunk7QXPSYEZjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
91
+ main = main.replace("__ENTRY__", _chunk7QXPSYEZjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
92
92
  return main;
93
93
  }
94
94
 
95
95
  // node/plugins/windicss.ts
96
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
96
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
97
97
 
98
98
 
99
99
 
@@ -101,13 +101,13 @@ var _vitepluginwindicss = require('vite-plugin-windicss'); var _vitepluginwindic
101
101
  var _jiti = require('jiti'); var _jiti2 = _interopRequireDefault(_jiti);
102
102
 
103
103
  // node/plugins/setupNode.ts
104
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
104
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
105
105
 
106
106
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
107
107
 
108
108
 
109
109
  function deepMerge(a, b, rootPath = "") {
110
- a = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, a);
110
+ a = _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, a);
111
111
  Object.keys(b).forEach((key) => {
112
112
  if (_utils.isObject.call(void 0, a[key]))
113
113
  a[key] = deepMerge(a[key], b[key], rootPath ? `${rootPath}.${key}` : key);
@@ -145,7 +145,7 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
145
145
  if (config.default)
146
146
  config = config.default;
147
147
  config = await loadSetups(roots, "windicss.ts", {}, config, true);
148
- return _vitepluginwindicss2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
148
+ return _vitepluginwindicss2.default.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
149
149
  configFiles: [configFile],
150
150
  config,
151
151
  onConfigResolved(config2) {
@@ -167,15 +167,15 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
167
167
  config2.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`);
168
168
  });
169
169
  config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
170
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
171
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "katex/package.json", true)));
172
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "prettier/package.json", true)));
170
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk7QXPSYEZjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
171
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk7QXPSYEZjs.resolveImportPath.call(void 0, "katex/package.json", true)));
172
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk7QXPSYEZjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
173
173
  }
174
174
  }, windiOptions));
175
175
  }
176
176
 
177
177
  // node/plugins/preset.ts
178
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
178
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
179
179
  var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
180
180
  var _vite = require('unplugin-icons/vite'); var _vite2 = _interopRequireDefault(_vite);
181
181
  var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
@@ -185,7 +185,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
185
185
 
186
186
 
187
187
  // node/drawings.ts
188
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
188
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
189
189
 
190
190
 
191
191
  var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
@@ -231,7 +231,7 @@ ${value}
231
231
  }
232
232
 
233
233
  // node/plugins/extendConfig.ts
234
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
234
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
235
235
 
236
236
  var _vite5 = require('vite');
237
237
  var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
@@ -242,29 +242,29 @@ var dependencies = {
242
242
  "@antfu/utils": "^0.5.0",
243
243
  "@slidev/parser": "workspace:*",
244
244
  "@slidev/types": "workspace:*",
245
- "@vueuse/core": "^7.6.0",
245
+ "@vueuse/core": "^7.7.0",
246
246
  "@vueuse/head": "^0.7.5",
247
247
  "@vueuse/motion": "^2.0.0-beta.9",
248
- codemirror: "^5.65.1",
249
- drauu: "^0.2.1",
248
+ codemirror: "^5.65.2",
249
+ drauu: "^0.3.0",
250
250
  "file-saver": "^2.0.5",
251
251
  "js-base64": "^3.7.2",
252
252
  "js-yaml": "^4.1.0",
253
253
  katex: "^0.15.2",
254
- mermaid: "8.13.0",
254
+ mermaid: "^8.14.0",
255
255
  "monaco-editor": "^0.32.1",
256
- nanoid: "^3.2.0",
256
+ nanoid: "^3.3.1",
257
257
  prettier: "^2.5.1",
258
258
  recordrtc: "^5.6.2",
259
259
  resolve: "^1.22.0",
260
- "vite-plugin-windicss": "^1.7.0",
261
- vue: "^3.2.30",
262
- "vue-router": "^4.0.12",
263
- windicss: "^3.4.3"
260
+ "vite-plugin-windicss": "^1.8.2",
261
+ vue: "^3.2.31",
262
+ "vue-router": "^4.0.13",
263
+ windicss: "^3.5.1"
264
264
  };
265
265
 
266
266
  // node/vite/searchRoot.ts
267
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
267
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
268
268
 
269
269
 
270
270
  var ROOT_FILES = [
@@ -324,7 +324,7 @@ function createConfigPlugin(options) {
324
324
  define: getDefine(options),
325
325
  resolve: {
326
326
  alias: {
327
- "@slidev/client/": `${_chunkQT3EQ43Ajs.toAtFS.call(void 0, options.clientRoot)}/`
327
+ "@slidev/client/": `${_chunk7QXPSYEZjs.toAtFS.call(void 0, options.clientRoot)}/`
328
328
  }
329
329
  },
330
330
  optimizeDeps: {
@@ -340,6 +340,7 @@ function createConfigPlugin(options) {
340
340
  "prettier/esm/parser-html",
341
341
  "prettier/esm/parser-typescript",
342
342
  "mermaid/dist/mermaid.min",
343
+ "mermaid/dist/mermaid",
343
344
  "vite-plugin-vue-server-ref/client"
344
345
  ],
345
346
  exclude: EXCLUDE
@@ -350,7 +351,7 @@ function createConfigPlugin(options) {
350
351
  allow: _utils.uniq.call(void 0, [
351
352
  searchForWorkspaceRoot(options.userRoot),
352
353
  searchForWorkspaceRoot(options.cliRoot),
353
- ..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
354
+ ..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunk7QXPSYEZjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunk7QXPSYEZjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
354
355
  ])
355
356
  }
356
357
  }
@@ -359,7 +360,7 @@ function createConfigPlugin(options) {
359
360
  injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
360
361
  injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
361
362
  injection.root = options.cliRoot;
362
- injection.resolve.alias.vue = `${_chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
363
+ injection.resolve.alias.vue = `${_chunk7QXPSYEZjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
363
364
  }
364
365
  return _vite5.mergeConfig.call(void 0, config, injection);
365
366
  },
@@ -380,7 +381,7 @@ function createConfigPlugin(options) {
380
381
  }
381
382
  function getDefine(options) {
382
383
  return {
383
- __SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkQT3EQ43Ajs.toAtFS.call(void 0, options.clientRoot)),
384
+ __SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunk7QXPSYEZjs.toAtFS.call(void 0, options.clientRoot)),
384
385
  __SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
385
386
  __SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
386
387
  __SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
@@ -389,8 +390,8 @@ function getDefine(options) {
389
390
  }
390
391
 
391
392
  // node/plugins/loaders.ts
392
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
393
- var import_fast_deep_equal = _chunkQT3EQ43Ajs.__toModule.call(void 0, require_fast_deep_equal());
393
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
394
+ var import_fast_deep_equal = _chunk7QXPSYEZjs.__toModule.call(void 0, require_fast_deep_equal());
394
395
 
395
396
 
396
397
 
@@ -422,7 +423,7 @@ md.use(_markdownitlinkattributes2.default, {
422
423
  }
423
424
  });
424
425
  function prepareSlideInfo(data) {
425
- return _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, data), {
426
+ return _chunk7QXPSYEZjs.__spreadProps.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, data), {
426
427
  notesHTML: md.render((data == null ? void 0 : data.note) || "")
427
428
  });
428
429
  }
@@ -511,7 +512,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
511
512
  const file = `${slidePrefix}${i + 1}.md`;
512
513
  try {
513
514
  const md2 = await transformMarkdown(MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
514
- return await VuePlugin.handleHotUpdate(_chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, ctx), {
515
+ return await VuePlugin.handleHotUpdate(_chunk7QXPSYEZjs.__spreadProps.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, ctx), {
515
516
  modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
516
517
  file,
517
518
  read() {
@@ -559,10 +560,17 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
559
560
  if (match) {
560
561
  const [, no, type] = match;
561
562
  const pageNo = parseInt(no) - 1;
562
- if (type === "md")
563
- return (_a = data.slides[pageNo]) == null ? void 0 : _a.content;
563
+ if (type === "md") {
564
+ return {
565
+ code: (_a = data.slides[pageNo]) == null ? void 0 : _a.content,
566
+ map: {}
567
+ };
568
+ }
564
569
  }
565
- return "";
570
+ return {
571
+ code: "",
572
+ map: {}
573
+ };
566
574
  }
567
575
  }
568
576
  },
@@ -593,13 +601,13 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
593
601
  async function transformMarkdown(code, pageNo, data2) {
594
602
  var _a, _b;
595
603
  const layouts = await getLayouts();
596
- const frontmatter = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
604
+ const frontmatter = _chunk7QXPSYEZjs.__spreadValues.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
597
605
  const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
598
606
  if (!layouts[layoutName])
599
607
  throw new Error(`Unknown layout "${layoutName}"`);
600
608
  delete frontmatter.title;
601
609
  const imports = [
602
- `import InjectedLayout from "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, layouts[layoutName])}"`,
610
+ `import InjectedLayout from "${_chunk7QXPSYEZjs.toAtFS.call(void 0, layouts[layoutName])}"`,
603
611
  `const frontmatter = ${JSON.stringify(frontmatter)}`
604
612
  ];
605
613
  code = code.replace(/(<script setup.*>)/g, `$1
@@ -645,9 +653,9 @@ ${code.slice(injectB)}`;
645
653
  }
646
654
  async function generateUserStyles() {
647
655
  const imports = [
648
- `import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
649
- `import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
650
- `import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
656
+ `import "${_chunk7QXPSYEZjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
657
+ `import "${_chunk7QXPSYEZjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
658
+ `import "${_chunk7QXPSYEZjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
651
659
  ];
652
660
  const roots2 = _utils.uniq.call(void 0, [
653
661
  ...themeRoots,
@@ -663,13 +671,13 @@ ${code.slice(injectB)}`;
663
671
  ];
664
672
  for (const style of styles) {
665
673
  if (_fsextra.existsSync.call(void 0, style)) {
666
- imports.push(`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, style)}"`);
674
+ imports.push(`import "${_chunk7QXPSYEZjs.toAtFS.call(void 0, style)}"`);
667
675
  continue;
668
676
  }
669
677
  }
670
678
  }
671
679
  if (data.features.katex)
672
- imports.push(`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
680
+ imports.push(`import "${_chunk7QXPSYEZjs.toAtFS.call(void 0, _chunk7QXPSYEZjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
673
681
  return imports.join("\n");
674
682
  }
675
683
  async function generateMonacoTypes() {
@@ -678,7 +686,7 @@ ${code.slice(injectB)}`;
678
686
  async function generateLayouts() {
679
687
  const imports = [];
680
688
  const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
681
- imports.push(`import __layout_${k} from "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, v)}"`);
689
+ imports.push(`import __layout_${k} from "${_chunk7QXPSYEZjs.toAtFS.call(void 0, v)}"`);
682
690
  return [k, `__layout_${k}`];
683
691
  });
684
692
  return [
@@ -726,10 +734,10 @@ ${routes.join(",\n")}
726
734
  return [...imports, routesStr].join("\n");
727
735
  }
728
736
  function generateConfigs() {
729
- const config = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, data.config);
737
+ const config = _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, data.config);
730
738
  if (_utils.isString.call(void 0, config.title)) {
731
739
  const tokens = md.parseInline(config.title, {});
732
- config.title = _chunkQT3EQ43Ajs.stringifyMarkdownTokens.call(void 0, tokens);
740
+ config.title = _chunk7QXPSYEZjs.stringifyMarkdownTokens.call(void 0, tokens);
733
741
  }
734
742
  if (_utils.isString.call(void 0, config.info))
735
743
  config.info = md.render(config.info);
@@ -750,7 +758,7 @@ ${routes.join(",\n")}
750
758
  ];
751
759
  }
752
760
  }).filter((i) => _fsextra2.default.existsSync(i));
753
- const imports = components.map((i, idx) => `import __n${idx} from '${_chunkQT3EQ43Ajs.toAtFS.call(void 0, i)}'`).join("\n");
761
+ const imports = components.map((i, idx) => `import __n${idx} from '${_chunk7QXPSYEZjs.toAtFS.call(void 0, i)}'`).join("\n");
754
762
  const render = components.map((i, idx) => `h(__n${idx})`).join(",");
755
763
  return `
756
764
  ${imports}
@@ -765,7 +773,7 @@ export default {
765
773
  }
766
774
 
767
775
  // node/plugins/monacoTransform.ts
768
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
776
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
769
777
 
770
778
 
771
779
 
@@ -799,7 +807,7 @@ function createMonacoTypesLoader() {
799
807
  }
800
808
 
801
809
  // node/plugins/setupClient.ts
802
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
810
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
803
811
 
804
812
 
805
813
 
@@ -821,7 +829,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
821
829
  setups.forEach((path, idx) => {
822
830
  if (!_fs.existsSync.call(void 0, path))
823
831
  return;
824
- imports.push(`import __n${idx} from '${_chunkQT3EQ43Ajs.toAtFS.call(void 0, path)}'`);
832
+ imports.push(`import __n${idx} from '${_chunk7QXPSYEZjs.toAtFS.call(void 0, path)}'`);
825
833
  let fn = `__n${idx}`;
826
834
  let awaitFn = `await __n${idx}`;
827
835
  if (/\binjection_return\b/g.test(code)) {
@@ -849,7 +857,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
849
857
  }
850
858
 
851
859
  // node/plugins/markdown.ts
852
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
860
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
853
861
  var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
854
862
  var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
855
863
 
@@ -859,7 +867,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
859
867
  var _plantumlencoder = require('plantuml-encoder');
860
868
 
861
869
  // node/plugins/markdown-it-katex.ts
862
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
870
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
863
871
  var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
864
872
  function isValidDelim(state, pos) {
865
873
  const max = state.posMax;
@@ -1006,7 +1014,7 @@ function math_plugin(md2, options) {
1006
1014
  }
1007
1015
 
1008
1016
  // node/plugins/markdown-it-prism.ts
1009
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
1017
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
1010
1018
  var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
1011
1019
  var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
1012
1020
  var DEFAULTS = {
@@ -1029,7 +1037,7 @@ function loadPrismLang(lang) {
1029
1037
  }
1030
1038
  function loadPrismPlugin(name) {
1031
1039
  try {
1032
- _chunkQT3EQ43Ajs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
1040
+ _chunk7QXPSYEZjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
1033
1041
  } catch (e) {
1034
1042
  throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
1035
1043
  }
@@ -1069,7 +1077,7 @@ function markdownItPrism(markdownit, useroptions) {
1069
1077
  }
1070
1078
 
1071
1079
  // node/plugins/markdown-it-shiki.ts
1072
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
1080
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
1073
1081
  function getThemeName(theme) {
1074
1082
  if (typeof theme === "string")
1075
1083
  return theme;
@@ -1091,7 +1099,7 @@ function resolveShikiOptions(options) {
1091
1099
  themes.push(options.theme);
1092
1100
  }
1093
1101
  }
1094
- return _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, options), {
1102
+ return _chunk7QXPSYEZjs.__spreadProps.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {}, options), {
1095
1103
  themes,
1096
1104
  darkModeThemes: darkModeThemes ? {
1097
1105
  dark: getThemeName(darkModeThemes.dark),
@@ -1129,7 +1137,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
1129
1137
  const setups = [];
1130
1138
  const entryPath = _utils.slash.call(void 0, entry);
1131
1139
  if (config.highlighter === "shiki") {
1132
- const { getHighlighter } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "shiki")));
1140
+ const { getHighlighter } = await Promise.resolve().then(() => _chunk7QXPSYEZjs.__toModule.call(void 0, _chunk7QXPSYEZjs.__require.call(void 0, "shiki")));
1133
1141
  const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
1134
1142
  const { langs, themes } = resolveShikiOptions(shikiOptions);
1135
1143
  shikiOptions.highlighter = await getHighlighter({ themes, langs });
@@ -1138,11 +1146,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
1138
1146
  setups.push((md2) => md2.use(markdownItPrism));
1139
1147
  }
1140
1148
  const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
1141
- return _vitepluginmd2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1149
+ return _vitepluginmd2.default.call(void 0, _chunk7QXPSYEZjs.__spreadProps.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1142
1150
  wrapperClasses: "",
1143
1151
  headEnabled: false,
1144
1152
  frontmatter: false,
1145
- markdownItOptions: _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1153
+ markdownItOptions: _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1146
1154
  quotes: `""''`,
1147
1155
  html: true,
1148
1156
  xhtmlOut: true,
@@ -1279,7 +1287,7 @@ function escapeVueInCode(md2) {
1279
1287
  }
1280
1288
 
1281
1289
  // node/plugins/patchTransform.ts
1282
- _chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
1290
+ _chunk7QXPSYEZjs.init_cjs_shims.call(void 0, );
1283
1291
 
1284
1292
  function createFixPlugins(options) {
1285
1293
  const define = _utils.objectEntries.call(void 0, getDefine(options));
@@ -1342,10 +1350,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1342
1350
  clientRoot,
1343
1351
  data: { config }
1344
1352
  } = options;
1345
- const VuePlugin = _pluginvue2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1353
+ const VuePlugin = _pluginvue2.default.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1346
1354
  include: [/\.vue$/, /\.md$/],
1347
1355
  exclude: [],
1348
- template: _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1356
+ template: _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1349
1357
  compilerOptions: {
1350
1358
  isCustomElement(tag) {
1351
1359
  return customElements.has(tag);
@@ -1360,7 +1368,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1360
1368
  MarkdownPlugin,
1361
1369
  VuePlugin,
1362
1370
  createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
1363
- _vite4.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1371
+ _vite4.default.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1364
1372
  extensions: ["vue", "md", "ts"],
1365
1373
  dirs: [
1366
1374
  `${clientRoot}/builtin`,
@@ -1378,11 +1386,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1378
1386
  })
1379
1387
  ]
1380
1388
  }, componentsOptions)),
1381
- _vite2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1389
+ _vite2.default.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1382
1390
  defaultClass: "slidev-icon",
1383
1391
  autoInstall: true
1384
1392
  }, iconsOptions)),
1385
- config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
1393
+ config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunk7QXPSYEZjs.__spreadValues.call(void 0, {
1386
1394
  rules: [
1387
1395
  ..._vitepluginremoteassets.DefaultRules,
1388
1396
  {
@@ -52,9 +52,9 @@ var __toModule = (module) => {
52
52
  return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
53
53
  };
54
54
 
55
- // ../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/cjs_shims.js
55
+ // ../../node_modules/.pnpm/tsup@5.11.13_typescript@4.6.2/node_modules/tsup/assets/cjs_shims.js
56
56
  var init_cjs_shims = __esm({
57
- "../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/cjs_shims.js"() {
57
+ "../../node_modules/.pnpm/tsup@5.11.13_typescript@4.6.2/node_modules/tsup/assets/cjs_shims.js"() {
58
58
  }
59
59
  });
60
60
 
@@ -11,7 +11,7 @@ import {
11
11
  resolveImportPath,
12
12
  stringifyMarkdownTokens,
13
13
  toAtFS
14
- } from "./chunk-4OPORETI.mjs";
14
+ } from "./chunk-VYBQLH2X.mjs";
15
15
 
16
16
  // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
17
17
  var require_fast_deep_equal = __commonJS({
@@ -243,25 +243,25 @@ var dependencies = {
243
243
  "@antfu/utils": "^0.5.0",
244
244
  "@slidev/parser": "workspace:*",
245
245
  "@slidev/types": "workspace:*",
246
- "@vueuse/core": "^7.6.0",
246
+ "@vueuse/core": "^7.7.0",
247
247
  "@vueuse/head": "^0.7.5",
248
248
  "@vueuse/motion": "^2.0.0-beta.9",
249
- codemirror: "^5.65.1",
250
- drauu: "^0.2.1",
249
+ codemirror: "^5.65.2",
250
+ drauu: "^0.3.0",
251
251
  "file-saver": "^2.0.5",
252
252
  "js-base64": "^3.7.2",
253
253
  "js-yaml": "^4.1.0",
254
254
  katex: "^0.15.2",
255
- mermaid: "8.13.0",
255
+ mermaid: "^8.14.0",
256
256
  "monaco-editor": "^0.32.1",
257
- nanoid: "^3.2.0",
257
+ nanoid: "^3.3.1",
258
258
  prettier: "^2.5.1",
259
259
  recordrtc: "^5.6.2",
260
260
  resolve: "^1.22.0",
261
- "vite-plugin-windicss": "^1.7.0",
262
- vue: "^3.2.30",
263
- "vue-router": "^4.0.12",
264
- windicss: "^3.4.3"
261
+ "vite-plugin-windicss": "^1.8.2",
262
+ vue: "^3.2.31",
263
+ "vue-router": "^4.0.13",
264
+ windicss: "^3.5.1"
265
265
  };
266
266
 
267
267
  // node/vite/searchRoot.ts
@@ -341,6 +341,7 @@ function createConfigPlugin(options) {
341
341
  "prettier/esm/parser-html",
342
342
  "prettier/esm/parser-typescript",
343
343
  "mermaid/dist/mermaid.min",
344
+ "mermaid/dist/mermaid",
344
345
  "vite-plugin-vue-server-ref/client"
345
346
  ],
346
347
  exclude: EXCLUDE
@@ -560,10 +561,17 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
560
561
  if (match) {
561
562
  const [, no, type] = match;
562
563
  const pageNo = parseInt(no) - 1;
563
- if (type === "md")
564
- return (_a = data.slides[pageNo]) == null ? void 0 : _a.content;
564
+ if (type === "md") {
565
+ return {
566
+ code: (_a = data.slides[pageNo]) == null ? void 0 : _a.content,
567
+ map: {}
568
+ };
569
+ }
565
570
  }
566
- return "";
571
+ return {
572
+ code: "",
573
+ map: {}
574
+ };
567
575
  }
568
576
  }
569
577
  },
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ViteSlidevPlugin
3
- } from "./chunk-ARIEVK2P.mjs";
3
+ } from "./chunk-FOVZ2FGH.mjs";
4
4
  import {
5
5
  init_esm_shims
6
- } from "./chunk-4OPORETI.mjs";
6
+ } from "./chunk-VYBQLH2X.mjs";
7
7
 
8
8
  // node/server.ts
9
9
  init_esm_shims();
@@ -52,12 +52,12 @@ var __toModule = (module) => {
52
52
  return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
53
53
  };
54
54
 
55
- // ../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/esm_shims.js
55
+ // ../../node_modules/.pnpm/tsup@5.11.13_typescript@4.6.2/node_modules/tsup/assets/esm_shims.js
56
56
  import { fileURLToPath } from "url";
57
57
  import path from "path";
58
58
  var getFilename, getDirname, __dirname, __filename;
59
59
  var init_esm_shims = __esm({
60
- "../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/esm_shims.js"() {
60
+ "../../node_modules/.pnpm/tsup@5.11.13_typescript@4.6.2/node_modules/tsup/assets/esm_shims.js"() {
61
61
  getFilename = () => fileURLToPath(import.meta.url);
62
62
  getDirname = () => path.dirname(getFilename());
63
63
  __dirname = /* @__PURE__ */ getDirname();