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

zimporter-html

v1.0.1

Published

A TypeScript library for importing and managing zStudio scenes as HTML div-based layouts.

Downloads

201

Readme

zImporter HTML

An HTML/CSS div-based renderer for zStudio scenes. Part of the zImporter family alongside the PIXI and Phaser versions.

What it does

Loads the same placements.json format produced by zStudio and constructs the scene as a tree of <div> elements using CSS transforms — no canvas, no game engine dependency.

Supported asset types

| Type | Status | |------|--------| | Container (asset) | ✅ | | Button (btn) | ✅ | | State machine (state) | ✅ | | Toggle | ✅ | | Timeline / animation | ✅ | | Image (img) | ✅ | | Nine-slice (9slice) | ✅ via border-image | | Text / TextField | ✅ via <span> | | Spine | ❌ not supported | | Particles | ❌ not supported |

Installation

npm install
npm run build      # emit JS + .d.ts to dist/
npm run package    # also bundles with webpack → dist/zimporter-html.min.js

Usage

import { ZScene, ZButton, ZToggle, ZTimeline, ZContainer, ZUpdatables } from 'zimporter-html';

// 1. Boot the animation ticker (drives ZTimeline)
ZUpdatables.init(24); // fps

// 2. Create and load a scene
const scene = new ZScene('myScene');
scene.load('./assets/myScene/', () => {

  // 3. Build the DOM and attach it to a host element
  scene.loadStage(document.getElementById('app')!);

  // 4. Access named containers exactly as in the PIXI / Phaser versions
  const btn = scene.sceneStage.get('myButton') as ZButton;
  btn.pressCallback = () => console.log('Button pressed!');

  // 5. React to resize
  window.addEventListener('resize', () =>
    scene.resize(window.innerWidth, window.innerHeight));
});

Transform model

CSS transforms replicate PIXI's hierarchical transform 1-to-1:

T(x, y) · R(rotation) · S(scaleX, scaleY) · T(–pivotX, –pivotY)

Each ZContainer is a position:absolute; width:0; height:0; overflow:visible div so children are placed in local coordinate space and the parent's transform is applied hierarchically, identical to PIXI containers.

The stage div is given explicit width × height (scene resolution) and then scaled + centred via CSS transform to fit the viewport.

API surface

The public API is identical to zImporter-PIXI:

  • ZContainer — base display object (div)
  • ZButton — interactive button with up/down/over/disabled states
  • ZState — shows one named child state at a time
  • ZToggle — flips between onState / offState
  • ZTimeline — frame-based animation driven by ZUpdatables
  • ZScene — loads placements.json and builds the scene graph
  • ZSceneStack — stacks multiple ZScene instances
  • ZUpdatables — RAF-based animation ticker
  • ZResizeables — resize listener registry
  • ZCuePointsManager — named cue-point event bus