@slidev/cli 0.49.5 → 0.49.7
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.
|
@@ -7143,7 +7143,7 @@ var require_dist = __commonJS({
|
|
|
7143
7143
|
});
|
|
7144
7144
|
|
|
7145
7145
|
// package.json
|
|
7146
|
-
var version = "0.49.
|
|
7146
|
+
var version = "0.49.7";
|
|
7147
7147
|
|
|
7148
7148
|
// node/commands/shared.ts
|
|
7149
7149
|
import { existsSync, promises as fs } from "node:fs";
|
|
@@ -7287,8 +7287,8 @@ async function mergeViteConfigs({ roots, entry }, viteConfig, config, command) {
|
|
|
7287
7287
|
}
|
|
7288
7288
|
|
|
7289
7289
|
// node/vite/index.ts
|
|
7290
|
-
import { join as
|
|
7291
|
-
import { existsSync as
|
|
7290
|
+
import { join as join9 } from "node:path";
|
|
7291
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
7292
7292
|
import process2 from "node:process";
|
|
7293
7293
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7294
7294
|
import Icons from "unplugin-icons/vite";
|
|
@@ -7604,65 +7604,57 @@ console.warn('/@slidev/titles.md is deprecated, import from #slidev/title-render
|
|
|
7604
7604
|
}
|
|
7605
7605
|
};
|
|
7606
7606
|
|
|
7607
|
-
// node/virtual/global-
|
|
7607
|
+
// node/virtual/global-layers.ts
|
|
7608
7608
|
import { existsSync as existsSync2 } from "node:fs";
|
|
7609
7609
|
import { join as join4 } from "node:path";
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
const
|
|
7630
|
-
|
|
7631
|
-
${
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
};
|
|
7641
|
-
}
|
|
7610
|
+
var templateGlobalLayers = {
|
|
7611
|
+
id: `/@slidev/global-layers`,
|
|
7612
|
+
getContent({ roots }) {
|
|
7613
|
+
const imports = [];
|
|
7614
|
+
let n = 0;
|
|
7615
|
+
function getComponent(names) {
|
|
7616
|
+
const components = roots.flatMap((root) => names.map((name) => join4(root, name))).filter((i) => existsSync2(i));
|
|
7617
|
+
imports.push(components.map((path4, i) => `import __n${n}_${i} from '${toAtFS(path4)}'`).join("\n"));
|
|
7618
|
+
const render = components.map((_, i) => `h(__n${n}_${i})`).join(",");
|
|
7619
|
+
n++;
|
|
7620
|
+
return `{ render: () => [${render}] }`;
|
|
7621
|
+
}
|
|
7622
|
+
const globalTop = getComponent(["global.vue", "global-top.vue", "GlobalTop.vue"]);
|
|
7623
|
+
const globalBottom = getComponent(["global-bottom.vue", "GlobalBottom.vue"]);
|
|
7624
|
+
const slideTop = getComponent(["slide-top.vue", "SlideTop.vue"]);
|
|
7625
|
+
const slideBottom = getComponent(["slide-bottom.vue", "SlideBottom.vue"]);
|
|
7626
|
+
return [
|
|
7627
|
+
imports.join("\n"),
|
|
7628
|
+
`import { h } from 'vue'`,
|
|
7629
|
+
`export const GlobalTop = ${globalTop}`,
|
|
7630
|
+
`export const GlobalBottom = ${globalBottom}`,
|
|
7631
|
+
`export const SlideTop = ${slideTop}`,
|
|
7632
|
+
`export const SlideBottom = ${slideBottom}`
|
|
7633
|
+
].join("\n");
|
|
7634
|
+
}
|
|
7635
|
+
};
|
|
7636
|
+
|
|
7637
|
+
// node/virtual/nav-controls.ts
|
|
7638
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
7639
|
+
import { join as join5 } from "node:path";
|
|
7642
7640
|
var templateNavControls = {
|
|
7643
7641
|
id: "/@slidev/custom-nav-controls",
|
|
7644
7642
|
getContent({ roots }) {
|
|
7645
7643
|
const components = roots.flatMap((root) => {
|
|
7646
7644
|
return [
|
|
7647
|
-
|
|
7648
|
-
|
|
7645
|
+
join5(root, "custom-nav-controls.vue"),
|
|
7646
|
+
join5(root, "CustomNavControls.vue")
|
|
7649
7647
|
];
|
|
7650
|
-
}).filter((i) =>
|
|
7648
|
+
}).filter((i) => existsSync3(i));
|
|
7651
7649
|
const imports = components.map((i, idx) => `import __n${idx} from '${toAtFS(i)}'`).join("\n");
|
|
7652
7650
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
7653
|
-
return
|
|
7654
|
-
${imports}
|
|
7651
|
+
return `${imports}
|
|
7655
7652
|
import { h } from 'vue'
|
|
7656
7653
|
export default {
|
|
7657
|
-
render() {
|
|
7658
|
-
|
|
7659
|
-
}
|
|
7660
|
-
}
|
|
7661
|
-
`;
|
|
7654
|
+
render: () => [${render}],
|
|
7655
|
+
}`;
|
|
7662
7656
|
}
|
|
7663
7657
|
};
|
|
7664
|
-
var templateGlobalTop = createGlobalComponentTemplate("top");
|
|
7665
|
-
var templateGlobalBottom = createGlobalComponentTemplate("bottom");
|
|
7666
7658
|
|
|
7667
7659
|
// node/virtual/layouts.ts
|
|
7668
7660
|
import { objectMap } from "@antfu/utils";
|
|
@@ -7716,7 +7708,7 @@ var templateMonacoRunDeps = {
|
|
|
7716
7708
|
|
|
7717
7709
|
// node/virtual/monaco-types.ts
|
|
7718
7710
|
import { builtinModules } from "node:module";
|
|
7719
|
-
import { join as
|
|
7711
|
+
import { join as join6, resolve as resolve3 } from "node:path";
|
|
7720
7712
|
import fg2 from "fast-glob";
|
|
7721
7713
|
import { uniq as uniq3 } from "@antfu/utils";
|
|
7722
7714
|
var templateMonacoTypes = {
|
|
@@ -7724,7 +7716,7 @@ var templateMonacoTypes = {
|
|
|
7724
7716
|
getContent: async ({ userRoot, data }) => {
|
|
7725
7717
|
if (!data.features.monaco)
|
|
7726
7718
|
return "";
|
|
7727
|
-
const typesRoot =
|
|
7719
|
+
const typesRoot = join6(userRoot, "snippets");
|
|
7728
7720
|
const files = await fg2(["**/*.ts", "**/*.mts", "**/*.cts"], { cwd: typesRoot });
|
|
7729
7721
|
let result = 'import { addFile } from "@slidev/client/setup/monaco.ts"\n';
|
|
7730
7722
|
for (const file of files) {
|
|
@@ -7759,16 +7751,16 @@ var templateMonacoTypes = {
|
|
|
7759
7751
|
};
|
|
7760
7752
|
|
|
7761
7753
|
// node/virtual/setups.ts
|
|
7762
|
-
import { existsSync as
|
|
7763
|
-
import { join as
|
|
7754
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
7755
|
+
import { join as join7 } from "node:path";
|
|
7764
7756
|
function createSetupTemplate(name) {
|
|
7765
7757
|
return {
|
|
7766
7758
|
id: `/@slidev/setups/${name}`,
|
|
7767
7759
|
getContent({ roots }) {
|
|
7768
7760
|
const setups = roots.flatMap((i) => {
|
|
7769
|
-
const path4 =
|
|
7761
|
+
const path4 = join7(i, "setup", name);
|
|
7770
7762
|
return [".ts", ".mts", ".js", ".mjs"].map((ext) => path4 + ext);
|
|
7771
|
-
}).filter((i) =>
|
|
7763
|
+
}).filter((i) => existsSync4(i));
|
|
7772
7764
|
const imports = [];
|
|
7773
7765
|
setups.forEach((path4, idx) => {
|
|
7774
7766
|
imports.push(`import __n${idx} from '${toAtFS(path4)}'`);
|
|
@@ -7905,13 +7897,13 @@ ${slides.join(",\n")}
|
|
|
7905
7897
|
};
|
|
7906
7898
|
|
|
7907
7899
|
// node/virtual/styles.ts
|
|
7908
|
-
import { join as
|
|
7909
|
-
import { existsSync as
|
|
7900
|
+
import { join as join8 } from "node:path";
|
|
7901
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
7910
7902
|
var templateStyle = {
|
|
7911
7903
|
id: "/@slidev/styles",
|
|
7912
7904
|
getContent: async ({ data, clientRoot, roots }) => {
|
|
7913
7905
|
function resolveUrlOfClient(name) {
|
|
7914
|
-
return toAtFS(
|
|
7906
|
+
return toAtFS(join8(clientRoot, name));
|
|
7915
7907
|
}
|
|
7916
7908
|
const imports = [
|
|
7917
7909
|
`import "${resolveUrlOfClient("styles/vars.css")}"`,
|
|
@@ -7922,14 +7914,14 @@ var templateStyle = {
|
|
|
7922
7914
|
];
|
|
7923
7915
|
for (const root of roots) {
|
|
7924
7916
|
const styles = [
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7917
|
+
join8(root, "styles", "index.ts"),
|
|
7918
|
+
join8(root, "styles", "index.js"),
|
|
7919
|
+
join8(root, "styles", "index.css"),
|
|
7920
|
+
join8(root, "styles.css"),
|
|
7921
|
+
join8(root, "style.css")
|
|
7930
7922
|
];
|
|
7931
7923
|
for (const style of styles) {
|
|
7932
|
-
if (
|
|
7924
|
+
if (existsSync5(style)) {
|
|
7933
7925
|
imports.push(`import "${toAtFS(style)}"`);
|
|
7934
7926
|
continue;
|
|
7935
7927
|
}
|
|
@@ -7991,8 +7983,7 @@ var templates = [
|
|
|
7991
7983
|
templateMonacoRunDeps,
|
|
7992
7984
|
templateConfigs,
|
|
7993
7985
|
templateStyle,
|
|
7994
|
-
|
|
7995
|
-
templateGlobalTop,
|
|
7986
|
+
templateGlobalLayers,
|
|
7996
7987
|
templateNavControls,
|
|
7997
7988
|
templateSlides,
|
|
7998
7989
|
templateLayouts,
|
|
@@ -9493,7 +9484,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
9493
9484
|
data: { config }
|
|
9494
9485
|
} = options;
|
|
9495
9486
|
const drawingData = await loadDrawings(options);
|
|
9496
|
-
const publicRoots = [...themeRoots, ...addonRoots].map((i) =>
|
|
9487
|
+
const publicRoots = [...themeRoots, ...addonRoots].map((i) => join9(i, "public")).filter(existsSync6);
|
|
9497
9488
|
const plugins = [
|
|
9498
9489
|
createMarkdownPlugin(options, pluginOptions),
|
|
9499
9490
|
createVuePlugin(options, pluginOptions),
|
|
@@ -9502,11 +9493,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
9502
9493
|
Components({
|
|
9503
9494
|
extensions: ["vue", "md", "js", "ts", "jsx", "tsx"],
|
|
9504
9495
|
dirs: [
|
|
9505
|
-
|
|
9506
|
-
...roots.map((i) =>
|
|
9496
|
+
join9(options.clientRoot, "builtin"),
|
|
9497
|
+
...roots.map((i) => join9(i, "components")),
|
|
9507
9498
|
"src/components",
|
|
9508
9499
|
"components",
|
|
9509
|
-
|
|
9500
|
+
join9(process2.cwd(), "components")
|
|
9510
9501
|
],
|
|
9511
9502
|
include: [/\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.md$/, /\.md\?vue/],
|
|
9512
9503
|
exclude: [],
|
package/dist/cli.mjs
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
resolveAddons,
|
|
6
6
|
resolveOptions,
|
|
7
7
|
resolveTheme
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GVANDJX7.mjs";
|
|
9
9
|
import {
|
|
10
10
|
version
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-USRVNGYC.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-
|
|
331
|
+
const { build } = await import("./build-KCQ3YTFV.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)
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createServer,
|
|
3
3
|
parser,
|
|
4
4
|
resolveOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GVANDJX7.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ViteSlidevPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-USRVNGYC.mjs";
|
|
9
9
|
import "./chunk-LOUKLO2C.mjs";
|
|
10
10
|
import "./chunk-RG2EEPCO.mjs";
|
|
11
11
|
import "./chunk-BXO7ZPPU.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.7",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"vitefu": "^0.2.5",
|
|
110
110
|
"vue": "^3.4.27",
|
|
111
111
|
"yargs": "^17.7.2",
|
|
112
|
-
"@slidev/client": "0.49.
|
|
113
|
-
"@slidev/parser": "0.49.
|
|
114
|
-
"@slidev/types": "0.49.
|
|
112
|
+
"@slidev/client": "0.49.7",
|
|
113
|
+
"@slidev/parser": "0.49.7",
|
|
114
|
+
"@slidev/types": "0.49.7"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|