linked-rolls 0.68.0 → 0.69.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.
@@ -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[];
@@ -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);
@@ -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
@@ -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
@@ -617,6 +617,14 @@
617
617
  "type": "string",
618
618
  "ontology": "dcterms:title"
619
619
  },
620
+ "version": {
621
+ "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.",
622
+ "examples": [
623
+ "1.0"
624
+ ],
625
+ "type": "string",
626
+ "ontology": "owl:versionInfo"
627
+ },
620
628
  "versions": {
621
629
  "description": "The different versions of the roll on which this edition is based.",
622
630
  "items": {
@@ -649,7 +657,7 @@
649
657
  "ontology": "crm:P14 carried out by"
650
658
  },
651
659
  "publicationDate": {
652
- "description": "The date on which the edition was published.",
660
+ "description": "The date on which the edition was published: where it states a version, the date of that version.",
653
661
  "format": "date",
654
662
  "type": "string",
655
663
  "ontology": "dcterms:date"
@@ -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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linked-rolls",
3
- "version": "0.68.0",
3
+ "version": "0.69.0",
4
4
  "description": "Digital editions of piano rolls: import, collation, editorial assumptions, JSON-LD export, and emulation through a reproducing system",
5
5
  "license": "MIT",
6
6
  "repository": {