Skip to content

Documentation

pci-loader is a tiny TypeScript library for dynamically loading and managing PCI (Portable Custom Interaction) runtimes in modern web applications. It provides a scoped loader and registry for PCI modules, supporting AMD and SystemJS formats.

Features

  • Dynamic PCI loading: Load PCI runtimes at runtime from URLs.
  • Scoped registry: Each loader instance manages its own PCI registry.
  • AMD & SystemJS support: Uses SystemJS for module loading and AMD for PCI's runtime definitions.
  • Custom interaction context: Exposes only the qtiCustomInteractionContext resource to loaded PCIs.
  • TypeScript support: Fully typed API for safe integration.
  • Light: Only one dependency, with SystemJS.
  • Small: ~2KB GZipped.

Main Components

  • PCILoader — Loads a PCI runtime from a URL in a scoped context, then renders instances.
  • PCILoaderDev — Development version that allows mapping external resources before loading.
  • PCIRegistry — Register and retrieve PCI runtimes programmatically; used by qtiCustomInteractionContext.
  • AMDLoader — Small scoped AMD loader that provides resources to AMD runtimes while keeping definitions local.

Pages

License

MIT License - See LICENSE file for details.