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

@linkedearth/lipd-ui

v0.5.3

Published

React component library for LiPD data (shared between VS Code extension and other client UIs)

Readme

LiPD UI

A flexible React component library for editing LiPD (Linked Paleo Data) datasets in any environment.

Features

  • Environment Agnostic: Works in browsers, VS Code extensions, Electron apps, and more
  • Flexible Actions: Core LiPD operations that can be customized per environment
  • Rich Editing: Tree-based navigation with form-based editing
  • Remote Support: GraphDB connectivity for collaborative workflows
  • TypeScript: Full type safety and IntelliSense support

Installation

npm install @linkedearth/lipd-ui

Core Actions

The LiPDActions class provides all essential LiPD operations:

import { LiPDActions, RemoteOptions } from '@linkedearth/lipd-ui';

// Create action handler with callbacks
const actions = new LiPDActions({
  onProgress: (msg) => console.log(msg),
  onError: (err) => console.error(err),
  onSuccess: (msg) => console.log(msg),
  
  // For extension environments that need message passing
  postMessage: (msg) => extensionAPI.postMessage(msg)
});

// Core operations
const dataset = await actions.createNewLiPD();
const loaded = await actions.openLocalLiPD(file);
const remote = await actions.openRemoteLiPD('dataset-name', {
  endpoint: 'https://linkedearth.graphdb.mint.isi.edu/repositories/LiPDverse',
  username: 'user',
  password: 'pass'
});

// Save operations
await actions.downloadLiPD(dataset, 'filename.lpd'); // Browser
await actions.saveLiPD(); // Extension environments
await actions.saveRemoteLiPD(dataset, remoteOptions);

Flexible AppBarActions

Configure the toolbar for your environment:

import { AppBarActions } from '@linkedearth/lipd-ui';

// Browser environment with custom actions
const BrowserActions = () => (
  <AppBarActions
    actionHandlers={{
      onNew: () => actions.createNewLiPD(),
      onOpen: (file) => actions.openLocalLiPD(file),
      onSave: () => actions.downloadLiPD(dataset)
    }}
    visibleActions={['new', 'open', 'save']}
    showLabels={true}
  />
);

// Extension environment with traditional actions
const ExtensionActions = () => (
  <AppBarActions
    // Uses store actions by default - connects to extension via callbacks
    visibleActions={['save', 'saveAs', 'sync', 'undo', 'redo']}
    showLabels={false}
    size="small"
  />
);

Environment Setup

Browser Applications

import React from 'react';
import { 
  LiPDApp, 
  useLiPDStore, 
  setLiPDStoreCallbacks,
  RouterProvider 
} from '@linkedearth/lipd-ui';

// Browser doesn't need store callbacks - uses custom components
setLiPDStoreCallbacks({});

const App = () => {
  const { dataset } = useLiPDStore();
  
  return (
    <RouterProvider>
      {dataset ? <LiPDApp /> : <div>No dataset loaded</div>}
    </RouterProvider>
  );
};

VS Code Extensions

import { setLiPDStoreCallbacks, useLiPDStore } from '@linkedearth/lipd-ui';

// Set up VS Code specific callbacks
setLiPDStoreCallbacks({
  onUndo: () => vscode.postMessage({ type: 'executeCommand', command: 'lipd-vscode.undo' }),
  onRedo: () => vscode.postMessage({ type: 'executeCommand', command: 'lipd-vscode.redo' }),
  onSave: () => vscode.postMessage({ type: 'save' }),
  onSaveAs: () => vscode.postMessage({ type: 'executeCommand', command: 'workbench.action.files.saveAs' }),
  onSync: () => vscode.postMessage({ type: 'sync' }),
  onDatasetUpdated: (dataset) => vscode.postMessage({ type: 'datasetUpdated', data: dataset }),
  onReady: () => vscode.postMessage({ type: 'ready' })
});

Custom Environments

import { setLiPDStoreCallbacks } from '@linkedearth/lipd-ui';

// Custom implementation
setLiPDStoreCallbacks({
  onSave: () => myApp.saveFile(),
  onDatasetUpdated: (dataset) => myApp.handleDatasetChange(dataset),
  // ... other callbacks as needed
});

Remote Dialog

For GraphDB operations:

import { RemoteDialog } from '@linkedearth/lipd-ui';

const MyComponent = () => {
  const [dialogOpen, setDialogOpen] = useState(false);
  
  const handleRemoteAction = (datasetName, endpoint, username, password) => {
    // Your remote operation logic
  };
  
  return (
    <RemoteDialog
      open={dialogOpen}
      mode="open" // or "save"
      onClose={() => setDialogOpen(false)}
      onSubmit={handleRemoteAction}
      defaultEndpoint="https://linkedearth.graphdb.mint.isi.edu/repositories/LiPDverse"
    />
  );
};

TypeScript Support

import type { 
  AppState, 
  LiPDActionOptions, 
  RemoteOptions,
  LiPDStoreCallbacks,
  AppBarActionHandlers 
} from '@linkedearth/lipd-ui';

Component Exports

All components are available as named exports:

import { 
  // Main components
  LiPDApp,
  AppBarActions,
  NavigationPanel,
  EditorPanel,
  
  // Specialized components
  RemoteDialog,
  ConfirmDialog,
  SyncProgressBar,
  
  // Tree components
  ChronDataTree,
  PaleoDataTree,
  PublicationsTree,
  
  // Form components
  DefaultEditor,
  DataTableEditor,
  LocationEditor,
  
  // Store and actions
  useLiPDStore,
  setLiPDStoreCallbacks,
  LiPDActions,
  RouterProvider
} from '@linkedearth/lipd-ui';

Architecture

The library uses a flexible callback system that allows different environments to provide their own implementations:

  • Browser: Uses file APIs and blob downloads
  • VS Code: Uses postMessage communication with extension backend
  • Electron: Can use either approach depending on context
  • Custom: Implement your own callbacks for any environment

This design keeps the core UI logic environment-agnostic while enabling deep integration with host applications.

Examples

See EXAMPLES.md for complete implementation examples across different environments.