diff --git a/package.json b/package.json index ad7df0b..eb4e4dd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "maniiifest", - "version": "1.1.6", + "version": "1.1.7", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ diff --git a/src/specification.atd b/src/specification.atd index 80277bb..a26573c 100644 --- a/src/specification.atd +++ b/src/specification.atd @@ -448,7 +448,7 @@ type motivation_t2 = string list type annotation_collection_t = { inherit class_t; - ?rendering : rendering_t option; + ?rendering : rendering_t list option; ?partOf : part_of_t option; ?total : total_t option; ?first : first_t option; @@ -476,7 +476,7 @@ type first_t2 = { type range_t = { inherit class_t; - ?rendering : rendering_t option; + ?rendering : rendering_t list option; ?supplementary : annotation_collection_t option; ?service : service_t list option; ?placeholderCanvas : placeholder_canvas_t option; diff --git a/src/specification.ts b/src/specification.ts index fc30c45..bd117f2 100644 --- a/src/specification.ts +++ b/src/specification.ts @@ -553,7 +553,7 @@ export type AnnotationCollectionT = { id: IdT; type: TypeT; label?: LabelT; - rendering?: RenderingT; + rendering?: RenderingT[]; partOf?: PartOfT; total?: TotalT; first?: FirstT; @@ -582,7 +582,7 @@ export type RangeT = { id: IdT; type: TypeT; label?: LabelT; - rendering?: RenderingT; + rendering?: RenderingT[]; supplementary?: AnnotationCollectionT; service?: ServiceT[]; placeholderCanvas?: PlaceholderCanvasT; @@ -2249,7 +2249,7 @@ export function writeAnnotationCollectionT(x: AnnotationCollectionT, context: an 'id': _atd_write_required_field('AnnotationCollectionT', 'id', writeIdT, x.id, x), 'type': _atd_write_required_field('AnnotationCollectionT', 'type', writeTypeT, x.type, x), 'label': _atd_write_optional_field(writeLabelT, x.label, x), - 'rendering': _atd_write_optional_field(writeRenderingT, x.rendering, x), + 'rendering': _atd_write_optional_field(_atd_write_array(writeRenderingT), x.rendering, x), 'partOf': _atd_write_optional_field(writePartOfT, x.partOf, x), 'total': _atd_write_optional_field(writeTotalT, x.total, x), 'first': _atd_write_optional_field(writeFirstT, x.first, x), @@ -2265,7 +2265,7 @@ export function readAnnotationCollectionT(x: any, context: any = x): AnnotationC id: _atd_read_required_field('AnnotationCollectionT', 'id', readIdT, x['id'], x), type: _atd_read_required_field('AnnotationCollectionT', 'type', readTypeT, x['type'], x), label: _atd_read_optional_field(readLabelT, x['label'], x), - rendering: _atd_read_optional_field(readRenderingT, x['rendering'], x), + rendering: _atd_read_optional_field(_atd_read_array(readRenderingT), x['rendering'], x), partOf: _atd_read_optional_field(readPartOfT, x['partOf'], x), total: _atd_read_optional_field(readTotalT, x['total'], x), first: _atd_read_optional_field(readFirstT, x['first'], x), @@ -2333,7 +2333,7 @@ export function writeRangeT(x: RangeT, context: any = x): any { 'id': _atd_write_required_field('RangeT', 'id', writeIdT, x.id, x), 'type': _atd_write_required_field('RangeT', 'type', writeTypeT, x.type, x), 'label': _atd_write_optional_field(writeLabelT, x.label, x), - 'rendering': _atd_write_optional_field(writeRenderingT, x.rendering, x), + 'rendering': _atd_write_optional_field(_atd_write_array(writeRenderingT), x.rendering, x), 'supplementary': _atd_write_optional_field(writeAnnotationCollectionT, x.supplementary, x), 'service': _atd_write_optional_field(_atd_write_array(writeServiceT), x.service, x), 'placeholderCanvas': _atd_write_optional_field(writePlaceholderCanvasT, x.placeholderCanvas, x), @@ -2350,7 +2350,7 @@ export function readRangeT(x: any, context: any = x): RangeT { id: _atd_read_required_field('RangeT', 'id', readIdT, x['id'], x), type: _atd_read_required_field('RangeT', 'type', readTypeT, x['type'], x), label: _atd_read_optional_field(readLabelT, x['label'], x), - rendering: _atd_read_optional_field(readRenderingT, x['rendering'], x), + rendering: _atd_read_optional_field(_atd_read_array(readRenderingT), x['rendering'], x), supplementary: _atd_read_optional_field(readAnnotationCollectionT, x['supplementary'], x), service: _atd_read_optional_field(_atd_read_array(readServiceT), x['service'], x), placeholderCanvas: _atd_read_optional_field(readPlaceholderCanvasT, x['placeholderCanvas'], x),