@slidev/cli 0.47.5 → 0.48.0-beta.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.
|
@@ -290,14 +290,15 @@ var vueContextImports = [
|
|
|
290
290
|
`import { inject as _vueInject, provide as _vueProvide, toRef as _vueToRef } from "vue"`,
|
|
291
291
|
`import {
|
|
292
292
|
injectionSlidevContext as _injectionSlidevContext,
|
|
293
|
-
|
|
293
|
+
injectionClicksContext as _injectionClicksContext,
|
|
294
294
|
injectionCurrentPage as _injectionCurrentPage,
|
|
295
295
|
injectionRenderContext as _injectionRenderContext,
|
|
296
296
|
injectionFrontmatter as _injectionFrontmatter,
|
|
297
297
|
} from "@slidev/client/constants.ts"`.replace(/\n\s+/g, "\n"),
|
|
298
298
|
"const $slidev = _vueInject(_injectionSlidevContext)",
|
|
299
299
|
'const $nav = _vueToRef($slidev, "nav")',
|
|
300
|
-
"const $
|
|
300
|
+
"const $clicksContext = _vueInject(_injectionClicksContext)?.value",
|
|
301
|
+
'const $clicks = _vueToRef($clicksContext, "current")',
|
|
301
302
|
"const $page = _vueInject(_injectionCurrentPage)",
|
|
302
303
|
"const $renderContext = _vueInject(_injectionRenderContext)"
|
|
303
304
|
];
|
|
@@ -515,7 +516,7 @@ ${title}
|
|
|
515
516
|
id: ${pageNo},
|
|
516
517
|
no: ${no},
|
|
517
518
|
},
|
|
518
|
-
|
|
519
|
+
__clicksContext: null,
|
|
519
520
|
__preloaded: false,
|
|
520
521
|
})`,
|
|
521
522
|
"export default frontmatter",
|
|
@@ -643,7 +644,7 @@ ${code.slice(injectB)}`;
|
|
|
643
644
|
return code;
|
|
644
645
|
}
|
|
645
646
|
function transformVue(code) {
|
|
646
|
-
if (code.includes("injectionSlidevContext") || code.includes("
|
|
647
|
+
if (code.includes("injectionSlidevContext") || code.includes("injectionClicksContext") || code.includes("const $slidev"))
|
|
647
648
|
return code;
|
|
648
649
|
const imports = [
|
|
649
650
|
...vueContextImports,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JHZKCONU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
packageExists,
|
|
7
7
|
resolveImportPath
|
|
@@ -2532,7 +2532,7 @@ async function createServer(options2, viteConfig = {}, serverOptions = {}) {
|
|
|
2532
2532
|
import * as parser from "@slidev/parser/fs";
|
|
2533
2533
|
|
|
2534
2534
|
// package.json
|
|
2535
|
-
var version = "0.
|
|
2535
|
+
var version = "0.48.0-beta.1";
|
|
2536
2536
|
|
|
2537
2537
|
// node/themes.ts
|
|
2538
2538
|
import prompts2 from "prompts";
|
package/dist/cli.mjs
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveThemeName,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-MFKPLZWW.mjs";
|
|
13
|
+
import "./chunk-JHZKCONU.mjs";
|
|
14
14
|
import {
|
|
15
15
|
loadSetups
|
|
16
16
|
} from "./chunk-CTBVOVLQ.mjs";
|
|
@@ -74,7 +74,7 @@ cli.command(
|
|
|
74
74
|
}).option("tunnel", {
|
|
75
75
|
default: false,
|
|
76
76
|
type: "boolean",
|
|
77
|
-
describe: "open
|
|
77
|
+
describe: "open a Cloudflare Quick Tunnel to make Slidev available on the internet"
|
|
78
78
|
}).option("log", {
|
|
79
79
|
default: "warn",
|
|
80
80
|
type: "string",
|
|
@@ -148,7 +148,7 @@ cli.command(
|
|
|
148
148
|
if (remote != null)
|
|
149
149
|
tunnelUrl = await openTunnel(port);
|
|
150
150
|
else
|
|
151
|
-
console.log(yellow("\n --remote is required for tunneling,
|
|
151
|
+
console.log(yellow("\n --remote is required for tunneling, Cloudflare Quick Tunnel is not enabled.\n"));
|
|
152
152
|
}
|
|
153
153
|
let publicIp;
|
|
154
154
|
if (remote)
|
|
@@ -156,12 +156,12 @@ cli.command(
|
|
|
156
156
|
lastRemoteUrl = printInfo(options, port, remote, tunnelUrl, publicIp);
|
|
157
157
|
}
|
|
158
158
|
async function openTunnel(port2) {
|
|
159
|
-
const
|
|
160
|
-
const tunnel2 = await
|
|
159
|
+
const { startTunnel } = await import("untun");
|
|
160
|
+
const tunnel2 = await startTunnel({
|
|
161
161
|
port: port2,
|
|
162
|
-
|
|
162
|
+
acceptCloudflareNotice: true
|
|
163
163
|
});
|
|
164
|
-
return tunnel2
|
|
164
|
+
return await tunnel2?.getURL() ?? "";
|
|
165
165
|
}
|
|
166
166
|
const SHORTCUTS = [
|
|
167
167
|
{
|
|
@@ -269,7 +269,7 @@ cli.command(
|
|
|
269
269
|
}).strict().help(),
|
|
270
270
|
async (args) => {
|
|
271
271
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
272
|
-
const { build } = await import("./build-
|
|
272
|
+
const { build } = await import("./build-M6ETMXB4.mjs");
|
|
273
273
|
for (const entryFile of entry) {
|
|
274
274
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
275
275
|
if (download && !options.data.config.download)
|
package/dist/index.mjs
CHANGED
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
isPath,
|
|
10
10
|
parser,
|
|
11
11
|
resolveOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MFKPLZWW.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ViteSlidevPlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JHZKCONU.mjs";
|
|
16
16
|
import "./chunk-CTBVOVLQ.mjs";
|
|
17
17
|
import "./chunk-DWXI5WEO.mjs";
|
|
18
18
|
import "./chunk-BXO7ZPPU.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0-beta.1",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@iconify-json/ph": "^1.1.11",
|
|
48
48
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
49
49
|
"@mrdrogdrog/optional": "^1.2.1",
|
|
50
|
-
"@shikijs/markdown-it": "^1.1.
|
|
51
|
-
"@shikijs/twoslash": "^1.1.
|
|
52
|
-
"@shikijs/vitepress-twoslash": "^1.1.
|
|
50
|
+
"@shikijs/markdown-it": "^1.1.2",
|
|
51
|
+
"@shikijs/twoslash": "^1.1.2",
|
|
52
|
+
"@shikijs/vitepress-twoslash": "^1.1.2",
|
|
53
53
|
"@unocss/extractor-mdc": "^0.58.5",
|
|
54
54
|
"@unocss/reset": "^0.58.5",
|
|
55
55
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"katex": "^0.16.9",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
72
|
"local-pkg": "^0.5.0",
|
|
73
|
-
"localtunnel": "^2.0.2",
|
|
74
73
|
"markdown-it": "^14.0.0",
|
|
75
74
|
"markdown-it-footnote": "^4.0.0",
|
|
76
75
|
"markdown-it-link-attributes": "^4.0.1",
|
|
@@ -88,13 +87,14 @@
|
|
|
88
87
|
"resolve": "^1.22.8",
|
|
89
88
|
"resolve-from": "^5.0.0",
|
|
90
89
|
"resolve-global": "^2.0.0",
|
|
91
|
-
"shiki": "^1.1.
|
|
90
|
+
"shiki": "^1.1.2",
|
|
92
91
|
"sirv": "^2.0.4",
|
|
93
92
|
"typescript": "^5.3.3",
|
|
94
93
|
"unocss": "^0.58.5",
|
|
95
94
|
"unplugin-icons": "^0.18.5",
|
|
96
95
|
"unplugin-vue-components": "^0.26.0",
|
|
97
96
|
"unplugin-vue-markdown": "^0.26.0",
|
|
97
|
+
"untun": "^0.1.3",
|
|
98
98
|
"uqr": "^0.1.2",
|
|
99
99
|
"vite": "^5.1.1",
|
|
100
100
|
"vite-plugin-inspect": "^0.8.3",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"vite-plugin-static-copy": "^1.0.1",
|
|
103
103
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
104
104
|
"vitefu": "^0.2.5",
|
|
105
|
-
"vue": "^3.4.
|
|
105
|
+
"vue": "^3.4.19",
|
|
106
106
|
"yargs": "^17.7.2",
|
|
107
|
-
"@slidev/
|
|
108
|
-
"@slidev/
|
|
109
|
-
"@slidev/
|
|
107
|
+
"@slidev/parser": "0.48.0-beta.1",
|
|
108
|
+
"@slidev/client": "0.48.0-beta.1",
|
|
109
|
+
"@slidev/types": "0.48.0-beta.1"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|