-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
190 lines (190 loc) · 6.68 KB
/
Copy pathpackage.json
File metadata and controls
190 lines (190 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
{
"name": "inleaf-reader",
"displayName": "Inleaf Reader",
"description": "Stay in flow while reading PDFs in VS Code, with portable AI-ready notes and your choice of AI tools.",
"version": "0.0.10",
"publisher": "ziming",
"icon": "assets/inleaf-reader-icon.png",
"license": "Apache-2.0",
"preview": true,
"repository": {
"type": "git",
"url": "https://github.com/WORMMMMMM/inleaf-reader.git"
},
"homepage": "https://github.com/WORMMMMMM/inleaf-reader#readme",
"bugs": {
"url": "https://github.com/WORMMMMMM/inleaf-reader/issues"
},
"keywords": [
"pdf",
"paper",
"reader",
"annotation",
"translation",
"wordbook",
"focus",
"flow",
"book",
"offline",
"local-first",
"ai",
"ai-ready"
],
"engines": {
"vscode": "^1.90.0"
},
"categories": [
"Education",
"Other"
],
"activationEvents": [
"onCommand:inleafReader.openReader",
"onCommand:inleafReader.setDeepSeekApiKey",
"onCommand:inleafReader.clearDeepSeekApiKey",
"onCommand:inleafReader.diagnoseTranslation"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "inleafReader.openReader",
"title": "Inleaf Reader: Open Paper Reader",
"icon": {
"light": "assets/inleaf-reader-toolbar-light.svg",
"dark": "assets/inleaf-reader-toolbar-dark.svg"
}
},
{
"command": "inleafReader.setDeepSeekApiKey",
"title": "Inleaf Reader: Set DeepSeek API Key"
},
{
"command": "inleafReader.clearDeepSeekApiKey",
"title": "Inleaf Reader: Clear DeepSeek API Key"
},
{
"command": "inleafReader.diagnoseTranslation",
"title": "Inleaf Reader: Diagnose Translation Setup"
}
],
"menus": {
"explorer/context": [
{
"command": "inleafReader.openReader",
"when": "resourceExtname == .pdf",
"group": "navigation@20"
}
],
"editor/title": [
{
"command": "inleafReader.openReader",
"when": "resourceExtname == .pdf",
"group": "navigation@20"
}
]
},
"walkthroughs": [
{
"id": "inleafReader.gettingStarted",
"title": "Get started with Inleaf Reader",
"description": "Open a PDF, capture a selection, and choose a translation mode.",
"steps": [
{
"id": "openPdf",
"title": "Open a PDF in the reader",
"description": "Run [Open Paper Reader](command:inleafReader.openReader), or right-click a PDF in the Explorer."
},
{
"id": "selectText",
"title": "Select and annotate",
"description": "Select text in a real-text PDF, then highlight, underline, add a note, translate, or save a word."
},
{
"id": "translation",
"title": "Check translation setup",
"description": "The dictionary works offline. Run [Diagnose Translation Setup](command:inleafReader.diagnoseTranslation) before using Argos sentence translation."
}
]
}
],
"configuration": {
"title": "Inleaf Reader",
"properties": {
"inleafReader.libreTranslateEndpoint": {
"type": "string",
"default": "http://localhost:5000/translate",
"description": "Local LibreTranslate endpoint used by the in-panel translation button."
},
"inleafReader.translationProvider": {
"type": "string",
"default": "argos",
"enum": [
"argos",
"libretranslate",
"deepseek"
],
"description": "Translation provider. Argos and LibreTranslate can run locally; DeepSeek uses the configured API key from VS Code SecretStorage."
},
"inleafReader.deepSeekModel": {
"type": "string",
"default": "deepseek-v4-flash",
"enum": [
"deepseek-v4-flash",
"deepseek-v4-pro"
],
"description": "DeepSeek model used when the translation provider is DeepSeek."
},
"inleafReader.argosPythonPath": {
"type": "string",
"default": "",
"description": "Optional Python path for local Argos Translate. Empty means .venv-translate/bin/python inside the extension folder."
},
"inleafReader.translationFallbackToLibreTranslate": {
"type": "boolean",
"default": false,
"description": "When Argos local translation fails, fall back to the configured LibreTranslate endpoint."
},
"inleafReader.translationSource": {
"type": "string",
"default": "auto",
"description": "Source language code used by translation providers that require it."
},
"inleafReader.translationTarget": {
"type": "string",
"default": "zh",
"description": "Target language code used by the selected translation provider."
}
}
}
},
"scripts": {
"build:webview": "vite build --config vite.webview.config.ts",
"copy:pdfjs-assets": "node scripts/copy_pdfjs_assets.mjs",
"build:extension": "tsc -p ./ && esbuild src/extension.ts --bundle --platform=node --format=cjs --external:vscode --outfile=out/extension.js --sourcemap && esbuild src/ecdictWorker.ts --bundle --platform=node --format=cjs --outfile=out/ecdictWorker.js --sourcemap",
"compile": "npm run copy:pdfjs-assets && npm run build:webview && npm run build:extension",
"test:unit": "node scripts/test-annotation-exports.mjs && node scripts/test-pdf-identity.mjs && node scripts/test-reader-storage.mjs && node scripts/test-ecdict-worker.mjs && node scripts/test-webview-worker.mjs && node scripts/test-webview-resilience.mjs && node scripts/test-inline-annotation-editor.mjs && node scripts/test-command-icon.mjs",
"typecheck": "tsc -p ./ --noEmit && tsc -p tsconfig.webview.json --noEmit",
"check": "npm run compile && npm run test:unit && npm run typecheck && node --check media/reader-app.js",
"test": "npm run check",
"package:vsix": "npm run compile && npx --yes @vscode/vsce package",
"watch": "tsc -watch -p ./",
"watch:webview": "vite build --watch --config vite.webview.config.ts"
},
"devDependencies": {
"@types/node": "^20.14.0",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@types/vscode": "^1.90.0",
"esbuild": "^0.28.1",
"typescript": "^5.4.5"
},
"dependencies": {
"@vitejs/plugin-react": "^6.0.2",
"pdf-lib": "^1.17.1",
"pdfjs-dist": "^4.10.38",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-pdf-highlighter-plus": "^1.1.4",
"vite": "^8.0.16"
}
}