npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@micropasts/linked-art-geotrail

v0.1.3

Published

An interactive React component for visualizing Linked Art cultural heritage records as animated geospatial event arcs.

Readme

@micropasts/linked-art-geotrail

An interactive geospatial event-arc viewer for Linked Art (application/ld+json) cultural heritage records. It uses React 18, Vite, Tailwind CSS, Lucide, and MapLibre GL, and complements linked-art-viewer and provenance-timeline.

Features

  • Event-to-place arcs: Extracts spatial events from production, discovery, provenance, exhibitions, and current-location fields, then plots and animates quadratic Bezier trajectories.
  • Manual playback: Starts at the origin and advances through Play, timeline scrubbing, or event selection.
  • WKT and text-place resolution: Supports POINT, POLYGON, and MULTIPOLYGON; text places can use the built-in gazetteer or a cached Nominatim fallback.
  • Attached imagery: Finds representations and digital images, optimizes IIIF Image API URLs, compresses CORS-accessible images, and provides a full-resolution lightbox.
  • URL and JSON-LD loading: Accepts raw Linked Art JSON-LD or an http(s):// record URL.
  • Embeddable props: Passes a record directly and can hide the loader with allowInput={false}.
  • Dark and light themes: Switches the interface and MapLibre basemap between dark-matter and positron.

Project Structure

linked-art-geotrail/
├── index.html
├── examples/
│   └── index.html
├── package.json
├── postcss.config.js
├── tailwind.config.js
├── vite.config.js
├── README.md
├── LICENSE.md
├── dist/
├── dist-lib/
├── dist-umd/
├── docs/
└── src/
    ├── main.jsx
    ├── index.jsx
    ├── umd.jsx
    ├── index.css
    ├── App.jsx
    ├── docs/
    │   ├── main.jsx
    │   └── DocsApp.jsx
    ├── data/
    │   ├── exampleRecords.js
    │   ├── gettyRecord.js
    │   ├── piebaldRecord.js
    │   └── sampleRecord.js
    ├── lib/
    │   ├── arcGeometry.js
    │   ├── imageOptimizer.js
    │   ├── linkedArtExtractor.js
    │   ├── linkedArtFetcher.js
    │   ├── placeResolver.js
    │   └── wktParser.js
    └── components/
        ├── EventSidebar.jsx
        └── GeoArcMap.jsx

Getting Started

npm install
npm run dev

Open the address printed by Vite (normally http://localhost:5173).

Install in a Third-Party npm Project

Install the package and its React peer dependencies:

npm install @micropasts/linked-art-geotrail react react-dom

Import the component and stylesheet, then give it a sized container:

import GeoTrail from '@micropasts/linked-art-geotrail';
import '@micropasts/linked-art-geotrail/style.css';

export function MuseumObjectTrail({ record }) {
  return (
    <div style={{ height: '700px', width: '100%' }}>
      <GeoTrail
        record={record}
        allowInput={false}
        theme="light"
      />
    </div>
  );
}

When developing with React 18, the package uses the same React instance supplied by the host project. The host must also provide React DOM. The component bundles Lucide and includes MapLibre styles, but it does not bundle React.

The package also exports App as a named export:

import { App } from '@micropasts/linked-art-geotrail';

For a package from this repository rather than a published registry release:

npm install github:MicroPasts/linked-art-geotrail

Publishing and installing the scoped npm package requires npm registry access to @micropasts. A release build is produced with:

npm run build:lib
npm publish --access public

Static app build

Build the full app and the examples/docs page:

npm run build
npm run preview

The output is written to dist/ and can be deployed to static hosting such as GitHub Pages.

Documentation and examples build

npm run build:docs

This writes the examples/docs page to docs/.

UMD browser build

Create a browser-ready UMD bundle:

npm run build:umd

The build writes linked-art-geotrail.umd.js and linked-art-geotrail.css to dist-umd/.

Serve or deploy that directory, then mount the viewer from a plain HTML page:

<link rel="stylesheet" href="/dist-umd/linked-art-geotrail.css">
<div id="geotrail" style="height: 700px"></div>

<script src="/dist-umd/linked-art-geotrail.umd.js"></script>
<script>
  const root = LinkedArtGeoTrail.mount('#geotrail', {
    record: window.myLinkedArtRecord,
    allowInput: false,
    theme: 'light'
  });
</script>

The mount target can also be an element:

const root = LinkedArtGeoTrail.mount(
  document.getElementById('geotrail'),
  { allowInput: false, theme: 'dark' }
);

Call root.unmount() when removing the mounted component.

Embedding & Component Props

You can render App with an initial Linked Art object, lock it to read-only display mode without the URL/JSON input drawer, and choose light or dark mode:

import App from './App';
import myLinkedArtRecord from './data/myObject.json';

export function MuseumObjectTrail() {
  return (
    <App allowInput={false} record={myLinkedArtRecord} theme="light" />
  );
}

Props

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | record | Object | SAMPLE_LINKED_ART_RECORD | Initial Linked Art JSON-LD document to parse and plot. | | allowInput | boolean | true | Shows or hides the Load URL / JSON button and input drawer. | | theme | 'dark' \| 'light' | 'dark' | Sets the initial visual theme for the sidebar, popups, and map style. |

How Linked Art Records Are Extracted

  1. Production (produced_by): Extracts creation events, timespan display labels/dates, carried_out_by makers, took_place_at WKT geometries, or object/activity Creation Place Description (aat:300435448) text statements.
  2. Discovery (encountered / found_by): Captures findspot or archaeological encounter events and any associated POLYGON or POINT geometries.
  3. Provenance (changed_ownership_through): Reads ownership transfers and nested part_of provenance activities, timespans, and provenance location statements (aat:300444175).
  4. Exhibitions (used_for / member_of[].used_for): Collects exhibition activities and venues.
  5. Current Location (current_location): Plots repository locations; if current_location is an internal space (such as Getty "Storage", aat:300004465) without WKT coordinates, it pairs the label with current_owner institution details for geocoding.

License

MIT