@brillout/docpress 0.3.1 → 0.3.2
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/{chunk-Q2ERR2XO.js → chunk-MWMYEK3D.js} +1 -1
- package/dist/{chunk-LOKHCWMR.js → chunk-Y6IB6PHW.js} +9 -2
- package/dist/{chunk-6E4FPH4J.js → chunk-YNTER77S.js} +1 -1
- package/dist/cli/index.js +3 -3
- package/dist/{devServer-4RTCJ64B.js → devServer-TUR62GMN.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/renderer/_default.page.server.js +2 -2
- package/package.json +3 -2
|
@@ -15,7 +15,7 @@ function filter(obj, predicate) {
|
|
|
15
15
|
|
|
16
16
|
// src/utils/determineSectionUrlHash.ts
|
|
17
17
|
function determineSectionUrlHash(title) {
|
|
18
|
-
const urlHash = title.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").split(/[^a-z0-9]+/).filter(Boolean).join("-");
|
|
18
|
+
const urlHash = title.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").split(/[^a-z0-9\u4E00-\u9FA5]+/).filter(Boolean).join("-");
|
|
19
19
|
if (urlHash === "")
|
|
20
20
|
return null;
|
|
21
21
|
return urlHash;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
determineSectionUrlHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MWMYEK3D.js";
|
|
4
4
|
import {
|
|
5
5
|
assert
|
|
6
6
|
} from "./chunk-2ZTPUQGS.js";
|
|
@@ -11,6 +11,7 @@ import react from "@vitejs/plugin-react-swc";
|
|
|
11
11
|
import ssr from "vite-plugin-ssr/plugin";
|
|
12
12
|
|
|
13
13
|
// src/markdownHeadingsVitePlugin.ts
|
|
14
|
+
import os from "os";
|
|
14
15
|
function markdownHeadingsVitePlugin() {
|
|
15
16
|
return {
|
|
16
17
|
name: "mdx-headings",
|
|
@@ -99,10 +100,16 @@ function parseTitle(titleMarkdown) {
|
|
|
99
100
|
}).join("");
|
|
100
101
|
return titleHtml;
|
|
101
102
|
function serializeText(text) {
|
|
102
|
-
|
|
103
|
+
let textEscaped = text.split("'").join("\\'");
|
|
104
|
+
if (isWindows()) {
|
|
105
|
+
textEscaped = textEscaped.replace(/\r/, "");
|
|
106
|
+
}
|
|
103
107
|
return `{'${textEscaped}'}`;
|
|
104
108
|
}
|
|
105
109
|
}
|
|
110
|
+
function isWindows() {
|
|
111
|
+
return os.platform() === "win32";
|
|
112
|
+
}
|
|
106
113
|
|
|
107
114
|
// src/vite.config.ts
|
|
108
115
|
import rehypePrettyCode from "rehype-pretty-code";
|
package/dist/cli/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
vite_config_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-Y6IB6PHW.js";
|
|
4
|
+
import "../chunk-MWMYEK3D.js";
|
|
5
5
|
import "../chunk-2ZTPUQGS.js";
|
|
6
6
|
import "../chunk-3QC7HYIF.js";
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ Error.stackTraceLimit = Infinity;
|
|
|
16
16
|
cli();
|
|
17
17
|
async function cli() {
|
|
18
18
|
if (isDev) {
|
|
19
|
-
await import("../devServer-
|
|
19
|
+
await import("../devServer-TUR62GMN.js");
|
|
20
20
|
} else if (isBuild) {
|
|
21
21
|
await build(vite_config_default);
|
|
22
22
|
await build({ ...vite_config_default, build: { ssr: true } });
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isRepoLink,
|
|
5
5
|
parseTitle,
|
|
6
6
|
usePageContext
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YNTER77S.js";
|
|
8
8
|
import {
|
|
9
9
|
FeatureList
|
|
10
10
|
} from "./chunk-NVJING6T.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
filter,
|
|
17
17
|
jsxToTextContent,
|
|
18
18
|
objectAssign
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MWMYEK3D.js";
|
|
20
20
|
import {
|
|
21
21
|
assert,
|
|
22
22
|
assertUsage,
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
getHeadings,
|
|
5
5
|
parseTitle,
|
|
6
6
|
usePageContext
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YNTER77S.js";
|
|
8
8
|
import {
|
|
9
9
|
Emoji,
|
|
10
10
|
jsxToTextContent,
|
|
11
11
|
objectAssign
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-MWMYEK3D.js";
|
|
13
13
|
import {
|
|
14
14
|
assert,
|
|
15
15
|
assertUsage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brillout/docpress",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"exports": {
|
|
5
5
|
"./renderer/_default.page.server.js": "./dist/renderer/_default.page.server.js",
|
|
6
6
|
"./renderer/_default.page.client.js": "./dist/renderer/_default.page.client.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dev": "docpress dev",
|
|
34
34
|
"preview": "docpress build && docpress preview",
|
|
35
35
|
"// Build Docpress": "",
|
|
36
|
-
"build": "
|
|
36
|
+
"build": "rimraf dist/ && framework-builder",
|
|
37
37
|
"// Release": "",
|
|
38
38
|
"release": "release-me patch"
|
|
39
39
|
},
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"docpress": "link:",
|
|
67
67
|
"react": "^18.1.0",
|
|
68
68
|
"react-dom": "^18.1.0",
|
|
69
|
+
"rimraf": "^3.0.2",
|
|
69
70
|
"rollup": "^2.74.1",
|
|
70
71
|
"tsx": "^3.12.1",
|
|
71
72
|
"typescript": "^4.9.4"
|