Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iiif/presentation-3

Package Overview
Dependencies
Maintainers
4
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iiif/presentation-3 - npm Package Compare versions

Comparing version 1.1.1 to 2.0.0

20

package.json
{
"name": "@iiif/presentation-3",
"description": "IIIF Presentation v3.0 typescript types",
"version": "1.1.1",
"version": "2.0.0",
"source": "index.js",

@@ -17,3 +17,3 @@ "types": "dist/presentation-3.d.ts",

"dependencies": {
"@types/geojson": "^7946.0.7"
"@types/geojson": "^7946.0.10"
},

@@ -25,13 +25,11 @@ "files": [

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"dts-bundle-generator": "^6.12.0",
"eslint": "^8.7.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.4.7",
"prettier": "^2.5.1",
"tslib": "^2.3.1",
"typescript": "^4.5.5"
"eslint": "^8.20.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"tslib": "^2.4.0",
"typescript": "^4.7.4"
}
}
# IIIF Presentation 3 types
A set of types that describe the format of the IIIF Presentation 3.0 specification as accurately as possible.
Installation:
```
$ npm i @iiif/presentation-3
```
Installation (yarn):
```

@@ -14,2 +18,3 @@ $ yarn add @iiif/presentation-3

Usage (Typescript):
```typescript

@@ -21,3 +26,3 @@ import { Manifest } from '@iiif/presentation-3';

function doSomethingWithManifest(manifest: Manifest) {
// ...
// ...
}

@@ -27,2 +32,3 @@ ```

Usage (Javascript):
```javascript

@@ -43,3 +49,3 @@ /**

function doSomethingWithManifest(manifest) {
console.log(manifest.label);
console.log(manifest.label);
}

@@ -71,11 +77,11 @@

* Range
* Service
* Service
With some other types that aim to cover common services:
* Auth service
* GeoJSON service
* Image service
* Image service
* Search service
### Full List of types

@@ -85,71 +91,70 @@

Type | Description
--- | ---
**ResourceType** | String literals for the possible values of `type`
**InternationalString** | Common language property (`{ "none": ["..."] }`)
**Reference** | A reference to another resources (`{id: '..', type: '..'}`)
**JsonLDContext** | A partial of `{'@context': ... }`, extended by resources with contexts
**MetadataItem** | Label value pair used in the metadata field
**SpecificationBehaviors** | String literals for supported behaviors mentioned in the specification
**SpecificationTimeMode** | String literals for supported time modes mentioned in the specification
**ViewingDirection** | String literal for the 4 supported viewing directions
| Type | Description |
|----------------------------|-------------------------------------------------------------------------|
| **ResourceType** | String literals for the possible values of `type` |
| **InternationalString** | Common language property (`{ "none": ["..."] }`) |
| **Reference** | A reference to another resources (`{id: '..', type: '..'}`) |
| **JsonLDContext** | A partial of `{'@context': ... }`, extended by resources with contexts |
| **MetadataItem** | Label value pair used in the metadata field |
| **SpecificationBehaviors** | String literals for supported behaviors mentioned in the specification |
| **SpecificationTimeMode** | String literals for supported time modes mentioned in the specification |
| **ViewingDirection** | String literal for the 4 supported viewing directions |
#### Resources
Type | Description
--- | ---
**Service** | Any service that can appear in services property. Union of generic and specific services.
**Manifest** | Types for a valid IIIF Manifest
**Canvas** | Types for a valid IIIF Canvas
**ContentResource** | Types for a Content Resource - warning this can be many things!
**AnnotationPage** | Types for a valid Annotation page
**Annotation** | Types for a valid Annotation in the context of a IIIF manifest
**AnnotationW3C** | Types for a valid W3C annotation (different from above)
**Collection** | Types for a valid IIIF Collection
**Range** | Types for a valid IIIF Range
**AnnotationCollection** | Types for a valid Annotation collection
**IIIFExternalWebResource** | Abstract type for an external web resource
**ContentResourceString** | Alias for `string`
| Type | Description |
|-----------------------------|-------------------------------------------------------------------------------------------|
| **Service** | Any service that can appear in services property. Union of generic and specific services. |
| **Manifest** | Types for a valid IIIF Manifest |
| **Canvas** | Types for a valid IIIF Canvas |
| **ContentResource** | Types for a Content Resource - warning this can be many things! |
| **AnnotationPage** | Types for a valid Annotation page |
| **Annotation** | Types for a valid Annotation in the context of a IIIF manifest |
| **AnnotationW3C** | Types for a valid W3C annotation (different from above) |
| **Collection** | Types for a valid IIIF Collection |
| **Range** | Types for a valid IIIF Range |
| **AnnotationCollection** | Types for a valid Annotation collection |
| **IIIFExternalWebResource** | Abstract type for an external web resource |
| **ContentResourceString** | Alias for `string` |
#### Resource items (structural)
Type | Description
--- | ---
**CanvasItems** | Alias for Annotation Page
**CollectionItems** | Union of Manifest or Collection
**ManifestItems** | Alias for Canvas
**RangeItems** | Union of Range, Canvas or string
| Type | Description |
|---------------------|----------------------------------|
| **CanvasItems** | Alias for Annotation Page |
| **CollectionItems** | Union of Manifest or Collection |
| **ManifestItems** | Alias for Canvas |
| **RangeItems** | Union of Range, Canvas or string |
#### Services
Type | Description
--- | ---
**AuthAccessTokenServiceError** | [todo]
**AuthAccessTokenServiceResponse** | [todo]
**AuthAbstractService** | [todo]
**AuthAccessTokenService** | [todo]
**AuthExternalService** | [todo]
**AuthClickThroughService** | [todo]
**AuthKioskService** | [todo]
**AuthLoginService** | [todo]
**AuthLogoutService** | [todo]
**AuthService** | [todo]
**GeoJsonService** | [todo]
**ImageService** | [todo]
**ImageService2** | [todo]
**ImageServiceProfile** | [todo]
**ImageProfile** | [todo]
**ImageService3** | [todo]
**ImageSize** | [todo]
**ImageTile** | [todo]
**SearchService** | [todo]
**SearchServiceAutocomplete** | [todo]
**SearchServiceAutocompleteQueryParams** | [todo]
**SearchServiceAutocompleteResponse** | [todo]
**SearchServiceCommonHitSelectors** | [todo]
**SearchServiceCommonResources** | [todo]
**SearchServiceQueryParams** | [todo]
**SearchServiceSearchCommonSelectors** | [todo]
**SearchServiceSearchResponse** | [todo]
| Type | Description |
|------------------------------------------|-------------|
| **AuthAccessTokenServiceError** | [todo] |
| **AuthAccessTokenServiceResponse** | [todo] |
| **AuthAbstractService** | [todo] |
| **AuthAccessTokenService** | [todo] |
| **AuthExternalService** | [todo] |
| **AuthClickThroughService** | [todo] |
| **AuthKioskService** | [todo] |
| **AuthLoginService** | [todo] |
| **AuthLogoutService** | [todo] |
| **AuthService** | [todo] |
| **GeoJsonService** | [todo] |
| **ImageService** | [todo] |
| **ImageService2** | [todo] |
| **ImageServiceProfile** | [todo] |
| **ImageProfile** | [todo] |
| **ImageService3** | [todo] |
| **ImageSize** | [todo] |
| **ImageTile** | [todo] |
| **SearchService** | [todo] |
| **SearchServiceAutocomplete** | [todo] |
| **SearchServiceAutocompleteQueryParams** | [todo] |
| **SearchServiceAutocompleteResponse** | [todo] |
| **SearchServiceCommonHitSelectors** | [todo] |
| **SearchServiceCommonResources** | [todo] |
| **SearchServiceQueryParams** | [todo] |
| **SearchServiceSearchCommonSelectors** | [todo] |
| **SearchServiceSearchResponse** | [todo] |

@@ -162,91 +167,70 @@ #### W3C Annotations

Type | Description
--- | ---
**Agent** | [todo]
**AnnotationBody** | [todo]
**AnnotationTarget** | [todo]
**AnyMotivation** | [todo]
**Audience** | [todo]
**Body** | [todo]
**ChoiceBody** | [todo]
**ChoiceTarget** | [todo]
**Creator** | [todo]
**BasicState** | [todo]
**CssSelector** | [todo]
**DataPositionSelector** | [todo]
**FragmentSelector** | [todo]
**Selector** | [todo]
**RefinedBy** | [todo]
**RefinedByState** | [todo]
**EmbeddedResource** | [todo]
**ExternalResourceTypes** | [todo]
**ExternalWebResource** | [todo]
**RangeSelector** | [todo]
**RequestHeaderState** | [todo]
**SpecificResource** | [todo]
**State** | [todo]
**SvgSelector** | [todo]
**TextPositionSelector** | [todo]
**TextQuoteSelector** | [todo]
**TimeState** | [todo]
**XPathSelector** | [todo]
**Stylesheet** | [todo]
**Target** | [todo]
**TargetComposite** | [todo]
**TargetList** | [todo]
**TargetIndependents** | [todo]
**W3CAnnotationBody** | [todo]
**W3CAnnotationCollection** | [todo]
**W3CAnnotationPage** | [todo]
**W3CAnnotationTarget** | [todo]
**W3CMotivation** | [todo]
**LinkedResource** | [todo]
**ResourceBaseProperties** | [todo]
**OtherProperties** | [todo]
| Type | Description |
|-----------------------------|-------------|
| **Agent** | [todo] |
| **AnnotationBody** | [todo] |
| **AnnotationTarget** | [todo] |
| **AnyMotivation** | [todo] |
| **Audience** | [todo] |
| **Body** | [todo] |
| **ChoiceBody** | [todo] |
| **ChoiceTarget** | [todo] |
| **Creator** | [todo] |
| **BasicState** | [todo] |
| **CssSelector** | [todo] |
| **DataPositionSelector** | [todo] |
| **FragmentSelector** | [todo] |
| **Selector** | [todo] |
| **RefinedBy** | [todo] |
| **RefinedByState** | [todo] |
| **EmbeddedResource** | [todo] |
| **ExternalResourceTypes** | [todo] |
| **ExternalWebResource** | [todo] |
| **RangeSelector** | [todo] |
| **RequestHeaderState** | [todo] |
| **SpecificResource** | [todo] |
| **State** | [todo] |
| **SvgSelector** | [todo] |
| **TextPositionSelector** | [todo] |
| **TextQuoteSelector** | [todo] |
| **TimeState** | [todo] |
| **XPathSelector** | [todo] |
| **Stylesheet** | [todo] |
| **Target** | [todo] |
| **TargetComposite** | [todo] |
| **TargetList** | [todo] |
| **TargetIndependents** | [todo] |
| **W3CAnnotationBody** | [todo] |
| **W3CAnnotationCollection** | [todo] |
| **W3CAnnotationPage** | [todo] |
| **W3CAnnotationTarget** | [todo] |
| **W3CMotivation** | [todo] |
| **LinkedResource** | [todo] |
| **ResourceBaseProperties** | [todo] |
| **OtherProperties** | [todo] |
#### Normalized resources
This is map of all the resources normalized where the following modifications are assumed to have been made:
The normalized types have moved
to [@iiif/presentation-3-normalized](https://github.com/IIIF-Commons/presentation-3-normalized).
- Everything property exists either as null, or an empty array
- Nested resources are replaced with references (id/type)
#### Partial / Abstract types
The types do not have a tool to create these types, but may be useful for implementations.
Type | Description
--- | ---
**DescriptiveNormalized** | Normalized abstract with all descriptive properties
**LinkingNormalized** | Normalized abstract with all linking properties
**StructuralNormalized** | Normalized abstract with all structural properties
**OtherPropertiesNormalized** | Misc properties on W3C Annotations normalized
**AnnotationW3cNormalised** | Normalized W3C Annotation
**AnnotationCollectionNormalized** | Normalized Annotation Collection
**AnnotationNormalized** | Normalized Annotation as it appears in a IIIF Manifest
**AnnotationPageNormalized** | Normalized Annotation Page
**CanvasNormalized** | Normalized Canvas
**CollectionNormalized** | Normalized Collection
**CreatorNormalized** | Normalized Creator (from annotation)
**ManifestNormalized** | Normalized Manifest
**RangeNormalized** | Normalized Range
**ServiceNormalized** | Normalized Service - note: normalizing services is not recommend
#### Partial / Abstract types
These types are building blocks of other types.
Type | Description
--- | ---
**LinkingProperties** | The linking properties of IIIF in a map `LinkingProperties['seeAlso']`
**DescriptiveProperties** | The descriptive properties of IIIF in a map `DescriptiveProperties['label']`
**TechnicalProperties** | The technical properties of IIIF in a map `DescriptiveProperties['id']`
**StructuralProperties** | The structural properties of IIIF in a map `DescriptiveProperties['annotations']`
| Type | Description |
|---------------------------|-----------------------------------------------------------------------------------|
| **LinkingProperties** | The linking properties of IIIF in a map `LinkingProperties['seeAlso']` |
| **DescriptiveProperties** | The descriptive properties of IIIF in a map `DescriptiveProperties['label']` |
| **TechnicalProperties** | The technical properties of IIIF in a map `DescriptiveProperties['id']` |
| **StructuralProperties** | The structural properties of IIIF in a map `DescriptiveProperties['annotations']` |
#### Helpers
Type | Description
--- | ---
**OmitProperties** | Helper for removing properties from another type
**IdOrAtId** | Helper for resources that can have either `id` or `@id`
**SomeRequired** | Helper for requiring some properties from another type
**Required** | Helper for requiring all properties from another type
| Type | Description |
|--------------------|---------------------------------------------------------|
| **OmitProperties** | Helper for removing properties from another type |
| **IdOrAtId** | Helper for resources that can have either `id` or `@id` |
| **SomeRequired** | Helper for requiring some properties from another type |
| **Required** | Helper for requiring all properties from another type |

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc