docrev 0.9.11 → 0.9.14
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/.claude/settings.local.json +9 -9
- package/.gitattributes +1 -1
- package/CHANGELOG.md +149 -149
- package/PLAN-tables-and-postprocess.md +850 -850
- package/README.md +391 -391
- package/bin/rev.js +11 -11
- package/bin/rev.ts +145 -145
- package/completions/rev.bash +127 -127
- package/completions/rev.ps1 +210 -210
- package/completions/rev.zsh +207 -207
- package/dev_notes/stress2/build_adversarial.ts +186 -186
- package/dev_notes/stress2/drift_matcher.ts +62 -62
- package/dev_notes/stress2/probe_anchors.ts +35 -35
- package/dev_notes/stress2/project/discussion.before.md +3 -3
- package/dev_notes/stress2/project/discussion.md +3 -3
- package/dev_notes/stress2/project/methods.before.md +20 -20
- package/dev_notes/stress2/project/methods.md +20 -20
- package/dev_notes/stress2/project/rev.yaml +5 -5
- package/dev_notes/stress2/project/sections.yaml +4 -4
- package/dev_notes/stress2/sections.yaml +5 -5
- package/dev_notes/stress2/trace_placement.ts +50 -50
- package/dev_notes/stresstest_boundaries.ts +27 -27
- package/dev_notes/stresstest_drift_apply.ts +43 -43
- package/dev_notes/stresstest_drift_compare.ts +43 -43
- package/dev_notes/stresstest_drift_v2.ts +54 -54
- package/dev_notes/stresstest_inspect.ts +54 -54
- package/dev_notes/stresstest_pstyle.ts +55 -55
- package/dev_notes/stresstest_section_debug.ts +23 -23
- package/dev_notes/stresstest_split.ts +70 -70
- package/dev_notes/stresstest_trace.ts +19 -19
- package/dev_notes/stresstest_verify_no_overwrite.ts +40 -40
- package/dist/lib/build.d.ts +50 -1
- package/dist/lib/build.d.ts.map +1 -1
- package/dist/lib/build.js +80 -30
- package/dist/lib/build.js.map +1 -1
- package/dist/lib/commands/build.d.ts.map +1 -1
- package/dist/lib/commands/build.js +38 -5
- package/dist/lib/commands/build.js.map +1 -1
- package/dist/lib/commands/utilities.js +164 -164
- package/dist/lib/commands/word-tools.js +8 -8
- package/dist/lib/grammar.js +3 -3
- package/dist/lib/import.d.ts.map +1 -1
- package/dist/lib/import.js +146 -24
- package/dist/lib/import.js.map +1 -1
- package/dist/lib/pdf-comments.js +44 -44
- package/dist/lib/plugins.js +57 -57
- package/dist/lib/pptx-themes.js +115 -115
- package/dist/lib/spelling.js +2 -2
- package/dist/lib/templates.js +387 -387
- package/dist/lib/themes.js +51 -51
- package/dist/lib/types.d.ts +20 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/word-extraction.d.ts +6 -0
- package/dist/lib/word-extraction.d.ts.map +1 -1
- package/dist/lib/word-extraction.js +46 -3
- package/dist/lib/word-extraction.js.map +1 -1
- package/dist/lib/wordcomments.d.ts.map +1 -1
- package/dist/lib/wordcomments.js +23 -5
- package/dist/lib/wordcomments.js.map +1 -1
- package/eslint.config.js +27 -27
- package/lib/anchor-match.ts +276 -276
- package/lib/annotations.ts +644 -644
- package/lib/build.ts +1300 -1227
- package/lib/citations.ts +160 -160
- package/lib/commands/build.ts +833 -801
- package/lib/commands/citations.ts +515 -515
- package/lib/commands/comments.ts +1050 -1050
- package/lib/commands/context.ts +174 -174
- package/lib/commands/core.ts +309 -309
- package/lib/commands/doi.ts +435 -435
- package/lib/commands/file-ops.ts +372 -372
- package/lib/commands/history.ts +320 -320
- package/lib/commands/index.ts +87 -87
- package/lib/commands/init.ts +259 -259
- package/lib/commands/merge-resolve.ts +378 -378
- package/lib/commands/preview.ts +178 -178
- package/lib/commands/project-info.ts +244 -244
- package/lib/commands/quality.ts +517 -517
- package/lib/commands/response.ts +454 -454
- package/lib/commands/section-boundaries.ts +82 -82
- package/lib/commands/sections.ts +451 -451
- package/lib/commands/sync.ts +706 -706
- package/lib/commands/text-ops.ts +449 -449
- package/lib/commands/utilities.ts +448 -448
- package/lib/commands/verify-anchors.ts +272 -272
- package/lib/commands/word-tools.ts +340 -340
- package/lib/comment-realign.ts +517 -517
- package/lib/config.ts +84 -84
- package/lib/crossref.ts +781 -781
- package/lib/csl.ts +191 -191
- package/lib/dependencies.ts +98 -98
- package/lib/diff-engine.ts +465 -465
- package/lib/doi-cache.ts +115 -115
- package/lib/doi.ts +897 -897
- package/lib/equations.ts +506 -506
- package/lib/errors.ts +346 -346
- package/lib/format.ts +541 -541
- package/lib/git.ts +326 -326
- package/lib/grammar.ts +303 -303
- package/lib/image-registry.ts +180 -180
- package/lib/import.ts +911 -792
- package/lib/journals.ts +543 -543
- package/lib/merge.ts +633 -633
- package/lib/orcid.ts +144 -144
- package/lib/pdf-comments.ts +263 -263
- package/lib/pdf-import.ts +524 -524
- package/lib/plugins.ts +362 -362
- package/lib/postprocess.ts +188 -188
- package/lib/pptx-color-filter.lua +37 -37
- package/lib/pptx-template.ts +469 -469
- package/lib/pptx-themes.ts +483 -483
- package/lib/protect-restore.ts +520 -520
- package/lib/rate-limiter.ts +94 -94
- package/lib/response.ts +197 -197
- package/lib/restore-references.ts +240 -240
- package/lib/review.ts +327 -327
- package/lib/schema.ts +417 -417
- package/lib/scientific-words.ts +73 -73
- package/lib/sections.ts +335 -335
- package/lib/slides.ts +756 -756
- package/lib/spelling.ts +334 -334
- package/lib/templates.ts +526 -526
- package/lib/themes.ts +742 -742
- package/lib/trackchanges.ts +247 -247
- package/lib/tui.ts +450 -450
- package/lib/types.ts +550 -530
- package/lib/undo.ts +250 -250
- package/lib/utils.ts +69 -69
- package/lib/variables.ts +179 -179
- package/lib/word-extraction.ts +806 -759
- package/lib/word.ts +643 -643
- package/lib/wordcomments.ts +817 -798
- package/package.json +137 -137
- package/scripts/postbuild.js +28 -28
- package/skill/REFERENCE.md +431 -431
- package/skill/SKILL.md +258 -258
- package/tsconfig.json +26 -26
- package/types/index.d.ts +525 -525
package/lib/types.ts
CHANGED
|
@@ -1,530 +1,550 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared TypeScript type definitions for docrev
|
|
3
|
-
* Extracted from types/index.d.ts for internal use
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// ============================================
|
|
7
|
-
// Annotations
|
|
8
|
-
// ============================================
|
|
9
|
-
|
|
10
|
-
export interface Annotation {
|
|
11
|
-
type: 'insert' | 'delete' | 'substitute' | 'comment' | 'highlight';
|
|
12
|
-
match: string;
|
|
13
|
-
content: string;
|
|
14
|
-
replacement?: string;
|
|
15
|
-
author?: string;
|
|
16
|
-
position: number;
|
|
17
|
-
line: number;
|
|
18
|
-
before?: string;
|
|
19
|
-
after?: string;
|
|
20
|
-
resolved?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface Comment extends Annotation {
|
|
24
|
-
type: 'comment';
|
|
25
|
-
author: string;
|
|
26
|
-
resolved: boolean;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface AnnotationCounts {
|
|
30
|
-
inserts: number;
|
|
31
|
-
deletes: number;
|
|
32
|
-
substitutes: number;
|
|
33
|
-
comments: number;
|
|
34
|
-
total: number;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface StripOptions {
|
|
38
|
-
keepComments?: boolean;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface CommentFilterOptions {
|
|
42
|
-
pendingOnly?: boolean;
|
|
43
|
-
resolvedOnly?: boolean;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// ============================================
|
|
47
|
-
// Build
|
|
48
|
-
// ============================================
|
|
49
|
-
|
|
50
|
-
export interface Author {
|
|
51
|
-
name: string;
|
|
52
|
-
affiliation?: string;
|
|
53
|
-
affiliations?: string[];
|
|
54
|
-
corresponding?: boolean;
|
|
55
|
-
email?: string;
|
|
56
|
-
orcid?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface CrossrefConfig {
|
|
60
|
-
figureTitle?: string;
|
|
61
|
-
tableTitle?: string;
|
|
62
|
-
figPrefix?: string | string[];
|
|
63
|
-
tblPrefix?: string | string[];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface PdfConfig {
|
|
67
|
-
documentclass?: string;
|
|
68
|
-
fontsize?: string;
|
|
69
|
-
geometry?: string;
|
|
70
|
-
linestretch?: number;
|
|
71
|
-
toc?: boolean;
|
|
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
|
-
export interface
|
|
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
|
-
export interface
|
|
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
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
export interface
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
export interface
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
//
|
|
523
|
-
//
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared TypeScript type definitions for docrev
|
|
3
|
+
* Extracted from types/index.d.ts for internal use
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// ============================================
|
|
7
|
+
// Annotations
|
|
8
|
+
// ============================================
|
|
9
|
+
|
|
10
|
+
export interface Annotation {
|
|
11
|
+
type: 'insert' | 'delete' | 'substitute' | 'comment' | 'highlight';
|
|
12
|
+
match: string;
|
|
13
|
+
content: string;
|
|
14
|
+
replacement?: string;
|
|
15
|
+
author?: string;
|
|
16
|
+
position: number;
|
|
17
|
+
line: number;
|
|
18
|
+
before?: string;
|
|
19
|
+
after?: string;
|
|
20
|
+
resolved?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Comment extends Annotation {
|
|
24
|
+
type: 'comment';
|
|
25
|
+
author: string;
|
|
26
|
+
resolved: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface AnnotationCounts {
|
|
30
|
+
inserts: number;
|
|
31
|
+
deletes: number;
|
|
32
|
+
substitutes: number;
|
|
33
|
+
comments: number;
|
|
34
|
+
total: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface StripOptions {
|
|
38
|
+
keepComments?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CommentFilterOptions {
|
|
42
|
+
pendingOnly?: boolean;
|
|
43
|
+
resolvedOnly?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ============================================
|
|
47
|
+
// Build
|
|
48
|
+
// ============================================
|
|
49
|
+
|
|
50
|
+
export interface Author {
|
|
51
|
+
name: string;
|
|
52
|
+
affiliation?: string;
|
|
53
|
+
affiliations?: string[];
|
|
54
|
+
corresponding?: boolean;
|
|
55
|
+
email?: string;
|
|
56
|
+
orcid?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface CrossrefConfig {
|
|
60
|
+
figureTitle?: string;
|
|
61
|
+
tableTitle?: string;
|
|
62
|
+
figPrefix?: string | string[];
|
|
63
|
+
tblPrefix?: string | string[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface PdfConfig {
|
|
67
|
+
documentclass?: string;
|
|
68
|
+
fontsize?: string;
|
|
69
|
+
geometry?: string;
|
|
70
|
+
linestretch?: number;
|
|
71
|
+
toc?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* LaTeX engine to use for PDF output. One of `pdflatex` (default),
|
|
74
|
+
* `xelatex`, `lualatex`, `tectonic`, etc. xelatex/lualatex are required
|
|
75
|
+
* for native UTF-8 rendering of diacritics in author names, place
|
|
76
|
+
* names, and species epithets.
|
|
77
|
+
*/
|
|
78
|
+
engine?: string;
|
|
79
|
+
/** Roman/serif main font (xelatex/lualatex only — uses fontspec). */
|
|
80
|
+
mainfont?: string;
|
|
81
|
+
/** Sans-serif font (xelatex/lualatex only). */
|
|
82
|
+
sansfont?: string;
|
|
83
|
+
/** Monospace font (xelatex/lualatex only). */
|
|
84
|
+
monofont?: string;
|
|
85
|
+
numbersections?: boolean;
|
|
86
|
+
template?: string;
|
|
87
|
+
headerIncludes?: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface DocxConfig {
|
|
91
|
+
reference?: string;
|
|
92
|
+
keepComments?: boolean;
|
|
93
|
+
toc?: boolean;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface BuildConfig {
|
|
97
|
+
title?: string;
|
|
98
|
+
authors?: Author[];
|
|
99
|
+
sections?: string[];
|
|
100
|
+
bibliography?: string;
|
|
101
|
+
csl?: string;
|
|
102
|
+
crossref?: CrossrefConfig;
|
|
103
|
+
pdf?: PdfConfig;
|
|
104
|
+
docx?: DocxConfig;
|
|
105
|
+
postprocess?: { [key: string]: string };
|
|
106
|
+
_configPath?: string;
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface BuildResult {
|
|
111
|
+
format: string;
|
|
112
|
+
output: string;
|
|
113
|
+
success: boolean;
|
|
114
|
+
error?: string;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// ============================================
|
|
118
|
+
// Citations
|
|
119
|
+
// ============================================
|
|
120
|
+
|
|
121
|
+
export interface Citation {
|
|
122
|
+
key: string;
|
|
123
|
+
line: number;
|
|
124
|
+
file: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface CitationValidation {
|
|
128
|
+
valid: Citation[];
|
|
129
|
+
missing: Citation[];
|
|
130
|
+
unused: string[];
|
|
131
|
+
duplicates: Array<{ key: string; count: number; locations: Citation[] }>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface CitationStats {
|
|
135
|
+
totalCitations: number;
|
|
136
|
+
uniqueCited: number;
|
|
137
|
+
valid: number;
|
|
138
|
+
missing: number;
|
|
139
|
+
missingKeys: string[];
|
|
140
|
+
bibEntries: number;
|
|
141
|
+
unused: number;
|
|
142
|
+
unusedKeys: string[];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ============================================
|
|
146
|
+
// Crossref
|
|
147
|
+
// ============================================
|
|
148
|
+
|
|
149
|
+
export interface RefNumber {
|
|
150
|
+
num: number;
|
|
151
|
+
isSupp: boolean;
|
|
152
|
+
suffix: string | null;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface HardcodedRef {
|
|
156
|
+
type: 'fig' | 'tbl' | 'eq';
|
|
157
|
+
match: string;
|
|
158
|
+
numbers: RefNumber[];
|
|
159
|
+
position: number;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface DynamicRef {
|
|
163
|
+
type: 'fig' | 'tbl' | 'eq';
|
|
164
|
+
label: string;
|
|
165
|
+
match: string;
|
|
166
|
+
position: number;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export interface FigureInfo {
|
|
170
|
+
label: string;
|
|
171
|
+
num: number;
|
|
172
|
+
isSupp: boolean;
|
|
173
|
+
file: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface Registry {
|
|
177
|
+
figures: Map<string, FigureInfo>;
|
|
178
|
+
tables: Map<string, FigureInfo>;
|
|
179
|
+
equations: Map<string, FigureInfo>;
|
|
180
|
+
byNumber: {
|
|
181
|
+
fig: Map<number, string>;
|
|
182
|
+
figS: Map<number, string>;
|
|
183
|
+
tbl: Map<number, string>;
|
|
184
|
+
tblS: Map<number, string>;
|
|
185
|
+
eq: Map<number, string>;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface RefStatus {
|
|
190
|
+
dynamic: DynamicRef[];
|
|
191
|
+
hardcoded: HardcodedRef[];
|
|
192
|
+
anchors: { figures: number; tables: number; equations: number };
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface ConversionResult {
|
|
196
|
+
converted: string;
|
|
197
|
+
conversions: Array<{ from: string; to: string }>;
|
|
198
|
+
warnings: string[];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// ============================================
|
|
202
|
+
// DOI
|
|
203
|
+
// ============================================
|
|
204
|
+
|
|
205
|
+
export interface BibEntry {
|
|
206
|
+
key: string;
|
|
207
|
+
type: string;
|
|
208
|
+
doi: string | null;
|
|
209
|
+
title: string;
|
|
210
|
+
authorRaw: string;
|
|
211
|
+
year: number | null;
|
|
212
|
+
journal: string;
|
|
213
|
+
skip: boolean;
|
|
214
|
+
expectDoi: boolean;
|
|
215
|
+
noDoi: boolean;
|
|
216
|
+
line: number;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface DoiCheckResult {
|
|
220
|
+
valid: boolean;
|
|
221
|
+
source?: 'crossref' | 'datacite';
|
|
222
|
+
metadata?: {
|
|
223
|
+
title: string;
|
|
224
|
+
authors: string[];
|
|
225
|
+
year: number;
|
|
226
|
+
journal: string;
|
|
227
|
+
type?: string;
|
|
228
|
+
};
|
|
229
|
+
error?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface BibtexFetchResult {
|
|
233
|
+
success: boolean;
|
|
234
|
+
bibtex?: string;
|
|
235
|
+
error?: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface DoiLookupResult {
|
|
239
|
+
found: boolean;
|
|
240
|
+
doi?: string;
|
|
241
|
+
confidence?: 'low' | 'medium' | 'high';
|
|
242
|
+
score?: number;
|
|
243
|
+
metadata?: {
|
|
244
|
+
title: string;
|
|
245
|
+
authors: string[];
|
|
246
|
+
year: number;
|
|
247
|
+
journal: string;
|
|
248
|
+
};
|
|
249
|
+
alternatives?: Array<{
|
|
250
|
+
doi: string;
|
|
251
|
+
title: string;
|
|
252
|
+
score: number;
|
|
253
|
+
}>;
|
|
254
|
+
error?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface BibCheckResult {
|
|
258
|
+
entries: Array<BibEntry & { status: string; message?: string; metadata?: object }>;
|
|
259
|
+
valid: number;
|
|
260
|
+
invalid: number;
|
|
261
|
+
missing: number;
|
|
262
|
+
skipped: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// ============================================
|
|
266
|
+
// Equations
|
|
267
|
+
// ============================================
|
|
268
|
+
|
|
269
|
+
export interface Equation {
|
|
270
|
+
type: 'inline' | 'display';
|
|
271
|
+
content: string;
|
|
272
|
+
line: number;
|
|
273
|
+
file: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface EquationStats {
|
|
277
|
+
total: number;
|
|
278
|
+
display: number;
|
|
279
|
+
inline: number;
|
|
280
|
+
byFile: Array<{ file: string; display: number; inline: number }>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export interface WordEquationResult {
|
|
284
|
+
success: boolean;
|
|
285
|
+
equations: Array<{
|
|
286
|
+
type: 'inline' | 'display' | 'unknown';
|
|
287
|
+
latex: string | null;
|
|
288
|
+
position: number;
|
|
289
|
+
line?: number;
|
|
290
|
+
raw?: string;
|
|
291
|
+
error?: string;
|
|
292
|
+
}>;
|
|
293
|
+
error?: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// ============================================
|
|
297
|
+
// Git
|
|
298
|
+
// ============================================
|
|
299
|
+
|
|
300
|
+
export interface FileChange {
|
|
301
|
+
added: number;
|
|
302
|
+
removed: number;
|
|
303
|
+
changes: Array<{ added?: boolean; removed?: boolean; value: string }>;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface CommitInfo {
|
|
307
|
+
hash: string;
|
|
308
|
+
date: string;
|
|
309
|
+
author: string;
|
|
310
|
+
message: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface ChangedFile {
|
|
314
|
+
file: string;
|
|
315
|
+
status: 'added' | 'deleted' | 'modified';
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export interface BlameEntry {
|
|
319
|
+
line: number;
|
|
320
|
+
author: string;
|
|
321
|
+
date: string;
|
|
322
|
+
hash: string;
|
|
323
|
+
content: string;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface AuthorStats {
|
|
327
|
+
lines: number;
|
|
328
|
+
percentage: number;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface ContributorStats {
|
|
332
|
+
lines: number;
|
|
333
|
+
files: number;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// ============================================
|
|
337
|
+
// Journals
|
|
338
|
+
// ============================================
|
|
339
|
+
|
|
340
|
+
export interface JournalRequirements {
|
|
341
|
+
wordLimit?: { main?: number; abstract?: number };
|
|
342
|
+
references?: { max?: number; doiRequired?: boolean };
|
|
343
|
+
figures?: { max?: number };
|
|
344
|
+
tables?: { max?: number };
|
|
345
|
+
sections?: string[];
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export interface JournalFormatting {
|
|
349
|
+
csl?: string;
|
|
350
|
+
pdf?: {
|
|
351
|
+
documentclass?: string;
|
|
352
|
+
fontsize?: string;
|
|
353
|
+
geometry?: string;
|
|
354
|
+
linestretch?: number;
|
|
355
|
+
template?: string;
|
|
356
|
+
numbersections?: boolean;
|
|
357
|
+
engine?: string;
|
|
358
|
+
mainfont?: string;
|
|
359
|
+
sansfont?: string;
|
|
360
|
+
monofont?: string;
|
|
361
|
+
};
|
|
362
|
+
docx?: {
|
|
363
|
+
reference?: string;
|
|
364
|
+
};
|
|
365
|
+
crossref?: {
|
|
366
|
+
figPrefix?: string | string[];
|
|
367
|
+
tblPrefix?: string | string[];
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface JournalProfile {
|
|
372
|
+
name: string;
|
|
373
|
+
url: string;
|
|
374
|
+
requirements: JournalRequirements;
|
|
375
|
+
formatting?: JournalFormatting;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface ValidationResult {
|
|
379
|
+
journal: string;
|
|
380
|
+
valid: boolean;
|
|
381
|
+
wordCount: { main: number; abstract: number; limit: { main: number; abstract: number } };
|
|
382
|
+
figures: { count: number; max: number };
|
|
383
|
+
tables: { count: number; max: number };
|
|
384
|
+
references: { count: number; max: number };
|
|
385
|
+
sections: { found: string[]; missing: string[]; required: string[] };
|
|
386
|
+
errors: string[];
|
|
387
|
+
warnings: string[];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// ============================================
|
|
391
|
+
// Merge
|
|
392
|
+
// ============================================
|
|
393
|
+
|
|
394
|
+
export interface ReviewerChange {
|
|
395
|
+
reviewer: string;
|
|
396
|
+
type: 'insert' | 'delete' | 'replace';
|
|
397
|
+
start: number;
|
|
398
|
+
end: number;
|
|
399
|
+
oldText: string;
|
|
400
|
+
newText: string;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export interface Conflict {
|
|
404
|
+
id: string;
|
|
405
|
+
start: number;
|
|
406
|
+
end: number;
|
|
407
|
+
original: string;
|
|
408
|
+
changes: ReviewerChange[];
|
|
409
|
+
section?: string;
|
|
410
|
+
line?: number;
|
|
411
|
+
resolved: string | null;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface MergeResult {
|
|
415
|
+
merged: string;
|
|
416
|
+
conflicts: Conflict[];
|
|
417
|
+
stats: {
|
|
418
|
+
reviewers: number;
|
|
419
|
+
totalChanges: number;
|
|
420
|
+
nonConflicting: number;
|
|
421
|
+
conflicts: number;
|
|
422
|
+
comments: number;
|
|
423
|
+
};
|
|
424
|
+
originalText: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// ============================================
|
|
428
|
+
// Sections
|
|
429
|
+
// ============================================
|
|
430
|
+
|
|
431
|
+
export interface SectionConfig {
|
|
432
|
+
header: string;
|
|
433
|
+
aliases?: string[];
|
|
434
|
+
order?: number;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface SectionsConfig {
|
|
438
|
+
version: number;
|
|
439
|
+
description?: string;
|
|
440
|
+
sections: Record<string, SectionConfig>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface ExtractedSection {
|
|
444
|
+
file: string;
|
|
445
|
+
header: string;
|
|
446
|
+
content: string;
|
|
447
|
+
matched: boolean;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// ============================================
|
|
451
|
+
// Word
|
|
452
|
+
// ============================================
|
|
453
|
+
|
|
454
|
+
export interface WordComment {
|
|
455
|
+
id: string;
|
|
456
|
+
author: string;
|
|
457
|
+
date?: string;
|
|
458
|
+
text: string;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface WordMetadata {
|
|
462
|
+
title?: string;
|
|
463
|
+
author?: string;
|
|
464
|
+
created?: string;
|
|
465
|
+
modified?: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export interface CommentAnchor {
|
|
469
|
+
text: string;
|
|
470
|
+
context: string;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
export interface WordContent {
|
|
474
|
+
text: string;
|
|
475
|
+
html: string;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export interface TrackChangesResult {
|
|
479
|
+
hasTrackChanges: boolean;
|
|
480
|
+
content: string | null;
|
|
481
|
+
stats: { insertions: number; deletions: number };
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// ============================================
|
|
485
|
+
// TrackChanges
|
|
486
|
+
// ============================================
|
|
487
|
+
|
|
488
|
+
export interface TrackChangeMarker {
|
|
489
|
+
id: number;
|
|
490
|
+
type: 'insert' | 'delete' | 'substitute' | 'comment';
|
|
491
|
+
content: string;
|
|
492
|
+
author: string;
|
|
493
|
+
replacement?: string;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// ============================================
|
|
497
|
+
// Spelling
|
|
498
|
+
// ============================================
|
|
499
|
+
|
|
500
|
+
export interface SpellingIssue {
|
|
501
|
+
word: string;
|
|
502
|
+
line: number;
|
|
503
|
+
column: number;
|
|
504
|
+
file?: string;
|
|
505
|
+
suggestions?: string[];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface SpellingResult {
|
|
509
|
+
misspelled: SpellingIssue[];
|
|
510
|
+
possibleNames: SpellingIssue[];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// ============================================
|
|
514
|
+
// Config
|
|
515
|
+
// ============================================
|
|
516
|
+
|
|
517
|
+
export interface UserConfig {
|
|
518
|
+
userName?: string;
|
|
519
|
+
defaultSections?: string[];
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// ============================================
|
|
523
|
+
// DOI Cache
|
|
524
|
+
// ============================================
|
|
525
|
+
|
|
526
|
+
export interface DoiCacheEntry {
|
|
527
|
+
result: DoiCheckResult | DoiLookupResult;
|
|
528
|
+
timestamp: number;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface DoiCache {
|
|
532
|
+
entries: Record<string, DoiCacheEntry>;
|
|
533
|
+
version: number;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export interface DoiCacheStats {
|
|
537
|
+
size: number;
|
|
538
|
+
path: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// ============================================
|
|
542
|
+
// Errors
|
|
543
|
+
// ============================================
|
|
544
|
+
|
|
545
|
+
export interface ErrorInfo {
|
|
546
|
+
code: string;
|
|
547
|
+
message: string;
|
|
548
|
+
help?: string;
|
|
549
|
+
cause?: Error;
|
|
550
|
+
}
|