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

@eternal-baguette/atomic

v5.0.2

Published

A web-component library for building modern UIs interfacing with the Coveo platform

Readme

npm version Built With Stencil

Atomic

A web-component library for building modern UIs interfacing with the Coveo platform. Atomic web-components are built with Stencil. They are self-encapsulated, composable, and light-weight.

Using the library: Coveo Atomic Library Official Documentation.

Entry points

The @coveo/atomic package exposes the following entry points:

  • @coveo/atomic: exports various types and utilities used by Coveo Atomic.
  • @coveo/atomic/loader: exports the Coveo Atomic components types, as well as the defineCustomElements and setNonce utilities.
  • @coveo/atomic/themes: exports the sample Coveo Atomic themes.
  • @coveo/atomic/assets: exports the SVG icons used by Coveo Atomic.
  • @coveo/atomic/lang: exports the localization files used by Coveo Atomic.

Getting Started

Once you have cloned the repo, follow the instructions in the top-level README.md to install dependencies and link packages.

Running package scripts

While there are package specific scripts for this package, its best to rely on running command with turbo from the root of the monorepo.

For example, to run the package in the development you would run

# ✅ Preferred method
pnpm turbo run dev --filter=@coveo/atomic

from the root of the monorepo, as opposed to

# ❌ Deprecated method
cd package/atomic
pnpm run dev 

While running scripts from the package folder does work, using the turbo scripts is generally a smoother experience.

All the subsequent examples assume you are operating from the monorepo root.

Available scripts

Atomic uses Storybook for component development, documentation, and testing. To start Storybook in development mode:

pnpm turbo run dev --filter=@coveo/atomic

Storybook will be available at http://localhost:4400.

[!NOTE] It is important you build @coveo/atomic at least once before running the Storybook server. This ensures all components can be properly rendered by Storybook, otherwise you not see components rendered.

To build the library for production, run:

pnpm turbo run build --filter=@coveo/atomic

To run the unit tests for the components, run:

pnpm turbo run test --filter=@coveo/atomic

Storybook MCP (Model Context Protocol)

This Storybook instance is configured with the MCP addon, which enables AI agents to programmatically interact with component stories. When Storybook is running, the MCP server is accessible at http://localhost:4400/mcp.

Run Cypress for Atomic components

Ref: https://docs.cypress.io/

  • All the tests will need to be under folder cypress\integration

Open

To open cypress, run:

pnpm turbo run e2e:watch --filter=@coveo/atomic

To run all the test, run:

pnpm turbo run e2e  --filter=@coveo/atomic

To run all the test in Firefox:

pnpm turbo run e2e:firefox --filter=@coveo/atomic

Utilities

Stencil decorators

When building Atomic components, a series of decorators are used to make development faster.

InitializeBindings & BindStateToController decorators

InitializeBindings is a utility that automatically fetches the bindings from the parent atomic-search-interface or atomic-external component. This decorator has to be applied to a property named bindings.

Important In order for a component using this decorator to render properly, it should have an internal state bound to one of the properties from bindings. This is possible by using the BindStateToController decorator along with a State decorator.

Here is a complete example:

import {
  InitializeBindings,
  InitializableComponent,
  BindStateToController,
  Bindings,
} from '@eternal-baguette/atomic';
import {ControllerState, Controller, buildController} from '@eternal-baguette/headless';
import {Component, State} from '@stencil/core';

@Component({
  tag: 'atomic-component',
})
export class AtomicComponent implements InitializableComponent {
  @InitializeBindings() public bindings!: Bindings;
  private controller!: Controller;

  // Automatically subscribes the `controllerState` to the state of the `controller`
  @BindStateToController('controller')
  @State()
  private controllerState!: ControllerState;

  // Method called after bindings are defined, where controllers should be initialized
  public initialize() {
    this.controller = buildController(this.bindings.engine);
  }

  render() {
    return [this.strings.value(), this.controllerState.value];
  }
}

ResultContext decorator

ResultContext is a utility that automatically fetches the result from the parent component's rendered atomic-result. This utility is used inside of custom result template components.

import {ResultContext} from '@eternal-baguette/atomic';
import {Component, State} from '@stencil/core';

@Component({
  tag: 'atomic-result-component',
})
export class AtomicResultComponent {
  @ResultContext() private result!: Result;

  @State() public error!: Error;

  public render() {
    return this.result.title;
  }
}

Generate Component Command

To generate a new component, use the following command:

pnpm turbo generate-component --filter=@coveo/atomic -- --name=<component-name> --output=<path-to-output-directory>

The output argument is optional. If not provided, it will default to src/components/commerce.

For example, to generate a component named atomic-ball, run:

pnpm turbo generate-component --filter=@coveo/atomic -- --name=ball

This will create the necessary component files under the default path src/components/commerce/atomic-ball.

If you'd like to specify a different path, you can use the --output flag. For example, to generate the component under src/components/search, run:

pnpm turbo generate-component --filter=@coveo/atomic -- --name=ball --output=src/components/search

You can also use --name=atomic-ball if you'd like, but the script will automatically add the "atomic" prefix if necessary.

This will create the component in the specified directory (src/components/search/atomic-ball in this case), or use the default src/components/commerce/atomic-ball if no output is provided.

Men trip not on mountains; they stumble upon stones.

Fix