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

@octanejs/astro

v0.0.31

Published

Use Octane components as Astro islands — SSR, hydration, and .tsrx/.tsx compilation via octane/compiler/vite

Downloads

3,677

Readme

@octanejs/astro

Use Octane components as Astro islands.

This integration wires Astro's renderer API to Octane's compiler and runtime:

  • octane/compiler/vite compiles .tsrx (and pragma-owned .tsx) islands
  • octane/server renderToString produces hydratable HTML (+ scoped CSS)
  • octane hydrateRoot / createRoot hydrate on Astro client:* directives

It does not replace @octanejs/vite-plugin. Astro still owns routing, pages, and the HTML shell.

Install

pnpm add octane @octanejs/astro

Setup

// astro.config.mjs
import { defineConfig } from 'astro/config';
import octane from '@octanejs/astro';

export default defineConfig({
	integrations: [octane()],
});

Author islands in .tsrx (preferred) or in .tsx with a leading pragma:

// src/components/Counter.tsrx
import { useState } from 'octane';

export function Counter(props: { start?: number }) @{
	const [count, setCount] = useState(props.start ?? 0);
	<button type="button" onClick={() => setCount(count + 1)}>
		{'Count: ' + count}
	</button>
}
---
import { Counter } from '../components/Counter.tsrx';
import { ClientOnlyBadge } from '../components/ClientOnlyBadge.tsrx';
---
<Counter client:load start={0} />
<!-- Skip SSR; renderer hint must be `octane` (the AstroRenderer.name). -->
<ClientOnlyBadge client:only="octane" />

.tsx ownership (requireDirective)

By default requireDirective: true so unmarked .tsx can belong to another JSX framework (or stay untouched). A project .tsrx is always Octane's by extension. A project .tsx / .ts / .js is Octane's only with:

/** @jsxImportSource octane */

Pass requireDirective: false only when every project .tsx should compile as Octane.

Multiple JSX frameworks

Set include / exclude so each renderer owns distinct modules (same guidance as @astrojs/react):

octane({
	include: ['**/components/octane/**'],
});

Options

| Option | Default | Purpose | | --- | --- | --- | | include / exclude | — | Renderer check() filter; .astro always excluded from the compiler | | requireDirective | true | Mixed-toolchain ownership gate | | profile | false | Octane profiling metadata | | hmr | serve on | Octane HMR codegen | | experimentalDisableStreaming | false | Reserved; v1 always buffers with renderToString |

Intentional Octane differences inside islands

  • Native DOM events (onClick, onInput, …) — no synthetic onChange for text inputs; use onInput for per-keystroke updates
  • Dependency arrays are compiler-inferred when omitted
  • Nested Hydrate works inside islands once the compiler is on; Astro client:* still controls when the island hydrates

Container renderer

import { getContainerRenderer } from '@octanejs/astro/container-renderer';