pbvex-svelte

Installation
SKILL.md

PBVex Svelte 5

Use @pbvex/svelte as a Svelte 5, runes-first layer over an independently installed @pbvex/client. Set a client in Svelte context during component initialization, then use the current package exports from child components. Prefer rune state and markup reads over Svelte stores.

The current package is Svelte 5 runes-first and intentionally breaks from the legacy store API. Inspect the installed/versioned exports and types before coding because an application may have a different package version.

sed -n '1,240p' packages/svelte/src/index.ts
sed -n '1,240p' packages/svelte/package.json
rg -n "export |useQuery|setClient|skip|QueryState" packages/svelte/src packages/svelte/dist
pnpm --filter @pbvex/svelte test

Runes-first patterns

Use setClient in a layout/root during initialization and getClient only where context is available. Use the primary query utility with generated public references. Treat query output as reactive rune-backed state and read its data, error, and loading fields directly in markup—do not $-subscribe or use svelte/store helpers unless the installed API explicitly says it exposes a store.

When arguments depend on $state() or $props(), supply the supported reactive getter so a changed argument replaces the watch. Use the exported skip sentinel for a disabled conditional query. Use the mutation/action utilities for typed async calls. Let component destruction clean up query subscriptions, and explicitly close a client only at its true application/test owner.

Installs
6
First Seen
Jul 15, 2026
pbvex-svelte — nathabonfim59/pbvex