linked-rolls 0.68.0 → 0.70.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/lib/lookup/paths.d.ts +2 -0
- package/lib/lookup/paths.js +2 -0
- package/lib/model/Edition.d.ts +14 -3
- package/lib/schema.json +12 -3
- package/lib/spec/context.json +5 -1
- package/package.json +1 -1
package/lib/lookup/paths.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ export type Path = (string | number)[];
|
|
|
7
7
|
export declare const getAt: <T>(path: Path, obj: unknown) => T | undefined;
|
|
8
8
|
/** Where the entity with the id stands in the edition, or nothing where it holds none. */
|
|
9
9
|
export declare const pathIn: (edition: Edition, id: string) => Path | undefined;
|
|
10
|
+
/** Every id the edition gives an entity of its own, references left out. */
|
|
11
|
+
export declare const idsIn: (edition: Edition) => Iterable<string>;
|
|
10
12
|
/** Where the edition references the id. */
|
|
11
13
|
export declare const linksTo: (edition: Edition, id: string) => Path[];
|
package/lib/lookup/paths.js
CHANGED
|
@@ -74,5 +74,7 @@ export const pathIn = (edition, id) => {
|
|
|
74
74
|
const trail = placesIn(edition).paths.get(id);
|
|
75
75
|
return trail === undefined ? undefined : laidOut(trail);
|
|
76
76
|
};
|
|
77
|
+
/** Every id the edition gives an entity of its own, references left out. */
|
|
78
|
+
export const idsIn = (edition) => placesIn(edition).paths.keys();
|
|
77
79
|
/** Where the edition references the id. */
|
|
78
80
|
export const linksTo = (edition, id) => (placesIn(edition).links.get(id) ?? []).map(laidOut);
|
package/lib/model/Edition.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ export interface EditionCreation {
|
|
|
21
21
|
*/
|
|
22
22
|
publisher: Person;
|
|
23
23
|
/**
|
|
24
|
-
* The date on which the edition was published
|
|
24
|
+
* The date on which the edition was published: where it states a
|
|
25
|
+
* version, the date of that version.
|
|
25
26
|
* @format date
|
|
26
27
|
* @see dcterms:date
|
|
27
28
|
*/
|
|
@@ -116,6 +117,16 @@ export interface Edition {
|
|
|
116
117
|
* @example "https://creativecommons.org/licenses/by/4.0/"
|
|
117
118
|
*/
|
|
118
119
|
license: string;
|
|
120
|
+
/**
|
|
121
|
+
* The version of the edition, which a citation names together with
|
|
122
|
+
* the publication date. The editor raises it for each release and
|
|
123
|
+
* sets the publication date with it, so that what a reader cited can
|
|
124
|
+
* be told from what has changed since. An edition published before
|
|
125
|
+
* this field existed states none.
|
|
126
|
+
* @see owl:versionInfo
|
|
127
|
+
* @example "1.0"
|
|
128
|
+
*/
|
|
129
|
+
version?: string;
|
|
119
130
|
/**
|
|
120
131
|
* The roll which is edited in this edition.
|
|
121
132
|
* @see lrmoo:R3i realises
|
|
@@ -135,7 +146,7 @@ export interface Edition {
|
|
|
135
146
|
* best, since its places are what notes and readers cite. Left out,
|
|
136
147
|
* it is the first copy with features that is not aligned
|
|
137
148
|
* (`referenceCopyOf`).
|
|
138
|
-
*
|
|
149
|
+
* @see reo:referenceCopy
|
|
139
150
|
*/
|
|
140
151
|
referenceCopy?: string;
|
|
141
152
|
/**
|
|
@@ -145,7 +156,7 @@ export interface Edition {
|
|
|
145
156
|
*/
|
|
146
157
|
versions: Version[];
|
|
147
158
|
}
|
|
148
|
-
export type EditionMetadata = Pick<Edition, 'base' | 'title' | 'license' | 'creation' | 'roll'>;
|
|
159
|
+
export type EditionMetadata = Pick<Edition, 'base' | 'title' | 'license' | 'version' | 'creation' | 'roll'>;
|
|
149
160
|
/**
|
|
150
161
|
* The copy whose millimetres are the edition's axis: the one it names,
|
|
151
162
|
* or where it names none or one it no longer has, the first copy with
|
package/lib/schema.json
CHANGED
|
@@ -601,8 +601,9 @@
|
|
|
601
601
|
"ontology": "dcterms:license"
|
|
602
602
|
},
|
|
603
603
|
"referenceCopy": {
|
|
604
|
-
"description": "The copy whose millimetres are the edition's axis, by id: every place the edition gives along the roll is a place on this copy's paper, counted from where its scan begins, and every other copy is aligned onto it. Choosing it is the one editorial decision the alignment leaves; a copy scanned whole and without tears serves best, since its places are what notes and readers cite. Left out, it is the first copy with features that is not aligned (`referenceCopyOf`).
|
|
605
|
-
"type": "string"
|
|
604
|
+
"description": "The copy whose millimetres are the edition's axis, by id: every place the edition gives along the roll is a place on this copy's paper, counted from where its scan begins, and every other copy is aligned onto it. Choosing it is the one editorial decision the alignment leaves; a copy scanned whole and without tears serves best, since its places are what notes and readers cite. Left out, it is the first copy with features that is not aligned (`referenceCopyOf`).",
|
|
605
|
+
"type": "string",
|
|
606
|
+
"ontology": "reo:referenceCopy"
|
|
606
607
|
},
|
|
607
608
|
"roll": {
|
|
608
609
|
"$ref": "#/definitions/Roll",
|
|
@@ -617,6 +618,14 @@
|
|
|
617
618
|
"type": "string",
|
|
618
619
|
"ontology": "dcterms:title"
|
|
619
620
|
},
|
|
621
|
+
"version": {
|
|
622
|
+
"description": "The version of the edition, which a citation names together with the publication date. The editor raises it for each release and sets the publication date with it, so that what a reader cited can be told from what has changed since. An edition published before this field existed states none.",
|
|
623
|
+
"examples": [
|
|
624
|
+
"1.0"
|
|
625
|
+
],
|
|
626
|
+
"type": "string",
|
|
627
|
+
"ontology": "owl:versionInfo"
|
|
628
|
+
},
|
|
620
629
|
"versions": {
|
|
621
630
|
"description": "The different versions of the roll on which this edition is based.",
|
|
622
631
|
"items": {
|
|
@@ -649,7 +658,7 @@
|
|
|
649
658
|
"ontology": "crm:P14 carried out by"
|
|
650
659
|
},
|
|
651
660
|
"publicationDate": {
|
|
652
|
-
"description": "The date on which the edition was published.",
|
|
661
|
+
"description": "The date on which the edition was published: where it states a version, the date of that version.",
|
|
653
662
|
"format": "date",
|
|
654
663
|
"type": "string",
|
|
655
664
|
"ontology": "dcterms:date"
|
package/lib/spec/context.json
CHANGED
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"title": "dcterms:title",
|
|
100
|
+
"version": "owl:versionInfo",
|
|
100
101
|
"license": {
|
|
101
102
|
"@id": "dcterms:license",
|
|
102
103
|
"@type": "@id"
|
|
@@ -117,7 +118,10 @@
|
|
|
117
118
|
"@type": "xsd:date"
|
|
118
119
|
},
|
|
119
120
|
"collationTolerance": null,
|
|
120
|
-
"referenceCopy":
|
|
121
|
+
"referenceCopy": {
|
|
122
|
+
"@id": "reo:referenceCopy",
|
|
123
|
+
"@type": "@id"
|
|
124
|
+
},
|
|
121
125
|
"annotation": null,
|
|
122
126
|
"roll": "lrmoo:R3i_realises",
|
|
123
127
|
"catalogueNumber": "dcterms:identifier",
|
package/package.json
CHANGED