@metacensus/library-research 0.13.0 → 0.15.0
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 +43 -11
- package/dist/commands/add.js +29 -12
- package/dist/commands/check.js +1 -1
- package/dist/commands/dev.js +24 -13
- package/dist/commands/reshape.d.ts +2 -0
- package/dist/commands/reshape.js +21 -0
- package/dist/context.d.ts +3 -1
- package/dist/context.js +2 -0
- package/dist/corpus.d.ts +432 -0
- package/dist/corpus.js +348 -0
- package/dist/data.d.ts +16 -12
- package/dist/data.js +38 -26
- package/dist/datasets.d.ts +8 -0
- package/dist/{roles.js → datasets.js} +35 -29
- package/dist/dev/host.d.ts +7 -1
- package/dist/dev/host.js +15 -13
- package/dist/host.d.ts +3 -1
- package/dist/host.js +6 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/mount.d.ts +7 -3
- package/dist/mount.js +7 -7
- package/dist/papers.js +3 -2
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +24 -6
- package/dist/project-id.d.ts +4 -0
- package/dist/project-id.js +7 -0
- package/dist/react.d.ts +18 -18
- package/dist/react.js +60 -37
- package/dist/reader.d.ts +18 -4
- package/dist/reader.js +25 -2
- package/dist/schema.d.ts +10 -35
- package/dist/schema.js +57 -34
- package/dist/testing.d.ts +11 -6
- package/dist/testing.js +12 -10
- package/dist/types.d.ts +62 -13
- package/dist/vite-config.js +2 -12
- package/dist/vite.d.ts +10 -2
- package/dist/vite.js +71 -19
- package/dist/zod.d.ts +2 -0
- package/dist/zod.js +4 -0
- package/package.json +14 -14
- package/schema/corpus.schema.json +3949 -29
- package/schema/project-id.schema.json +6 -0
- package/schema/research.schema.json +33 -7
- package/dist/roles.d.ts +0 -7
package/dist/corpus.d.ts
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { z } from './zod.js';
|
|
2
|
+
export declare const kinds: {
|
|
3
|
+
readonly pdf: "application/pdf";
|
|
4
|
+
readonly doc: "application/msword";
|
|
5
|
+
readonly docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
6
|
+
readonly xls: "application/vnd.ms-excel";
|
|
7
|
+
readonly xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
8
|
+
readonly zip: "application/zip";
|
|
9
|
+
readonly gif: "image/gif";
|
|
10
|
+
readonly jpg: "image/jpeg";
|
|
11
|
+
readonly tif: "image/tiff";
|
|
12
|
+
readonly txt: "text/plain";
|
|
13
|
+
readonly html: "text/plain";
|
|
14
|
+
readonly xml: "text/plain";
|
|
15
|
+
};
|
|
16
|
+
declare const names: readonly ["author", "chair", "collection-editor", "compiler", "composer", "container-author", "contributor", "curator", "director", "editor", "editorial-director", "executive-producer", "guest", "host", "illustrator", "interviewer", "narrator", "organizer", "original-author", "performer", "producer", "recipient", "reviewed-author", "script-writer", "series-creator", "translator"];
|
|
17
|
+
declare const dates: readonly ["accessed", "available-date", "event-date", "issued", "original-date", "submitted"];
|
|
18
|
+
declare const numbers: readonly ["chapter-number", "citation-number", "collection-number", "edition", "first-reference-note-number", "issue", "number", "number-of-pages", "number-of-volumes", "page", "page-first", "part", "printing", "supplement", "version", "volume"];
|
|
19
|
+
declare const strings: readonly ["abstract", "annote", "archive", "archive_collection", "archive_location", "archive-place", "authority", "call-number", "citation-label", "collection-title", "container-title", "container-title-short", "dimensions", "division", "event", "event-place", "event-title", "genre", "ISBN", "ISSN", "journalAbbreviation", "jurisdiction", "keyword", "language", "locator", "medium", "note", "original-publisher", "original-publisher-place", "original-title", "part-title", "PMCID", "PMID", "publisher", "publisher-place", "references", "reviewed-genre", "reviewed-title", "scale", "section", "shortTitle", "source", "status", "title", "title-short", "URL", "volume-title", "volume-title-short", "year-suffix"];
|
|
20
|
+
declare const name: z.ZodArray<z.ZodObject<{
|
|
21
|
+
family: z.ZodOptional<z.ZodString>;
|
|
22
|
+
given: z.ZodOptional<z.ZodString>;
|
|
23
|
+
'dropping-particle': z.ZodOptional<z.ZodString>;
|
|
24
|
+
'non-dropping-particle': z.ZodOptional<z.ZodString>;
|
|
25
|
+
suffix: z.ZodOptional<z.ZodString>;
|
|
26
|
+
'comma-suffix': z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
27
|
+
'static-ordering': z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
28
|
+
literal: z.ZodOptional<z.ZodString>;
|
|
29
|
+
'parse-names': z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
declare const date: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
32
|
+
'date-parts': z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>>;
|
|
33
|
+
season: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
34
|
+
circa: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
35
|
+
literal: z.ZodOptional<z.ZodString>;
|
|
36
|
+
raw: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>]>;
|
|
38
|
+
declare const number: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
39
|
+
declare const string: z.ZodString;
|
|
40
|
+
type Variables<K extends string, T extends z.ZodType> = {
|
|
41
|
+
[P in K]: z.ZodOptional<T>;
|
|
42
|
+
};
|
|
43
|
+
declare const base: {
|
|
44
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
45
|
+
article: "article";
|
|
46
|
+
"article-journal": "article-journal";
|
|
47
|
+
"article-magazine": "article-magazine";
|
|
48
|
+
"article-newspaper": "article-newspaper";
|
|
49
|
+
bill: "bill";
|
|
50
|
+
book: "book";
|
|
51
|
+
broadcast: "broadcast";
|
|
52
|
+
chapter: "chapter";
|
|
53
|
+
classic: "classic";
|
|
54
|
+
collection: "collection";
|
|
55
|
+
dataset: "dataset";
|
|
56
|
+
document: "document";
|
|
57
|
+
entry: "entry";
|
|
58
|
+
"entry-dictionary": "entry-dictionary";
|
|
59
|
+
"entry-encyclopedia": "entry-encyclopedia";
|
|
60
|
+
event: "event";
|
|
61
|
+
figure: "figure";
|
|
62
|
+
graphic: "graphic";
|
|
63
|
+
hearing: "hearing";
|
|
64
|
+
interview: "interview";
|
|
65
|
+
legal_case: "legal_case";
|
|
66
|
+
legislation: "legislation";
|
|
67
|
+
manuscript: "manuscript";
|
|
68
|
+
map: "map";
|
|
69
|
+
motion_picture: "motion_picture";
|
|
70
|
+
musical_score: "musical_score";
|
|
71
|
+
pamphlet: "pamphlet";
|
|
72
|
+
"paper-conference": "paper-conference";
|
|
73
|
+
patent: "patent";
|
|
74
|
+
performance: "performance";
|
|
75
|
+
periodical: "periodical";
|
|
76
|
+
personal_communication: "personal_communication";
|
|
77
|
+
post: "post";
|
|
78
|
+
"post-weblog": "post-weblog";
|
|
79
|
+
regulation: "regulation";
|
|
80
|
+
report: "report";
|
|
81
|
+
review: "review";
|
|
82
|
+
"review-book": "review-book";
|
|
83
|
+
software: "software";
|
|
84
|
+
song: "song";
|
|
85
|
+
speech: "speech";
|
|
86
|
+
standard: "standard";
|
|
87
|
+
thesis: "thesis";
|
|
88
|
+
treaty: "treaty";
|
|
89
|
+
webpage: "webpage";
|
|
90
|
+
}>>;
|
|
91
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
custom: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
93
|
+
};
|
|
94
|
+
type CslShape = typeof base & Variables<(typeof names)[number], typeof name> & Variables<(typeof dates)[number], typeof date> & Variables<(typeof numbers)[number], typeof number> & Variables<(typeof strings)[number], typeof string>;
|
|
95
|
+
export declare const Csl: z.ZodObject<CslShape, z.core.$strict>;
|
|
96
|
+
type Field = keyof CslShape;
|
|
97
|
+
export declare const Paper: z.ZodObject<{
|
|
98
|
+
kind: z.ZodEnum<{
|
|
99
|
+
pdf: "pdf";
|
|
100
|
+
doc: "doc";
|
|
101
|
+
docx: "docx";
|
|
102
|
+
xls: "xls";
|
|
103
|
+
xlsx: "xlsx";
|
|
104
|
+
zip: "zip";
|
|
105
|
+
gif: "gif";
|
|
106
|
+
jpg: "jpg";
|
|
107
|
+
tif: "tif";
|
|
108
|
+
txt: "txt";
|
|
109
|
+
html: "html";
|
|
110
|
+
xml: "xml";
|
|
111
|
+
}>;
|
|
112
|
+
open: z.ZodOptional<z.ZodLiteral<true>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const Edition: z.ZodObject<{
|
|
115
|
+
csl: z.ZodOptional<z.ZodObject<CslShape, z.core.$strict>>;
|
|
116
|
+
papers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
117
|
+
kind: z.ZodEnum<{
|
|
118
|
+
pdf: "pdf";
|
|
119
|
+
doc: "doc";
|
|
120
|
+
docx: "docx";
|
|
121
|
+
xls: "xls";
|
|
122
|
+
xlsx: "xlsx";
|
|
123
|
+
zip: "zip";
|
|
124
|
+
gif: "gif";
|
|
125
|
+
jpg: "jpg";
|
|
126
|
+
tif: "tif";
|
|
127
|
+
txt: "txt";
|
|
128
|
+
html: "html";
|
|
129
|
+
xml: "xml";
|
|
130
|
+
}>;
|
|
131
|
+
open: z.ZodOptional<z.ZodLiteral<true>>;
|
|
132
|
+
}, z.core.$strict>>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
export declare const Work: z.ZodObject<{
|
|
135
|
+
csl: z.ZodObject<CslShape, z.core.$strict>;
|
|
136
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
137
|
+
csl: z.ZodOptional<z.ZodObject<CslShape, z.core.$strict>>;
|
|
138
|
+
papers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
+
kind: z.ZodEnum<{
|
|
140
|
+
pdf: "pdf";
|
|
141
|
+
doc: "doc";
|
|
142
|
+
docx: "docx";
|
|
143
|
+
xls: "xls";
|
|
144
|
+
xlsx: "xlsx";
|
|
145
|
+
zip: "zip";
|
|
146
|
+
gif: "gif";
|
|
147
|
+
jpg: "jpg";
|
|
148
|
+
tif: "tif";
|
|
149
|
+
txt: "txt";
|
|
150
|
+
html: "html";
|
|
151
|
+
xml: "xml";
|
|
152
|
+
}>;
|
|
153
|
+
open: z.ZodOptional<z.ZodLiteral<true>>;
|
|
154
|
+
}, z.core.$strict>>;
|
|
155
|
+
}, z.core.$strict>>;
|
|
156
|
+
pending: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
157
|
+
number: "number";
|
|
158
|
+
type: "type";
|
|
159
|
+
event: "event";
|
|
160
|
+
author: "author";
|
|
161
|
+
chair: "chair";
|
|
162
|
+
"collection-editor": "collection-editor";
|
|
163
|
+
compiler: "compiler";
|
|
164
|
+
composer: "composer";
|
|
165
|
+
"container-author": "container-author";
|
|
166
|
+
contributor: "contributor";
|
|
167
|
+
curator: "curator";
|
|
168
|
+
director: "director";
|
|
169
|
+
editor: "editor";
|
|
170
|
+
"editorial-director": "editorial-director";
|
|
171
|
+
"executive-producer": "executive-producer";
|
|
172
|
+
guest: "guest";
|
|
173
|
+
host: "host";
|
|
174
|
+
illustrator: "illustrator";
|
|
175
|
+
interviewer: "interviewer";
|
|
176
|
+
narrator: "narrator";
|
|
177
|
+
organizer: "organizer";
|
|
178
|
+
"original-author": "original-author";
|
|
179
|
+
performer: "performer";
|
|
180
|
+
producer: "producer";
|
|
181
|
+
recipient: "recipient";
|
|
182
|
+
"reviewed-author": "reviewed-author";
|
|
183
|
+
"script-writer": "script-writer";
|
|
184
|
+
"series-creator": "series-creator";
|
|
185
|
+
translator: "translator";
|
|
186
|
+
accessed: "accessed";
|
|
187
|
+
"available-date": "available-date";
|
|
188
|
+
"event-date": "event-date";
|
|
189
|
+
issued: "issued";
|
|
190
|
+
"original-date": "original-date";
|
|
191
|
+
submitted: "submitted";
|
|
192
|
+
"chapter-number": "chapter-number";
|
|
193
|
+
"citation-number": "citation-number";
|
|
194
|
+
"collection-number": "collection-number";
|
|
195
|
+
edition: "edition";
|
|
196
|
+
"first-reference-note-number": "first-reference-note-number";
|
|
197
|
+
issue: "issue";
|
|
198
|
+
"number-of-pages": "number-of-pages";
|
|
199
|
+
"number-of-volumes": "number-of-volumes";
|
|
200
|
+
page: "page";
|
|
201
|
+
"page-first": "page-first";
|
|
202
|
+
part: "part";
|
|
203
|
+
printing: "printing";
|
|
204
|
+
supplement: "supplement";
|
|
205
|
+
version: "version";
|
|
206
|
+
volume: "volume";
|
|
207
|
+
abstract: "abstract";
|
|
208
|
+
annote: "annote";
|
|
209
|
+
archive: "archive";
|
|
210
|
+
archive_collection: "archive_collection";
|
|
211
|
+
archive_location: "archive_location";
|
|
212
|
+
"archive-place": "archive-place";
|
|
213
|
+
authority: "authority";
|
|
214
|
+
"call-number": "call-number";
|
|
215
|
+
"citation-label": "citation-label";
|
|
216
|
+
"collection-title": "collection-title";
|
|
217
|
+
"container-title": "container-title";
|
|
218
|
+
"container-title-short": "container-title-short";
|
|
219
|
+
dimensions: "dimensions";
|
|
220
|
+
division: "division";
|
|
221
|
+
"event-place": "event-place";
|
|
222
|
+
"event-title": "event-title";
|
|
223
|
+
genre: "genre";
|
|
224
|
+
ISBN: "ISBN";
|
|
225
|
+
ISSN: "ISSN";
|
|
226
|
+
journalAbbreviation: "journalAbbreviation";
|
|
227
|
+
jurisdiction: "jurisdiction";
|
|
228
|
+
keyword: "keyword";
|
|
229
|
+
language: "language";
|
|
230
|
+
locator: "locator";
|
|
231
|
+
medium: "medium";
|
|
232
|
+
note: "note";
|
|
233
|
+
"original-publisher": "original-publisher";
|
|
234
|
+
"original-publisher-place": "original-publisher-place";
|
|
235
|
+
"original-title": "original-title";
|
|
236
|
+
"part-title": "part-title";
|
|
237
|
+
PMCID: "PMCID";
|
|
238
|
+
PMID: "PMID";
|
|
239
|
+
publisher: "publisher";
|
|
240
|
+
"publisher-place": "publisher-place";
|
|
241
|
+
references: "references";
|
|
242
|
+
"reviewed-genre": "reviewed-genre";
|
|
243
|
+
"reviewed-title": "reviewed-title";
|
|
244
|
+
scale: "scale";
|
|
245
|
+
section: "section";
|
|
246
|
+
shortTitle: "shortTitle";
|
|
247
|
+
source: "source";
|
|
248
|
+
status: "status";
|
|
249
|
+
title: "title";
|
|
250
|
+
"title-short": "title-short";
|
|
251
|
+
URL: "URL";
|
|
252
|
+
"volume-title": "volume-title";
|
|
253
|
+
"volume-title-short": "volume-title-short";
|
|
254
|
+
"year-suffix": "year-suffix";
|
|
255
|
+
custom: "custom";
|
|
256
|
+
categories: "categories";
|
|
257
|
+
}>>>;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
export declare const Corpus: z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>, z.ZodObject<{
|
|
260
|
+
csl: z.ZodObject<CslShape, z.core.$strict>;
|
|
261
|
+
editions: z.ZodArray<z.ZodObject<{
|
|
262
|
+
csl: z.ZodOptional<z.ZodObject<CslShape, z.core.$strict>>;
|
|
263
|
+
papers: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
264
|
+
kind: z.ZodEnum<{
|
|
265
|
+
pdf: "pdf";
|
|
266
|
+
doc: "doc";
|
|
267
|
+
docx: "docx";
|
|
268
|
+
xls: "xls";
|
|
269
|
+
xlsx: "xlsx";
|
|
270
|
+
zip: "zip";
|
|
271
|
+
gif: "gif";
|
|
272
|
+
jpg: "jpg";
|
|
273
|
+
tif: "tif";
|
|
274
|
+
txt: "txt";
|
|
275
|
+
html: "html";
|
|
276
|
+
xml: "xml";
|
|
277
|
+
}>;
|
|
278
|
+
open: z.ZodOptional<z.ZodLiteral<true>>;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
}, z.core.$strict>>;
|
|
281
|
+
pending: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
282
|
+
number: "number";
|
|
283
|
+
type: "type";
|
|
284
|
+
event: "event";
|
|
285
|
+
author: "author";
|
|
286
|
+
chair: "chair";
|
|
287
|
+
"collection-editor": "collection-editor";
|
|
288
|
+
compiler: "compiler";
|
|
289
|
+
composer: "composer";
|
|
290
|
+
"container-author": "container-author";
|
|
291
|
+
contributor: "contributor";
|
|
292
|
+
curator: "curator";
|
|
293
|
+
director: "director";
|
|
294
|
+
editor: "editor";
|
|
295
|
+
"editorial-director": "editorial-director";
|
|
296
|
+
"executive-producer": "executive-producer";
|
|
297
|
+
guest: "guest";
|
|
298
|
+
host: "host";
|
|
299
|
+
illustrator: "illustrator";
|
|
300
|
+
interviewer: "interviewer";
|
|
301
|
+
narrator: "narrator";
|
|
302
|
+
organizer: "organizer";
|
|
303
|
+
"original-author": "original-author";
|
|
304
|
+
performer: "performer";
|
|
305
|
+
producer: "producer";
|
|
306
|
+
recipient: "recipient";
|
|
307
|
+
"reviewed-author": "reviewed-author";
|
|
308
|
+
"script-writer": "script-writer";
|
|
309
|
+
"series-creator": "series-creator";
|
|
310
|
+
translator: "translator";
|
|
311
|
+
accessed: "accessed";
|
|
312
|
+
"available-date": "available-date";
|
|
313
|
+
"event-date": "event-date";
|
|
314
|
+
issued: "issued";
|
|
315
|
+
"original-date": "original-date";
|
|
316
|
+
submitted: "submitted";
|
|
317
|
+
"chapter-number": "chapter-number";
|
|
318
|
+
"citation-number": "citation-number";
|
|
319
|
+
"collection-number": "collection-number";
|
|
320
|
+
edition: "edition";
|
|
321
|
+
"first-reference-note-number": "first-reference-note-number";
|
|
322
|
+
issue: "issue";
|
|
323
|
+
"number-of-pages": "number-of-pages";
|
|
324
|
+
"number-of-volumes": "number-of-volumes";
|
|
325
|
+
page: "page";
|
|
326
|
+
"page-first": "page-first";
|
|
327
|
+
part: "part";
|
|
328
|
+
printing: "printing";
|
|
329
|
+
supplement: "supplement";
|
|
330
|
+
version: "version";
|
|
331
|
+
volume: "volume";
|
|
332
|
+
abstract: "abstract";
|
|
333
|
+
annote: "annote";
|
|
334
|
+
archive: "archive";
|
|
335
|
+
archive_collection: "archive_collection";
|
|
336
|
+
archive_location: "archive_location";
|
|
337
|
+
"archive-place": "archive-place";
|
|
338
|
+
authority: "authority";
|
|
339
|
+
"call-number": "call-number";
|
|
340
|
+
"citation-label": "citation-label";
|
|
341
|
+
"collection-title": "collection-title";
|
|
342
|
+
"container-title": "container-title";
|
|
343
|
+
"container-title-short": "container-title-short";
|
|
344
|
+
dimensions: "dimensions";
|
|
345
|
+
division: "division";
|
|
346
|
+
"event-place": "event-place";
|
|
347
|
+
"event-title": "event-title";
|
|
348
|
+
genre: "genre";
|
|
349
|
+
ISBN: "ISBN";
|
|
350
|
+
ISSN: "ISSN";
|
|
351
|
+
journalAbbreviation: "journalAbbreviation";
|
|
352
|
+
jurisdiction: "jurisdiction";
|
|
353
|
+
keyword: "keyword";
|
|
354
|
+
language: "language";
|
|
355
|
+
locator: "locator";
|
|
356
|
+
medium: "medium";
|
|
357
|
+
note: "note";
|
|
358
|
+
"original-publisher": "original-publisher";
|
|
359
|
+
"original-publisher-place": "original-publisher-place";
|
|
360
|
+
"original-title": "original-title";
|
|
361
|
+
"part-title": "part-title";
|
|
362
|
+
PMCID: "PMCID";
|
|
363
|
+
PMID: "PMID";
|
|
364
|
+
publisher: "publisher";
|
|
365
|
+
"publisher-place": "publisher-place";
|
|
366
|
+
references: "references";
|
|
367
|
+
"reviewed-genre": "reviewed-genre";
|
|
368
|
+
"reviewed-title": "reviewed-title";
|
|
369
|
+
scale: "scale";
|
|
370
|
+
section: "section";
|
|
371
|
+
shortTitle: "shortTitle";
|
|
372
|
+
source: "source";
|
|
373
|
+
status: "status";
|
|
374
|
+
title: "title";
|
|
375
|
+
"title-short": "title-short";
|
|
376
|
+
URL: "URL";
|
|
377
|
+
"volume-title": "volume-title";
|
|
378
|
+
"volume-title-short": "volume-title-short";
|
|
379
|
+
"year-suffix": "year-suffix";
|
|
380
|
+
custom: "custom";
|
|
381
|
+
categories: "categories";
|
|
382
|
+
}>>>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
/** The corpus before works: one entry per file, by sha. */
|
|
385
|
+
export declare const LegacyCorpus: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
386
|
+
kind: z.ZodEnum<{
|
|
387
|
+
pdf: "pdf";
|
|
388
|
+
doc: "doc";
|
|
389
|
+
docx: "docx";
|
|
390
|
+
xls: "xls";
|
|
391
|
+
xlsx: "xlsx";
|
|
392
|
+
zip: "zip";
|
|
393
|
+
gif: "gif";
|
|
394
|
+
jpg: "jpg";
|
|
395
|
+
tif: "tif";
|
|
396
|
+
txt: "txt";
|
|
397
|
+
html: "html";
|
|
398
|
+
xml: "xml";
|
|
399
|
+
}>;
|
|
400
|
+
title: z.ZodOptional<z.ZodString>;
|
|
401
|
+
citation: z.ZodOptional<z.ZodString>;
|
|
402
|
+
open: z.ZodOptional<z.ZodLiteral<true>>;
|
|
403
|
+
}, z.core.$strict>>;
|
|
404
|
+
type Corpus = z.infer<typeof Corpus>;
|
|
405
|
+
type Work = z.infer<typeof Work>;
|
|
406
|
+
type Legacy = Omit<z.infer<typeof LegacyCorpus>[string], 'open'> & {
|
|
407
|
+
open?: boolean;
|
|
408
|
+
};
|
|
409
|
+
type Judgment = {
|
|
410
|
+
work: string;
|
|
411
|
+
shas: string[];
|
|
412
|
+
judgment: Field | 'key';
|
|
413
|
+
};
|
|
414
|
+
/** Every held file by sha, with the work and edition holding it. */
|
|
415
|
+
export declare function papers(corpus: Corpus): Map<string, {
|
|
416
|
+
key: string;
|
|
417
|
+
work: Work;
|
|
418
|
+
edition: Work["editions"][number];
|
|
419
|
+
paper: z.infer<typeof Paper>;
|
|
420
|
+
}>;
|
|
421
|
+
/** What waits on a person: each placeholder's key, and each pending field. */
|
|
422
|
+
export declare function pending(corpus: Corpus): Judgment[];
|
|
423
|
+
/** The placeholder key of the file `sha`. */
|
|
424
|
+
export declare const placeholderOf: (sha: string) => string;
|
|
425
|
+
/** One legacy entry as a work of one edition, judging nothing. */
|
|
426
|
+
export declare function workOf(sha: string, { kind, title, citation, open }: Legacy): Work;
|
|
427
|
+
/** Today's corpus in the new shape, one work per sha, and the judgments it leaves. */
|
|
428
|
+
export declare function reshape(legacy: z.infer<typeof LegacyCorpus>): {
|
|
429
|
+
corpus: Corpus;
|
|
430
|
+
judgments: Judgment[];
|
|
431
|
+
};
|
|
432
|
+
export {};
|