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

@idylank/sdui

v1.0.2

Published

- [SDUI Typescript generator](#sdui-typescript-generator) - [Getting started](#getting-started) - [Installation](#installation) - [Defining schemas](#defining-schemas) - [Adding Components, Actions, Headers and PlaceHolders](#adding-components

Readme

SDUI Typescript generator

Getting started

Installation

There are 2 ways to get started:

  • Install the SDUI npm dependency (in the future..).
  • Clone this repo and locally import the root folder as a dependency to a project.
  • Use the included sample_app, where this package is already installed as a dependency.

When not using npm, make sure to build the library using npm run build.

Defining schemas

The first step is to create a JavaScript schema file (example: project.js) for your application. How these schemas work and look like is explained here.

For this SDUI library, it's important that your application's types expand the library types. This means that your project.js should start with importing these types:

// Load SDUI framework
const { types } = require('<sdui_library_location>/schemas/sdui');

and end with exporting the new types: module.exports.types = types;.

Adding Components, Actions, Headers and PlaceHolders

When adding your custom logic, make sure that they are based of their library's base parts and contain a type constant:

types.CustomComponent = compose(
    types.BaseComponent,
    object({
        type: constant('XXXX'),
        ...
    }),
);

Only PlaceHolders don't have a base part and can direcrly be formed:

types.CustomPlaceHolder = object({
    type: constant('XXXX'),
    ...
});

Before exporting the types, make sure your custom properties are added to the library types:

types.Component = anyOf([...types.Component.anyOf, 'CustomComponent', .....]);
types.Header = anyOf([...types.Header.anyOf, .....]);
types.Action = anyOf([...types.Action.anyOf, .....]);
types.PlaceHolder = anyOf([...types.PlaceHolder.anyOf, .....]);

Generation

This package contains an sdui command to help generate a json api schema, typescript types and swift models.

Typescript types

Buidling typescript models:

sdui schema <your_project.js> <generated_output_directory>

This outputs a json schema file and the corresponding typescript types to be used within your API.

Generating Swift models

To generate the corresponding swift models run:

sdui swift <generated_output_directory/schema.json <sduiValidation_directory/Shared/Domain/ValidationModels.swift>

Default types

They can be found in the documentation here.

Search:

  • Only local search is possible for now. Add a searchable string to a component. Can contain more keywords like this too.
  • TODO: search via delegate.
  • TODO: search via server.

Share

  • TODO: sharing images. expand the delegate to support this.

Contributing

The SDUI Swift Library needs to be installed (see this). Copy .nmprc.example to .npmrc and specify the SDUI Swift Library location.