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

@0disoft/banora-svelte

v0.1.3

Published

Optional native Svelte 5 adapter for the Banora 0.1 SDK. Install with `npm install @0disoft/banora @0disoft/banora-svelte`. Build locally with `bun run build:adapters` from the repository root. A Svelte-aware compiler/bundler consumes the packaged `.svelt

Readme

Banora Svelte

Optional native Svelte 5 adapter for the Banora 0.1 SDK. Install with npm install @0disoft/banora @0disoft/banora-svelte. Build locally with bun run build:adapters from the repository root. A Svelte-aware compiler/bundler consumes the packaged .svelte components.

ControlledBoard accepts a required plain state and optional onIntent, with common display/input props and borrowed onView bindings. It never creates a record controller; the host supplies accepted snapshots and owns rules/records. See the host-controlled guide.

<script lang="ts">
import {RecordController} from '@0disoft/banora';
import {Board, Viewer, createRecordStore} from '@0disoft/banora-svelte';
const controller = new RecordController({sgf: '(;SZ[9];B[aa])'});
const record = createRecordStore(controller);
</script>
<p>Move {$record.position.moveNumber}</p>
<Board {controller} readOnly={true} />
<Viewer {controller} onStateChange={snapshot => console.log(snapshot.dirty)} />

Board accepts SDK board options; Viewer accepts viewer options except initial sgf. Both accept class, CSS text style, ariaLabel and onStateChange(state). createRecordStore(controller) is a Svelte readable store of immutable snapshots; subscriptions are released when the last consumer unsubscribes. For replaceable controllers use $state.raw and $derived(createRecordStore(controller)).

Configuration changes retain record state; controller replacement remounts the view. Unmount releases listeners/subscriptions and preserves a host controller. Without a supplied controller each component owns its own record and disposes it on unmount. Dispose host controllers after their views are gone. The framework owns the container; the SDK owns its descendants. SSR emits only containers/state text, with board DOM created in client effects. Supply matching record content for state hydration; rendered board HTML hydration is deferred.

Native components and declarations are packaged with @sveltejs/package 3.x and checked by svelte-check 4.x using isolated TypeScript 6.x. This does not downgrade the SDK/root TypeScript 7.x toolchain. See the repository's SDK API, compatibility document and Svelte consumer example for tested versions and limitations.

onView(viewOrNull) supplies a borrowed BoardView/ViewerView handle for exportSvg(options) or asynchronous exportPng(options). Cleanup clears it with null, including callback replacement. Keep handles raw, configure through props and leave disposal to the component. Image export does not save the SGF record or clear dirty state.

drawing={{color:'#206650',width:0.08}} enables the common freehand tool on Board; use nested board options on Viewer. Null disables it. Immutable store snapshots include strokes; the controller owns add/remove/clear, Undo and SGF export/reopen. Read-only views display saved ink, and diagrams include it. SGF uses Banora's private BPN extension, which other viewers may not display.

touch={{mode:'confirm',magnifier:true}} enables magnified touch aiming with confirmation on Board; use nested board.touch on Viewer. Release mode places on lift; null restores direct activation. Pending targets stay in the view, support keyboard refinement and cancel on configuration/context changes or unmount. They never enter SGF/diagrams. Ink takes priority; read-only views do not enter touch aiming.

Compose two Board components with nodeId, compareTo and referenceGeneration (the snapshot's recordGeneration) for side-by-side comparisons. Pins display their own node/path without navigating/editing the shared controller. Missing/stale pins become unavailable and cannot export until restored/rebound. Viewer follows its cursor and accepts board.compareTo. The Svelte example demonstrates pinning, configuration updates, controller ownership and remounts.