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

sliced-areas

v2.1.1

Published

Blender-like "Areas" layout system as a Web Component with an optional Vue 3 wrapper.

Readme

sliced-areas

Blender-like resizable and splittable areas layout system. Available as a Web Component with optional Vue 3 wrapper.

📚 Documentation & Examples

Installation

npm install sliced-areas

Web Component Usage

import 'sliced-areas'
import 'sliced-areas/styles.css'
import type { AreasLayout, SlicedAreasElement } from 'sliced-areas'

const layout: AreasLayout = {
  areas: [{ tag: 'viewport', rect: { left: 0, right: 1, top: 1, bottom: 0 } }]
}

const areas = document.querySelector('sliced-areas') as SlicedAreasElement
areas.setResolver((tag) => {
  const div = document.createElement('div')
  div.textContent = `Content for: ${tag}`
  return div
})
areas.layout = layout
<sliced-areas style="height: 100vh;"></sliced-areas>

Important: Resolver must return a fresh node each time. When areas share the same tag, reusing the same DOM element will move it to the last area.

Vue 3 Usage

import { createApp } from 'vue'
import { SlicedAreasPlugin } from 'sliced-areas/vue'
import 'sliced-areas/styles.css'

const app = createApp(App)
app.use(SlicedAreasPlugin)
app.mount('#app')
<script setup lang="ts">
import { ref } from 'vue'
import type { AreasLayout } from 'sliced-areas/vue'

const layout = ref<AreasLayout>({
  areas: [{ tag: 'viewport', rect: { left: 0, right: 1, top: 1, bottom: 0 } }]
})

const resolveArea = (tag: string, areaId: string) => {
  const div = document.createElement('div')
  div.textContent = `Content for: ${tag}`
  return {
    element: div,
    cleanup: () => console.log(`Cleanup ${areaId}`)
  }
}

const onLayoutChange = (detail: { layout: AreasLayout }) => {
  layout.value = detail.layout
}
</script>

<template>
  <SlicedAreas
    :layout="layout"
    :resolver="resolveArea"
    @layoutchange="onLayoutChange"
  />
</template>

Layout Format

type AreasLayout = {
  areas: Array<{
    tag: string
    rect: { left: number; right: number; top: number; bottom: number }
  }>
}

Coordinates are normalized (0 to 1). top: 1 is top edge, bottom: 0 is bottom edge.

Events

  • sliced-areas:layoutchange / @layoutchange - Fired when layout changes
  • sliced-areas:cornerclick / @cornerclick - Fired when corner is clicked

License

MIT