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

taleem-slides

v1.3.0

Published

Taleem Slides Compiler — converts JSON into HTML, state timeline, and groups

Downloads

102

Readme

Taleem Slides — README (Current Architecture)


Overview

taleem-slides is a pure compilation layer that converts structured JSON into:

  • HTML (static structure)
  • Actions (state timeline)
  • Groups (CSS behavior mapping)

It does NOT:

  • manipulate the DOM
  • execute timing
  • apply styles
  • decide animations inside slides

Core Philosophy

JSON → Slides → (wrapper + primitives) → HTML + actions + groups → runner → DOM

🧠 Core Design (IMPORTANT)

Separation of Concerns

| Layer | Responsibility | | ------------- | ------------------------------ | | Slide | Defines structure (HTML + ids) | | Primitive | Defines behavior (state logic) | | Wrapper | Connects slide → primitive | | Action Runner | Applies state to DOM | | CSS | Controls appearance |


🔧 Main API

renderTaleemSlide(json)

📦 Output Format

{
  html: string,
  actions: [
    {
      time: number,
      state: {
        [groupName]: string[]
      }
    }
  ],
  groups: {
    [groupName]: string[]
  }
}

🧩 Slide Contract (NEW — LOCKED)

Every slide must return:

{
  html: string,
  animation: string,
  ids: string[]
}

Rules:

  • HTML must include all elements with ids
  • No actions
  • No groups
  • No timing logic
  • No animation logic

🎬 Animation Primitives (CORE SYSTEM)

All behavior is handled by 3 primitives only:


1. progressiveReveal

Items appear one-by-one and stay visible

groups = {
  visible: [],
  hidden: ["hidden"]
}

2. highlightOne

One item focused, others dim

groups = {
  focus: [],
  dim: ["dim"]
}

Used by:

  • FocusList
  • Eq (with extensions)

3. oneAtATime

Only one item visible at a time

groups = {
  visible: [],
  hidden: ["hidden"]
}

Used by:

  • Skeleton slides

⚙️ Wrapper (renderTaleemSlide)

The wrapper:

  1. Calls slide → gets:

    html, animation, ids
  2. Validates:

    • ids exist
    • timings (if provided)
  3. Runs primitive:

runPrimitive({
  type: animation,
  ids,
  timings
})
  1. Returns:
{ html, actions, groups }

⏱ Timing Model

  • Timing is optional
  • Provided by user:
timings: [t1, t2, t3]

Rules:

  • length === ids.length
  • strictly increasing

🧠 State Model

  • Each action is a complete state snapshot
  • No partial updates
  • No merging
{
  time: 5,
  state: {
    visible: ["id1"],
    hidden: ["id2", "id3"]
  }
}

🎯 Eq Slide Special Case

Eq slide uses:

  • highlightOne primitive
  • PLUS additional ids (side panel)

Meaning:

  • focus → line
  • dim → other lines
  • visible/hidden → side panel items

👉 Still same primitive, extended mapping


🔒 What is LOCKED (Do Not Change)

  • Output API (html + actions + groups)
  • Slide contract (html + animation + ids)
  • Primitive system (3 only)
  • State snapshot model

❌ What Slides MUST NOT DO

  • generate actions ❌
  • define groups ❌
  • use timeline logic ❌
  • import primitives ❌

⚠️ Known Simplifications (Intentional)

  • No per-item timing inside slides
  • No After Effects style timeline
  • Sequence = array order
  • Behavior limited to 3 primitives

👉 This is by design (NOT a limitation)


🚀 Future Direction (SAFE)

1. Primitive Extensions (optional)

  • better Eq mapping
  • custom behaviors (still primitive-based)

2. Validation Layer

  • stronger schema validation
  • id consistency checks

3. Testing

  • golden tests per slide
  • full wrapper integration tests

❌ What NOT to Do

  • ❌ Do NOT reintroduce per-item timing
  • ❌ Do NOT move logic back into slides
  • ❌ Do NOT add new primitives casually
  • ❌ Do NOT mix animation logic with HTML

🧭 Guiding Principle

Slides define WHAT exists
Primitives define WHAT happens
Runner enforces it
CSS defines HOW it looks

🧠 Final Note

This system is now:

  • simple
  • deterministic
  • testable
  • scalable

You have:

👉 removed accidental complexity 👉 eliminated duplicate logic 👉 unified all slides under one model


🔥 One-line Summary

Taleem Slides is a structure + behavior compiler powered by 3 primitives