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

@stone-js/use-view

v0.8.15

Published

Framework-agnostic view engine layer for Stone.js: page/head contracts, rendering modes, XSS-safe SSR snapshot serialization, and the ViewEngine interface shared by use-react (and future use-vue).

Readme

Stone.js - Use View

npm license npm version npm downloads Maintenance CI Release Quality Gate Status Coverage Security Policy CodeQL Dependabot Status Conventional Commits

The framework-agnostic view engine layer for Stone.js: page/head contracts, rendering modes, XSS-safe SSR snapshots, server data-fetching, and the ViewEngine interface shared by every view integration.


Overview

Stone.js Use View is the shared foundation beneath every Stone.js view integration — @stone-js/use-react today, @stone-js/use-vue and a React Native binding next. It contains no React and no DOM code: a concrete engine plugs in through the ViewEngine interface, while the universal rendering concerns (head/SEO, SSR/SSG/streaming, hydration snapshots, server data loading) live here, once, for all engines.

Write your view logic once; the view engine applies it to any rendering mode.

Why Stone.js Use View?

  • Engine-agnostic — the same contracts describe a React element, a Vue vnode, or any node type.
  • Universal rendering — one model for CSR, SSR, SSG and streaming SSR.
  • Secure by default — SSR state snapshots are serialized XSS-safe; head attributes are escaped.
  • SEO-first — a fluent head manager for title, Open Graph, Twitter cards, canonical, robots and JSON-LD.
  • No duplication — engines implement a thin adapter; everything universal is shared.

Key Features

  • Head/meta managementcreateHead() / defineHead() fluent builder (title templates, OG, Twitter, JSON-LD, robots, canonical, hierarchical merge) and serializeHead() for SSR/SSG.
  • XSS-safe snapshotsserializeSnapshot() / renderSnapshotScript() / parseSnapshot().
  • Server data-fetchingdefineServerLoader() and a ServerLoaderContext (token/cookies aware) with graceful fallback to client rendering.
  • Rendering modesRenderingMode (csr | ssr | ssg) and a ViewEngine contract with renderToString and renderToStream.
  • ContractsIView, ViewRenderContext, HeadContext, MetaView, Laziable.

Installation

npm install @stone-js/use-view

Usage Example

import { createHead, serializeSnapshot } from '@stone-js/use-view'

const head = createHead()
  .title('Home')
  .titleTemplate('%s — Stone.js')
  .description('Universal rendering, done right.')
  .og({ type: 'website', image: 'https://stonejs.dev/og.png' })
  .jsonLd({ '@context': 'https://schema.org', '@type': 'WebSite', name: 'Stone.js' })
  .toContext()

const snapshot = serializeSnapshot({ user }) // XSS-safe, embed in <script type="application/json">

Learn More

This package is part of the Stone.js ecosystem, a modern JavaScript framework built around the Continuum Architecture.

Explore the full documentation: https://stonejs.dev

API documentation

Contributing

See Contributing Guide.