@rspress-theme-anatole/theme-default 0.6.0 → 0.6.1-alpha
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.
- package/dist/bundle.js +5 -4
- package/package.json +5 -4
package/dist/bundle.js
CHANGED
|
@@ -41,6 +41,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__theme_assets_jump_20d3ca88__ from "@theme
|
|
|
41
41
|
import * as __WEBPACK_EXTERNAL_MODULE__theme_assets_title_56a7311e__ from "@theme-assets/title";
|
|
42
42
|
import * as __WEBPACK_EXTERNAL_MODULE__theme_assets_github_cac38251__ from "@theme-assets/github";
|
|
43
43
|
import * as __WEBPACK_EXTERNAL_MODULE__theme_assets_gitlab_a0e4f082__ from "@theme-assets/gitlab";
|
|
44
|
+
import * as __WEBPACK_EXTERNAL_MODULE_html2pdf_js_65368f2c__ from "html2pdf.js";
|
|
44
45
|
|
|
45
46
|
function isMobileDevice() {
|
|
46
47
|
return window.innerWidth < 1280;
|
|
@@ -5519,9 +5520,9 @@ async function exportContentToPDF() {
|
|
|
5519
5520
|
|
|
5520
5521
|
fixMermaidSVGs();
|
|
5521
5522
|
|
|
5522
|
-
if (!window.html2pdf) {
|
|
5523
|
-
|
|
5524
|
-
}
|
|
5523
|
+
// if (!window.html2pdf) {
|
|
5524
|
+
// await loadScript('https://cdn.jsdelivr.net/npm/html2pdf.js@0.10.1/dist/html2pdf.bundle.min.js');
|
|
5525
|
+
// }
|
|
5525
5526
|
const element = document.querySelector('.rspress-doc');
|
|
5526
5527
|
if (!element) {
|
|
5527
5528
|
alert('No content to export.');
|
|
@@ -5543,7 +5544,7 @@ async function exportContentToPDF() {
|
|
|
5543
5544
|
};
|
|
5544
5545
|
|
|
5545
5546
|
// 生成 PDF 并在完成后移除提示
|
|
5546
|
-
|
|
5547
|
+
__WEBPACK_EXTERNAL_MODULE_html2pdf_js_65368f2c__.html2pdf().set(opt).from(element).save().then(() => {
|
|
5547
5548
|
document.body.removeChild(tip);
|
|
5548
5549
|
}).catch(() => {
|
|
5549
5550
|
document.body.removeChild(tip);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress-theme-anatole/theme-default",
|
|
3
3
|
"author": "Anatole Tong",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.1-alpha",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css",
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
"types": "./dist/bundle.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mdx-js/react": "2.3.0",
|
|
24
|
-
"@rspress-theme-anatole/
|
|
24
|
+
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.6.1-alpha",
|
|
25
|
+
"@rspress-theme-anatole/shared": "0.6.1-alpha",
|
|
25
26
|
"@rspress/runtime": "1.43.8",
|
|
26
27
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
27
28
|
"copy-to-clipboard": "^3.3.3",
|
|
28
29
|
"flexsearch": "0.7.43",
|
|
29
30
|
"github-slugger": "^2.0.0",
|
|
31
|
+
"html2pdf.js": "^0.10.3",
|
|
30
32
|
"htmr": "^1.0.2",
|
|
31
33
|
"lodash-es": "^4.17.21",
|
|
32
34
|
"nprogress": "^0.2.0",
|
|
@@ -34,8 +36,7 @@
|
|
|
34
36
|
"react-dom": "^18.3.1",
|
|
35
37
|
"react-helmet-async": "^1.3.0",
|
|
36
38
|
"react-router-dom": "6.29.0",
|
|
37
|
-
"react-syntax-highlighter": "^15.6.1"
|
|
38
|
-
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.6.0"
|
|
39
|
+
"react-syntax-highlighter": "^15.6.1"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
42
|
"@microsoft/api-extractor": "^7.49.2",
|