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

pict-section-mapping

v0.0.1

Published

Embeddable Pict view for managing data-mapper Mappings: list, edit, run. The Run path executes a Pull→Map→Write graph on the data-mapper beacon and reports per-record write counts.

Downloads

603

Readme

pict-section-mapping

Embeddable Pict view for managing data-mapper Mappings — meadow-integration-shape transforms between two beacon entities (Pull from source → apply Mappings + Solvers → Write to target).

The section provides:

  • a list view of all mappings in the active scope,
  • a per-row Run / Edit / Delete strip,
  • an editor with form fields + a JSON MappingConfiguration textarea,
  • inline run-result panels with RowsRead / RowsMapped / RowsWritten / Errors / ElapsedMs.

Talks to the data-mapper's REST surface (/mapper/mappings*), running mappings via /uv/run-mapping/:id.

The data-mapper also has a separate visual mapping editor (the Pict app at index.html) for graphical field-level mapping — that's the richer alternative for editing MappingConfiguration. This section is the lightweight CRUD + Run surface.

Install

npm install pict-section-mapping

Peer requires pict-view, pict, and pict-section-modal.

Mount

const libPictSectionMapping = require('pict-section-mapping');
const libPictSectionModal   = require('pict-section-modal');

pict.addView('Modal', {}, libPictSectionModal);

pict.addView(
    'Pict-Section-Mapping',
    Object.assign({}, libPictSectionMapping.default_configuration,
    {
        ContentDestinationAddress: '#my-destination',
        APIBaseUrl:                '/mapper',
        Mode:                      'manage',
        WriteToken:                process.env.DATA_MAPPER_WRITE_TOKEN || null
    }),
    libPictSectionMapping);

pict.views['Pict-Section-Mapping'].render();

Configuration

| Option | Default | Purpose | |------------------------------|-------------------------------|---------| | ContentDestinationAddress | #Pict-Section-Mapping | CSS selector for the section's destination div. | | APIBaseUrl | /mapper | Prefix for /mappings, /mapping/:id, /uv/run-mapping/:id. | | Mode | 'manage' | 'manage' = full CRUD + Run; 'list-only' = read-only list. | | ShowToolbar | true | Section's own toolbar (title + scope picker + "+ New" button). | | Scope | null | null reads from localStorage (key shared with the operation + dashboard sections); '' = global. | | WriteToken | null | Bearer token for writes — matches DATA_MAPPER_WRITE_TOKEN. |

Public API

const view = pict.views['Pict-Section-Mapping'];

view.openList();
view.openEditor(idOrRecordOrNull);
view.refresh();
view.runMapping(idMappingConfig);
view.deleteMapping(idMappingConfig);

Conventions followed

Built per modules/pict/CLAUDE.md. Same shape as pict-section-operation (Templates + Renderables, single-element-array slot pattern, inline handlers, pict-section-modal for prompts, AppData.Mapping.* for state).

Tests

npm install
npm test

18 mocha TDD tests cover module surface, slot population, and the API provider (REST shapes, scope round-trip, bearer-token injection on writes, run-endpoint path, error-response surfacing).