Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
321 lines (321 loc) · 11.6 KB
/
Copy pathpackage.json
File metadata and controls
321 lines (321 loc) · 11.6 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
{
"name": "pdf-preview-next",
"displayName": "vscode-pdf Next by machine-made",
"description": "Fast, secure PDF viewing in VS Code by machine-made: true dark mode, the latest PDF.js (6.4.299) in a real worker thread, live reload for LaTeX/Typst including WSL, search, outline, reliable preview state, and one right-click to open PDFs and Markdown in the pdf-next app.",
"version": "2.6.0",
"packageManager": "bun@1.3.13",
"publisher": "RicardoFrantz",
"author": {
"name": "machine-made"
},
"license": "MIT",
"engines": {
"vscode": "^1.95.0",
"node": ">=22"
},
"categories": [
"Visualization"
],
"keywords": [
"pdf",
"vscode-pdf",
"viewer",
"preview",
"pdf-viewer",
"pdf-preview",
"pdf-reader",
"pdfjs",
"latex",
"typst",
"dark-mode",
"dark mode",
"night mode",
"dark theme",
"markdown",
"pdf-next"
],
"icon": "icon.png",
"galleryBanner": {
"color": "#1e2227",
"theme": "dark"
},
"repository": {
"type": "git",
"url": "https://github.com/machine-made/vscode-pdf-next.git"
},
"bugs": {
"url": "https://github.com/machine-made/vscode-pdf-next/issues"
},
"capabilities": {
"untrustedWorkspaces": {
"supported": true
}
},
"main": "./dist/extension.js",
"contributes": {
"customEditors": [
{
"viewType": "pdf-preview-next.preview",
"displayName": "vscode-pdf Next",
"selector": [
{
"filenamePattern": "*.pdf"
}
]
}
],
"commands": [
{
"command": "pdf-preview.openPreview",
"title": "vscode-pdf Next: Open Preview"
},
{
"command": "pdf-preview.openSource",
"title": "vscode-pdf Next: Open Externally"
},
{
"command": "pdf-preview.refreshPreview",
"title": "vscode-pdf Next: Refresh Preview"
},
{
"command": "pdf-preview.print",
"title": "vscode-pdf Next: Open in System Viewer for Printing"
},
{
"command": "pdf-preview.printDirect",
"title": "vscode-pdf Next: Print Directly to Default Printer"
},
{
"command": "pdf-preview.clearPageMode",
"title": "vscode-pdf Next: Clear Page Mode (Plain White Pages)"
},
{
"command": "pdf-preview.resetViewState",
"title": "vscode-pdf Next: Reset View State"
},
{
"command": "pdf-preview.openInPdfNext",
"title": "Open in pdf-next",
"category": "vscode-pdf Next",
"icon": "$(link-external)"
}
],
"configuration": {
"type": "object",
"title": "PDF Preview",
"properties": {
"pdf-preview.default.cursor": {
"markdownDescription": "The default cursor tool for preview.",
"type": "string",
"scope": "resource",
"default": "select",
"enum": [
"select",
"hand"
]
},
"pdf-preview.default.scale": {
"markdownDescription": "The default zoom level for preview. Allowed values are `auto`, `page-actual`, `page-fit`, `page-width`, and 1-based scale values. (`1.0` means 100%)",
"type": "string",
"scope": "resource",
"default": "auto",
"pattern": "^(\\d+(?:\\.\\d+)?|auto|page-actual|page-fit|page-width)$"
},
"pdf-preview.default.sidebar": {
"markdownDescription": "Open the PDF sidebar by default when the active sidebar panel is available.",
"type": "boolean",
"scope": "resource",
"default": false
},
"pdf-preview.default.sidebarPanel": {
"markdownDescription": "The sidebar panel to show when the PDF sidebar opens. `pdf-preview.default.sidebar` still controls whether the sidebar opens by default.",
"type": "string",
"scope": "resource",
"default": "outline",
"enum": [
"outline",
"thumbnails"
]
},
"pdf-preview.default.scrollMode": {
"markdownDescription": "The default scroll mode for preview.",
"type": "string",
"scope": "resource",
"default": "vertical",
"enum": [
"vertical",
"horizontal",
"wrapped"
]
},
"pdf-preview.default.spreadMode": {
"markdownDescription": "The default spread mode for preview.",
"type": "string",
"scope": "resource",
"default": "none",
"enum": [
"none",
"odd",
"even"
]
},
"pdf-preview.reload.closeOnDelete": {
"markdownDescription": "Close the preview when the opened PDF is deleted. Disable this for TeX-style build workflows that temporarily delete and recreate the PDF.",
"type": "boolean",
"default": false
},
"pdf-preview.reload.automatic": {
"markdownDescription": "Automatically refresh the preview when the PDF file changes. Manual reload always works through the toolbar button, the `pdf-preview.refreshPreview` command, and Cmd/Ctrl+R.",
"type": "boolean",
"default": true
},
"pdf-preview.reload.debounceMs": {
"markdownDescription": "Milliseconds to wait after PDF file change notifications before refreshing the preview. Increase this if your build tool writes PDFs in multiple bursts.",
"type": "number",
"default": 800,
"minimum": 0,
"maximum": 10000
},
"pdf-preview.appearance.theme": {
"markdownDescription": "Preview appearance. `auto` follows VS Code colors for viewer chrome and leaves pages plain white, `dark` uses dark viewer chrome while leaving PDF pages unchanged, `night` asks PDF.js to recolor rendered PDF pages for lower-eye-strain reading, `sepia` (formerly `reader`, which still works) renders pages with a warm e-reader palette, `dark-pages` is a compatibility alias for `night`, and `inverted` applies full-page CSS inversion as a fallback for scanned or image-heavy PDFs. The toolbar button cycles Clear, Night, Invert and Sepia, so plain white pages are always one press away; Shift+click or right-click it, or run **vscode-pdf Next: Clear Page Mode**, to jump straight back to Clear.",
"type": "string",
"scope": "resource",
"default": "auto",
"enum": [
"auto",
"light",
"dark",
"night",
"reader",
"sepia",
"dark-pages",
"inverted"
]
},
"pdf-preview.appearance.pageGap": {
"markdownDescription": "Spacing between rendered PDF pages.",
"type": "string",
"scope": "resource",
"default": "normal",
"enum": [
"compact",
"normal",
"wide"
]
},
"pdf-preview.copy.autoCopySelection": {
"markdownDescription": "Automatically copy selected PDF text to the clipboard when the mouse button is released. Disabled by default because it writes to the clipboard without an explicit copy command.",
"type": "boolean",
"scope": "resource",
"default": false
},
"pdf-preview.printCommand": {
"markdownDescription": "Custom command line used only by `vscode-pdf Next: Print Directly to Default Printer`. Use `{{file}}` as a placeholder for the PDF path; when omitted, the path is appended as the last argument. The command is executed without a shell. When empty, direct printing tries the default CUPS printer, then falls back to the system viewer.",
"type": "string",
"scope": "resource",
"default": "",
"restricted": true
},
"pdf-preview.pdfNext.path": {
"markdownDescription": "Path to the [pdf-next](https://github.com/machine-made/pdf-next) app used by **Open in pdf-next**. Leave empty to find it on `PATH` and in the usual install folders. On macOS you can give the `.app` bundle.",
"type": "string",
"scope": "machine",
"default": "",
"restricted": true
},
"pdf-preview.pdfNext.saveBeforeOpen": {
"markdownDescription": "Save an edited file before **Open in pdf-next** opens it, because pdf-next reads the file on disk.",
"type": "boolean",
"scope": "resource",
"default": true
},
"pdf-preview.pdfNext.showInTitleBar": {
"markdownDescription": "Show the **Open in pdf-next** button in the title bar of the PDF preview.",
"type": "boolean",
"default": true
},
"pdf-preview.pdfNext.showInMarkdownTitleBar": {
"markdownDescription": "Show the **Open in pdf-next** button in the title bar of Markdown editors. The command is always on the right-click menus.",
"type": "boolean",
"default": false
}
}
},
"menus": {
"explorer/context": [
{
"command": "pdf-preview.openInPdfNext",
"when": "!explorerResourceIsFolder && resourceExtname =~ /^\\.(pdf|md|markdown|png|jpe?g|webp|avif|gif|bmp)$/i",
"group": "navigation@20"
}
],
"editor/title/context": [
{
"command": "pdf-preview.openInPdfNext",
"when": "resourceExtname =~ /^\\.(pdf|md|markdown|png|jpe?g|webp|avif|gif|bmp)$/i",
"group": "1_open@20"
}
],
"editor/title": [
{
"command": "pdf-preview.openInPdfNext",
"when": "activeCustomEditorId == pdf-preview-next.preview && config.pdf-preview.pdfNext.showInTitleBar",
"group": "navigation@20"
},
{
"command": "pdf-preview.openInPdfNext",
"when": "resourceLangId == markdown && config.pdf-preview.pdfNext.showInMarkdownTitleBar",
"group": "navigation@20"
}
],
"commandPalette": [
{
"command": "pdf-preview.openInPdfNext",
"when": "resourceExtname =~ /^\\.(pdf|md|markdown|png|jpe?g|webp|avif|gif|bmp)$/i"
}
]
}
},
"scripts": {
"vscode:prepublish": "node ./esbuild.config.mjs --production",
"compile": "tsc -p ./",
"bundle": "node ./esbuild.config.mjs",
"typecheck": "tsc --noEmit -p ./",
"watch": "node ./tools/watch_build.mjs",
"watch:tsc": "tsc -w -p ./",
"watch:bundle": "node ./esbuild.config.mjs --watch",
"pretest": "bun run bundle && bun run test:compat",
"test": "node ./out/src/test/runTest.js",
"test:compat": "bun run compile && node ./tools/check_pdfjs_runtime_compat.mjs",
"test:perf": "bun run compile && node ./tools/make_perf_pdf.mjs .work/perf/perf-40pages.pdf && node ./tools/perf_scroll_probe.mjs --assert",
"lint": "eslint ./src",
"format": "prettier --write \"src/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\"",
"update:pdfjs": "node ./tools/update_pdfjs.mjs",
"package": "vsce package --no-dependencies",
"package:scan": "node ./tools/scan_vsix.mjs",
"package:scan:test": "node ./tools/test_scan_vsix.mjs"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
"@types/node": "^22.20.5",
"@types/vscode": "^1.95.0",
"@typescript-eslint/eslint-plugin": "^8.72.1",
"@typescript-eslint/parser": "^8.72.1",
"@vscode/test-electron": "3.1.0",
"@vscode/vsce": "3.9.2",
"esbuild": "0.28.2",
"eslint": "^9.39.5",
"globals": "^15.15.0",
"ovsx": "1.3.0",
"playwright-core": "1.63.0",
"prettier": "^3.9.10",
"typescript": "^5.9.3"
},
"overrides": {
"tmp": "0.2.6"
},
"extensionKind": [
"ui"
]
}