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

@celldl/editor

v0.20260305.4

Published

A Vue 3 component for the CellDL Editor.

Readme

The CellDL Editor Vue Component

This package is a Vue 3 component for the CellDL Editor, built with the Composition API.

Usage

The component comes with the following props:

TODO export interface CellDLEditorProps { editorCommand?: CellDLEditorCommand, theme?: Theme }

export type EditorViewCommand = { command: 'view' options: ViewState }

and emits the following actions:

const emit = defineEmits<{ 'editor-data': [data: EditorData], 'error': [msg: string] }>()

  • index.html:

The Content-Security-Policy must allow data: connections and Wasm to be evaluated, for instance:

    <meta
      http-equiv="Content-Security-Policy"
      content="connect-src * data:; script-src 'self' 'wasm-unsafe-eval'" />
  • main.ts:
import { createApp } from 'vue';

import App from './App.vue';

createApp(App).mount('#app');

The Vue component gives access to all of the CellDL Editor's features

  • App.vue:
<template>
  <CellDLEditor
    :editorCommand="editorCommand"
    :theme="editorTheme"
    @editorData="onEditorData"
    @error="onError" />
</template>

<script setup lang="ts">
import type { CellDLEditorCommand, EditorData } from '@celldl/editor';
import '@celldl/editor/style.css';
import * as vueusecore from '@vueuse/core';

import * as vue from 'vue';

import CellDLEditor from '@celldl/editor'

const editorCommand = vue.ref<CellDLEditorCommand>();
const theme = vue.ref<Theme>('light');

vueusecore.useEventListener(document, 'file-edited', (_: Event) => {
  // The current diagram has has been modified, so update any local state (e.g., add a modified indicator to the
  // diagram's title).
});

async function onEditorData(data: EditorData) {
  if (data.kind === 'export') {
    // const uri = 'https://example.org/some_uri_to_identify_the_celldl_source_';
    // const cellmlObject = celldl2cellml(uri, data.data);
    // if (cellmlObject.cellml) {
    //   // Save `cellmlObject.cellml`.
    // } else if (cellmlObject.issues) {
    //   window.alert(cellmlObject.issues.join('\n'));
    // }
  } else {
    // Process `data.data`.
  }
}

function onError(msg: string) {
  window.alert(msg);
}

/*
The editor is initialised with a blank window.

1. To load a CellDL diagram set:

  celldlEditorCommand.value = {
    command: 'file',
    options: {
      action: 'open',
      data: celldlSource,
      name: filename
    }
  }

2. To get serialised CellDL from the editing window set:

  celldlEditorCommand.value = {
    command: 'file',
    options: {
      action: 'data',
      kind: 'export'
    }
  }

with `kind` set as appropriate. This will result in an `editorData` event, to be handled as above.

3. To clear the editing window set:

  celldlEditorCommand.value = {
    command: 'file',
    options: {
      action: 'close'
    }
  }
*/
</script>