Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtifactCore, as used in gnorium.com

A Swift package for viewing and parsing artifacts — IIIF Presentation API v3 manifests, deep zoom images, and other artifact types (3D objects, audio/video, maps).

Overview

ArtifactCore provides a general-purpose artifact viewer compiled for both server-side rendering and client-side WebAssembly. The viewer handles tile-based deep zoom with pan, zoom, and canvas navigation — all without JavaScript. Built on IIIF Presentation API v3, it is designed to extend beyond images as new artifact types are supported.

Features

  • Presentation API v3: Full manifest, canvas, annotation, and range model types.
  • Image API: Tile URL construction, info.json parsing, region/size/rotation support.
  • Embedded WASM Viewer: Zero-dependency deep zoom with CSS transforms, gesture handling (pan/zoom), keyboard navigation, and multi-canvas support.
  • Server-side Rendering: HTMLContent view for embedding in any page.

Model Types

  • Manifest — Top-level manifest with label, metadata, thumbnail, provider
  • Canvas — Individual page/view with dimensions, annotations, image services
  • ImageService — Tile info for deep zoom
  • Region / TileSize — Image API region and size selectors
  • TileURL — URL builder for IIIF Image API tile requests
  • Full support for W3C Web Annotations, Ranges (table of contents), and language maps

Installation

Swift Package Manager

Add ArtifactCore to your Package.swift:

dependencies: [
    .package(url: "https://github.com/gnorium/artifact-core.git", branch: "main")
]

Then add it to your target dependencies:

.target(
    name: "YourTarget",
    dependencies: [
        .product(name: "ArtifactCore", package: "artifact-core")
    ]
)

Requirements

  • Swift 6.2+

Usage

import ArtifactCore

// Fetch and render an artifact manifest
ArtifactView(manifestURL: "https://iiif.folger.edu/manifest/First_Folio/manifest.json")

For client-side WASM hydration, call ArtifactView.hydrate() after the server renders the container.

License

Apache License 2.0 - See LICENSE for details

Contributing

Contributions welcome! Please open an issue or submit a pull request.

Related Packages

About

IIIFCore, as used in gnorium.com

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages