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

@trevixal/vue

v1.0.5

Published

Vue 3 bindings for the Trevixal editor: useEditor composable, EditorContent component, shallow-ref snapshot.

Readme

@trevixal/vue

CI npm types license

Documentation · Live editor · Changelog · Issues

The Trevixal editor

Features

  • useEditor composable and an EditorContent component
  • Shallow-ref snapshots, so a keystroke re-renders only what changed
  • Vue components inside the document as node views
  • 0.8 kB minified and gzipped, with TypeScript types in the package

Vue 3 bindings for the Trevixal editor.

npm install @trevixal/core @trevixal/vue

Usage

<script setup>
import { Schema, defaultNodes, defaultMarks } from '@trevixal/core'
import { useEditor, useEditorSnapshot, EditorContent } from '@trevixal/vue'

const editor = useEditor({
  schema: new Schema({ nodes: defaultNodes(), marks: defaultMarks() }),
})
const snapshot = useEditorSnapshot(editor)
</script>

<template>
  <div class="trevixal">
    <button
      :aria-pressed="snapshot?.activeMarks.includes('bold')"
      @click="editor?.commands.toggleMark('bold')"
    >Bold</button>
    <EditorContent :editor="editor" placeholder="Write something…" />
  </div>
</template>

useEditor creates the editor on mount and destroys it on unmount. useEditorSnapshot is a shallow ref that changes only when the toolbar state does, typing does not touch it, because the editor's DOM lives outside Vue's reactivity (ADR-0007).

Vue components inside the document

<EditorContent :editor="editor" :node-views="{ counter: Counter }" />

A node view receives { node, editor, updateAttrs } and is rendered into a container the editor owns, with Vue's render, not a second createApp, so it shares your application's context and is torn down with the node.

<script setup>
const props = defineProps(['node', 'editor', 'updateAttrs'])
</script>

<template>
  <button @click="updateAttrs({ count: Number(node.attrs.count) + 1 })">
    count: {{ node.attrs.count }}
  </button>
</template>

The node arrives by value and the component is redrawn on every change rather than handed a reactive proxy: the document is immutable, so a new node is the change, and a proxy would invite writing to a node that no longer exists. Hold no state in a node view, read it from node, write it with updateAttrs, and undo will rewind your component along with everything else.

Server rendering

Importing this package touches no DOM, and useEditor creates nothing until the component mounts, so it is safe in an SSR build. There is a test that imports it with no DOM present and checks its public symbols are there.

License

Apache-2.0