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

sitelen-layer-plugin

v0.3.10

Published

Site-owner display-layer plugin for toki pona pages (latin / sitelen-pona / sitelen-emoji)

Downloads

58

Readme

sitelen-layer-plugin

Display-layer plugin for pages with toki pona content.

Listed on ABVX Lab: https://lab.abvx.xyz/tools/sitelen-layer-plugin/

It switches one existing page copy between:

  • latin (TP)
  • sitelen-pona
  • sitelen-emoji

sitelen-layer-plugin does not translate text from English or other languages. It only changes how existing toki pona content is displayed.

Related projects

  • sitelen-emoji is the adjacent mapping/data layer in this monorepo: https://github.com/markoblogo/toki-pona-translator/tree/main/packages/sitelen-emoji
  • toki-pona-translator is a related application-layer repo: https://github.com/markoblogo/toki-pona-translator
  • lab.abvx catalogs this package, but it is a separate cluster from the AI coding tools stack: https://github.com/markoblogo/lab.abvx

Install

npm i sitelen-layer-plugin

Python static-asset package:

pip install sitelen-layer-static

See python/sitelen-layer-static if you want to vendor the built JS/CSS/font assets into Django, Flask, FastAPI, or another Python deployment without requiring npm on the target system.

Import the base styles and (for recommended sitelen pona rendering) font styles:

import 'sitelen-layer-plugin/styles.css';
import 'sitelen-layer-plugin/sitelen-pona-font.css';

1-minute setup

import { createSitelenLayerPlugin } from 'sitelen-layer-plugin';

const plugin = createSitelenLayerPlugin({
  container: '#tok-content',
  toggleMode: 'auto',
  defaultLayer: 'latin'
});

plugin.init();

Then call plugin.destroy() when this page/view is unmounted.


Framework examples

React

'use client';

import { SitelenLayerProvider } from 'sitelen-layer-plugin/react';

export default function Layout({ children }) {
  return (
    <SitelenLayerProvider config={{ container: '#app', defaultLayer: 'latin' }}>
      {children}
    </SitelenLayerProvider>
  );
}

Next.js

'use client';

import { SitelenLayerNextProvider } from 'sitelen-layer-plugin/next';

export default function RootLayout({ children }) {
  return <SitelenLayerNextProvider config={{ container: '#app' }}>{children}</SitelenLayerNextProvider>;
}

Vue 3

import { vSitelenLayer } from 'sitelen-layer-plugin/vue';

app.directive('sitelen-layer', vSitelenLayer);
// <div v-sitelen-layer="{ container: '#app' }"></div>

Svelte

<script>
  import { sitelenLayerAction } from 'sitelen-layer-plugin/svelte';
</script>

<section use:sitelenLayerAction={{ container: '#app' }}></section>

Build helpers

For auto-init + auto style injection in bundlers:

Vite

import { defineConfig } from 'vite';
import sitelenLayerVitePlugin from 'sitelen-layer-plugin/vite-plugin';

export default defineConfig({
  plugins: [
    sitelenLayerVitePlugin({
      autoInit: true,
      container: '#app',
      initConfig: { toggleMode: 'inline', showToggle: true }
    })
  ]
});

Webpack

const { SitelenLayerWebpackPlugin } = require('sitelen-layer-plugin/webpack-plugin');

module.exports = {
  plugins: [
    new SitelenLayerWebpackPlugin({
      autoInit: true,
      initConfig: { container: '#app', showToggle: true }
    })
  ]
};

Core options you usually need

  • container: selector or element that contains editable text
  • defaultLayer: 'latin' | 'sitelen-pona' | 'sitelen-emoji'
  • toggleMode: 'auto' | 'inline' | 'floating'
  • toggleMount: selector/element for inline control placement
  • showToggle: show/hide switch UI
  • layers: list of enabled layers
  • toggleLabels: text/icons for buttons
  • sitelenPona: render settings (recommended renderStrategy: 'ligature-font')

For full API, see typed docs in the repository.


Toggle and UI

By default, the toggle tries to mount inline when toggleMount is present and falls back to floating.

  • latin: TP
  • sitelen-pona: SP
  • sitelen-emoji: 🙂

The UI supports animation (fade, fade-blur) and CSS variables for sizing, radius, and colors.


CLI

npx sitelen-layer-cli scan ./public/index.html
npx sitelen-layer-cli emoji-candidates ./public/index.html --limit 20 --json

Use CLI in CI to check content eligibility before deployment.


v0.3 integration track

This repo now includes PoC integration packages:

  • Browser extension
  • Obsidian
  • Logseq
  • WordPress
  • Ghost

See:

Demo pages:

  • demo/integration/vite-webpack-route-guard.html
  • demo/integration/extension-csp-flow.html

CDN / static pages (experimental)

ESM browser usage:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sitelen-layer-plugin@latest/dist/sitelen-layer-plugin.css">
<script type="module">
  import { createSitelenLayerPlugin } from 'https://cdn.jsdelivr.net/npm/sitelen-layer-plugin@latest/dist/sitelen-layer-plugin.js';

  createSitelenLayerPlugin({ container: '#app' }).init();
</script>

For strict CSP, use external scripts only and avoid inline init logic.


Recommended font notes

For best sitelen pona typography, import font styles:

import 'sitelen-layer-plugin/sitelen-pona-font.css';

This plugin includes SIL OFL licensed sitelen seli kiwen asuki font assets.


What it does not do

  • no auto-translation from English
  • no image/OCR processing
  • no guaranteed perfect rendering for any website CSS without adjustments

If your site has unusual selectors, run with a dedicated CSS pass to avoid overrides.


Release and artifacts

v0.3.10 is available on npm as latest and with GitHub release assets for adapters.

  • Docs: docs/RELEASE_PIPELINE_SETUP.md (workflow + secrets)
  • Release notes in RELEASE_NOTES_v* and CHANGELOG.md