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

disclose-dsl

v0.1.3

Published

Animation + temporal DSL for scenes and shapes.

Downloads

291

Readme

Disclose DSL

Disclose DSL is an experimental animation, transformation, and timing DSL for composing scenes and shapes with a fluent, declarative API. It targets canvas rendering but keeps the core DSL portable and testable.

Status

Work in progress. The public API is unstable and may change without notice.

Documentation

https://thiagopac.github.io/disclose-docs/

Why Disclose DSL

Disclose DSL is designed to make motion design feel like writing a short script instead of building a framework. You define shapes, chain universal modifiers, and compose time with just a few lines. The goal is to be fast, expressive, and easy to remix.

What you can do quickly:

  • Build shapes and symbols from primitives (circles, rects, paths, polygons, stars).
  • Chain universal modifiers (fill, stroke, move, scale, rotate, opacity, trim, morph).
  • Animate colors, gradients, strokes, and opacity over time.
  • Orchestrate timelines with sequence, parallel, on, and when.
  • Bring in images and text alongside vector shapes.

If you like writing motion as code, this is built for you.

Examples

Logo Pulse (few lines)

import { Scene, Circle } from 'disclose-dsl';

const scene = Scene((t) => [
  Circle(64)
    .fill('#111827')
    .stroke({ color: '#ffffff', width: 4 })
    .scale({ from: 0.9, to: 1.05, duration: 800, loop: true, ease: 'easeInOut' })
    .opacity({ from: 0.7, to: 1, duration: 800, loop: true }),
]);

Orbiting Dots

import { Scene, Circle } from 'disclose-dsl';

const scene = Scene((t) => [
  Circle(6)
    .fill('#22d3ee')
    .move({ x: [-120, 120], duration: 2000, loop: true, ease: 'easeInOut' })
    .every(200, () =>
      Circle(6)
        .fill('#22d3ee')
        .opacity({ from: 1, to: 0, duration: 800, ease: 'easeOut' })
    ),
]);

Staggered Text Reveal

import { Scene, Text } from 'disclose-dsl';

const scene = Scene((t) => [
  Text('Disclose', { fontSize: 64, fontWeight: 600 })
    .fill({ from: '#94a3b8', to: '#ffffff', duration: 900, stagger: 30, split: 'letter' })
    .opacity({ from: 0, to: 1, duration: 900, stagger: 30, split: 'letter' }),
]);

Composed Timing

import { Scene, Circle, Rect, sequence, on } from 'disclose-dsl';

const scene = Scene((t) => [
  sequence(
    Circle(48).fill('#f97316').scale({ from: 0, to: 1, duration: 600, ease: 'easeOut' }),
    Rect(140, 80).fill('#0ea5e9').rotate({ from: 0, to: Math.PI / 8, duration: 600 })
  ),
  on('scene+1200', Circle(10).fill('#22c55e').move({ y: [-80, 80], duration: 900, loop: true })),
]);

Install

npm install disclose-dsl

Quick Start (Module)

import { Scene, Circle, Rect, play } from 'disclose-dsl';

const scene = Scene({ duration: 4000 }, (t) => [
  Circle(60)
    .fill('#ff4d4f')
    .move({ x: [-200, 200], duration: 2000, ease: 'easeInOut' })
    .opacity({ from: 0, to: 1, duration: 800 }),

  Rect(140, 90)
    .fill('#2f54eb')
    .scale({ from: 0.7, to: 1.1, duration: 1200, ease: 'easeOut' })
    .rotate({ from: 0, to: Math.PI / 8, duration: 1200 }),
]);

const canvas = document.querySelector('#stage');
if (!canvas) throw new Error('Canvas not found');

play(canvas, scene);

Quick Start (CDN + HTML)

<canvas id="stage" style="width: 800px; height: 400px;"></canvas>
<script type="module">
  import {
    Scene,
    Circle,
    Rect,
    play
  } from 'https://unpkg.com/[email protected]/dist/index.js';

  const scene = Scene({ duration: 4000 }, (t) => [
    Circle(60)
      .fill('#ff4d4f')
      .move({ x: [-200, 200], duration: 2000, ease: 'easeInOut' })
      .opacity({ from: 0, to: 1, duration: 800 }),

    Rect(140, 90)
      .fill('#2f54eb')
      .scale({ from: 0.7, to: 1.1, duration: 1200, ease: 'easeOut' })
      .rotate({ from: 0, to: Math.PI / 8, duration: 1200 }),
  ]);

  const canvas = document.querySelector('#stage');
  play(canvas, scene);
</script>

CDN

https://unpkg.com/[email protected]/dist/index.js
https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js

Concepts

  • Scenes: Scene(options, factory) creates a time-aware list of shapes.
  • Shapes: Circle, Rect, Ellipse, Path, Text, Image, and more build geometry.
  • Modifiers: chain fill, stroke, move, scale, rotate, opacity, trim, morph, clip, etc.
  • Time refs: many modifiers accept start as a number or string like scene+200 or prev.end+150.
  • Flow helpers: parallel, sequence, on, and when help orchestrate timing between multiple items.

Tests

npm test

Contributing

Contributions are welcome. See CONTRIBUTING.md for workflow, conventions, and release steps.

License

MIT. See LICENSE.