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

cossette-instantsearch-kit

v0.1.4

Published

Svelte InstantSearch widgets and SvelteKit SSR adapter (port of react-instantsearch + react-instantsearch-nextjs)

Readme

cossette-instantsearch-kit

Svelte 5 InstantSearch widgets and a SvelteKit SSR adapter — a port of react-instantsearch + react-instantsearch-nextjs.

Not affiliated with Algolia.

Install

npm install cossette-instantsearch-kit algoliasearch instantsearch.css

Peer deps: svelte ^5, @sveltejs/kit ^2.

Quick start (SvelteKit + SSR)

<!-- src/routes/search/Search.svelte -->
<script lang="ts">
  import { liteClient as algoliasearch } from 'algoliasearch/lite';
  import {
    InstantSearchKit,
    SearchBox,
    Hits,
    Highlight,
    Pagination
  } from 'cossette-instantsearch-kit';

  const searchClient = algoliasearch('APP_ID', 'SEARCH_API_KEY');
</script>

<InstantSearchKit indexName="your_index" routing {searchClient}>
  <SearchBox placeholder="Search" />

  <Hits>
    {#snippet hit({ hit })}
      <Highlight attribute="name" {hit} />
    {/snippet}
  </Hits>

  <Pagination />
</InstantSearchKit>
// src/routes/search/+page.server.ts
import { getServerState } from 'cossette-instantsearch-kit';
// Important: pass a regular component, not `+page.svelte`
import Search from './Search.svelte';

export const load = ({ url }) => getServerState(Search, url);
<!-- src/routes/search/+page.svelte -->
<script lang="ts">
  import Search from './Search.svelte';
</script>

<Search />

InstantSearchKit is the SvelteKit equivalent of InstantSearchNext:

  • hydrates initialResults from getServerState / page.data
  • wires routing to SvelteKit replaceState + history

Without the Kit helper

<script lang="ts">
  import { InstantSearch, SearchBox, Hits } from 'cossette-instantsearch-kit';
</script>

<InstantSearch indexName="your_index" {searchClient} routing>
  <SearchBox />
  <Hits />
</InstantSearch>

Custom connectors

<script lang="ts">
  import { connect } from 'cossette-instantsearch-kit';
  import { connectStats } from 'instantsearch.js/es/connectors';

  const state = connect(connectStats, {}, { $$widgetType: 'svelte-instantsearch.stats' });
  let { nbHits } = $derived($state);
</script>

<p>{nbHits} results</p>

Widgets

SearchBox, Hits, InfiniteHits, Highlight, Snippet, Pagination, RefinementList, Menu, HierarchicalMenu, Breadcrumb, CurrentRefinements, ClearRefinements, ToggleRefinement, RangeInput, SortBy, HitsPerPage, Stats, PoweredBy, Configure, Index.

Develop

nvm use   # Node 24
npm install
npm run dev

Releases

Publishing is automated via npm Trusted Publishing (GitHub OIDC — no long-lived npm token). Pushing a v* tag runs CI → npm publish.

# 1. Land your changes on main
git checkout main && git pull

# 2. Bump version (creates commit + tag, e.g. v0.1.1)
npm version patch   # or minor / major

# 3. Push commit + tag — CI publishes to npm
git push && git push --tags

One-time: trusted publisher on npm

  1. Open the package on npmjs.com → Package Settings → Trusted Publisher
  2. Choose GitHub Actions and set:
    • Organization or user: cossette-numerique
    • Repository: cossette-instantsearch-kit
    • Workflow filename: publish.yml (filename only, not the path)
    • Allowed actions: include npm publish
  3. Save

If the package doesn’t exist yet, publish once from your machine (with 2FA), then add the trusted publisher, or create the empty package on npm first.

You can remove the NPM_TOKEN GitHub secret if you added one earlier — it’s unused now.

License

MIT