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

temp-builder

v2.1.0

Published

Template Builder - React components for embedding editor and viewer in Next.js and React apps

Readme

temp-builder

React components for adding the Template Builder editor and viewer to Next.js and React apps. The editor is hosted at https://editor.manne.work.

Installation

npm install temp-builder react react-dom

Quick start (Next.js)

'use client'

import { TemplateEditor } from 'temp-builder'

export default function TemplatePage() {
  return (
    <TemplateEditor
      onSave={(data) => {
        if (data.success) {
          fetch('/api/templates', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({
              content_ast: data.content_ast,
              html_snapshot: data.html_snapshot,
            }),
          })
        }
      }}
    />
  )
}

TemplateEditor props

| Prop | Type | Description | |------|------|-------------| | templateId | string | Template ID for context | | authToken | string | Auth token | | tenantId | string | Tenant ID | | labId | string | Lab ID | | fieldCatalog | unknown[] | Field catalog | | assetUploadUrl | string | Custom upload URL | | initialContentAst | object | Pre-load content (ProseMirror JSON) | | initialHtmlContent | string | Pre-load content (HTML) | | onSave | (data: SaveResponsePayload) => void | Called when user saves | | onReady | () => void | Called when editor is ready | | onPreviewRequest | (html: string) => void | Called when user clicks Preview | | onContentChange | (data: ContentResponsePayload) => void | Called from getContent | | height | string \| number | Component height (default: '600px') | | style | CSSProperties | Inline styles | | className | string | CSS class |

SaveResponsePayload

interface SaveResponsePayload {
  success: boolean
  content_ast: object  // ProseMirror JSON – store for editing
  html_snapshot: string // HTML – for display/export
  nonce: string
}

Imperative API (ref)

const editorRef = useRef<TemplateEditorRef>(null)

<TemplateEditor ref={editorRef} ... />

// Then:
editorRef.current?.loadTemplate({ content_ast: {...} })
editorRef.current?.saveRequest()
editorRef.current?.getContent()
editorRef.current?.insertPlaceholder('field_code', 'Label', 'text')
editorRef.current?.setReadonly(true)

TemplateViewer props

| Prop | Type | Description | |------|------|-------------| | html | string | HTML content to display | | pdf | string | PDF URL | | title | string | Document title | | meta | { label: string; content: string }[] | Metadata | | onReady | () => void | Called when viewer is ready | | onClose | () => void | Called when user closes | | onEditRequest | () => void | Called when user requests edit | | height | string \| number | Component height (default: '600px') |

URLs

  • Editor: https://editor.manne.work/
  • Viewer: https://editor.manne.work/?mode=viewer
  • Docs: https://editor.manne.work/docs