Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions js/vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,19 @@ class Vault {
'motivation', 'purpose', 'profile'
])

// IIIF resource types for both Presentation API v2 (prefixed) and v3 (unprefixed)
// v2 types use prefixes: sc: (Shared Canvas), oa: (Open Annotation)
// v3 types are unprefixed
const iiifResourceTypes = new Set([
// IIIF Presentation API v3 (unprefixed)
'manifest', 'collection', 'canvas', 'annotation',
'annotationpage', 'annotationcollection', 'range',
'agent', 'annotationlist', 'sc:manifest', 'oa:annotationlist',
'oa:annotation'
'agent', // v3 metadata type for providers/creators
// IIIF Presentation API v2 (sc: prefix for Shared Canvas types)
'sc:manifest', 'sc:collection', 'sc:canvas', 'sc:sequence',
'sc:range', 'sc:layer',
// Open Annotation (oa: prefix) - v2 annotation types
'oa:annotation', 'oa:annotationlist' // annotationlist is v2; becomes annotationpage in v3
])

const dataType = this._normalizeType(data?.['@type'] ?? data?.type ?? type)
Expand Down