@imontene/mdrender 2.1.0 → 2.3.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.
- package/CHANGELOG.md +24 -0
- package/README.md +64 -34
- package/dist/assets/theme.css +18 -2
- package/dist/assets.d.ts +2 -0
- package/dist/assets.js +7 -1
- package/dist/cli.js +12 -2
- package/dist/convert.d.ts +12 -1
- package/dist/convert.js +65 -7
- package/dist/doctor.js +3 -2
- package/dist/markdown/env.d.ts +2 -0
- package/dist/markdown/index.js +2 -0
- package/dist/markdown/keep-with-heading.d.ts +8 -0
- package/dist/markdown/keep-with-heading.js +44 -0
- package/dist/markdown/mermaid.js +3 -1
- package/dist/options.d.ts +10 -0
- package/dist/options.js +8 -0
- package/dist/render/fonts.d.ts +18 -4
- package/dist/render/fonts.js +46 -13
- package/dist/render/header-footer.d.ts +3 -2
- package/dist/render/header-footer.js +5 -5
- package/dist/render/mermaid-fit.d.ts +81 -0
- package/dist/render/mermaid-fit.js +135 -0
- package/dist/render/mermaid.d.ts +42 -8
- package/dist/render/mermaid.js +105 -34
- package/dist/render/template.d.ts +3 -0
- package/dist/render/template.js +1 -1
- package/dist/run.js +6 -0
- package/package.json +6 -3
package/dist/render/template.js
CHANGED
|
@@ -38,7 +38,7 @@ export function buildHtmlDocument(parts) {
|
|
|
38
38
|
const { title, body, math = false, lang, author, layoutCss = [], extraCss = [] } = parts;
|
|
39
39
|
const themeCss = parts.themeCss ?? builtinThemeCss("light");
|
|
40
40
|
const styles = [
|
|
41
|
-
fontFaceCss(),
|
|
41
|
+
fontFaceCss(parts.font),
|
|
42
42
|
...(math ? [katexCss()] : []),
|
|
43
43
|
...themeCss,
|
|
44
44
|
...layoutCss,
|
package/dist/run.js
CHANGED
|
@@ -26,6 +26,12 @@ export async function runJob(job, format, settings, browsers, io) {
|
|
|
26
26
|
}
|
|
27
27
|
if (io.verbose && result.configFile)
|
|
28
28
|
io.err(`config: ${result.configFile}\n`);
|
|
29
|
+
if (io.verbose) {
|
|
30
|
+
for (const note of result.notes) {
|
|
31
|
+
const location = [displayPath(job.input), note.line].filter((p) => p !== undefined);
|
|
32
|
+
io.err(`${location.join(":")}: ${note.message}\n`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
29
35
|
if (!io.quiet)
|
|
30
36
|
io.out(`${result.output}\n`);
|
|
31
37
|
if (io.verbose)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imontene/mdrender",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Command-line app for Windows and Linux that renders Markdown — with LaTeX equations and Mermaid diagrams — to PDF and HTML
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "Command-line app for Windows and Linux that renders Markdown — with LaTeX equations and Mermaid diagrams — to PDF and HTML set in Manrope or Inter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
7
7
|
"pdf",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"latex",
|
|
12
12
|
"cli",
|
|
13
13
|
"inter",
|
|
14
|
+
"manrope",
|
|
14
15
|
"converter"
|
|
15
16
|
],
|
|
16
17
|
"homepage": "https://github.com/imontene/MD_reder#readme",
|
|
@@ -60,10 +61,12 @@
|
|
|
60
61
|
"check": "npm run format:check && npm run lint && npm run typecheck && npm test",
|
|
61
62
|
"build:exe": "npm run build && node scripts/build-sea.mjs",
|
|
62
63
|
"prepublishOnly": "npm run check && npm run build",
|
|
63
|
-
"test:coverage": "vitest run --coverage"
|
|
64
|
+
"test:coverage": "vitest run --coverage",
|
|
65
|
+
"bench:mermaid": "tsx tests/bench/mermaid-autofit.ts"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
66
68
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
69
|
+
"@fontsource/manrope": "^5.3.0",
|
|
67
70
|
"@puppeteer/browsers": "^3.2.3",
|
|
68
71
|
"chokidar": "^5.0.0",
|
|
69
72
|
"commander": "^15.0.0",
|