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

@viamrobotics/prime-panes

v0.3.0

Published

Resizable, rearrangeable split-pane layouts for Svelte 5.

Readme

@viamrobotics/prime-panes

Resizable, rearrangeable split-pane layouts for Svelte 5. The layout is a plain tree that you bind to the component. Users resize panes by dragging dividers and rearrange them by dragging a pane onto another or by using a button. Several panes can share one slot as a stack behind tabs, and a float node draws movable, resizable windows over a base layout.

[!NOTE] Under active development. The public API is unstable until 1.0.

Installation

pnpm add @viamrobotics/prime-panes @viamrobotics/tailwind-config @zag-js/splitter @zag-js/floating-panel @zag-js/svelte

Requires svelte ^5.29.0, because the pane controls are attachments. Import the stylesheet once, after Tailwind:

@import 'tailwindcss';
@import '@viamrobotics/prime-panes/styles.css';

Usage

<script lang="ts">
	import { Panes } from '@viamrobotics/prime-panes';
	import type { LayoutNode } from '@viamrobotics/prime-panes';

	let layout = $state<LayoutNode<{ title: string }> | undefined>({
		type: 'split',
		id: 'root',
		direction: 'row',
		ratio: 0.6,
		first: { type: 'pane', id: 'camera', data: { title: 'Camera' } },
		second: { type: 'pane', id: 'stats', data: { title: 'Stats' } }
	});
</script>

<Panes bind:layout paneLabel={(node) => node.data.title} class="h-screen">
	{#snippet pane(node)}
		<div class="size-full">
			<Panes.DragTrigger>
				<header>
					{node.data.title}
					<Panes.MoveTrigger aria-label="Move {node.data.title}">Move</Panes.MoveTrigger>
				</header>
			</Panes.DragTrigger>
		</div>
	{/snippet}
</Panes>

The pane snippet receives node and its reactive PaneState: isStacked, isMoving, isDragArmed, and isFloating, each also a data- attribute on the pane's wrapper. Panes.DragTrigger starts a pane drag from the elements inside it. Drags run on pointer events, so mouse, pen, and touch all drag. A press on a plain area or a Panes.MoveTrigger drags once the pointer moves 4px, a press on another control drags after a 250ms hold so a quick click still clicks, and a press on a text field never drags. Moving 4px before a hold ends drops the press. A tab is the exception. It drags once the pointer moves 4px, and a press without movement selects. While reorderable, drag triggers, tabs, and grips set touch-action: none, so keep scrollable content outside Panes.DragTrigger. Escape, a pointer cancel, the window losing focus, and a release outside every pane cancel a drag. A ghost follows the pointer and shows what a drop would make. DragPreview.form is 'tab' over a strip or drop region and 'pane' elsewhere, and the ghost root carries data-form. The dragPreview snippet replaces its content with a DragPreview. The root carries data-dragging during a drag, beside data-move-mode. dragIgnore, an attachment exported from the package root, keeps a press inside a custom element from dragging. Panes.MoveTrigger renders a button that toggles move mode, which rearranges panes without dragging. Its child snippet receives { props } to spread on your own element, such as a menu item. Every pane with a Panes.DragTrigger needs a Panes.MoveTrigger to meet WCAG 2.5.7. Panes.MoveTrigger and Panes.TabList both require aria-label or aria-labelledby. In move mode, focus stays on the moving pane's trigger, and the arrow keys move spatially into the adjacent pane and across its left, center, and right or top, center, and bottom regions, crossing to the next pane on screen past the far edge. Tab moves between destinations. Place with a click, a second tap, or Enter or Space. Escape cancels. Moving focus out of the view cancels. Panes.TabList renders in every pane and shows a stack's tabs when the pane is stacked. Panes.TabListDropRegion goes inside it and marks where a dropped pane stacks, so a pane without one never stacks. Place it as a strip over the tabs, a grip area, or an edge strip that shows only during a drag, and add in-data-move-mode: so move mode can stack there too. In move mode, "Stack with" is reached by the arrow toward the region's side, and it takes a position that defaults to the end. A stacked pane's own slot offers a reorder placement. Panes.PaneBody sets the edges and center of the pane's drop regions, and a point outside it reads as the nearest edge. With no PaneBody, the whole pane applies. Center always swaps whole slots. Over its own strip, a dragged tab lifts out, a preview tab marks the insertion point, and the other tabs shift. Dropping reorders and makes the dropped pane active. Over another pane's region, the drop inserts at the pointer's x on a top or bottom region and appends on a left or right region. Alt+Shift+ArrowLeft and Alt+Shift+ArrowRight move a focused tab one place. The tree operations stackPanes(root, targetPaneId, sourceId, newStackId, index?) and reorderPane(root, paneId, index) do the same from code. PaneBody is also the tab panel, but only in a stacked pane. target="stack" on a trigger moves the whole stack, and target="float" inside a window moves the window. The operations floatPane, floatStack, setFloatRect, raiseFloat, and removeFloat edit float nodes from code. keepInactiveMounted keeps inactive stacked panes mounted. paneLabel names panes in previews and announcements. The root element has no default size, so size it with a class.

Documentation

See the package docs for the layout model, stacks, function bindings, tree operations, and a migration guide from the app's protobuf workspace trees.

Development

This package lives inside the viamrobotics/prime monorepo. See the package CLAUDE.md for stack, layout, and commands.

License

Apache-2.0