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

@burnmark-io/designer-vue

v0.2.0

Published

Vue 3 composable for the burnmark label design engine

Downloads

338

Readme

@burnmark-io/designer-vue

Vue 3 composable for @burnmark-io/designer-core — the headless label design engine behind burnmark.io.

Wraps a LabelDesigner instance in reactive state, manages a debounced render loop with stale-result cancellation, exposes selection state, and re-exports the core actions.

Install

pnpm add @burnmark-io/designer-vue @burnmark-io/designer-core vue

vue (>=3.3) and @burnmark-io/designer-core are peer dependencies.

Quick start

<script setup lang="ts">
import { useLabelDesigner } from '@burnmark-io/designer-vue';

const { document, bitmap, isRendering, canUndo, canRedo, add, undo, redo } = useLabelDesigner({
  canvas: { widthDots: 696, heightDots: 0, dpi: 300 },
});

function addHello() {
  add({
    type: 'text',
    x: 10,
    y: 10,
    width: 200,
    height: 40,
    rotation: 0,
    opacity: 1,
    locked: false,
    visible: true,
    color: '#000000',
    content: 'Hello',
    fontFamily: 'Burnmark Sans',
    fontSize: 20,
    fontWeight: 'normal',
    fontStyle: 'normal',
    textAlign: 'left',
    verticalAlign: 'top',
    letterSpacing: 0,
    lineHeight: 1.2,
    invert: false,
    wrap: false,
    autoHeight: false,
  });
}
</script>

<template>
  <button @click="addHello">Add text</button>
  <button :disabled="!canUndo" @click="undo">Undo</button>
  <button :disabled="!canRedo" @click="redo">Redo</button>
  <p v-if="isRendering">rendering…</p>
  <p>{{ document.objects.length }} objects</p>
</template>

What you get back

| name | type | description | | --------------------- | ---------------------------------------------- | ------------------------------------------------------- | | designer | LabelDesigner | Raw instance — escape hatch | | document | ShallowRef<LabelDocument> | Reactive document. Updates on every core change event | | canUndo / canRedo | Ref<boolean> | History state | | bitmap | ShallowRef<LabelBitmap \| null> | Latest render (debounced 200ms) | | planes | ShallowRef<Map<string, LabelBitmap> \| null> | Multi-plane render when capabilities set | | isRendering | Ref<boolean> | True while a render is in flight | | renderWarning | ShallowRef<RenderWarning \| null> | Non-fatal warning from the core render pipeline | | renderError | ShallowRef<Error \| null> | Render failure | | selection | Ref<string[]> | Selected object IDs — auto-pruned on remove | | select / deselect | (ids) => void / () => void | Selection actions |

Plus the full designer action surface: add, update, remove, reorder, get, getAll, setCanvas, undo, redo, clearHistory, loadDocument, newDocument, toJSON, fromJSON, getPlaceholders, applyVariables, render (force immediate), exportPng, exportPdf, exportSheet, exportBundled.

Options

useLabelDesigner({
  canvas?: Partial<CanvasConfig>;            // when binding constructs the designer
  name?: string;
  designer?: LabelDesigner;                  // wrap an externally-owned instance
  capabilities?: PrinterCapabilities;        // switches render to multi-plane mode
  renderDebounceMs?: number;                 // default 200
  renderOnMount?: boolean;                   // default true — initial bitmap without user action
  maxHistoryDepth?: number;
  assetLoader?: AssetLoader;
});

Notes

  • document is a shallowRef. Core mutates the document in place — the composable replaces the ref on every change event to force reactivity. Do not deeply watch the document object tree; watch document itself.
  • Renders are debounced and cancellable. If a newer change arrives while a render is in flight, the stale result is discarded via a generation counter.
  • exportBundled() returns { blob, missing } — the list of asset keys the bundler could not resolve, mirroring the core contract.
  • All event listeners and pending timers are cleaned up via onScopeDispose, which fires on component unmount or manual effectScope().stop().

License

MIT