@8btc/ppt-generator-mcp 0.0.7 → 0.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.
- package/dist/generate-ppt-slides.js +2 -2
- package/dist/node-only.js +4 -4
- package/package.json +1 -1
|
@@ -12,8 +12,8 @@ class CanvasBrowser {
|
|
|
12
12
|
return this.el.getContext(ctx);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
if (!
|
|
16
|
-
|
|
15
|
+
if (!globalThis.CanvasImpl) {
|
|
16
|
+
globalThis.CanvasImpl = CanvasBrowser;
|
|
17
17
|
}
|
|
18
18
|
// 生成随机ID的函数
|
|
19
19
|
const nanoid = (length = 10) => {
|
package/dist/node-only.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const { JSDOM } = require("jsdom");
|
|
3
3
|
const dom = new JSDOM("<!DOCTYPE html><html><body></body></html>");
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
globalThis.DOMParser = dom.window.DOMParser;
|
|
5
|
+
globalThis.document = dom.window.document;
|
|
6
|
+
globalThis.NodeFilter = dom.window.NodeFilter;
|
|
7
7
|
const { Canvas } = require("@napi-rs/canvas");
|
|
8
|
-
|
|
8
|
+
globalThis.CanvasImpl = Canvas;
|