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

@signal-kernel/vue

v0.2.4

Published

Thin Vue adapter for exposing signal-kernel graph values and async resources as readonly refs.

Readme


@signal-kernel/vue is a thin rendering adapter for Vue applications that need to expose an existing signal-kernel graph as readonly refs. It connects Vue scopes to graph values without moving graph ownership, business logic, or async lifecycle into Vue.

Core signals, computed values, effects, batching, and invalidation semantics remain owned by @signal-kernel/core.

Install

pnpm add @signal-kernel/vue @signal-kernel/core @signal-kernel/async-runtime

vue is a peer dependency and is expected to already exist in the Vue application.

Core Bridge

import { computed, signal } from "@signal-kernel/core";
import { useKernelValue } from "@signal-kernel/vue";

const count = signal(0);
const doubled = computed(() => count.get() * 2);

export function useCounter() {
  const value = useKernelValue(count);
  const label = useKernelValue(doubled);

  function increment() {
    count.set(count.peek() + 1);
  }

  return { value, label, increment };
}

useKernelValue() is the preferred bridge for a single readable signal-kernel graph value. It accepts values that expose get() and peek(), including signals and computed values.

useSignalValue() and useComputedValue() remain available as compatibility aliases when a call site wants a signal-specific or computed-specific readability hint.

Reading Multiple Values

Use useReactive() to read an existing reactive scope from Vue. Derived graph logic should still live in computed() or other runtime primitives.

import { computed, signal } from "@signal-kernel/core";
import { useReactive } from "@signal-kernel/vue";

const count = signal(1);
const doubled = computed(() => count.get() * 2);
const status = signal("idle");

export function useDashboard() {
  return useReactive(() => ({
    count: count.get(),
    doubled: doubled.get(),
    status: status.get(),
  }));
}

Async Bridge

import { signal } from "@signal-kernel/core";
import { createResource } from "@signal-kernel/async-runtime";
import { useResource } from "@signal-kernel/vue";

const userId = signal("1");

const userResource = createResource({
  input: userId.get,
  run: async (id, ctx) => {
    const response = await fetch(`/api/users/${id}`, {
      signal: ctx.signal,
    });

    return response.json() as Promise<{ name: string }>;
  },
});

export function useUserView() {
  const user = useResource(userResource);

  return {
    value: user.value,
    status: user.status,
    error: user.error,
    reload: user.reload,
    cancel: user.cancel,
  };
}

Resource helpers consume resource tuples created by @signal-kernel/async-runtime. They observe value and metadata getters so metadata-only transitions update Vue refs. They do not add caching, retry, cancellation, or Suspense policy.

Stopping a consumer scope only removes the Vue subscriptions created by the adapter. It does not call resource.meta.cancel() or resource.meta.dispose(), because the resource may be shared by other consumers. Application code may explicitly connect resource.meta.dispose() to a scope that truly owns the resource.

When a manual resource exposes runnable metadata, useResource() preserves that metadata type on resource.meta, so resource.meta.run(input) remains available after passing through the Vue adapter.

Boundary

Use Vue event handlers or composable actions to write to graph values. Use computed() for graph derivation. Use Vue lifecycle APIs for imperative component lifecycle work such as DOM APIs, browser subscriptions, focus management, and third-party widgets.