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 🙏

© 2025 – Pkg Stats / Ryan Hefner

designertool

v0.32.0

Published

<h1 align="center">Postcard Designer Tool</h1>

Readme

User Guide

Install the package in your application:

npm install designertool

Default config:

{
  // Existing:
  "size": {
    "w": 9,
    "h": 6
  },
  "template_scope": undefined,
  "flags": {
    "disable_default_templates": false
  },
  "initial_html": "<html>... HTML GENERATED BY A DESIGNERTOOL INSTANCE ... </html>",
  // There can be selected between these two options: 'download' or 'save'
  "htmlButtonBehaviour": 'save',
  // This function is called when the user clicks on the Html button: 'download' or 'save'. (This is only an example, you can replace it with your own function)
  "onHtmlButtonClick": (html: any) => {
    console.log(html);
  },
  "zoom": 100,
  "backgroundColor": "#ffffff",
  "backgroundImage": null,
  "border": {
    "enabled": false,
    "width": 6,
    "color": "rgba(0, 0, 0, 0)"
  },
  "canvasOffset": {
    "x": 0,
    "y": 0
  },
  "address_box": {
    "visible": true,
    "width": 3.6,
    "height": 2.2
  },
  "merge_variables": [
    "company",
    "firstname",
    "lastname",
    "address1",
    "address2",
    "city",
    "state",
    "zipcode"
  ],
  "return_address": {
    "company": "Test",
    "firstname": "Jeff",
    "lastname": "Doe",
    "address1": "425 Main St",
    "address2": "Apt 1",
    "city": "Miami",
    "state": "FL",
    "zipcode": "34689"
  },
  "example_data": [
    {
      "company": "Acme",
      "firstname": "John",
      "lastname": "Doe",
      "address1": "123 Main St",
      "address2": "Apt 1",
      "city": "Los Angeles",
      "state": "CA",
      "zipcode": "12345"
    },
    {
      "company": "Acme",
      "firstname": "Jane",
      "lastname": "Doe",
      "address1": "23 Any street",
      "address2": "Apt 45",
      "city": "Anytown",
      "state": "CA",
      "zipcode": "23452"
    }
  ],
  "api": {
    "base_url": "https://dev-designer.directmailmanager.com/api",
    "project_id": 1,
    "user_id": 2
  },
  "user_id": "{INTERNAL_USER_ID}",
  "google": {
    "map_api_key": "{YOUR_GOOGLE_MAPS_API_KEY}",
    "use_predefined_locations": false,
    "to_addresses": ["1 Main St Apt 1, Los Angeles, CA 12345"]
  },
  "fonts": [
    {
      "name": "Arial Black",
      "link": "https://fonts.googleapis.com/css?family=Arial+Black"
    },
    {
      "name": "Courier New",
      "link": "https://fonts.googleapis.com/css?family=Courier+New"
    }
  ]
}

Use the component in your application:

<script setup lang="ts">
import { register } from 'designertool'
register()

</script>

<template>
  <PostcardDesigner />
</template>

Available functions to modify the default config:

  • Every option can be modified by calling the init() function except the fonts, which can be extended by calling the addFont() function:
import { init, addFont } from '@webgurus-eu/postcard-designer-tool';

init({
  backgroundColor: '#000000',
  return_address: {
    company: '',
    firstname: 'Chuck',
    lastname: 'Norris',
    address1: '420 Forrest St',
    address2: '',
    city: 'Austin',
    state: 'TX',
    zipcode: '34444',
  },
});

addFont([
  {
    name: 'Kablammo',
    link: 'https://fonts.googleapis.com/css?family=Kablammo',
  },
  {
    name: 'Bebas Neue',
    link: 'https://fonts.googleapis.com/css?family=Bebas+Neue',
  },
]);

Built With

  • TypeScript
  • Vue 3
  • Vite
  • Tailwind

Future Updates

  • [ ] Conversion Tracking