@slidev/cli 0.42.5 → 0.42.6

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.
@@ -116,6 +116,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
116
116
  // node/plugins/preset.ts
117
117
  import { join as join8 } from "path";
118
118
  import { existsSync as existsSync4 } from "fs";
119
+ import process3 from "process";
119
120
  import Vue from "@vitejs/plugin-vue";
120
121
  import VueJsx from "@vitejs/plugin-vue-jsx";
121
122
  import Icons from "unplugin-icons/vite";
@@ -183,32 +184,32 @@ import { uniq as uniq2 } from "@antfu/utils";
183
184
 
184
185
  // ../client/package.json
185
186
  var dependencies = {
186
- "@antfu/utils": "^0.7.4",
187
+ "@antfu/utils": "^0.7.5",
187
188
  "@slidev/parser": "workspace:*",
188
189
  "@slidev/types": "workspace:*",
189
- "@unocss/reset": "^0.53.1",
190
- "@vueuse/core": "^10.2.0",
190
+ "@unocss/reset": "^0.54.1",
191
+ "@vueuse/core": "^10.3.0",
191
192
  "@vueuse/head": "^1.1.26",
192
- "@vueuse/math": "^10.2.0",
193
+ "@vueuse/math": "^10.3.0",
193
194
  "@vueuse/motion": "^2.0.0",
194
195
  codemirror: "^5.65.5",
195
196
  defu: "^6.1.2",
196
- drauu: "^0.3.2",
197
+ drauu: "^0.3.3",
197
198
  "file-saver": "^2.0.5",
198
199
  "fuse.js": "^6.6.2",
199
200
  "js-base64": "^3.7.5",
200
201
  "js-yaml": "^4.1.0",
201
- katex: "^0.16.7",
202
- mermaid: "^10.2.3",
202
+ katex: "^0.16.8",
203
+ mermaid: "^10.3.0",
203
204
  "monaco-editor": "^0.37.1",
204
205
  nanoid: "^4.0.2",
205
- prettier: "^2.8.8",
206
+ prettier: "^3.0.0",
206
207
  recordrtc: "^5.6.2",
207
208
  resolve: "^1.22.2",
208
- unocss: "^0.53.1",
209
+ unocss: "^0.54.1",
209
210
  "vite-plugin-windicss": "^1.9.0",
210
211
  vue: "^3.3.4",
211
- "vue-router": "^4.2.2",
212
+ "vue-router": "^4.2.4",
212
213
  "vue-starport": "^0.3.0",
213
214
  windicss: "^3.5.6"
214
215
  };
@@ -299,9 +300,9 @@ function createConfigPlugin(options) {
299
300
  "codemirror/mode/xml/xml",
300
301
  "codemirror/mode/htmlmixed/htmlmixed",
301
302
  "codemirror/addon/display/placeholder",
302
- "prettier/esm/parser-babel",
303
- "prettier/esm/parser-html",
304
- "prettier/esm/parser-typescript",
303
+ "prettier/plugins/babel",
304
+ "prettier/plugins/html",
305
+ "prettier/plugins/typescript",
305
306
  "mermaid/dist/mermaid.esm.min.mjs",
306
307
  "mermaid/dist/mermaid.esm.mjs",
307
308
  "vite-plugin-vue-server-ref/client"
@@ -365,6 +366,7 @@ function getDefine(options) {
365
366
  // node/plugins/loaders.ts
366
367
  var import_fast_deep_equal = __toESM(require_fast_deep_equal());
367
368
  import { basename as basename2, join as join5 } from "path";
369
+ import process from "process";
368
370
  import { isString, notNullish, objectMap, range, slash, uniq as uniq3 } from "@antfu/utils";
369
371
  import fg2 from "fast-glob";
370
372
  import fs4, { existsSync as existsSync2 } from "fs-extra";
@@ -808,15 +810,13 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
808
810
  const layouts = await getLayouts();
809
811
  imports.push(`import __layout__end from '${layouts.end}'`);
810
812
  let no = 1;
811
- const routes = data.slides.map((i, idx) => {
812
- var _a, _b, _c, _d;
813
- if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
814
- return void 0;
813
+ const routes = data.slides.filter(({ frontmatter }) => !(frontmatter == null ? void 0 : frontmatter.disabled)).map((i, idx) => {
814
+ var _a, _b, _c;
815
815
  imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
816
816
  const additions = {
817
817
  slide: {
818
818
  ...prepareSlideInfo(i),
819
- filepath: ((_b = i.source) == null ? void 0 : _b.filepath) || entry,
819
+ filepath: ((_a = i.source) == null ? void 0 : _a.filepath) || entry,
820
820
  id: idx,
821
821
  no
822
822
  },
@@ -825,8 +825,8 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
825
825
  };
826
826
  const meta = Object.assign({}, i.frontmatter, additions);
827
827
  const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
828
- if ((_c = i.frontmatter) == null ? void 0 : _c.routeAlias)
829
- redirects.push(`{ path: '${(_d = i.frontmatter) == null ? void 0 : _d.routeAlias}', redirect: { path: '${no}' } }`);
828
+ if ((_b = i.frontmatter) == null ? void 0 : _b.routeAlias)
829
+ redirects.push(`{ path: '${(_c = i.frontmatter) == null ? void 0 : _c.routeAlias}', redirect: { path: '${no}' } }`);
830
830
  no += 1;
831
831
  return route;
832
832
  });
@@ -898,10 +898,11 @@ export default {
898
898
 
899
899
  // node/plugins/monacoTransform.ts
900
900
  import { join as join6 } from "path";
901
+ import process2 from "process";
901
902
  import { slash as slash2 } from "@antfu/utils";
902
903
  async function getPackageData(pkg) {
903
904
  const { resolvePackageData } = await eval('import("vite")');
904
- const info = resolvePackageData(pkg, process.cwd());
905
+ const info = resolvePackageData(pkg, process2.cwd());
905
906
  if (!info)
906
907
  return;
907
908
  const typePath = info.data.types || info.data.typings;
@@ -1602,7 +1603,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1602
1603
  ...remoteAssetsOptions
1603
1604
  })) : null,
1604
1605
  ServerRef({
1605
- debug: process.env.NODE_ENV === "development",
1606
+ debug: process3.env.NODE_ENV === "development",
1606
1607
  state: {
1607
1608
  sync: false,
1608
1609
  nav: {
@@ -116,6 +116,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
116
116
  // node/plugins/preset.ts
117
117
 
118
118
 
119
+ var _process = require('process'); var _process2 = _interopRequireDefault(_process);
119
120
  var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
120
121
  var _pluginvuejsx = require('@vitejs/plugin-vue-jsx'); var _pluginvuejsx2 = _interopRequireDefault(_pluginvuejsx);
121
122
  var _vite3 = require('unplugin-icons/vite'); var _vite4 = _interopRequireDefault(_vite3);
@@ -183,32 +184,32 @@ var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglo
183
184
 
184
185
  // ../client/package.json
185
186
  var dependencies = {
186
- "@antfu/utils": "^0.7.4",
187
+ "@antfu/utils": "^0.7.5",
187
188
  "@slidev/parser": "workspace:*",
188
189
  "@slidev/types": "workspace:*",
189
- "@unocss/reset": "^0.53.1",
190
- "@vueuse/core": "^10.2.0",
190
+ "@unocss/reset": "^0.54.1",
191
+ "@vueuse/core": "^10.3.0",
191
192
  "@vueuse/head": "^1.1.26",
192
- "@vueuse/math": "^10.2.0",
193
+ "@vueuse/math": "^10.3.0",
193
194
  "@vueuse/motion": "^2.0.0",
194
195
  codemirror: "^5.65.5",
195
196
  defu: "^6.1.2",
196
- drauu: "^0.3.2",
197
+ drauu: "^0.3.3",
197
198
  "file-saver": "^2.0.5",
198
199
  "fuse.js": "^6.6.2",
199
200
  "js-base64": "^3.7.5",
200
201
  "js-yaml": "^4.1.0",
201
- katex: "^0.16.7",
202
- mermaid: "^10.2.3",
202
+ katex: "^0.16.8",
203
+ mermaid: "^10.3.0",
203
204
  "monaco-editor": "^0.37.1",
204
205
  nanoid: "^4.0.2",
205
- prettier: "^2.8.8",
206
+ prettier: "^3.0.0",
206
207
  recordrtc: "^5.6.2",
207
208
  resolve: "^1.22.2",
208
- unocss: "^0.53.1",
209
+ unocss: "^0.54.1",
209
210
  "vite-plugin-windicss": "^1.9.0",
210
211
  vue: "^3.3.4",
211
- "vue-router": "^4.2.2",
212
+ "vue-router": "^4.2.4",
212
213
  "vue-starport": "^0.3.0",
213
214
  windicss: "^3.5.6"
214
215
  };
@@ -299,9 +300,9 @@ function createConfigPlugin(options) {
299
300
  "codemirror/mode/xml/xml",
300
301
  "codemirror/mode/htmlmixed/htmlmixed",
301
302
  "codemirror/addon/display/placeholder",
302
- "prettier/esm/parser-babel",
303
- "prettier/esm/parser-html",
304
- "prettier/esm/parser-typescript",
303
+ "prettier/plugins/babel",
304
+ "prettier/plugins/html",
305
+ "prettier/plugins/typescript",
305
306
  "mermaid/dist/mermaid.esm.min.mjs",
306
307
  "mermaid/dist/mermaid.esm.mjs",
307
308
  "vite-plugin-vue-server-ref/client"
@@ -368,6 +369,7 @@ var import_fast_deep_equal = _chunkMJQETB73js.__toESM.call(void 0, require_fast_
368
369
 
369
370
 
370
371
 
372
+
371
373
  var _markdownit = require('markdown-it'); var _markdownit2 = _interopRequireDefault(_markdownit);
372
374
  var _markdownitlinkattributes = require('markdown-it-link-attributes'); var _markdownitlinkattributes2 = _interopRequireDefault(_markdownitlinkattributes);
373
375
  var _fs3 = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs3);
@@ -778,7 +780,7 @@ defineProps<{ no: number | string }>()`);
778
780
  'import "virtual:windi-base.css"'
779
781
  );
780
782
  imports.push('import "virtual:windi-utilities.css"');
781
- if (process.env.NODE_ENV !== "production")
783
+ if (_process2.default.env.NODE_ENV !== "production")
782
784
  imports.push('import "virtual:windi-devtools"');
783
785
  }
784
786
  return imports.join("\n");
@@ -808,15 +810,13 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
808
810
  const layouts = await getLayouts();
809
811
  imports.push(`import __layout__end from '${layouts.end}'`);
810
812
  let no = 1;
811
- const routes = data.slides.map((i, idx) => {
812
- var _a, _b, _c, _d;
813
- if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
814
- return void 0;
813
+ const routes = data.slides.filter(({ frontmatter }) => !(frontmatter == null ? void 0 : frontmatter.disabled)).map((i, idx) => {
814
+ var _a, _b, _c;
815
815
  imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
816
816
  const additions = {
817
817
  slide: {
818
818
  ...prepareSlideInfo(i),
819
- filepath: ((_b = i.source) == null ? void 0 : _b.filepath) || entry,
819
+ filepath: ((_a = i.source) == null ? void 0 : _a.filepath) || entry,
820
820
  id: idx,
821
821
  no
822
822
  },
@@ -825,8 +825,8 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
825
825
  };
826
826
  const meta = Object.assign({}, i.frontmatter, additions);
827
827
  const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
828
- if ((_c = i.frontmatter) == null ? void 0 : _c.routeAlias)
829
- redirects.push(`{ path: '${(_d = i.frontmatter) == null ? void 0 : _d.routeAlias}', redirect: { path: '${no}' } }`);
828
+ if ((_b = i.frontmatter) == null ? void 0 : _b.routeAlias)
829
+ redirects.push(`{ path: '${(_c = i.frontmatter) == null ? void 0 : _c.routeAlias}', redirect: { path: '${no}' } }`);
830
830
  no += 1;
831
831
  return route;
832
832
  });
@@ -899,9 +899,10 @@ export default {
899
899
  // node/plugins/monacoTransform.ts
900
900
 
901
901
 
902
+
902
903
  async function getPackageData(pkg) {
903
904
  const { resolvePackageData } = await eval('import("vite")');
904
- const info = resolvePackageData(pkg, process.cwd());
905
+ const info = resolvePackageData(pkg, _process2.default.cwd());
905
906
  if (!info)
906
907
  return;
907
908
  const typePath = info.data.types || info.data.typings;
@@ -1602,7 +1603,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
1602
1603
  ...remoteAssetsOptions
1603
1604
  })) : null,
1604
1605
  _vitepluginvueserverref2.default.call(void 0, {
1605
- debug: process.env.NODE_ENV === "development",
1606
+ debug: _process2.default.env.NODE_ENV === "development",
1606
1607
  state: {
1607
1608
  sync: false,
1608
1609
  nav: {