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

selva-standalone-ui

v1.0.1

Published

A Svelte component library for rhino3dm and rhino.compute

Readme

selva-standalone-ui

A Svelte 5 component library for building interactive UIs for Grasshopper definitions. Auto-generates form controls from selva-compute parameters with built-in validation, type safety, and layout customization.

Overview

Production-ready components that integrate with selva-compute to create dynamic interfaces. Handles input validation, type constraints, data tree management, and provides customizable UI controls.

Features

  • Auto-Generated UI — Create form controls from Grasshopper parameters automatically
  • Type-Safe — Full TypeScript with discriminated unions from selva-compute
  • Input Validation — Built-in validation, clamping for numeric inputs
  • Data Trees — Native support for Grasshopper's hierarchical data structures
  • Multiple Types — Number, Integer, Text, Boolean, Point parameters
  • Flexible Layouts — Accordion grouping with customizable styling
  • Error Handling — Display warnings and compute errors
  • Customizable — Override components, customize display options
  • Dark Mode — Built-in support

Installation

npm install selva-standalone-ui selva-compute

Quick Start

<script lang="ts">
	import { GrasshopperClient } from 'selva-compute';
	import { InputHandler } from 'selva-standalone-ui';

	const client = new GrasshopperClient({
		serverUrl: 'https://compute.rhino3d.com'
	});

	const { inputs } = await client.getIO('https://example.com/definition.gh');

	async function handleSolve(values) {
		const result = await client.solve('https://example.com/definition.gh', values);
		console.log(result.data);
	}
</script>

<InputHandler {inputs} onChange={handleSolve} headerText="Parameters" autoUpdate={true} />

Main Component

InputHandler

Auto-generates form controls for all Grasshopper parameters:

<InputHandler
	input={grasshopperInputs}
	onChange={handleChange}
	headerText="Parameters"
	autoUpdate={true}
	displayOptions={{
		darkMode: false,
		showSliders: true,
		accordionSeparated: true
	}}
/>

Props:

  • input — Array of Grasshopper parameters
  • onChange — Callback when values change (ready for client.solve())
  • autoUpdate — Auto-trigger onChange on changes
  • headerText — Section header
  • displayOptions — Styling: darkMode, showSliders, accordionSeparated, etc.
  • customComponents — Override specific parameter type components

MessageOverlay

Display errors, warnings, and compute messages:

<MessageOverlay
	errorMessage={null}
	warnings={[]}
	computeErrors={[]}
	showMessages={true}
	onShowMessagesToggle={(show) => {
		/* ... */
	}}
	onDismissMessage={(type, index) => {
		/* ... */
	}}
	onClearAllMessages={() => {
		/* ... */
	}}
/>

Additional Components

Individual parameter components for custom layouts:

  • NumberParam, TextParam, BoolParam, PointParam — Single parameters
  • Accordion — Collapsible groups

All components export TypeScript types from selva-compute for full type safety.

Customization

Custom styling:

<InputHandler input={inputs} onChange={handleChange} customStyles="my-style" />

Dark mode:

<InputHandler input={inputs} onChange={handleChange} displayOptions={{ darkMode: true }} />

Override components:

<InputHandler
	input={inputs}
	onChange={handleChange}
	customComponents={{ Number: MyCustomSlider }}
/>

Requirements

  • Svelte 5.0+
  • selva-compute (exports all types)
  • TypeScript 5.0+ (recommended)

Related Packages

License

MIT