@wenyan-md/core 1.0.6 → 1.0.8

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.
@@ -4,4 +4,4 @@ export type GzhContent = {
4
4
  content: string;
5
5
  description: string;
6
6
  };
7
- export declare function getGzhContent(content: string, themeId: string, hlThemeId: string, isMacStyle: boolean): Promise<GzhContent>;
7
+ export declare function getGzhContent(content: string, themeId: string, hlThemeId: string, isMacStyle: boolean, isAddFootnote: boolean): Promise<GzhContent>;
package/dist/wrapper.js CHANGED
@@ -1,15 +1,15 @@
1
- import { JSDOM as a } from "jsdom";
2
- import { configureMarked as m, handleFrontMatter as s, renderMarkdown as w, getContentForGzhBuiltinTheme as l } from "./core.js";
3
- async function f(n, e, o, r) {
4
- m();
5
- const t = s(n), c = await w(t.body), d = new a(`<body><section id="wenyan">${c}</section></body>`).window.document.getElementById("wenyan"), i = await l(d, e, o, r);
1
+ import { JSDOM as m } from "jsdom";
2
+ import { configureMarked as s, handleFrontMatter as w, renderMarkdown as l, getContentForGzhBuiltinTheme as u } from "./core.js";
3
+ async function g(n, e, o, r, c) {
4
+ s();
5
+ const t = w(n), d = await l(t.body), i = new m(`<body><section id="wenyan">${d}</section></body>`).window.document.getElementById("wenyan"), a = await u(i, e, o, r, c);
6
6
  return {
7
7
  title: t.title,
8
8
  cover: t.cover,
9
- content: i,
9
+ content: a,
10
10
  description: t.description
11
11
  };
12
12
  }
13
13
  export {
14
- f as getGzhContent
14
+ g as getGzhContent
15
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenyan-md/core",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Core library for Wenyan markdown rendering & publishing",
5
5
  "author": "Lei <caol64@gmail.com> (https://github.com/caol64)",
6
6
  "license": "Apache-2.0",
@@ -17,6 +17,14 @@
17
17
  "files": [
18
18
  "dist"
19
19
  ],
20
+ "homepage": "https://github.com/caol64/wenyan-core#readme",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/caol64/wenyan-core.git"
24
+ },
25
+ "bugs": {
26
+ "url": "https://github.com/caol64/wenyan-core/issues"
27
+ },
20
28
  "exports": {
21
29
  ".": {
22
30
  "import": "./dist/core.js",
@@ -40,7 +48,6 @@
40
48
  }
41
49
  },
42
50
  "devDependencies": {
43
- "@types/css-tree": "^2.3.10",
44
51
  "@types/jsdom": "^21.1.7",
45
52
  "@types/node": "^24.3.0",
46
53
  "ts-lib": "^0.0.5",
@@ -49,20 +56,22 @@
49
56
  "vitest": "^3.2.4"
50
57
  },
51
58
  "dependencies": {
52
- "css-tree": "^3.1.0",
59
+ "css-tree": "3.0.1",
53
60
  "formdata-node": "^6.0.3",
54
61
  "front-matter": "^4.0.2",
55
- "highlight.js": "^11.11.1",
62
+ "highlight.js": "11.10.0",
56
63
  "jsdom": "^26.1.0",
57
64
  "marked": "^15.0.12",
58
65
  "marked-highlight": "^2.2.1",
59
- "mathjax-full": "^3.2.2"
66
+ "mathjax-full": "3.2.2"
60
67
  },
61
68
  "scripts": {
62
69
  "dev": "vite build --watch",
63
70
  "build": "vite build && tsc",
64
71
  "build:browser": "vite build --config vite.config.browser.ts",
65
- "build:all": "pnpm build && pnpm build:browser",
72
+ "build:styles": "vite build --config vite.config.styles.ts",
73
+ "build:math": "vite build --config vite.config.math.ts",
74
+ "build:all": "pnpm build && pnpm build:browser && pnpm build:styles && pnpm build:math",
66
75
  "test:main": "pnpm build && vitest run main.test.js",
67
76
  "test:wrapper": "pnpm build && vitest run wrapper.test.js",
68
77
  "test:publish": "pnpm build && vitest run publish.test.js"