@chenchaolong/plugin-mineru-chen 1.0.2 → 1.0.4
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/index.d.ts.map +1 -1
- package/dist/index.js +5 -8
- package/dist/lib/parse.tool.d.ts +8 -8
- package/dist/lib/types.d.ts +1 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/types.js +6 -7
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AACvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,QAAA,MAAM,YAAY,gDAAe,CAAA;AAEjC,QAAA,MAAM,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CA4BrD,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { readFileSync } from 'fs';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
|
-
import { dirname, join } from 'path';
|
|
4
1
|
import { z } from 'zod';
|
|
5
2
|
import { MinerUPlugin } from './lib/plugin.js';
|
|
6
3
|
import { icon } from './lib/types.js';
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
const
|
|
4
|
+
// Package metadata (embedded directly to avoid ESM/CJS file reading issues)
|
|
5
|
+
const packageName = '@chenchaolong/plugin-mineru-chen';
|
|
6
|
+
const packageVersion = '1.0.3';
|
|
10
7
|
const ConfigSchema = z.object({});
|
|
11
8
|
const plugin = {
|
|
12
9
|
meta: {
|
|
13
|
-
name:
|
|
14
|
-
version:
|
|
10
|
+
name: packageName,
|
|
11
|
+
version: packageVersion,
|
|
15
12
|
category: 'tools',
|
|
16
13
|
icon: {
|
|
17
14
|
type: 'svg',
|
package/dist/lib/parse.tool.d.ts
CHANGED
|
@@ -19,45 +19,45 @@ export declare function buildParseFileTool(credentials: Credentials): import("@l
|
|
|
19
19
|
filePath?: string;
|
|
20
20
|
fileUrl?: string;
|
|
21
21
|
file?: any;
|
|
22
|
-
content?: string |
|
|
22
|
+
content?: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBuffer>;
|
|
23
23
|
enable_formula?: boolean;
|
|
24
24
|
enable_table?: boolean;
|
|
25
25
|
language?: string;
|
|
26
26
|
enable_ocr?: boolean;
|
|
27
27
|
extra_formats?: string;
|
|
28
|
-
model_version?: "
|
|
28
|
+
model_version?: "pipeline" | "vlm";
|
|
29
29
|
}, {
|
|
30
30
|
filePath?: string;
|
|
31
31
|
fileUrl?: string;
|
|
32
32
|
file?: any;
|
|
33
|
-
content?: string |
|
|
33
|
+
content?: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBuffer>;
|
|
34
34
|
enable_formula?: boolean;
|
|
35
35
|
enable_table?: boolean;
|
|
36
36
|
language?: string;
|
|
37
37
|
enable_ocr?: boolean;
|
|
38
38
|
extra_formats?: string;
|
|
39
|
-
model_version?: "
|
|
39
|
+
model_version?: "pipeline" | "vlm";
|
|
40
40
|
}>, {
|
|
41
41
|
filePath?: string;
|
|
42
42
|
fileUrl?: string;
|
|
43
43
|
file?: any;
|
|
44
|
-
content?: string |
|
|
44
|
+
content?: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBuffer>;
|
|
45
45
|
enable_formula?: boolean;
|
|
46
46
|
enable_table?: boolean;
|
|
47
47
|
language?: string;
|
|
48
48
|
enable_ocr?: boolean;
|
|
49
49
|
extra_formats?: string;
|
|
50
|
-
model_version?: "
|
|
50
|
+
model_version?: "pipeline" | "vlm";
|
|
51
51
|
}, {
|
|
52
52
|
filePath?: string;
|
|
53
53
|
fileUrl?: string;
|
|
54
54
|
file?: any;
|
|
55
|
-
content?: string |
|
|
55
|
+
content?: string | Buffer<ArrayBufferLike> | Uint8Array<ArrayBuffer>;
|
|
56
56
|
enable_formula?: boolean;
|
|
57
57
|
enable_table?: boolean;
|
|
58
58
|
language?: string;
|
|
59
59
|
enable_ocr?: boolean;
|
|
60
60
|
extra_formats?: string;
|
|
61
|
-
model_version?: "
|
|
61
|
+
model_version?: "pipeline" | "vlm";
|
|
62
62
|
}, any[]>;
|
|
63
63
|
//# sourceMappingURL=parse.tool.d.ts.map
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const MinerU = "mineru";
|
|
2
|
-
export declare const icon
|
|
2
|
+
export declare const icon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <rect x=\"4\" y=\"4\" width=\"16\" height=\"20\" rx=\"2\" fill=\"#4a90e2\"/>\n <path d=\"M7 8h10M7 12h10M7 16h6\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n <circle cx=\"17\" cy=\"7\" r=\"2\" fill=\"#ffd700\"/>\n</svg>";
|
|
3
3
|
export declare const SUPPORTED_EXTENSIONS: string[];
|
|
4
4
|
export declare const SUPPORTED_IMAGE_EXTENSIONS: string[];
|
|
5
5
|
export declare const MAX_RETRIES = 50;
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,MAAM,WAAW,CAAA;AAG9B,eAAO,MAAM,IAAI,2UAIV,CAAA;AAGP,eAAO,MAAM,oBAAoB,UAAsE,CAAA;AAGvG,eAAO,MAAM,0BAA0B,UAA4B,CAAA;AAGnE,eAAO,MAAM,WAAW,KAAK,CAAA;AAG7B,eAAO,MAAM,eAAe,uBAAuB,CAAA;AACnD,eAAO,MAAM,YAAY,uZAAuZ,CAAA;AAGhb,eAAO,MAAM,mBAAmB,EAAE,WAGjC,CAAA;AAGD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAGD,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;IACvC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAGD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
package/dist/lib/types.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { readFileSync } from 'fs';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
|
-
import { dirname, join } from 'path';
|
|
4
1
|
// MinerU plugin identifier
|
|
5
2
|
export const MinerU = 'mineru';
|
|
6
|
-
// SVG icon for mineru plugin (
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
// Simple SVG icon for mineru plugin (embedded directly to avoid ESM/CJS issues)
|
|
4
|
+
export const icon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
|
|
5
|
+
<rect x="4" y="4" width="16" height="20" rx="2" fill="#4a90e2"/>
|
|
6
|
+
<path d="M7 8h10M7 12h10M7 16h6" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
7
|
+
<circle cx="17" cy="7" r="2" fill="#ffd700"/>
|
|
8
|
+
</svg>`;
|
|
10
9
|
// Supported file extensions
|
|
11
10
|
export const SUPPORTED_EXTENSIONS = ['.pdf', '.doc', '.docx', '.ppt', '.pptx', '.png', '.jpg', '.jpeg'];
|
|
12
11
|
// Supported image extensions
|