@hypothesi/tauri-mcp-server 0.8.0 → 0.8.1
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.
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* html2canvas library loader
|
|
2
|
+
* html2canvas-pro library loader
|
|
3
3
|
*
|
|
4
|
-
* Loads the html2canvas library from node_modules and provides it as a string
|
|
5
|
-
* that can be injected into the webview.
|
|
4
|
+
* Loads the html2canvas-pro library from node_modules and provides it as a string
|
|
5
|
+
* that can be injected into the webview. html2canvas-pro is a fork of html2canvas
|
|
6
|
+
* that adds support for modern CSS color functions like oklch(), oklab(), lab(),
|
|
7
|
+
* lch(), and color().
|
|
6
8
|
*/
|
|
7
9
|
import { readFileSync } from 'fs';
|
|
8
10
|
import { createRequire } from 'module';
|
|
9
|
-
// Use createRequire to resolve the path to html2canvas in node_modules
|
|
11
|
+
// Use createRequire to resolve the path to html2canvas-pro in node_modules
|
|
10
12
|
const require = createRequire(import.meta.url);
|
|
11
|
-
let
|
|
13
|
+
let html2canvasProSource = null;
|
|
12
14
|
/** Script ID used for the html2canvas library in the script registry. */
|
|
13
15
|
export const HTML2CANVAS_SCRIPT_ID = '__mcp_html2canvas__';
|
|
14
16
|
/**
|
|
15
|
-
* Get the html2canvas library source code.
|
|
17
|
+
* Get the html2canvas-pro library source code.
|
|
16
18
|
* Loaded lazily and cached.
|
|
17
19
|
*/
|
|
18
20
|
export function getHtml2CanvasSource() {
|
|
19
|
-
if (
|
|
20
|
-
// Resolve the path to html2canvas.
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
if (html2canvasProSource === null) {
|
|
22
|
+
// Resolve the path to html2canvas-pro.js (UMD build)
|
|
23
|
+
// Note: We use the main entry point since the minified version isn't exported
|
|
24
|
+
const html2canvasProPath = require.resolve('html2canvas-pro');
|
|
25
|
+
html2canvasProSource = readFileSync(html2canvasProPath, 'utf-8');
|
|
23
26
|
}
|
|
24
|
-
return
|
|
27
|
+
return html2canvasProSource;
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
30
|
* Build a script that captures a screenshot using html2canvas.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypothesi/tauri-mcp-server",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"mcpName": "io.github.hypothesi/mcp-server-tauri",
|
|
5
5
|
"description": "A Model Context Protocol server for use with Tauri v2 applications",
|
|
6
6
|
"type": "module",
|
|
@@ -49,13 +49,12 @@
|
|
|
49
49
|
"@modelcontextprotocol/sdk": "0.6.1",
|
|
50
50
|
"aria-api": "0.8.0",
|
|
51
51
|
"execa": "9.6.0",
|
|
52
|
-
"html2canvas": "1.
|
|
52
|
+
"html2canvas-pro": "1.6.6",
|
|
53
53
|
"ws": "8.18.3",
|
|
54
54
|
"zod": "3.25.76",
|
|
55
55
|
"zod-to-json-schema": "3.25.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/html2canvas": "0.5.35",
|
|
59
58
|
"@types/node": "22.19.1",
|
|
60
59
|
"@types/ws": "8.18.1",
|
|
61
60
|
"esbuild": "0.25.12",
|