@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.
@@ -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;AAIvD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAYvB,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"}
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
- const __filename = fileURLToPath(import.meta.url);
8
- const dir_name = dirname(__filename);
9
- const packageJson = JSON.parse(readFileSync(join(dir_name, '../package.json'), 'utf8'));
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: packageJson.name,
14
- version: packageJson.version,
10
+ name: packageName,
11
+ version: packageVersion,
15
12
  category: 'tools',
16
13
  icon: {
17
14
  type: 'svg',
@@ -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 | Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>;
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?: "vlm" | "pipeline";
28
+ model_version?: "pipeline" | "vlm";
29
29
  }, {
30
30
  filePath?: string;
31
31
  fileUrl?: string;
32
32
  file?: any;
33
- content?: string | Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>;
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?: "vlm" | "pipeline";
39
+ model_version?: "pipeline" | "vlm";
40
40
  }>, {
41
41
  filePath?: string;
42
42
  fileUrl?: string;
43
43
  file?: any;
44
- content?: string | Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>;
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?: "vlm" | "pipeline";
50
+ model_version?: "pipeline" | "vlm";
51
51
  }, {
52
52
  filePath?: string;
53
53
  fileUrl?: string;
54
54
  file?: any;
55
- content?: string | Uint8Array<ArrayBuffer> | Buffer<ArrayBufferLike>;
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?: "vlm" | "pipeline";
61
+ model_version?: "pipeline" | "vlm";
62
62
  }, any[]>;
63
63
  //# sourceMappingURL=parse.tool.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export declare const MinerU = "mineru";
2
- export declare const icon: string;
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;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM,WAAW,CAAA;AAK9B,eAAO,MAAM,IAAI,QAA+D,CAAA;AAGhF,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,EAA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AE,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 (loaded from _assets/icon.svg)
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
- export const icon = readFileSync(join(__dirname, '../_assets/icon.svg'), 'utf8');
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chenchaolong/plugin-mineru-chen",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",