@slidev/cli 0.42.11 → 0.43.0-beta.0

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,13 +1,13 @@
1
1
  import {
2
2
  loadSetups
3
- } from "./chunk-6XVZLT3I.mjs";
3
+ } from "./chunk-JDHANZ37.mjs";
4
4
  import {
5
5
  resolveImportPath
6
- } from "./chunk-MZBIET7Y.mjs";
6
+ } from "./chunk-ZEKM4EGL.mjs";
7
7
 
8
8
  // node/plugins/windicss.ts
9
- import { dirname, resolve } from "path";
10
- import { existsSync } from "fs";
9
+ import { dirname, resolve } from "node:path";
10
+ import { existsSync } from "node:fs";
11
11
  import { slash, uniq } from "@antfu/utils";
12
12
  import jiti from "jiti";
13
13
  async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
@@ -36,9 +36,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
36
36
  if (!config2.theme.extend.fontFamily)
37
37
  config2.theme.extend.fontFamily = {};
38
38
  const fontFamily = config2.theme.extend.fontFamily;
39
- fontFamily.sans || (fontFamily.sans = data.config.fonts.sans.join(","));
40
- fontFamily.mono || (fontFamily.mono = data.config.fonts.mono.join(","));
41
- fontFamily.serif || (fontFamily.serif = data.config.fonts.serif.join(","));
39
+ fontFamily.sans ||= data.config.fonts.sans.join(",");
40
+ fontFamily.mono ||= data.config.fonts.mono.join(",");
41
+ fontFamily.serif ||= data.config.fonts.serif.join(",");
42
42
  return config2;
43
43
  },
44
44
  onOptionsResolved(config2) {
@@ -3,7 +3,7 @@
3
3
  var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
4
4
 
5
5
 
6
- var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
6
+ var _chunkJQHGZJGJjs = require('./chunk-JQHGZJGJ.js');
7
7
 
8
8
  // node/plugins/windicss.ts
9
9
  var _path = require('path');
@@ -36,9 +36,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
36
36
  if (!config2.theme.extend.fontFamily)
37
37
  config2.theme.extend.fontFamily = {};
38
38
  const fontFamily = config2.theme.extend.fontFamily;
39
- fontFamily.sans || (fontFamily.sans = data.config.fonts.sans.join(","));
40
- fontFamily.mono || (fontFamily.mono = data.config.fonts.mono.join(","));
41
- fontFamily.serif || (fontFamily.serif = data.config.fonts.serif.join(","));
39
+ fontFamily.sans ||= data.config.fonts.sans.join(",");
40
+ fontFamily.mono ||= data.config.fonts.mono.join(",");
41
+ fontFamily.serif ||= data.config.fonts.serif.join(",");
42
42
  return config2;
43
43
  },
44
44
  onOptionsResolved(config2) {
@@ -51,9 +51,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
51
51
  config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
52
52
  });
53
53
  config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
54
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
55
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "katex/package.json", true)));
56
- config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
54
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
55
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "katex/package.json", true)));
56
+ config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
57
57
  },
58
58
  ...windiOptions
59
59
  }
@@ -1,5 +1,5 @@
1
1
  // node/plugins/setupNode.ts
2
- import { resolve } from "path";
2
+ import { resolve } from "node:path";
3
3
  import { pathExists } from "fs-extra";
4
4
  import { isObject } from "@antfu/utils";
5
5
  import jiti from "jiti";
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
3
+ var _chunkYUG22S6Wjs = require('./chunk-YUG22S6W.js');
4
4
 
5
5
  // node/utils.ts
6
6
  var _path = require('path');
@@ -20,11 +20,11 @@ function resolveImportPath(importName, ensure = false) {
20
20
  }
21
21
  if (_isinstalledglobally2.default) {
22
22
  try {
23
- return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
23
+ return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
24
24
  } catch (e2) {
25
25
  }
26
26
  try {
27
- return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
27
+ return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
28
28
  } catch (e3) {
29
29
  }
30
30
  }
@@ -38,21 +38,18 @@ function resolveGlobalImportPath(importName) {
38
38
  } catch (e4) {
39
39
  }
40
40
  try {
41
- return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
41
+ return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
42
42
  } catch (e5) {
43
43
  }
44
44
  try {
45
- return _chunkQDKRARRUjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
45
+ return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
46
46
  } catch (e6) {
47
47
  }
48
48
  throw new Error(`Failed to resolve global package "${importName}"`);
49
49
  }
50
50
  function stringifyMarkdownTokens(tokens) {
51
51
  return tokens.map(
52
- (token) => {
53
- var _a;
54
- return (_a = token.children) == null ? void 0 : _a.filter((t) => ["text", "code_inline"].includes(t.type) && !t.content.match(/^\s*$/)).map((t) => t.content.trim()).join(" ");
55
- }
52
+ (token) => _optionalChain([token, 'access', _ => _.children, 'optionalAccess', _2 => _2.filter, 'call', _3 => _3((t) => ["text", "code_inline"].includes(t.type) && !t.content.match(/^\s*$/)), 'access', _4 => _4.map, 'call', _5 => _5((t) => t.content.trim()), 'access', _6 => _6.join, 'call', _7 => _7(" ")])
56
53
  ).filter(Boolean).join(" ");
57
54
  }
58
55
  function generateGoogleFontsUrl(options) {