linked-rolls 0.0.1
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 +18 -0
- package/lib/Collation.d.ts +4 -0
- package/lib/Collation.js +1 -0
- package/lib/Condition.d.ts +10 -0
- package/lib/Condition.js +1 -0
- package/lib/ConditionState.d.ts +9 -0
- package/lib/ConditionState.js +6 -0
- package/lib/Edit.d.ts +21 -0
- package/lib/Edit.js +112 -0
- package/lib/Edition.d.ts +54 -0
- package/lib/Edition.js +1 -0
- package/lib/EditorialAssumption.d.ts +67 -0
- package/lib/EditorialAssumption.js +26 -0
- package/lib/Emulation.d.ts +76 -0
- package/lib/Emulation.js +474 -0
- package/lib/Feature.d.ts +37 -0
- package/lib/Feature.js +3 -0
- package/lib/Measurement.d.ts +9 -0
- package/lib/Measurement.js +1 -0
- package/lib/PlaceTimeConversion.d.ts +65 -0
- package/lib/PlaceTimeConversion.js +175 -0
- package/lib/RollCopy.d.ts +85 -0
- package/lib/RollCopy.js +273 -0
- package/lib/RollEvent.d.ts +76 -0
- package/lib/RollEvent.js +3 -0
- package/lib/Stage.d.ts +37 -0
- package/lib/Stage.js +165 -0
- package/lib/Symbol.d.ts +62 -0
- package/lib/Symbol.js +29 -0
- package/lib/TrackerBar.d.ts +8 -0
- package/lib/TrackerBar.js +53 -0
- package/lib/Transcription.d.ts +7 -0
- package/lib/Transcription.js +9 -0
- package/lib/Version.d.ts +42 -0
- package/lib/Version.js +217 -0
- package/lib/WithId.d.ts +3 -0
- package/lib/WithId.js +1 -0
- package/lib/alignFeatures.d.ts +11 -0
- package/lib/alignFeatures.js +54 -0
- package/lib/alignRolls.d.ts +7 -0
- package/lib/alignRolls.js +49 -0
- package/lib/alignSymbols.d.ts +7 -0
- package/lib/alignSymbols.js +49 -0
- package/lib/asJsonLd.d.ts +3 -0
- package/lib/asJsonLd.js +67 -0
- package/lib/asMIDISpans.d.ts +23 -0
- package/lib/asMIDISpans.js +111 -0
- package/lib/aton/AtonParser.d.ts +48 -0
- package/lib/aton/AtonParser.js +245 -0
- package/lib/aton/AtonParser.test.d.ts +1 -0
- package/lib/aton/AtonParser.test.js +16 -0
- package/lib/build-schema.cjs +113 -0
- package/lib/context.d.ts +1 -0
- package/lib/context.js +1 -0
- package/lib/importJsonLd.d.ts +4 -0
- package/lib/importJsonLd.js +121 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +17 -0
- package/lib/spec/context.json +192 -0
- package/package.json +27 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
// build-schema.ts
|
|
48
|
+
var ts_json_schema_generator_1 = require("ts-json-schema-generator");
|
|
49
|
+
var fs = __importStar(require("fs"));
|
|
50
|
+
/** Safely check if a referenced type is an ObjectType with a string `id` property. */
|
|
51
|
+
function refTargetsRefableObject(ref, fmt) {
|
|
52
|
+
var _a;
|
|
53
|
+
var target = ref.getType();
|
|
54
|
+
// console.log('target', target, target instanceof ObjectType)
|
|
55
|
+
// if (!(target instanceof ObjectType)) return false;
|
|
56
|
+
// Ask the default formatter for the *object's* definition and inspect its properties.
|
|
57
|
+
// This is safe because 'target' isn't a ReferenceType, so the built-ins will produce
|
|
58
|
+
// the object schema (possibly via $ref creation behind the scenes).
|
|
59
|
+
var def = fmt.getDefinition(target);
|
|
60
|
+
console.log('def=', def);
|
|
61
|
+
var idSchema = (_a = def === null || def === void 0 ? void 0 : def.properties) === null || _a === void 0 ? void 0 : _a.id;
|
|
62
|
+
if (!idSchema)
|
|
63
|
+
return false;
|
|
64
|
+
// Accept plain string or unions that contain string
|
|
65
|
+
return idSchema.type === "string" ||
|
|
66
|
+
(Array.isArray(idSchema.anyOf) && idSchema.anyOf.some(function (s) { return (s === null || s === void 0 ? void 0 : s.type) === "string"; }));
|
|
67
|
+
}
|
|
68
|
+
/** Wrap only ReferenceType occurrences to ref-able objects as oneOf($ref, "#id"). */
|
|
69
|
+
var RefableReferenceWrapper = /** @class */ (function () {
|
|
70
|
+
function RefableReferenceWrapper(child) {
|
|
71
|
+
this.child = child;
|
|
72
|
+
}
|
|
73
|
+
// Only intercept ReferenceType; let built-ins handle everything else.
|
|
74
|
+
RefableReferenceWrapper.prototype.supportsType = function (type) {
|
|
75
|
+
return type instanceof ts_json_schema_generator_1.ReferenceType;
|
|
76
|
+
};
|
|
77
|
+
RefableReferenceWrapper.prototype.getDefinition = function (type) {
|
|
78
|
+
console.log('ref type', type);
|
|
79
|
+
var isRefable = type.getType().type.type.properties.findIndex(function (p) { return p.name === 'id'; }) !== -1;
|
|
80
|
+
// Let the built-in ReferenceTypeFormatter do its thing first ($ref, etc.)
|
|
81
|
+
var original = this.child.getDefinition(type);
|
|
82
|
+
// If the reference points to an object with string `id`, allow "#id" as alternative.
|
|
83
|
+
if (isRefable) {
|
|
84
|
+
console.log('is refable', type);
|
|
85
|
+
// Avoid double-wrapping if something upstream already produced oneOf.
|
|
86
|
+
if (original && original.oneOf)
|
|
87
|
+
return original;
|
|
88
|
+
return original;
|
|
89
|
+
//return {
|
|
90
|
+
// oneOf: [
|
|
91
|
+
// original, // usually { "$ref": "#/definitions/..." }
|
|
92
|
+
// { type: "string", pattern: "^#.+$" }, // your "#<id>" form; tighten regex if needed
|
|
93
|
+
// ],
|
|
94
|
+
// };
|
|
95
|
+
}
|
|
96
|
+
return original;
|
|
97
|
+
};
|
|
98
|
+
RefableReferenceWrapper.prototype.getChildren = function (type) {
|
|
99
|
+
// Always delegate. Do NOT call .getType() here—let the chain manage traversal.
|
|
100
|
+
return this.child.getChildren(type);
|
|
101
|
+
};
|
|
102
|
+
return RefableReferenceWrapper;
|
|
103
|
+
}());
|
|
104
|
+
// ——— Wire up the generator ———
|
|
105
|
+
var config = __assign(__assign({}, ts_json_schema_generator_1.DEFAULT_CONFIG), { path: "../src/**/*.ts", tsconfig: "tsconfig.json", type: "Edition" });
|
|
106
|
+
var formatter = (0, ts_json_schema_generator_1.createFormatter)(config, function (fmt, circular) {
|
|
107
|
+
fmt.addTypeFormatter(new RefableReferenceWrapper(circular));
|
|
108
|
+
});
|
|
109
|
+
var program = (0, ts_json_schema_generator_1.createProgram)(config);
|
|
110
|
+
var parser = (0, ts_json_schema_generator_1.createParser)(program, config);
|
|
111
|
+
var generator = new ts_json_schema_generator_1.SchemaGenerator(program, parser, formatter, config);
|
|
112
|
+
var schema = generator.createSchema(config.type);
|
|
113
|
+
fs.writeFileSync("./context.json", JSON.stringify(schema, null, 2));
|
package/lib/context.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as jsonLdContext } from './spec/context.json';
|
package/lib/context.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as jsonLdContext } from './spec/context.json';
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { RollCopy } from "./RollCopy";
|
|
2
|
+
import { referenceTypes } from "./asJsonLd";
|
|
3
|
+
export const exportDate = (date) => {
|
|
4
|
+
return `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`;
|
|
5
|
+
};
|
|
6
|
+
const isDate = (value) => {
|
|
7
|
+
const datePattern = /^\d{4}-\d{1,2}-\d{1,2}$/;
|
|
8
|
+
return datePattern.test(value);
|
|
9
|
+
};
|
|
10
|
+
export const importDate = (str) => {
|
|
11
|
+
const [y, m, d] = str.split('-').map(s => parseInt(s, 10));
|
|
12
|
+
if ([y, m, d].some(n => isNaN(n))) {
|
|
13
|
+
throw new Error(`Invalid date format: "${str}". Expected "YYYY-MM-DD".`);
|
|
14
|
+
}
|
|
15
|
+
return new Date(y, m - 1, d);
|
|
16
|
+
};
|
|
17
|
+
const collectEntitiesWithId = (json) => {
|
|
18
|
+
const result = new Map();
|
|
19
|
+
// Check if the current object has an `id` property and store it
|
|
20
|
+
if (json && typeof json === 'object') {
|
|
21
|
+
if ('@id' in json) {
|
|
22
|
+
result.set(json['@id'], json);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// Recursively search within arrays or nested objects
|
|
26
|
+
for (const key in json) {
|
|
27
|
+
if (Array.isArray(json[key])) {
|
|
28
|
+
for (const item of json[key]) {
|
|
29
|
+
collectEntitiesWithId(item).forEach((v, k) => result.set(k, v));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (typeof json[key] === 'object' && json[key] !== null) {
|
|
33
|
+
collectEntitiesWithId(json[key]).forEach((v, k) => result.set(k, v));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
const fromIDArray = (arr, entities) => {
|
|
39
|
+
return arr.map(id => {
|
|
40
|
+
const entity = entities.get(id);
|
|
41
|
+
if (!entity) {
|
|
42
|
+
console.warn('Could not find entity with id', id);
|
|
43
|
+
}
|
|
44
|
+
return entity;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const fromJsonLdEntity = (json, entitiesWithId) => {
|
|
48
|
+
if (typeof json !== 'object') {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
let result = json;
|
|
52
|
+
if ('@type' in json) {
|
|
53
|
+
const value = json['@type'];
|
|
54
|
+
if (value === 'RollCopy') {
|
|
55
|
+
result = new RollCopy();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
result['type'] = value;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
for (const [key, value] of Object.entries(json)) {
|
|
62
|
+
if (key === '@id') {
|
|
63
|
+
result['id'] = value;
|
|
64
|
+
}
|
|
65
|
+
if (typeof value === 'string' && isDate(value)) {
|
|
66
|
+
console.log('importing date', value);
|
|
67
|
+
result[key] = importDate(value);
|
|
68
|
+
}
|
|
69
|
+
else if ([...referenceTypes, 'premises', 'delete', 'comprehends', 'assigned'].includes(key)) {
|
|
70
|
+
if (Array.isArray(value) && value.every(e => typeof e === 'string')) {
|
|
71
|
+
result[key] = fromIDArray(value, entitiesWithId);
|
|
72
|
+
}
|
|
73
|
+
else if (typeof value === 'string') {
|
|
74
|
+
if (isDate(value)) {
|
|
75
|
+
console.log('treating', value, 'as date');
|
|
76
|
+
result[key] = importDate(value);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (value.startsWith('1905')) {
|
|
80
|
+
console.log('oh no, dealing with a date, but it is treated as a string!', value);
|
|
81
|
+
}
|
|
82
|
+
const entity = entitiesWithId.get(value);
|
|
83
|
+
if (entity) {
|
|
84
|
+
result[key] = entity;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
result[key] = value;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (Array.isArray(value)) {
|
|
93
|
+
result[key] = value.map(v => {
|
|
94
|
+
if (typeof v === 'string') {
|
|
95
|
+
if (isDate(v)) {
|
|
96
|
+
return importDate(v);
|
|
97
|
+
}
|
|
98
|
+
return v;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return fromJsonLdEntity(v, entitiesWithId);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
else if (typeof value === 'object') {
|
|
106
|
+
result[key] = fromJsonLdEntity(value, entitiesWithId);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
result[key] = value;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return result;
|
|
113
|
+
};
|
|
114
|
+
export const importJsonLd = (json) => {
|
|
115
|
+
const entitiesWithId = collectEntitiesWithId(json);
|
|
116
|
+
const edition = fromJsonLdEntity(json, entitiesWithId);
|
|
117
|
+
if (Array.isArray(json['@context'])) {
|
|
118
|
+
edition.base = json['@context'].find((c) => c['@base'])?.['@base'] || '';
|
|
119
|
+
}
|
|
120
|
+
return edition;
|
|
121
|
+
};
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './asJsonLd';
|
|
2
|
+
export * from './Collation';
|
|
3
|
+
export * from './ConditionState';
|
|
4
|
+
export * from './context';
|
|
5
|
+
export * from './Edit';
|
|
6
|
+
export * from './Edition';
|
|
7
|
+
export * from './EditorialAssumption';
|
|
8
|
+
export * from './Emulation';
|
|
9
|
+
export * from './Feature';
|
|
10
|
+
export * from './importJsonLd';
|
|
11
|
+
export * from './PlaceTimeConversion';
|
|
12
|
+
export * from './RollCopy';
|
|
13
|
+
export * from './Version';
|
|
14
|
+
export * from './Symbol';
|
|
15
|
+
export * from './TrackerBar';
|
|
16
|
+
export * from './WithId';
|
|
17
|
+
export * from './alignFeatures';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './asJsonLd';
|
|
2
|
+
export * from './Collation';
|
|
3
|
+
export * from './ConditionState';
|
|
4
|
+
export * from './context';
|
|
5
|
+
export * from './Edit';
|
|
6
|
+
export * from './Edition';
|
|
7
|
+
export * from './EditorialAssumption';
|
|
8
|
+
export * from './Emulation';
|
|
9
|
+
export * from './Feature';
|
|
10
|
+
export * from './importJsonLd';
|
|
11
|
+
export * from './PlaceTimeConversion';
|
|
12
|
+
export * from './RollCopy';
|
|
13
|
+
export * from './Version';
|
|
14
|
+
export * from './Symbol';
|
|
15
|
+
export * from './TrackerBar';
|
|
16
|
+
export * from './WithId';
|
|
17
|
+
export * from './alignFeatures';
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"crm": "http://www.cidoc-crm.org/cidoc-crm/",
|
|
4
|
+
"lrmoo": "http://iflastandards.info/ns/lrm/lrmoo/",
|
|
5
|
+
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
|
|
6
|
+
"owl": "http://www.w3.org/2002/07/owl#",
|
|
7
|
+
"reo": "http://linked-rolls.org/reo/",
|
|
8
|
+
"@vocab": "http://linked-rolls.org/reo/",
|
|
9
|
+
"C11_Derivation": {
|
|
10
|
+
"@id": "reo:C11_Derivation",
|
|
11
|
+
"@context": {
|
|
12
|
+
"original": {
|
|
13
|
+
"@id": "reo:P10_used",
|
|
14
|
+
"@type": "@id"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"C12_Version": {
|
|
19
|
+
"@id": "reo:C12_Version",
|
|
20
|
+
"@context": {
|
|
21
|
+
"siglum": {
|
|
22
|
+
"@id": "reo:P22_is_identified_by",
|
|
23
|
+
"@type": "xsd:string"
|
|
24
|
+
},
|
|
25
|
+
"witnesses": {
|
|
26
|
+
"@id": "reo:P2i_is_witnessed_by",
|
|
27
|
+
"@type": "@id"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"C13_Version_Creation": {
|
|
32
|
+
"@id": "reo:C13_Version_Creation",
|
|
33
|
+
"@context": {
|
|
34
|
+
"created": {
|
|
35
|
+
"@id": "reo:P15_created_version",
|
|
36
|
+
"@type": "reo:C12_Version"
|
|
37
|
+
},
|
|
38
|
+
"basedOn": {
|
|
39
|
+
"@id": "reo:P10i_is_based_on",
|
|
40
|
+
"@type": "reo:C11_Derivation"
|
|
41
|
+
},
|
|
42
|
+
"edits": {
|
|
43
|
+
"@id": "reo:P16_involved_edit",
|
|
44
|
+
"@type": "reo:C8_Edit"
|
|
45
|
+
},
|
|
46
|
+
"intentions": {
|
|
47
|
+
"@id": "reo:P18_was_motivated_by",
|
|
48
|
+
"@type": "reo:C9_Assumed_Intention"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"C9_Assument_Intention": {
|
|
53
|
+
"@id": "reo:C9_Assumed_Intention",
|
|
54
|
+
"@context": {
|
|
55
|
+
"description": {
|
|
56
|
+
"@id": "reo:P23_has_description",
|
|
57
|
+
"@type": "xsd:string"
|
|
58
|
+
},
|
|
59
|
+
"belief": {
|
|
60
|
+
"@id": "crminf:J4i_is_subject_to",
|
|
61
|
+
"@type": "crminf:I2_Belief"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"crminf:I2_Belief": {
|
|
66
|
+
"@id": "crminf:I2_Belief",
|
|
67
|
+
"@context": {
|
|
68
|
+
"certainty": {
|
|
69
|
+
"@id": "crminf:J5_holds_to_be",
|
|
70
|
+
"@type": "xsd:string"
|
|
71
|
+
},
|
|
72
|
+
"reasons": {
|
|
73
|
+
"@id": "crminf:J2i_was_concluded_by",
|
|
74
|
+
"@type": "crminf:Argumentation"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"C1_Witness": {
|
|
79
|
+
"@context": {
|
|
80
|
+
"@base": "copy/",
|
|
81
|
+
"siglum": {
|
|
82
|
+
"@id": "reo:P21_is_identified_by",
|
|
83
|
+
"@type": "xsd:string"
|
|
84
|
+
},
|
|
85
|
+
"productionEvent": {
|
|
86
|
+
"@id": "lrmoo:R28i_was_produced_by",
|
|
87
|
+
"@type": "lrmoo:F33_Reproduction_Event",
|
|
88
|
+
"@context": {
|
|
89
|
+
"date": {
|
|
90
|
+
"@id": "crm:P4_has_time-span",
|
|
91
|
+
"@type": "xsd:dateTime"
|
|
92
|
+
},
|
|
93
|
+
"paper": {
|
|
94
|
+
"@id": "crm:P126_employed",
|
|
95
|
+
"@type": "@id"
|
|
96
|
+
},
|
|
97
|
+
"company": {
|
|
98
|
+
"@id": "crm:P14_was_carried_out_by",
|
|
99
|
+
"@type": "@id"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"location": {
|
|
104
|
+
"@id": "crm:P53_has_current_or_former_location",
|
|
105
|
+
"@type": "xsd:string"
|
|
106
|
+
},
|
|
107
|
+
"measurements": {
|
|
108
|
+
"@id": "crm:P39i_was_measured_by",
|
|
109
|
+
"@type": "reo:RollMeasurement",
|
|
110
|
+
"@context": {
|
|
111
|
+
"date": {
|
|
112
|
+
"@id": "crm:P4_has_time-span",
|
|
113
|
+
"@type": "xsd:dateTime"
|
|
114
|
+
},
|
|
115
|
+
"software": {
|
|
116
|
+
"@id": "crmdig:L23_used_software_or_firmware",
|
|
117
|
+
"@type": "@id"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
"events": {
|
|
122
|
+
"@id": "crm:P128_carries",
|
|
123
|
+
"@context": {
|
|
124
|
+
"measurement": {
|
|
125
|
+
"@id": "crmdig:L20i_was_created_by",
|
|
126
|
+
"@type": "@id"
|
|
127
|
+
},
|
|
128
|
+
"annotates": {
|
|
129
|
+
"@id": "crm:P62i_is_depicted_by",
|
|
130
|
+
"@type": "@id"
|
|
131
|
+
},
|
|
132
|
+
"horizontal": {
|
|
133
|
+
"@id": "crm:P43_has_dimension",
|
|
134
|
+
"@type": "reo:C5_Event_Span"
|
|
135
|
+
},
|
|
136
|
+
"vertical": {
|
|
137
|
+
"@id": "crm:P43_has_dimension",
|
|
138
|
+
"@type": "reo:C5_Event_Span"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"stamp": {
|
|
145
|
+
"@type": "reo:C7_Stamp",
|
|
146
|
+
"@context": {
|
|
147
|
+
"text": {
|
|
148
|
+
"@id": "reo:has_text"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"publicationEvent": {
|
|
153
|
+
"@id": "lrmoo:R17i_was_created_by",
|
|
154
|
+
"@type": "lrmoo:F28_Expression_Creation",
|
|
155
|
+
"@context": {
|
|
156
|
+
"publicationDate": {
|
|
157
|
+
"@id": "crm:P4_has_time-span",
|
|
158
|
+
"@type": "xsd:dateTime"
|
|
159
|
+
},
|
|
160
|
+
"publisher": {
|
|
161
|
+
"@id": "crm:P14_carried_out_by",
|
|
162
|
+
"@type": "crm:E21_Person",
|
|
163
|
+
"@context": {
|
|
164
|
+
"name": {
|
|
165
|
+
"@id": "rdfs:label",
|
|
166
|
+
"@type": "xsd:string"
|
|
167
|
+
},
|
|
168
|
+
"sameAs": {
|
|
169
|
+
"@id": "owl:sameAs",
|
|
170
|
+
"@type": "@id"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"title": "crm:P102_has_title",
|
|
177
|
+
"license": {
|
|
178
|
+
"@id": "crm:P104_is_subject_to",
|
|
179
|
+
"@type": "@id"
|
|
180
|
+
},
|
|
181
|
+
"copies": {
|
|
182
|
+
"@id": "lrmoo:R2_is_derivative_of",
|
|
183
|
+
"@type": "reo:C1_Witness"
|
|
184
|
+
},
|
|
185
|
+
"collation": "crm:P9_consists_of",
|
|
186
|
+
"versions": {
|
|
187
|
+
"@id": "crm:P9_consists_of",
|
|
188
|
+
"@type": "reo:C13_Version_Creation"
|
|
189
|
+
},
|
|
190
|
+
"questions": "crm:P9_consists_of"
|
|
191
|
+
}
|
|
192
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "linked-rolls",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"files": ["lib", "README.md", "LICENSE"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"test": "vitest",
|
|
11
|
+
"compile:schema": "tsc build-schema.ts --outDir lib --esModuleInterop --skipLibCheck && mv lib/build-schema.js lib/build-schema.cjs",
|
|
12
|
+
"build:schema": "npm run compile:schema && node lib/build-schema.cjs"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"typescript": "^5.6.0-dev.20240809",
|
|
16
|
+
"vite": "^5.0.8",
|
|
17
|
+
"vitest": "^1.2.0"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@types/uuid": "^10.0.0",
|
|
21
|
+
"aton": "^0.0.4",
|
|
22
|
+
"fast-xml-parser": "^4.4.1",
|
|
23
|
+
"midifile-ts": "^1.5.1",
|
|
24
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
25
|
+
"uuid": "^10.0.0"
|
|
26
|
+
}
|
|
27
|
+
}
|