-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
441 lines (441 loc) · 12.9 KB
/
package.json
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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
{
"publisher": "fujidana",
"name": "spec-data",
"displayName": "spec data",
"description": "spec data file support for VS Code",
"version": "1.5.5",
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Programming Languages",
"Visualization"
],
"keywords": [
"X-ray diffraction",
"synchrotron",
"instrument control",
"data acquisition"
],
"icon": "resources/icon.png",
"license": "SEE LICENSE IN LICENSE",
"bugs": {
"url": "https://github.com/fujidana/vscode-spec-data/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/fujidana/vscode-spec-data.git"
},
"homepage": "https://github.com/fujidana/vscode-spec-data#readme",
"activationEvents": [
"onLanguage:spec-data",
"onLanguage:csv-column",
"onLanguage:csv-row",
"onLanguage:dppmca",
"onLanguage:chiplot",
"onWebviewPanel:spec-data.preview"
],
"main": "./dist/node/extension.js",
"browser": "./dist/web/extension.js",
"contributes": {
"languages": [
{
"id": "spec-data",
"aliases": [
"spec data",
"spec Standard Data Format",
"spec scan"
],
"extensions": [
".spec"
],
"firstLine": "^#F\\s+\\S.*$"
},
{
"id": "csv-column",
"aliases": [
"CSV (numeric columns)"
]
},
{
"id": "csv-row",
"aliases": [
"CSV (numeric rows)"
]
},
{
"id": "dppmca",
"aliases": [
"Amptek MCA",
"DP5 Digital Pulse Processor Multichannel Analyzers"
],
"extensions": [
".mca"
]
},
{
"id": "chiplot",
"aliases": [
"chiplot"
],
"extensions": [
".chi"
],
"firstLine": "^\\S+: (2-theta|Q-Space) Scan$"
}
],
"grammars": [
{
"language": "spec-data",
"scopeName": "source.spec-data",
"path": "./syntaxes/specData.tmLanguage.json"
},
{
"language": "csv-column",
"scopeName": "source.csv",
"path": "./syntaxes/csv.tmLanguage.json"
},
{
"language": "csv-row",
"scopeName": "source.csv",
"path": "./syntaxes/csv.tmLanguage.json"
},
{
"language": "dppmca",
"scopeName": "source.dppmca",
"path": "./syntaxes/dppmca.tmLanguage.json"
},
{
"language": "chiplot",
"scopeName": "source.chiplot",
"path": "./syntaxes/chiplot.tmLanguage.json"
}
],
"commands": [
{
"command": "spec-data.showPreview",
"title": "Open Preview",
"category": "spec data",
"icon": "$(preview)"
},
{
"command": "spec-data.showPreviewToSide",
"title": "Open Preview to the Side",
"category": "spec data",
"icon": "$(open-preview)"
},
{
"command": "spec-data.showLockedPreview",
"title": "Open Locked Preview",
"category": "spec data"
},
{
"command": "spec-data.showLockedPreviewToSide",
"title": "Open Locked Preview to the Side",
"category": "spec data"
},
{
"command": "spec-data.showSource",
"title": "Show Source",
"category": "spec data",
"icon": "$(go-to-file)"
},
{
"command": "spec-data.refreshPreview",
"title": "Refresh Preview",
"category": "spec data",
"icon": "$(refresh)"
},
{
"command": "spec-data.togglePreviewLock",
"title": "Toggle Preview Locking",
"category": "spec data",
"icon": "$(lock)"
}
],
"menus": {
"explorer/context": [
{
"command": "spec-data.showPreview",
"when": "resourceLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/",
"group": "navigation"
},
{
"command": "spec-data.showLockedPreview",
"when": "resourceLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/",
"group": "navigation"
}
],
"editor/title": [
{
"command": "spec-data.showPreviewToSide",
"alt": "spec-data.showPreview",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/",
"group": "navigation"
},
{
"command": "spec-data.showLockedPreviewToSide",
"alt": "spec-data.showLockedPreview",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/",
"group": "2_specdata"
},
{
"command": "spec-data.showSource",
"group": "navigation",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
},
{
"command": "spec-data.refreshPreview",
"group": "2_specdata",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
},
{
"command": "spec-data.togglePreviewLock",
"group": "2_specdata",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
}
],
"editor/title/context": [
{
"command": "spec-data.showPreview",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/",
"group": "3_preview"
}
],
"commandPalette": [
{
"command": "spec-data.showPreview",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/"
},
{
"command": "spec-data.showPreviewToSide",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/"
},
{
"command": "spec-data.showLockedPreview",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/"
},
{
"command": "spec-data.showLockedPreviewToSide",
"when": "editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/"
},
{
"command": "spec-data.showSource",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
},
{
"command": "spec-data.refreshPreview",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
},
{
"command": "spec-data.togglePreviewLock",
"when": "resourceScheme == webview-panel && activeWebviewPanelId == 'spec-data.preview'"
}
]
},
"keybindings": [
{
"command": "spec-data.showPreview",
"key": "ctrl+shift+v",
"mac": "cmd+shift+v",
"when": "!notebookEditorFocused && editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)$/"
},
{
"command": "spec-data.showPreviewToSide",
"key": "ctrl+k v",
"mac": "cmd+k v",
"when": "!notebookEditorFocused && editorLangId =~ /^(spec-data|csv-(row|column)|dppmca|chiplot)/"
}
],
"configuration": {
"title": "spec data",
"properties": {
"spec-data.preview.scrollPreviewWithEditor": {
"type": "boolean",
"default": true,
"description": "Synchronizes page scroll of a preview with that of the corresoinding editor."
},
"spec-data.preview.retainContextWhenHidden": {
"type": "boolean",
"default": false,
"scope": "resource",
"description": "Controls whether preview contents remain in memory when the preview tab is hidden. Enabling this option potentially requires high memory overhead. A change in this option does not affect previews already open."
},
"spec-data.preview.applyContentSecurityPolicy": {
"type": "boolean",
"default": true,
"scope": "resource",
"description": "Applies a content security policy (CSP) to a preview, which enhances security against cross site scripting and data injection attacks caused by malicious source files. One may be able to avoid several Plotly.js errors when the option is disabled. In a future release, a CSP may be always active and this option may be removed."
},
"spec-data.preview.plot.maximumNumberOfPlots": {
"type": "integer",
"default": 25,
"minimum": 0,
"scope": "resource",
"description": "Maximum number of graphs to be drawn when a preview is opened. Drawing a large number of plots requires both long time and vast memory footprint."
},
"spec-data.preview.plot.height": {
"type": "number",
"default": 400,
"minimum": 200,
"scope": "resource",
"description": "Height of the respective graphs."
},
"spec-data.preview.plot.template": {
"type": "object",
"markdownDeprecationMessage": "**Deprecated**: Please use `#spec-data.preview.plot.templates#` instead."
},
"spec-data.preview.plot.templates": {
"type": "object",
"properties": {
"light": {
"type": "object",
"properties": {
"data": {
"type": "array"
},
"layout": {
"type": "object"
}
},
"additionalProperties": false
},
"dark": {
"type": "object",
"properties": {
"data": {
"type": "array"
},
"layout": {
"type": "object"
}
},
"additionalProperties": false
},
"highContrast": {
"type": "object",
"properties": {
"data": {
"type": "array"
},
"layout": {
"type": "object"
}
},
"additionalProperties": false
},
"highContrastLight": {
"type": "object",
"properties": {
"data": {
"type": "array"
},
"layout": {
"type": "object"
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"scope": "resource",
"markdownDescription": "Overrides the built-in plot appearance such as line color. The key of this setting object is either `\"light\"`, `\"dark\"`, `\"highContrast\"`, or `\"highContrastLight\"` and the value is a Plotly.js template object for the color theme the corresponding key represents. See the _Extension Settings_ section in README.md. One can find the complete list of the template attributes in the [Plotly.js Reference](https://plotly.com/javascript/reference/index/) page."
},
"spec-data.preview.table.hide": {
"type": "boolean",
"default": true,
"scope": "resource",
"description": "Hides motor-position tables in a preview when a preview is opened."
},
"spec-data.preview.table.columnsPerLine": {
"type": "number",
"default": 8,
"minimum": 1,
"scope": "resource",
"description": "Maximum column number of motor-potision tables. Overflowed columns are folded in the next row."
},
"spec-data.preview.table.headerType": {
"type": "string",
"default": "Mnemonic",
"enum": [
"Name",
"Mnemonic",
"None"
],
"scope": "resource",
"description": "Header type of data cells of motor-potision tables."
}
}
},
"configurationDefaults": {
"[csv-row]": {
"editor.insertSpaces": false
},
"[csv-column]": {
"editor.insertSpaces": false
},
"[dppmca]": {
"files.encoding": "windows1252"
}
}
},
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": "limited",
"description": "In untrusted workspaces, the content security policy is forcibly applied to the preview and Plotly templates in workspace settings are ignored.",
"restrictedConfigurations": [
"spec-data.preview.plot.templates",
"spec-data.preview.applyContentSecurityPolicy"
]
}
},
"scripts": {
"vscode:prepublish": "pnpm run package && pnpm run js-yaml && pnpm run bundle-plotly",
"compile": "webpack",
"watch": "webpack --watch",
"package": "webpack --mode production --devtool hidden-source-map",
"compile-tests": "tsc -p . --outDir out",
"watch-tests": "tsc -p . -w --outDir out",
"pretest-node": "pnpm run compile-tests && pnpm run compile && pnpm run lint",
"test-node": "vscode-test",
"pretest-web": "pnpm run compile",
"test-web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. --extensionTestsPath=dist/web/test/index.js",
"lint": "eslint src --ext ts",
"run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. .",
"js-yaml:spec-data": "js-yaml ./src/specData.tmLanguage.yaml > ./syntaxes/specData.tmLanguage.json",
"js-yaml:csv": "js-yaml ./src/csv.tmLanguage.yaml > ./syntaxes/csv.tmLanguage.json",
"js-yaml:dppmca": "js-yaml ./src/dppmca.tmLanguage.yaml > ./syntaxes/dppmca.tmLanguage.json",
"js-yaml:chiplot": "js-yaml ./src/chiplot.tmLanguage.yaml > ./syntaxes/chiplot.tmLanguage.json",
"js-yaml": "pnpm run js-yaml:spec-data && pnpm run js-yaml:csv && pnpm run js-yaml:dppmca && pnpm run js-yaml:chiplot",
"bundle-plotly": "npm install --prefix ./dist/preview --no-save plotly.js-basic-dist-min@2.27.1"
},
"devDependencies": {
"@types/assert": "^1.5.10",
"@types/lodash.merge": "^4.6.9",
"@types/minimatch": "^5.1.2",
"@types/mocha": "^10.0.6",
"@types/node": "18.x",
"@types/vscode": "^1.85.0",
"@types/vscode-webview": "^1.57.4",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vscode/test-cli": "^0.0.4",
"@vscode/test-electron": "^2.3.8",
"@vscode/test-web": "^0.0.50",
"assert": "^2.1.0",
"eslint": "^8.56.0",
"js-yaml": "^4.1.0",
"mocha": "^10.2.0",
"process": "^0.11.10",
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4"
},
"dependencies": {
"lodash.merge": "^4.6.2",
"minimatch": "^9.0.3"
}
}