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

liveview-tuner

v0.1.0

Published

A development overlay for tuning Phoenix LiveView interfaces in the browser.

Downloads

149

Readme

LiveView Tuner

LiveView Tuner is a development overlay for adjusting a Phoenix LiveView interface in the browser. Pick an element, preview CSS or text changes, then copy a structured prompt that describes what to implement in the application source.

The tuner does not edit HEEx, CSS, or Tailwind files. Its inline styles and text changes are temporary previews.

Status

This package is experimental and intended for local development only. Do not include it in a production bundle.

Install

npm install --save-dev liveview-tuner

Mount it from a development-only entry point. With Vite:

if (import.meta.env.DEV) {
  import("liveview-tuner").then(({mountLiveViewTuner}) => {
    mountLiveViewTuner()
  })
}

The package includes its own styles in a Shadow DOM. No CSS import is required.

If you use another bundler, apply its compile-time development guard around the dynamic import. A runtime check alone may leave the tuner in the production bundle.

Use

  1. Start the application in development mode.
  2. Open Tuner in the bottom-right corner.
  3. Pick an element on the page.
  4. Adjust its layout, type, or surface properties.
  5. Review changes at the bottom of the panel.
  6. Choose Copy edits and give the copied prompt to your coding agent.
  7. After the source change is implemented, choose Revert all or reload the page.

The available controls cover display, dimensions, flex layout, spacing, typography, colors, borders, shadows, backdrop blur, and opacity. Numeric controls support buttons, press-and-hold stepping, and drag scrubbing.

Similar elements

When the selected element has matching siblings, Similar applies an edit to a frozen group of matches. The group does not change until Similar mode is restarted. A session includes at most 25 elements; the panel and copied prompt disclose when more matches exist.

Tailwind suggestions

Enable Tailwind before changing a value to snap supported numeric controls to Tailwind v4 tokens and include a utility suggestion in the copied prompt. Suggestions are hints. Check them against the application's theme and source structure before using them.

Text editing

Edit text appears for supported leaf elements. The tuner records the original text so the preview can be undone. It does not support rich-text editing.

LiveView patches

LiveView may update or replace an element while it is being tuned. The tuner watches selected and changed elements, reapplies active previews after a patch, and updates the Undo baseline to the latest server-rendered state.

Reconnection requires a replacement with the same stable DOM id and tag name. Elements without stable IDs become stale when replaced; discard their recorded changes or pick the replacement.

API

import {mountLiveViewTuner} from "liveview-tuner"

const tuner = mountLiveViewTuner()

mountLiveViewTuner() registers the <liveview-tuner> custom element, mounts one instance, and returns it. Repeated calls return the existing instance.

Remove it and restore all previews:

tuner.destroy()

To remove the overlay while intentionally keeping its current inline previews:

tuner.destroy({revert: false})

mountLiveViewTuner() and destroy() are the supported public API. Other element methods are implementation details and may change between experimental releases.

Safety and limitations

  • Copied prompts can contain DOM paths, class names, data-phx-loc, computed styles, and visible page text. Review them before sharing outside the project.
  • Page metadata is treated as untrusted text in the generated prompt, but the prompt still needs human review.
  • The picker can enter open Shadow DOM roots. Closed Shadow DOM content is not inspectable.
  • Preview state is kept in memory and is lost on reload.
  • The tuner does not locate or rewrite source files.
  • Visual regression testing and interaction-contract verification remain separate responsibilities.

Development

npm install
npm run dev
npm test
npm run build

The Playwright suite runs in Chromium, Firefox, and WebKit. Package import and representative Tailwind v4 utilities are also checked.

License

MIT