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

@molecule/app-stepper-default

v1.0.1

Published

Default provider for @molecule/app-stepper

Downloads

486

Readme

@molecule/app-stepper-default

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Default provider for @molecule/app-stepper.

In-memory, headless stepper: step navigation (next/previous/goTo), linear-mode gating, and completion tracking. No DOM, no styling — the app renders the step UI and drives this state machine.

Quick Start

import { setProvider, requireProvider } from '@molecule/app-stepper'
import { provider } from '@molecule/app-stepper-default'

setProvider(provider)

const steps = [
  { id: 'account', label: 'Account', completed: false },
  { id: 'profile', label: 'Profile', completed: false },
  { id: 'review', label: 'Review', completed: false, optional: true },
]
const stepper = requireProvider().createStepper({
  steps,
  linear: true,
  onStepChange: (i) => render(i),
})

// Linear mode reads YOUR step objects: mark the current one complete to unlock next().
steps[stepper.getActiveStep()].completed = true
stepper.next()

Type

provider

Installation

npm install @molecule/app-stepper-default @molecule/app-stepper

API

Interfaces

DefaultStepperConfig

Provider-specific configuration options.

interface DefaultStepperConfig {
  /** Currently not implemented — orientation is a rendering concern the app owns. */
  orientation?: 'horizontal' | 'vertical'
}

Functions

createProvider(_config)

Creates a default stepper provider.

function createProvider(_config?: DefaultStepperConfig): StepperProvider
  • _config — Optional provider configuration.

Returns: A configured StepperProvider.

Constants

provider

Default stepper provider instance.

const provider: StepperProvider

Core Interface

Implements @molecule/app-stepper interface.

Bond Wiring

Setup function to register this provider with the core interface:

import { setProvider } from '@molecule/app-stepper'
import { provider } from '@molecule/app-stepper-default'

export function setupStepperDefault(): void {
  setProvider(provider)
}

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-stepper ^1.0.1

Runtime Dependencies

  • @molecule/app-stepper

  • Wire it with setProvider() from @molecule/app-stepper or bond('stepper', provider) from @molecule/app-bond — both route through the shared registry (the core was migrated off its old module-local singleton); requireProvider() throws until one has run.

  • Headless — the provider owns navigation state only; the app owns all rendering (step indicators, content, buttons).

  • There is no "complete step" method. The instance shares your step objects: set step.completed = true (or optional: true) on the objects you passed to createStepper — linear next()/goTo() gate on those flags.

  • Blocked navigation is a SILENT no-op (linear gating, out-of-range goTo) — no error and no onStepChange call; check getActiveStep() if you need to detect it.

  • validate() only checks the current step's error flag; isComplete() requires every non-optional step completed.

E2E Tests

Integration checklist — drive the real rendered wizard in the live preview (no mocks), adapt each item to this app's actual steps/screens, and check every box off one by one. A box you can't check is an integration bug to fix — not a skip:

  • [ ] The wizard renders every configured step, the active step is visually distinct (highlighted/current), and progress is shown (e.g. "Step 2 of 4" or a filled indicator) — the count/order on screen matches the steps config and getActiveStep().
  • [ ] NEXT advances one step (content + indicator update to the next step) and PREV/Back returns to the prior step; the first step offers no working Back and the last step shows a Finish/Submit action instead of Next.
  • [ ] A step that gates on input blocks NEXT until it is valid/complete — leaving a required field empty keeps you on the step with a visible error and the incomplete step cannot be skipped past; a step marked optional, by contrast, CAN be advanced past without completing it.
  • [ ] A linear stepper refuses to jump ahead — clicking an unreached future step in the indicator (or goTo(futureIndex)) does nothing and the active step stays put; you reach it only by completing the steps before it. A non-linear stepper lets you navigate directly to any step.
  • [ ] Completing the final step fires the completion outcome (the form submits / a success screen appears) and isComplete() is true — the wizard doesn't advance past the end.
  • [ ] Per-step data survives navigation: enter values on an early step, go forward, then Back — the earlier step's values are still there, not reset, and re-editing them and returning keeps the latest input.