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

@scality/rspress-docs-tooling

v0.16.0

Published

Shared Rspress theme and build preset for Scality documentation sites

Readme

@scality/rspress-docs-tooling

Shared Rspress v2 theme and build preset for Scality documentation sites, built on @scality/core-ui.

Entry points

| Import | Runs | Used by | | --- | --- | --- | | @scality/rspress-docs-tooling/theme | the browser | every documentation site | | @scality/rspress-docs-tooling/preset | the build | sites with remark plugins and post-build passes | | @scality/rspress-docs-tooling/portable-base (and the rspress-portable-base CLI) | after the build | sites served from more than one URL prefix |

There is no root export: a site that only renders pages never resolves the build-time half, so it cannot end up in a browser bundle.

Install

npm install @scality/rspress-docs-tooling

@scality/core-ui comes with the package. react, react-dom, @rspress/core and styled-components are peers — npm installs them for you, and keeping styled-components a peer is what guarantees a single copy beside core-ui's own.

Use

Create theme/index.tsx in your Rspress project (next to docs/):

export * from '@scality/rspress-docs-tooling/theme';

That single line:

  • Re-exports every component from @rspress/core/theme-original so the rest of the default theme keeps working.
  • Replaces Layout with one that wraps the doc in CoreUiThemeProvider + ToastProvider.
  • Imports @scality/core-ui/dist/index.css (Lato + Fira Code fonts, base styles).
  • Aligns Rspress's brand CSS variables to the core-ui dark theme tokens.
  • Lays the page out fluid: sidebar on the left edge, outline on the right edge, the doc in between.
  • Draws the sidebar like core-ui's product Sidebar and themes every scrollbar with ScrollbarWrapper.
  • Adds the Scality documentation footer (support links, social links, and the date the site was built).
  • Opens every Mermaid diagram in a full-screen pan and zoom viewer on click.
  • Lets wide tables scroll instead of squeezing their columns.

Brands

The layout defaults to artesca. Pass your product's brand by overriding Layout:

import { Layout as ScalityLayout } from '@scality/rspress-docs-tooling/theme';

export * from '@scality/rspress-docs-tooling/theme';

export const Layout = () => <ScalityLayout brand="ring" />;

The brands are artesca, ring, adi, xdm and maestro, each with a light and a dark variant. There is no prop taking a raw Core-UI theme: it could only restyle the Core-UI components, while links, sidebar and tabs keep the brand's generated colours. A different look means adding a brand to src/theme/brands.ts.

Version and sidebar links

version shows the documentation's version as a tag next to the navbar logo. SidebarLinks lists documents that live outside the doc tree, such as release notes or legal terms, under the sidebar; passed as afterSidebar it also appears in the mobile drawer. A group without links is not rendered.

import { withBase } from '@rspress/core/runtime';
import { Layout as ScalityLayout, SidebarLinks } from '@scality/rspress-docs-tooling/theme';

export * from '@scality/rspress-docs-tooling/theme';

export const Layout = () => (
  <ScalityLayout
    brand="artesca"
    version="4.4.0"
    afterSidebar={
      <SidebarLinks
        groups={[
          { title: 'Terms and Conditions', links: [{ text: 'PDF', href: withBase('/terms.pdf') }] },
        ]}
      />
    }
  />
);

Feedback widget

UsersnapFeedback files documentation feedback against the product's own Usersnap project, with the page, product, version and locale attached:

import {
  Layout as ScalityLayout,
  UsersnapFeedback,
} from '@scality/rspress-docs-tooling/theme';

export * from '@scality/rspress-docs-tooling/theme';

export const Layout = () => (
  <>
    <ScalityLayout brand="adi" />
    <UsersnapFeedback spaceKey={SPACE_KEY} projectId={ADI_PROJECT_ID} />
  </>
);

spaceKey and projectId are required and ship with the consuming repository, never with this package — the npm tarball is public. The component throws when either is missing, because the alternative is feedback filed silently against the wrong product.

product defaults to the brand; with neither a product nor the Scality Layout, the widget does not load and logs why. version and locale are omitted when empty. The page is read when the reader opens the widget, not when it loads, and the button is re-shown on every client-side navigation.

Demoing core-ui components in MDX

@scality/core-ui touches window / document and uses heavy CSS — wrap interactive demos in <NoSSR>:

import { NoSSR } from '@rspress/core/runtime';
import { Button } from '@scality/core-ui/dist/next';

<NoSSR>
  <Button label="Click me" variant="primary" />
</NoSSR>

Serving one build from any URL prefix

rspress bakes its base into every link, asset URL and the client router, so a build only works at the path it was built for: a latest symlink next to a versioned folder renders, but its links and routes resolve to that folder.

Build with a placeholder base (the default is /REPLACE_ME_PREFIX/), then run:

rspress build && rspress-portable-base doc_build

The output then works at any prefix with no deploy-time rewrite: HTML, CSS and Markdown URLs become relative, each page derives the base from its own URL at load time, and the client bundle reads that value. 404.html derives it from the first path segment that is a top-level entry of the build. The pass fails if the bundle does not carry the base in exactly the two expected string literals, so an rspress upgrade that changes them breaks the build instead of the site.

Build

npm run build      # rslib emits ESM + .d.ts + styles.css to dist/