@speajus/markdown-to-pdf 1.0.21 → 1.0.23

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.
@@ -6,6 +6,10 @@ const defaults_js_1 = require("./defaults.js");
6
6
  let mermaidModule = null;
7
7
  async function loadMermaid() {
8
8
  if (!mermaidModule) {
9
+ const win = ('window' in globalThis) ? globalThis.window : (globalThis.window = globalThis);
10
+ if (!('DOMPurify' in win)) {
11
+ win.DOMPurify = await import("isomorphic-dompurify");
12
+ }
9
13
  mermaidModule = await import('@speajus/mermaid-to-svg');
10
14
  }
11
15
  return mermaidModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speajus/markdown-to-pdf",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "A new project created with Intent by Augment.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -52,7 +52,8 @@
52
52
  "type": "commonjs",
53
53
  "dependencies": {
54
54
  "@resvg/resvg-js": "^2.6.2",
55
- "@speajus/mermaid-to-svg": "^0.1.5",
55
+ "@speajus/mermaid-to-svg": "^0.1.6",
56
+ "isomorphic-dompurify": "^3.3.0",
56
57
  "marked": "^17.0.2",
57
58
  "pdfkit": "github:jspears/pdfkit#support-color-emoji-google",
58
59
  "prismjs": "^1.30.0"