docrev 0.9.0 → 0.9.3
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/README.md +25 -1
- package/dist/lib/annotations.d.ts.map +1 -1
- package/dist/lib/annotations.js +6 -0
- package/dist/lib/annotations.js.map +1 -1
- package/dist/lib/build.d.ts +6 -1
- package/dist/lib/build.d.ts.map +1 -1
- package/dist/lib/build.js +67 -1
- package/dist/lib/build.js.map +1 -1
- package/dist/lib/commands/build.d.ts.map +1 -1
- package/dist/lib/commands/build.js +26 -7
- package/dist/lib/commands/build.js.map +1 -1
- package/dist/lib/commands/response.d.ts.map +1 -1
- package/dist/lib/commands/response.js +50 -2
- package/dist/lib/commands/response.js.map +1 -1
- package/dist/lib/commands/sections.d.ts.map +1 -1
- package/dist/lib/commands/sections.js +28 -9
- package/dist/lib/commands/sections.js.map +1 -1
- package/dist/lib/csl.d.ts +38 -0
- package/dist/lib/csl.d.ts.map +1 -0
- package/dist/lib/csl.js +170 -0
- package/dist/lib/csl.js.map +1 -0
- package/dist/lib/import.d.ts.map +1 -1
- package/dist/lib/import.js +20 -7
- package/dist/lib/import.js.map +1 -1
- package/dist/lib/journals.d.ts.map +1 -1
- package/dist/lib/journals.js +24 -0
- package/dist/lib/journals.js.map +1 -1
- package/dist/lib/plugins.d.ts +11 -0
- package/dist/lib/plugins.d.ts.map +1 -1
- package/dist/lib/plugins.js +21 -1
- package/dist/lib/plugins.js.map +1 -1
- package/dist/lib/pptx-template.d.ts +17 -22
- package/dist/lib/pptx-template.d.ts.map +1 -1
- package/dist/lib/pptx-template.js +296 -552
- package/dist/lib/pptx-template.js.map +1 -1
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +4 -0
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/types.d.ts +19 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib/word.d.ts +24 -11
- package/dist/lib/word.d.ts.map +1 -1
- package/dist/lib/word.js +233 -32
- package/dist/lib/word.js.map +1 -1
- package/lib/annotations.ts +8 -0
- package/lib/build.ts +75 -2
- package/lib/commands/build.ts +25 -7
- package/lib/commands/response.ts +55 -2
- package/lib/commands/sections.ts +31 -9
- package/lib/csl.ts +191 -0
- package/lib/import.ts +21 -7
- package/lib/journals.ts +25 -1
- package/lib/plugins.ts +35 -1
- package/lib/pptx-template.ts +346 -502
- package/lib/schema.ts +4 -0
- package/lib/types.ts +20 -1
- package/lib/word.ts +253 -38
- package/package.json +1 -2
- package/lib/apply-buildup-colors.py +0 -88
package/lib/plugins.ts
CHANGED
|
@@ -37,6 +37,17 @@ interface Profile {
|
|
|
37
37
|
[key: string]: unknown;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Journal formatting defaults
|
|
42
|
+
*/
|
|
43
|
+
interface ProfileFormatting {
|
|
44
|
+
csl?: string;
|
|
45
|
+
pdf?: Record<string, unknown>;
|
|
46
|
+
docx?: Record<string, unknown>;
|
|
47
|
+
crossref?: Record<string, unknown>;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
|
|
40
51
|
/**
|
|
41
52
|
* Normalized profile
|
|
42
53
|
*/
|
|
@@ -45,6 +56,7 @@ interface NormalizedProfile {
|
|
|
45
56
|
url: string | null;
|
|
46
57
|
custom: boolean;
|
|
47
58
|
requirements: ProfileRequirements;
|
|
59
|
+
formatting?: ProfileFormatting;
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
/**
|
|
@@ -154,7 +166,7 @@ function validateProfile(profile: unknown): profile is Profile {
|
|
|
154
166
|
* Normalize profile to standard structure
|
|
155
167
|
*/
|
|
156
168
|
function normalizeProfile(profile: Profile): NormalizedProfile {
|
|
157
|
-
|
|
169
|
+
const normalized: NormalizedProfile = {
|
|
158
170
|
name: profile.name,
|
|
159
171
|
url: profile.url || null,
|
|
160
172
|
custom: true,
|
|
@@ -169,6 +181,14 @@ function normalizeProfile(profile: Profile): NormalizedProfile {
|
|
|
169
181
|
...profile.requirements,
|
|
170
182
|
},
|
|
171
183
|
};
|
|
184
|
+
|
|
185
|
+
// Pass through formatting if present
|
|
186
|
+
const formatting = (profile as { formatting?: ProfileFormatting }).formatting;
|
|
187
|
+
if (formatting && typeof formatting === 'object') {
|
|
188
|
+
normalized.formatting = formatting;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return normalized;
|
|
172
192
|
}
|
|
173
193
|
|
|
174
194
|
/**
|
|
@@ -245,6 +265,20 @@ keywords:
|
|
|
245
265
|
dataAvailability: true
|
|
246
266
|
highlights: false
|
|
247
267
|
graphicalAbstract: false
|
|
268
|
+
|
|
269
|
+
# Build formatting defaults (applied via rev build -j ${id})
|
|
270
|
+
# formatting:
|
|
271
|
+
# csl: "${id}" # CSL style name or path
|
|
272
|
+
# pdf:
|
|
273
|
+
# fontsize: 12pt
|
|
274
|
+
# geometry: margin=1in
|
|
275
|
+
# linestretch: 1.5
|
|
276
|
+
# numbersections: false
|
|
277
|
+
# docx:
|
|
278
|
+
# reference: null # Path to reference .docx template
|
|
279
|
+
# crossref:
|
|
280
|
+
# figPrefix: [Fig., Figs.]
|
|
281
|
+
# tblPrefix: [Table, Tables]
|
|
248
282
|
`;
|
|
249
283
|
}
|
|
250
284
|
|