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).
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.
- 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.
Manifest— Top-level manifest with label, metadata, thumbnail, providerCanvas— Individual page/view with dimensions, annotations, image servicesImageService— Tile info for deep zoomRegion/TileSize— Image API region and size selectorsTileURL— URL builder for IIIF Image API tile requests- Full support for W3C Web Annotations, Ranges (table of contents), and language maps
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")
]
)- Swift 6.2+
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.
Apache License 2.0 - See LICENSE for details
Contributions welcome! Please open an issue or submit a pull request.
- admin-core - Core admin functionalities for web applications
- design-tokens - Universal design tokens based on Apple HIG
- diff-engine - Platform-agnostic character-level diff engine
- embedded-swift-utilities - Utility functions for Embedded Swift environments
- markdown-utilities - Markdown rendering with extended syntax
- web-apis - Web API implementations for Swift WebAssembly
- web-builders - HTML, CSS, JS, and SVG DSL builders
- web-components - Reusable UI components for web applications
- web-formats - Structured data format builders
- web-security - Portable security utilities for web applications
- web-types - Shared web types and design tokens