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

@boceto/svelte

v0.4.1

Published

Svelte components wrapping <boceto-view> and <boceto-edit>. Works with Svelte 4 and Svelte 5.

Readme

@boceto/svelte

Svelte wrappers for the Boceto custom elements. Works under Svelte 4 and Svelte 5 — the source uses Svelte 4 syntax which compiles cleanly in both.

pnpm add @boceto/svelte
<script lang="ts">
  import { BocetoView, BocetoEdit } from '@boceto/svelte'

  let code = `element navbar 0 0 600 44 "MyApp"
element heading 100 90 400 32 "Welcome"
element primary-button 100 160 400 36 "Sign in"`
</script>

<!-- read-only render -->
<BocetoView {code} width={600} height={240} on:render={(e) => console.log(e.detail.doc)} />

<!-- interactive editor; bind:code for two-way binding -->
<BocetoEdit bind:code width={600} height={240} />

Props

<BocetoView>

| Prop | Type | Notes | |---|---|---| | code | string | Boceto DSL source (one mode) | | src | string | URL to fetch a .boceto file (the other mode) | | width | number | Render width (px) | | height | number | Render height (px) | | page | string | number | Page selector for multi-page docs | | class | string | Forwarded to the underlying <boceto-view> | | style | string | Inline style on the underlying element |

Emits on:render with { doc, page } when the canvas renders.

<BocetoEdit>

| Prop | Type | Notes | |---|---|---| | code | string | DSL source — supports bind:code | | width | number | Editor width (px) | | height | number | Editor height (px) | | readOnly | boolean | Disable editing | | class, style | — | Same as above |

Emits on:change with { code } whenever the editor commits a change.

Get the runtime

@boceto/svelte doesn't include the custom-element runtime — it pulls in @boceto/view and @boceto/edit and calls defineBocetoView() / defineBocetoEdit() on mount. SvelteKit / Vite handle the rest.

Source-only

This package ships .svelte source files; your Svelte tooling compiles them. No build step in the package itself, so the on-disk source is what you debug into. Consumers using strict TypeScript get prop / event types from the sibling .svelte.d.ts files.

Want to know more about Boceto?

  • npm: boceto (CLI) · @boceto/mcp · @boceto/lint · @boceto/core · @boceto/view · @boceto/edit · @boceto/react · @boceto/vue
  • Website: https://maravilla-labs.github.io/boceto/

MIT © Maravilla Labs